Introduction

LEADTOOLS DICOM COM Objects include several custom interfaces/objects developed by LEAD Technologies, Inc. that provide a means for incorporating DICOM image file format support into your applications. These interfaces/objects are:

the ILEADDicomKernel Interface/Object, which provides general support that lets you unlock LEADTOOLS features and generate runtime exceptions.

the ILEADDicomFactory Interface/Object, which lets you create instances of licensed COM objects. This interface/object is particularly useful when working in Visual Basic, VisualBasic Script, Java Script and ASP.

the ILEADDicomDS Interfaces/Objects, which provide support for incorporating DICOM image file format support into your applications.

the ILEADDicomNet Interfaces/Objects, which provide support for the DICOM Network Communication Support for Message Exchange.

the ILEADDicomDir and the ILEADDicomDirEvents Interfaces/Objects, which provide support for the Basic Dicom Directory.

In the documentation, the properties, methods and events in the LEADDicomKernal Interface/Object are designated by (ILEADDicomKernel Interface).

In the documentation, the properties, methods and events in the LEADDicomFactory Interface/Object are designated by (ILEADDicomFactory Interface).

In the documentation, the properties, methods and events in the LEADDicomDS Interface/Object are designated by (ILEADDicomDS Interface).

In the documentation, the properties, methods and events in the LEADDicomNet Interface/Object are designated by (ILEADDicomNet Interface).

In the documentation, the properties, methods and events in the LEADDicomDir Interface/Object are designated by (ILEADDicomDir Interface).

The events in the LEADDicomDirEvents Interface/Object are designated by (ILEADDicomDirEvents Interface).

These LEAD DICOM COM Interfaces/Objects are available in all Medical Imaging toolkits.

You can use the LEADTOOLS DICOM COM Interfaces/Objects in any programming environment that supports OLE custom controls, including the following:

Visual C++ 4.2 and later

Visual Basic 4.0 and later

Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.


An Overview of the DICOM File Format

The following topics provide general information about the DICOM File Format. It is designed to help familiarize you with DICOM. For more detailed information on the DICOM File Format, you should refer to the DICOM Standard, published by the

National Electrical Manufacturers Association

1300 N. 17th Street

Rosslyn, Virginia 22209 USA

For more information on programming using this toolkit, refer to Programming With LEADTOOLS.

Basic DICOM File Structure

Data Element Fields

Value Representations

Value Multiplicity (VM) and Delimitation

Data Element Structure

Group Length

Big-Endian versus Little Endian Byte Ordering

Data Element Type

Nesting of Data Sets

Item Encoding Rules

Delimitation of the Sequence of Items

Repeating Groups

Retired Data Elements

Private Data Elements

Private Data Element Tags

Encoding of Pixel Data

Pixel Data Encoding of Related Data Elements

Native or Encapsulated Format Encoding

Compression

Unique Identifiers

Information Object Definitions


Overview: Attributes

The Attributes of an IOD describe the properties of a Real-World Object Instance. Related Attributes are grouped into Modules, which represent a higher level of semantics documented in the Module Specifications found in Annex C of the DICOM Standard.

Attributes are encoded as Data Elements using the rules, the Value Representation and the Value Multiplicity concepts specified in PS 3.5 of the DICOM Standard. For specific Data Elements, the Value Representation and Value Multiplicity are specified in the Data Dictionary in PS 3.6 of the DICOM Standard.

When multiple modules containing the same Attributes(s) are included in an IOD, the Attribute shall be encoded only once into a Data Element. If one of the modules is a specialization of the other (e.g., General Image and CT Image) the Attribute definition contained in the more specialized module shall be used.


Overview: Basic DICOM File Structure

The DICOM File Format is described by the American College of Radiology (ACR) and National Electrical Manufacturers Association (NEMA) in PS3.10 specification "Media Storage and File Format for Media Interchange", of the DICOM Standard. An illustration of the basic file structure can be seen below.

File Header

The header consists of a 128 byte File Preamble, followed by a 4-byte DICOM prefix. The header may or may not be included in the file (although one should be included in order to comply with the DICOM Standard).

Preamble | Prefix
128 bytes = ??? ??? | 4 bytes = ‘D’, ‘I’, ‘C’, ‘M’

The DICOM Standard does not require any structure for the fixed size Preamble. It is not required to be structured as a DICOM Data Element with a Tag and a Length. It is intended to facilitate access to the images and other data in the DICOM file by providing compatibility with a number of commonly used computer image file formats.

a) If the File Preamble is not used by an Application Profile or a specific implementation, all 128 bytes shall be set to 00H. This is intended to facilitate the recognition that the Preamble is used when all 128 bytes are not set as specified above.

b) The File Preamble may for example contain information enabling a multi-media application to randomly access images stored in a DICOM Data Set. The same file can be accessed in two ways: by a multi-media application using the preamble and by a DICOM Application, which ignores the preamble.

The four byte DICOM Prefix shall contain the character string "DICM" encoded as uppercase characters of the ISO 8859 G0 Character Repertoire. This four-byte prefix is not structured as a DICOM Data Element with a Tag and a Length.

Data Set

Each File shall contain a single Data Set representing a single SOP Instance related to a single SOP Class (and corresponding IOD).

Note: A file may contain more than a single 2D image frame as specific IODs may be defined to include multiple frames.

The Transfer Syntax used to encode the Data Set shall be the one identified by the Transfer Syntax UID of the DICOM File Meta Information.

Note: A DICOM Data Set does not include its total length. The end of the file indication provided by the DICOM File Service (see Section 8.4 of the DICOM Standard) is the only indication of the end of the Data Set.

The last Data Element of a Data Set may be Data Element (FFFC, FFFC) if padding of a Data Set is desired when a file is written. The Value of this Data Set Trailing Padding Data Element (FFFC, FFFC) has no significance and shall be ignored by all DICOM implementations reading this Data Set. File-set Readers or Updaters shall be able to process this Data Set Trailing Padding (FFFC, FFFC) either in the Data Set following the Meta Information or in Data Sets nested in a Sequence (See PS 3.5 of the DICOM Standard of the DICOM Standard).

A Data Set represents an instance of a real world Information Object. A Data Set is constructed of Data Elements. Data Elements contain the encoded Values of Attributes of that object. The specific content and semantics of these Attributes are specified in Information Object Definitions (see PS 3.3 of the DICOM Standard). The construction, characteristics, and encoding of a Data Set and its Data Elements are discussed in PS 3.5 of the DICOM Standard. Pixel Data, Overlays, and Curves are Data Elements whose interpretation depends on other related elements.

Data Elements

A Data Element is uniquely identified by a Data Element Tag. The Data Elements in a Data Set shall be ordered by increasing Data Element Tag Number and shall occur at most once in a Data Set.

Note: A Data Element Tag may occur again within Nested Data Sets (see Section 7.5 – PS 3.5 of the DICOM Standard).

Two types of Data Elements are defined:

Standard Data Elements have an even Group Number that is not (0000,eeee), (0002,eeee), (0004,eeee), or (0006,eeee).

Note: Usage of these groups is reserved for DIMSE Commands (see PS 3.7 of the DICOM Standard) and DICOM File Formats.

Private Data Elements have an odd Group Number that is not (0001,eeee), (0003,eeee), (0005,eeee), (0007,eeee), or (FFFF, eeee). Private Data Elements are discussed further in Section 7.8 (PS 3.5 of the DICOM Standard).

Note: Although similar or related Data Elements often have the same Group Number; a Data Group does not convey any semantic meaning beginning with DICOM Version 3.0.

A Data Element shall have one of three structures. Two of these structures contain the VR of the Data Element (Explicit VR) but differ in the way their lengths are expressed, while the other structure does not contain the VR (Implicit VR). All three structures contain the Data Element Tag, Value Length and Value for the Data Element. For more information, refer to Data Element Structure.

Implicit and Explicit VR Data Elements shall not coexist in a Data Set and Data Sets nested within it (see Section 7.5 – PS 3.5 of the DICOM Standard). Whether a Data Set uses Explicit or Implicit VR, among other characteristics, is determined by the negotiated Transfer Syntax (see Section 10 and Annex A – PS 3.5).

Note: VRs are not contained in Data Elements when using DICOM Default Transfer Syntax (DICOM Implicit VR Little Endian Transfer Syntax).


Overview: Big Endian versus Little Endian Byte Ordering

Another component of the encoding of a Data Set that shall be agreed upon by communicating Application Entities is the Byte Ordering.

Little Endian byte ordering is defined as follows:

In a binary number consisting of multiple bytes (e.g. a 32-bit unsigned integer value, the Group Number, the Element Number, etc.), the least significant byte shall be encoded first; with the remaining bytes encoded in increasing order of significance.

In a character string consisting of multiple 8-bit single byte codes, the characters will be encoded in the order of occurrence in the string (left to right).

Big Endian byte ordering is defined as follows:

In a binary number consisting of multiple bytes, the most significant byte shall be encoded first; with the remaining bytes encoded in decreasing order of significance.

In a character string consisting of multiple 8-bit single byte codes, the characters will be encoded in the order of occurrence in the string (left to right).

Byte ordering is a component of an agreed upon Transfer Syntax (see Section 10 of the DICOM Standard). The default DICOM Transfer Syntax, which shall be supported by all AEs, uses Little Endian encoding and is specified in Annex A.1 (PS 3.5 of the DICOM Standard). Alternate Transfer Syntaxes, some of which use Big Endian encoding, are also specified in Annex A (PS 3.5 of the DICOM Standard).

Note: The Command Set structure as specified in PS 3.7 of the DICOM Standard is encoded using the Little Endian Implicit VR

Transfer Syntax.

In the default case of Little Endian encoding, Big Endian Machines interpreting Data Sets shall do 'byte swapping' before interpreting or operating on certain Data Elements. The Data Elements affected are all those having VRs that are multiple byte Values and that are not a character string of 8-bit single byte codes. VRs constructed of a string of characters of 8-bit single byte codes are really constructed of a string of individual bytes, and are therefore not affected by byte ordering. The VRs that are not a string of characters and consist of multiple bytes are:

2-byte US, SS, OW and each component of AT

4-byte UL, SL, and FL

8 byte FD

Note: For the above VRs, the multiple bytes are presented in increasing order of significance when in Little Endian format. For example, an 8-byte Data Element with VR of FD, might be written in hexadecimal as 68AF4B2CH, but encoded in Little Endian would be 2C4BAF68H.


Overview: Composite IOD

A Composite IOD is an Information Object Definition, which represents parts of several entities included in the DICOM Model of the Real-World. This Model is introduced in Section 7. Such an IOD includes Attributes, which are not inherent in the Real-World Object that the IOD represents but rather are inherent in related Real-World Objects.

These related Real-World Objects provide a complete context for the exchanged information. When an instance of a Composite IOD is communicated, this entire context is exchanged between Application Entities. Relationships between Composite IOD Instances shall be conveyed in this contextual information.


Overview: Compression

JPEG Compression

DICOM provides a mechanism for supporting the use of JPEG Image Compression through the Encapsulated Format (see PS 3.3 of the DICOM Standard). Annex A defines a number of Transfer Syntaxes which reference the JPEG Standard and provide a number of lossless (bit preserving) and lossy compression schemes.

Note: The context where the usage of lossy compression of medical images is clinically acceptable is beyond the scope of the DICOM Standard. The policies associated with the selection of appropriate compression parameters (e.g. compression ratio) for JPEG lossy compression is also beyond the scope of this standard.

In order to facilitate interoperability of implementations conforming to the DICOM Standard which elect to use one or more of the Transfer Syntaxes for JPEG Image Compression, the following policy is specified:

Any implementation which conforms to the DICOM Standard and has elected to support any one of the Transfer Syntaxes for lossless JPEG Image Compression, shall support the following lossless compression: The subset (first-order horizontal prediction [Selection Value 1) of JPEG Process 14 (DPCM, non-hierarchical with Huffman coding) (see Annex F of the DICOM Standard).

Any implementation, which conforms to the DICOM Standard and has elected to support any one of the Transfer Syntaxes for 8-bit lossy JPEG Image Compression, shall support the JPEG Baseline Compression (coding Process 1).

Any implementation, which conforms to the DICOM Standard and has elected to support any one of the Transfer Syntaxes for 12-bit lossy JPEG Image Compression, shall support the JPEG Compression Process 4.

Note: The DICOM conformance statement shall differentiate between implementations that can simply receive JPEG encoded images and those that can receive and process JPEG encoded images (see PS 3.2 of the DICOM Standard).

The use of the DICOM Encapsulated Format to support JPEG Compressed Pixel Data implies that the Data Elements which are related to the Native Format Pixel Data encoding (e.g. Bits Allocated, Bits Stored, High Bit, Pixel Representation, Rows, Columns, etc.) shall contain values which are consistent with the characteristics of the uncompressed pixel data from which the compressed Data Stream was derived. The Pixel Data characteristics included in the JPEG Interchange Format shall be used to decode the compressed data stream.

Run Length Encoding Compression

DICOM provides a mechanism for supporting the use of Run Length Encoding (RLE) Compression which is a byte oriented lossless compression scheme through the encapsulated Format (see PS 3.3 of this Standard). Annex G of the DICOM Standard defines RLE Compression and its Transfer Syntax.

Note: The RLE Compression algorithm described in Annex G of the DICOM Standard is the compression used in the TIFF 6.0 specification known as the "PackBits" scheme.

The use of the DICOM Encapsulated Format to support RLE Compressed Pixel Data implies that the Data Elements which are related to the Native Format Pixel Data encoding (e.g. Bits Allocated, Bits Stored, High Bit, Pixel Representation, Rows, Columns, etc.) shall contain values which are consistent with the characteristics of the uncompressed pixel data from which the compressed data was derived.


Overview: Data Element Fields

A Data Element is made up of fields. Three fields are common to all three Data Element structures; these are the Data Element Tag, Value Length, and Value Field. A fourth field, Value Representation, is only present in the two Explicit VR Data Element structures. The Data Element structures are defined in Sections 7.1.2. and 7.1.3. The definitions of the fields are:

Data Element Tag | An ordered pair of 16-bit unsigned integers representing the Group Number followed by Element Number.
Value Representation | A two-byte character string containing the VR of the Data Element. The VR for a given Data Element Tag shall be as defined by the Data Dictionary as specified in PS 3.6 of the DICOM Standard. The two character VR shall be encoded using characters from the DICOM default character set.
Value Length | Either:
 | a 16 or 32-bit (dependent on VR and whether VR is explicit or implicit) unsigned integer containing the Explicit Length of the Value Field as the number of bytes (even) that make up the Value. It does not include the length of the Data Element Tag, Value Representation, and Value Length Fields.
 | or
 | a 32-bit Length Field set to Undefined Length (FFFFFFFFH). Undefined Lengths may be used for Data Elements having the Value Representation (VR) Sequence of Items (SQ). For Data Elements with Value Representation OW or OB Undefined Length may be used depending on the negotiated Transfer Syntax (see Section 10 and Annex A of the DICOM Standard).
Value Field: | An even number of bytes containing the Value(s) of the Data Element.
 | The data type of Value(s) stored in this field is specified by the Data Element's VR. The VR for a given Data Element Tag can be determined using the Data Dictionary in PS 3.6 of the DICOM Standard, or using the VR Field if it is contained explicitly within the Data Element. The VR of Standard Data Elements shall agree with those specified in the Data Dictionary.
 | The Value Multiplicity specifies how many Values with this VR can be placed in the Value Field. If the VM is greater than one, multiple values shall be delimited within the Value Field as defined previously in Section 6.4 of the DICOM Standard. The VMs of Standard Data Elements are specified in the Data Dictionary in PS 3.6 of the DICOM Standard.
 | Value Fields with Undefined Length are delimited through the use of Sequence Delimitation Items and Item Delimitation Data Elements which are described further in Section 7.5 of the DICOM Standard.


Overview: Data Element Structure

Note: This section makes numerous references to VRs such as OB, OW, SQ, etc. For a listing of default information about these Values Representations, refer to the Default Value Representation Table.

Data Element Structure with Explicit VR

When using the Explicit VR structures, the Data Element shall be constructed of four consecutive fields: Data Element Tag, VR, Value Length, and Value. Depending on the VR of the Data Element, the Data Element will be structured as follows:

For VRs of OB, OW, SQ and UN, the 16 bits following the two character VR Field are reserved for use by later versions of the DICOM Standard. These reserved bytes shall be set to 0000H and shall not be used or decoded. The Value Length Field is a 32-bit unsigned integer. If the Value Field has an Explicit Length, then the Value Length Field shall contain a value equal to the length (in bytes) of the Value Field. Otherwise, the Value Field has an Undefined Length and a Sequence Delimitation Item marks the end of the Value Field.

For VRs of UT the 16 bits following the two character VR Field are reserved for use by later versions of the DICOM Standard. These reserved bytes shall be set to 0000H and shall not be used or decoded. The Value Length Field is a 32-bit unsigned integer. The Value Field is required to have an Explicit Length, that is the Value Length Field shall contain a value equal to the length (in bytes) of the Value Field.

Note: VRs of UT may not have an Undefined Length, i.e. a Value Length of FFFFFFFFH.

For all other VRs the Value Length Field is the 16-bit unsigned integer following the two character VR Field. The value of the Value Length Field shall equal the length of the Value Field.

An example of a Data Element with an Explicit VR, such as would be the case for data type OB, OW, SQ, or UN is shown below:

An example of a Data Element with an Explicit VR, such as would be the case for data types other than OB, OW, SQ, or UN is shown below:

Data Element Structure with Implicit VR

When using the Implicit VR structure the Data Element shall be constructed of three consecutive fields: Data Element Tag, Value Length, and Value. If the Value Field has an Explicit Length then the Value Length Field shall contain a value equal to the length (in bytes) of the Value Field. Otherwise, the Value Field has an Undefined Length and a Sequence Delimitation Item marks the end of the Value Field.

An example of a Data Element with an Implicit VR is shown below:


Overview: Data Element Type

An attribute, encoded as a Data Element, may or may not be required in a Data Set, depending on that Attribute's Data Element Type.

The Data Element Type of an Attribute of an Information Object Definition or an Attribute of a SOP Class Definition is used to specify whether that Attribute is mandatory or optional. The Data Element Type also indicates if an Attribute is conditional (only mandatory under certain conditions). The Data Element Types of Attributes of Composite IODs are specified in PS 3.3 of the DICOM Standard. The Data Element Types of Attributes of Normalized IODs are specified as Attributes of SOP Classes in PS 3.4 of the DICOM Standard.

Type 1 Required Data Elements

IODs and SOP Classes define Type 1 Data Elements that shall be included and are mandatory elements.

The Value Field shall contain valid data as defined by the elements VR and VM as specified in PS 3.6 of the DICOM Standard.

The Length of the Value Field shall not be zero. Absence of a valid Value in a Type 1 Data Element is a protocol violation.

Type 1C Conditional Data Elements

IODs and SOP Classes define Data Elements that shall be included under certain specified conditions. Type 1C elements have the same requirements as Type 1 elements under these conditions. It is a protocol violation if the specified conditions are met and the Data Element is not included. When the specified conditions are not met, Type 1C elements shall not be included in the Data Set.

Type 2 Required Data Elements

IODs and SOP Classes define Type 2 Data Elements that shall be included and are mandatory Data Elements. However, it is permissible that if a Value for a Type 2 element is unknown it can be encoded with zero Value Length and no Value. If the Value is known the Value Field shall contain that value as defined by the elements VR and VM as specified in PS 3.6 of the DICOM Standard. These Data Elements shall be included in the Data Set and their absence is a protocol violation.

Type 2C Conditional Data Elements

IODs and SOP Classes define Type 2C elements that have the same requirements as Type 2 elements under certain specified conditions. It is a protocol violation if the specified conditions are met and the Data Element is not included.

When the specified conditions are not met, Type 2C elements shall not be included in the Data Set.

Note: An example of a Type 2C Data Element is Inversion Time (0018,0082). For several SOP Class Definitions, this Data Element is required only if the Scanning Sequence (0018,0020) has the Value "IR." It is not required otherwise. See PS 3.3 of the DICOM Standard.

Type 3 Optional Data Elements

IODs and SOP Classes define Type 3 Data Elements that are optional Data Elements. Absence of a Type 3 element from a Data Set does not convey any significance and is not a protocol violation. Type 3 elements may also be encoded with zero length and no Value. The meaning of a zero length Type 3 Data Element shall be precisely the same as that element being absent from the Data Set.


Overview: Definitions

The following definitions pertain to Information Object Definitions and are commonly used in the DICOM Standard.

Attribute tag: | A unique identifier for an Attribute of an Information Object composed of an ordered pair of numbers (a Group Number followed by an Element number).
Composite IOD: | an Information Object Definition, which represents parts of several entities in the DICOM Application Model. Such an IOD includes Attributes, which are not inherent in the Real-World Object that the IOD represents but rather are inherent in related Real-World Objects.
Derived image: | an image in which the pixel data was constructed from pixel data of one or more other images (source images).
DICOM information model: | an Entity-Relationship diagram which is used to model the relationships between the Information Object Definitions representing classes of Real-World Objects defined by the DICOM Application Model.
DICOM application model: | an Entity-Relationship diagram used to model the relationships between Real-World Objects, which are within the area of interest of the DICOM Standard.
Information entity: | that portion of information defined by a Composite IOD, which is related to one specific class of Real-World Object. There is a one-to-one correspondence between Information Entities and entities in the DICOM Application Model.
Information object definition (IOD): | a data abstraction of a class of similar Real-World Objects, which defines the nature and Attributes relevant to the class of Real-World Objects represented.
Module: | A set of Attributes within an Information Entity or Normalized IOD, which are logically related to each other.
Multi-frame image: | Image that contains multiple two-dimensional pixel planes.
Normalized IOD: | an Information Object Definition, which represents a single entity in the DICOM Application Model. Such an IOD includes Attributes, which are only inherent in the Real-World Object that the IOD represents.
Cine run: | A set of temporally related frames acquired at constant or variable frame rates. This term incorporates the general class of serialography.


Overview: Delimitation of the Sequence of Items

Delimitation of the last Item of a Sequence of Items, encapsulated in a Data Element of Value Representation SQ, shall be in one of the two following ways:

Explicit Length: The number of bytes (even) contained in the Data Element Value (following but not including the Data Element Length Field) is encoded as a 32-bit unsigned integer value (see Section 7.1 of the DICOM Standard). This length shall include the total length resulting from the sequence of zero or more items conveyed by this Data Element. This Data Element Length shall be equal to 00000000H if the sequence of Items contains zero Items.

Undefined Length: The Data Element Length Field shall contain a Value FFFFFFFFH to indicate an Undefined Sequence length. It shall be used in conjunction with a Sequence Delimitation Item. A Sequence Delimitation Item shall be included after the last Item in the sequence. Its Item Tag shall be (FFFE,E0DD) with an Item Length of 00000000H. No Value shall be present.

The encoder of a Sequence of Items may choose either one of the two ways of encoding. Both ways of encoding shall be supported by decoders of the Sequence of Items.

Note: The Sequence Delimitation Item Tag (FFFE,E0DD) is different from the Item Delimitation Tag (FFFE,E00D) introduced above in that it indicates the end of a Sequence of Items whose Length was left undefined. If an undefined length Item is the last Item of a Sequence of Items of undefined length, then an Item Delimitation Tag will be followed by a Sequence Delimitation Tag.

Note: An encapsulated Data Set does not include the Specific Character Set data element unless the Specific Character Set Attribute is defined as part of the IOD for that sequence.

If an encapsulated Data Set includes the Specific Character Set Attribute, it shall apply only to the encapsulated Data Set. If the Attribute Specific Character Set is not explicitly included in an encapsulated Data Set, then the Specific Character Set value of the encapsulating Data Set applies.

DE | Data Element
DE-SQ | Sequence of Items
DE-SQD | Sequence Delimitation Item
DE-I | Item
DE-ID | Item Delimitation Data Element

Please note the DE-SQD and DE-ID items are added internally. You do not have to explicitly add these items.


Overview: Encoding of Pixel Data

The Pixel Data Element (7FE0,0010) shall be used for the exchange of encoded graphical image data. This element along with additional Data Elements, specified as Attributes of the Image Information Entities defined in PS 3.3 of the DICOM Standard, shall be used to describe the way in which the Pixel Data is encoded and shall be interpreted. Finally, depending on the negotiated Transfer Syntax (see Section 10 and Annex A of the DICOM Standard), Pixel Data may be compressed.

The Pixel Data Element (7FE0,0010) has a VR of OW or OB, depending on the negotiated Transfer Syntax (see Annex A of the DICOM Standard). The only difference between OW and OB being that OB, a string of bytes, shall be unaffected by Byte Ordering (see Section 7.3 of the DICOM Standard).


Overview: Group Length

The Group Length (gggg,0000) Standard Data Element shall be an optional (Type 3 Data Element Type) Data Element in DICOM V3.0 (see Section 7.4 of the DICOM Standard for a description of Data Element Types). It provides an optional optimization scheme in partial parsing of Data Sets by allowing the skipping of entire groups of Data Elements. Implementations may or may not choose to encode explicit Group Length in a Data Set. All implementations shall be able to accept or ignore such elements.


Overview: Information Object Definitions

The Part PS 3.3 of the DICOM Standard specifies the set of Information Object Definitions (IODs) which provide an abstract definition of real-world objects applicable to communication of digital medical information. This standard was developed by American College of Radiology (ACR) and National Electrical Manufacturers Association (NEMA).

An Information Object Definition (IOD) is an object-oriented abstract data model used to specify information about Real-World Objects. An IOD provides communicating Application Entities with a common view of the information to be exchanged.

An IOD does not represent a specific instance of a Real-World Object, but rather a class of Real-World Objects, which share the same properties. An IOD used to generally represent a single class of Real-World Objects is called a Normalized Information Object. An IOD, which includes information about related Real-World Objects is called a Composite Information Object.

The illustration below shows the structure of an Information Object Definition. Each class consists of one or more modules, where each module consists of one or more elements. For details concerning Information Object Definitions, refer to the DICOM Standard.

For an example of a Class, refer to Class Example.

For examples of Modules, refer to Module Examples.

The following topics also pertain to Information Object Definitions:

Composite IOD

Normalized IOD

Attributes

Normalized and Composite SOP Classes

Modules

Definitions


Overview: Item Encoding Rules

Each Item of a Data Element of Value Representation SQ shall be encoded as a DICOM Standard Data Element with a specific Data Element Tag of Value (FFFE,E000). The Item Tag is followed by a 4 byte Item Length field encoded in one of the following two ways:

Explicit Length: The number of bytes (even) contained in the Sequence Item Value (following but not including the Item Length Field) is encoded as a 32-bit unsigned integer value (see Section 7.1 of the DICOM Standard). This length shall include the total length of all Data Elements conveyed by this Item. This Item Length shall be equal to 00000000H if the Item contains no Data Set.

Undefined Length: The Item Length Field shall contain the value FFFFFFFFH to indicate an undefined Item length. It shall be used in conjunction with an Item Delimitation Data Element. This Item Delimitation Data Element has a Data Element Tag of (FFFE,E00D) and shall follow the Data Elements encapsulated in the Item. No Value shall be present in the Item Delimitation Data Element and its Length shall be 00000000H.

The encoder of a Data Set may choose either one of the two ways of encoding. Both ways of encoding shall be supported by decoders of Data Sets. Data Element Tags (FFFF, eeee) are reserved by this standard and shall not be used.

Each Item Value shall contain a DICOM Data Set composed of Data Elements. Within the context of each Item, these Data Elements shall be ordered by increasing Data Element Tag value and appear only once (as Data Set is defined in Section 7.1 of the DICOM Standard). There is no relationship between the ordering of the Data Elements contained within an Item and the ordering of the Data Element Tag of SQ Value Representation that contains that Item. One or more Data Elements in an Item may be of Value Representation SQ, thus allowing for recursion.

Section 7.8 of the DICOM Standard specifies rules for incorporating Private Data Elements into Sequence Items.


Overview: Modules

Mandatory Modules

For each IOD, Mandatory Modules shall be supported per the definitions, semantics and requirements defined in Annex C.

Conditional Modules

Conditional Modules are Mandatory Modules if specific conditions are met. If the specified conditions are not met, this Module shall not be supported; that is, no information defined in that Module shall be sent.

User Option Modules

User Option Modules may or may not be supported. If an optional Module is supported, the Attribute Types specified in the Modules in Annex C shall be supported.


Overview: Native or Encapsulated Format Encoding

Pixel data conveyed in the Pixel Data Element (7FE0,0010) may be sent either in a Native (uncompressed) Format or in an Encapsulated Format (e.g. compressed) defined outside the DICOM standard.

If Pixel Data is sent in a Native Format, the Value Representation OW is most often required. The Value Representation OB may also be used for Pixel Data in cases where Bits Allocated has a value less than or equal to 8, but only with Transfer Syntaxes where the Value Representation is explicitly conveyed (see Annex A of the DICOM Standard).

Note: The DICOM default Transfer Syntax (Implicit VR Little Endian) does not explicitly convey Value Representation and therefore the VR of OB may not be used for Pixel Data when using the default Transfer Syntax.

Native format Pixel Cells are encoded as the direct concatenation of the bits of each Pixel Cell, where the most significant bit of a Pixel Cell is immediately followed by the least significant bit of the next Pixel Cell. The number of bits of each Pixel Cell is defined by the Bits Allocated (0028,0100) Data Element Value. When a Pixel Cell crosses a word boundary in the OW case, or a byte boundary in the OB case, it shall continue to be encoded, least significant bit to most significant bit, in the next word, or byte, respectively (see Annex D of the DICOM Standard). For Pixel Data encoded with the Value Representation OW, the byte ordering of the resulting 2-byte words is defined by the Little Endian or Big Endian Transfer Syntaxes negotiated at the Association Establishment (see Annex A of the DICOM Standard).

Note:

a) For Pixel Data encoded with the Value Representation OB, the Pixel Data encoding is unaffected by Little Endian or Big Endian byte ordering.

b) If encoding Pixel Data with a Value for Bits Allocated (0028,0100) not equal to 16 be sure to read and understand Annex D of the DICOM Standard.

If sent in an Encapsulated Format (i.e. other than the Native Format) the Value Representation OB is used. The Pixel Cells are encoded according to the encoding process defined by one of the negotiated Transfer Syntaxes (see Annex A of the DICOM Standard). The encapsulated pixel stream of encoded pixel data is segmented in one or more Fragments, which convey their explicit length. The sequence of Fragments of the encapsulated pixel stream is terminated by a delimiter, thus allowing the support of encoding processes where the resulting length of the entire pixel stream is not known until it is entirely encoded. This Encapsulated Format supports both Single-Frame and Multi-Frame images (as defined in PS 3.3 of the DICOM Standard).


Overview: Nesting of Data Sets

The VR identified "SQ" shall be used for Data Elements with a Value consisting of a Sequence of zero or more Items, where each Item contains a set of Data Elements. SQ provides a flexible-encoding scheme that may be used for simple structures of repeating sets of Data Elements, or the encoding of more complex Information Object Definitions often called folders. SQ Data Elements can also be used recursively to contain multi-level nested structures.

The definition of the Data Elements encapsulated in each Item is provided by the specification of the Data Element (or associated Attribute) of Value Representation SQ. Items in a sequence of Items may or may not contain the same set of Data Elements. Data Elements with a VR of SQ may contain multiple Items but shall always have a Value Multiplicity of one (i.e. a single Sequence).

There are three special SQ related Data Elements that are not ruled by the VR encoding rules conveyed by the Transfer Syntax. They shall be encoded as Implicit VR. These special Data Elements are Item (FFFE,E000), Item Delimitation Item (FFFE,E00D), and Sequence Delimitation Item (FFFE,E0DD). However, the Data Set within the Value Field of the Data Element Item (FFFE,E000) shall be encoded according to the rules conveyed by the Transfer Syntax.

For more information about the SQ VR, refer to the Default Value Representation Table.


Overview: Normalized and Composite SOP Classes

DICOM defines two types of SOP Classes, Normalized and Composite. Normalized SOP Classes are defined as the union of a Normalized IOD and a set of DIMSE-N Services. Composite SOP Classes are defined as the union of a Composite IOD and a set of DIMSE-C Services.


Overview: Normalized IOD

A Normalized IOD is an Information Object Definition, which generally represents a single entity in the DICOM Model of the Real-World.

In this Standard, strict definition of Normalized Object Definitions has not been applied. Application of strict definitions would often result in unnecessary complexity and reduced performance of implementations for several applications.


Overview: Pixel Data Encoding of Related Data Elements

Encoded Pixel Data of various bit depths shall be accommodated. The following three Data Elements shall define the Pixel structure:

Bits Allocated (0028,0100)

Bits Stored (0028,0101)

High Bit (0028,0102)

Each Pixel Cell shall contain a single Pixel Sample Value. The size of the Pixel Cell shall be specified by Bits Allocated (0028,0100). Bits Stored (0028,0101) defines the total number of these allocated bits that will be used to represent a Pixel Sample Value. Bits Stored (0028,0101) shall never be larger than Bits Allocated (0028,0100). High Bit (0028,0102) specifies where the high order bit of the Bits Stored (0028,0101) is to be placed with respect to the Bits Allocated (0028,0100) specification. Bits not used for Pixel Sample Values can be used for overlay planes described further in PS3.3 of the DICOM Standard.

Note: For example, in Pixel Data with 16 bits (2 bytes) allocated, 12 bits stored, and bit 15 specified as the high bit, one pixel sample is encoded in each 16-bit word, with the 4 least significant bits of each word not containing Pixel Data. See Annex D of the DICOM Standard for other examples of the basic encoding schemes.

Starting with DICOM Version 3.0, restrictions are placed on acceptable Values for Bits Allocated (0028,0100), Bits Stored (0028,0101), and High Bit (0028,0102) and are specified in the Information Object Definitions in PS3.3. Also, the Value Field containing Pixel Data, like all other Value Fields in DICOM, shall be an even number of bytes in length. This means that the Value Field may need to be padded with data that is not part of the image and shall not be considered significant. If needed, the padding bits shall be appended to the end of the Value Field.

The field of bits representing the value of a Pixel Sample shall be a binary 2's complement integer or an unsigned integer, as specified by the Data Element Pixel Representation (0028,0103). The sign bit shall be the High Bit in a Pixel Sample Value that is a 2's complement integer. The minimum actual Pixel Sample Value encountered in the Pixel Data is specified by Smallest Image Pixel Value (0028,0106) while the maximum value is specified by Largest Image Pixel Value (0028,0107).


Overview: Private Data Elements

Implementations may require communication of information that cannot be contained in Standard Data Elements. Private Data Elements are intended to be used to contain such information.

Private Data Elements have the same structure as Standard Data Elements specified earlier in Section 7.1 of the DICOM Standard (i.e., Data Element Tag field, optional VR field, length field, and value field). The Group Number used in the Element Tag of Private Data Elements shall be an odd number. Private Data Elements shall be contained in the Data Set in increasing numeric order of Data Element Tag. The Value Field of a Private data element shall have one of the VRs specified by this standard in Section 6.2 of the DICOM Standard.

For each Information Object Definition or SOP Class Definition, certain Data Elements are required (Data Element Type 1, 1C, 2, or 2C) as specified in PS 3.3 and PS 3.4 of the DICOM Standard. Private Data Elements shall not be used in place of required Standard Data Elements.


Overview: Private Data Element Tags

It is possible that multiple implementors may define Private Elements with the same (odd) group number. To avoid conflicts, Private Elements shall be assigned Private Data Element Tags according to the following rules.

Private Creator Data Elements numbered (gggg,0010-00FF) (gggg is odd) shall be used to reserve a block of Elements with Group Number gggg for use by an individual implementor. The implementor shall insert an identification code in the first unused (unassigned) Element in this series to reserve a block of Private Elements. The VR of the private identification code shall be LO (Long String) and the VM shall be equal to 1.

Private Creator Data Element (gggg,0010), is a Type 1 Data Element that identifies the implementor reserving element (gggg,1000-10FF), Private Creator Data Element (gggg,0011) identifies the implementor reserving elements (gggg,1100-11FF), and so on, until Private Creator Data Element (gggg,00FF) identifies the implementor reserving elements (gggg,FF00-FFFF).

Encoders of Private Data Elements shall be able to dynamically assign private data to any available (unreserved) block(s) within the Private group, and specify this assignment through the blocks corresponding Private Creator Data Element(s). Decoders of Private Data shall be able to accept reserved blocks with a given Private Creator identification code at any position within the Private group specified by the blocks corresponding Private Creator Data Element.

Note:

a) The versions of this standard prior to V3.0 described shadow groups. These were groups with a group number one greater than the standard groups. Elimination of conflicts in Private Data Element Tags has made this distinction obsolete and this terminology has been retired.

b) The versions of this standard prior to V3.0 specified private group element numbers (gggg,10FF-7FFF) reserved for manufacturers and private group element numbers (gggg, 8100-FFFF) reserved for users. Elimination of conflicts in Private Data Element Tags has made this distinction obsolete and this specification has been retired.

Since each Item within a sequence is a self contained Data Set (see Section 7.5 of the DICOM Standard on the nesting of Data Sets via Sequences of Items), any Item which contains Private Data Elements shall also have Private Creator Data Elements reserving blocks of Elements for those Private Data Elements. The scope of the reservation is just within the Item. Items do not inherit the Private Data Element reservations made by Private Creator Data Elements in the Data Set in which the Item is nested.


Overview: Repeating Groups

Multiple Overlay Planes and Curves are often associated with a single Image (see PS 3.3 of the DICOM Standard). Standard Data Elements with even Group Numbers (5000-501E,eeee) represent Curves, while elements with even Group Numbers (6000-601E,eeee) represent Overlay Planes. Both of these ranges of Group numbers are known as Repeating Groups. This use of group numbers is a remnant of versions of this standard prior to V3.0 that associated a semantic meaning with particular Groups.

In each of these ranges of Group Numbers, Standard Data Elements that have identical Element Numbers have the same meaning within each Group (and the same VR, VM, and Data Element Type). The notation (50xx,eeee) and (60xx,eeee) are used for the Group Number in Data Element Tags when referring to a common Data Element across these groups (see PS 3.6). Groups (50xx,eeee) and (60xx,eeee) are called Repeating Groups because of these characteristics. Repeating Groups shall only be allowed in the even Groups (6000-601E,eeee) and even Groups (5000-501E,eeee) cases. In the future, Data Elements with VRs of SQ shall be used to serve a similar purpose.

Note: Private Groups in the odd Groups (5001-501F,eeee) and (6001-601F,eeee) may still be used, but there is no implication of repeating semantics, nor any implied shadowing of the standard repeating groups.


Overview: Retired Data Elements

Certain Data Elements are no longer supported beginning with Version 3.0 of this standard. These Data Elements are retired and are denoted as such (RET) in the VR column in PS 3.6 of the DICOM Standard. Implementations may continue to support these Data Elements for the purpose of backward compatibility with versions of this standard prior to V3.0, but this is not a requirement of this standard. If a retired Data Element is used it must contain valid data as specified in versions of this standard prior to V3.0. Any other use of a retired Data Element, and its associated Data Element Tag, is reserved by this standard. Retired Data Element Tags shall not be redefined in later versions of this standard.


Overview: Unique Identifiers

Unique Identifiers (UIDs) provide the capability to uniquely identify a wide variety of items. They guarantee uniqueness across multiple countries, sites, vendors and equipment. This scheme is used in DICOM to uniquely identify items such as SOP Classes, image instances, network negotiation parameters, etc.

The UID identification scheme is based on the OSI Object Identification (numeric form) as defined by the ISO 8824 standard. All Unique Identifiers, used within the context of the DICOM Standard, are registered values as defined by ISO 9834-3 to ensure global uniqueness. The uses of such UIDs are defined in the various Parts of the DICOM Standard.

Each UID is composed of two parts, an <org root> and a <suffix>:

UID = <org root>.<suffix>

The <org root> portion of the UID uniquely identifies an organization, (i.e., manufacturer, research organization, NEMA, etc.), and is composed of a number of numeric components as defined by ISO 8824. The <suffix> portion of the UID is also composed of a number of numeric components, and shall be unique within the scope of the <org root>. This implies that the organization identified in the <org root> is responsible for guaranteeing <suffix> uniqueness by providing registration policies. These policies shall guarantee <suffix> uniqueness for all UID's created by that organization. Unlike the <org root>, which may be common for UID's in an organization, the <suffix> shall take different unique values between different UID's that identify different objects.

The <org root> "1.2.840.10008" is reserved for DICOM defined items (such as DICOM Transfer Syntaxes) and shall not be used for privately defined items (such as an Image Instance).

Although a specific implementation may choose some particular structure for its generated UIDs, it should never assume that a UID carries any semantics. Thus, a UID shall not be "parsed" to find a particular value or component. Component definition (for the suffix) is implementation specific and may change as long as uniqueness is maintained. Parsing UID's may jeopardize the ability to inter-operate as implementations evolve.

Note: For a listing of UIDs supported by DICOM, refer to the Default UID Table.


Overview: Value Multiplicity (VM) and Delimitation

The Value Multiplicity of a Data Element specifies the number of Values that can be encoded in the Value Field of that Data Element. The VM of each Data Element is specified explicitly in PS 3.6 of the DICOM Standard. If the number of Values that may be encoded in an element is variable, it shall be represented by two numbers separated by a dash; e.g., "1-10" means that there may be 1 to 10 Values in the element.

Note: Elements having a multiplicity of "S", which represented "single", in versions of this standard preceding V3.0, will have a multiplicity of "1" in this version of this standard.

When a Data Element has multiple Values, those Values shall be delimited as follows:

For character strings, the character 5CH (BACKSLASH "\" in the case of the repertoire ISO IR-6) shall be used as a delimiter between Values.

Note: BACKSLASH ("\") is used as a delimiter between character string Values that are of fixed length as well as variable length.

Multiple binary Values of fixed length shall be a series of concatenated Values without any delimiter.

Each string Value in a multiple valued character string may be of even or odd length, but the length of the entire Value Field (including "\" delimiters) shall be of even length. If padding is required to make the Value Field of even length, a single padding character shall be applied to the end of the Value Field (to the last Value).

Note: A padding character may need to be appended to a fixed length character string value in the above case.

Only the last UID Value in a multiple valued Data Element with a VR of UI shall be padded with a single trailing NULL (00H) character when necessary to ensure that the entire Value Field (including "\" delimiters) is of even length.

Data Elements with a VR of SQ, OW, OB or UN shall always have a Value Multiplicity of one. For a listing of default information about supported VRs, refer to the Default Value Representation Table.


Overview: Value Representations

The Value Representation of a Data Element describes the data type and format of that Data Element's Value(s). PS 3.6 of the DICOM Standard lists the VR of each Data Element by Data Element Tag.

Values with VRs constructed of character strings, except in the case of the VR UI, shall be padded with SPACE characters (20H, in the Default Character Repertoire) when necessary to achieve even length. Values with a VR of UI shall be padded with a single trailing NULL (00H) character when necessary to achieve even length. Values with a VR of OB shall be padded with a single trailing NULL byte value (00H) when necessary to achieve even length.

All new VRs defined in future versions of DICOM shall be of the same Data Element Structure as defined in Section 7.1.2 of the DICOM Standard (i.e. following the format for VRs such as OB, OW, SQ and UN).

Note: Since all new VRs will be defined as specified in section 7.1.2, an implementation may choose to ignore VRs not recognized by applying the rules stated in Section 7.1.2 of the DICOM Standard.

An individual Value, including padding, shall not exceed the Length of Value. For multi-valued fields see Section 6.4 – PS 3.5 of the DICOM Standard.

Note: The length of Value Representations for which the Character Repertoire can be extended or replaced are expressly specified in characters rather than bytes in Table 6.2-1 of the DICOM Standard. This is because the mapping from a character to the number of bytes used for that character’s encoding may be dependent on the character set used.

Escape Sequences used for Code Extension shall not be included in the count of characters.

Note: For a listing of default information about Values Representations, refer to the Default Value Representation Table.


Class Example

The following is an example of the contents of the Computed Radiography Image Class IOD:

Example Class: Computed Radiography Image (CR Image)

Module: Patient

Element: Patient's Name

Element: Patient ID

Element: Patient's Birth Date

Element: Patient's Sex

Element: Referenced Patient Sequence

Element: Referenced SOP Class UID

Element: Referenced SOP Instance UID

Element: Patient's Birth Time

Element: Other Patient ID

Element: Other Patient Names

Element: Ethnic Group

Element: Patient Comments

Module: General Study

Element: Study Instance UID

Element: Study Date

Element: Study Time

Element: Referring Physician's Name

Element: Study ID

Element: Accession Number

Element: Study Description

Element: Physician(s) of Record

Element: Name of Physician(s) Reading Study

Element: Referenced Study Sequence

Element: Referenced SOP Class UID

Element: Referenced SOP Instance UID

Module: Patient Study

Element: Admitting Diagnoses Description

Element: Patient's Age

Element: Patient's Size

Element: Patient's Weight

Element: Occupation

Element: Additional Patient's History

Module: General Series

Element: Modality

Element: Series Instance UID

Element: Series Number

Element: Laterality

Element: Series Date

Element: Series Time

Element: Performing Physicians' Name

Element: Protocol Name

Element: Series Description

Element: Operators' Name

Element: Referenced Study Component Sequence

Element: Referenced SOP Class UID

Element: Referenced SOP Instance UID

Element: Body Part Examined

Element: Patient Position

Element: Smallest Pixel Value in Series

Element: Largest Pixel Value in Series

Element: Request Attributes Sequence

Element: Requested Procedure ID
Element: Scheduled Procedure Step ID
Element: Scheduled Procedure Step Description
Element: Scheduled Action Item Code Sequence
 | Element: Code Value
 | Element: Coding Scheme Designator
 | Element: Code Meaning

Element: Performed Procedure Step ID

Element: Performed Procedure Step Start Date

Element: Performed Procedure Step Start Time

Element: Performed Procedure Step Description

Module: CR Series

Element: Body Part Examined

Element: View Position

Element: Filter Type

Element: Collimator/grid name

Element: Focal Spot

Element: Plate Type

Element: Phosphor Type

Module: General Equipment

Element: Manufacturer

Element: Institution Name

Element: Institution Address

Element: Station Name

Element: Institutional Department Name

Element: Manufacturer's Model Name

Element: Device Serial Number

Element: Software Versions

Element: Spatial Resolution

Element: Date of Last Calibration

Element: Time of Last Calibration

Element: Pixel Padding Value

Module: General Image

Element: Image Number

Element: Patient Orientation

Element: Image Date

Element: Image Time

Element: Image Type

Element: Acquisition Number

Element: Acquisition Date

Element: Acquisition Time

Element: Referenced Image Sequence

Element: Referenced SOP Class UID

Element: Referenced SOP Instance UID

Element: Derivation Description

Element: Source Image Sequence

Element: Referenced SOP Class UID

Element: Referenced SOP Instance UID

Element: Images in Acquisition

Element: Image Comments

Element: Lossy Image Compression

Module: Image Pixel

Element: Samples per Pixel

Element: Photometric Interpretation

Element: Rows

Element: Columns

Element: Bits Allocated

Element: Bits Stored

Element: High Bit

Element: Pixel Representation

Element: Pixel Data

Element: Planar Configuration

Element: Pixel Aspect Ratio

Element: Smallest Image Pixel Value

Element: Largest Image Pixel Value

Element: Red Palette Color Lookup Table Descriptor

Element: Green Palette Color Lookup Table Descriptor

Element: Blue Palette Color Lookup Table Descriptor

Element: Red Palette Color Lookup Table Data

Element: Green Palette Color Lookup Table Data

Element: Blue Palette Color Lookup Table Data

Module: Contrast/bolus

Element: Contrast/Bolus Agent

Element: Contrast/Bolus Agent Sequence

Element: Code Value

Element: Coding Scheme Designator

Element: Code Meaning

Element: Contrast/Bolus Route

Element: Contrast/Bolus Administration Route Sequence

Element: Code Value
Element: Coding Scheme Designator
Element: Code Meaning
Element: Additional Drug Sequence
 | Element: Code Value
 | Element: Coding Scheme Designator
 | Element: Code Meaning

Element: Contrast/Bolus Volume

Element: Contrast/Bolus Start Time

Element: Contrast/Bolus Stop Time

Element: Contrast/Bolus Total Dose

Element: Contrast Flow Rate(s)

Element: Contrast Flow Duration(s)

Element: Contrast/Bolus Ingredient

Element: Contrast/Bolus Ingredient Concentration

Module: CR Image

Element: KVP

Element: Plate ID

Element: Distance Source to Detector

Element: Distance Source to Patient

Element: Exposure Time

Element: X-ray Tube Current

Element: Exposure

Element: Exposure in mAs

Element: Imager Pixel Spacing

Element: Generator Power

Element: Acquisition Device Processing Description

Element: Acquisition Device Processing Code

Element: Cassette Orientation

Element: Cassette Size

Element: Exposures on Plate

Element: Relative X-ray Exposure

Element: Sensitivity

Module: Overlay Plane

Element: Overlay Rows

Element: Overlay Columns

Element: Overlay Type

Element: Overlay Origin

Element: Overlay Bits Allocated

Element: Overlay Bit Position

Element: Overlay Data

Element: Overlay Description

Element: Overlay Subtype

Element: Overlay Label

Element: ROI Area

Element: ROI Mean

Element: ROI Standard Deviation

Module: Curve

Element: Curve Dimensions

Element: Number of Points

Element: Type of Data

Element: Data Value Representation

Element: Curve Data

Element: Curve Description

Element: Axis Units

Element: Axis Labels

Element: Minimum Coordinate Value

Element: Maximum Coordinate Value

Element: Curve Range

Element: Curve Data Descriptor

Element: Coordinate Start Value

Element: Coordinate Step Value

Element: Curve Label

Element: Referenced Overlay Sequence

Element: Referenced SOP Class UID

Element: Referenced SOP Instance UID

Element: Referenced Overlay Group

Module: Modality LUT

Element: Modality LUT Sequence

Element: LUT Descriptor

Element: LUT Explanation

Element: Modality LUT Type

Element: LUT Data

Element: Rescale Intercept

Element: Rescale Slope

Element: Rescale Type

Module: VOI LUT

Element: VOI LUT Sequence

Element: LUT Descriptor

Element: LUT Explanation

Element: LUT Data

Element: Window Center

Element: Window Width

Element: Window Center & Width Explanation

Module: SOP Common

Element: SOP Class UID

Element: SOP Instance UID

Element: Specific Character Set

Element: Instance Creation Date

Element: Instance Creation Time

Element: Instance Creator UID


Module Example

Below are graphical representations of a General Study Module and a Patient Module. For an example of a Class, refer to Class Example.


LEADTOOLS DICOM Network Communication Support for Message Exchange

For a general overview of the communication support and message exchange capabilities supported by LEADTOOLS, refer to the following. For more information on the basic DICOM File format and DICOM Communication Protocol, refer to the DICOM Standard.

Network Communication Support Environment

Message Exchange

Network Support


Message Exchange

DICOM Messages are used to communicate information across the DICOM network. A DICOM Message is a DICOM Command Set, and can be followed by a conditional DICOM Data Set. The Command Set indicates the operations and/or notifications that the requesting Application Entity (AE) wishes to have the accepting AE perform on or with the conditional Data Set.

Command Sets are made up of Command Elements, which contain encoded values for each field of the Command Set. The semantics for the Command Set are specified in the DIMSE protocol. Each element in a Command Set is made up of an explicit Tag, a Value Length, and a Value Field.

Within the Command Set, Elements are ordered by increasing Tag number. The Tag uniquely identifies an Element, and occurs only once in a Command Set. The requirements for Command Sets and Command Elements are defined in the DIMSE protocol.

An Element in a Command Set is made up of three fields; a Tag, a Value Length, and a Value Field.

Command Element Tag: | Is an ordered pair of 16-bit unsigned integers that represents the Group Number followed by Element Number.
Value Length: | Is a 32-bit unsigned integer that represents the explicit Length of the value. This is an even number of bytes. This does not include the length of the Command Element Tag or Value Length fields.
Value Field: | Is an even number of bytes that contains the Value or Values(s) of the Command Element. The Command Element's Value Representation (VR) determines the command type of Value(s) stored in this field.
 | The Value Multiplicity (VM) specifies the number of Values that can be placed in the Value Field. When the VM is > 1, multiple Values can be stored within the Value Field.

DICOM Application Entities use services that are provided by the DICOM Message Service Element (DIMSE). DIMSE specifies two sets of services:

DIMSE-C These operations are associated with composite SOP Classes and provide effective compatibility with previous versions of the DICOM Standard.

In LEADTOOLS, the following are DIMSE-C commands:

COMMAND_C_STORE

COMMAND_C_FIND

COMMAND_C_GET

COMMAND_C_MOVE

COMMAND_C_CANCEL

COMMAND_C_ECHO

DIMSE-N These operations are associated with normalized SOP Classes and provide an extended set of operations and notifications.

In LEADTOOLS, the following are DIMSE-N commands:

COMMAND_N_REPORT

COMMAND_N_GET

COMMAND_N_SET

COMMAND_N_ACTION

COMMAND_N_CREATE

COMMAND_N_DELETE

When using DICOM Messages, AEs can serve in one of two roles:

1. invoking DIMSE-service-user

2. performing DIMSE-service-user

The invoking service-user sends command requests to the performing service-user. The performing service users performs the requested operation, and reports progress/status by sending command responses back to the to the invoking service-user.

The following is a list of DIMSE Services, which are supported in LEADTOOLS by the DIMSE-C and DIMSE-N commands:

C Store Request

C Store Response

C Find Request

C Find Response

C Get Request

C Get Response

C Move Request

C Move Response

C Cancel Request

C Echo Request

C Echo Response

N Event Report Request

N Event Report Response

N Get Request

N Get Response

N Set Request

N Set Response

N Action Request

N Action Response

N Create Request

N Create Response

N Delete Request

N Delete Response

C-STORE | This service allows an invoking service-user to request the storage of Composite SOP Instance information by a peer service-user.
C-FIND | This service allows an invoking service-user to match a series of Attribute strings against the Attributes of the set of SOP Instances being handled by a peer service-user. This service will return a list of requested Attributes and their values for each match.
C-GET | This service allows an invoking service-user to fetch information for one or more Composite SOP Instances from a peer service-user. The information returned by the performing service-user is based on the Attributes supplied by the invoking DIMSE-service-user.
C-MOVE | This service allows an invoking service-user to move information for one or more Composite SOP Instances from a peer service-user, to a third party service-user. The information moved is based on the Attributes supplied by the invoking service-user
C-ECHO | This service allows an invoking service-user to verify end-to-end communications with a peer service-user.
N-GET | This service allows an invoking service-user to retrieve information from a peer service-user.
N-SET | This service allows an invoking service-user to modify information being handled by a peer service-user.
N-ACTION | This service allows an invoking service-user to request that a peer service-user perform a specified action.
N-CREATE | This service allows an invoking service-user to request that a peer service-user create an instance of a SOP Class.
N-DELETE | This service allows an invoking service-user to delete an instance of a SOP Class that is being handled by a peer service-user.


Network Support

The LEADTOOLS DICOM Network ActiveX functionality allows programmers to create either client or server applications for DICOM communications. The following illustrations show the various roles that your DICOM Application Entity can serve.


LEADTOOLS DICOM Network Communication Support for Message Exchange

Network Communication Support Environment

The LEADTOOLS DICOM and LEADTOOLS DICOM Network ActiveX together provide functionality for communication of DICOM Application Entities. This functionality provides an interface to the services offered by the OSI Presentation Service (ISO 8822) and the OSI Association Control Service Element (ACSE) (ISO 8649), which are referred to as the Upper Layer Service or UL Service.

This UL Service allows a broad range of existing networking environments to be used for DICOM based medical imaging communication.

LEADTOOLS provides functionality for connecting two Application Entities over a network.

After two Application Entities (AEs) are connected over a network, they can establish a DICOM Association. The establishment of an Association is the first step in setting up communication between two AEs. Only after the connection is "Associated" can DICOM command messages be exchanged between the AEs. Application Entities use the Association to negotiate which SOP classes can be exchanged and the encoding format for the data. Two AEs establish an association as follows:

AE#1 sends an Associate Request message to AE#2. AE#1 is known as the requester.

AE#2 responds by sending an Associate Accept response message to AE#1. AE#2 is known as the acceptor.

Alternatively, and AE can reject an Associate Request by sending an Associate Reject message to the requesting AE.

An association is gracefully terminated as follows:

AE#1 sends an Associate Release request message to AE#2.

AE#2 responds by sending an Associate Release response message to AE#1.

An association can be abnormally terminated by either AE sending an Associate Abort request message. This message is a non-confirmed service, and does not have an associated response.

After an association has been established, AEs can exchange DICOM messages. Messages are formatted as Associate Data messages.

The following illustrate the physical arrangement of the data structures for the various Associate messages. LEADTOOLS handles creating the outline of the various data structures, and in some cases also fills in values for certain data structure members.

Associate Request PDU

Associate Accept PDU

Associate Reject PDU

Data Transfer PDU

Release Request PDU

Release Response PDU

Abort PDU

The following images illustrate the logical arrangement of the data structures for the various Associate messages. LEADTOOLS handles crating the outline of the various data structures, and in some cases also fills in values for certain data structure members.


Associate Request PDU


Associate Accept PDU


Associate Reject PDU


Data Transfer PDU


Release Request PDU


Release Response PDU


Abort PDU


Example Programs

This may change. We will come back to it when all the demos are finalized.

Note:

You can run some of the example programs on your system by clicking the appropriate buttons in online help. An error message will appear if you try to run an example program that is not on your system, or if you try to run a Delphi example without Delphi on your system.

The executable files for these examples were compiled with Medical capabilities of the toolkit. To get Medical capabilities, you must buy a LEADTOOLS Medical toolkit. Otherwise, if you recompile the examples, the resulting executable files will not have the Medical capabilities.

Visual Basic

EXAMPLES\COM\VB\DICOM32 contains a sample application that demonstrates most of the ActiveX DICOM capabilities in Visual Basic 5.0. To run the 32-bit sample application, you can run the EXE file in LEAD's BIN directory.

EXAMPLES\COM\VB\DICCLT32 contains a sample application that demonstrates most of the ActiveX DICOM Network Client capabilities in Visual Basic 5.0. To run the 32-bit sample application, you can run the EXE file in LEAD's BIN directory.

EXAMPLES\COM\VB\DICSRV32 contains sample code that demonstrates most of the ActiveX DICOM Network Server capabilities in Visual Basic 5.0.

Visual C++ 5.0

EXAMPLES\COM\MFC40\DICOM contains sample project code for Visual C++ 4.0. You can open the project in Visual C++; then compile and run it.

EXAMPLES\COM\MFC\DICOMCLT contains a sample application that demonstrates most of the ActiveX DICOM capabilities in Visual Basic 5.0. To run the 32-bit sample application, you can run the EXE file in LEAD's BIN directory.

EXAMPLES\COM\MFC\DICOMSRV contains sample code that demonstrates most of the ActiveX DICOM capabilities in Visual Basic 5.0.


Version History

Current version: | 14.5
Last update: | October 27, 2005

Changes from Version 14 to Version 14.5

Changes from Version 13 to Version 14

Version 13


Changes from Version 14 to Version 14.5

Version 14.5 of the LEADTOOLS DICOM COM object has changed from Version 14 as follows:

LEADTOOLS has added VB.NET and C# samples to show how to use the DICOM COM Objects in the .NET environment.

LEADTOOLS DICOM COM object contains a new method that loads a DICOM Data Set from memory.

The rest of this topic lists the properties, methods and events in version 14.5:

LoadDSArray method

BinaryValues2 property


Changes from Version 13 to Version 14

In Version 14, the LEADTOOLS DICOM ActiveX controls have been discontinued. They have been replaced with LEADTOOLS DICOM COM Objects. All of the Properties, Methods, and Events are still supported, and have the same names.

The rest of this topic lists the properties, methods and events in version 14:

SSLPrivateKeyPassword property

SSLPrivateKeyPasswordEvent event

UseSSLOptions property

SSLCreateFlags property

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

SSLSuccess property

_NewEnum property (IDicomWaveformAnnotations Interface)

_NewEnum property (IDicomWaveformChannels Interface)

_NewEnum property (ILAnnotationBoxes Interface)

_NewEnum property (ILImageBoxes Interface)

_NewEnum property (ILPrinterConfigurationItems Interface)

_NewEnum property (ILSequenceItems Interface)

_NewEnum property (ILSequences Interface)

AbortAssociation method (ILEADDicomPrintSCU Interface)

AbortReason property (ILEADDicomPrintSCU Interface)

AbortSource property (ILEADDicomPrintSCU Interface)

Add method (IDicomWaveformAnnotations Interface)

Add method (IDicomWaveformChannels Interface)

AddStoredPrintItem method (ILPullPrintRequest Interface)

AddWaveformGroup method (ILEADDicomDS Interface)

AnnotationBoxes property

AnnotationDisplayFormatID property

AnnotationFlag property (ILPullPrintRequest Interface)

AnnotationGroupNumber property (IDicomWaveformAnnotation Interface)

AnnotationPosition property (ILAnnotationBox Interface)

Annotations property (IDicomWaveformChannel Interface)

Associate method (ILEADDicomPrintSCU Interface)

Associated property (ILEADDicomPrintSCU Interface)

AssociateRejectReason property (ILEADDicomPrintSCU Interface)

AssociateRejectResult property (ILEADDicomPrintSCU Interface)

AssociateRejectSource property (ILEADDicomPrintSCU Interface)

Attributes property (ILPrinterConfigurationItem Interface)

Attributes property (ILSequenceItem Interface)

BlueLUTDescriptorEntryBits property

BlueLUTDescriptorFirstMapped property

BlueLUTDescriptorNumberOfEntries property

BorderDensity property (ILFilmBox Interface)

BoundingBoxBRHCornerX property (IDicomTextObjectAttributes Interface)

BoundingBoxBRHCornerY property (IDicomTextObjectAttributes Interface)

BoundingBoxTextJustification property (IDicomTextObjectAttributes Interface)

BoundingBoxTLHCornerX property (IDicomTextObjectAttributes Interface)

BoundingBoxTLHCornerY property (IDicomTextObjectAttributes Interface)

ChannelBaseline property (IDicomWaveformChannel Interface)

ChannelLabel property (IDicomWaveformChannel Interface)

ChannelMaximumValue property (IDicomWaveformChannel Interface)

ChannelMinimumValue property (IDicomWaveformChannel Interface)

ChannelOffset property (IDicomWaveformChannel Interface)

Channels property (IDicomWaveformGroup Interface)

ChannelSamples property (IDicomWaveformChannel Interface)

ChannelSampleSkew property (IDicomWaveformChannel Interface)

ChannelSensitivity property (IDicomWaveformChannel Interface)

ChannelSensitivityCF property (IDicomWaveformChannel Interface)

ChannelSensitivityUnits property (IDicomWaveformChannel Interface)

ChannelSource property (IDicomWaveformChannel Interface)

ChannelStatus property (IDicomWaveformChannel Interface)

ChannelTimeSkew property (IDicomWaveformChannel Interface)

CodedName property (IDicomWaveformAnnotation Interface)

CodedValue property (IDicomWaveformAnnotation Interface)

CodeMeaning property (IDicomCodedConcept Interface)

CodeMeaning property (IDicomCodeSequenceItem Interface)

CodeValue property (IDicomCodedConcept Interface)

CodeValue property (IDicomCodeSequenceItem Interface)

CodingSchemeDesignator property (IDicomCodedConcept Interface)

CodingSchemeDesignator property (IDicomCodeSequenceItem Interface)

CodingSchemeVersion property (IDicomCodedConcept Interface)

CodingSchemeVersion property (IDicomCodeSequenceItem Interface)

CollationFlag property (ILPullPrintRequest Interface)

ColorImagePrintingFlag property (ILPullPrintRequest Interface)

ConfigurationInformation property (ILFilmBox Interface)

ConfigurationInformation property (ILImageBox Interface)

ConfigurationInformation property (ILPullPrintRequest Interface)

ContextGroupExtensionCreatorUID property (IDicomCodedConcept Interface)

ContextGroupExtensionCreatorUID property (IDicomCodeSequenceItem Interface)

ContextGroupLocalVersion property (IDicomCodedConcept Interface)

ContextGroupLocalVersion property (IDicomCodeSequenceItem Interface)

ContextGroupVersion property (IDicomCodeSequenceItem Interface)

ContextGroupVersion property (IDicomContextGroup Interface)

ContextIdentifier property (IDicomCodeSequenceItem Interface)

ContextIdentifier property (IDicomContextGroup Interface)

ConvertDicomAnnObjToLEADAnnObj method (ILEADDicomDS Interface)

Count property (IDicomWaveformAnnotations Interface)

Count property (IDicomWaveformChannels Interface)

Count property (ILAnnotationBoxes Interface)

Count property (ILAttributes Interface)

Count property (ILImageBoxes Interface)

Count property (ILPrinterConfigurationItems Interface)

Count property (ILSequenceItem Interface)

Count property (ILSequences Interface)

Create method (ILImageOverlayBox Interface)

Create method (ILPresentationLUT Interface)

Create method (ILPullPrintRequest Interface)

Create method

Create method

CreationDate property (ILPrintJob Interface)

CreationTime property (ILPrintJob Interface)

CurrentCodedConcept property (ILEADDicomDS Interface)

CurrentContextGroup property (ILEADDicomDS Interface)

DateOfLastCalibration property (ILPrinter Interface)

DefaultContextGroup method (ILEADDicomDS Interface)

Delete method (ILFilmBox Interface)

Delete method (ILImageOverlayBox Interface)

Delete method (ILPresentationLUT Interface)

Delete method (ILPullPrintRequest Interface)

Delete method

DeleteBitmapValue method (ILEADDicomDS Interface)

DeleteCodedConcept method (ILEADDicomDS Interface)

DeleteContextGroup method (ILEADDicomDS Interface)

DeleteModalityLUT method (ILEADDicomDS Interface)

DeleteOverlay method (ILEADDicomDS Interface)

DeletePaletteColorLUT method (ILEADDicomDS Interface)

DeleteVOILUT method (ILEADDicomDS Interface)

DeleteWaveformGroup method (ILEADDicomDS Interface)

DeleteWindow method (ILEADDicomDS Interface)

DeviceSerialNumber property (ILPrinter Interface)

EmptyImageDensity property (ILFilmBox Interface)

EnableConformanceStatus property (ILEADDicomDS Interface)

EnableMethodErrors property (IDicomWaveformGroup Interface)

EnableMethodErrors property (ILEADDicomDS Interface)

EnableMethodErrors property (ILEADDicomNet Interface)

EnableMethodErrors property (ILEADDicomPrintSCU Interface)

EnableProgressEvent property (ILEADDicomDS Interface)

ExecutionStatus property (ILPrintJob Interface)

ExecutionStatusInfo property (ILPrintJob Interface)

Extensible property (IDicomContextGroup Interface)

FilmBox property

FilmDestination property (ILPullPrintRequest Interface)

FilmOrientation property

FilmSession property

FilmSessionLabel property

FilmSessionLabel property

FilmSizeID property

FilterHighFrequency property (IDicomWaveformChannel Interface)

FilterLowFrequency property (IDicomWaveformChannel Interface)

FindCodedConcept method (ILEADDicomDS Interface)

FindContextGroup method (ILEADDicomDS Interface)

FindIndexCodedConcept method (ILEADDicomDS Interface)

FindIndexContextGroup method (ILEADDicomDS Interface)

FreeAssociate method (ILEADDicomNet Interface)

Get method (ILPrinterConfiguration Interface)

GetCodedConceptCount method (ILEADDicomDS Interface)

GetContextGroupCount method (ILEADDicomDS Interface)

GetExtendedData method (ILEADDicomNet Interface)

GetInfo method (ILPrinter Interface)

GetInfo method (ILPrintJob Interface)

GetInfoCS method (ILEADDicomDS Interface)

GetInfoDS method (ILEADDicomDS Interface)

GetModalityLUTAttributes method (ILEADDicomDS Interface)

GetModalityLUTData method (ILEADDicomDS Interface)

GetOverlayAttributes method (ILEADDicomDS Interface)

GetOverlayBitmap method (ILEADDicomDS Interface)

GetOverlayBitmapList method (ILEADDicomDS Interface)

GetPaletteColorLUTAttributes method (ILEADDicomDS Interface)

GetPaletteColorLUTData method (ILEADDicomDS Interface)

GetSOPInstanceUID method (ILImageOverlayBox Interface)

GetSOPInstanceUID method (ILPresentationLUT Interface)

GetVOILUTAttributes method (ILEADDicomDS Interface)

GetVOILUTData method (ILEADDicomDS Interface)

GetWaveformGroup method (ILEADDicomDS Interface)

GetWaveformGroupCount method (ILEADDicomDS Interface)

GetWindowAttributes method (ILEADDicomDS Interface)

GreenLUTDescriptorEntryBits property

GreenLUTDescriptorFirstMapped property

GreenLUTDescriptorNumberOfEntries property

Illumination property (ILFilmBox Interface)

Illumination property (ILPullPrintRequest Interface)

ImageBoxes property

ImageBoxPresentationLUTFlag property (ILPullPrintRequest Interface)

ImageFilename property (ILImageBox Interface)

ImageInfo property (ILEADDicomDS Interface)

ImageOverlayBox property (ILEADDicomPrintSCU Interface)

ImagePosition property

IncludedParameters property (ILImageBox Interface)

IncludedParameters property (ILImageOverlayBox Interface)

IncludedParameters property (ILPullPrintRequest Interface)

IncludedParameters property

IncludedParameters property

IncludeVolatile property (ILEADDicomDS Interface)

Index property (IDicomWaveformChannel Interface)

InfoCommand property (ILEADDicomDS Interface)

InfoRequest property (ILEADDicomDS Interface)

InitCS method (ILEADDicomDS Interface)

InsertBitmapListValue method (ILEADDicomDS Interface)

InsertBitmapValue method (ILEADDicomDS Interface)

InsertCodedConcept method (ILEADDicomDS Interface)

InsertContextGroup method (ILEADDicomDS Interface)

InsertDS method (ILEADDicomDS Interface)

InstanceNumber property (IDicomPresStateAttributes Interface)

IsAsyncOperations method (ILEADDicomNet Interface)

IsClassSupported method (ILEADDicomPrintSCU Interface)

IsContextGroupLocalVersion property (IDicomCodedConcept Interface)

IsContextGroupLocalVersion property (IDicomCodeSequenceItem Interface)

IsContextGroupVersion property (IDicomCodeSequenceItem Interface)

IsModalityLUTSequence property (ILModalityLUTAttributes interface)

IsOverlayInDataSet method (ILEADDicomDS Interface)

IsRescaleSlopeIntercept property (ILModalityLUTAttributes interface)

IsSegmented property

Item method (IDicomWaveformAnnotations Interface)

Item method (IDicomWaveformChannels Interface)

Item method (ILAnnotationBoxes Interface)

Item method (ILImageBoxes Interface)

Item method (ILPrinterConfigurationItems Interface)

Item method (ILSequenceItems Interface)

Item method (ILSequences Interface)

Items property (ILSequence Interface)

LastOperationStatus property (ILEADDicomPrintSCU Interface)

LoadAudio method (IDicomWaveformGroup Interface)

LoadContextGroup method (ILEADDicomDS Interface)

LUTDescriptorEntryBits property (ILModalityLUTAttributes interface)

LUTDescriptorEntryBits property (ILVOILUTAttributes Interface)

LUTDescriptorFirstMapped property (ILModalityLUTAttributes interface)

LUTDescriptorFirstMapped property (ILVOILUTAttributes Interface)

LUTDescriptorNumberOfEntries property (ILModalityLUTAttributes interface)

LUTDescriptorNumberOfEntries property (ILVOILUTAttributes Interface)

LUTExplanation property (ILModalityLUTAttributes interface)

LUTExplanation property (ILVOILUTAttributes Interface)

MagnificationType property (ILFilmBox Interface)

MagnificationType property (ILImageBox Interface)

MagnifyToNumberOfColumns property (ILImageOverlayBox Interface)

MainObject property (ILAnnotationBox Interface)

MainObject property (ILFilmBox Interface)

MainObject property (ILFilmSession Interface)

MainObject property (ILImageBox Interface)

MainObject property (ILImageOverlayBox Interface)

MainObject property (ILPresentationLUT Interface)

MainObject property (ILPrinter Interface)

MainObject property (ILPrinterConfiguration Interface)

MainObject property (ILPrintJob Interface)

MainObject property (ILPullPrintRequest Interface)

Manufacturer property (ILPrinter Interface)

ManufacturerModelName property (ILPrinter Interface)

MappingResource property (IDicomCodeSequenceItem Interface)

MaxDensity property (ILFilmBox Interface)

MaxDensity property (ILImageBox Interface)

MeasurementUnits property (IDicomWaveformAnnotation Interface)

MediumType property (ILFilmSession Interface)

MediumType property (ILPullPrintRequest Interface)

MemoryAllocation property (ILFilmSession Interface)

MemoryAllocation property (ILPullPrintRequest Interface)

MinDensity property (ILFilmBox Interface)

MinDensity property (ILImageBox Interface)

ModalityLUTAttributes property (ILEADDicomDS Interface)

ModalityLUTType property (ILModalityLUTAttributes interface)

MoveCodedConceptGroup method (ILEADDicomDS Interface)

MoveFirstCodedConcept method (ILEADDicomDS Interface)

MoveFirstContextGroup method (ILEADDicomDS Interface)

MoveLastCodedConcept method (ILEADDicomDS Interface)

MoveLastContextGroup method (ILEADDicomDS Interface)

MoveNextCodedConcept method (ILEADDicomDS Interface)

MoveNextContextGroup method (ILEADDicomDS Interface)

MovePrevCodedConcept method (ILEADDicomDS Interface)

MovePrevContextGroup method (ILEADDicomDS Interface)

MultiplexGroupLabel property (IDicomWaveformGroup Interface)

MultiplexGroupTimeOffset property (IDicomWaveformGroup Interface)

Name property (IDicomContextGroup Interface)

Name property (ILAttribute Interface)

Name property (ILSequence Interface)

NetworkTempPath property (ILEADDicomNet Interface)

NotchFilterBandwidth property (IDicomWaveformChannel Interface)

NotchFilterFrequency property (IDicomWaveformChannel Interface)

NumberOfCopies property (ILFilmSession Interface)

NumberOfCopies property (ILPullPrintRequest Interface)

NumberOfSamples property (IDicomWaveformChannel Interface)

NumberOfSamplesPerChannel property (IDicomWaveformGroup Interface)

NumericValue property (IDicomWaveformAnnotation Interface)

NumericValueCount property (IDicomWaveformAnnotation Interface)

OnPrinterReport event (_ILEADDicomPrintSCUEvents dispinterface)

OnPrintJobReport event (_ILEADDicomPrintSCUEvents dispinterface)

OnStatus event (_ILEADDicomPrintSCUEvents dispinterface)

Originator property (ILPrintJob Interface)

OverlayActivationLayer property (ILEADDicomDS Interface)

OverlayAttributes property (ILEADDicomDS Interface)

OverlayBackgroundDensity property (ILImageOverlayBox Interface)

OverlayBitmap property (ILEADDicomDS Interface)

OverlayBitmapList property (ILEADDicomDS Interface)

OverlayCount property (ILEADDicomDS Interface)

OverlayFilename property (ILImageOverlayBox Interface)

OverlayForegroundDensity property (ILImageOverlayBox Interface)

OverlayGroupNumber property (ILEADDicomDS Interface)

OverlayMagnificationType property (ILImageOverlayBox Interface)

OverlayOriginColumn property (ILImageOverlayBox Interface)

OverlayOriginRow property (ILImageOverlayBox Interface)

OverlayOrImageMagnification property (ILImageOverlayBox Interface)

OverlaySmoothingType property (ILImageOverlayBox Interface)

OwnerID property (ILFilmSession Interface)

OwnerID property (ILPullPrintRequest Interface)

PaletteColorLUTAttributes property (ILEADDicomDS Interface)

Polarity property (ILImageBox Interface)

PresCreationDate property(IDicomPresStateAttributes Interface)

PresCreationTime property (IDicomPresStateAttributes Interface)

PresCreatorName property (IDicomPresStateAttributes Interface)

PresDescription property(IDicomPresStateAttributes Interface)

PresentationLUT property (ILEADDicomPrintSCU Interface)

PresentationLUTFlag property (ILPullPrintRequest Interface)

PresLabel property (IDicomPresStateAttributes Interface)

PrintBox method (ILFilmBox Interface)

Printer property (ILEADDicomPrintSCU Interface)

PrinterConfigItems property (ILPrinterConfiguration Interface)

PrinterConfiguration property (ILEADDicomPrintSCU Interface)

PrinterName property (ILPrinter Interface)

PrinterName property (ILPrintJob Interface)

PrinterStatus property (ILPrinter Interface)

PrinterStatusInfo property (ILPrinter Interface)

PrintJob property (ILEADDicomPrintSCU Interface)

PrintJobSOPInstanceUID property (ILFilmBox Interface)

PrintJobSOPInstanceUID property (ILFilmSession Interface)

PrintJobSOPInstanceUID property (ILPullPrintRequest Interface)

PrintPriority property (ILFilmSession Interface)

PrintPriority property (ILPrintJob Interface)

PrintPriority property (ILPullPrintRequest Interface)

PrintSession method (ILFilmSession Interface)

PrintSession method (ILPullPrintRequest Interface)

ProgressStatus event (ILEADDicomDS Interface)

PullPrintRequest property (ILEADDicomPrintSCU Interface)

RedLUTDescriptorEntryBits property

RedLUTDescriptorFirstMapped property

RedLUTDescriptorNumberOfEntries property

RefDatetime property (IDicomWaveformAnnotation Interface)

RefImageOverlayBoxInstanceUID property (ILImageBox Interface)

ReflectedAmbientLight property (ILFilmBox Interface)

ReflectedAmbientLight property (ILPullPrintRequest Interface)

RefPresLUTInstanceUID property (ILFilmBox Interface)

RefPresLUTInstanceUID property (ILImageBox Interface)

RefSamplePositions property (IDicomWaveformAnnotation Interface)

RefTimeOffsets property (IDicomWaveformAnnotation Interface)

ReleaseAssociation method (ILEADDicomPrintSCU Interface)

Remove method (IDicomWaveformAnnotations Interface)

Remove method (IDicomWaveformChannels Interface)

RemoveAllStoredPrintItems method (ILPullPrintRequest Interface)

RequestAttributeCount property (ILEADDicomNet Interface)

RequestAttributes property (ILEADDicomNet Interface)

RequestedDecimateCropBehavior property (ILImageBox Interface)

RequestedImageSize property (ILImageBox Interface)

RequestedResolutionID property

RequiredInfo property (ILPrinter Interface)

RequiredInfo property (ILPrintJob Interface)

RescaleIntercept property (ILModalityLUTAttributes interface)

RescaleSlope property (ILModalityLUTAttributes interface)

RescaleType property (ILModalityLUTAttributes interface)

Reset method (IDicomWaveformGroup Interface)

ResetContextGroup method (ILEADDicomDS Interface)

SampleInterpretation property (IDicomWaveformGroup Interface)

SamplingFrequency property (IDicomWaveformGroup Interface)

SaveAudio method (IDicomWaveformGroup Interface)

Sequences property (ILPrinterConfigurationItem Interface)

SetChannelSamples method (IDicomWaveformChannel Interface)

SetCodedConceptCodeMeaning method (ILEADDicomDS Interface)

SetModalityLUT method (ILEADDicomDS Interface)

SetNumberOfSamplesPerChannel method (IDicomWaveformGroup Interface)

SetOverlayAttributes method (ILEADDicomDS Interface)

SetOverlayBitmap method (ILEADDicomDS Interface)

SetOverlayBitmapList method (ILEADDicomDS Interface)

SetPaletteColorLUTAttributes method (ILEADDicomDS Interface)

SetPaletteColorLUTData method (ILEADDicomDS Interface)

SetPresentationAbstract method (ILEADDicomNet Interface)

SetVOILUT method (ILEADDicomDS Interface)

SetWindowAttributes method (ILEADDicomDS Interface)

SmoothingType property (ILFilmBox Interface)

SmoothingType property (ILImageBox Interface)

SoftwareVersions property (ILPrinter Interface)

SOPInstanceUID property (ILAnnotationBox Interface)

SOPInstanceUID property (ILImageBox Interface)

SOPInstanceUID property (ILPullPrintRequest Interface)

SOPInstanceUID property

SOPInstanceUID property

TemporalPointCount property (IDicomWaveformAnnotation Interface)

TemporalPointsType property (IDicomWaveformAnnotation Interface)

TemporalRangeType property (IDicomWaveformAnnotation Interface)

TextString property (ILAnnotationBox Interface)

TimeOfLastCalibration property (ILPrinter Interface)

Timeout property (ILEADDicomPrintSCU Interface)

TriggerSamplePosition property (IDicomWaveformGroup Interface)

TriggerTimeOffset property (IDicomWaveformGroup Interface)

Trim property (ILFilmBox Interface)

UID property

UnformattedTextValue property (IDicomWaveformAnnotation Interface)

UnlockSupport method (ILEADDicomKernel Interface)

Update method (ILAnnotationBox Interface)

Update method (ILFilmSession Interface)

Update method (ILImageBox Interface)

Update method (ILImageOverlayBox Interface)

Update method

Value property (ILAttribute Interface)

ValueDefined property (IDicomWaveformAnnotation Interface)

ValueDefined property (IDicomWaveformChannel Interface)

ValueDefined property (IDicomWaveformGroup Interface)

ValueType property (IDicomWaveformAnnotation Interface)

VOILUTAttributes property (ILEADDicomDS Interface)

VOILUTCount property (ILEADDicomDS Interface)

WaveformChannelNumber property (IDicomWaveformChannel Interface)

WaveformGroup property (IDicomWaveformChannel Interface)

WaveformOriginality property (IDicomWaveformGroup Interface)

WaveformPaddingValue property (IDicomWaveformGroup Interface)

WindowAttributes property (ILEADDicomDS Interface)

WindowCenter property (ILWindowAttributes Interface)

WindowCount property (ILEADDicomDS Interface)

WindowCWExplanation property (ILWindowAttributes Interface)

WindowWidth property (ILWindowAttributes Interface)

Annotations:

AddLayerImageRef method (ILEADDicomDS Interface)

AddPresStateImageRef method (ILEADDicomDS Interface)

AnchorPointUnits property (IDicomTextObjectAttributes Interface)

AnchorPointUsed property (IDicomTextObjectAttributes Interface)

AnchorPointVisible property (IDicomTextObjectAttributes Interface)

AnchorPointX property (IDicomTextObjectAttributes Interface)

AnchorPointY property (IDicomTextObjectAttributes Interface)

BoundingBoxUnits property (IDicomTextObjectAttributes Interface)

BoundingBoxUsed property (IDicomTextObjectAttributes Interface)

CreateGraphicAnnItem method (ILEADDicomDS Interface)

CreateGraphicObject method (ILEADDicomDS Interface)

CreateLayer method (ILEADDicomDS Interface)

CreateTextObject method (ILEADDicomDS Interface)

DisplayBlueValue property (IDicomLayerAttributes Interface)

DisplayGrayscaleValue property (IDicomLayerAttributes Interface)

DisplayGreenValue property (IDicomLayerAttributes Interface)

DisplayRedValue property (IDicomLayerAttributes Interface)

Filled property (IDicomGraphicObjectAttributes Interface)

FindFirstGraphicAnnItem method (ILEADDicomDS Interface)

FindFirstPresStateRefSeriesItem method (ILEADDicomDS Interface)

FindGraphicObjectItem method (ILEADDicomDS Interface)

FindLayerItem method (ILEADDicomDS Interface)

FindLayerRefImageItem method (ILEADDicomDS Interface)

FindPresStateRefImageItem method (ILEADDicomDS Interface)

FindTextObjectItem method (ILEADDicomDS Interface)

GetGraphicObjectAttributes method (ILEADDicomDS Interface)

GetGraphicObjectCount method (ILEADDicomDS Interface)

GetLayerAttributes method (ILEADDicomDS Interface)

GetLayerGraphicObjectCount method (ILEADDicomDS Interface)

GetLayerImageRefCount method (ILEADDicomDS Interface)

GetLayerImageRefInstanceUID method (ILEADDicomDS Interface)

GetLayerIndex method (ILEADDicomDS Interface)

GetLayerName method (ILEADDicomDS Interface)

GetLayerTextObjectCount method (ILEADDicomDS Interface)

GetPresStateAttributes method (ILEADDicomDS Interface)

GetPresStateImageRefCount method (ILEADDicomDS Interface)

GetPresStateImageRefInstanceUID method (ILEADDicomDS Interface)

GetTextObjectAttributes method (ILEADDicomDS Interface)

GetTextObjectCount method (ILEADDicomDS Interface)

GraphicObjectAttributes property (ILEADDicomDS Interface)

InstanceNumber property (IDicomPresStateAttributes Interface)

LayerAttributes property (ILEADDicomDS Interface)

LayerCount property (ILEADDicomDS Interface)

LayerDescription property (IDicomLayerAttributes Interface)

LayerName property (IDicomGraphicObjectAttributes Interface)

LayerName property (IDicomLayerAttributes Interface)

LayerName property (IDicomTextObjectAttributes Interface)

LayerOrder property (IDicomLayerAttributes Interface)

LEADAnnObject property (ILEADDicomDS Interface)

MoveNextGraphicAnnItem method (ILEADDicomDS Interface)

MoveNextPresStateRefSeriesItem method (ILEADDicomDS Interface)

NewLayerIndex property (ILEADDicomDS Interface)

PointCount property (IDicomGraphicObjectAttributes Interface)

PointsX property (IDicomGraphicObjectAttributes Interface)

PointsY property (IDicomGraphicObjectAttributes Interface)

PresCreationDate property (IDicomPresStateAttributes Interface)

PresCreationTime property (IDicomPresStateAttributes Interface)

PresCreatorName property (IDicomPresStateAttributes Interface)

PresDescription property (IDicomPresStateAttributes Interface)

PresLabel property (IDicomPresStateAttributes Interface)

PresStateAttributes property (ILEADDicomDS Interface)

RemoveAllGraphicObjects method (ILEADDicomDS Interface)

RemoveAllLayerImageRefs method (ILEADDicomDS Interface)

RemoveAllLayers method (ILEADDicomDS Interface)

RemoveAllLayersImageRefs method (ILEADDicomDS Interface)

RemoveAllPresStateImageRefs method (ILEADDicomDS Interface)

RemoveAllTextObjects method (ILEADDicomDS Interface)

RemoveGraphicObject method (ILEADDicomDS Interface)

RemoveLayer method (ILEADDicomDS Interface)

RemoveLayerGraphicObjects method (ILEADDicomDS Interface)

RemoveLayerImageRef method (ILEADDicomDS Interface)

RemoveLayerTextObjects method (ILEADDicomDS Interface)

RemovePresStateImageRef method (ILEADDicomDS Interface)

RemoveTextObject method (ILEADDicomDS Interface)

SetGraphicObjectAttributes method (ILEADDicomDS Interface)

SetLayerAttributes method (ILEADDicomDS Interface)

SetLayerName method (ILEADDicomDS Interface)

SetPresStateAttributes method (ILEADDicomDS Interface)

SetTextObjectAttributes method (ILEADDicomDS Interface)

TextObjectAttributes property (ILEADDicomDS Interface)

TextValue property (IDicomTextObjectAttributes Interface)

Type property (IDicomGraphicObjectAttributes Interface)

Units property (IDicomGraphicObjectAttributes Interface)


Version 13

Version 13 is the first version of LEADTOOLS DICOM COM.

The rest of this topic lists the properties, methods and events in version 13:

CreateObject method

CreateObject2 method

DicomFileInsert event

EnableMethodErrors property

hDicomDirDS property

ImplementationClassUID property

ImplementationVersionName property

IncludeSubfolders property

InsertDicomDS method

InsertDicomFile method

InsertIconImageSequence property

LoadDicomDir method

RejectInvalidFileID property

ResetDicomDir method

SaveDicomDir method

SetDescriptorFile method

SetFileSetID method


Copyright notice

Copyright Notices

©Copyright LEAD Technologies, Inc. 1991-2005. ALL RIGHTS RESERVED

Portions of the PCDLIB32.DLL, PCDLIB.DLL, LFFPX7.DLL, LFKODAK.DLL, EKFPIXJPEG140.DLL, PDC_SDK.DLL, PROFIRE.DLL, DC120V154_32.DLL, LFDCR14N.DLL, DCSPROBACK.DLL, DCSPRO3SLR.DLL, LFDCS14N.DLL, and LFKDC14N.DLL files contain material that is ©Copyright Eastman Kodak Company, 1996-2001. This software is based in part on the work of the Independent JPEG Group.

Portions of the LFCRW14N.DLL, LTCMP14.DLL, CDSDK.reg, CDSDK.dll, CDRAPCLS.dll, czs_ui.dll, deimg.dll, deImg010.dll, deImg110.dll, deImg153.dll, deimg301.dll, deimg401.dll, deImg404.dll, deimg602.dll, Deimg603.dll, DeImgd60.dll, pscAdimg.dll, pscCllct.dll, pscCStUI.dll, pscDcd.dll, pscDevUI.dll, pscDvlp.dll, Pscl2STI.dll, pscll.dll, pscParse.dll, pscSetup.dll, psdkdll.dll, psdkReg.dll, psParse.dll. file contain material that is © Canon, Inc. 2002

Portions of the LFFPX7.DLL and LFKODAK.DLL files contain material that is ©Copyright Hewlett Packard, 1996.

Portions of the OCR/ICR/OMR Features and the help file for the OCR/ICR/OMR Features are ©Copyright Scansoft, Inc. 1995-2003. ALL RIGHTS RESERVED

Portions of the Barcode Modules contain material that is ©Copyright Axtel Inc., 1999.

Portions of the LEADTOOLS PDF Plug in and the LEADTOOLS Vector Imaging Pro are ©Copyright 1996, 2000 Artifex Software Inc. All rights reserved.

File filters for decoding MrSID ® and DjVu ® formats are provided under a license from Lizardtech, Inc.

The "FlashPix" format uses Microsoft's OLE structured storage.

Portions of the DICOM help files in Medical Imaging product line are reprinted with permission from the National Electrical Manufacturers Association ©Copyright 1998 by the National Electrical Manufacturers Association. All rights including translation into other languages, reserved under the Universal Copyright Convention, the Berne Convention or the Protection of Literacy and Artistic Works, and the International and Pan American Copyright Conventions.

Portions of LEADTOOLS Data Security Add On contain software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/), including including cryptographic software written by Eric Young (eay@cryptsoft.com) and by Tim Hudson (tjh@cryptsoft.com). Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. Copyright Tim Hudson 1995-1998 (tjh@cryptsoft.com) All rights reserved.

Portions of LEADTOOLS Data Security Add On contain software based on the MD5 Message Digest Algorithm developed by RSA Data Security, Inc.. Copyright (c) 1991-92 RSA Data Security, Inc. All Rights Reserved.

Portions hereof licensed under US patent 5,327,254 and foreign counterparts.

Portions of the LEADTOOLS ICC Profiles material is © Copyright 2004, International Color Consortium.

Trademarks

LEAD® and LEADTOOLS® are registered trademarks of LEAD Technologies, Inc.
Microsoft, Windows, Windows NT, Visual Basic, Visual FoxPro, and Microsoft Access are either trademarks or registered trademarks of the Microsoft Corporation.
OS/2® is a registered trademark of International Business Machines Corporation.

TextBridge®OCR is a registered trademark of Scansoft, Inc.

ISIS® is a registered trademark of Pixel Translations, Inc.

ScanAhead™ is a trademark of Pixel Translations, Inc.

FlashPix™ is a trademark of Eastman Kodak Company.

All other brand or product names used in this online help are trademarks of their respective holders.

Address and Contact Information

LEAD Technologies, Inc.
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

(704) 332-5532
FAX: (704) 372-8161
E-mail: support@leadtools.com
Technical support: (704) 372-9681 or support@leadtools.com
Home page: http://www.leadtools.com


Programming with the LEADTOOLS COM

Programming with the LEADTOOLS DICOM COM

The following topics provide a systematic approach to understanding and using the LEAD DICOM COM Object properties, methods, and events:

Registering and Unregistering the COM Objects

Working with DICOM files

Unlocking DICOM Support

Unlocking Special LEAD Features

General DICOM COM Support

Working with Data Sets

Working with Information Object Definitions

Working with Tags

Working with Unique Identifiers

Working with Value Representations

Working with Key Elements

Overlays Overview

DICOM Annotation Files

Implementing JPEG 2000 Plug in Features

Creating Instances of Licensed COM Objects

Creating DICOM Directories

Working with Digital Signatures

Working with DICOM Waveforms

Print Management SCU

Print Management SCU

Working With The LAnnotationBox Collection

Working With The LAnnotationBox Object

Working With The LAttribute Object

Working With The LAttributes Collection

Working With The LFilmBox Object

Working With The LFilmSession Object

Working With The LImageBox Collection

Working With The LImageBox Object

Working With The LImageOverlayBox Object

Working With The LPresentationLUT Object

Working With The LPrinter Object

Working With The LPrinterConfiguration Object

Working With The LPrinterConfigurationItem Object

Working With The LPrinterConfigurationItems Collection

Working With The LPrintJob Object

Working With The LPullPrintRequest Object

Working With The LSequence Object

Working With The LSequenceItem Object

Working With The LSequenceItems Collection

Working With The LSequences Collection

LUT Encoding

LUT Encoding

Working with the LPaletteColorLUTAttributes Object

Working with the LVOILUTAttributes Object

Working with DICOM Annotations

Working with DICOM Annotations

Working with the DicomGraphicObjectAttributes Object

Working with the DicomLayerAttributes Object

Working with the DicomPresStateAttributes Object

Working with the DicomTextObjectAttributes Object

Working with DICOM Communication

Working with DICOM Network Connections

Working with DICOM Associate Connections

Working with Command Sets

Creating a DICOM Network Connection

Creating a DICOM Associate Connection

Creating an SCU

Creating an SCP

Sending Messages

Receiving Messages

Moving Composite Data

Diagram of an SCU-SCP Set-Up

Closing a DICOM Associate Connection

Working with Context Groups

Working with Context Groups

Working with the DicomContextGroup Object

Working with the DicomCodedConcept Object

ISCL Security

Adding ISCL Security to a DICOM Connection

Establishing an ISCL Line Connection

Sending and Receiving Messages with ISCL

Closing an ISCL Connection

TLS Security

Adding TLS Security to a DICOM Connection

Negotiating a Ciphersuite

ISCL Protocols


Creating Instances of Licensed COM Objects

In some programming languages, such as Visual Basic, you cannot create instances of licensed COM objects. The ILEADDicomFactory object/interface will allow you to create instances of licensed COM objects, such as the LEAD Raster COM Object, LEAD RasterView Control, and LEAD Dicom Kernel COM Object. The CreateObject method creates an instance of a licensed COM object and returns an IUnknown pointer to the created object. This is for use in Visual Basic. For ASP, VisualBasic Script and Java Script, LEADTOOLS provides the CreateObject2 method, which returns an IDispatch pointer to the created object.


General DICOM COM Support

Certain functionalities, such as unlocking support, using common constant definitions and generating runtime exceptions are common to all DICOM COM objects. To support these functionalities, LEADTOOLS provides the ILEADDicomKernel object, which is required by all other DICOM COM objects.

Some features of LEADTOOLS are locked and must be unlocked before they can be used. To determine whether a feature is locked, the ILEADDicomKernel includes the IsSupportLocked method. To actually unlock a locked feature, ILEADDicomKernel includes the UnlockSupport method. For more information on unlocking DICOM support or other LEAD features, refer to Unlocking DICOM Support and Unlocking Special LEAD Features.

In addition to receiving error codes from methods, you may wish to have LEADTOOLS generate runtime exceptions. To enable the generation of runtime exceptions, set the EnableMethodErrors property of the ILEADDicomKernel object to TRUE.


Supported Ciphersuites

Currently, these are the only ciphersuites supported by LEADTOOLS:

DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA = 0x12,
DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x13, // mandatory standard


Registering and Unregistering the COM Objects

Registering COM Objects

Before the DICOM COM Object can be used, it must be registered. The installation program automatically registers all the LEADTOOLS COM Objects. If you would like to manually register the controls run:

REGSVR32.EXE for 32-bit COM Objects

found in the BIN directory and pass the name of the COM Object to register as a parameter.

EX.:

REGSVR32 LTDicKrn14N.DLL will register the DICOM Kernel COM Objects.

REGSVR32 LTDicDS14N.DLL will register the DICOM DS COM Objects.

REGSVR32 LTDicNet14N.DLL will register the DICOM Network COM Objects.

REGSVR32 LTDicDir14N.DLL will register the DICOM Directory COM Objects.

Unregistering COM Objects

To unregister the DICOM COM Object, include the "/u" switch before the COM Objects name when running:

REGSVR32.EXE for 32-bit COM Objects

EX.:

REGSVR32 /u LTDicKrn14N.DLL will un-register the DICOM Kernel COM Objects.

REGSVR32 /u LTDicDS14N.DLL will un-register the DICOM DS COM Objects.

REGSVR32 /u LTDicNet14N.DLL will un-register the DICOM Network COM Objects.

REGSVR32 /u LTDicDir14N.DLL will un-register the DICOM Directory COM Objects.

Note:

The LEADTOOLS COM Objects do not register without certain DLLs. For a list of required DLLs for the DICOM Control, refer to Files To Be Included With Your Application.


Unlocking DICOM Support

Extensive DICOM file format support is unlocked in a number of ways using UnlockSupport. UnlockSupport must be called with the key found on the toolkit certificate, which will be e-mailed to you.

DICOM file format support can be unlocked by calling UnlockSupport (L_SUPPORT_DICOM, "key"), UnlockSupport (L_SUPPORT_MEDICAL, "key") or (L_SUPPORT_MEDICAL_NET, "key"), or UnlockSupport"), depending on the toolkit the user has purchased.

To unlock DICOM unsecure communication support (available only in select LEAD products), UnlockSupport must be called with the key found on the toolkit certificate. UnlockSupport(L_SUPPORT_MEDICAL_NET, "Medical Imaging Net key") tells the package to unlock DICOM file format support, all Medical features, and the unsecure DICOM Communication support. The key is passed for verification. For more information about required files, refer to Files To Be Included With Your Application.

To determine whether support is locked or not, use the IsSupportLocked method.


Unlocking Special LEAD Features

LEAD offers a variety of features, such as Document support, Medical support, Vector support, etc., which are only available in certain toolkits and are locked. To use these features you must:

purchase a toolkit that supports the desired feature(s).

print the applicable runtime agreement from the help file. For information on the runtime agreements, go to Topic Selection and click on the LEAD Licensing button.

complete the Transmittal document and fax it and the runtime agreement to LEAD's Licensing Department at 704 – 372 – 3789. (To get a copy of the Transmittal document, you must contact LEAD.)

if prepaid licenses are desired, include the order form with payment information. You can fax this along with the Transmittal form and the runtime agreement. (To get a copy of the order form, you must contact LEAD.)

once we have received the signed agreement, we will send instructions for eliminating the license dialogs and the key(s) necessary for unlocking the appropriate features.

when you have received the instructions and the key(s) call the UnlockSupport method with the appropriate key.

For example, if you have purchased the LEADTOOLS Document Imaging toolkit:

print the Document Imaging Agreement (or the Document Imaging with OCR Agreement if you have also purchased the LEADTOOLS OCR Module).

complete the Transmittal document and fax it and the Document Imaging Agreement (or the Document Imaging with OCR Agreement) to LEAD's Licensing Department.

if you want prepaid licenses, print a copy of the order form, fill it out and send the order form and payment information to LEAD.

once we have received the signed Document Imaging Agreement (or Document Imaging with OCR Agreement), we will send the instructions for eliminating the license dialogs and any necessary keys.

when you receive the instructions and the key(s), call UnlockSupport (L_SUPPORT_DOCUMENT, "Document Key") to unlock the Document features. Please note that "Document Key" represents the actual key you will receive from LEAD. Also note that if you also purchased the LEADTOOLS OCR Module, the OCR features will have to be unlocked separately, using the appropriate key.

For information on products and the features available in each product, or for information on licensing, refer to Topic Selection.

To determine if a certain feature is locked, call the IsSupportLocked method.


DICOM Annotation Files

A DICOM data set can store up to 256 annotation files as private data. The annotation files may be single page or multi-page. These annotations can be in either the LEAD native format or a binary encoded format. For working with the annotation files, LEAD provides the following:

To load an annotation file from a DICOM data set, use the AnnLoad method. This method updates the AnnContainer property with the root container of the loaded annotations.

The AnnCount method retrieves information about the annotation files stored in a DICOM data set. This method provides information on which, of the 256 positions within the DICOM data set, contain annotation files and, if desired, the appropriate private creator tag. This property updates the AnnEntries property and the AnnPrivateCreatorTag property.

The AnnDelete method can be used to delete a page from an annotation file, delete an entire annotation file, or delete all annotation files stored in a DICOM data set.

To save annotations as private data within a DICOM data set, use the AnnSave method. This method saves the annotations referenced by the container object in the AnnContainer property. If a private creator tag has been set in the AnnPrivateCreatorTag property, AnnSave will use this tag when saving the annotations.

Annotations can be manipulated using the LEADTOOLS Annotation functions, available in selected products. For information on the LEAD product line, refer to Topic Selection. For more information on the Annotation functions, refer to the LEADTOOLS Main COM Object Help File. (Ltcomn.hlp in the LEAD\Help directory.

Please note that both the DICOM capabilities and the DOCUMENT capabilities must be unlocked in order to work with DICOM annotations. For more information on unlocking these capabilities, refer to UnlockSupport.


Creating DICOM Directories

In order to identify a DICOM file-set, and to facilitate accessing the information stored in the DICOM files of the file-set, the DICOM standard has defined the Basic Directory IOD. A DICOM file-set contains one or more DICOM files. One of the files contained in the file-set is the DICOMDIR file. The DICOMDIR file contains Dicom Directory information, which makes it easier to access the information contained in the other DICOM files in the file set. The DICOM files in the file-set are assigned File IDs, so that they can be referenced by the DICOMDIR File, which itself, is identified by a File ID of DICOMDIR.

LEADTOOLS provides the LEADDicomDir COM object, which implements the ILEADDicomDir interface, to simplify the process of creating DICOM Directories for file-sets.

As a demonstration of a typical usage of the methods and properties of the ILEADDicomDir interface, let’s suppose that we need to build the DICOM Directory of the file-set defined by the files contained in the folder "C:\DICOM Images\" and in any subfolders. This folder is then the destination folder of the DICOMDIR File.

At the beginning of the application, the destination folder should be specified. This is done using the ResetDicomDir method.

Only the DICOM files within the destination folder (e.g., "C:\DICOM Images\Brain") or in a subfolder of this folder (e.g., "C:\DICOM Images\Patient1\Series1\Knee") can be added to the Dicom Directory. The File ID, which is used by the Dicom Directory to reference an added file, will be the relative path of the file. For instance, the File IDs of the two previous files would be "Brain" and "Patient1\Series1\Knee", respectively.

A DICOM file can be added to the Dicom Directory in one of two ways:

Directly, using the InsertDicomFile method. The DICOM files contained in the destination folder can be added individually or all at once using this method. Adding the files individually requires multiple calls to the InsertDicomFile method, with the name of the file to add passed in the bstrFileName parameter. All files in the destination folder can be added at once by calling the InsertDicomFile method with the bstrFileName parameter set to NULL. In this case, the DicomFileInsert event is fired for each file that is added so that the progress of adding the files can be monitored. The IncludeSubfolders property specifies whether the files in the subfolders of the destination folder should also be added.

Indirectly, using the InsertDicomDS method. In this way, the Data Set contained by the DICOM file to be added is first loaded using the LoadDS method of the LEADTOOLS DICOM COM object and the handle to the Data Set (specified by the hDicomDS property of the control) is then passed to the InsertDicomDS method.

The SetFileSetID method can be used to identify the file-set by providing a simple humanly readable identifier. Also, the SetDescriptorFile method can be used to specify a descriptor file (a "readme" file) for the file-set.

The InsertIconImageSequence property specifies whether to add an icon image that represents the image stored in the DICOM file or Data Set to be added to the Dicom Directory.

The ImplementationClassUID property and ImplementationVersionName property can be used to identify the implementation that writes the DICOMDIR File and its content.

The RejectInvalidFileID property specifies whether those methods of the ILEADDicomDir interface that take a filename as a parameter should reject invalid File IDs.

The handle to the Data Set of the DICOM Directory managed by the COM object is specified by the hDicomDirDS property. For further manipulation of this Data Set, the handle can be used with the LEADTOOLS DICOM COM object.

Once the DICOM Directory is ready, the SaveDicomDir method can be called to create the DICOMDIR File and store the directory information. The DICOMDIR File is named "DICOMDIR" and is saved in the destination folder ("C:\DICOM Images\DICOMDIR").

The LoadDicomDir method can be used to load the Dicom Directory stored in an existing DICOMDIR file. The loaded Dicom Directory can then be manipulated using the various properties and methods. For instance, additional DICOM files can be added to the Directory.

Most of the methods of the ILEADDicomDir interface return a value that indicates success or failure. If you need these methods to generate runtime exceptions in case of failure (in addition to the return value), set the EnableMethodErrors property to VARIANT_TRUE.


Working with Data Sets

A Data Set is a collection of Data Elements stored in a DICOM file. Each DICOM file may or may not include a header consisting of a Preamble and a Prefix. For more information about the DICOM File Format, refer to the An Overview of the DICOM File Format or the DICOM Standard, published by the

National Electrical Manufacturers Association

1300 N. 17th Street

Rosslyn, Virginia 22209 USA

hereafter referred to as the DICOM Standard.

Each DICOM file represents a separate class of information. For example, one DICOM file may represent the Computed Tomography Image class, and another DICOM file may represent the Radiotherapy Structure Set class. However, both classes would not be contained in the same DICOM file. For a list of the standard classes supported by DICOM, refer to the IOD Class Constants. In addition to the standard classes supported by DICOM, user-defined classes may also be added.

For each class supported by DICOM there are certain modules contained in each class. Each module consists of a number of Data Elements, each Data Element having its own tag. These Data Elements can be mandatory or optional, depending on the module and the class. For a list of the default modules supported by DICOM, refer to IOD Module Constants. For a list of default Data Elements (tag values) supported by DICOM, refer to Data Element Tag Constants. For more details concerning the DICOM File Format, refer to An Overview of the DICOM File Format and the DICOM Standard. In addition to the standard modules and data elements supported by DICOM, user-defined modules and data elements may also be added.

LEADTOOLS maintains the Data Set internally as a tree structure. In this documentation the tree will be referred to as the Data Set, and individual members of the Data Set will be referred to as Data Elements or items. Some of the methods provided by LEADTOOLS allow you to evaluate the Data Set as a tree or as a list.

LEADTOOLS provides a number of properties, methods, and events for maneuvering through the Data Set, getting and setting Data Set information, getting and setting Data Element values, searching the Data Set, and creating, loading and saving Data Sets.

For creating, initializing, loading and saving Data Sets, LEADTOOLS provides the following:

DSTempPath property

InitDS method

LoadDS method

L oadDSArray method

SaveDS method

For maneuvering through the Data Set use the following:

CurrentElement property

MoveRootElement method

MoveParentElement method

MoveChildElement method

MoveFirstElement method

MoveLastElement method

MovePrevElement method

MoveNextElement method

LEADTOOLS provides several functions for searching the Data Set. To find specific modules, use the FindModule method and the FindIndexModule method. You can find specific Data Elements using the FindFirstElement method, FindLastElement method, FindPrevElement method, and the FindNextElement method.

To insert new items in the Data Set, call the InsertElement method or the InsertModule method. When inserting or setting an image, use the IncludeVolatile property to indicate whether the CurrentElement property is volatile. To insert the images in the BitmapList property into the Pixel Data Element, use the InsertBitmapListValue method.

You can delete individual items from the Data Set using the DeleteElement method. You can delete entire modules from the Data Set, using the DeleteModule method. To delete all items in the Data Set, call the ResetDS method. To delete one or more images in the Pixel Data Element, starting at the specified index and continuing for the specified count, use the DeleteBitmapValue method. To replace only one image within the Pixel Data Element, use the DeleteBitmapValue method and the InsertBitmapValue method.

To retrieve values stored in the Value Field of the Data Element LEADTOOLS provides the following:

GetAgeValue method: This method updates the AgeValues property with the age value(s) associated with the item specified in the CurrentElement property. This method also updates the AgeValueCount property to ICount, where ICount is the number of age values to get.

GetBinaryValue method: This method updates the BinaryValues property and the BinaryValues2 property with the binary values associated with the item specified by the CurrentElement property. This method also updates the BinaryValueCount property with ILength, where ILength is the number of bytes of binary data to get.

GetBitmapListValue method: This method updates the BitmapList property with the image list associated with the Pixel Data Element specified by the CurrentElement property. This method also updates the BitmapListCount property.

GetBitmapValue method: This method updates the Bitmap property with the image associated with the Pixel Data Element specified by the CurrentElement property.

GetCharValue method: This method updates the CharValues property with the character value(s) associated with the item specified in the CurrentElement property. This method also updates the CharValueCount property to lCount, where lCount is the number of characters to get.

GetDateTimeValue method: This method updates the DateTimeValues property with the date-time value(s) associated with the item specified in the CurrentElement property. This method also updates the DateTimeValueCount property to lCount, where lCount is the number of date-time values to get.

GetDateValue method: This method updates the DateValues property with the date value(s) associated with the item specified in the CurrentElement property. This method also updates the DateValueCount property to lCount, where lCount is the number of date values to get.

GetDoubleValue method: This method updates the DoubleValues property with the double value(s) associated with the item specified in the CurrentElement property. This method also updates the DoubleValueCount property to lCount, where lCount is the number of double values to get.

GetFloatValue method: This method updates the FloatValues property with the float value(s) associated with the item specified in the CurrentElement property. This method also updates the FloatValueCount property to lCount, where lCount is the number of float values to get.

GetLongValue method: This method updates the LongValues property with the long value(s) associated with the item specified in the CurrentElement property. This method also updates the LongValueCount property to lCount, where lCount is the number of long values to get.

GetShortValue method: This method updates the ShortValues property with the short value(s) associated with the item specified in the CurrentElement property. This method also updates the ShortValueCount property to lCount, where lCount is the number of short values to get.

GetStringValue method: This method updates the StringValues property with the string value(s) associated with the item specified in the CurrentElement property. This method also updates the StringValueCount property to lCount, where lCount is the number of strings to get.

GetTimeValue method: This method updates the TimeValues property with the time value(s) associated with the item specified in the CurrentElement property. This method also updates the TimeValueCount property to lCount, where lCount is the number of time values to get.

GetValueCount method: This method returns the number of values stored in the Value Field of the element specified in the CurrentElement property.

To set values stored in the Value Field of the Data Element use the following:

SetAgeValue method

SetBinaryValue method

SetBitmapListValue method

SetBitmapValue method

SetCharValue method

SetDateTimeValue method

SetDateValue method

SetDoubleValue method

SetFloatValue method

SetLongValue method

SetShortValue method

SetStringValue method

SetTimeValue method

Please note that the SetBinaryValue method sets the values in either the BinaryValues property or the BinaryValues2 property. It is strongly recommended that you not use the BinaryValues2 property and the BinaryValues property in the same section of code. However, if they are used in the same section of code, the order in which these properties are used is important. The last property set will control the values used when you call the SetBinaryValue method.

To convert values to or from strings, use the GetConvertValue and SetConvertValue methods.

When a method that gets a bitmap from a data set is called, such as GetBitmapValue or GetBitmapListValue, LEADTOOLS, will pre-process the data in the bitmap for optimum display and image processing, based on the value of the KeepPixelDataIntact property. If this property is set to TRUE, then LEADTOOLS will not pre-process the image data. However, setting the KeepPixelDataIntact property to TRUE may result in unexpected behavior when a LEADTOOLS display or image processing method is called for the bitmap.

LEADTOOLS provides several methods for retrieving information about the Data Set or the DICOM file. The ConformanceTestDS method and ConformanceStatus event determine whether the Data Set conforms to the standard. Use the EnableConformanceStatus property to specify whether LEADTOOLS should generate the ConformanceStatus Event for each element that does not conform, setting it to False to terminate the Conformance Test. To determine the number of images in a specified Data Element or in the entire Data Set use the GetBitmapCount method. To determine the number of modules present in the entire Data Set use the GetModuleCount method. You can determine which level a specific element is on by calling the GetElementLevel method. To get information about the current Data Set, use the GetInfoDS method, which updates the InfoClass and InfoFlags properties for the current Data Set.

LEADTOOLS also provides a method for retrieving information about the image. The GetImageInformation method gets information about the image at the specified index within the Pixel Data Element specified by the CurrentElement property, updating the ImageInfo property.

Transferring data between a server and a client requires that both entities use the same transfer syntax. The transfer syntax for a data set can be changed using the ChangeTransferSyntax method.

Finally, for getting and setting the contents of the Preamble, LEADTOOLS provides theGetDSPreamble method and the SetDSPreamble method.

Whenever you access an item within the Data Set, the CurrentElement property is updated with the selected item. You can also explicitly set the CurrentElement property using the SetCurrentElement method. If you access a module within the Data Set, the CurrentModule property is updated with the selected module.

For detecting and controlling events, LEADTOOLS provides the following: EnableMethodErrors property, EnableProgressEvent property, ProgressStatus event.

For more information on the DICOM File Fomat, refer to An Overview of the DICOM File Format and the DICOM Standard.


Working with Information Object Definitions

An Information Object Definition (IOD) is an abstract data model that specifies information about Real-World objects. It provides a means of standardizing information exchanged between applications. There are a tremendous number of IODs that are standard for the DICOM file format. In addition to the standard IODs, user-defined IODs may also be added.

LEADTOOLS maintains a tree internally of all available Information Object Definitions (IODs), standard and user defined. In this documentation the tree of available IODs will be referred to as the IOD Structure, since some functions allow you to evaluate the internal IOD Structure as a tree or as a list. Unfortunately, the collection of default IODs is too large to include a table of default values in this documentation. For more information on IOD defaults, refer to the DICOM Standard.

LEADTOOLS provides a number of methods for maneuvering through and modifying the IOD Structure. All methods pertaining to the IOD Structure have the form xxxIOD method or xxxIODxxx method.

For maneuvering through the IOD Structure, LEADTOOLS provides the following methods:

MoveRootIOD method

MoveParentIOD method

MoveChildIOD method

MoveFirstIOD method

MoveLastIOD method

MovePrevIOD method

MoveNextIOD method

LEADTOOLS provides several methods for searching the IOD Structure. To find the IOD for a specific class or module, use the FindClassIOD method and the FindModuleIOD method. You can find the IOD for elements, modules or classes using the FindIOD method.

To insert new items in the IOD Structure, call the InsertIOD method.

You can delete individual items from the IOD Structure using the DeleteIOD method, or you can delete all items from the IOD Structure, using the ResetIOD method.

To change the name or the description of an IOD already in the IOD Structure, call the SetIODName method and the SetIODDescription method.

Finally, to reset the IOD Structure to the default values, use the DefaultIOD method.

Whenever you access an item within the IOD Structure, the CurrentIOD property is updated with the selected item. You can also explicitly set the CurrentIOD property to a particular item using the SetCurrentIOD method.

For more information on IODs, refer to An Overview of the DICOM File Format or the DICOM Standard.


Working with Tags

The tag of a data element consists of an ordered pair of 16-bit values that represent a Group number and an Element number. The tag indicates the type of information stored in the value field of the data element. There are a number of tags that are standard for the DICOM file format. In addition to the standard tags, user-defined tags may also be added.

LEADTOOLS maintains a table (or list) internally of all available tags, standard and user defined. In this documentation the table of available value representations will be referred to as the Data Element Tag Table. Also provided in this documentation is a table of the default values for the standard tags. To see these default values, refer to the Default Data Element Tag Table.

LEADTOOLS provides a number of methods for maneuvering through and modifying the Data Element Tag Table. All methods pertaining to the Data Element Tag Table have the form xxxTag method or xxxTagxxx method..

For maneuvering through the Data Element Tag Table, LEADTOOLS provides the following methods:

MoveFirstTag method

MoveLastTag method

MovePrevTag method

MoveNextTag method

GetTagCount method

To find specific items, based on either the tag or an index into the table, use the FindTag method and the FindIndexTag method.

To insert new items in the Data Element Tag Table, use the InsertTag method.

You can delete individual items from the table using the DeleteTag method, or you can delete all items from the table, using the ResetTag method.

To change the name of an item already in the table, use the SetTagName method.

Finally, to reset the Data Element Tag Table to the default values, use the DefaultTag method.

Whenever you access an item within the Data Element Tag Table, the CurrentTag property is updated with the selected item.

For more information on tags, refer to An Overview of the DICOM File Format or the DICOM Standard.


Working with Unique Identifiers (UIDs)

A unique identifier identifies items such as Service-Object Pair Classes and images. There are a number of unique identifiers that are standard for the DICOM file format. In addition to the standard unique identifiers, user-defined unique identifiers may also be added. Please note that while user-defined unique identifiers will work within LEADTOOLS, in order for new unique identifiers to work across countries, sites, equipment, etc., you must contact the National Electrical Manufacturers Association.

LEADTOOLS maintains a table (or list) internally of all available unique identifiers, standard and user defined. In this documentation the table of available unique identifiers will be referred to as the UID Table. Also provided in this documentation is a table of the default values for the standard UIDs. To see these default values, refer to the Default UID Table.

LEADTOOLS provides a number of methods for maneuvering through and modifying the UID Table. All methods pertaining to the UID Table have the form xxxUID method or xxxUIDxxx method.

For maneuvering through the UID Table, LEADTOOLS provides the following methods:

MoveFirstUID method

MoveLastUID method

MovePrevUID method

MoveNextUID method

GetUIDCount method

To find specific items, based on either the unique identifier or an index into the table, use the FindUID method and the FindIndexUID method.

To insert new items in the UID Table, use the InsertUID method.

You can delete individual items from the table using the DeleteUID method, or you can delete all items from the table, using the ResetUID method.

To change the name of an item already in the table, use the SetUIDName method.

Finally, to reset the UID Table to the default values, use the DefaultUID method.

Whenever you access an item within the UID Table, the CurrentUID property is updated with the selected item.

For more information on UIDs, refer to An Overview of the DICOM File Format or the DICOM Standard.


Working with Value Representations

The value representation of a data element indicates the type of data that can be stored in the value field of the data element. There are a number of value representations that are standard for the DICOM file format. In addition to the standard value representations, user-defined value representations may also be added.

LEADTOOLS maintains a table (or list) internally of all available value representations, standard and user defined. In this documentation the table of available value representations will be referred to as the Value Representation Table. Also provided in this documentation is a table of the default values for the standard value representations. To see these default values, refer to the Default Value Representation Table.

LEADTOOLS provides a number of methods for maneuvering through and modifying the Value Representation Table. All methods pertaining to the Value Representation Table have the form xxxVR method or xxxVRxxx method.

For maneuvering through the Value Representation Table, LEADTOOLS provides the following methods:

MoveFirstVR method

MoveLastVR method

MovePrevVR method

MoveNextVR method

GetVRCount method

To find specific items, based on either the value representation or an index into the table, use the FindVR method and the FindIndexVR method.

To insert new items in the Value Representation Table, use the InsertVR method.

You can delete individual items from the table using the DeleteVR method, or you can delete all items from the table, using the ResetVR method.

To change the name of an item already in the table, use the SetVRName method.

Finally, to reset the Value Representation Table to the default values, use the DefaultVR method.

Whenever you access an item within the Value Representation Table, the CurrentVR property is updated with the selected item.

For more information on value representations, refer to An Overview of the DICOM File Format or the DICOM Standard.


Working with Key Elements

DICOM Dir data sets may contain special data element called key elements. A Key element is a data element that also contains special information about other key elements in the data set and their relative location within the data set.

Key elements all have the TAG_ITEM tag and they must be one of the following types:

"PATIENT" | Patient key element
"STUDY" | Study key element
"SERIES" | Series key element
"IMAGE" | Image key element
"OVERLAY" | Overlay key element
"MODALITY LUT" | Modality-LUT key element
"VOI LUT" | VOI-LUT key element
"CURVE" | Curve key element
"TOPIC" | Topic key element
"VISIT" | Visit key element
"RESULTS" | Results key element
"INTERPRETATION" | Interpretation key element
"STUDY COMPONENT" | Study Component key element
"PRINT QUEUE" | Print Queue key element
"FILM SESSION" | Film session key element
"FILM BOX" | Film box key element
"IMAGE BOX" | Image box key element
"PRIVATE" | Private key element

LEADTOOLS maintains the DICOM Dir data set as a tree, however, all key elements are stored at the same level of the tree. The specialized information included in a key element maintains information on key element children, non-key element children, parent key elements, and the logical relationships between the elements.

LEADTOOLS provides special functions for searching the DICOM Dir data set, maneuvering through the data set, inserting and deleting key elements, and manipulating key elements. To work with key elements, you should create a Data Set as type CLASS_BASIC_DIRECTORY.

For maneuvering through the DICOM Dir data set, use the following:

MoveRootKey method

MoveParentKey method

MoveChildKey method

MoveFirstKey method

MoveLastKey method

MovePrevKey method

MoveNextKey method

LEADTOOLS provides the following functions for searching the Data Set.

FindFirstKey method

FindLastKey method

FindPrevKey method

FindNextKey method

To insert new key elements, use:

InsertKey method

To delete key elements, use:

DeleteKey method

To determine the type of a specific key element, use

GetKeyValue method

These methods work the same way as the corresponding XXXElement methods. Please note however, that it is most important that you use the DeleteKey method when deleting a key element. Trying to delete a key element using the DeleteElement method will remove the specified key element and any information about any related key elements, but it will not remove the child key elements.


Overlays Overview

An "Overlay Plane" describes graphics or bit-mapped text that is associated with an image or has its own existence within a series. It may also describe a ROI in an Image. Each "Overlay Plane" is one bit deep (1BPP). Sixteen separate planes may be associated with an image or exist as "Standalone Overlays" in a series. Overlay pixel data is stored either in "Overlay Data" (60xx,3000) or embedded in the "Image Pixel Data" (7FE0,0010).

LEADTOOLS provides functionality to manipulate overlays in DICOM. The OverlayCount property specifies the number of overlays in the DICOM Data Set. The attributes of an overlay can be obtained using the following methods/properties:

GetOverlayAttributes method: This method updates the properties of the OverlayAttributes property with the values of the attributes of the specified overlay. Most of the properties specified by the OverlayAttributes property are based on the Attributes of the Overlay Plane Module in the DICOM Standard.

IsOverlayInDataSet method: This method specifies whether the overlay data of the specified overlay exists inside this Data Set.

OverlayActivationLayer property: This property specifies the "Overlay Activation Layer" (60xx,1001) of the specified overlay.

OverlayAttributes property: This property specifies the attributes of an overlay.

OverlayGroupNumber property: This property specifies the group number of the specified overlay.

Use the GetOverlayBitmap method to retrieve the "Overlay Data" (60xx,3000) for a single-frame overlay or the GetOverlayBitmapList method for a multi-frame one. The GetOverlayBitmap method updates the OverlayBitmap property (ILEADDicomDS Interface) with the bitmap of an overlay, while the GetOverlayBitmapList method updates the OverlayBitmapList property (ILEADDicomDS Interface) with the frames of an overlay.

LEADTOOLS also allows you to insert a new or update an existing overlay. Use the SetOverlayAttributes method to set the attributes of a certain overlay and then use the SetOverlayBitmap method or the SetOverlayBitmapList method to set its data.

Call the DeleteOverlay method to delete all the elements related to an overlay.


Implementing JPEG 2000 Plug in Features

JPEG 2000 is a wavelet-based compression stored in a hierarchical format, which contains several stored resolutions of the image in the same bit-stream without duplication. For that reason, a JPEG 2000 compressed image can then be sent to a device in the resolution that best fits, without additional storage overhead.

The LEADTOOLS JPEG 2000 Plug in provides support for encoding and decoding a JPEG 2000 bit-stream. The JPEG 2000 compression provides greater flexibility and better image quality, especially at higher compression ratios, than standard JPEG. The greater flexibility includes the ability to control:

whether or not to transform RGB images to YUV prior to compression

the type of quantization to use when determining the quantization step size

the amount of compression

the size and location of tiles

the number of resolution levels in the bit-stream

the progression order

the code block height and width

whether to use markers to help detect corruption during transmission

etc.

LEADTOOLS provides several options for controlling the JPEG 2000 features listed above. You can access these options through the J2KOptions object (property), which has the following properties (attributes):

J2KCBS_ErrorResilienceSymbol property

J2KCBS_PredictableTermination property

J2KCBS_ResetContextOnBoundaries property

J2KCBS_SelectiveACBypass property

J2KCBS_TerminationOnEachPass property

J2KCBS_VerticallyCausalContext property

J2KCodBlockHeight property

J2KCodBlockWidth property

J2KCompressionControl property

J2KCompressionRatio property

J2KDecompLevel property

J2KDerivedBaseExponent property

J2KDerivedBaseMantissa property

J2KDerivedQuantization property

J2KGuardBits property

J2KProgressOrder property

J2KROIControl property

J2KROIHeight property

J2KROILeft property

J2KROITop property

J2KROIWidth property

J2KSetDefaults method

J2KTargetFileSize property

J2KUseColorTransform property

J2KUseEPHMarker property

J2KUseROI property

J2KUseSOPMarker property

J2KXOsiz property

J2KXTOsiz property

J2KXTsiz property

J2KYOsiz property

J2KYTOsiz property

J2KYTsiz property

To update the properties listed above with the default JPEG 2000 compression options, call the J2KSetDefaults method. To change the JPEG 2000 features, set the properties themselves.

A region of interest can now be used for a J2K-compressed image. The J2KUseROI property indicates whether or not to use a region of interest. If this is TRUE, then the region of interest is defined based on the J2KROIControl property. If the J2KUseROI property is TRUE and the J2KROIControl property is set to J2K_USELEAD_REGION, then the region of interest is designated by the LEAD bitmap region. If the J2KUseROI property is TRUE and the J2KROIControl property is set to J2K_USEOPTION_RECT, then the region of interest is designated by the rectangle defined by the J2KROILeft, J2KROITop, J2KROIHeight, and J2KROIWidth properties.

This support is available only in the LEADTOOLS JPEG 2000 Plug in, and must be unlocked. For more information on unlocking this support, refer to JPEG 2000 Plug In Support Instructions .


Working with DICOM Waveforms

The DICOM standard supports waveform storage and communication: this includes hemodynamic curve data, cardiac electrophysiology, electrocardiography (ECG) and audio signals (WAV files). A waveform consists of one or more multiplex groups, each encoded into an Item in the Waveform Sequence (5400,0100). All channels within a multiplex group are synchronously digitized at a common sampling frequency. The waveform samples can be 8 or 16 bit, with data representation as signed , unsigned , mu-law or A-law. DICOM also supports waveform annotations, which are typically generated as part of the data acquisition process, such as waveform maxima and minima, or the labeling of particular stimuli.

LEADTOOLS waveform support is comprehensive and handles the various features supported by the standard. The DicomWaveformGroup COM class encapsulates the attributes of a multiplex group (the building block for waveforms in DICOM), while the DicomWaveformChannel COM class provides functionality to create and manipulate waveform channels. On the dataset level, the toolkit provides four simple, yet powerful methods for using waveforms:

The AddWaveformGroup method, which creates a new waveform group.

The DeleteWaveformGroup method, which deletes an existing waveform group.

The GetWaveformGroupCount method, which gets the number of waveform groups.

The GetWaveformGroup method, which extracts a waveform group from a dataset.

DicomWaveformGroup

The functionality provided by the DicomWaveformGroup COM class can be divided into three main categories:

Channel Manipulation

Audio Support

Management of Waveform Group Attributes

Channel Manipulation

At the heart of any waveform support is the creation and management of channels. This is provided by the Channels property, a DicomWaveformChannels object that contains a collection of DicomWaveformChannel objects. The collection of channels can be manipulated using the _NewEnum property, Add method, Item method, Remove method and the SetNumberOfSamplesPerChannel method. In addition, information about the collection can be found in the Count property.

Audio Support

LEADTOOLS waveform support includes support for audio data. To load a wave file into a waveform group, use the LoadAudio method. This method is very useful when creating DICOM objects of type "Basic Voice Audio" (1.2.840.10008.5.1.4.1.1.9.4.1), which is typically used for report dictation.

To create a wave file from the channels in a waveform group, use the SaveAudio method. This method is very useful when extracting audio (wave) data from a DICOM object of type "Basic Voice Audio" (1.2.840.10008.5.1.4.1.1.9.4.1).

Management of Waveform Group Attributes

LEADTOOLS waveform support includes comprehensive support for the management of the attributes of a waveform group.

In DICOM it is mandatory to specify the waveform's originality (that is, whether the waveform data is original (source) data, or derived data), as well as its sampling frequency. Consequently, it is important to use the WaveformOriginality property and the SamplingFrequency property to set these values in order to create a proper waveform group.

If the acquisition equipment adds padding values, DICOM makes it mandatory to set the waveform padding value. This can be done using the WaveformPaddingValue property. For more information, refer to the "Waveform Padding Value" (5400,100A) element in the DICOM Standard.

The following are other properties and methods that can be used to set and get the different attributes of a waveform group:

EnableMethodErrors property

MultiplexGroupLabel property

MultiplexGroupTimeOffset property

NumberOfSamplesPerChannel property

Reset method

SampleInterpretation property

TriggerSamplePosition property

TriggerTimeOffset property

In addition, the ValueDefined property provides information on which IDicomWaveformGroup properties contain valid data.

DicomWaveformChannel Class

The DicomWaveformChannel COM class provides functionality that can be divided into the following categories:

Setting/Getting Channel Samples

Specifying the Channel Source

Specifying the Channel Sensitivity

Adding/Managing Waveform Annotations

Setting/Getting Other Waveform Channel Attributes

Setting/Getting Channel Samples

Before setting channel data be sure to set the sample interpretation in the SampleInterpretation property. The channel data can be set using the SetChannelSamples method. The data representation for 8-bit channels can be signed, unsigned, mu-law or A-law, while the data representation for 16-bit channels can be signed or unsigned. To get the data for a channel, use the ChannelSamples property. The NumberOfSamples property contains the number of samples per channel

Specifying the Channel Source

In DICOM, it is mandatory to specify the source for a channel. For this reason it is important to use the ChannelSource property to create a proper waveform channel.

Specifying the Channel Sensitivity

In DICOM, it is mandatory to specify the channel sensitivity if the channel samples represent defined (not arbitrary) units. Since this is almost always the case, it is important to use the following properties to create a proper waveform channel:

ChannelSensitivity property

ChannelSensitivityUnits property

ChannelSensitivityCF property

ChannelBaseline property

You can use the various methods and properties that deal with the Context Group Table in order set the Channel Sensitivity Units. For more information, please refer to Working with Context Groups.

Adding/Managing Waveform Annotations

The annotations applied to a waveform channel are specified by the Annotations property, a DicomWaveformAnnotations object that contains a collection of DicomWaveformAnnotation objects. The collection of annotations can be manipulated using the _NewEnum property, Add method, Item method and the Remove method. In addition, information about the collection can be found in the Count property.

The following properties and methods can be used to set and get the different attributes of an annotation:

AnnotationGroupNumber property

CodedName property

CodedValue property

MeasurementUnits property

NumericValue property

NumericValueCount property

RefDateTime property

RefSamplePositions property

RefTimeOffsets property

TemporalPointCount property

TemporalPointsType property

TemporalRangeType property

UnformattedTextValue property

ValueType property

In addition, the ValueDefined property provides information on which IDicomWaveformAnnotation properties contain valid data.

Setting/Getting Other Waveform Channel Attributes

The following properties are other properties that can be used to set and get the different attributes of a waveform channel:

ChannelLabel property

ChannelMaximumValue property

ChannelMinimumValue property

ChannelOffset property

ChannelSampleSkew property

ChannelStatus property

ChannelTimeSkew property

FilterHighFrequency property

FilterLowFrequency property

Index property

NotchFilterBandwidth property

NotchFilterFrequency property

WaveformChannelNumber property

WaveformGroup property

Code Sequence Items

Both the IDicomWaveformChannel object and the IDicomWaveformAnnotation object use code sequence items in the form of IDicomCodeSequenceItem objects. The following properties contain information about the code sequence items:

CodeMeaning property

CodeValue property

CodingSchemeDesignator property

CodingSchemeVersion property

ContextGroupExtensionCreatorUID property

ContextGroupLocalVersion property

ContextGroupVersion property

ContextIdentifier property

IsContextGroupLocalVersion property

IsContextGroupVersion property

MappingResource property


Working with DICOM Network Connections

The DICOM Communication Protocol outlines the requirements for transferring DICOM data and messages across an associated network connection. For more information about the DICOM Communication Protocol, refer to LEADTOOLS DICOM Network Communication Support for Message Exchange, or the DICOM Standard.

In order to transfer DICOM data and messages from one Application Entity (AE) to another, a network connection must be established. Once this connection has been established, the connection must be associated (also referred to as establishing an Associate connection). When the Associate connection has been established, then DICOM data and messages can be transferred between AEs.

AEs can have the role of Service Class Provider (SCP), Service Class User (SCU), or both. An SCU makes requests for data or services, and may also receive data. An SCP listens for incoming connection requests from SCUs. Once these connections are established (and an associate connection created), the SCP processes requests and provides data or services requested by SCUs.

In this documentation the basic network connection will be referred to as a DICOM Network connection or a DICOM Network. Information concerning a DICOM Network connection will be maintained in and accessed through a DICOM Network handle.

When creating either an SCU or an SCP application, a DICOM Network connection (a handle to the connection) must be created. In addition, for every connection request accepted by an SCP, the SCP must create a DICOM Network handle, accessed through the hNet property, in which to maintain information about that specific SCU-SCP connection.

LEADTOOLS provides a number of properties, methods, and events for creating and initializing a DICOM Network and for transferring DICOM data and messages.

Before establishing a DICOM Network connection, specify the required security mode using the NetworkSecurityMode property.

Security can be further configured when working with TLS security by using the following methods, properties, and event:

UseSSLOptions property

SetClientCertificateTLS method

SetServerCertificateTLS method

SSLCreateFlags property

SSLMethodType property

SSLVerifyMode property

SSLCAFile property

SSLVerifyDepth property

SSLSuccess property

SSLOptions property

SSLPrivateKeyPassword property

SSLPrivateKeyPasswordEvent event

For creating a DICOM Network connection, use the following:

StartUp method

Connect method

Listen method

Accept method

NetAccept event

NetConnect event

NetworkTempPath property

When a DICOM Network connection is no longer needed, it should be closed. The following functions may be used in closing the DICOM Network connection:

ShutDown method

Close method

NetClose event

LEADTOOLS provides methods for sending DICOM messages. These include both low-level and high-level methods. The message sending methods can be divided into two groups.

For sending DICOM Connection messages, including messages used in establishing a DICOM Associate connection, use the following:

SendAssociateRequest method

SendAssociateAccept method

SendAssociateReject method

SendData method

SendReleaseRequest method

SendReleaseResponse method

SendAbort method

NetReceiveAssociateRequest event

NetReceiveAssociateAccept event

NetReceiveAssociateReject event

NetReceiveReleaseRequest event

NetReceiveReleaseResponse event

NetReceiveAbort event

NetSend event

For sending data messages, LEADTOOLS provides the following:

SendCStoreRequest method

SendCStoreResponse method

SendCFindRequest method

SendCFindResponse method

SendCGetRequest method

SendCGetResponse method

SendCMoveRequest method

SendCMoveResponse method

SendCCancelRequest method

SendCEchoRequest method

SendCEchoResponse method

SendNReportRequest method

SendNReportResponse method

SendNGetRequest method

SendNGetResponse method

SendNSetRequest method

SendNSetResponse method

SendNActionRequest method

SendNActionResponse method

SendNCreateRequest method

SendNCreateResponse method

SendNDeleteRequest method

SendNDeleteResponse method

NetReceiveCStoreRequest event

NetReceiveCStoreResponse event

NetReceiveCFindRequest event

NetReceiveCFindResponse event

NetReceiveCGetRequest event

NetReceiveCGetResponse event

NetReceiveCMoveRequest event

NetReceiveCMoveResponse event

NetReceiveCCancelRequest event

NetReceiveCEchoRequest event

NetReceiveCEchoResponse event

NetReceiveData event

NetReceiveNReportRequest event

NetReceiveNReportResponse event

NetReceiveNGetrequest event

NetReceiveNGetResponse event

NetReceiveNSetRequest event

NetReceiveNSetResponse event

NetReceiveNActionRequest event

NetReceiveNActionResponse event

NetReceiveNCreateRequest event

NetReceiveNCreateResponse event

NetReceiveNDeleteRequest event

NetReceiveNDeleteResponse event

NetReceiveUnknown event

RequestAttributeCount property

RequestAttributes property

For detecting and controlling events, LEADTOOLS provides the following: EnableMethodErrors property, EnableProgressEvent property, ProgressStatus event.

Finally, you can retrieve information about a DICOM Network connection using the following:

IsActivated method

IsAssociated method

IsConnected method

GetSendQueueSize method

GetServer method

GetClient method

GetClientCount method

GetHostAddress method

GetHostPort method

GetPeerAddress method

GetPeerPort method

GetAssociate method

For more information about the DICOM Associate connection, refer to Working with DICOM Associate Connections.


Working with DICOM Associate Connections

Once a DICOM Network has been established, the Network connection must be associated. This is also referred to as establishing a DICOM Associate connection. The DICOM Associate connection serves to establish how the two AEs will communicate and the nature of the data that will be transferred. For example, the DICOM Associate connection can establish the following

The organization of the data – Little Endian vs Big Endian, Implicit VR vs Explicit VR.

Compression type.

The type of data that will be transferred – CT Image Storage Class, Printer Class, or Patient Study Query Find Class

The role of a connection member – SCU, SCP, or both.

Maximum size of the data "chunk" to be sent, if a maximum exists.

Whether or not asynchronous operations are allowed.

The presence of some user-defined information.

An SCU requests the creation of an Associate connection with an SCP with which it has established a DICOM Network connection (not yet associated). The SCU sends the SCP an Associate Request message outlining the data it wishes to transfer, and the how the transfer can occur. The SCP can accept or reject the Associate connection request, based on whether or not the SCP supports the data and communication characteristics outlined by the SCU. If the connection is accepted, the DICOM Associate connection is established and the two AEs can begin transferring messages and data.

In this documentation a DICOM connection which has been associated will be referred to as a DICOM Associate connection or a DICOM Associate. Information concerning the nature of the DICOM Associate Network will be maintained in and accessed through a DICOM Associate handle.

LEADTOOLS provides a number of functions for creating a DICOM Associate connection, modifying a DICOM Associate handle and retrieving information about a DICOM Associate connection.

Creating a DICOM Associate connection consists of creating the DICOM Associate handle, accessed through the hPDU property, that outlines the characteristics of the transfer and sending messages to request, accept or reject a DICOM Associate connection.

To create a DICOM Associate handle, use the following functions:

CreateAssociate method

DefaultAssociate method

LEADTOOLS provides the following functions for sending messages to establish a DICOM Associate connection:

SendAssociateRequest method

SendAssociateAccept method

SendAssociateReject method

SendData method

NetReceiveAssociateRequest event

NetReceiveAssociateAccept event

NetReceiveAssociateReject event

NetSend event

To close a DICOM Associate connection, use the following message sending functions:

SendReleaseRequest method

SendReleaseResponse method

SendAbort method

NetReceiveReleaseRequest event

NetReceiveReleaseResponse event

NetReceiveAbort event

When modifying a DICOM Associate handle, use the following functions:

ResetAssociate method

SetRequest method

SetVersion method

SetCalled method

SetCalling method

SetApplication method

SetPresentationID method

SetPresentationAbstract method

SetPresentationResult method

AddPresentation method

DeletePresentation method

SetTransferSyntax method

AddTransferSyntax method

DeleteTransferSyntax method

SetMaxLength method

SetImplementClass method

SetAsyncOperations method

SetRoleSelect method

SetImplementVersion method

SetUserInfo method

AddUserInfo method

DeleteUserInfo method

SetExtendedData method

To retrieve information about a DICOM Associate handle, use the following:

IsRequest method

GetVersion method

GetCalled method

GetCalling method

GetApplication method

GetPresentationCount method

GetPresentationID method

GetPresentationAbstract method

GetPresentationResult method

FindPresentationAbstract method

GetTransferCount method

GetTransferSyntax method

IsMaxLengthEnabled method

GetMaxLength method

IsImplementClass method

GetImplementClass method

IsAsyncOperations method

GetInvokedOperationsCount method

GetPerformedOperationsCount method

GetUserRole method

GetProviderRole method

IsRoleSelect method

IsImplementVersion method

GetImplementVersion method

GetUserInfoCount method

GetUserInfoType method

GetUserInfoLength method

GetUserInfoData method

GetExtendedDataLength method

GetExtendedData method

To destroy the DICOM Associate handle and free the associated memory, use the FreeAssociate method.


Working with Command Sets

DICOM messages that are transferred across a DICOM Associate connection include a command set and may or may not include a data set. The command set is a specialized data set that contains information about the action to be taken, such as Request, Response, Find, Get, Move, Action, etc. Since the command set is a data set, it consists of one or more data elements. An accompanying data set contains either the data set on which to perform the command, or the data set resulting from a command.

Each command set has its own specific set of data elements. For more information on the data elements that make up the command sets supported by LEADTOOLS, refer to Command Set Default Tables. For more information on command sets in general, refer to the DICOM Standard.

Since a command set is a specialized data set, it is created by calling InitCS method to create the data set and initialize it to a command set.

To obtain information about an existing command set, use the GetInfoCS method, which updates the InfoCommand property. To determine whether the command set is a request or a response, check the InfoRequest property after calling the GetInfoCS method.

You can also determine the type of a command set by "and-ing" the value of the TAG_COMMAND_FIELD value with COMMAND_REQUEST or COMMAND_RESPONSE. In addition, you can determine whether a command set has a required data set by "and-ing" the value of the TAG_DATA_SET_TYPE element with COMMAND_DATASET_PRESENT, COMMAND_DATASET_IDENTIFIER, or COMMAND_DATASET_ABSENT.

To insert one data set into another data set, use InsertDS method.

To assign a Command Set to a control, use the SetCommandSet method.

To save a Data Set directly to a file on disk, use the SaveExtDS method.


Creating a DICOM Network Connection

When establishing a connection between two AEs, for the purpose of transferring DICOM data and messages, the first step is to create a DICOM Network connection.

The AE acting as an SCP must have a DICOM Network handle and the AE acting as an SCU must have a DICOM Network handle. In addition, every time an SCP accepts a new connection request from an SCU, the SCP creates another DICOM Network handle for the newly connected SCU. This provides the SCP with memory for maintaining information about the SCU and that particular connection. Steps for establishing a DICOM Network connection are given below for both the SCU and the SCP.

Creating a network handle for an SCU

Create the DICOM Network handle by calling the StartUp method. This must be done before any DICOM Network Operations methods are called.

To connect to an SCP, call the Connect method. This will generate a NetAccept event on the SCP to let the SCP know that a connection request has been received.

The SCP should respond by calling the Accept method. This will generate a NetConnect event on the SCU. At this time the DICOM Network connection has been established.

Creating a network handle for an SCP

Create the DICOM Network handle by calling the StartUp method. This must be done before any DICOM Network Operations methods are called.

To listen for incoming connection requests, call the Listen method.

When an SCU wishes to connect to an SCP, the SCU calls Connect method. This generates a NetAccept event on the SCP to let the SCP know that a connection request has been received.

The SCP should respond by calling the StartUp method, and the Accept method. Calling StartUp method creates a network handle for this specific connection and allows the SCP to maintain information about this connection. Calling the Accept method will generate a NetConnect event on the SCU. At this time the DICOM Network connection has been established. (An SCP should always accept a connection request. Once the connection is made the SCP can check the SCU and close the connection if it does not wish to maintain it. Since the connection requests are queued, if the connection is not accepted, it remains in the queue. When the next request is received, it is placed in the queue behind the first request. Calling the Accept method at this point will connect the first request, not the second, since the first request is still in the queue.)

For more information on creating SCUs and SCPs, refer to Creating an SCU or Creating an SCP.

Once the DICOM Network Connection has been made, you must create a DICOM Associate Connection before DICOM messages and data can be transferred between the AEs. For more information in creating a DICOM Associate connection, refer to Creating a DICOM Associate Connection.


Creating a DICOM Associate Connection

Once a DICOM Network Connection has been established, a DICOM Associate Connection must be established before DICOM messages and data can be transferred between two AEs.

The AE acting as an SCP must have a DICOM Associate handle and the AE acting as an SCU must have a DICOM Associate handle. Steps for establishing a DICOM Associate connection are given below for both the SCU and the SCP.

Creating an associate handle for an SCU

Create the DICOM Associate handle by calling the CreateAssociate.

Initialize the newly created DICOM Associate handle by calling DefaultAssociate, or set the new DICOM Associate handle using the following functions:

SetRequest method

SetVersion method

SetCalled method

SetCalling method

SetApplication method

SetPresentationID method

SetPresentationAbstract method

SetPresentationResult method

AddPresentation method

DeletePresentation method

SetTransferSyntax method

AddTransferSyntax method

DeleteTransferSyntax method

SetMaxLength method

SetImplementClass method

SetAsyncOperations method

SetRoleSelect method

SetImplementVersion method

SetUserInfo method

AddUserInfo method

DeleteUserInfo method

SetExtendedData method

To connect to an SCP, call the SendAssociateRequest method. This will generate a NetReceiveAssociateRequest event on the SCP to let the SCP know an associate connection request has been received.

The SCP may accept or reject the request and respond by calling the SendAssociateAccept method or SendAssociateReject method. This will generate a NetReceiveAssociateAccept event or the NetReceiveAssociateReject event. If the NetReceiveAssociateAccept event is generated, the DICOM Associate Connection has been established.

Creating an associate handle for an SCP

When an SCU requests a DICOM Associate connection, the SCU calls the SendAssociateRequest method. This generates a NetReceiveAssociateRequest event on the SCP.

When the NetReceiveAssociateRequest event is called, create the DICOM Associate handle by calling the CreateAssociate method.

Reset the newly created DICOM Associate handle to an Associate Accept by calling the ResetAssociate method, or set the new DICOM Associate handle using the methods given above.

The DICOM Associate connection request can be accepted or rejected. To accept the Associate connection request, call the SendAssociateAccept method. This will generate a NetReceiveAssociateAccept event on the SCU. At this time the DICOM Associate connection has been established. To reject the Associate connection request, call SendAssociateReject method. This will generate a NetReceiveAssociateReject event on the SCU.


Creating an SCU

The following steps provide the basic information required to create an SCU:

Create the DICOM Network handle by calling StartUp method. . This must be done before any DICOM Network Operations functions are called.

To connect to an SCP, call the Connect method. This will generate a NetAccept event on the SCP to let the SCP know that a connection request has been received.

The SCP should respond by calling the Accept method. This will generate a NetConnect event on the SCU. At this time the DICOM Network connection has been established.

Create the DICOM Associate handle by calling the CreateAssociate.

Initialize the newly created DICOM Associate handle by calling DefaultAssociate, or set the new DICOM Associate handle using the following methods:

SetRequest method

SetVersion method

SetCalled method

SetCalling method

SetApplication method

SetPresentationID method

SetPresentationAbstract method

SetPresentationResult method

AddPresentation method

DeletePresentation method

SetTransferSyntax method

AddTransferSyntax method

DeleteTransferSyntax method

SetMaxLength method

SetImplementClass method

SetAsyncOperations method

SetRoleSelect method

SetImplementVersion method

SetUserInfo method

AddUserInfo method

DeleteUserInfo method

SetExtendedData method

To connect to an SCP, call the SendAssociateRequest method. This will generate a NetReceiveAssociateRequest event on the SCP to let the SCP know an associate connection request has been received.

The SCP may accept or reject the request and respond by calling SendAssociateAccept method or SendAssociateReject method. This will generate a NetReceiveAssociateAccept event or the NetReceiveAssociateReject event. If the NetReceiveAssociateAccept event is generated, the DICOM Associate Connection has been established.


Creating an SCP

The following steps provide the basic information required to create an SCP:

Create the DICOM Network handle by calling the StartUp method. This must be done before any DICOM Network Operations methods are called.

To listen for incoming connection requests, call the Listen method.

When an SCU wishes to connect to an SCP, the SCU calls Connect method. This generates a NetAccept event on the SCP to let the SCP know that a connection request has been received.

The SCP should respond by calling the StartUp method, and the Accept method. Calling StartUp method creates a network handle for this specific connection and allows the SCP to maintain information about this connection. Calling the Accept method will generate a NetConnect event on the SCU. At this time the DICOM Network connection has been established. (An SCP should always accept a connection request. Once the connection is made the SCP can check the SCU and close the connection if it does not wish to maintain it. Since the connection requests are queued, if the connection is not accepted, it remains in the queue. When the next request is received, it is placed in the queue behind the first request. Calling the Accept method at this point will connect the first request, not the second, since the first request is still in the queue.)

When an SCU requests a DICOM Associate connection, the SCU calls the SendAssociateRequest method. This generates a NetReceiveAssociateRequest event on the SCP.

When the NetReceiveAssociateRequest event is called, create the DICOM Associate handle by calling the CreateAssociate method.

Reset the newly created DICOM Associate handle to an Associate Accept by calling the ResetAssociate method, or set the new DICOM Associate handle using the following methods

SetRequest method

SetVersion method

SetCalled method

SetCalling method

SetApplication method

SetPresentationID method

SetPresentationAbstract method

SetPresentationResult method

AddPresentation method

DeletePresentation method

SetTransferSyntax method

AddTransferSyntax method

DeleteTransferSyntax method

SetMaxLength method

SetImplementClass method

SetAsyncOperations method

SetRoleSelect method

SetImplementVersion method

SetUserInfo method

AddUserInfo method

DeleteUserInfo method

SetExtendedData method

The DICOM Associate connection request can be accepted or rejected. To accept the Associate connection request, call the SendAssociateAccept method. This will generate a NetReceiveAssociateAccept event on the SCU. At this time the DICOM Associate connection has been established. To reject the Associate connection request, call SendAssociateReject method. This will generate a NetReceiveAssociateReject event on the SCU.


Sending Messages

LEADTOOLS provides many high-level methods for sending messages. These include the following:

SendAssociateRequest method | SendAssociateAccept method
SendAssociateReject method | SendReleaseRequest method
SendReleaseResponse method | SendAbort method
SendCStoreRequest method | SendCStoreResponse method
SendCFindRequest method | SendCFindResponse method
SendCGetRequest method | SendCGetResponse method
SendCMoveRequest method | SendCMoveResponse method
SendCCancelRequest method | SendCEchoRequest method
SendCEchoResponse method | SendNReportRequest method
SendNReportResponse method | SendNGetRequest method
SendNGetResponse method | SendNSetRequest method
SendNSetResponse method | SendNActionRequest method
SendNActionResponse method | SendNCreateRequest method
SendNCreateResponse method | SendNDeleteRequest method
SendNDeleteResponse method |

These methods let you easily combine command set information and data set information for a standard set of messages.

If you wish to handle the message sending process in your application, or if you want to create your own messages, LEADTOOLS also provides the low-level method SendData method that allows you to do this. When calling this method, use the hDicomDS property as the handle to the DICOM data set, setting it to 0 if the command set does not require an associated Data Set.


Receiving Messages

LEADTOOLS provides high-level and low-level events for receiving messages and handling the associated data. The high-level events take the received message and data and parse the required information, making it readily available to you. The low-level events let you receive the raw data and process that data as you wish.

There are two low-level events provided by LEADTOOLS, NetReceive event and NetReceiveData event. A call to the NetReceive event is generated prior to the generation of all the NetReceiveXXX events provided. The NetReceiveData event is generated prior to the NetReceiveCxxx and NetReceiveNxxx events.

For example, when an SCU calls the SendCStoreRequest method, the NetReceive, NetReceiveData, and NetReceiveCStoreRequest events are all generated on the SCP. The NetReceiveCStoreRequest event parses the received data into readily useable form. The NetReceive event and NetReceiveData event provide the message and data in raw form so you can process the information yourself.

When an SCU calls the SendReleaseRequest method, only the NetReceive and NetReceiveReleaseRequest events are generated (The NetReceiveData event is not generated.) since there is no data being sent.


Moving Composite Data

Moving data from one AE to another AE may require several sub-operations to take place in order to accomplish the task. The following is an example showing the types of sub-operations that may be required in a simple C-MOVE-REQ.

In the following example, four AEs will be involved as follows:

AE | Role | Action
A | SCU | Sends the C-MOVE-REQ message.
B | SCP/SCU | Receives the C-MOVE-REQ message and controls the move.
C | SCP | Currently stores the data to be moved.
D | SCP | Will store the moved data at the completion of the move.

This process will be broken down into six steps, as shown in the diagram above. These steps are given in the table below. Please note that the use of hNet, nPriority, nStatus, hDS, etc. throughout the steps below does not imply equivalence. The point of this table is to show possible sub-operations that may be called, and how the message IDs are used to track responses

Step | Method call: | Explanation
1 | SendCMoveRequest(hNet, nPresentationID, 1, pszClass, nPriority, "D", hDS) | A sends this call to B. The third parameter is the message number for this AE's messages. This is the first message sent by A. It wants to move the data set indicated in hDS to D, as indicated in the sixth parameter..
2 | SendCGetRequest(hNet, nPresentationID, 1, pszClass, nPriority, hDS) | B sends this call to C. B must retrieve the data indicated in hDS, in order to store it on D. The third parameter indicates that this is the first message sent by B. When C responds with SendCGetResponse, it will refer to this message ID. That way B knows which message(command) has been completed.
3 | SendCGetResponse(hNet, nPresentationID, 1, pszClass, nStatus, nRemaining, nCompleted, nFailed, nWarning, hDS) | C sends this call to B. This sends the requested data to B in hDS. The third parameter indicates that this is a response to the first message sent by B. This way B knows the response to SendCGetRequest (step 2) has been received.
4 | SendCStoreRequest(hNet, nPresentationID, 2, pszClass, pszInstance, nPriority, "A", 1, hDS) | B sends this call to D. B must determine whether D is capable of storing the data. The third parameter indicates that this is the second message sent by B. The seventh parameter indicates that A placed the original C-MOVE-REQ. The eighth parameter indicates that the original message sent by A, requesting the move, was message number 1. The data set to be stored is in hDS.
5 | SendCStoreResponse(hNet, nPresentationID, 2, pszClass, pszInstance, nStatus) | D sends this call to B. The third parameter indicates that this is in response to the second message sent by B.
6 | SendCMoveResponse(hNet, nPresentationID, 1, pszClass, nStatus, nRemaining, nCompleted, nFailed, nWarning, hDS) | B sends this call to A. The third parameter indicates that this is in response to the first message sent by A. At this point the move has been completed, and the data is now stored on D.


Diagram of an SCU-SCP Set-Up

The diagram given below shows a simple example of an SCU-SCP connection and a series of function calls used to transfer messages and data.

SCU |  | SCP
StartUp method | Create and initialize the DICOM Network handle. | StartUp method
 | The SCP listens for incoming connection requests. | Listen method
Connect method | --------------------------------------------------> The SCU calls this method to connect to an SCP. This generates this event on the SCP | NetAccept event
NetConnect event | <-------------------------------------------------- The SCP calls StartUp for each connection it accepts. This provides the SCP memory to store information about this specific connection. The Accept method is called to accept the connection. This generates this event on the SCU. | StartUp method Accept method
 | DICOM Network Connection established |
SendAssociateRequest method | --------------------------------------------------> The SCU calls this method to request a DICOM Associate connection. This generates these events on the SCP. | NetReceive event NetReceiveAssociateRequest event
NetReceive event NetReceiveAssociateAccept event or NetReceive event NetReceiveAssociateReject event | <-------------------------------------------------- The SCP calls SendAssociateAccept to accept the DICOM Associate connection. This generates NetReceive and NetReceiveAssociateAccept events on the SCU. SendAssociateReject is sent to reject the DICOM Associate connection. This generates NetReceive and NetReceiveAssociateReject events on the SCU. | SendAssociateAccept method or SendAssociateReject method
 | DICOM Associate Connection established |
SendCStoreRequest method | --------------------------------------------------> The SCU calls this method to request the storage of data. This generates these events on the SCP. | NetReceive event NetReceiveData event NetReceiveCStoreRequest event
NetReceive event NetReceiveData event NetReceiveCStoreResponse | <-------------------------------------------------- The SCP calls this method to respond to the storage request. This generates these events on the SCU. | SendCStoreResponse method
SendReleaseRequest method or SendAbort method | --------------------------------------------------> The SCP calls SendReleaseRequest to request a release from the DICOM Associate connection. This generates the NetReceive and NetReceiveReleaseRequest events on the SCP. This is the preferred method of closing a connection. SendAbort can also be sent to close a connection. This generates the NetReceive and NetReceiveAbort events on the SCP. | NetReceive event NetReceiveReleaseRequest or NetReceive event NetReceiveAbort event
NetReceive event NetReceiveReleaseResponse | <-------------------------------------------------- The SCP calls this method to respond to the release request. This generates calls to the following events on the SCU. | SendReleaseResponse method
Close method | ---------------------------------------------------> The SCU calls this method to close the DICOM Associate connection. This generates this event on the SCP. | NetClose event


Closing a DICOM Associate Connection

When the DICOM Associate connection is no longer needed, the connection should be closed. The proper steps for closing a DICOM Associate connection are as follows:

The SCU that wishes to close the connection calls the SendReleaseRequest method. This generates a NetReceiveReleaseRequest event on the SCP.

In response to the NetReceiveReleaseRequest event, the SCP calls SendReleaseResponse method. This generates a NetReceiveReleaseResponse event on the SCU.

At this point the Close method can be called to close the connection.

Please note that while calling the SendAbort method will also close the connection (depending on the server), the method outlined above is the preferred method.


Security Profiles

A DICOM implementation can claim conformance to any of the security profiles defined by PS 3.15 of the DICOM Standard. Currently, LEADTOOLS supports the following profiles:

Secure Transport Connection Profiles.

Digital Signature Profiles. For more information refer to Working with Digital Signature.

Secure Transport Connection Profiles include the following profiles:

Basic TLS Secure Transport Connection Profile. For more information refer to Adding TLS Security to a DICOM Connection.

ISCL Secure Transport Connection Profile. For more information refer to Adding ISCL Security to a DICOM Connection.


Working with Digital Signatures

ISO 7498-2 defines a digital signature as, "Data appended to, or a cryptographic transformation of, a data unit that allows a recipient of the data unit to prove the source and integrity of that unit and protect against forgery e.g. by the recipient."

Digital Signatures capability provides a first step towards lifetime integrity checks. A digital signature serves two purposes. First, it can be used to verify the identity of the signer. Second, it can be used to ensure that the signed data has not been altered or destroyed in an unauthorized manner. These two security aspects are usually termed as authentication and data integrity, respectively.

When creating a Digital Signature, the creator of a Digital Signature identifies those Data Elements of a DICOM Data Set that are included in the calculation of the Message Authentication Code (MAC) used in the Digital Signature. The creator calculates the MAC, and then encrypts the MAC with a key or the private part of a key pair unique to the creator of the Digital Signature. Any receiver of the DICOM Data Set that knows the key or public part of the key pair can then recalculate the MAC and compare it with the MAC recorded in the Digital Signature. If any of the identified Data Elements has been altered or removed, it is extremely unlikely that the MAC calculated by the receiver and the MAC within the Digital Signature will agree. Digital Signature Profiles are specified in Annex C of PS 3.15 of the DICOM Standard.

The DICOM standard defines the Message Authentication Code (MAC) Parameters Sequence (4FFE,0001) and the Digital Signatures Sequence (FFFA,FFFA) to include Digital Signatures in a Data Set. For each Digital Signature, there should be a corresponding Digital Signatures Sequence Item, which contains the signature itself and the digital certificate of the signer, in addition to other information. The Digital Signatures Sequence Item also references a MAC Parameters Sequence Item, which specifies some parameters related to the creation of the signature, like the Data Elements signed and the hash algorithm used. For more information, refer to Table C.12-5 of PS 3.3 of the DICOM Standard.

A Digital Signature can be created in the main Data Set as well as in an Item of a Sequence of Items. The two Sequences mentioned above must be at the same level where the Digital Signature is created. Only the Data Elements at this level can be signed by the Digital Signature. For example, if one or more Data Elements of an Item are to be signed, the two Sequences should be placed under that Item on the same level as the Data Elements. Multiple Digital Signatures can be created by adding more Digital Signatures Sequence Items.

LEADTOOLS provides a number of methods for creating, verifying, and handling Digital Signatures in DICOM Data Sets. The functionality provided allows you to implement all of the DICOM Security Profiles that are specified in the DICOM Standard. For many of these methods, a particular Digital Signature is identified by updating the CurrentElement property with the corresponding Digital Signatures Sequence Item before calling the method.

Use the CreateSignature method to create a Digital Signature in the main Data Set or in an Item of a Sequence of Items. For example, the following signs the main Data Set:

objDataSet.SetCurrentElement0
objDataSet.CreateSignature "C:\PrivateKey", _
"C:\Certificate.cer", _
"password"

When creating the signature, use the SecurityProfile parameter to specify the profile with which the signature should conform. For more information about profiles, refer to Annex C, Digital Signature Profiles, of PS 3.15 of the DICOM Standard.

You can use the GetSignaturesCount method and the MoveSignature method to enumerate the Digital Signatures that exist in the main Data Set or in an Item of a Sequence of Items. The former method returns the number of Digital Signatures while the latter method updates the CurrentElement property with the Digital Signatures Sequence Item that corresponds to a particular Digital Signature. Once this property specifies that Item, the various methods can be used to verify, delete, or get information about the Digital Signature. Also, the FindSignature method can be used to search the whole Data Set for a Digital Signature by its Digital Signature UID (0400,0100).

Use the VerifySignature method to verify a particular Digital Signature, or all of the Digital Signatures in the entire Data Set at once, as shown in the following example:

objDataSet.SetCurrentElement0
nRet = objDataSet.VerifySignature()
Select Case nRet
Case DICOM_SUCCESS
' All Digital Signatures were verified

Case DICOM_ERROR_INVALID_SIGNATURE
' At least one Digital Signature is invalid
End Select

Use the DeleteSignature method to remove a particular Digital Signature from the Data Set, or all of the Digital Signatures in the entire Data Set.

Use the SaveCertificate method to save the digital certificate of the signer to a file.

The following methods can be used to get information about a particular Digital Signature:

GetSignatureUID method

GetSignatureDateTime method

GetSignedElementsCount method

MoveSignedElement method

GetMacTransferSyntax method

GetMacAlgorithm method


ISCL Protocols

There are four protocols covered by the ISCL standards. These are:

Line connection

Mutual authentication

Sending and receiving messages

Line disconnection

Line connection

The Line Connection Protocol is used to establish the maximum packet size for transferring information between a client and a server, and for determining the version of the ISCL standard to use. Generally, a client will request a connection with a server. The server can then accept or reject the connection request. The server will also then request a line connection check to determine whether the client and the server can communicate. Along with this request, the server sends information on the maximum packet size it can handle and the version of the standard it uses.

The client receives this information and generates a line connection response. Please note that the maximum packet size will be the smaller value of the client's maximum packet size and the server's maximum packet size. The client then sends a line connection response back to the server.

Once the line connection has been successfully established, the server is then ready to request mutual authentication.

Mutual authentication

The mutual authentication protocol lets both the client and the server verify that the computer to which each is connected is cleared to receive information. The server begins by issuing a GETCHALLENGE command (NetGetChallengeISCL event). This generates a random number, which in turn is used to create a challenge code.

The challenge code is then sent to the client. The client issues an INTERNAL AUTHENTICATE command (NetInternalAuthenticateISCL event), which takes the challenge code and generates a response code. This response code is then returned to the server. The client has also generated its own GETCHALLENGE command and has generated a challenge code. This is sent to the server with the response code. This allows the client to verify that it should be communicating with the server.

The server receives the response code from the client and generates an EXTERNAL AUTHENTICATE command (NetExternalAuthenticateISCL event). The original challenge code and the response code returned from the client are compared. If the response code is found to be a legitimate response code for the challenge code, the server has authenticated the client. The server also takes the challenge code received from the client and generates an INTERNAL AUTHENTICATE command. This also generates a response code from the received challenge code. This response code is then sent back to the client.

The client receives the response code from the server and generates an EXTERNAL AUTHENTICATE command. The original challenge code is compared to this response code. If the response code is found to be a legitimate response code for the challenge code, the client has authenticated the server.

At this point, the client sends the server a message that the mutual authentication has been completed.

The three events provided for handling Challenge/Authentication commands use the ISCLChallengeResponseSuccess property to indicate whether the command succeeded or failed.

Sending and receiving messages

Messages may be sent secured or unsecured. Regardless of the encryption mode or the message authentication mode, messages can still be sent unsecured.

Sending and receiving a secured message is achieved by encrypting the data and adding a message authentication code also encrypted, to the message. Upon receipt, the message is decrypted and the authentication code verified.

Line disconnection

When the connection is no longer needed, one computer/entity of a connection sends a line disconnection request to the other (peer) computer. The computer receiving the request then sends a line disconnection response.

For more information about these protocols, please refer to the "MEDIS-DC STANDARDS for Integrated Secure Communication Layer Protocols, V 1.00."


Establishing an ISCL Line Connection

In order to establish an ISCL line connection between two computers, they must establish what version of the ISCL standard they are going to use and what size communication block they will use. To set the communication block size for a server or a client, use the SetMaxCommBlockLengthISCL method. If the communication block sizes are different between the "client" and the "server", the smallest communication block size will be used when transferring data between the two machines. To determine what communication block size was agreed upon call GetCommBlockLengthISCL.


Adding ISCL Security to a DICOM Connection

Based on the ISCL standards, LEADTOOLS provides support for adding security in the following areas:

Computer or Entity Authentication

Confidentiality

Data Integrity

Computer/Entity Authentication

Before establishing a DICOM Associate connection between two computers, each computer should "authenticate" the other computer. This ensures that both computers are legitimate, and are qualified to have access to the information that may be transferred. This is accomplished through mutual authentication. A more detailed description of this process can be found in either General Integrated Secure Communication Layer (ISCL) Information, or the "MEDIC-DC STANDARDS for Integrated Secure Communication Layer Protocols V 1.00."

A specific mode can be used for the mutual authentication process. This is set using the SetMutualAuthAlgISCL method. Currently only the "Three-pass-four-way" mode is used. During the mutual authentication process, authentication data, an authentication key and an index for the authentication key is used to authenticate one entity to another. The authentication data used for this process can be set using the SetAuthDataISCL method.

In addition, during the mutual authentication process an index into an array of authentication keys is used to further authenticate an entity. The authentication keys for both the client and the server must be the same. These keys can be set in the array using the SetMutualAuthKeyISCL method.

An index is used to specify which key in the array should be used for authentication. This index is set using the SetIndexForMutualAuthISCL method. To determine the current index of the key to use for authentication, call the GetIndexForMutualAuthISCL method.

Confidentiality

Once two computers have authenticated each other, they can begin transferring messages and data between them. The confidentiality of these transfers is maintained by encrypting the data sent over the communication channel. Currently LEADTOOLS supports the ISCL standard of either using no encryption or using the DES encryption in cipher block chaining mode. The encryption mode can be set using the SetDefaultEncryptionISCL method. In addition, during the encryption/decryption process an index into an array of encryption keys is used to further guard data confidentiality. The encryption keys for both the client and the server must be the same. These keys can be set in the array using the SetEncryptKeyISCL method. An index is used to specify which key in the array should be used for encryption. This index is set using the SetIndexForEncryptISCL method. To determine the current index of the key to use for encryption, call the GetIndexForEncryptISCL method.

Data Integrity

Data integrity is maintained by adding message authentication codes to each message sent across the DICOM Network. The message authentication codes may be DESMAC or MD5. To set the type of message authentication codes to use, call the SetDefaultSigningISCL method.


Sending and Receiving Messages with ISCL

Once an ISCL connection has been established, the client and the server are ready to start transferring messages and data. The data transferred may be secured or unsecured. To send unsecured messages, the user should use the SendNonSecureISCL method. The two events NetNonSecureSendISCL and NetNonSecureReceivedISCL are triggered when non-secure mode data has been either sent or received, repectively.

The SetMaxMessageLengthISCL method sets the maximum message length that can be processed.

For information about confidentiality and data integrity associated with sending secured messages, refer to Adding ISCL Security to a DICOM Connection.

Since encryption modes, message authentication codes, authorization data and message length must all match between a sender and a receiver, occasionally, a sender will send a message that is not received properly by the receiver. When this happens, the receiver, not the sender, can get information about the problems that caused the failure. LEADTOOLS provides the following methods to help the user locate the cause of the problem:

GetPeerAuthDataISCL

GetPeerEncryptionISCL

GetPeerMACISCL

GetPeerRequestedMessageLengthISCL

In addition, when errors occur, the GetErrorSecure and GetStatusISCL can be used to help determine the location of the problem.


Closing an ISCL Connection

When an ISCL connection is no longer needed, it should be closed. There are two options for closing an ISCL using the CloseForced method. To request a disconnection, CloseForced should be called with the bForced parameter set to FALSE. When doing this, it is a good idea to make sure the ISCL queue is empty by calling IsISCLQueueEmpty. To just kill the connection completely, call the CloseForced method with the bForced parameter set to TRUE.


Adding TLS Security to a DICOM Connection

This toolkit uses SSL (Secure Socket Layer) and TLS (Transport Layer Security) to implement security. Developed by Netscape, the Secure Socket Layer (SSL) protocol is designed to ensure the security of data being communicated between two points over a network, and uses TCP as the communication layer. SSL provides a way for the client and server to authenticate each other, ensures the integrity of the data during a session, and ensures that the data remains private between the client and the server. The Transport Layer Security (TLS) protocol is based on the SSL protocol.

Use the following procedure to set up or change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

Call the SSLSuccess property to check for errors.

Based on the TLS standards, LEADTOOLS provides support for adding security in the following areas:

Computer or Entity Authentication

Confidentiality

Data Integrity

Computer/Entity Authentication

Before establishing a DICOM Associate connection between two computers, each computer should "authenticate" the other computer. This ensures that both computers are legitimate, and are qualified to have access to the information that may be transferred. This is accomplished through mutual authentication. For more information on this process, refer to the "TLS Protocol Version 1.00."

Authentication is carried out using a series of challenges and responses between the "client" and the "server". TLS has its own system of generating responses, which is handled internally, without using user provided event handlers. This authentication is based on the presence of an RSA certificate. Servers are required to have an RSA certificate, but clients may or may not have one. If both the client and the server use an RSA certificate, then by the end of the authentication process, each has authenticated the identity of the other. The RSA certificates for servers and clients can be set using the SetClientCertificateTLS and SetServerCertificateTLS methods.

If the certificate files contain encrypted private keys, an event will be fired so that the private key password can be provided. The password must be provided in the SSLPrivateKeyPassword property when processing the SSLPrivateKeyPasswordEvent event.

Once a TLS connection has been established, the NetSecureLinkReady event is fired.

Confidentiality

Once two computers have negotiated the ciphersuite, and have authenticated each other, they can begin transferring messages and data between them. For more information on the ciphersuite negotiation, refer to Negotiating a Ciphersuite. The confidentiality of these transfers is maintained by encrypting the data sent over the communication channel. Currently LEADTOOLS supports the TLS standard of using the DES or triple DES encryption mode. To determine the encryption mode used, find out the ciphersuite that was negotiated by calling GetCiphersuiteTLS. Once the ciphersuite is known, call the GetEncryptionAlgorithmTLS method.

Data Integrity

Data integrity is maintained by adding message authentication codes to each packet of each message sent across the DICOM Network. The message authentication codes may be SHA. To get the type of message authentication codes used, find out the ciphersuite that was negotiated by calling GetCiphersuiteTLS. Once the ciphersuite is known, call the GetIntegrityAlgorithmTLS method.


Negotiating a Ciphersuite

A ciphersuite is a collection of information that dictates how data and messages are transferred between clients and servers. This information includes encryption mode, mutual authentication mode, message authentication mode, etc. TLS supports several different ciphersuites, however, currently LEADTOOLS supports only those listed in Supported Ciphersuites. Before the client and server can begin transferring data and messages, they must negotiate the ciphersuite to use.

The client sends the server a list of ciphersuites that it understands. These are sent in order of preference. To get or set the ciphersuites at specific indices within the list, use the GetCipherFromIndexTLS and SetCipherToIndexTLS. The server selects the first ciphersuite that it understands. If this is acceptable to both sides, this is the ciphersuite selected for use. Once a ciphersuite has been negotiated, the selected ciphersuite can be obtained by calling GetCiphersuiteTLS.

Once the negotiated ciphersuite is known, information associated with this ciphersuite can be obtained using the following functions:

GetAuthenticationAlgorithmTLS

GetIntegrityAlgorithmTLS

GetKeyExchangeAlgorithmTLS

GetEncryptKeyLengthTLS

GetMutualAuthKeyLengthTLS


Working with DICOM Annotations

LEADTOOLS DICOM COM provides two levels of annotation support. There is basic support which lets you load, count, obtain information about and save annotation files. In addition, LEADTOOLS provides advanced support for working with the "Graphic Annotation Module" and the the "Grayscale Softcopy Presentation State" IOD, which let you display and manipulate graphic and text annotations.

Basic

The toolkit also gives the user the ability to store LEADTOOLS annotation files as private data elements inside a DICOM dataset. You can store up to 256 single page or multi-page annotation files, either in the LEAD native format or a binary encoded format.

For working with the annotation files, LEAD provides the following:

To load an annotation file from a DICOM data set, use the AnnLoad method. This method updates the AnnContainer property with the root container of the loaded annotations.

The AnnCount method retrieves information about the annotation files stored in a DICOM data set. This method provides information on which, of the 256 positions within the DICOM data set, contain annotation files and, if desired, the appropriate private creator tag. This property updates the AnnEntries property and the AnnPrivateCreatorTag property.

The AnnDelete method can be used to delete a page from an annotation file, delete an entire annotation file, or delete all annotation files stored in a DICOM data set.

To save annotations as private data within a DICOM data set, use the AnnSave method. This method saves the annotations referenced by the container object in the AnnContainer property. If a private creator tag has been set in the AnnPrivateCreatorTag property, AnnSave will use this tag when saving the annotations.

Advanced

The DICOM standard defines the "Graphic Annotation Module" which describes the attributes of vector graphics and text annotations that shall be made available by a display device to be applied to an image. LEADTOOLS provides functionality to manipulate DICOM graphic and text annotations and the related attributes which are part of the "Grayscale Softcopy Presentation State" IOD.

The GetPresStateAttributes method and the SetPresStateAttributes method (along with the PresStateAttributes property) can be used to retrieve and update the values of the elements that describe the "Presentation State Module". When setting the attributes of the "Presentation State Module", the properties of the PresStateAttributes property should be set to the desired values before calling the SetPresStateAttributes method. The PresStateAttributes property returns a reference to the DicomPresStateAttributes object. This object exposes the IDicomPresStateAttributes interface which defines properties for the attributes that describe the "Presentation State Module". For more information regarding the properties available through this interface, refer to Working With The DicomPresStateAttributes Object.

The following methods can be used to manage the set of referenced images under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module".

AddPresStateImageRef method

RemovePresStateImageRef method

RemoveAllPresStateImageRefs method

GetPresStateImageRefInstanceUID method

GetPresStateImageRefCount method

FindFirstPresStateRefSeriesItem method

MoveNextPresStateRefSeriesItem method

FindPresStateRefImageItem method

LEADTOOLS also offers an extensive set of methods and properties to manipulate the "Graphic Layer Module". This Module defines the characteristics of the layers in which graphic annotations, text annotations, curves and overlays can be rendered. A new layer can be created by calling the CreateLayer method. Before calling this method, the properties of the LayerAttributes property should be set to the desired values. The LayerAttributes property returns a reference to the DicomLayerAttributes object. This object exposes the IDicomLayerAttributes interface which defines properties to describe a DICOM graphic layer. For more information regarding the properties available through this interface, refer to Working With The DicomLayerAttributes Object.

Once a layer is created, you can call the GetLayerAttributes method and the SetLayerAttributes method to retrieve and update the values of the elements that describe the layer attributes. A layer can be removed by calling the RemoveLayer method. The RemoveAllLayers method will remove all layers in the Data Set. Some of the other methods and properties, which can be used to maintain layers, are:

NewLayerIndex property

LayerCount property

GetLayerIndex method

FindLayerItem method

FindFirstGraphicAnnItem method

MoveNextGraphicAnnItem method

GetLayerName method

SetLayerName method

CreateGraphicAnnItem method

GetLayerGraphicObjectCount method

RemoveLayerGraphicObjects method

GetLayerTextObjectCount method

RemoveLayerTextObjects method

A new graphic annotation object can be created by calling the CreateGraphicObject method. Before calling this method, the properties of the GraphicObjectAttributes property should be set to the desired values.

The GraphicObjectAttributes property returns a reference to the DicomGraphicObjectAttributes object. This object exposes the IDicomGraphicObjectAttributes interface which defines properties to describe a DICOM graphic layer. For more information regarding the properties available through this interface, refer to Working With The DicomGraphicObjectAttributes Object.

Once a graphic object is created, you can call the GetGraphicObjectAttributes method and the SetGraphicObjectAttributes method to retrieve and update the values of the elements that describe the object attributes. Some of the other methods and properties, which can be used to manipulate graphic objects, are:

RemoveGraphicObject method

GetGraphicObjectCount method

RemoveAllGraphicObjects method

FindGraphicObjectItem method

A new text annotation object can be created by calling the CreateTextObject method. Before calling this method, the properties of the TextObjectAttributes property should be set to the desired values. The TextObjectAttributes property returns a reference to the DicomTextObjectAttributes object. This object exposes the IDicomTextObjectAttributes interface which defines properties that describe a text annotation object. For more information regarding the properties available through this interface, refer to Working With The DicomTextObjectAttributes Object.

Once a text object is created, you can call the GetTextObjectAttributes method and the SetTextObjectAttributes method to retrieve and update the values of the elements that describe the object attributes. Some of the other methods and properties, which can be used to manipulate text objects, are:

RemoveTextObject method

GetTextObjectCount method

RemoveAllTextObjects method

FindTextObjectItem method

The "Referenced Image Sequence" (0008,1140) under the "Graphic Annotation Module" is used to define the set of Image SOP Instances to which a group of graphic and text annotations applies. LEADTOOLS offers the following methods to manipulate the Items under that Sequence:

AddLayerImageRef method

GetLayerImageRefCount method

GetLayerImageRefInstanceUID method

RemoveLayerImageRef method

RemoveAllLayerImageRefs method

RemoveAllLayersImageRefs method

FindLayerRefImageItem method

To bring the DICOM annotation world into the LEADTOOLS annotation world, the toolkit provides functionality to convert DICOM annotations into LEADTOOLS annotations and vice versa. The ConvertLEADAnnObjToDicomAnnObjs method can be used to convert a LEADTOOLS annotation object into one or more DICOM annotation objects, and (optionally) to add the new DICOM annotation objects into the Data Set. The OnConvertLEADAnnObjToDicomAnnObj event will be fired for each resulting DICOM annotation object. During the event handling, the conversion process can be terminated by calling the EndConversion method. To go from DICOM graphic or text annotations into LEADTOOLS annotations use the ConvertDicomAnnObjToLEADAnnObj method and the LEADAnnObject property.


Working with the DicomGraphicObjectAttributes Object

The GraphicObjectAttributes property returns a reference to the DicomGraphicObjectAttributes object. This object exposes the IDicomGraphicObjectAttributes interface which defines the following properties to describe a DICOM graphic layer:

Filled property: This specifies the value of the "Graphic Filled" (0070,0024) element (for example, VARIANT_TRUE).

LayerName property: This property specifies the value of the "Graphic Layer" (0070,0002) element.

PointCount property: This property specifies the value of the "Number of Graphic Points" (0070,0021) element which is used to allocate storage for the arrays specified by the PointsX property and the PointsY property.

PointsX property: This property is an array of the x-coordinates of the points specified by the "Graphic Data" (0070,0022) element. As an example, the values PointsX(0) and PointsY(0) are the x-coordinate and the y-coordinate of the first point.

PointsY property: This property is an array of the y-coordinates of the points specified by the "Graphic Data" (0070,0022) element. As an example, the values PointsX(0) and PointsY(0) are the x-coordinate and the y-coordinate of the first point.

Type property: This property specifies the value of the "Graphic Type" (0070,0023) element (for example, DICOM_GRAPHIC_OBJECT_TYPE_POINT).

Units property: This property specifies the value of the "Graphic Annotation Units" (0070,0005) element (for example, DICOM_UNIT_PIXEL).


Working with the DicomLayerAttributes Object

The LayerAttributes property returns a reference to the DicomLayerAttributes object. This object exposes the IDicomLayerAttributes interface which defines the following properties to describe a DICOM graphic layer:

DisplayBlueValue property: This property specifies the blue value in the "Graphic Layer Recommended Display RGB Value" (0070,0067) element.

DisplayGravscaleValue property: specifies the value of the "Graphic Layer Recommended Display Grayscale Value" (0070,0066) element.

DisplayGreenValue property: This property specifies the green value in the "Graphic Layer Recommended Display RGB Value" (0070,0067) element.

DisplayRedValue property: This property specifies the red value in the "Graphic Layer Recommended Display RGB Value" (0070,0067) element.

LayerDescription property: This property specifies the value of the "Graphic Layer Description" (0070,0068) element.

LayerName property: This property specifies the value of the "Graphic Layer" (0070,0002) element.

LayerOrder property: This property specifies the value of the "Graphic Layer Order" (0070,0062) element.


Working with the DicomPresStateAttributes Object

The PresStateAttributes property returns a reference to the DicomPresStateAttributes object. This object exposes the IDicomPresStateAttributes interface which defines properties for the attributes that describe the "Presentation State Module" and which specifies the following properties:

InstanceNumber property: This property specifies the value of the "Instance Number" (0020,0013) element.

PresCreationDate property: This property specifies the value of the "Presentation Creation Date" (0070,0082) element.

PresCreationTime property: This property specifies the value of the "Presentation Creation Time" (0070,0083) element.

PresCreatorName property: This property specifies the value of the "Presentation Creator’s Name" (0070,0084) element.

PresDescription property: This property specifies the value of the "Presentation Description" (0070,0081) element.

PresLabel property: This property specifies the value of the "Presentation Label" (0070,0080) element.


Working with the DicomTextObjectAttributes Object

The TextObjectAttributes property returns a reference to the DicomTextObjectAttributes object. This object exposes the IDicomTextObjectAttributes interface which defines the following properties to describe a text annotation object:

AnchorPointUnits property: This property specifies the value of the "Anchor Point Annotation Units" (0070,0004) element (for example, DICOM_UNIT_PIXEL).

AnchorPointUsed property: This property indicates whether the values specified by the AnchorPointX property and the AnchorPointY property are valid. The AnchorPointX property and the AnchorPointY property are ignored unless the AnchorPointUsed property is set to VARIANT_TRUE.

AnchorPointVisible property: This property specifies the value of the "Anchor Point Visibility" (0070,0015) element (for example, VARIANT_TRUE).

AnchorPointX property: This property is the x-coordinate (horizontal offset) specified by the "Anchor Point" (0070,0014) element.

AnchorPointY property: This property is the y-coordinate (vertical offset) specified by the "Anchor Point" (0070,0014) element.

BoundingBoxBRHCornerX property: This property is the x-coordinate (horizontal offset) specified by the "Bounding Box Bottom Right Hand Corner" (0070,0011) element.

BoundingBoxBRHCornerY property: This property is the y-coordinate (vertical offset) specified by the "Bounding Box Bottom Right Hand Corner" (0070,0011) element.

BoundingBoxTextJustification property: This property specifies the value of the "Bounding Box Text Horizontal Justification" (0070,0012) element (for example, DICOM_TEXT_JUSTIFICATION_LEFT).

BoundingBoxTLHCornerX property: This property is the x-coordinate (horizontal offset) specified by the "Bounding Box Top Left Hand Corner" (0070,0010) element.

BoundingBoxTLHCornerY property: This property is the y-coordinate (vertical offset) specified by the "Bounding Box Top Left Hand Corner" (0070,0010) element.

BoundingBoxUnits property: This property specifies the value of the "Bounding Box Annotation Units" (0070,0003) element (for example, DICOM_UNIT_PIXEL).

BoundingBoxUsed property: This property indicates whether the values specified by the BoundingBoxBRHCornerX property, the BoundingBoxBRHCornerY property, the BoundingBoxTLHCornerX property, and the BoundingBoxTLHCornerY property are valid.

LayerName property: This property specifies the value of the "Graphic Layer" (0070,0002) element.

TextValue property: This property specifies the value of the "Unformatted Text Value" (0070,0006) element.


Working with Context Groups

The use of Coded Concepts in DICOM facilitates unambiguous communication of concepts or terms. The Coded Concepts are incorporated in IODs using the Code Sequence Attributes; this is described in PS 3.3 of the DICOM Standard.

A set of related Coded Concepts forms a Context Group. The Context Groups defined by the DICOM Content Mapping Resource (DCMR), which is specified by PS 3.16 of the DICOM Standard, are maintained by LEADTOOLS in an internal table. For a listing of the Context Identifiers (CIDs) of these Context Groups, along with their names, refer to Context Identifiers. We will refer to this table as the Context Group Table.

LEADTOOLS provides a number of methods and properties for working with a table of Context Groups. All of these methods and properties are named as xxxContextGroup, xxxContextGroupxxx, xxxCodedConcept, or xxxCodedConceptxxx.

The CurrentContextGroup property of the ILEADDicomDS Interface specifies the currently selected Context Group in the Context Group Table, the DicomContextGroup object. LEADTOOLS provides the IDicomContextGroup dual interface for specifying Context Groups. For more information on the properties available through this interface, refer to Working with the DicomContextGroup Object.

Initially, the Context Group Table is empty. You can add Context Groups to the table using either of two methods:

By loading from the internal table into the Context Group Table. This can be done using the LoadContextGroup method.

By inserting directly to the Context Group Table using the InsertContextGroup method.

You can use the following methods to maneuver through the Context Groups in the Context Group Table:

MoveFirstContextGroup method

MoveLastContextGroup method

MoveNextContextGroup method

MovePrevContextGroup method

You can also use the GetContextGroupCount method and the FindIndexContextGroup method to enumerate the Context Groups in the Context Group Table.

Use the FindContextGroup method to search the Context Group Table for the Context Group with a particular Context ID.

Use the DeleteContextGroup method to remove individual Context Groups from the Context Group Table. You can also use the ResetContextGroup method to remove all the Context Groups at once.

The CurrentCodedConcept property of the ILEADDicomDS Interface specifies the currently selected Coded Concept in the Context Group Table, the DicomCodedConcept object. LEADTOOLS provides the IDicomCodedConcept dual interface for specifying Coded Concepts. For more information on the properties available through this interface, refer to Working with the DicomCodedConcept Object.

Use the following methods to investigate the Coded Concepts of a Context Group:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

GetCodedConceptCount method

FindIndexCodedConcept method

MoveCodedConceptGroup method

Use the FindCodedConcept method to search a Context Group in the Context Group Table for the Coded Concept with specific Coding Scheme Designator and Code Value.

After you add a Context Group to the Context Group Table you can modify the Code Meanings of its Coded Concepts, add new Coded Concepts to the Context Group, and delete existing Coded Concepts from the Context Group by using the following methods:

SetCodedConceptCodeMeaning method

InsertCodedConcept method

DeleteCodedConcept method

If a Context Group in the Context Group Table has a corresponding Context Group in the internal table maintained by LEADTOOLS, you can use the DefaultContextGroup method to discard any changes made to the Context Group in the Context Group Table.

Most of these methods work in conjunction with the CurrentContextGroup property and/or the CurrentCodedConcept property.


Working with the DicomCodedConcept Object

The CurrentCodedConcept property of the ILEADDicomDS Interface specifies the currently selected Coded Concept in the Context Group Table, the DicomCodedConcept object. LEADTOOLS provides the IDicomCodedConcept dual interface for specifying Coded Concepts, which defines the following properties for specifying a Coded Concept:

CodingSchemeDesignator property: This property specifies the Coding Scheme Designator (0008,0102) of the Coded Concept.

CodingSchemeVersion property: This property specifies specifies the Coding Scheme Version (0008,0103) of the Coded Concept.

CodeValue property: This property specifies the Code Value (0008,0100) of the Coded Concept.

CodeMeaning property: This property specifies the Code Meaning (0008,0104) of the Coded Concept.

IsContextGroupLocalVersion property: This property specifies whether a Context Group Local Version (0008,0107) is defined for the Coded Concept.

ContextGroupLocalVersion property: This property specifies the Context Group Local Version (0008,0107) of the Coded Concept.

ContextGroupExtensionCreatorUID property: This property specifies the Context Group Extension Creator UID (0008,010D) of the Coded Concept.


Working with the DicomContextGroup Object

The Context Groups defined by the DICOM Content Mapping Resource (DCMR), which is specified by PS 3.16 of the DICOM Standard, are maintained by LEADTOOLS in an internal table. The CurrentContextGroup property of the ILEADDicomDS Interface specifies the currently selected Context Group in the Context Group Table, the DicomContextGroup object. LEADTOOLS provides the IDicomContextGroup dual interface for specifying Context Groups, which defines the following properties for specifying a Context Group:

ContextIdentifier property: This property specifies the Context Identifier (0008,010F) of the Context Group (for example, "CID 2", "CID 82", "CID 3001", etc.). A Context Group is identified by its Context ID (CID). For a list of the Context IDs of the Context Groups maintained internally, refer to Context Identifiers.

Name property: This property specifies the name of the Context Group (for example, "Anatomic Modifier", "Units of Measurement", "ECG Leads", etc.).

Extensible property: This property specifies whether the Context Group is Extensible.

ContextGroupVersion property: This property specifies the Context Group Version (0008,0106) of the Context Group. Refer to the DateTimeValues property for the properties specified by a DATETIMEVALUEItem object.


Print Management SCU

The DICOM standard defines the Print Management Service Class to facilitate the printing of images and image related data. The functionality offered by the LEADDicomPrintSCU COM class simplifies the process of building a Print Management Service Class User (Print SCU). The COM Object can be used to handle all the Meta SOP Classes and all the SOP Classes defined by the Print Management Service Class.

In order to facilitate the handling of Print Management sessions, the functionality is divided among several COM objects, each of which is specialized in a set of related functions. Most of these objects are exposed directly by the LEADDicomPrintSCU coclass as properties on the ILEADDicomPrintSCU interface. The whole functionality can be divided into the following categories:

Association

The Association with the Print Management Service Class Provider (Print SCP) can be simply established by calling the Associate method. The SOP/Meta SOP Classes supported by the Print SCU itself are specified when calling this method. The following properties and methods are also related to Association handling:

AbortAssociation method: This method aborts the Association and closes the connection.

AbortReason property: This property specifies the reason for the Association aborting as specified in the Abort message received by the Print SCU.

AbortSource property: This property specifies the source of the Association aborting as specified in the Abort message received by the Print SCU.

Associated property: This property specifies whether the Association is established or not. The value of this property is VARIANT_TRUE only when the Association is established.

AssociateRejectReason property: This property specifies the reason for the Association rejection.

AssociateRejectResult property: This property specifies the type of the Association rejection (either PDU_REJECT_RESULT_PERMANENT or PDU_REJECT_RESULT_TRANSIENT)

AssociateRejectSource property: This property specifies the source of the Association rejection.

IsClassSupported method: This method determines whether the specified SOP/Meta SOP Class is supported on the Association.

ReleaseAssociation method: This method releases the Association and closes the connection.

Basic Print Management

The FilmSession property returns a reference to the LFilmSession object. This object exposes the ILFilmSession interface, which defines properties and methods to handle Film Sessions. For example, having the Association established, the Basic Print Management can be started by requesting the Print SCP to create a Film Session using the Create method of the ILFilmSession interface. For more information on the properties and methods available through this interface, refer to the Working with the LFilmSession Object.

The FilmBox property returns a reference to the LFilmBox object. This object exposes the ILFilmBox interface, which defines properties and methods to handle Film Boxes. For example, once the Film Session is created, the Print SCP can be requested to create one or more Film Boxes using the Create method of the ILFilmBox interface. For more information on the properties and methods available through this interface, refer to the Working with the LFilmBox Object.

The ImageBoxes property returns a reference to a collection of LImageBox objects. For more information on the properties and methods available to manage this collection, refer to the Working with the LImageBox Collection. When the Print SCP is requested to create a Film Box, it will also create one or more Image Boxes. For each Image Box created, an LImageBox object is added to the collection. The ILImageBox interface, which is exposed by the LImageBox object, defines members to handle the Image Box. For example, the image to be printed in the Image Box can be specified using the Update methodof the ILImageBox interface For more information on the properties and methods available through this interface, refer to the Working with the LImageBox Object.

The AnnotationBoxes property returns a reference to a collection of LAnnotationBox objects. For more information on the properties and methods available to manage this collection, refer to the Working with the LAnnotationBox Collection. When the Print SCP is requested to create a Film Box, it might also create one or more Annotation Boxes. For each Annotation Box created, an LAnnotationBox object is added to the collection. The ILAnnotationBox interface, which is exposed by the LAnnotationBox object, defines members to handle the Annotation Box. For example, the Update method of the ILAnnotationBox interface can be used to update the Annotation Box. For more information on the properties and methods available through this interface, refer to the Working with the LAnnotationBox Object.

The PresentationLUT property returns a reference to the LPresentationLUT object. This object exposes the ILPresentationLUT interface, which defines members to handle Presentation LUTs. For example, if the Presentation LUT SOP Class is supported on the Association, the Create method of the ILPresentationLUT interface can be used to request the Print SCP to create a Presentation LUT. Once created, the Presentation LUT can be referenced by Film Boxes and Grayscale Image Boxes. For more information on the properties and methods available through this interface, refer to the Working with the LPresentationLUT Object.

The ImageOverlayBox property returns a reference to the LImageOverlayBox object. This object exposes the ILImageOverlayBox interface, which defines properties and methods to handle Image Overlay Boxes. For example, if the Basic Print Image Overlay Box SOP Class is supported on the Association, the Print SCP can be requested to create an Image Overlay Box using the Create method of the ILImageOverlayBox interface. Once created, the Image Overlay Box can be referenced by Image Boxes. For more information on the properties and methods available through this interface, refer to the Working with the LImageOverlayBox Object.

Pull Stored Print Management

The PullPrintRequest property returns a reference to the LPullPrintRequest object. This object exposes the ILPullPrintRequest interface, which defines properties and methods to handle Pull Stored Print Management sessions. For example, having the Association established, the session can be started by using the Create method to create a Pull Print Request SOP Instance. For more information on the properties and methods available through this interface, refer to the Working with the LPullPrintRequest Object.

Printer

The Printer property returns a reference to the LPrinter object. This object exposes the ILPrinter interface and it can be used to query the Print SCP for information about the printer. For more information on the properties and methods available through this interface, refer to the Working with the LPrinter Object.

The OnPrinterReport event will be fired whenever a printer status report is received from the Print SCP.

The PrinterConfiguration property returns a reference to the LPrinterConfiguration object. This object exposes the ILPrinterConfiguration interface and it can be used to query the Print SCP for the printer configuration information. For more information on the properties and methods available through this interface, refer to the Working with the LPrinterConfiguration Object.

Print Jobs

The PrintJob property returns a reference to the LPrintJob object which expose the ILPrintJob interface, which defines properties and a method that can be used to query the Print SCP: For more information on the properties and methods available through this interface, refer to the Working with the LPrintJob Object.When a printing request is sent to the Print SCP, and if the Print Job SOP Class is supported on the Association, the Print SCP is supposed to create a Print Job SOP Instance for the new Print Job. The SOP Instance UID of that Instance is specified by the PrintJobSOPInstanceUID property of the LFilmSession object, the LFilmBox object, or the LPullPrintRequest object, depending on the method that sent the printing request. This SOP Instance UID can then be passed to the GetInfo method of the ILPrintJob interface to query the Print SCP for information about the Print Job.

The OnPrintJobReport event will be fired whenever a Print Job status report is received from the Print SCP.

In addition to the properties, methods, and events mentioned above:

The OnStatus event can be used to monitor the status of the Print SCU itself.

The LastOperationStatus property specifies the status code returned in the response of the Print SCP.

The Timeout property specifies the timeout value for communicating with the Print SCP.

The EnableMethodErrors property specifies whether runtime exceptions should be generated when a method error occurs.

While a huge number of features are supported by the LEADDicomPrintSCU coclass, the common tasks are made easy. The following VB sample procedure illustrates the simplicity when printing a single DICOM image:

Private Sub PrintImage(sImageFilename As String)
Dim objPrintSCU As New LEADDicomPrintSCU

With objPrintSCU
.Associate "10.0.2.20", 7104, "PrintSCP", "PrintSCU"
.FilmSession.Create
.FilmBox.Create
.ImageBoxes(0).Update sImageFilename
.FilmBox.PrintBox
.FilmSession.Delete
.ReleaseAssociation
End With
End Sub


Working With The LAnnotationBox Collection

The AnnotationBoxes property returns a reference to a collection of LAnnotationBox objects and has the following properties and method:

Methods

Item method (ILAnnotationBoxes): This method returns a ILAnnotationBox object from the collection.

Properties

_NewEnum property (ILAnnotationBoxes): This property returns an IEnumVARIANT interface on an enumeration object for the collection. This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

Count property (ILAnnotationBoxes): This property specifies the number of LAnnotationBox objects in the collection.


Working With The LAnnotationBox Object

When the Print SCP is requested to create a Film Box, it might also create one or more Annotation Boxes. For each Annotation Box created, an LAnnotationBox object is added to the collection. The ILAnnotationBox interface, which is exposed by the LAnnotationBox object, defines the following properties and method to handle the Annotation Box:

Methods

Update method (ILAnnotationBox): This method requests the Print SCP to update the Annotation Box.

Properties

AnnotationPosition property: This property specifies the Annotation Position (2030,0010).

MainObject property (ILAnnotationBox Interface): This property returns a reference to the LEADDicomPrintSCU object.)

SOPInstanceUID property (ILAnnotationBox): This property specifies the SOP Instance UID of the Annotation Box.)

TextString property: This property specifies the Text String (2030,0020).)

For example, the Update method of the ILAnnotationBox interface can be used to update the Annotation Box.


Working With The LAttribute Object

The Attributes property (ILPrinterConfigurationItem) returns a reference to the LAttribute object which exposes the ILAttribute Interface which defines the following properties:

Properties

Name property: This property specifies the Name of the Attribute.

Value property: This property specifies the Value of the Attribute.


Working With The LAttributes Collection

The LAttributes collection has the following properties and method:

Properties

_NewEnum property (ILAttributes): This property returns an IEnumVARIANT interface on an enumeration object for the collection. This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

Count property (ILAttributes): This property specifies the number of LAttribute objects in the collection.

Methods

Item method (ILAttributes): This method returns a ILAttribute object from the collection.


Working With The LFilmBox Object

The FilmBox property returns a reference to the LFilmBox object. This object exposes the ILFilmBox interface, which defines the following properties and methods to handle Film Boxes:

Methods

Create method (ILFilmBox): This method requests the Print SCP to create a Basic Film Box SOP Instance. A Film Session must have been created before creating Film Boxes.

Delete method (ILFilmBox): This method requests the Print SCP to delete the current Basic Film Box SOP Instance. There must be a Film Box currently created before using this method.

PrintBox method: This method requests the Print SCP to print the current Film Box. There must be a Film Box currently created before using this method.

Update method (ILFilmBox): This method requests the Print SCP to update the current Basic Film Box SOP Instance.

Properties

AnnotationDisplayFormatID property (ILFilmBox Interface): This property specifies the Annotation Display Format ID (2010,0030).

BorderDensity property (ILFilmBox Interface): This property specifies the Border Density (2010,0100).

ConfigurationInformation property (ILFilmBox): This property specifies the Configuration Information (2010,0150).

EmptyImageDensity property: This property specifies the Empty Image Density (2010,0110).

FilmBox property. This property returns a reference to the LFilmBox object, which can be used to create and manipulate Film Boxes.

FilmOrientation property: This property specifies the Film Orientation (2010,0040).

FilmSizeID property: This property specifies the Film Size ID (2010,0050).

Illumination property (ILFilmBox): This property specifies the Illumination (2010,015E).

IncludedParameters property (ILFilmBox): This property specifies the parameters to be included when creating/updating the Film Box.

MagnificationType property (ILFilmBox): This property specifies the Magnification Type (2010,0060).

MaxDensity property (ILFilmBox): This property specifies the Max Density (2010,0130).

MinDensity property (ILFilmBox): This property specifies the Min Density (2010,0120).

ReflectedAmbientLight property (ILFilmBox): This property specifies the Reflected Ambient Light (2010,0160).

RefPresLUTInstanceUID property (ILFilmBox): This property specifies the SOP Instance UID of a previously created Presentation LUT SOP Instance to be referenced by the Film Box.

RequestedResolutionID property: This property specifies the Requested Resolution ID (2020,0050).

SmoothingType property (ILFilmBox): This property specifies the Smoothing Type (2010,0080).

SOPInstanceUID property (ILFilmBox): This property specifies the SOP Instance UID of the current Basic Film Box SOP Instance.

Trim property: This property specifies the Trim (2010,0140).

For example, once the Film Session is created, the Print SCP can be requested to create one or more Film Boxes using the Create method of the ILFilmBox interface.


Working With The LFilmSession Object

The FilmSession property returns a reference to the LFilmSession object. This object exposes the ILFilmSession interface, which defines the following properties and methods to handle Film Sessions:

Methods

Create method (ILFilmSession): This method requests the Print SCP to create a Basic Film Session SOP Instance.

Delete method (ILFilmSession): This method requests the Print SCP to delete the current Basic Film Session SOP Instance.

PrintSession method (ILFilmSession): This method requests the Print SCP to print all the Film Boxes that belong to the current Film Session.

Update method (ILFilmSession): This property requests the Print SCP to update the current Basic Film Session SOP Instance.

Properties

FilmDestination property (ILFilmSession): This property specifies the Film Destination (2000,0040).

FilmSession property: This property returns a reference to the LFilmSession object, which can be used to create and manipulate Film Sessions.

FilmSessionLabel property (ILFilmSession): This property specifies the Film Session Label (2000,0050).

IncludedParameters property (ILFilmSession): This property specifies the parameters to be included when creating/updating the Film Session.

MediumType property (ILFilmSession): This property specifies the Medium Type (2000,0030).

MemoryAllocation property (ILFilmSession): This property specifies the Memory Allocation (2000,0060).

NumberOfCopies property (ILFilmSession): This property specifies the Number of Copies (2000,0010).

OwnerID property (ILFilmSession): This property specifies the Owner ID (2100,0160).

PrintPriority property (ILFilmSession): This property specifies the Print Priority (2000,0020).

SOPInstanceUID property (ILFilmSession): This property specifies the SOP Instance UID of the current Basic Film Session SOP Instance.

For example, having the Association established, the Basic Print Management can be started by requesting the Print SCP to create a Film Session using the Create method of the ILFilmSession interface.


Working With The LImageBox Collection

The ImageBoxes property returns a reference to a collection of LImageBox objects and has the following properties and method:

Methods

Item method (ILImageBoxes): This method returns an ILImageBox object from the collection.

Properties

_NewEnum property (ILImageBoxes). This property returns an IEnumVARIANT on an enumeration object for the collection. This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

Count property (ILImageBoxes): This property specifies the number of LImageBox objects in the collection.


Working With The LImageBox Object

When the Print SCP is requested to create a Film Box, it will also create one or more Image Boxes. For each Image Box created, an LImageBox object is added to the collection. The ILImageBox interface, which is exposed by the LImageBox object, defines the following properties and method to handle the Image Box:

Methods

Update method. This method requests the Print SCP to update the Image Box.

Properties

ConfigurationInformation property: This property specifies the Configuration Information (2010,0150).

ImageFilename property: This property specifies the name of the Data Set file that contains the image to be printed in the Image Box.

ImagePosition property: This property specifies the Image Position (2020,0010).

IncludedParameters property: This property specifies the parameters to be included when updating the Image Box.

MagnificationType property: This property specifies the Magnification Type (2010,0060).

MainObject property: This property returns a reference to the ILEADDicomPrintSCU object.

MaxDensity property: This property specifies the Max Density (2010,0130).

MinDensity property: This property specifies the Min Density (2010,0120).

Polarity property: This property specifies the Polarity (2020,0020).

RefImageOverlayBoxInstanceUID property: This property specifies the SOP Instance UID of a previously created Basic Print Image Overlay Box SOP Instance to be referenced by the Image Box.

RefPresLUTInstanceUID property: This property specifies the SOP Instance UID of a previously created Presentation LUT SOP Instance to be referenced by the Image Box.

RequestedDecimateCropBehavior property: This property specifies the Requested Decimate/Crop Behavior (2020,0040).

RequestedImageSize property: This property specifies the Requested Image Size (2020,0030).

SmoothingType property: This property specifies the Smoothing Type (2010,0080).)

SOPInstanceUID property: This property specifies the SOP Instance UID of the Image Box.

For example, the image to be printed in the Image Box can be specified using the Update methodof the ILImageBox interface.


Working With The LImageOverlayBox Object

The ImageOverlayBox property returns a reference to the LImageOverlayBox object. This object exposes the ILImageOverlayBox interface, which defines the following properties and methods to handle Image Overlay Boxes:

Methods

Create method: This method requests the Print SCP to create a Basic Print Image Overlay Box SOP Instance.

GetSOPInstanceUID method: This method returns the SOP Instance UID of the last created Basic Print Image Overlay Box SOP Instance.

Update method: This method requests the Print SCP to update the specified Basic Print Image Overlay Box SOP Instance.

Delete method: This method requests the Print SCP to delete the specified Basic Print Image Overlay Box SOP Instance.

Properties

MainObject property: This property returns a reference to the LEADDicomPrintSCU object.

IncludedParameters property: This property specifies the parameters to be included when creating/updating Image Overlay Boxes.

OverlayFilename property: This property specifies the name of the Data Set file that contains the Overlay data for the Image Overlay Box.

OverlayOriginRow property: This property specifies the first Value in Overlay Origin (6000,0050).

OverlayOriginColumn property: This property specifies the second Value in Overlay Origin (6000,0050).

OverlayOrImageMagnification property: This property specifies the Overlay or Image Magnification (2040,0072).

MagnifyToNumberOfColumns property: This property specifies the Magnify to Number of Columns (2040,0074).

OverlayMagnificationType property: This property specifies the Overlay Magnification Type (2040,0060).

OverlayForegroundDensity property: This property specifies the Overlay Foreground Density (2040,0080).

OverlayBackgroundDensity property: This property specifies the Overlay Background Density (2040,0082).

OverlaySmoothingType property: This property specifies the Overlay Smoothing Type (2040,0070).

For example, if the Basic Print Image Overlay Box SOP Class is supported on the Association, the Print SCP can be requested to create an Image Overlay Box using the Create method of the ILImageOverlayBox interface. Once created, the Image Overlay Box can be referenced by Image Boxes.


Working With The LPresentationLUT Object

The PresentationLUT property returns a reference to the LPresentationLUT object. This object exposes the ILPresentationLUT interface, which defines the following property and methods to handle Presentation LUTs:

Methods

Create method: This method requests the Print SCP to create a Presentation LUT SOP Instance.

Delete method: This method requests the Print SCP to delete the specified Presentation LUT SOP Instance.

GetSOPInstanceUID method: This method returns the SOP Instance UID of the last created Presentation LUT SOP Instance.

Properties

MainObject property: This property returns a reference to the LEADDicomPrintSCU object.

For example, if the Presentation LUT SOP Class is supported on the Association, the Create method of the ILPresentationLUT interface can be used to request the Print SCP to create a Presentation LUT. Once created, the Presentation LUT can be referenced by Film Boxes and Grayscale Image Boxes.


Working With The LPrinter Object

The Printer property returns a reference to the LPrinter object. This object exposes the ILPrinter interface, which defines the following properties and method that can be used to query the Print SCP for information about the printer:

Methods

GetInfo method: This method queries the Print SCP for information about the printer.

Properties

DateOfLastCalibration property: This property specifies the Date of Last Calibration (0018,1200).

DeviceSerialNumber property: This property specifies the Device Serial Number (0018,1000).

MainObject property: This property returns a reference to the LEADDicomPrintSCU object.

Manufacturer property: This property specifies the Manufacturer (0008,0070).

ManufacturerModelName property: This property specifies the Manufacturer’s Model Name (0008,1090).

PrinterName property: This property specifies the Printer Name (2110,0030).

PrinterStatus property: This property specifies the Printer Status (2110,0010).

PrinterStatusInfo property: This property specifies the Printer Status Info (2110,0020).

RequiredInfo property: This property specifies the printer information to be retrieved using the GetInfo method.

SoftwareVersions property: This property specifies the Software Version(s) (0018,1020).

TimeOfLastCalibration property: This property specifies the Time of Last Calibration (0018,1201).


Working With The LPrinterConfiguration Object

The PrinterConfiguration property returns a reference to the LPrinterConfiguration object. This object exposes the ILPrinterConfiguration interface which defines the following properties and methods that can be used to query the Print SCP for the printer configuration information:

Properties

MainObject property: This property returns a reference to the LEADDicomPrintSCU object.

PrinterConfigItems property: This property returns a reference to the collection of the Printer Configuration Items retrieved from the Print SCP by the Get method. The printer configuration information is supposed to be sent by the Print SCP as one or more Items in a Printer Configuration Sequence (2000,001E). For each Item received, an LPrinterConfigurationItem object is added to the collection. Each LPrinterConfigurationItem object exposes the ILPrinterConfigurationItem Interface which defines two collections:

A collection of LAttribute objects that contains an LAttribute object for each Attribute in the Printer Configuration Item, and a collection of LSequence objects that contains an LSequence object for each sequence of items in the Printer Configuration Item. Each LSequence object returns a reference to a collection of LSequenceItem objects, each of which specifies a collection LAttribute objects.

This way, the retrieved printer configuration information can be fully investigated. The following diagram illustrates these relations.

For more information on the properties and methods available through the ILPrinterConfigurationItem, LAttribute, LSequence, and LSequenceItem interfaces, refer to the Working with the LPrinterConfigurationItem Object, Working with the LAttribute Object, Working with the LSequence Object, and the Working with the LSequenceItem Object topics, respectively.

To work with a collection of SequenceItems, use the ILSequenceItems interface. For more information regarding working with this collection of objects, refer to Working with the LSequenceItems Collection.

To work with a collection of LAttribute objects, use the ILAttributes interface. For more information regarding working with this collection of objects, refer to Working with the LAttributes Collection.

To work with a collection of LSequence objects, use the ILSequences interface. For more information regarding working with this collection of objects, refer to Working with the LSequences Collection.

Methods

Get method: This method queries the Print SCP for the printer configuration information.


Working With The LPrinterConfigurationItem Object

The printer configuration information gets sent by the Print SCP as one or more Items in a Printer Configuration Sequence (2000,001E). For each Item received, an LPrinterConfigurationItem object is added to the collection. Each LPrinterConfigurationItem object exposes the ILPrinterConfigurationItem Interface which defines the following properties to handle the object:

Properties

Attributes property (ILPrinterConfigurationItem): This property is the collection of all the Attributes in the Printer Configuration Item. The Name and Value of each Attribute in the collection are specified by the members of the ILAttribute interface exposed by the corresponding LAttribute object.

Sequences property (ILPrinterConfigurationItem): This property is the collection of all the Sequences of Items in the Printer Configuration Item. The Name and Items of each Sequence in the collection are specified by the members of the ILSequence interface exposed by the corresponding LSequence object.


Working With The LPrinterConfigurationItems Collection

The PrinterConfigItems property returns a reference to a collection of LPrinterConfigurationItems objects and has the following properties and method:

Properties

_NewEnum property (ILPrinterConfigurationItems): This property returns an IEnumVARIANT interface on an enumeration object for the collection. This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

Count property (ILPrinterConfigurationItems): This property specifies the number of LPrinterConfigurationItems objects in the collection.

Methods

Item method (ILPrinterConfigurationItems): This method returns a ILPrinterConfigurationItem object from the collection.


Working With The LPrintJob Object

The PrintJob property returns a reference to the LPrintJob object which exposes the ILPrintJob interface, which has the following properties and method that can be used to query the Print SCP:

Properties

CreationDate property: This property specifies the Creation Date (2100,0040).

CreationTime property: This property specifies the Creation Time (2100,0050).

ExecutionStatus property: This property specifies the Execution Status (2100,0020).

ExecutionStatusInfo property: This property specifies the Execution Status Info (2100,0030).

MainObject property: This property returns a reference to the LEADDicomPrintSCU object.

Originator property: This property specifies the Originator (2100,0070).

PrinterName property: This property specifies the Printer Name (2110,0030).

PrintPriority property: This property specifies the Print Priority (2000,0020).

RequiredInfo property: This property specifies the Print Job information to be retrieved using the GetInfo method.

Methods

GetInfo method: This method queries the Print SCP for information about the specified Print Job. When the return value of the method is 0, then this means that the required Print Job information was retrieved successfully, with either a Success or Warning status code in the response of the Print SCP. Once the Print Job information is retrieved successfully, it can be obtained by accessing the various properties.


Working With The LPullPrintRequest Object

The PullPrintRequest property returns a reference to the LPullPrintRequest object. This object exposes the ILPullPrintRequest interface, which defines the following properties and methods to handle Pull Stored Print Management sessions:

Methods

AddStoredPrintItem method: This method specifies a Stored Print Storage SOP Instance to be referenced by the Pull Print Request SOP Instance that will be created using the Create method.

Create method: This method requests the Print SCP to create a Pull Print Request SOP Instance.

Delete method: This method requests the Print SCP to delete the current Pull Print Request SOP Instance.

PrintSession method: This method requests the Print SCP to print the session of the current Pull Print Request SOP Instance.

RemoveAllStoredPrintItems method: This method removes all the Stored Print Items added so far using the AddStoredPrintItem method.

Properties

AnnotationFlag property: This property specifies the Annotation Flag (2000,0065).

CollationFlag property: This property specifies the Collation Flag (2000,0063).

ColorImagePrintingFlag property: This property specifies the Color Image Printing Flag (2000,0062).

ConfigurationInformation property: This property specifies the Configuration Information (2010,0150).

FilmDestination property: This property specifies the Film Destination (2000,0040).

FilmSessionLabel property: This property specifies the Film Session Label (2000,0050).

Illumination property: This property specifies the Illumination (2010,015E).

ImageBoxPresentationLUTFlag property: This property specifies the Image Box Presentation LUT Flag (2000,006A).

ImageOverlayFlag property: This property specifies the Image Overlay Flag (2000,0067).

IncludedParameters property: This property specifies the parameters to be included when creating the Pull Print Request SOP Instance using the Create method.

MainObject property: This property returns a reference to the LEADDicomPrintSCU object.

MediumType property: This property specifies the Medium Type (2000,0030).

MemoryAllocation property: This property specifies the Memory Allocation (2000,0060).

NumberOfCopies property: This property specifies the Number of Copies (2000,0010).

OwnerID property: This property specifies the Owner ID (2100,0160).

PresentationLUTFlag property: This property specifies the Presentation LUT Flag (2000,0069).

PrintJobSOPInstanceUID property: This property specifies the SOP Instance UID of the Print Job SOP Instance resulting from the last successful request sent to the Print SCP to print the session of the current Pull Print Request SOP Instance. The SOP Instance UID of a Print Job can be used to query the Print SCP for information about the Print Job (refer to the GetInfo method of the ILPrintJob interface). Also, it is used to identify the Print Job when status reports are received from the Print SCP (refer to the OnPrintJobReport event).

PrintPriority property: This property specifies the Print Priority (2000,0020).

ReflectedAmbientLight property: This property specifies the Reflected Ambient Light (2010,0160).

SOPInstanceUID property: This property specifies the SOP Instance UID of the current Pull Print Request SOP Instance.

For example, having the Association established, the session can be started by using the Create method to create a Pull Print Request SOP Instance.


Working With The LSequence Object

The Sequences property (ILPrinterConfigurationItem) is the collection of all the Sequences of Items in the Printer Configuration Item. The Name and Items of each Sequence in the collection are specified by the members of the ILSequence interface exposed by the corresponding LSequence object which defines the following properties:

Properties

Items property: This property is the collection of all Items in the Sequence of Items. The Attributes of each Item in the collection are contained in the collection specified by the Attributes property of the ILSequenceItem interface exposed by the corresponding LSequenceItem object.

Name property: This property specifies the Name of the Sequence of Items.


Working With The LSequenceItem Object

The LSequenceItem object defines the following property to examine the Attributes of a Sequence Item:

Properties

Attributes property: This property defines the collection of all the Attributes in the Sequence Item. The Name and Value of each Attribute in the collection are specified by the members of the ILAttribute interface exposed by the corresponding LAttribute object.

Count property: This property specifies the number of LSequenceItem objects in the collection.


Working With The LSequenceItems Collection

The LSequenceItems collection defines the following properties and methods to manage the collection of Sequence Items:

Methods

Item method: This method returns an LSequenceItem object from the collection.

Properties

_NewEnum property: This property returns an IEnumVARIANT interface on an enumeration object for the collection. This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.


Working With The LSequences Collection

The LSequences collection has the following properties and methods:

Properties

_NewEnum property: This property returns an IEnumVARIANT interface on an enumeration object for the collection. This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

Count property: This property specifies the number of LSequence objects in the collection.

Methods

Item method: This method returns an LSequence object from the collection.


LUT Encoding

Modality LUT

A "Modality LUT " allows the transformation of manufacturer-dependent pixel values into manufacturer-independent pixel values (e.g., Hounsfield units for CT images). The "Modality LUT" may be contained within an image, a presentation state (that references an image), or as a "Standalone Modality LUT" (that references an image). "Rescale Slope" (0028,1053) and "Rescale Intercept" (0028,1052) are used to describe the transformation when it is linear, while the "Modality LUT Sequence" (0028,3000) is used to describe non-linear transformations. In both cases it is implied that the transformation can only occur for grayscale data (images with "Photometric Interpretation" values of "MONOCHROME1" and "MONOCHROME2").

LEADTOOLS provides functionality to manipulate the "Modality LUT". The GetModalityLUTAttributes method and the SetModalityLUT method (along with the ModalityLUTAttributes property) can be used to retrieve and update the values of the elements that describe a "Modality LUT". The properties specified by the ModalityLUTAttributes property describe all the attributes related to a "Modality LUT".

If the transformation defined by the LUT is linear then the IsRescaleSlopeIntercept property is TRUE and the RescaleIntercept property, the RescaleType property and the RescaleSlope property will hold the values for "Rescale Intercept" (0028,1052), "Rescale Type" (0028,1054) and the "Rescale Slope" (0028,1053) respectively.

If the transformation defined by the LUT is nonlinear the IsModalityLUTSequence property is TRUE, the ModalityLUTType property specifies the value of the "Modality LUT Type" (0028,3004) element, the LUTExplanation property specifies the value of the "LUT Explanation" (0028,3003) element, and the values of the "LUT Descriptor" (0028,3002) are specified by the LUTDescriptorNumberOfEntries property, the LUTDescriptorFirstMapped property, and the LUTDescriptorEntryBits property. To get the "LUT Data" (0028,3006) under the "Modality LUT Sequence" (0028,3000) use the GetModalityLUTData method. To remove the "Modality LUT " from a DICOM Data Set call the DeleteModalityLUT method.

VOI LUT

A "VOI LUT" allows the transformation of the modality pixel values into pixel values that are meaningful for print or display. This transformation is applied after any "Modality LUT". The "VOI LUT" may be contained within an image, or a presentation state (that references an image), or as a "Standalone VOI LUT" (that references an image). "Window Center" (0028,1050) and "Window Width" (0028,1051) are used to describe the transformation when it’s linear, while the "VOI LUT Sequence" (0028,3010) is used to describe non-linear transformations. In both cases it is implied that the transformation can only occur for grayscale data (images with "Photometric Interpretation" values of "MONOCHROME1" and "MONOCHROME2"). If multiple values are present for the "Window Center" and "Window Width", both attributes shall have the same number of values and shall be considered as pairs. Multiple values indicate that multiple alternative views may be presented. If multiple items are present in the "VOI LUT Sequence" (0028,3010), only one may be applied to the image for display. Multiple items indicate that multiple alternative views may be presented.

LEADTOOLS provides functionality to manipulate the "VOI LUT ". The WindowCount property specifies the number of values under the "Window Center" and "Window Width" elements, while the VOILUTCount property specifies the number of items under the "VOI LUT Sequence" (0028,3010). Use the GetWindowAttributes method and the SetWindowAttributes method (along with the WindowAttributes property) to retrieve and update the attributes that describe "Window Center" (the WindowCenter property), the "Window Width" (the WindowWidth property), and the "Window Center & Width Explanation" (the WindowCWExplanation property). If you want to delete all the elements related to a linear "VOI LUT" call the DeleteWindow method.

If the "VOI LUT" is non-linear, you can use the GetVOILUTAttributes method (together with the VOILUTAttributes property) to get the format of the "LUT Data" under the "VOI LUT Sequence" and you can use the GetVOILUTData method to get the table data ("LUT Data") itself.

When the GetVOILUTAttributes method is called to retrieve the attributes of a VOI LUT, the properties of the VOILUTAttributes property are updated with the retrieved values.

When setting the attributes of a VOI LUT, the properties of the VOILUTAttributes property should be set to the desired values before calling the SetVOILUT method. The VOILUTAttributes property returns a reference to the LVOILUTAttributes object. This object exposes the ILVOILUTAttributes interface which defines properties for the attributes of VOI LUTs. For more information regarding the properties available through this interface, refer to Working With The LVOILUTAttributes Object.

To set the "LUT Data" use the SetVOILUT method which will set both the format of the data and the data itself. If you want to delete all the elements related to a non-linear "VOI LUT" call the DeleteVOILUT method.

Palette Color Table

A "Palette Color Lookup Table" is used inside 8 and 16 bit color images where the pixel value is used as an index into each of the Red, Blue, and Green Palette Color Lookup Tables (0028,1101-1103 &1201-1203). The DICOM standard defines two types of tables: "Contiguous Palette Color Tables" where the data for each table is represented by a single contiguous stream and "Segmented Palette Color Tables" where the data is stored in each table as a series of segments. Both types are supported by the toolkit.

LEADTOOLS provides functionality to manipulate a "Palette Color Table". You can use the GetPaletteColorLUTAttributes method and the SetPaletteColorLUTAttributes method (in conjunction with the PaletteColorLUTAttributes property) to retrieve the attributes that describe a "Palette Color Lookup Table" and to set them.

When the GetPaletteColorLUTAttributes method is called to retrieve the attributes of the Palette Color LUT, the various properties of the PaletteColorLUTAttributes property are updated with the retrieved values.

When setting the attributes of the Palette Color LUT, the properties of the PaletteColorLUTAttributes property should be set to the desired values before calling the SetPaletteColorLUTAttributes method.

The PaletteColorLUTAttributes property returns a reference to the LPaletteColorLUTAttributes object. This object exposes the ILPaletteColorLUTAttributes interface which defines for the attributes of Palette Color LUTs. For more information regarding the properties available through this interface, refer to Working With The LPaletteColorLUTAttributes Object.

The GetPaletteColorLUTData method can be used to get the table entries under the "Red", "Green" or "Blue" "Palette Color Lookup Table Data", while the SetPaletteColorLUTData method can be used to set them. To remove the "Palette Color Lookup" tables from a DICOM Data Set call the DeletePaletteColorLUT method.


Working with the LPaletteColorLUTAttributes Object

The PaletteColorLUTAttributes property returns a reference to the LPaletteColorLUTAttributes object. This object exposes the ILPaletteColorLUTAttributes interface which defines the following properties to describe the attributes of Palette Color LUTs:

BlueLUTDescriptorEntryBits property: This property specifies the number of bits for each entry in the "Blue Palette Color Lookup Table Data". This is the third value in the "Blue Palette Color Lookup Table Descriptor" (0028,1103) element.

BlueLUTDescriptorFirstMapped property: This property specifies the first stored pixel value mapped. This is the second value in the "Blue Palette Color Lookup Table Descriptor" (0028,1103) element.

BlueLUTDescriptorNumberOfEntries property: This property specifies the number of entries in the "Blue Palette Color Lookup Table". This is the first value in the "Blue Palette Color Lookup Table Descriptor" (0028,1103) element.

GreenLUTDescriptorEntryBits property: This property specifies the number of bits for each entry in the "Green Palette Color Lookup Table Data". This is the third value in the "Green Palette Color Lookup Table Descriptor" (0028,1102) element.

GreenLUTDescriptorFirstMapped property: This property specifies the first stored pixel value mapped. This is the second value in the "Green Palette Color Lookup Table Descriptor" (0028,1102) element.

GreenLUTDescriptorNumberOfEntries property: This property specifies the number of entries in the "Green Palette Color Lookup Table". This is the first value in the "Green Palette Color Lookup Table Descriptor" (0028,1102) element.

IsSegmented property: This property specifies whether the "Palette Color Lookup Table Data" is segmented.

RedLUTDescriptorEntryBits property: This property specifies the number of bits for each entry in the "Red Palette Color Lookup Table Data". This is the third value in the "Red Palette Color Lookup Table Descriptor" (0028,1101) element.

RedLUTDescriptorFirstMapped property: This property specifies the first stored pixel value mapped. This is the second value in the "Red Palette Color Lookup Table Descriptor" (0028,1101) element.

RedLUTDescriptorNumberOfEntries property: This property specifies the number of entries in the "Red Palette Color Lookup Table". This is the first value in the "Red Palette Color Lookup Table Descriptor" (0028,1101) element.

UID property: This property specifies the value of the "Palette Color Lookup Table UID" (0028,1199) element.


Working with the LVOILUTAttributes Object

The VOILUTAttributes property returns a reference to the LVOILUTAttributes object. This object exposes the ILVOILUTAttributes interface which defines the following properties for the attributes of VOI LUTs:

LUTDescriptorNumberOfEntries property: This property specifies the number of entries in the lookup table. This is the first value in the "LUT Descriptor" (0028,3002) element under the "VOI LUT Sequence" (0028,3010).

LUTDescriptorFirstMapped property: This property specifies the first stored pixel value mapped. This is the second value in the "LUT Descriptor" (0028,3002) element under the "VOI LUT Sequence" (0028,3010).

LUTDescriptorEntryBits property: This property specifies the number of bits for each entry in the LUT Data. This is the third value in the "LUT Descriptor" (0028,3002) element under the "VOI LUT Sequence" (0028,3010).

LUTExplanation property: This property specifies the value of the "LUT Explanation" (0028,3003) element under the "VOI LUT Sequence" (0028,3010).


Files To Be Included With Your Application

Note: | You may not copy or redistribute any of the following files without obtaining the proper license. In some cases, the license is included with your initial purchase of LEADTOOLS. In other cases, you must obtain a license from a third party or enter into a royalty agreement with LEAD to obtain the proper license. For these special licensing situations, see the notes below accompanying the specific file.
Note: | You may not provide software development capabilities in your application. In particular, this means that you must not distribute the LTOCX14.LIC license file.

The following table summarizes the files you must include on your distribution diskettes to support the LEADTOOLS functions on a WIN32 system. (\REDIST subdirectory contains copies of these files.)

Please note that LTR and LTRVR are required for all COM applications. For more information on LTR, LTRVR or other files for the Main COM objects, refer to Files To Be Included With Your Application in the Main COM Help file.

Note: All Unicode versions of LEADTOOLS require Microsoft Unicode Layer for Windows (UNICOWS.DLL) in order to function on Windows 95/98/Me. You can obtain MSUL from: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_mslu.asp.

Redistributable Name: | Explanation: | If you are using a standard release, the files to use are: | If you are using an evaluation release, the files to use are:
LTDICKRN | LEADTOOLS DICOM Kernel COM Object, required by all other LEADTOOLS DICOM COM Objects. This file also requires the LTRPR DLL. | DLL: LTDICKRN14N.DLL | DLL: LTDICKRN14E.DLL
LTDICDS | LEADTOOLS DICOM DS COM Object. This file also requires LFCMP14S.DLL, LFJ2K14S.DLL. | DLL: LTDICDS14N.DLL | DLL: LTDICDS14E.DLL
LTDICDIR | LEADTOOLS DICOM Directory COM Object. | DLL: LTDICDIR14N.DLL | DLL: LTDICDIR14E.DLL
LTDICNET | LEADTOOLS DICOM Network COM Object. | DLL: LTDICNET14N.DLL | DLL: LTDICNET14E.DLL
LTDICNET | LEADTOOLS DICOM Print Managment SCU COM Object. | DLL: LTDPSCU14N.DLL | DLL: LTDPSCU14E.DLL
LTEAY | Digital Signatures support. | DLL: LTEAY14N.DLL | DLL: LTEAY14N.DLL
LTCRY LTTLS | TLS secure communication support | DLL: LTCRY14N.DLL LTTLS14N.DLL | DLL: LTCRY14N.DLL LTTLS14N.DLL


Installation Directory

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation.

Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

The following is a list of the subdirectories in the root directory:

BIN | Executable files for the demonstration programs.
HELP | Online help files.
IMAGES | Sample images and databases containing images.
EXAMPLES\COM | One subdirectory for each example COM program.
EXAMPLES\RES | Resource files for the example programs.
INCLUDE | Header files, BAS files, and the ActiveX's MFC interface files for versions of Visual C++ earlier than 5.0.
REDIST | Redistributable files. These are copies of the LEADTOOLS files and other files that you may need to distribute with your application. For exact information about required files, refer to Files To Be Included With Your Application.
REDIST\COM | Redistributable files. These are copies of the LEADTOOLS COM Object files and other files that you may need to distribute with your application. For exact information about required files, refer to Files To Be Included With Your Application.
REDIST\COM\NONAG | This directory contains the LEADRaster COM Object DLL that must be distributed with your application.


System Files Updated

The LEADTOOLS installation procedure adds the DLL files and all of the required driver files to your WINDOWS\SYSTEM directory. For a list of these files, refer to Files To Be Included With Your Application.

In addition, the installation procedure, as noted in the remainder of this topic, updates Windows system files that are required by the LEADTOOLS example programs.

The LEADTOOLS WIN32 installation procedure adds the following Windows files to your WINDOWS\SYSTEM directory. If your system has an earlier version of any of these files, the installation procedure overwrites it with the newer version.

COMDLG32.OCX
CTL3D32.DLL
MFC40.DLL
MFC42.DLL
MSVCRT20.DLL
MSVCRT40.DLL
MSVCRT.DLL
OC30.DLL
OLE32.DLL
OLEAUT32.DLL
OLEPRO32.DLL
STDOLE2.TLB
VB40032.DLL
VEN2232.OLB


Summary of All Supported Image File Formats

Color and Grayscale

DICOM Format (DIC)


Formats of Input Files

This topic has been replaced. Refer to Summary of All Supported Image File Formats.


Formats of Output Files

This topic has been replaced. Refer to Summary of All Supported Image File Formats.


File Formats: DICOM Format (DIC)

DICOM Format (DIC)

Note:

This format is supported only in Document/Medical.

DICOM (DIC) files are commonly used in medical images. LEADTOOLS reads a broad range of DICOM formats, converting them to LEAD-supported bits-per-pixel as necessary. LEADTOOLS writes DICOM files in the LEAD-supported bits-per-pixel. DICOM files can contain many comment fields of various types. You can use the ReadComment method to read comments in an existing file. Before writing a file, you can use the Comment property to create an array of comments to be saved in the file.

You can read DICOM files as follows:

Grayscale files in the 1- to 16-bit range are loaded as they are in the original file.

Palettized color files in the 1- to 16-bit range are converted to 8-bit palettized or 24-bit unpalettized. By default, they are converted to 24-bit only if the palette contains more than 256 colors.

Unpalettized color files (RGB, ARGB, or CMYK) with 1 to 16 bits per plane are converted to 24-bit RGB.

Read multipage DICOM files by setting the page number when calling the Load method (ILEADRasterIO) .

You can write DICOM files as 8, 12, or 16-bit grayscale, 8-bit palettized color, or 24-bit RGB color (8 bits per plane).

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DICOM_GRAY | 1 to 16 BPP (Grayscale) | 1 to 16 BPP (Grayscale) | [89] Grayscale DICOM uncompressed.
FILE_DICOM_COLOR | 8, 24 BPP | 8, 24 BPP | [90] Color DICOM uncompressed.
FILE_DICOM_RLE_GRAY | xxxx | xxxx | [125] Grayscale DICOM RLE compressed.
FILE_DICOM_RLE_COLOR | xxxx | xxxx | [126] Color DICOM RLE compressed.
FILE_DICOM_JPEG_GRAY | 8, 16 BPP (Grayscale) | 8, 16 BPP (Grayscale) | [127] Grayscale DICOM JPEG compressed.
FILE_DICOM_JPEG_COLOR | 24 BPP | 24 BPP | [128] Color DICOM JPEG compressed.
FILE_DICOM_J2K_GRAY | 8, 16 BPP (Grayscale) | 8, 16 BPP (Grayscale) | [293] Grayscale DICOM JPEG 2000 compressed.
FILE_DICOM_J2K_COLOR | 24 BPP | 24 BPP | [294] Color DICOM JPEG 2000 compressed.

Required DLL: LTDIC. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: EXIF - Exif Formats , JPG - JPEG Compressed , JP2 - JPEG 2000 Compressed , TIFF - Tagged Image File Format.


Examples for Visual Basic Programmers

You can test any of the following examples by adding a command button and pasting the sample code in the Click procedure.

Adding a DICOM Data Set to a DICOM Directory for Visual Basic

CreateObject Example for Visual Basic

Creating a DICOM Directory for Visual Basic

Loading a DICOM Directory for Visual Basic

Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control for Visual Basic

Using the DicomFileInsert Event for Visual Basic

Performing Basic Print Management Example for Visual Basic

Performing Pull Stored Print Management Example for Visual Basic

Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport Example for Visual Basic

Getting Printer Information Example for Visual Basic

Getting Printer Configuration Information Example for Visual Basic

Getting Print Job Information Example for Visual Basic

Loading a Data Set

Miscellaneous Examples


Adding a DICOM Data Set to a DICOM Directory for Visual Basic

' The following code snippet demonstrates how to use the LEADTOOLS DICOM
' DS COM Object (ILEADDicomDS) to load a Data Set and then add it to a
' DICOM Directory

Dim DicomDir As New LEADDicomDir

' Set the destination folder
DicomDir.ResetDicomDir "C:\Medical Images"

' Load a Data Set and add it to the Directory
If LEADDicomDS.LoadDS("C:\Medical Images\Image", 0) = DICOM_SUCCESS Then
DicomDir.InsertDicomDS LEADDicomDS.hDicomDS, "C:\Medical Images\Image"

' Save the DICOMDIR File
DicomDir.SaveDicomDir
End If


CreateObject Example for Visual Basic

'this sample will dynamically create a LEAD Dicom Kernel
'object and use it to unlock DICOM support
Dim factory As New LEADDicomFactory
Dim kernel As LEADDicomKernel
Dim szLic As String

szLic = "LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc."

Set kernel = factory.CreateObject("LEADDicomKernel.LEADDicomKernel", szLic)
kernel.EnableMethodErrors =False
kernel.UnlockSupport L_SUPPORT_DICOM, "MyUnlockKey"
If (kernel.IsSupportLocked(L_SUPPORT_DICOM)) Then
MsgBox "Unlock Failed!"
End If


Creating a DICOM Directory for Visual Basic

Private Sub CreateDicomDirectory()
Dim DicomDir As New LEADDicomDir

Dim DicomFactory As New LEADDicomFactory
Dim DicomKernel As LEADDicomKernel

Dim strLic As String
strLic = "LEADTOOLS OCX Copyright (c)" + _
" 1991-2004 LEAD Technologies, Inc."
Set DicomKernel = _
DicomFactory.CreateObject("LEADDicomKernel.LEADDicomKernel", strLic)

DicomKernel.UnlockSupport L_SUPPORT_MEDICAL, L_KEY_MEDICAL
If DicomKernel.IsSupportLocked(L_SUPPORT_MEDICAL) Then
MsgBox "Medical Support must be unlocked for this demo!", _
vbExclamation
Exit Sub
End If

' Set the destination folder
DicomDir.ResetDicomDir "C:\Medical Images\Patient 1"

' If it is desired to change the Implementation Class UID and
' the Implementation Version Name...
DicomDir.ImplementationClassUID = "1.2.840.114257.0.1"
DicomDir.ImplementationVersionName = "LEADTOOLS 14"

' Set the File-set Identifier
DicomDir.SetFileSetID "SOME ID"

' We need icon images to be added
DicomDir.InsertIconImageSequence = True

' Don't allow invalid File IDs
DicomDir.RejectInvalidFileID = True

' Set the File-set descriptor file
DicomDir.SetDescriptorFile "C:\Medical Images\Patient 1\ReadMe", ""

' Enable generating runtime exceptions
DicomDir.EnableMethodErrors = True

' Add some DICOM files to the Directory
DicomDir.InsertDicomFile "C:\Medical Images\Patient 1\Image1"
DicomDir.InsertDicomFile "C:\Medical Images\Patient 1\Image2"
DicomDir.InsertDicomFile "C:\Medical Images\Patient 1\Image3"

' Disable generating runtime exceptions
DicomDir.EnableMethodErrors = False

' Save the DICOMDIR File
DicomDir.SaveDicomDir
End Sub


Loading a DICOM Directory for Visual Basic

Private Sub TestLoadingDicomDir()
Dim DicomDir As New LEADDicomDir

' Load a DICOMDIR File. Note: It is necessary to specify
' DS_LOAD_CLOSE so that we can save the Directory later.
DicomDir.LoadDicomDir "C:\Medical Images\DICOMDIR", DS_LOAD_CLOSE

' Add some additional DICOM files to the loaded Directory
DicomDir.InsertDicomFile "C:\Medical Images\Image"
DicomDir.InsertDicomFile "C:\Medical Images\Patient 2\Image1"

' Save the DICOMDIR File
DicomDir.SaveDicomDir
End Sub


Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control for Visual Basic

' The following code snippet demonstrates how to use the LEADTOOLS DICOM
' DS COM Object (ILEADDicomDS) to get the Value of the Implementation Class
' UID element of a DICOM Directory

Dim DicomDir As New LEADDicomDir
Dim nRetValue As Integer

' Load a DICOMDIR File
nRetValue = DicomDir.LoadDicomDir("C:\Medical Images\DICOMDIR", _
DS_LOAD_CLOSE)

If nRetValue = DICOM_SUCCESS Then
LEADDicomDS.hDicomDS = DicomDir.hDicomDirDS
nRetValue = LEADDicomDS.FindFirstElement (TAG_IMPLEMENTATION_CLASS_UID, _
False)
If nRetValue = DICOM_SUCCESS Then
LEADDicomDS.GetConvertValue

' Display the value of the element
MsgBox LEADDicomDS.StringValues (0)

LEADDicomDS.StringValueCount = 0
End If
End If


Using the DicomFileInsert Event for Visual Basic

' [General][Declarations]
Private WithEvents DicomDir As LEADDicomDir

Private Sub DicomDir_DicomFileInsert(ByVal bstrFileName As String, _
ByVal hDicomDS As Long, _
ByVal nStatus As Integer, _
pReturnVal As Integer)
Dim Buffer As String
Dim Result As VbMsgBoxResult

If nStatus = DICOMDIR_INSERTDICOMFILE_PREADD Then
Buffer = "About to add the file """ & bstrFileName & """." & _
vbCrLf & vbCrLf & "Proceed?"
Result = MsgBox(Buffer, vbYesNoCancel, "DICOM Directory Sample")
If Result = vbNo Then
pReturnVal = DICOM_ERROR_FORMAT ' Skip the file
Exit Sub
ElseIf Result = vbCancel Then
pReturnVal = DICOM_ERROR_END ' Abort
Exit Sub
End If
ElseIf nStatus = DICOM_SUCCESS Then
Buffer = "The file """ & bstrFileName & _
""" has been added successfully." & _
vbCrLf & vbCrLf & "Continue?"
Result = MsgBox(Buffer, vbYesNo, "DICOM Directory Sample")
If Result = vbNo Then
pReturnVal = DICOM_ERROR_END ' Abort
Exit Sub
End If
End If
End Sub

Private Sub CreateDicomDir()
Set DicomDir = New LEADDicomDir
Dim DicomFactory As New LEADDicomFactory
Dim DicomKernel As LEADDicomKernel

Dim strLic As String
strLic = "LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc."
Set DicomKernel = DicomFactory.CreateObject ("LEADDicomKernel.LEADDicomKernel", strLic)

DicomKernel.UnlockSupport L_SUPPORT_MEDICAL, L_KEY_MEDICAL
If DicomKernel.IsSupportLocked(L_SUPPORT_MEDICAL) Then
MsgBox "Medical Support must be unlocked for this demo!", vbExclamation
Exit Sub
End If

' Set the destination folder
DicomDir.ResetDicomDir "C:\Medical Images"

' Files in subfolders should also be included
DicomDir.IncludeSubfolders = True

' Add all the DICOM files to the Directory
DicomDir.InsertDicomFile ""

' Save the DICOMDIR File
DicomDir.SaveDicomDir
End Sub


Performing Basic Print Management Example for Visual Basic

Private Sub PerformBasicPM()
Dim objPrintSCU As New LEADDicomPrintSCU
'Set objPrintSCU = New LEADDicomPrintSCU

objPrintSCU.Timeout = 60 ' 60 seconds

objPrintSCU.EnableMethodErrors = False

' Establish the Association
Dim nRet As Integer
nRet = objPrintSCU.Associate("10.0.2.20", 7104, "PrintSCP", "PrintSCU", _
PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS + _
PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS + _
PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS + _
PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS + _
PRNSCU_PRESENTATION_LUT_SOP_CLASS + _
PRNSCU_PRINT_JOB_SOP_CLASS + _
PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS)
If nRet = DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED Then
MsgBox "Source = " & objPrintSCU.AssociateRejectSource & ", " & _
"Reason = " & objPrintSCU.AssociateRejectReason, , _
"Association Request was Rejected"
Exit Sub
ElseIf nRet <> DICOM_SUCCESS Then
MsgBox "Error code: " & nRet, , "Failed to Establish the Association"
Exit Sub
End If

' Abort the Association if none of the Basic Print Management Meta SOP Classes
' is supported on the Association
If objPrintSCU.IsClassSupported(PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS) = False And _
objPrintSCU.IsClassSupported (PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS) = False Then
objPrintSCU.AbortAssociation
Exit Sub
End If

' Display some printer info
'GetPrinterInfo objPrintSCU

' Display some printer configuration info
'GetPrinterConfigInfo objPrintSCU

' Create a Film Session
With objPrintSCU.FilmSession
.IncludedParameters = 0
.Create
MsgBox .SOPInstanceUID, , "Film Session SOP Instance UID"
End With

' Update the Number of Copies and Print Priority of the Film Session
With objPrintSCU.FilmSession
.IncludedParameters = FS_NUMBER_OF_COPIES + FS_PRINT_PRIORITY
.NumberOfCopies = 1
.PrintPriority = "MED"
.Update
End With

With objPrintSCU.FilmBox
.IncludedParameters = 0

If .MainObject.IsClassSupported (PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS) Then
.IncludedParameters = .IncludedParameters + FB_ANNOTATION_DISPLAY_FORMAT_ID
.AnnotationDisplayFormatID = "SomeID"
End If

' Create a Film Box
.Create
MsgBox .SOPInstanceUID, , "Film Box SOP Instance UID"
End With

Dim sPresLUTInstanceUID As String

' Create a Presentation LUT
With objPrintSCU.PresentationLUT
If .MainObject.IsClassSupported (PRNSCU_PRESENTATION_LUT_SOP_CLASS) Then
If .Create("C:\PresLUT.dic") = DICOM_SUCCESS Then
sPresLUTInstanceUID = .GetSOPInstanceUID()
MsgBox sPresLUTInstanceUID, , "Pres LUT SOP Instance UID"
End If
End If
End With

If Len(sPresLUTInstanceUID) Then
' Update the Film Box to reference the Presentation LUT we just created
With objPrintSCU.FilmBox
.IncludedParameters = FB_REF_PRES_LUT_INSTANCE_UID
.RefPresLUTInstanceUID = sPresLUTInstanceUID
.Update
End With
End If

Dim sOverlayBoxInstanceUID As String

' Create an Image Overlay Box
With objPrintSCU.ImageOverlayBox
If .MainObject.IsClassSupported (PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS) Then
.OverlayOriginRow = 1
.OverlayOriginColumn = 1

.IncludedParameters = 0

If .Create("C:\Overlay.dic") = DICOM_SUCCESS Then
sOverlayBoxInstanceUID = .GetSOPInstanceUID()
MsgBox sOverlayBoxInstanceUID, , "Image Overlay Box SOP Instance UID"
End If
End If
End With

' Update the Image Box. Since the Image Display Format of the Film Box was
' set to "STANDARD\1,1", then we are supposed to have one Image Box created
' by the Print SCP.
If objPrintSCU.ImageBoxes.Count Then
With objPrintSCU.ImageBoxes(0)
MsgBox .SOPInstanceUID, , "Image Box SOP Instance UID"

.IncludedParameters = 0

If Len(sOverlayBoxInstanceUID) Then
.IncludedParameters = .IncludedParameters + IB_REF_IMAGE_OVERLAY_BOX_INSTANCE_UID
.RefImageOverlayBoxInstanceUID = sOverlayBoxInstanceUID
End If

.Update "C:\Image.dic"
End With
End If

' Update the Annotation Boxes (if there are any)
Dim AnnBox As LAnnotationBox
For Each AnnBox In objPrintSCU.AnnotationBoxes
AnnBox.TextString = "Some Text"
AnnBox.Update
Next

' Change the Overlay Origin of the Image Overlay Box referenced by the
' Image Box
If Len(sOverlayBoxInstanceUID) Then
With objPrintSCU.ImageOverlayBox
.IncludedParameters = OB_OVERLAY_ORIGIN
.OverlayOriginRow = 10
.OverlayOriginColumn = 10

.Update sOverlayBoxInstanceUID
End With
End If

Dim sPrintJobInstanceUID As String

' Print the Film Session (or the Film Box; there is no difference since we
' have a single Film Box in the Film Session)
If True Then
With objPrintSCU.FilmSession
.PrintSession
sPrintJobInstanceUID = .PrintJobSOPInstanceUID
End With
Else
With objPrintSCU.FilmBox
.PrintBox
sPrintJobInstanceUID = .PrintJobSOPInstanceUID
End With
End If

' Display some info about the Print Job
If (objPrintSCU.IsClassSupported(PRNSCU_PRINT_JOB_SOP_CLASS)) Then
'GetPrintJobInfo objPrintSCU, sPrintJobInstanceUID
End If

' Delete the Film Box (anyway, it would be deleted when the Film Session
' is deleted)
objPrintSCU.FilmBox.Delete

' Delete the Film Session
objPrintSCU.FilmSession.Delete

' Delete the Presentation LUT
If Len(sPresLUTInstanceUID) Then
objPrintSCU.PresentationLUT.Delete sPresLUTInstanceUID
End If

' Delete the Image Overlay Box
If Len(sOverlayBoxInstanceUID) Then
objPrintSCU.ImageOverlayBox.Delete sOverlayBoxInstanceUID
End If

' Release the Association and close the connection
objPrintSCU.ReleaseAssociation
End Sub


Performing Pull Stored Print Management Example for Visual Basic

Private Sub PerformPullStoredPM()
Dim objPrintSCU As New LEADDicomPrintSCU
'Set objPrintSCU = New LEADDicomPrintSCU

' Establish the Association
Dim nRet As Integer
nRet = objPrintSCU.Associate("10.0.2.20", 7104, "PrintSCP", "PrintSCU", _
PRNSCU_PULL_STORED_PM_META_SOP_CLASS + _
PRNSCU_PRINT_JOB_SOP_CLASS + _
PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS)
If nRet = DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED Then
MsgBox "Source = " & objPrintSCU.AssociateRejectSource & ", " & _
"Reason = " & objPrintSCU.AssociateRejectReason, , _
"Association Request was Rejected"
Exit Sub
ElseIf nRet <> DICOM_SUCCESS Then
MsgBox "Error code: " & nRet, , "Failed to Establish the Association"
Exit Sub
End If

' Display some printer info
'GetPrinterInfo objPrintSCU

' Display some printer configuration info
'GetPrinterConfigInfo objPrintSCU

With objPrintSCU.PullPrintRequest
' A referenced Stored Print Storage SOP Instance
.RemoveAllStoredPrintItems
.AddStoredPrintItem "SomeAE", _
"1.2.840.114257.254.7638.6787", _
"1.2.840.114257.945.5676.5674", _
"1.2.840.114257.23.2343.3489", _
"SomeID"

' Ask the Print SCP to create a Pull Print Request SOP Instance
.IncludedParameters = PPR_NUMBER_OF_COPIES
.NumberOfCopies = 1
.Create
MsgBox .SOPInstanceUID, , "Pull Print Request SOP Instance UID"

' Print the session
.PrintSession

' Display some info about the Print Job
If .MainObject.IsClassSupported (PRNSCU_PRINT_JOB_SOP_CLASS) Then
'GetPrintJobInfo objPrintSCU, .PrintJobSOPInstanceUID
End If

' Ask the Print SCP to delete the Pull Print Request SOP Instance
.Delete
End With

' Release the Association and close the connection
objPrintSCU.ReleaseAssociation
End Sub


Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport Example for Visual Basic

' [General][Declarations]
Private WithEvents objPrintSCU As LEADDicomPrintSCU

Private Sub objPrintSCU_OnStatus(ByVal Status As LTDICPRNSCULib.PrintScuStatusEnum, _
ByVal OperationStatus As Long)
Select Case Status
Case PRNSCU_STATUS_RECEIVE_ABORT
MsgBox "Source = " & objPrintSCU.AbortSource & ", " & _
"Reason = " & objPrintSCU.AbortReason, , _
"Print SCP Aborted the Association"

Case PRNSCU_STATUS_RECEIVE_PRINT_FILM_SESSION_RSP
Dim sStatusCodeType As String

If OperationStatus = COMMAND_STATUS_SUCCESS Then
If objPrintSCU.LastOperationStatus = COMMAND_STATUS_SUCCESS Then
sStatusCodeType = "Success"
Else
sStatusCodeType = "Warning"
End If
Else
sStatusCodeType = "Failure"
End If

Dim sOpStatus As String
sOpStatus = Hex(objPrintSCU.LastOperationStatus)
Do While Len(sOpStatus) < 4
sOpStatus = "0" & sOpStatus
Loop
sOpStatus = "0x" & sOpStatus

MsgBox "Status: " & sOpStatus & " (" & sStatusCodeType & ")", , _
"Received N-ACTION-RSP (Basic Film Session SOP Class)"
End Select
End Sub

Private Sub objPrintSCU_OnPrinterReport(ByVal EventTypeID As Integer, _
ByVal PrinterStatusInfo As String, _
ByVal FilmDestination As String, _
ByVal PrinterName As String)
Dim sEventTypeName As String

sEventTypeName = "Normal"
Select Case EventTypeID
Case 2
sEventTypeName = "Warning"
Case 3
sEventTypeName = "Failure"
End Select

Dim sMsg As String

sMsg = "Event Type Name: " & sEventTypeName

If EventTypeID <> 1 Then
sMsg = sMsg & vbNewLine & _
"Printer Status Info: " & PrinterStatusInfo & vbNewLine & _
"Film Destination: " & FilmDestination & vbNewLine & _
"Printer Name: " & PrinterName
End If

MsgBox sMsg, , "Printer Status Report"
End Sub

Private Sub objPrintSCU_OnPrintJobReport(ByVal PrintJobSOPInstanceUID As String, _
ByVal EventTypeID As Integer, _
ByVal ExecutionStatusInfo As String, _
ByVal PrintJobID As String, _
ByVal FilmSessionLabel As String, _
ByVal PrinterName As String)
Dim sEventTypeName As String

sEventTypeName = "Pending"
Select Case EventTypeID
Case 2
sEventTypeName = "Printing"
Case 3
sEventTypeName = "Done"
Case 4
sEventTypeName = "Failure"
End Select

MsgBox "Print Job SOP Instance UID: " & PrintJobSOPInstanceUID & vbNewLine & _
"Event Type Name: " & sEventTypeName & vbNewLine & _
"Execution Status Info: " & ExecutionStatusInfo & vbNewLine & _
"Film Session Label: " & FilmSessionLabel & vbNewLine & _
"Printer Name: " & PrinterName, , _
"Print Job Status Report"
End Sub


Getting Print Job Information Example for Visual Basic

Private Sub GetPrintJobInfo(objPrintSCU As LEADDicomPrintSCU, sPrintJobInstanceUID As String)
With objPrintSCU.PrintJob
' We need only the Execution Status and Execution Status Info
.RequiredInfo = PJ_EXECUTION_STATUS + PJ_EXECUTION_STATUS_INFO

' Query the Print SCP for the Print Job information
If .GetInfo(sPrintJobInstanceUID) = DICOM_SUCCESS Then
' Display the retrieved information
MsgBox "Execution Status: " & .ExecutionStatus & vbNewLine & _
"Execution Status Info: " & .ExecutionStatusInfo, , _
"Print Job Info"
End If
End With
End Sub


Getting Printer Configuration Information Example for Visual Basic

Private Sub GetPrinterConfigInfo(objPrintSCU As LEADDicomPrintSCU)
' Assume that the Association is already established

' Query the Print SCP for the printer configuration information
With objPrintSCU.PrinterConfiguration
If .Get() = DICOM_SUCCESS Then
' We will display only the Attributes of the first Printer Configuration Item

If .PrinterConfigItems.Count > 0 Then
Dim sMsg As String
Dim Attrib As LAttribute

For Each Attrib In .PrinterConfigItems(0).Attributes
sMsg = sMsg & Attrib.Name & ": " & Attrib.Value & vbNewLine
Next

MsgBox sMsg, , "Printer Config Info"
End If
End If
End With
End Sub


Getting Printer Information Example for Visual Basic

Private Sub GetPrinterInfo(objPrintSCU As LEADDicomPrintSCU)
' Assume that the Association is already established

With objPrintSCU.Printer
' We need only the Printer Status and Printer Status Info
.RequiredInfo = PRN_PRINTER_STATUS + PRN_PRINTER_STATUS_INFO

' Query the Print SCP for the information
If .GetInfo() = DICOM_SUCCESS Then
' Display the retrieved information
MsgBox "Printer Status: " & .PrinterStatus & vbNewLine & _
"Printer Status Info: " & .PrinterStatusInfo, , _
"Printer Info"
End If
End With
End Sub


Loading a Data Set (Visual Basic)

Take the following steps to start a project and to add some code that loads a DICOM Data Set and prints information about the data set:

1. | Start Visual Basic.
2. | Add the LEAD COM Objects to your project.
 | On the Project pull-down menu, use the Components option, and select the LEAD Raster View Control (14.0).
 | On the Project pull-down menu, use the References option, and select the following: LEAD Raster Object Library (14.0) LEAD Raster Variant Object Library (14.0 LEAD Raster Process Object Library (14.0) LEAD Raster IO Object Library (14.0) LEAD DICOM Kernel COM Object Library (14.0) LEAD DICOM DS COM Object Library (14.0).
3. | Select the LEAD Raster View Control, then add the control to your main form.
4. | Add a command button to your form and name it as follows:
 | Name | Caption
 | LoadImage | Load Image
5. | Add the following initialization code to the main form's Load procedure. In online help, you can use the Edit pull-down menu to copy the block of code.

‘global declaration
Private WithEvents LEADDICOM1 As LEADDicomDS

Private Sub Form_Load()
'Unlock DICOM support.
'Note that this is a sample key, which will not work in your toolkit.
Dim Factory As New LEADDicomFactory
Dim DicomKernel As LEADDicomKernel
Dim szLic As String

szLic = "LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc."
Set Factory = CreateObject("LEADDicomFactory.LEADDicomFactory")
Set DicomKernel = Factory.CreateObject ("LEADDicomKernel.LEADDicomKernel", szLic)
Set LEADDICOM1 = Factory.CreateObject ("LEADDicomDS.LEADDicomDS", szLic)
DicomKernel.UnlockSupport L_SUPPORT_MEDICAL, "TestKey"

End Sub

6.

Code the LoadImage button's click procedure as follows:

Private Sub LoadLead_Click()
Dim nRet As Integer
Dim lCount As Integer
Dim Result As Boolean

LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.LoadDS ("D:\lead14\dist\images\dicom\image1.dic", 0)
If (nRet <> DICOM_SUCCESS) Then
MsgBox "Error " & CStr(nRet) & " loading file!"
End If
lCount = LEADDICOM1.GetModuleCount
LEADDICOM1.FindIndexModule 0
Result = LEADDICOM1.SetCurrentElement(LEADDICOM1.CurrentModule.Element(0).hElement)
If (Result = True) Then
MsgBox "There are " & CStr(lCount) & " modules in this data set." & (Chr(13)) & _
"The first module has " & CStr(LEADDICOM1.CurrentModule.ElementCount) & _
" elements." & (Chr(13)) & "The first element has: " & (Chr(13)) & "Tag number:" & _
Hex(LEADDICOM1.CurrentElement.Tag) & (Chr(13)) & "VR: " & _
Hex(LEADDICOM1.CurrentElement.VR)
End If

LEADDICOM1.EnableMethodErrors = True
End Sub

7. | Run your program to test it.
8. | Save the project to use as a starting point for other tasks in this tutorial.


Miscellaneous Examples (Visual Basic)

You can test any of the following examples by adding a command button and pasting the sample code in the Click procedure.

Accept Example for Visual Basic

AnnCount Example for Visual Basic

ChangeTransferSyntax Example for Visual Basic

CloseForced Example for Visual Basic

ConformanceStatus example for Visual Basic

Connect Example for Visual Basic

Converting DICOM Annotation Objects to LEAD Annotation Objects Example for Visual Basic

Converting LEAD Annotation Objects to DICOM Annotation Objects Example for Visual Basic

CreateAssociate Example for Visual Basic

Creating a Digital Signature Example for Visual Basic

Creating DICOM Annotations Example for Visual Basic

DefaultIOD example for Visual Basic

DefaultTag example for Visual Basic

DefaultUID example for Visual Basic

DefaultVR example for Visual Basic

DeleteBitmapValue Example for Visual Basic

DeleteElement Example for Visual Basic

DeleteIOD Example for Visual Basic

DeleteModule Example for Visual Basic

DeleteTag Example for Visual Basic

DeleteUID Example for Visual Basic

DeleteVR Example for Visual Basic

DSTempPath Example for Visual Basic

EnableMethodErrors Example for VisualBasic

Enumerating Context Groups Example for Visual Basic

Enumerating Digital Signatures Example for Visual Basic

Enumerating the Coded Concepts of a Context Group Example for Visual Basic

Examining a Digital Signature Example for Visual Basic

Examining Annotations (1) Example for Visual Basic

Examining Annotations (2) Example for Visual Basic

Extracting a Wave Stream From a Data Set Example for Visual Basic

FindFirstElement Example for Visual Basic

FindIndexModule Example for Visual Basic

FindLastElement Example for Visual Basic

FindModule Example for Visual Basic

FindModuleIOD Example for Visual Basic

FindPresentationAbstract Example for Visual Basic

GetAgeValue Example for Visual Basic

GetApplication Example for Visual Basic

GetAuthenticationAlgorithmTLS example for Visual Basic

GetBinaryValue Example for Visual Basic

GetBitmapCount Example for Visual Basic

GetCharValue Example for Visual Basic

GetConvertValue example for Visual Basic

GetDateTimeValue Example for Visual Basic

GetDateValue Example for Visual Basic

GetDoubleValue Example for Visual Basic

GetElementLevel Example for Visual Basic

GetEncryptionAlgorithmTLS Example for Visual Basic

GetEncryptKeyLengthTLS Example for Visual Basic

GetExtendedData Example for Visual Basic

GetFloatValue Example for Visual Basic

GetImageInformation Example for Visual Basic

GetInfoDS Example for Visual Basic

GetIntegrityAlgorithmTLS Example for Visual Basic

GetKeyExchangeAlgorithmTLS Example for Visual Basic

GetLongValue Example for Visual Basic

GetModuleCount Example for Visual Basic

GetMutualAuthKeyLengthTLS Example for Visual Basic

GetPeerAuthDataISCL Example for Visual Basic

GetPeerEncryptionISCL Example for Visual Basic

GetPeerMACISCL Example for Visual Basic

GetPeerRequestedMessageLengthISCL Example for Visual Basic

GetPresentationAbstract Example for Visual Basic

GetPresentationCount Example for Visual Basic

GetPresentationResult Example for Visual Basic

GetSendQueueSize Example for Visual Basic

GetServer Example for Visual Basic

GetShortValue Example for Visual Basic

GetStatusISCL Example for Visual Basic

GetStringValue Example for Visual Basic

GetTagCount Example for Visual Basic

GetTimeValue Example for Visual Basic

Getting an overlay bitmap list Example for Visual Basic

Getting and setting a non-linear VOI LUT Example for Visual Basic

Getting and setting window center and width Example for Visual Basic

Getting modality LUT data and attributes Example for Visual Basic

Getting palette color LUT data and attributes Example for Visual Basic

Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for Visual Basic

GetTransferCount Example for Visual Basic

GetUIDCount Example for Visual Basic

GetUserInfoCount Example for Visual Basic

GetVRCount Example for Visual Basic

IncludeVolatile Example for Visual Basic

InitCS Example for Visual Basic

InitDS Example for Visual Basic

InsertBitmapListValue Example for Visual Basic

InsertBitmapValue Example for Visual Basic

InsertDS Example for Visual Basic

InsertElement Example for Visual Basic

Inserting a Context Group Example for Visual Basic

Inserting a Wave Stream Into a Data Set Example for Visual Basic

Inserting a Waveform Group Into a Data Set Example for Visual Basic

InsertIOD Example for Visual Basic

InsertKey Example for Visual Basic

InsertModule Example for Visual Basic

InsertTag Example for Visual Basic

InsertUID Example for Visual Basic

InsertVR Example for Visual Basic

IsActivated Example for Visual Basic

IsAsyncOperations Example for Visual Basic

ISCLChallengeResponseSuccess Example for Visual Basic

IsImplementClass Example for Visual Basic

IsImplementVersion Example for Visual Basic

IsISCLQueueEmpty Example for Visual Basic

IsMaxLengthEnabled Example for Visual Basic

IsRoleSelect Example for Visual Basic

IsSupportLocked Example for Visual Basic

J2KCompressionControl Example for Visual Basic

J2KCompressionRatio Example for Visual Basic

J2KROIControl Example for Visual Basic

J2KSetDefaults Example for Visual Basic

J2KTargetFileSize Example for Visual Basic

KeepPixelDataIntact Example for Visual Basic

Listen Example for Visual Basic

LoadDS Example for Visual Basic

LoadDSArray Example for Visual Basic

Modifying a Context Group Example for Visual Basic

MoveFirstIOD Example for Visual Basic

MoveFirstTag Example for Visual Basic

MoveFirstUID Example for Visual Basic

MoveFirstVR Example for Visual Basic

MoveRootElement Example for Visual Basic

MoveRootIOD Example for Visual Basic

NetClose Example for Visual Basic

NetConnect Example for Visual Basic

NetNonSecureReceivedISCL Example for Visual Basic

NetNonSecureSendISCL Example for Visual Basic

NetReceive Example for Visual Basic

NetReceiveAbort Example for Visual Basic

NetReceiveAssociateAccept Example for Visual Basic

NetReceiveAssociateReject Example for Visual Basic

NetReceiveAssociateRequest Example for Visual Basic

NetReceiveCCancelRequest Example for Visual Basic

NetReceiveCEchoResponse Example for Visual Basic

NetReceiveCFindResponse Example for Visual Basic

NetReceiveCGetRequest Example for Visual Basic

NetReceiveCGetResponse Example for Visual Basic

NetReceiveCMoveRequest Example for Visual Basic

NetReceiveCMoveResponse Example for Visual Basic

NetReceiveCStoreResponse Example for Visual Basic

NetReceiveData Example for Visual Basic

NetReceiveNActionRequest Example for Visual Basic

NetReceiveNActionResponse Example for Visual Basic

NetReceiveNCreateResponse Example for Visual Basic

NetReceiveNDeleteResponse Example for Visual Basic

NetReceiveNGetRequest Example for Visual Basic

NetReceiveNGetResponse Example for Visual Basic

NetReceiveNReportRequest Example for Visual Basic

NetReceiveNReportResponse Example for Visual Basic

NetReceiveNSetRequest Example for Visual Basic

NetReceiveNSetResponse Example for Visual Basic

NetReceiveReleaseRequest Example for Visual Basic

NetReceiveReleaseResponse Example for Visual Basic

NetReceiveUnknown Example for Visual Basic

NetSecureLinkReady example for Visual Basic

NetSend Example for Visual Basic

Preamble Example for Visual Basic

ProgressStatus Example for Visual Basic

ResetDS Example for Visual Basic

ResetIOD Example for Visual Basic

ResetTag Example for Visual Basic

ResetUID Example for Visual Basic

ResetVR Example for Visual Basic

SaveDS example for Visual Basic

Searching the Data Set for a Digital Signature Example for Visual Basic

SendAbort Example for Visual Basic

SendAssociateRequest Example for Visual Basic

SendCCancelRequest Example for Visual Basic

SendCEchoRequest Example for Visual Basic

SendCEchoResponse Example for Visual Basic

SendCFindRequest Example for Visual Basic

SendCFindResponse Example for Visual Basic

SendCGetRequest Example for Visual Basic

SendCGetResponse Example for Visual Basic

SendCMoveRequest Example for Visual Basic

SendCStoreRequest Example for Visual Basic

SendCStoreResponse Example for Visual Basic

SendData Example for Visual Basic

SendNActionRequest Example for Visual Basic

SendNCreateRequest Example for Visual Basic

SendNCreateResponse Example for Visual Basic

SendNDeleteRequest Example for Visual Basic

SendNDeleteResponse Example for Visual Basic

SendNGetRequest Example for Visual Basic

SendNonSecureISCL Example for Visual Basic

SendNReportRequest Example for Visual Basic

SendNSetRequest Example for Visual Basic

SendReleaseRequest Example for Visual Basic

SetAuthDataISCL Example for Visual Basic

SetBitmapListValue example for Visual Basic

SetBitmapValue example for Visual Basic

SetCalled Example for Visual Basic

SetCipherToIndexTLS Example for Visual Basic

SetClientCertificateTLS Example for Visual Basic

SetCommandSet (DICOM Control) Example for Visual Basic

SetCurrentElement example for Visual Basic

SetDefaultEncryptionISCL Example for Visual Basic

SetDefaultSigningISCL Example for Visual Basic

SetEncryptKeyISCL Example for Visual Basic

SetMaxCommBlockLengthISCL Example for Visual Basic

SetMaxMessageLengthISCL Example for Visual Basic

SetMutualAuthAlgISCL Example for Visual Basic

SetMutualAuthKeyISCL Example for Visual Basic

SetRequest Example for Visual Basic

SetServerCertificateTLS example for Visual Basic

SetTagName example for Visual Basic

Setting an overlay bitmap list Example for Visual Basic

Setting modality LUT data and attributes Example for Visual Basic

Setting palette color LUT data and attributes Example for Visual Basic

Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for Visual Basic

SetUIDName example for Visual Basic

SetVRName example for Visual Basic

SSLCreateFlags Example for Visual Basic

StartUp Example for Visual Basic

Version Example for Visual Basic


Accept Example for Visual Basic

Private Sub LEADDICOMNet1_NetAccept (ByVal nStatus As Long)
Dim out$
Dim hClient As Long
Dim lClients As Long

'accepting the connection attempt
LEADDICOMNet1.Accept
'get the latest client
lClients = LEADDICOMNet1.GetClientCount(LEADDICOMNet1.hNet)
hClient = LEADDICOMNet1.GetClient(LEADDICOMNet1.hNet, lClients - 1)
'display some information about the connection:
out$ = "Peer: " & LEADDICOMNet1.GetPeerAddress (hClient)
List2.AddItem "Connection Accepted - " & out$
'reject the connection if we don't like the address
If (LEADDICOMNet1.GetPeerAddress (hClient) <> "207.238.49.199") Then
'close the connection
LEADDICOMNet1.Close hClient
End If
End Sub


AnnCount Example for Visual Basic

Private Sub AnnCount_Click()
'This example
' 1. Opens a dataset with annotations
' 2. Finds the location of one of the annotation files
' 3. Loads the annotations
' 4. Flips the annotations
' 5. Saves the annotations to index to slots 250 through 255
' 6. Deletes the annotation files from slot 253

Dim nRet As Integer
Dim i As Integer
Dim hAnnContainer As Long
Dim strMsg As String
Dim strTmp As String
Dim nIndexAnn As Integer
Dim RasterIO As New LEADRASTERIO
Dim RasterAnn As New LEADRasterAnnotation

' Open the dataset with annotations
nRet = LEADDICOM1.LoadDS ("e:\images\DicomAnn.dic", 0)
If (nRet <> DICOM_SUCCESS) Then Exit Sub

RasterIO.EnableMethodErrors = False
RasterIO.Load LEADRasterView1.Raster, "e:\images\DicomAnn.dic", 0, 0, 1

' Find the location of one of the annotation files
LEADDICOM1.AnnCount
If (nRet <> DICOM_SUCCESS) Then Exit Sub

strMsg = "Private Creator Tag: " + Hex(LEADDICOM1.AnnPrivateCreatorTag) + vbNewLine
For i = 0 To 255
If (LEADDICOM1.AnnEntries (i) = True) Then
nIndexAnn = i
strTmp = vbTab + Str(i) + vbNewLine
strMsg = strMsg + strTmp
End If
Next i
MsgBox strMsg

' Loads the annotations
LEADDICOM1.AnnLoad nIndexAnn, 1

' Flip the annotations
RasterAnn.AnnContainer = LEADDICOM1.AnnContainer
RasterAnn.AnnFlip True, LEADRasterView1.Raster.BitmapHeight / 2, False
LEADDICOM1.AnnContainer = RasterAnn.AnnContainer

' Save the annotations to index to slots 250 through 255
For i = 250 To 255
nRet = LEADDICOM1.AnnSave(i, ANN_FMT_NATIVE, False, SAVE_OVERWRITE, 1)
Next i

' Delete the annotation files from slot 253
LEADDICOM1.AnnDelete 253, -1

' Display file info
LEADDICOM1.AnnCount
If (nRet <> DICOM_SUCCESS) Then Exit Sub

strMsg = "Private Creator Tag: " + Hex(LEADDICOM1.AnnPrivateCreatorTag) + vbNewLine
For i = 0 To 255
If (LEADDICOM1.AnnEntries (i) = True) Then
strTmp = vbTab + Str(i) + vbNewLine
strMsg = strMsg + strTmp
End If
Next i
MsgBox strMsg

' Save the data set
LEADDICOM1.SaveDS "e:\erase\dicom.dic", 0

End Sub


BinaryValues2 Example for Visual Basic

Private Sub GetSetPrivateData(objDataSet As LEADDicomDS)
Dim PrivateDataTag As Long
Dim DicomRet As Integer
Dim PrivateTagData() As Byte
Dim lCount As Long
Dim Index As Integer

objDataSet.EnableMethodErrors = False
PrivateDataTag = &H19100E

' I am assuming that the dataset already has the our private element
DicomRet = objDataSet.FindFirstElement(PrivateDataTag, False)
If DicomRet <> 0 Then
Exit Sub
End If
'get the data
lCount = objDataSet.CurrentElement.Length
If lCount = 0 Then
Exit Sub
End If
DicomRet = objDataSet.GetBinaryValue(lCount)
If DicomRet <> 0 Then
Exit Sub
End If
PrivateTagData = objDataSet.BinaryValues2
For Index = 0 To lCount – 1
PrivateTagData(Index) = PrivateTagData(Index) + 1
Next
objDataSet.BinaryValues2 = PrivateTagData
objDataSet.SetBinaryValue lCount
End Sub


ChangeTransferSyntax Example for Visual Basic

' Load a Data Set
If LEADDICOM1.LoadDS ("d:\lead14\dist\images\dicom\image2.dic", 0) = DICOM_SUCCESS Then
' Change the Transfer Syntax to Explicit VR Big Endian
LEADDICOM1.ChangeTransferSyntax UID_EXPLICIT_VR_BIG_ENDIAN, 0, 0

' Save the new Data Set
LEADDICOM1.SaveDS "d:\temp\Temp.dic", 0
End If


CloseForced Example for Visual Basic

LEADDICOMNet1.NetworkSecurityMode = DICOM_SECURE_ISCL
LEADDICOMNet1.StartUp
' do some communications
LEADDICOMNet1.CloseForced LEADDICOMNet1.hNet, True


ConformanceStatus example for Visual Basic

Private Sub LEADDICOM1_ConformanceStatus (ByVal nFlags As Integer)
Dim msg As String
Dim nRet As Integer
Dim szTag As String
Dim szTagL As String
Dim szTagR As String
Dim nLen As Integer
Dim x As Integer

'display info about non-standard element
Select Case nFlags
Case CALLBACK_ERROR_UNKNOWN_CLASS
msg = "Unknown Class" & Chr(13)
Case CALLBACK_ERROR_UNKNOWN_TAG
msg = "Unknown Tag" & Chr(13)
Case CALLBACK_ERROR_UNKNOWN_VR
msg = "Unknown VR" & Chr(13)
Case CALLBACK_ERROR_WRONG_VR
msg = "Error in VR" & Chr(13)
Case CALLBACK_ERROR_MIN_VM
msg = "Error in MinVM" & Chr(13)
Case CALLBACK_ERROR_MAX_VM
msg = "Error in MaxVM" & Chr(13)
Case CALLBACK_ERROR_DIVIDE_VM
msg = "Error in DivideVM" & Chr(13)
Case CALLBACK_ERROR_IMAGE
msg = "Error in Image" & Chr(13)
Case Else
Exit Sub
End Select
szTag = Hex$(LEADDICOM1.CurrentElement.Tag)
nLen = Len(szTag)
szTagR = Right$(szTag, 4)
szTagL = ""
For x = nLen To 7
szTagL = szTagL & CStr(0)
Next
szTagL = szTagL & Left$(szTag, nLen - 4)
szTag = szTagL & ":" & szTagR
msg = msg & "Tag: " & szTag
nRet = MsgBox(msg, vbOKCancel, "Non-Standard Element")
If (nRet = vbCancel) Then
LEADDICOM1.EnableConformanceStatus = False
End If
End Sub


Connect Example for Visual Basic

'connect to a server
LEADDICOMNet1.Connect "", 0, "207.238.49.190", 104


Converting DICOM Annotation Objects to LEAD Annotation Objects Example for Visual Basic

Private Sub DicomAnnToLEADAnn(objPresStateDS As LEADDicomDS)
Dim objRasterAnn As New LEADRasterAnnotation

' Describe a DICOM graphic annotation object and then convert it to
' a LEAD annotation object
With objPresStateDS.GraphicObjectAttributes
.Type = DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE
.Filled = False
.PointCount = 5
.PointsX (0) = 90.7
.PointsY (0) = 156.9
.PointsX (1) = 195.9
.PointsY (1) = 156.9
.PointsX (2) = 195.9
.PointsY (2) = 342.5
.PointsX (3) = 90.7
.PointsY (3) = 342.5
.PointsX (4) = 90.7
.PointsY (4) = 156.9
End With
If objPresStateDS.ConvertDicomAnnObjToLEADAnnObj (True) = DICOM_SUCCESS Then
MsgBox "The DICOM graphic annotation object was converted successfully."

' The handle to the resulted LEAD annotation object is available from the
' LEADAnnObject property. You can now use the functionality of a LEAD Raster
' Annotation object to manipulate the object.

' Once done from the object, don't forget to destroy it
objRasterAnn.AnnDestroy objPresStateDS.LEADAnnObject, 0
End If

' Describe a DICOM text annotation object and then convert it to a
' LEAD annotation object
With objPresStateDS.TextObjectAttributes
.BoundingBoxUsed = True
.AnchorPointUsed = False
.TextValue = "Text annotation"
.BoundingBoxTLHCornerX = 290.5
.BoundingBoxTLHCornerY = 158.1
.BoundingBoxBRHCornerX = 424.1
.BoundingBoxBRHCornerY = 176.1
.BoundingBoxTextJustification = DICOM_TEXT_JUSTIFICATION_LEFT
End With
If objPresStateDS.ConvertDicomAnnObjToLEADAnnObj (False) = DICOM_SUCCESS Then
MsgBox "The DICOM text annotation object was converted successfully."

' The handle to the resulted LEAD annotation object is available from the
' LEADAnnObject property. You can now use the functionality of a LEAD Raster
' Annotation object to manipulate the object.

' Once done from the object, don't forget to destroy it
objRasterAnn.AnnDestroy objPresStateDS.LEADAnnObject, 0
End If
End Sub


Converting LEAD Annotation Objects to DICOM Annotation Objects Example for Visual Basic

' [General][Declarations]
'Private WithEvents objPresState As LEADDicomDS
Private Sub objPresState_OnConvertLEADAnnObjToDicomAnnObj(ByVal bGraphicObject As Boolean)
Dim sMsg As String

' Display the attributes of the resulted DICOM annotation object
If bGraphicObject Then ' The resulted DICOM annotation object is a graphic object
With objPresState.GraphicObjectAttributes
sMsg = "Graphic Annotation Units: "
Select Case .Units
Case DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Graphic Type: "
Select Case .Type
Case DICOM_GRAPHIC_OBJECT_TYPE_POINT
sMsg = sMsg & "POINT" & vbNewLine
Case DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE
sMsg = sMsg & "POLYLINE" & vbNewLine
Case DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED
sMsg = sMsg & "INTERPOLATED" & vbNewLine
Case DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE
sMsg = sMsg & "CIRCLE" & vbNewLine
Case DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE
sMsg = sMsg & "ELLIPSE" & vbNewLine
End Select

sMsg = sMsg & "Graphic Filled: "
If .Filled Then
sMsg = sMsg & "Y" & vbNewLine
Else
sMsg = sMsg & "N" & vbNewLine
End If

Dim lCount As Long, I As Long

lCount = .PointCount
sMsg = sMsg & "Number of Graphic Points: " & lCount & vbNewLine

If lCount < 10 Then
sMsg = sMsg & "Graphic Data: " & vbNewLine
For I = 0 To lCount - 1
sMsg = sMsg & " " & _
"X" & I + 1 & ", Y" & I + 1 & " = " & _
.PointsX (I) & ", " & .PointsY (I) & vbNewLine
Next
End If

MsgBox sMsg, , "Graphic Annotation Object"
End With
Else ' The resulted DICOM annotation object is a text object
With objPresState.TextObjectAttributes
If .BoundingBoxUsed Then
sMsg = "Unformatted Text Value: " & .TextValue & vbNewLine

sMsg = sMsg & "Bounding Box Annotation Units: "
Select Case .BoundingBoxUnits
Case DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & _
"Bounding Box Top Left Hand Corner: " & _
.BoundingBoxTLHCornerX & ", " & _
.BoundingBoxTLHCornerY & vbNewLine

sMsg = sMsg & _
"Bounding Box Bottom Right Hand Corner: " & _
.BoundingBoxBRHCornerX & ", " & _
.BoundingBoxBRHCornerY & vbNewLine

sMsg = sMsg & "Bounding Box Text Horizontal Justification: "
Select Case .BoundingBoxTextJustification
Case DICOM_TEXT_JUSTIFICATION_LEFT
sMsg = sMsg & "LEFT" & vbNewLine
Case DICOM_TEXT_JUSTIFICATION_RIGHT
sMsg = sMsg & "RIGHT" & vbNewLine
Case DICOM_TEXT_JUSTIFICATION_CENTER
sMsg = sMsg & "CENTER" & vbNewLine
End Select
Else
sMsg = "Unformatted Text Value: " & .TextValue & vbNewLine

sMsg = sMsg & "Anchor Point Annotation Units: "
Select Case .AnchorPointUnits
Case DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Anchor Point: " & _
.AnchorPointX & ", " & _
.AnchorPointY & vbNewLine

sMsg = sMsg & "Anchor Point Visibility: "
If .AnchorPointVisible Then
sMsg = sMsg & "Y"
Else
sMsg = sMsg & "N"
End If
End If

MsgBox sMsg, , "Text Annotation Object"
End With
End If

' If it is desired to stop the conversion process...
'objPresState.EndConversion DICOM_ERROR_ANN ' Any error code, but not 0
End Sub

Private Sub LEADAnnToDicomAnn(objPresStateDS As LEADDicomDS)
' Update the CurrentElement property with a Graphic Annotation Item so
' that the resulted DICOM annotation objects are added to the Data Set
If objPresStateDS.FindFirstGraphicAnnItem () <> 0 Then
' (Make sure that the specified layer is already defined in the
' "Graphic Layer Module")
objPresStateDS.CreateGraphicAnnItem 0, "LAYER_0"
objPresStateDS.FindFirstGraphicAnnItem
End If

Dim objRasterAnn As New LEADRasterAnnotation

' Let's create a LEAD rectangle annotation object
With objRasterAnn
.AnnCreate ANN_OBJECT_RECT, False, False
.AnnRectLeft(.AnnObject) = 150
.AnnRectTop(.AnnObject) = 175
.AnnRectWidth(.AnnObject) = 200
.AnnRectHeight(.AnnObject) = 100
.AnnSetFillMode .AnnObject, ANN_FILLMODE_TRANSPARENT, False
End With

' Convert the LEAD annotation object. Now, for each resulted DICOM annotation
' object, the OnConvertLEADAnnObjToDicomAnnObj event gets fired. By handling
' the event, you can inspect the resulted object.
If objPresStateDS.ConvertLEADAnnObjToDicomAnnObjs(objRasterAnn.AnnObject, 0) = DICOM_SUCCESS Then
MsgBox "The LEAD annotation object was converted successfully."
End If

' Destroy the LEAD annotation object
objRasterAnn.AnnDestroy objRasterAnn.AnnObject, 0
End Sub


CreateAssociate Example for Visual Basic

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU
MsgBox "Associate Request? " & CStr(LEADDICOMNet1.IsRequest (LEADDICOMNet1.hPDU))
'reset the Associate class to Accept
LEADDICOMNet1.ResetAssociate LEADDICOMNet1.hPDU, False
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU
MsgBox "Associate Request? " & CStr(LEADDICOMNet1.IsRequest (LEADDICOMNet1.hPDU))
'free the Associate class
LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU


Creating a Digital Signature Example for Visual Basic

Sub CreateSignature(objDS As LEADDicomDS)
Dim nRet As Integer

' Create a Digital Signature in the main Data Set
objDS.SetCurrentElement 0
nRet = objDS.CreateSignature ("C:\PrivateKey", "C:\Certificate.cer", "")
If nRet = DICOM_SUCCESS Then
MsgBox "The Digital Signature was created successfully.", , "Sample"
Else
MsgBox "An error occurred [Error: " & nRet & "].", , "Sample"
Exit Sub
End If

' Save the signed Data Set
objDS.SaveDS "C:\Signed.dic", 0

' Examine the Digital Signature we just created
' Refer to Examining a Digital Signature Example for Visual Basic
' for the procedure ExamineSignature
ExamineSignature objDS, objDS.CurrentElement.hElement
End Sub


Creating DICOM Annotations Example for Visual Basic

Private Sub CreateAnnotations(objPresStateDS As LEADDicomDS)
' Set the attributes that describe the "Presentation State Module"
With objPresStateDS.PresStateAttributes
.InstanceNumber = 1
.PresLabel = "SOME_LABEL"
.PresDescription = "Description of the presentation"
With .PresCreationDate
.Year = Year(Date)
.Month = Month(Date)
.Day = Day(Date)
End With
With .PresCreationTime
.Hours = Hour(Time)
.Minutes = Minute(Time)
.Seconds = Second(Time)
.Fractions = 0
End With
.PresCreatorName = "SomeOne"
End With
If objPresStateDS.SetPresStateAttributes () = DICOM_SUCCESS Then
MsgBox "Presentation State attributes were set successfully."
End If

' Add references to some images (under the "Presentation State Module")
objPresStateDS.AddPresStateImageRef "C:\Image1.dic"
objPresStateDS.AddPresStateImageRef "C:\Image2.dic"
objPresStateDS.AddPresStateImageRef "C:\Image3.dic"

Dim sLayerName As String

' Create a layer
With objPresStateDS.LayerAttributes
.LayerName = "LAYER_0" ' "Graphic Layer"
.LayerOrder = 1
.DisplayGrayscaleValue = -1
.DisplayRedValue = -1
.DisplayGreenValue = -1
.DisplayRedValue = -1
.LayerDescription = "Description of the layer"
End With
If objPresStateDS.CreateLayer () = DICOM_SUCCESS Then
sLayerName = objPresStateDS.LayerAttributes.LayerName

MsgBox "Layer '" & sLayerName & "' was created successfully."

' Change one of the attributes and update the layer
objPresStateDS.LayerAttributes.LayerOrder = 0
objPresStateDS.SetLayerAttributes objPresStateDS.NewLayerIndex
End If

Dim hGraphicAnnItem As Long

' Create a Graphic Annotation Item
If objPresStateDS.CreateGraphicAnnItem (0, sLayerName) = DICOM_SUCCESS Then
MsgBox "A Graphic Annotation Item was created successfully."

objPresStateDS.FindFirstGraphicAnnItem
hGraphicAnnItem = objPresStateDS.CurrentElement.hElement
End If

Dim sSOPInstanceUID As String

' The annotations defined in the Item hGraphicAnnItem will be applied
' only to one of the images listed in the Presentation State Module
If objPresStateDS.FindFirstPresStateRefSeriesItem () = DICOM_SUCCESS Then
If objPresStateDS.GetPresStateImageRefCount () > 0 Then
sSOPInstanceUID = objPresStateDS.GetPresStateImageRefInstanceUID (0)
End If
End If
objPresStateDS.SetCurrentElement hGraphicAnnItem
objPresStateDS.AddLayerImageRef sSOPInstanceUID

' Let's create a graphic annotation object
With objPresStateDS.GraphicObjectAttributes
.LayerName = sLayerName
.Units = DICOM_UNIT_PIXEL
.Type = DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE
.Filled = True
.PointCount = 2 ' "Number of Graphic Points"
' "Graphic Data":
.PointsX (0) = 252.5
.PointsY (0) = 252.5
.PointsX (1) = 209.2
.PointsY (1) = 199.6
End With
If objPresStateDS.CreateGraphicObject(True) = DICOM_SUCCESS Then
MsgBox "A graphic annotation object was created successfully."

' Change one of the attributes and update the object
objPresStateDS.GraphicObjectAttributes.Filled = False
objPresStateDS.SetGraphicObjectAttributes 0
End If

' Let's now create a text annotation object
With objPresStateDS.TextObjectAttributes
.LayerName = sLayerName
.BoundingBoxUsed = True
.AnchorPointUsed = False
.BoundingBoxUnits = DICOM_UNIT_PIXEL
.TextValue = "Text annotation (using a bounding box)"
.BoundingBoxTLHCornerX = 176.7
.BoundingBoxTLHCornerY = 117.7
.BoundingBoxBRHCornerX = 320.3
.BoundingBoxBRHCornerY = 136.1
.BoundingBoxTextJustification = DICOM_TEXT_JUSTIFICATION_RIGHT
End With
If objPresStateDS.CreateTextObject(True) = DICOM_SUCCESS Then
MsgBox "A text annotation object was created successfully."

' Change one of the attributes and update the object
objPresStateDS.TextObjectAttributes.BoundingBoxTextJustification = DICOM_TEXT_JUSTIFICATION_LEFT
objPresStateDS.SetTextObjectAttributes 0
End If

' And another text annotation object
With objPresStateDS.TextObjectAttributes
.LayerName = sLayerName
.AnchorPointUsed = True
.BoundingBoxUsed = False
.AnchorPointUnits = DICOM_UNIT_PIXEL
.TextValue = "Text annotation (using an anchor point)"
.AnchorPointX = 277.9
.AnchorPointY = 382.7
.AnchorPointVisible = True
End With
If objPresStateDS.CreateTextObject(True) = DICOM_SUCCESS Then
MsgBox "Another text annotation object was created successfully."
End If
End Sub


DefaultIOD example for Visual Basic

'Restore Default IOD table
Screen.MousePointer = vbHourglass
LEADDICOM1.DefaultIOD
Screen.MousePointer = vbDefault


DefaultTag example for Visual Basic

'Restore default Tag values
Screen.MousePointer = vbHourglass
LEADDICOM1.DefaultTag
Screen.MousePointer = vbDefault


DefaultUID example for Visual Basic

Screen.MousePointer = vbHourglass
'Restore to default values
LEADDICOM1.DefaultUID
Screen.MousePointer = vbDefault


DefaultVR example for Visual Basic

Screen.MousePointer = vbHourglass
LEADDICOM1.DefaultVR
Screen.MousePointer = vbDefault


DeleteBitmapValue Example for Visual Basic

Private Sub TestProcReplaceBitmap()
Dim nRet As Integer
Dim Process As New LEADRasterProcess

LEADDICOM1.EnableMethodErrors = False

'move to the first image element
nRet = LEADDICOM1.FindFirstElement (TAG_PIXEL_DATA, False)
'get the first image
nRet = LEADDICOM1.GetBitmapValue (0, 0, ORDER_BGR, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
'flip the image
Process.Flip LEADRasterView1.Raster

'delete the first image from the dataset
nRet = LEADDICOM1.DeleteBitmapValue(0, 1)

'now update the list with the flipped image
nRet = LEADDICOM1.InsertBitmapValue (LEADRasterView1.Raster.Bitmap, 0, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)
End Sub


DeleteElement Example for Visual Basic

Private Sub DSDeleteElement_Click()
Dim nRet As Integer
LEADDICOM1.EnableMethodErrors = False
LEADDICOM1.FindFirstElement TAG_STUDY_DATE, False
nRet = LEADDICOM1.DeleteElement
LEADDICOM1.EnableMethodErrors = True
If (nRet <> 0) Then
MsgBox "Error Deleting Element!"
End If
End Sub


DeleteIOD Example for Visual Basic

Private Sub Command14_Click()
LEADDICOM1.EnableMethodErrors = True
On Error GoTo DELETEIODERROR
LEADDICOM1.MoveFirstIOD False
LEADDICOM1.DeleteIOD
Exit Sub

DELETEIODERROR:
MsgBox "Error"
End Sub


DeleteModule Example for Visual Basic

Private Sub Test2Menu_Click()
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False
'move to the first module in the DataSet and delete it
LEADDICOM1.FindIndexModule 0
nRet = LEADDICOM1.DeleteModule(LEADDICOM1.CurrentModule.Module)
If (nRet <> 0) Then
MsgBox "Error Deleting Module!"
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


DeleteTag Example for Visual Basic

Private Sub Command10_Click()
Dim lCode As Long
Dim lIndex As Long

On Error GoTo DELETETAGERROR
lCode = 131073
'move to the selected Tag
LEADDICOM1.FindTag (lCode)
'delete it
LEADDICOM1.DeleteTag

Exit Sub
DELETETAGERROR:
MsgBox "Error"
End Sub


DeleteUID Example for Visual Basic

Private Sub Command10_Click()
Dim pszCode As String
Dim nIndex As Integer

LEADDICOM1.EnableMethodErrors = True
On Error GoTo DELETEUIDERROR
pszCode = "1.2.840.10008.1.2"
'move to the selected UID
LEADDICOM1.FindUID (pszCode)
'delete it
LEADDICOM1.DeleteUID

Exit Sub
DELETEUIDERROR:
MsgBox "Error"
End Sub


DeleteVR Example for Visual Basic

Private Sub Command10_Click()
Dim nCode As Integer
Dim lIndex As Long

LEADDICOM1.EnableMethodErrors = True

On Error GoTo DELETEVRERROR
nCode = 18771
'move to the selected VR
LEADDICOM1.FindVR (nCode)
'delete it
LEADDICOM1.DeleteVR

Exit Sub
DELETEVRERROR:
MsgBox "Error"
End Sub


DSTempPath Example for Visual Basic

LEADDICOM1.DSTempPath = "d:\temp"


EnableMethodErrors Example for Visual Basic

EnableMethodErrors (ILEADDicomNet) Example for Visual Basic

'disable method errors
LEADDICOMNet1.EnableMethodErrors = False


Enumerating Context Groups Example for Visual Basic

Private Function DisplayContextGroup(objDS As LEADDicomDS) As VbMsgBoxResult
Dim objGroup As DicomContextGroup
Set objGroup = objDS.CurrentContextGroup

Dim sMsg As String

' Context ID and name
sMsg = objGroup.ContextIdentifier & vbNewLine & _
objGroup.Name & vbNewLine

' Extensibility
If objGroup.Extensible Then
sMsg = sMsg & "Extensible" & vbNewLine
Else
sMsg = sMsg & "Non-extensible" & vbNewLine
End If

' Context Group Version
Dim sYear As String, sMonth As String, sDay As String
With objGroup.ContextGroupVersion
sYear = .Year
Do While Len(sYear) < 4
sYear = "0" & sYear
Loop

sMonth = .Month
If Len(sMonth) < 2 Then sMonth = "0" & sMonth

sDay = .Day
If Len(sDay) < 2 Then sDay = "0" & sDay
End With
sMsg = sMsg & sYear & sMonth & sDay & vbNewLine

sMsg = sMsg & vbNewLine & "Enumerate Coded Concepts?"
DisplayContextGroup = MsgBox(sMsg, vbYesNoCancel, "Context Group")
End Function

Private Sub EnumContextGroups(objDS As LEADDicomDS)
Dim bRet As Boolean, sMsg As String

objDS.ResetContextGroup

' Load all the Context Groups
objDS.LoadContextGroup

' Enumerate them (3 possible ways)
If True Then
' One possible way to enumerate the Context Groups
bRet = objDS.MoveFirstContextGroup()
Do While bRet
Select Case DisplayContextGroup(objDS)
Case vbYes
' Refer to Enumerating the Coded Concepts of a Context Group
' Example for Visual Basic for the procedure EnumCodedConcepts
EnumCodedConcepts objDS

Case vbCancel
Exit Do
End Select

bRet = objDS.MoveNextContextGroup ()
Loop

ElseIf False Then
' Another way to enumerate the Context Groups
Dim I As Long
For I = 0 To objDS.GetContextGroupCount () - 1
objDS.FindIndexContextGroup I

Select Case DisplayContextGroup(objDS)
Case vbYes
EnumCodedConcepts objDS

Case vbCancel
Exit For
End Select
Next

ElseIf False Then
' A third way to enumerate the Context Groups
bRet = objDS.MoveLastContextGroup ()
Do While bRet
Select Case DisplayContextGroup(objDS)
Case vbYes
EnumCodedConcepts objDS

Case vbCancel
Exit Do
End Select

bRet = objDS.MovePrevContextGroup ()
Loop
End If
End Sub


Enumerating Digital Signatures Example for Visual Basic

Sub EnumerateSignatures(objDS As LEADDicomDS)
' We will enumerate the Digital Signatures in the main Data Set

Dim lSignaturesCount As Long

objDS.SetCurrentElement 0
lSignaturesCount = objDS.GetSignaturesCount ()
If lSignaturesCount = 0 Then
MsgBox "No Digital Signatures in the main Data Set.", , "Sample"
Exit Sub
End If

Dim sMsg As String

If lSignaturesCount = 1 Then
sMsg = "There is 1 Digital Signature in the main Data Set. " & _
"Do you want to examine it?"
Else
sMsg = "There are " & lSignaturesCount & _
" Digital Signatures in the main Data Set. " & _
"Do you want to examine them?"
End If
If MsgBox(sMsg, vbYesNo, "Sample") <> vbYes Then
Exit Sub
End If

Dim I As Long

For I = 0 To lSignaturesCount - 1
objDS.MoveSignature I

' Refer to Examining a Digital Signature Example for Visual Basic
' for the procedure ExamineSignature
ExamineSignature objDS, objDS.CurrentElement.hElement

objDS.SetCurrentElement 0
Next
End Sub


Enumerating the Coded Concepts of a Context Group Example for Visual Basic

Private Function DisplayCodedConcept(objDS As LEADDicomDS, _
bYesNo As Boolean) As Boolean
Dim sTitle As String
objDS.MoveCodedConceptGroup
sTitle = "Coded Concept (" & _
objDS.CurrentContextGroup.ContextIdentifier & ")"

Dim sMsg As String

With objDS.CurrentCodedConcept
' Coding Scheme Designator
sMsg = .CodingSchemeDesignator & vbNewLine

' Coding Scheme Version
If Len(.CodingSchemeVersion) Then
sMsg = sMsg & .CodingSchemeVersion & vbNewLine
End If

' Code Value and Code Meaning
sMsg = sMsg & .CodeValue & vbNewLine & .CodeMeaning & vbNewLine

' Context Group Local Version
If .IsContextGroupLocalVersion Then
Dim sYear As String
sYear = .ContextGroupLocalVersion.Year
Do While Len(sYear) < 4
sYear = "0" & sYear
Loop

Dim sMonth As String
sMonth = .ContextGroupLocalVersion.Month
If Len(sMonth) < 2 Then sMonth = "0" & sMonth

Dim sDay As String
sDay = .ContextGroupLocalVersion.Day
If Len(sDay) < 2 Then sDay = "0" & sDay

sMsg = sMsg & sYear & sMonth & sDay & vbNewLine
End If

' Context Group Extension Creator UID
If Len(.ContextGroupExtensionCreatorUID) Then
sMsg = sMsg & .ContextGroupExtensionCreatorUID & vbNewLine
End If
End With

If bYesNo Then
sMsg = sMsg & vbNewLine & "Continue?"
DisplayCodedConcept = MsgBox(sMsg, vbYesNo, sTitle) = vbYes
Else
MsgBox sMsg, vbOKOnly, sTitle
DisplayCodedConcept = True
End If
End Function

Private Sub EnumCodedConcepts(objDS As LEADDicomDS)
Dim bRet As Boolean

' Enumerate the Coded Concepts in the current Context Group (3 possible ways)
If True Then
' One possible way to enumerate the Coded Concepts
bRet = objDS.MoveFirstCodedConcept()
Do While bRet
If Not DisplayCodedConcept(objDS, True) Then
Exit Do
End If

bRet = objDS.MoveNextCodedConcept ()
Loop

ElseIf False Then
' Another way to enumerate the Coded Concepts
Dim I As Long
For I = 0 To objDS.GetCodedConceptCount () - 1
objDS.FindIndexCodedConcept I

If Not DisplayCodedConcept(objDS, True) Then
Exit For
End If
Next

ElseIf False Then
' A third way to enumerate the Coded Concepts
bRet = objDS.MoveLastCodedConcept ()
Do While bRet
If Not DisplayCodedConcept(objDS, True) Then
Exit Do
End If

bRet = objDS.MovePrevCodedConcept ()
Loop
End If
End Sub


Examining a Digital Signature Example for Visual Basic

Function GetFormatted(sValue As String, nWidth As Integer) As String
GetFormatted = sValue
Do While Len(GetFormatted) < nWidth
GetFormatted = "0" & GetFormatted
Loop
End Function

Sub ExamineSignature(objDS As LEADDicomDS, hSignatureItem As Long)
Dim nRet As Integer

objDS.SetCurrentElement hSignatureItem

' Verify the Digital Signature; if hSignatureItem is 0, the method will
' verify all the Digital Signatures that exist in the Data Set
nRet = objDS.VerifySignature ()
Select Case nRet
Case DICOM_SUCCESS
If hSignatureItem <> 0 Then
MsgBox "The Digital Signature was verified.", , "Sample"
Else
MsgBox "All Digital Signatures were verified (if there are any).", , _
"Sample"
Exit Sub
End If

Case DICOM_ERROR_INVALID_SIGNATURE
If hSignatureItem <> 0 Then
MsgBox "The Digital Signature is invalid.", , "Sample"
Else
MsgBox "At least one Digital Signature is invalid.", , "Sample"
End If
Exit Sub

Case Else
MsgBox "An error occurred [Error: " & nRet & "].", , "Sample"
Exit Sub
End Select

Dim sMsg As String

' The Digital Signature UID
If objDS.GetSignatureUID () = DICOM_SUCCESS Then
If objDS.StringValueCount > 0 Then
sMsg = "Digital Signature UID: " & objDS.StringValues(0) & vbNewLine
End If
End If

' The Digital Signature DateTime
If objDS.GetSignatureDateTime () = DICOM_SUCCESS Then
If objDS.DateTimeValueCount > 0 Then
With objDS.DateTimeValues(0)
Dim sSign As String
If .Offset >= 0 Then sSign = "+" Else sSign = "-"

sMsg = sMsg & "Digital Signature DateTime: " & _
GetFormatted(.Month, 2) & "/" & _
GetFormatted(.Day, 2) & "/" & _
GetFormatted(.Year, 4) & " " & _
GetFormatted(.Hours, 2) & ":" & _
GetFormatted(.Minutes, 2) & ":" & _
GetFormatted(.Seconds, 2) & "." & _
GetFormatted(.Fractions, 6) & " " & _
sSign & _
GetFormatted(.Offset, 4) & _
vbNewLine
End With
End If
End If

' The MAC Calculation Transfer Syntax UID
If objDS.GetMacTransferSyntax() = DICOM_SUCCESS Then
If objDS.StringValueCount > 0 Then
sMsg = sMsg & "MAC Calculation Transfer Syntax UID: " & _
objDS.StringValues(0) & vbNewLine
End If
End If

' The MAC Algorithm
If objDS.GetMacAlgorithm () = DICOM_SUCCESS Then
If objDS.StringValueCount > 0 Then
sMsg = sMsg & "MAC Algorithm: " & objDS.StringValues(0) & vbNewLine
End If
End If

' The Data Elements Signed
If objDS.GetSignedElementsCount () > 0 Then
sMsg = sMsg & "Data Elements Signed: "

' We will display only one
If objDS.MoveSignedElement(0) = DICOM_SUCCESS Then
Dim sTag As String, sGroup As String, sElement As String

sTag = Hex(objDS.CurrentElement.Tag)
sElement = Right(sTag, 4)
sGroup = Left(sTag, Len(sTag) - 4)

sMsg = sMsg & "(" & GetFormatted(sGroup, 4) & "," & sElement & "), ..."

objDS.SetCurrentElement hSignatureItem
End If

sMsg = sMsg & vbNewLine
End If

sMsg = sMsg & vbNewLine & "Do you want to save the Certificate of Signer?"

' Display the information we have about the Digital Signature
If MsgBox(sMsg, vbYesNo, "Sample") = vbYes Then
' Save the Certificate of Signer
objDS.SaveCertificate "C:\CertOfSigner.cer"
End If
End Sub


Examining Annotations (1) Example for Visual Basic

Private Sub ExamineAnnotations1(objPresStateDS As LEADDicomDS)
Dim sMsg As String

' Get the attributes that describe the "Presentation State Module"
If objPresStateDS.GetPresStateAttributes (0) = DICOM_SUCCESS Then
' Display some
With objPresStateDS.PresStateAttributes
sMsg = "Instance Number: " & .InstanceNumber & vbNewLine & _
"Presentation Label: " & .PresLabel & vbNewLine & _
"Presentation Description: " & .PresDescription & vbNewLine & _
"Presentation Creator’s Name: " & .PresCreatorName
End With

MsgBox sMsg, , "Presentation State Attributes"
End If

Dim lCount As Long, I As Long, J As Long

' Display the SOP Instance UIDs of all the images referenced in the
' "Presentation State Module"
If objPresStateDS.FindFirstPresStateRefSeriesItem () = DICOM_SUCCESS Then
sMsg = ""
Do
lCount = objPresStateDS.GetPresStateImageRefCount ()
For I = 0 To lCount - 1
sMsg = sMsg & _
objPresStateDS.GetPresStateImageRefInstanceUID (I) & _
vbNewLine
Next

sMsg = sMsg & vbNewLine
Loop While objPresStateDS.MoveNextPresStateRefSeriesItem () = DICOM_SUCCESS

MsgBox sMsg, , "Referenced SOP Instance UID(s)"
End If

' Enumerate all the layers defined
lCount = objPresStateDS.LayerCount
MsgBox "Layer Count: " & lCount
For I = 0 To lCount - 1
' Display some of the attributes
If objPresStateDS.GetLayerAttributes (I) = DICOM_SUCCESS Then
With objPresStateDS.LayerAttributes
sMsg = "Graphic Layer: " & .LayerName & vbNewLine & _
"Graphic Layer Order: " & .LayerOrder & vbNewLine & _
"Graphic Layer Description: " & .LayerDescription
End With

MsgBox sMsg, , "Graphic Layer Attributes"
End If
Next

Dim lGraphicObjectCount As Long, lTextObjectCount As Long

' Enumerate all the Graphic Annotation Items
If objPresStateDS.FindFirstGraphicAnnItem () = DICOM_SUCCESS Then
Do
lGraphicObjectCount = objPresStateDS.GetGraphicObjectCount ()
' Or:
'lGraphicObjectCount = objPresStateDS.GetLayerGraphicObjectCount ()

lTextObjectCount = objPresStateDS.GetTextObjectCount ()
' Or:
'lTextObjectCount = objPresStateDS.GetLayerTextObjectCount()

sMsg = "Graphic Layer: " & objPresStateDS.GetLayerName () & vbNewLine & _
"Graphic object count: " & lGraphicObjectCount & vbNewLine & _
"Text object count: " & lTextObjectCount & vbNewLine & vbNewLine

lCount = objPresStateDS.GetLayerImageRefCount ()
If lCount = 0 Then
sMsg = sMsg & _
"The annotations defined in this Item apply to all the " & _
"images listed in the ""Presentation State Module""."
Else
sMsg = sMsg & "Referenced SOP Instance UID(s):" & vbNewLine
For I = 0 To lCount - 1
sMsg = sMsg & " " & _
objPresStateDS.GetLayerImageRefInstanceUID (I) & vbNewLine
Next
End If

MsgBox sMsg, , "Graphic Annotation Item"

' Enumerate all the graphic objects in the current Item
For I = 0 To lGraphicObjectCount - 1
objPresStateDS.GetGraphicObjectAttributes I
With objPresStateDS.GraphicObjectAttributes
sMsg = "Graphic Annotation Units: "
Select Case .Units
Case DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Graphic Type: "
Select Case .Type
Case DICOM_GRAPHIC_OBJECT_TYPE_POINT
sMsg = sMsg & "POINT" & vbNewLine
Case DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE
sMsg = sMsg & "POLYLINE" & vbNewLine
Case DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED
sMsg = sMsg & "INTERPOLATED" & vbNewLine
Case DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE
sMsg = sMsg & "CIRCLE" & vbNewLine
Case DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE
sMsg = sMsg & "ELLIPSE" & vbNewLine
End Select

If .Filled Then
sMsg = sMsg & "Graphic Filled: Y" & vbNewLine
Else
sMsg = sMsg & "Graphic Filled: N" & vbNewLine
End If

lCount = .PointCount
sMsg = sMsg & "Number of Graphic Points: " & lCount & vbNewLine

If lCount < 10 Then
sMsg = sMsg & "Graphic Data: " & vbNewLine
For J = 0 To lCount - 1
sMsg = sMsg & " " & _
"X" & J + 1 & ", Y" & J + 1 & " = " & _
.PointsX (J) & ", " & .PointsY (J) & vbNewLine
Next
End If

MsgBox sMsg, , "Graphic Annotation Object"
End With
Next

' Enumerate all the text objects in the current Item
For I = 0 To lTextObjectCount - 1
objPresStateDS.GetTextObjectAttributes I
With objPresStateDS.TextObjectAttributes
If .BoundingBoxUsed Then
sMsg = "Unformatted Text Value: " & .TextValue & vbNewLine

sMsg = sMsg & "Bounding Box Annotation Units: "
Select Case .BoundingBoxUnits
Case DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & _
"Bounding Box Top Left Hand Corner: " & _
.BoundingBoxTLHCornerX & ", " & _
.BoundingBoxTLHCornerY & vbNewLine

sMsg = sMsg & _
"Bounding Box Bottom Right Hand Corner: " & _
.BoundingBoxBRHCornerX & ", " & _
.BoundingBoxBRHCornerY & vbNewLine

sMsg = sMsg & "Bounding Box Text Horizontal Justification: "
Select Case .BoundingBoxTextJustification
Case DICOM_TEXT_JUSTIFICATION_LEFT
sMsg = sMsg & "LEFT" & vbNewLine
Case DICOM_TEXT_JUSTIFICATION_RIGHT
sMsg = sMsg & "RIGHT" & vbNewLine
Case DICOM_TEXT_JUSTIFICATION_CENTER
sMsg = sMsg & "CENTER" & vbNewLine
End Select
Else
sMsg = "Unformatted Text Value: " & .TextValue & vbNewLine

sMsg = sMsg & "Anchor Point Annotation Units: "
Select Case .AnchorPointUnits
Case DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Anchor Point: " & _
.AnchorPointX & ", " & _
.AnchorPointY & vbNewLine

If .AnchorPointVisible Then
sMsg = sMsg & "Anchor Point Visibility: Y"
Else
sMsg = sMsg & "Anchor Point Visibility: N"
End If
End If

MsgBox sMsg, , "Text Annotation Object"
End With
Next
Loop While objPresStateDS.MoveNextGraphicAnnItem () = DICOM_SUCCESS
End If
End Sub


Examining Annotations (2) Example for Visual Basic

Private Sub ExamineAnnotations2(objPresStateDS As LEADDicomDS)
Dim sRefSOPInstanceUID As String

' Pick one of the images referenced in the "Presentation State Module" and
' get its SOP Instance UID
If objPresStateDS.FindFirstPresStateRefSeriesItem () = DICOM_SUCCESS Then
If objPresStateDS.GetPresStateImageRefCount () > 0 Then
sRefSOPInstanceUID = objPresStateDS.GetPresStateImageRefInstanceUID (0)
End If
End If

' Find the SOP Class UID of that image
If objPresStateDS.FindPresStateRefImageItem(sRefSOPInstanceUID) = DICOM_SUCCESS Then
If objPresStateDS.MoveChildElement () = 0 Then
If objPresStateDS.FindFirstElement (TAG_REFERENCED_SOP_CLASS_UID, True) = 0 Then
If objPresStateDS.GetStringValue (0, 1) = 0 Then
MsgBox objPresStateDS.StringValues(0), , "Referenced SOP Class UID"
End If
End If
End If
End If

' Remove the reference to that image from the "Presentation State Module"
objPresStateDS.RemovePresStateImageRef sRefSOPInstanceUID

' Pick a Graphic Annotation Item
If objPresStateDS.FindFirstGraphicAnnItem () = DICOM_SUCCESS Then
Dim hGraphicAnnotationItem As Long
hGraphicAnnotationItem = objPresStateDS.CurrentElement.hElement

' Pick an image reference
If objPresStateDS.GetLayerImageRefCount () > 0 Then
sRefSOPInstanceUID = objPresStateDS.GetLayerImageRefInstanceUID (0)
objPresStateDS.FindLayerRefImageItem sRefSOPInstanceUID

' Display one of the attributes of the Referenced Image Item
If objPresStateDS.MoveChildElement () = 0 Then
If objPresStateDS.FindFirstElement (TAG_REFERENCED_SOP_CLASS_UID, True) = 0 Then
If objPresStateDS.GetStringValue (0, 1) = 0 Then
MsgBox "Referenced SOP Class UID: " & _
objPresStateDS.StringValues (0), , _
"Referenced Image Item"
End If
End If
End If

objPresStateDS.SetCurrentElement hGraphicAnnotationItem

' Remove the image reference
objPresStateDS.RemoveLayerImageRef sRefSOPInstanceUID

' Remove all references to images that are listed in this Graphic Annotation
' Item (this way, the annotations defined by this Item will be applied to all
' the images listed in the "Presentation State Module")
objPresStateDS.RemoveAllLayerImageRefs
End If

Dim sGraphicLayer As String
sGraphicLayer = objPresStateDS.GetLayerName ()

' Display some of the layer's attributes
objPresStateDS.GetLayerAttributes objPresStateDS.GetLayerIndex (sGraphicLayer)
With objPresStateDS.LayerAttributes
MsgBox "Graphic Layer: " & .LayerName & vbNewLine & _
"Graphic Layer Order: " & .LayerOrder & vbNewLine & _
"Graphic Layer Description: " & .LayerDescription, , _
"Graphic Layer Attributes"
End With

' Change the layer of this Graphic Annotation Item (the specified new
' layer should already be defined in the "Graphic Layer Module")
objPresStateDS.SetLayerName "ANOTHER_LAYER"

' Pick a graphic annotation object
If objPresStateDS.GetGraphicObjectCount () > 0 Then
objPresStateDS.FindGraphicObjectItem 0

' Display one of the attributes of this object
If objPresStateDS.MoveChildElement () = 0 Then
' Graphic Type (0070,0023)
If objPresStateDS.FindFirstElement (&H700023, True) = 0 Then
If objPresStateDS.GetStringValue (0, 1) = 0 Then
MsgBox "Graphic Type: " & objPresStateDS.StringValues (0), , _
"Graphic Annotation Object"
End If
End If
End If

objPresStateDS.SetCurrentElement hGraphicAnnotationItem

' Remove the object
objPresStateDS.RemoveGraphicObject 0

' Remove all the graphic annotation objects defined by this Graphic
' Annotation Item
objPresStateDS.RemoveAllGraphicObjects
' Or:
'objPresStateDS.RemoveLayerGraphicObjects
End If

' Pick a text annotation object
If objPresStateDS.GetTextObjectCount () > 0 Then
objPresStateDS.FindTextObjectItem 0

' Display one of the attributes of this object
If objPresStateDS.MoveChildElement () = 0 Then
' Unformatted Text Value (0070,0006)
If objPresStateDS.FindFirstElement (&H700006, True) = 0 Then
If objPresStateDS.GetStringValue (0, 1) = 0 Then
MsgBox "Unformatted Text Value: " & _
objPresStateDS.StringValues (0), , _
"Text Annotation Object"
End If
End If
End If

objPresStateDS.SetCurrentElement hGraphicAnnotationItem

' Remove the object
objPresStateDS.RemoveTextObject 0

' Remove all the text annotation objects defined by this Graphic
' Annotation Item
objPresStateDS.RemoveAllTextObjects
' Or:
'objPresStateDS.RemoveLayerTextObjects
End If
End If

' Remove all references to images that are listed in all the Graphic Annotation
' Items (this way, the annotations defined by all the Items will be applied to all
' the images listed in the "Presentation State Module")
objPresStateDS.RemoveAllLayersImageRefs

' Remove all references to images from the "Presentation State Module"
objPresStateDS.RemoveAllPresStateImageRefs

' Pick one of the layers
If objPresStateDS.LayerCount > 0 Then
objPresStateDS.FindLayerItem 0

' Display one of the attributes of this layer
If objPresStateDS.MoveChildElement () = 0 Then
' Graphic Layer (0070,0002)
If objPresStateDS.FindFirstElement (&H700002, True) = 0 Then
If objPresStateDS.GetStringValue (0, 1) = 0 Then
MsgBox "Graphic Layer: " & objPresStateDS.StringValues (0), , _
"Graphic Layer"
End If
End If
End If

' Remove the layer
objPresStateDS.RemoveLayer 0, True

' Remove all the layers defined in the "Graphic Layer Module"
objPresStateDS.RemoveAllLayers True
End If
End Sub


Extracting a Wave Stream From a Data Set Example for Visual Basic

Function GetWaveFileFromDataSet(objDataSet As LEADDicomDS, _
sResultingWaveFilename As String) As Boolean

GetWaveFileFromDataSet = False

' Do we have any waveforms in the Data Set?
If objDataSet.GetWaveformGroupCount () < 1 Then
Exit Function
End If

Dim objAudioWaveformGroup As New DicomWaveformGroup
objAudioWaveformGroup.EnableMethodErrors = False

' Extract the first waveform group
If objDataSet.GetWaveformGroup (0, objAudioWaveformGroup) <> DICOM_SUCCESS Then
Exit Function
End If

' Extract the wave stream from the waveform group and save it to disk
If objAudioWaveformGroup.SaveAudio (sResultingWaveFilename) <> DICOM_SUCCESS Then
Exit Function
End If

GetWaveFileFromDataSet = True
End Function


FindFirstElement Example for Visual Basic

Private Sub TestProc()
'Find the first image element and display it
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to first element in Data Set
LEADDICOM1.MoveFirstElement False

LEADDICOM1.FindFirstElement TAG_PIXEL_DATA, False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name

'find each image
While (True)
LEADDICOM1.FindNextElement False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name
Wend

MOVEELEMENTERROR:
MsgBox "No More Images"
End Sub


FindIndexModule Example for Visual Basic

Private Sub TestMenu_Click()
Dim lCount As Long
Dim szOut As String
Dim x As Long

LEADDICOM1.EnableMethodErrors = False
lCount = LEADDICOM1.GetModuleCount
LEADDICOM1.GetInfoDS
szOut = "Found " & CStr(lCount) & " Modules" & Chr(10) & Chr(13)
For x = 0 To lCount - 1
LEADDICOM1.FindIndexModule x
LEADDICOM1.FindModuleIOD LEADDICOM1.InfoClass, LEADDICOM1.CurrentModule.Module
szOut = szOut & "Module " & LEADDICOM1.CurrentIOD.Name & Chr(10) & Chr(13)
Next
MsgBox szOut
LEADDICOM1.EnableMethodErrors = True
End Sub


FindLastElement Example for Visual Basic

Private Sub DSDeleteModule_Click()
'Find the last image element and display it
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to last element in Data Set
LEADDICOM1.MoveLastElement False

LEADDICOM1.FindLastElement TAG_PIXEL_DATA, False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name

'find each image
While (True)
LEADDICOM1.FindPrevElement False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name
Wend

MOVEELEMENTERROR:
MsgBox "No More Images"
End Sub


FindModule Example for Visual Basic

Dim nRet As Integer
LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.FindModule(DICOM_MODULE_NM_TOMO_ACQUISITION)
If nRet <> 0 Then
MsgBox "Not Found"
Else
LEADDICOM1.GetInfoDS
LEADDICOM1.FindModuleIOD LEADDICOM1.InfoClass, DICOM_MODULE_NM_TOMO_ACQUISITION
MsgBox "Found Module " & LEADDICOM1.CurrentIOD.Name
End If
LEADDICOM1.EnableMethodErrors = True


FindModuleIOD Example for Visual Basic

Private Sub Command14_Click()
Dim szPrompt As String

LEADDICOM1.EnableMethodErrors = True
On Error GoTo FINDIODERROR
'Find a Module
LEADDICOM1.FindModuleIOD DICOM_CLASS_CR_IMAGE_STORAGE,
DICOM_MODULE_BIPLANE_IMAGE
MsgBox LEADDICOM1.CurrentIOD.Name

LEADDICOM1.SetIODName "New IOD Name #1"
LEADDICOM1.SetIODDescription "New IOD Description #1"
szPrompt = "Name: " & LEADDICOM1.CurrentIOD.Name & Chr(13)
szPrompt = szPrompt & "Desc: " & LEADDICOM1.CurrentIOD.Description
MsgBox szPrompt

'Find a Class
LEADDICOM1.FindClassIOD DICOM_CLASS_PRINT_QUEUE
MsgBox LEADDICOM1.CurrentIOD.Name

LEADDICOM1.SetIODName "New IOD Name #2"
LEADDICOM1.SetIODDescription "New IOD Description #2"
szPrompt = "Name: " & LEADDICOM1.CurrentIOD.Name & Chr(13)
szPrompt = szPrompt & "Desc: " & LEADDICOM1.CurrentIOD.Description
MsgBox szPrompt

Exit Sub

FINDIODERROR:
MsgBox "Error"
End Sub


FindPresentationAbstract Example for Visual Basic

Dim nID As Integer
Dim hPDU As Long

'get the associate object for this client computer's connection
hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

'find the id for UID_VERIFICATION_CLASS within this association
'if it is supported by the association
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, UID_VERIFICATION_CLASS)
If (nID = 0) Then
MsgBox "Not Supported by this association!"
Else
MsgBox "Found: " & CStr(nID)
End If


GetAgeValue Example for Visual Basic

Private Sub TestProc8()
Dim lCount As Long
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Age Value
LEADDICOM1.InsertElement False, TAG_PATIENT_AGE, VR_AS, False, 0

'insert an Age value into the element
LEADDICOM1.AgeValueCount = 1
LEADDICOM1.AgeValues (0).Number = 21
LEADDICOM1.AgeValues (0).Reference = CInt(Asc("Y"))

'set the age
nRet = LEADDICOM1.SetAgeValue(1)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If

LEADDICOM1.AgeValueCount = 0 'free the value

'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the value
nRet = LEADDICOM1.GetAgeValue (0, lCount)
'display the value
Text1.Text = "Number: " & CStr(LEADDICOM1.AgeValues (0).Number) & "Ref: " & Chr(LEADDICOM1.AgeValues (0).Reference)
LEADDICOM1.EnableMethodErrors = True
MsgBox "wait"
End Sub


GetApplication Example for Visual Basic

Dim hPDU As Long

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)
'display current Application Context
MsgBox LEADDICOMNet1.GetApplication (hPDU)
'change it
LEADDICOMNet1.SetApplication hPDU, "9.9.999.99999.9.9.9.9"
MsgBox LEADDICOMNet1.GetApplication (hPDU)


GetAuthenticationAlgorithmTLS Example for Visual Basic

If LEADDICOMNet1.GetAuthenticationAlgorithmTLS (LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = DICOM_MUTUALAUTH_RSA Then
MsgBox "Mutual authentication in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MUTUALAUTH_RSA"
End If


GetBinaryValue Example for Visual Basic

Private Sub TestProc1()
Dim lCount As Long
Dim x As Long
Dim nRet As Integer
Dim nLen As Integer
Dim byteVal As Byte
Dim szBytes As String
Dim szByte As String

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement
Text1.Visible = True
Text1.Text = ""

'insert some bytes into the element
szBytes = "This is a Test 1234!"
nLen = Len(szBytes)
LEADDICOM1.BinaryValueCount = nLen
For x = 0 To nLen - 1
szByte = Mid$(szBytes, x + 1, 1)
byteVal = CByte(Asc(szByte))
LEADDICOM1.BinaryValues(x) = CInt(byteVal)
Next
'set the bytes
nRet = LEADDICOM1.SetBinaryValue(nLen)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
LEADDICOM1.BinaryValueCount = 0 'free the values

'get the byte count
lCount = LEADDICOM1.CurrentElement.Length
MsgBox "There are " & CStr(lCount) & " bytes!"

'get the bytes
nRet = LEADDICOM1.GetBinaryValue(lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.BinaryValueCount - 1
'display each byte as a char separated by a space
Text1.Text = Text1.Text & " " & Chr(LEADDICOM1.BinaryValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
msgbox "wait"
End Sub


GetBitmapCount Example for Visual Basic

Private Sub TestFunc()
Dim lCount As Long

lCount = LEADDICOM1.GetBitmapCount
If (lCount = 1) Then
'get the bitmap
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0 'free the image
ElseIf (lCount > 1) Then
'get the bitmap list
LEADDICOM1.GetBitmapListValue 0, lCount, 0, ORDER_RGB, 0
LEADRasterView1.Raster.BitmapList = LEADDICOM1.BitmapList
MsgBox "There are " & CStr(LEADDICOM1.BitmapList Count) & " Images"
LEADDICOM1.BitmapList = 0 'free the image
'play the animation
LEADRasterView1.AnimationLoop = True
LEADRasterView1.AnimationEnable = True
Else
MsgBox "No Image!"
End If
MsgBox "wait"
End Sub


GetCharValue Example for Visual Basic

Private Sub TestProc2()
Dim lCount As Long
Dim x As Long
Dim nRet As Integer
Dim nLen As Integer
Dim szChars As String
Dim szChar As String
Dim byteVal As Byte

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Char Values
LEADDICOM1.InsertElement False, TAG_PIXEL_DATA, VR_OB, False, 0

Text1.Visible = True
Text1.Text = ""

'insert some char values into the element
szChars = "This is a Test 1234!"
nLen = Len(szChars)
LEADDICOM1.CharValueCount = nLen
For x = 0 To nLen - 1
szChar = Mid$(szChars, x + 1, 1)
byteVal = CByte(Asc(szChar))
LEADDICOM1.CharValues(x) = CInt(byteVal)
Next
'set the chars
nRet = LEADDICOM1.SetCharValue(nLen)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
LEADDICOM1.CharValueCount = 0 'free the values

'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the values
nRet = LEADDICOM1.GetCharValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.CharValueCount - 1
'display each value separated by a '.'
Text1.Text = Text1.Text & "." & Chr(LEADDICOM1.CharValues (x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
msgbox "wait"
End Sub


GetConvertValue Example for Visual Basic

Private Sub Command1_Click()
Dim nRet As Integer
Dim lCount As Long
Dim x As Long

'add some values to the element
'note, this will only work for elements that have a VR that supports multiple values
LEADDICOM1.EnableMethodErrors = False
LEADDICOM1.StringValueCount = 3
LEADDICOM1.StringValues(0) = CStr(3.45)
LEADDICOM1.StringValues(1) = CStr(9.99)
LEADDICOM1.StringValues(2) = CStr(1.11)

nRet = LEADDICOM1.SetConvertValue
'free the current values
LEADDICOM1.StringValueCount = 0

'now get the values and display them
nRet = LEADDICOM1.GetConvertValue()
If (nRet = 0) Then
lCount = LEADDICOM1.StringValueCount
Text5.Text = ""
For x = 0 To lCount - 1
'display each value on a separate line
Text5.Text = Text5.Text & LEADDICOM1.StringValues(x) & Chr(13) &
Chr(10)
Next x
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


GetDateTimeValue Example for Visual Basic

Currently no DICOM Tags support the VR that this value requires.


GetDateValue Example for Visual Basic

Private Sub TestProc9()
Dim lCount As Long
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Date Value
LEADDICOM1.InsertElement False, TAG_PATIENT_BIRTH_DATE, VR_DA, False, 0

'insert an Date value into the element
LEADDICOM1.DateValueCount = 1
LEADDICOM1.DateValues(0).Year = 1971
LEADDICOM1.DateValues(0).Month = 12
LEADDICOM1.DateValues(0).Day = 12

'set the date
nRet = LEADDICOM1.SetDateValue(1)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If

LEADDICOM1.DateValueCount = 0 'free the value

Text1.Visible = True
Text1.Text = ""

'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the value
nRet = LEADDICOM1.GetDateValue(0, lCount)
'display the value
Text1.Text = "Year: " & CStr(LEADDICOM1.DateValues(0).Year) & " Month: " & CStr(LEADDICOM1.DateValues(0).Month & " Day: " & CStr(LEADDICOM1.DateValues(0).Day))
LEADDICOM1.EnableMethodErrors = True
MsgBox "wait"
End Sub


GetDoubleValue Example for Visual Basic

Private Sub TestProc6()
Dim lCount As Long
Dim x As Long
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Double Values
LEADDICOM1.InsertElement False, TAG_REFERENCE_PIXEL_PHYSICAL_VALUE_X, VR_FD, False, 0
Text1.Visible = True
Text1.Text = ""

'insert some Double values into the element
LEADDICOM1.DoubleValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.DoubleValues(x) = 10 * x * 199.77
Next
'set the floats
nRet = LEADDICOM1.SetDoubleValue(5)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
LEADDICOM1.DoubleValueCount = 0 'free the values

Text1.Visible = True
Text1.Text = ""
'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the values
nRet = LEADDICOM1.GetDoubleValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.DoubleValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.DoubleValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


GetElementLevel Example for Visual Basic

Private Sub TestProc()
Dim x As Long
Dim lLevel As Long

'Navigate the Data Set as a List, not as a Tree
'Move to the 20th element, and then find that element's level in the Tree
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to first element in Data Set
LEADDICOM1.MoveFirstElement False

'move to the 20th element
For x = 2 To 20
LEADDICOM1.MoveNextElement False
Next

LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
lLevel = LEADDICOM1.GetElementLevel
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name & " at level " & CStr(lLevel)

Exit Sub

MOVEELEMENTERROR:
MsgBox "Error"
End Sub


GetEncryptionAlgorithmTLS Example for Visual Basic

If LEADDICOMNet1.GetEncryptionAlgorithmTLS(LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = DICOM_CRYPT_3DES Then
MsgBox "Encryption in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_CRYPT_3DES"
End If


GetEncryptKeyLengthTLS Example for Visual Basic

MsgBox "Effective key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is " & LEADDICOMNet1.GetEncryptKeyLengthTLS(LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)


GetExtendedData Example for Visual Basic

Dim x As Long
Dim n As Long
Dim szOut As String
Dim ExtData
Dim Data
Dim ttt(0 To 4) As Byte

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU

'add some extended data for the first presentation context
ttt(0) = 0
ttt(1) = 1
ttt(2) = 1
ttt(3) = 0
ttt(4) = 1
ExtData = ttt
LEADDICOMNet1.SetExtendedData LEADDICOMNet1.hPDU, 1, ExtData, 5

'now, display the information
n = LEADDICOMNet1.GetExtendedDataLength (LEADDICOMNet1.hPDU, 1)
szOut = "Extended Data" & Chr(13)
Data = LEADDICOMNet1.GetExtendedData(LEADDICOMNet1.hPDU, 1)
For x = 0 To n - 1
szOut = szOut & CStr(x) & " = "
szOut = szOut & CStr(Data(x)) & Chr(13)
Next
MsgBox szOut


GetFloatValue Example for Visual Basic

Private Sub TestProc5()
Dim lCount As Long
Dim x As Long
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Float Values
LEADDICOM1.InsertElement False, TAG_TABLE_OF_PARAMETER_VALUES, VR_FL, False, 0
Text1.Visible = True
Text1.Text = ""

'insert some float values into the element
LEADDICOM1.FloatValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.FloatValues(x) = x * 1.99
Next
'set the floats
nRet = LEADDICOM1.SetFloatValue(5)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
LEADDICOM1.FloatValueCount = 0 'free the values

Text1.Visible = True
Text1.Text = ""

'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the values
nRet = LEADDICOM1.GetFloatValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.FloatValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.FloatValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MsgBox "wait"
End Sub


GetImageInformation Example for Visual Basic

Private Sub ViewInfo_Click()
Dim msg As String
LEADDICOM1.GetImageInformation 0
msg = "Compression: " & CStr(LEADDICOM1.ImageInfo.Compression) & Chr(13)
& Chr(10)
msg = msg + "Photometric: " & CStr(LEADDICOM1.ImageInfo.Photometric) &
" - " & LEADDICOM1.ImageInfo.PhotometricString & Chr(13) & Chr(10)
msg = msg + "Rows x Columns: " & CStr(LEADDICOM1.ImageInfo.Rows) & " x "
& LEADDICOM1.ImageInfo.Columns & Chr(13) & Chr(10)

msg = msg + "Bits Allocated: " &
CStr(LEADDICOM1.ImageInfo.BitsAllocated) & Chr(13) & Chr(10)
msg = msg + "Bits Stored: " & CStr(LEADDICOM1.ImageInfo.BitsStored) &
Chr(13) & Chr(10)
msg = msg + "High Bit: " & CStr(LEADDICOM1.ImageInfo.HighBit) & Chr(13)
& Chr(10)
msg = msg + "Pixel Representation: " &
CStr(LEADDICOM1.ImageInfo.PixelRepresentation) & Chr(13) & Chr(10)
msg = msg + "Planar Configuration: " &
CStr(LEADDICOM1.ImageInfo.PlanarConfiguration) & Chr(13) & Chr(10)
msg = msg + "ResolutionX: " & CStr(LEADDICOM1.ImageInfo.ResolutionX) &
Chr(13) & Chr(10)
msg = msg + "ResolutionY: " & CStr(LEADDICOM1.ImageInfo.ResolutionY) &
Chr(13) & Chr(10)
msg = msg + "SmallestImagePixelValue: " &
CStr(LEADDICOM1.ImageInfo.SmallestImagePixelValue) & Chr(13) & Chr(10)
msg = msg + "SmallestImagePixelValueFlag: " &
LEADDICOM1.ImageInfo.SmallestImagePixelValueFlag & Chr(13) & Chr(10)
msg = msg + "LargestImagePixelValue: " &
CStr(LEADDICOM1.ImageInfo.LargestImagePixelValue) & Chr(13) & Chr(10)
msg = msg + "LargestImagePixelValueFlag: " &
LEADDICOM1.ImageInfo.LargestImagePixelValueFlag & Chr(13) & Chr(10)
msg = msg + "RedEntries: " & CStr(LEADDICOM1.ImageInfo.RedEntries) &
Chr(13) & Chr(10)
msg = msg + "RedFirst: " & CStr(LEADDICOM1.ImageInfo.RedFirst) & Chr(13)
& Chr(10)
msg = msg + "RedBits: " & CStr(LEADDICOM1.ImageInfo.RedBits) & Chr(13) &
Chr(10)
msg = msg + "GreenEntries: " & CStr(LEADDICOM1.ImageInfo.GreenEntries) &
Chr(13) & Chr(10)
msg = msg + "GreenFirst: " & CStr(LEADDICOM1.ImageInfo.GreenFirst) &
Chr(13) & Chr(10)
msg = msg + "GreenBits: " & CStr(LEADDICOM1.ImageInfo.GreenBits) &
Chr(13) & Chr(10)
msg = msg + "BlueEntries: " & CStr(LEADDICOM1.ImageInfo.BlueEntries) &
Chr(13) & Chr(10)
msg = msg + "BlueFirst: " & CStr(LEADDICOM1.ImageInfo.BlueFirst) &
Chr(13) & Chr(10)
msg = msg + "BlueBits: " & CStr(LEADDICOM1.ImageInfo.BlueBits) & Chr(13)
& Chr(10)
msg = msg + "PaletteEntries: " &
CStr(LEADDICOM1.ImageInfo.PaletteEntries) & Chr(13) & Chr(10)
msg = msg + "PaletteFirst: " & CStr(LEADDICOM1.ImageInfo.PaletteFirst) &
Chr(13) & Chr(10)
msg = msg + "BitsPerPixel: " & CStr(LEADDICOM1.ImageInfo.BitsPerPixel) &
Chr(13) & Chr(10)
msg = msg + "Gray: " & LEADDICOM1.ImageInfo.Gray & Chr(13) & Chr(10)
msg = msg + "Frames: " & CStr(LEADDICOM1.ImageInfo.Frames) & Chr(13) &
Chr(10)

MsgBox msg
End Sub


GetInfoDS Example for Visual Basic

Private Sub DSInfo_Click()
Dim szClass As String
Dim szFlags As String

LEADDICOM1.EnableMethodErrors = True
On Error GoTo INFODSERROR
LEADDICOM1.GetInfoDS
LEADDICOM1.FindClassIOD LEADDICOM1.InfoClass
szClass = LEADDICOM1.CurrentIOD.Name
szFlags = Hex$(LEADDICOM1.InfoFlags)
MsgBox "Class: " & szClass & Chr(10) & Chr(13) & "Flags: " & szFlags
Exit Sub
INFODSERROR:
MsgBox "Error"
End Sub


GetIntegrityAlgorithmTLS Example for Visual Basic

If LEADDICOMNet1.GetIntegrityAlgorithmTLS(LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = DICOM_MAC_SHA1 Then
MsgBox "Message authentication code in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1"
End If


GetKeyExchangeAlgorithmTLS Example for Visual Basic

If LEADDICOMNet1.GetKeyExchangeAlgorithmTLS(LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = DICOM_MAC_SHA1 Then
MsgBox "Key exchange in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1"
End If


GetLongValue Example for Visual Basic

Private Sub TestProc4()
Dim lCount As Long
Dim x As Long
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Long Values
LEADDICOM1.InsertElement False, TAG_OFFSET_FIRST_ROOT_DIRECTORY, VR_UL, False, 0
Text1.Visible = True
Text1.Text = ""

'insert some long values into the element
LEADDICOM1.LongValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.LongValues(x) = x * 100000
Next
'set the longs
nRet = LEADDICOM1.SetLongValue(5)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
LEADDICOM1.LongValueCount = 0 'free the values

'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the values
nRet = LEADDICOM1.GetLongValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.LongValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.LongValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MsgBox "wait"
End Sub


GetModuleCount Example for Visual Basic

Dim lCount As Long

lCount = LEADDICOM1.GetModuleCount
MsgBox "Module Count: " & CStr(lCount)


GetMutualAuthKeyLengthTLS Example for Visual Basic

MsgBox "Mutual authentication key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is " & LEADDICOMNet1.GetMutualAuthKeyLengthTLS (LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)


GetPeerAuthDataISCL Example for Visual Basic

Dim buf As Variant
Dim nLen As Long
LEADDICOMNet1.GetPeerAuthDataISCL LEADDICOMNet1.hNet, buf, nLen
MsgBox "1st byte of data = " & buf(0) & ", last byte of data = " & buf(nLen - 1)


GetPeerEncryptionISCL Example for Visual Basic

Dim strEncr As String
strEncr = "Unknown"
If LEADDICOMNet1.GetPeerEncryptionISCL (LEADDICOMNet1.hNet) = DICOM_ISCL_ENCRYPT_NONE Then
strEncr = "None"
ElseIf LEADDICOMNet1.GetPeerEncryptionISCL (LEADDICOMNet1.hNet) = DICOM_ISCL_ENCRYPT_DESCBC Then
strEncr = "DES algorithm, cipher block chaining mode"
End If
MsgBox "Sender tried to send a message with encryption algorithm: " & strEncr


GetPeerMACISCL Example for Visual Basic

Dim strMAC As String
strMAC = "SHA algorithm"
If LEADDICOMNet1.GetPeerMACISCL (LEADDICOMNet1.hNet) = DICOM_ISCL_MAC_NONE Then
strMAC = "no message authentication code"
ElseIf LEADDICOMNet1.GetPeerMACISCL (LEADDICOMNet1.hNet) = DICOM_ISCL_MAC_MD5 Then
strMAC = "MD5 algorithm"
End If
MsgBox "Sender tried to send a message with MAC " & strMAC


GetPeerRequestedMessageLengthISCL Example for Visual Basic

MsgBox "Sender tried to send message with length" & _
LEADDICOMNet1.GetPeerRequestedMessageLengthISCL (LEADDICOMNet1.hNet)


GetPresentationAbstract Example for Visual Basic

Dim x As Long
Dim out$
Dim result As String
Dim nID As Integer

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU

'get abstracts for each Presentation Context
out$ = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
result = LEADDICOMNet1.GetPresentationAbstract (LEADDICOMNet1.hPDU, nID)
out$ = out$ & result
out$ = out$ & Chr(13)
Next
MsgBox out$

'change the abstracts
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetPresentationAbstract LEADDICOMNet1.hPDU, nID, UID_CR_IMAGE_STORAGE
Next

'redisplay
out$ = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
out$ = out$ & LEADDICOMNet1.GetPresentationAbstract (LEADDICOMNet1.hPDU, nID)
out$ = out$ & Chr(13)
Next
MsgBox out$

LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU


GetPresentationCount Example for Visual Basic

Dim x As Long
Dim id As Integer
Dim maxid As Integer
Dim out$

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU

'get current id's and display them
out$ = ""
maxid = 0
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
id = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
out$ = out$ & id
out$ = out$ & Chr(13)
'store the highest id
If id > maxid Then maxid = id
Next
MsgBox out$

id = maxid + 2 'id must be unique and odd number
'change the some ids and then display them all
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
LEADDICOMNet1.SetPresentationID LEADDICOMNet1.hPDU, x, id
id = id + 2 'id must be odd number
Next
out$ = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
out$ = out$ & LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
out$ = out$ & Chr(13)
Next
MsgBox out$

'add a presentation context
out$ = ""
LEADDICOMNet1.AddPresentation LEADDICOMNet1.hPDU, 1, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
out$ = out$ & LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
out$ = out$ & Chr(13)
Next
MsgBox out$

'delete the one we added
out$ = ""
LEADDICOMNet1.DeletePresentation LEADDICOMNet1.hPDU, 1
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
out$ = out$ & LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
out$ = out$ & Chr(13)
Next
MsgBox out$

LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU


GetPresentationResult Example for Visual Basic

Dim x As Long
Dim out$
Dim result As Integer
Dim nID As Integer

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU)

'get current results for each Presentation Context
out$ = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
result = LEADDICOMNet1.GetPresentationResult (LEADDICOMNet1.hPDU, nID)
out$ = out$ & result
out$ = out$ & Chr(13)
Next
MsgBox out$

'change all results to 1
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetPresentationResult LEADDICOMNet1.hPDU, nID, 1
Next

'redisplay
out$ = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
out$ = out$ & LEADDICOMNet1.GetPresentationResult (LEADDICOMNet1.hPDU, nID)
out$ = out$ & Chr(13)
Next
MsgBox out$

LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU


GetSendQueueSize Example for Visual Basic

'display queue size
MsgBox CStr(LEADDICOMNet1.GetSendQueueSize (LEADDICOMNet1.hNet)), , "SendQueueSize"


GetServer Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveAssociateRequest (ByVal hNet As Long, ByVal hPDU As Long)
Dim hServer As Long
Dim szServer As String
Dim lPort As Long

hServer = LEADDICOMNet1.GetServer (hNet)
If (hServer <> 0) Then
szServer = LEADDICOMNet1.GetHostAddress (hServer)
lPort = LEADDICOMNet1.GetHostPort (hServer)
MsgBox "Server = " & szServer & " Port = " & CStr(lPort)
End If
End Sub


GetShortValue Example for Visual Basic

Private Sub TestProc3()
Dim lCount As Long
Dim x As Long
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Short Values
LEADDICOM1.InsertElement False, TAG_RECORD_IN_USE_FLAG, VR_US, False, 0
Text1.Visible = True
Text1.Text = ""

'insert some short values into the element
LEADDICOM1.ShortValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.ShortValues(x) = x * 100
Next
'set the shorts
nRet = LEADDICOM1.SetShortValue(5)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
LEADDICOM1.ShortValueCount = 0 'free the values

'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the values
nRet = LEADDICOM1.GetShortValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.ShortValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.ShortValues(x))
Next
End If
MsgBox "wait"
LEADDICOM1.EnableMethodErrors = True
End Sub


GetStatusISCL Example for Visual Basic

' In this example, assume an error occurs in the NetReceive event. The code to
' determine why this happened should look like this:
Private Sub LEADDICOMNet1_NetReceive(ByVal hNet As Long, ByVal nStatus As Long, ByVal nType As Integer, ByVal pData As Variant, ByVal lSize As Long)
Dim nStatusISCL As Long
nStatusISCL = LEADDICOMNet1.GetStatusISCL (hNet)
If nStatus = DICOM_ERROR_ISCL_DECRYPT Then
If nStatusISCL = 24 Then
' error decrypting message data
MsgBox "Error decrypting message"
End If
If nStatusISCL = 25 Then
' error decrypting MAC code
MsgBox "Error decrypting MAC code"
End If
End If
End Sub


GetStringValue Example for Visual Basic

Private Sub TestProc7()
Dim lCount As Long
Dim x As Long
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the String Values
LEADDICOM1.InsertElement False, TAG_IMAGE_TYPE, VR_CS, False, 0

'insert some string values into the element
LEADDICOM1.StringValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.StringValues(x) = "String #" & CStr(x + 1)
Next
'set the strings
nRet = LEADDICOM1.SetStringValue(5)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If

LEADDICOM1.StringValueCount = 0 'free the values

Text5.Visible = True
Text5.Text = ""
'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the values
nRet = LEADDICOM1.GetStringValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.StringValueCount - 1
'display each value separated on a separate line
Text5.Text = Text5.Text & Chr(13) & Chr(10) & CStr(LEADDICOM1.StringValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MsgBox "wait"
End Sub


GetTagCount Example for Visual Basic

Dim lCount As Long
lCount = LEADDICOM1.GetTagCount
MsgBox "There are " & CStr(lCount) & " Tag Items."


GetTimeValue Example for Visual Basic

Private Sub TestProc10()
Dim lCount As Long
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Time Value
LEADDICOM1.InsertElement False, TAG_PATIENT_BIRTH_TIME, VR_TM, False, 0

'insert an Time value into the element
LEADDICOM1.TimeValueCount = 1
LEADDICOM1.TimeValues(0).Hours = 12
LEADDICOM1.TimeValues(0).Minutes = 25
LEADDICOM1.TimeValues(0).Seconds = 33
LEADDICOM1.TimeValues(0).Fractions = 50

'set the time
nRet = LEADDICOM1.SetTimeValue(1)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If

LEADDICOM1.TimeValueCount = 0 'free the value

Text1.Visible = True
Text1.Text = ""

'get the value count
lCount = LEADDICOM1.GetValueCount
MsgBox "There are " & CStr(lCount) & " values!"

'get the value
nRet = LEADDICOM1.GetTimeValue(0, lCount)
'display the value
Text1.Text = "Hours: " & CStr(LEADDICOM1.TimeValues(0).Hours) & " Minutes: " & CStr(LEADDICOM1.TimeValues(0).Minutes & " Seconds: " & CStr(LEADDICOM1.TimeValues(0).Seconds) & " Fractions: " & CStr(LEADDICOM1.TimeValues(0).Fractions))
LEADDICOM1.EnableMethodErrors = True
MsgBox "wait"
End Sub


Getting an overlay bitmap list Example for Visual Basic

Dim iRet As Integer
Dim OverlayAttributesDS As LEADOverlayAttributes
Dim GroupNumber As Long
Dim bIsOverlayInDataSet As Boolean
Dim cs As String

iRet = LEADDICOM1.GetOverlayAttributes (0, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
Set OverlayAttributesDS = LEADDICOM1.OverlayAttributes
cs = LEADDICOM1.OverlayActivationLayer(0)
MsgBox cs

iRet = LEADDICOM1.GetOverlayBitmapList (0, 0, OverlayAttributesDS.NumberFramesInOverlay, 0)
If (iRet <> 0) Then
MsgBox "error"
Exit Sub
End If
LEADRasterView1.Raster.BitmapList = LEADDICOM1.OverlayBitmapList


Getting and setting a non-linear VOI LUT Example for Visual Basic

' This example will add a new VOI LUT to the dataset or
' replace the existing one(s)
Dim VOILUTAttributes As LVOILUTAttributes
Dim iRet As Integer
Dim lVOILUTCount As Long
Dim lLUTIndex As Long
Dim lNewLUTIndex As Long
Dim lDataSize As Long
Dim LUTData As Variant
Dim bAddVOILUT As Boolean

bAddVOILUT = True
lVOILUTCount = 0
lNewLUTIndex = 0
' Get the number of VOI LUT(s) in the file
lVOILUTCount = LEADDICOM1.VOILUTCount
If (lVOILUTCount > 0) Then

' Get he attributes of the first VOI LUT
iRet = LEADDICOM1.GetVOILUTAttributes (0, 0)
If (iRet <> 0) Then

MsgBox ("error")
Exit Sub
End If
Set VOILUTAttributes = LEADDICOM1.VOILUTAttributes
lDataSize = VOILUTAttributes.LUTDescriptorNumberOfEntries
' Get the LUT data
'ReDim LUTData(lDataSize)
iRet = LEADDICOM1.GetVOILUTData(0, LUTData, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
' Remap the data
For lLUTIndex = 0 To (lDataSize - 1)
LUTData(lLUTIndex) = LUTData(lLUTIndex) / 2
Next

Else
Set VOILUTAttributes = LEADDICOM1.VOILUTAttributes
' Define our own LUT
VOILUTAttributes.LUTDescriptorFirstMapped = 0
VOILUTAttributes.LUTDescriptorEntryBits = 16
VOILUTAttributes.LUTDescriptorNumberOfEntries = &H10000
lDataSize = VOILUTAttributes.LUTDescriptorNumberOfEntries
ReDim LUTData(lDataSize)
For lLUTIndex = 0 To (lDataSize - 1)
LUTData(lLUTIndex) = lLUTIndex
Next
End If
lNewLUTIndex = lVOILUTCount
If (bAddVOILUT = False) Then
' Delete existing LUT
iRet = LEADDICOM1.DeleteVOILUT(0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
lNewLUTIndex = 0
End If
' Set the new LUT
iRet = LEADDICOM1.SetVOILUT (lNewLUTIndex, LUTData, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If


Getting and setting window center and width Example for Visual Basic

' This example will add a new "Window Width" and
' "Window Center" to the dataset , or replace
' the existing one(s)
Dim bAddWindow
Dim WindowAttributes As LWindowAttributes
Dim iRet As Integer
Dim lWindowCount As Integer
Dim lWindowIndex As Integer
Dim iBitsStored As Integer

lWindowCount = 0
lWindowIndex = 0
bAddWindow = True
iBitsStored = 12

lWindowCount = LEADDICOM1.WindowCount
If (lWindowCount > 0) Then
iRet = LEADDICOM1.GetWindowAttributes(0, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
Set WindowAttributes = LEADDICOM1.WindowAttributes

' Half the width for the first window
WindowAttributes.WindowWidth = WindowAttributes.WindowWidth / 2
WindowAttributes.WindowCenter = WindowAttributes.WindowCenter / 2
Else
' This represents an identity VOI LUT transformation in the case
' where no Modality LUT is specified and the stored pixel data are
' iBitsStored bit unsigned integers.
Set WindowAttributes = LEADDICOM1.WindowAttributes
WindowAttributes.WindowWidth = 2 ^ iBitsStored
WindowAttributes.WindowCenter = 2 ^ (iBitsStored - 1)
WindowAttributes.WindowCWExplanation = ""
End If
lWindowIndex = lWindowCount
If (bAddWindow = False) Then

' Delete the existing window(s)
iRet = LEADDICOM1.DeleteWindow (0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
lWindowIndex = 0
End If
' Add the new window
iRet = LEADDICOM1.SetWindowAttributes (lWindowIndex, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If


Getting modality LUT data and attributes Example for Visual Basic

' This example will retrieve the LUT Data (0028,3006)
' under the Modality LUT Sequence (0028,3000)
Dim Ret As Integer
' Object that will hold modality LUT attributes
Dim MLUTAttributes As LModalityLUTAttributes
' Get modality LUT attributes
Ret = LEADDICOM1.GetModalityLUTAttributes(0)
If (Ret <> 0) Then
MsgBox ("error")
Exit Sub
End If
Set MLUTAttributes = LEADDICOM1.ModalityLUTAttributes
' If there is no modality LUT sequence then there is no data !
If (MLUTAttributes.IsModalityLUTSequence = False) Then
MsgBox ("No LUT")
Exit Sub
End If
Dim Data As Variant
' Retrieve the LUT Data (0028,3006)
LEADDICOM1.GetModalityLUTData Data, 0
' Do something with the data


Getting palette color LUT data and attributes Example for Visual Basic

' This example will retrieve the data under
' "Red Palette Color Lookup Table Data"(0028,1201)
' element and if the data is segmented it will get the data under
' "Segmented Red Palette Color Lookup Table Data" (0028,1221) and decode it
Dim LUTData As Variant
' Object that will hold Palette Color LUT attributes
Dim PaletteColorLUTAttributes As LPaletteColorLUTAttributes
Dim iRet As Integer

' Get "Palette Color Lookup Table" attributes
iRet = LEADDICOM1.GetPaletteColorLUTAttributes (0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
Set PaletteColorLUTAttributes = LEADDICOM1.PaletteColorLUTAttributes
' Retrieve "Red Palette Color Lookup Table Data"
' This function will automatically decode the LUT data
' if it was segmented
iRet = LEADDICOM1.GetPaletteColorLUTData (LUTData, DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0)
'do something with vData
'...


Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for Visual Basic

' This example will extract the overlays from a
' DICOM dataset and associate them with a bitmap,
' the bitmap is assumed to be extracted from the
' same DICOM dataset.
Dim iRet As Integer
Dim lOverlayCount As Long
Dim lOverlayIndex As Long
Dim OverlayAttributesDS As LEADOverlayAttributes
Dim OverlayAttributesRaster As LEADOverlayAttributes
Dim RasterProcess As New LEADRasterProcess
Dim GroupNumber As Long
Dim bIsOverlayInDataSet As Boolean
Dim iLEADOverlayIndex As Integer
Dim lFlags As Long
Dim crColor As Long
lOverlayCount = 0
lOverlayIndex = 0
GroupNumber = 0
bIsOverlayInDataSet = False
iLEADOverlayIndex = 0
lFlags = 0

LEADDICOM1.GetBitmapValue 0, 0, ORDER_BGRORGRAY, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap

' Do we have any overlays at all?
lOverlayCount = LEADDICOM1.OverlayCount
If (lOverlayCount = 0) Then
Exit Sub
End If

' Go through the overlays one by one
lOverlayIndex = 0
iLEADOverlayIndex = 0
' Reset the overlay bitmap
If (LEADRasterView2.Raster.Bitmap > 0) Then
LEADRasterView2.Raster.Free
End If
LEADRasterView2.Raster.CreateBitmap 1, 1, 1
While (lOverlayIndex < lOverlayCount)
NEXTINDEX:
GroupNumber = 0
bIsOverlayInDataSet = False
lFlags = 0
' Get the attributes of this overlay
iRet = LEADDICOM1.GetOverlayAttributes (lOverlayIndex, 0)
If (iRet <> 0) Then
MsgBox "error"
Exit Sub
End If
GroupNumber = LEADDICOM1.OverlayGroupNumber(lOverlayIndex, 0)
bIsOverlayInDataSet = LEADDICOM1.IsOverlayInDataset(lOverlayIndex, 0)

If (bIsOverlayInDataSet = False) Then
lOverlayIndex = lOverlayIndex + 1
GoTo NEXTINDEX
End If

Set OverlayAttributesDS = LEADDICOM1.OverlayAttributes
Set OverlayAttributesRaster = RasterProcess.OverlayAttributes

' Auto paint and process overlays
lFlags = OverlayAttributesDS.Flags
lFlags = lFlags Or OVERLAY_AUTOPAINT Or OVERLAY_AUTOPROCESS
OverlayAttributesRaster.Flags = lFlags
OverlayAttributesRaster.OriginX = OverlayAttributesDS.OriginX
OverlayAttributesRaster.OriginY = OverlayAttributesDS.OriginY
crColor = vbWhite
OverlayAttributesRaster.Color = crColor
OverlayAttributesRaster.BitPosition = OverlayAttributesDS.BitPosition
OverlayAttributesRaster.Rows = OverlayAttributesDS.Rows
OverlayAttributesRaster.Columns = OverlayAttributesDS.Columns
OverlayAttributesRaster.Type = OverlayAttributesDS.Type
OverlayAttributesRaster.BitsAllocated = OverlayAttributesDS.BitsAllocated
OverlayAttributesRaster.Subtype = OverlayAttributesDS.Subtype
OverlayAttributesRaster.Label= OverlayAttributesDS.Label
OverlayAttributesRaster.ROIArea = OverlayAttributesDS.ROIArea
OverlayAttributesRaster.ROIMean = OverlayAttributesDS.ROIMean
OverlayAttributesRaster.ROIStandardDeviation = OverlayAttributesDS.ROIStandardDeviation
OverlayAttributesRaster.NumberFramesInOverlay = OverlayAttributesDS.NumberFramesInOverlay
OverlayAttributesRaster.ImageFrameOrigin= OverlayAttributesDS.ImageFrameOrigin
OverlayAttributesRaster.ActivationLayer = OverlayAttributesDS.ActivationLayer
OverlayAttributesRaster.Description = OverlayAttributesDS.Description

iRet = RasterProcess.SetOverlayAttributes (LEADRasterView1.Raster, iLEADOverlayIndex, 0)
If (iRet <> 0) Then
MsgBox "error"
Exit Sub
End If

' Is the overlay embedded inside the image data ?
lFlags = OverlayAttributesDS.Flags
If (lFlags And OVERLAY_USEBITPLANE) Then
' Add this overlay to the list of overlays in the bitmap handle
iRet = RasterProcess.SetOverlayAttributes (LEADRasterView1.Raster, _
iLEADOverlayIndex, _
OVERLAYATTRIBUTES_FLAGS Or _
OVERLAYATTRIBUTES_BITINDEX Or _
OVERLAYATTRIBUTES_ORIGIN Or _
OVERLAYATTRIBUTES_DICOM Or _
OVERLAYATTRIBUTES_COLOR)
If (iRet <> 0) Then
MsgBox "error"
Exit Sub
End If

' Make sure to extract the overlay data from the image data
iRet = RasterProcess.UpdateOverlayBits(LEADRasterView1.Raster, _
iLEADOverlayIndex, _
SETOVERLAYBITS_FROMBITMAP)
If (iRet <> 0) Then
MsgBox "error"
Exit Sub
End If
' The overlay is inside overlay data
Else
' Add this overlay to the list of overlays in the bitmap handle
iRet = RasterProcess.SetOverlayAttributes (LEADRasterView1.Raster, _
iLEADOverlayIndex, _
OVERLAYATTRIBUTES_FLAGS Or _
OVERLAYATTRIBUTES_ORIGIN Or _
OVERLAYATTRIBUTES_DICOM Or _
OVERLAYATTRIBUTES_COLOR)
If (iRet <> 0) Then
MsgBox "error"
Exit Sub
End If

' Get the overlay bitmap from the overlay data
iRet = LEADDICOM1.GetOverlayBitmap (lOverlayIndex, 0)
If (iRet <> 0) Then
MsgBox "error"
Exit Sub
End If
' store it temp. in RasterView2
If (LEADRasterView2.Raster.Bitmap > 0) Then
LEADRasterView2.Raster.Free
End If
LEADRasterView2.Raster.Bitmap = LEADDICOM1.OverlayBitmap

' Set the bitmap for this overlay inside the
' list of overlays we have in the bitmap handle

iRet = RasterProcess.SetOverlayBitmap (LEADRasterView1.Raster, _
iLEADOverlayIndex, _
LEADRasterView2.Raster, _
OVERLAY_COPY)
If (iRet <> 0) Then
MsgBox "error"
Exit Sub
End If
End If
lOverlayIndex = lOverlayIndex + 1
iLEADOverlayIndex = iLEADOverlayIndex + 1
Wend


GetTransferCount Example for Visual Basic

Dim x As Long
Dim out$
Dim result As String

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU

'display each Transfer Syntax for the first Presentation Context
out$ = ""
For x = 0 To LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x)
out$ = out$ & result
out$ = out$ & Chr(13)
Next
MsgBox out$

'add a transfer syntax
LEADDICOMNet1.AddTransferSyntax LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), UID_IMPLICIT_VR_LITTLE_ENDIAN
'display each Transfer Syntax for the first Presentation Context
out$ = ""
For x = 0 To LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x)
out$ = out$ & result
out$ = out$ & Chr(13)
Next
MsgBox out$

'change them
For x = 0 To LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1
LEADDICOMNet1.SetTransferSyntax LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x, UID_EXPLICIT_VR_BIG_ENDIAN
Next
'display each Transfer Syntax for the first Presentation Context
out$ = ""
For x = 0 To LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x)
out$ = out$ & result
out$ = out$ & Chr(13)
Next
MsgBox out$

'delete the last one
LEADDICOMNet1.DeleteTransferSyntax LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1

'display each Transfer Syntax for the first Presentation Context
out$ = ""
For x = 0 To LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x)
out$ = out$ & result
out$ = out$ & Chr(13)
Next
MsgBox out$

LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU


GetUIDCount Example for Visual Basic

Dim lCount As Long
lCount = LEADDICOM1.GetUIDCount
MsgBox "There are " & CStr(lCount) & " UID Items."


GetUserInfoCount Example for Visual Basic

Dim x As Long
Dim y As Long
Dim nType As Integer
Dim nLen As Integer
Dim pData
Dim out$
Dim test

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU

'get current user info types, lengths, and data then display them
out$ = ""
If (LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) > 0) Then
For x = 0 To LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1
nType = LEADDICOMNet1.GetUserInfoType (LEADDICOMNet1.hPDU, x)
out$ = out$ & "Type: " & CStr(nType)
nLen = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x)
out$ = out$ & " Length: " & CStr(nLen)
pData = LEADDICOMNet1.GetUserInfoData (LEADDICOMNet1.hPDU, x)
out$ = out$ & " Data: "
For y = 0 To nLen - 1
out$ = out$ & Chr(pData(y))
Next
out$ = out$ & Chr(13)
Next
Else
out$ = "None"
End If
MsgBox out$

'add a user info item item
out$ = ""
test = "just a test"
nLen = Len(test)
LEADDICOMNet1.AddUserInfo LEADDICOMNet1.hPDU, 99, test, Len(test)
out$ = ""
If (LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) > 0) Then
For x = 0 To LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1
nType = LEADDICOMNet1.GetUserInfoType (LEADDICOMNet1.hPDU, x)
out$ = out$ & "Type: " & CStr(nType)
nLen = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x)
out$ = out$ & " Length: " & CStr(nLen)
pData = LEADDICOMNet1.GetUserInfoData (LEADDICOMNet1.hPDU, x)
out$ = out$ & " Data: "
For y = 0 To nLen - 1
out$ = out$ & Chr(pData(y))
Next
out$ = out$ & Chr(13)
Next
Else
out$ = "None"
End If
MsgBox out$

'for each user info item, change the data
test = "a second test"
For x = 0 To LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1
nType = LEADDICOMNet1.GetUserInfoType (LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetUserInfo LEADDICOMNet1.hPDU, x, nType, test, Len(test)
Next
out$ = ""
If (LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) > 0) Then
For x = 0 To LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1
nType = LEADDICOMNet1.GetUserInfoType (LEADDICOMNet1.hPDU, x)
out$ = out$ & "Type: " & CStr(nType)
nLen = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x)
out$ = out$ & " Length: " & CStr(nLen)
pData = LEADDICOMNet1.GetUserInfoData (LEADDICOMNet1.hPDU, x)
out$ = out$ & " Data: "
For y = 0 To nLen - 1
out$ = out$ & Chr(pData(y))
Next
out$ = out$ & Chr(13)
Next
Else
out$ = "None"
End If
MsgBox out$

'delete the one we added
LEADDICOMNet1.DeleteUserInfo LEADDICOMNet1.hPDU, LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1

LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU


GetVRCount Example for Visual Basic

Dim lCount As Long
lCount = LEADDICOM1.GetVRCount
MsgBox "There are " & CStr(lCount) & " VR Items."


IncludeVolatile Example for Visual Basic

Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False
'list all elements
LEADDICOM1.IncludeVolatile = True
nRet = LEADDICOM1.MoveFirstElement(False)
While (nRet = 0)
List1.AddItem CStr(LEADDICOM1.CurrentElement.Tag)
nRet = LEADDICOM1.MoveNextElement(False)
Wend
MsgBox "Element Count = " & CStr(List1.ListCount)
'list only non-volatile elements
LEADDICOM1.IncludeVolatile = False
nRet = LEADDICOM1.MoveFirstElement (False)
While (nRet = 0)
List2.AddItem CStr(LEADDICOM1.CurrentElement.Tag)
nRet = LEADDICOM1.MoveNextElement(False)
Wend

MsgBox "Non Volatile Element Count = " & CStr(List2.ListCount)


InitCS Example for Visual Basic

Dim out$

'create a data set as a command set
LEADDICOM1.InitCS COMMAND_C_STORE, True

'gets information about the command set
LEADDICOM1.GetInfoCS
out$ = "Command: " & CStr(LEADDICOM1.InfoCommand)
out$ = out$ & Chr(13)
out$ = out$ & "Request: " & CStr(LEADDICOM1.InfoRequest)
MsgBox out$


InitDS Example for Visual Basic

'init a DS with default options
LEADDICOM1.InitDS DICOM_CLASS_CR_IMAGE_STORAGE, DS_EXPLICIT_VR + DS_METAHEADER_ABSENT + DS_BIG_ENDIAN


InsertBitmapListValue Example for Visual Basic

Private Sub TestProcInsertList()
Dim nRet As Integer
Dim IO As New LEADRasterIO
Dim Process As New LEADRasterProcess

LEADDICOM1.EnableMethodErrors = False

'move to the first image element and delete what's there
nRet = LEADDICOM1.FindFirstElement (TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0)

'load an image
IO.Load LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1
MsgBox "Image loaded from File - Wait"

'create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem 0, LEADRasterView1.Raster.Bitmap
Process.Flip LEADRasterView1.Raster
LEADRasterView2.Raster.InsertBitmapListItem 1, LEADRasterView1.Raster.Bitmap
Process.Reverse LEADRasterView1.Raster
LEADRasterView2.Raster.InsertBitmapListItem 2, LEADRasterView1.Raster.Bitmap

'insert the image list into the element
nRet = LEADDICOM1.InsertBitmapListValue(LEADRasterView2.Raster.BitmapList, 0, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
MsgBox "ImageList inserted into Data Set - Wait"
End Sub


InsertBitmapValue Example for Visual Basic

Private Sub TestProcInsertBitmap()
Dim nRet As Integer
Dim IO As New LEADRasterIO
Dim Process As New LEADRasterProcess

LEADDICOM1.EnableMethodErrors = False

'move to the first image element and delete what's there
nRet = LEADDICOM1.FindFirstElement (TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0)

'load an image
IO.Load LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1
MsgBox "Image loaded from File - Wait"

lCount = LEADDICOM1.GetBitmapCount

'insert some images
nRet = LEADDICOM1.InsertBitmapValue (LEADRasterView1.Raster.Bitmap, lCount, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
Process.Flip LEADRasterView1.Raster
nRet = LEADDICOM1.InsertBitmapValue (LEADRasterView1.Raster.Bitmap, lCount + 1, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)
If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
Process.Reverse LEADRasterView1.Raster
nRet = LEADDICOM1.InsertBitmapValue (LEADRasterView1.Raster.Bitmap, lCount + 2, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)
If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If

MsgBox "Images inserted - Wait"
End Sub


InsertDS Example for Visual Basic

'find the first PATIENT KEY, copy it to a new
'DS, and then save it to a file
LEADDICOM1.FindFirstKey "PATIENT", False
LEADDICOM2.ResetDS
LEADDICOM2.InsertDS LEADDICOM1.hDicomDS, LEADDICOM1.CurrentElement.hElement
LEADDICOM2.SaveDS "d:\temp\save.dic", 0


InsertElement Example for Visual Basic

Private Sub DSInsertElement_Click()
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False
'insert the new element
LEADDICOM1.FindTag TAG_DISCHARGE_DATE
nRet = LEADDICOM1.InsertElement (False, TAG_DISCHARGE_DATE, LEADDICOM1.CurrentTag.VR, False, ELEMENT_INDEX_MAX)
If (nRet <> 0) Then
MsgBox "Error Inserting Element"
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


Inserting a Context Group Example for Visual Basic

Private Sub InsertContextGroup(objDS As LEADDicomDS)
' Context Group Version
objDS.DateTimeValueCount = 1
With objDS.DateTimeValues(0)
.Year = 2004
.Month = 3
.Day = 22
.Hours = 0
.Minutes = 0
.Seconds = 0
.Fractions = 0
.Offset = 0
End With

' Insert a (testing) Context Group
objDS.InsertContextGroup "CID XXXX", "New Context Group", True

objDS.DateTimeValueCount = 0

' Fill the Context Group with some (testing) Coded Concepts
objDS.InsertCodedConcept "CSD1", "", "CV1", "CM1"
objDS.InsertCodedConcept "CSD2", "", "CV2", "CM2"
objDS.InsertCodedConcept "CSD3", "", "CV3", "CM3"

' Refer to Enumerating the Coded Concepts of a Context Group Example
' for Visual Basic for the procedure EnumCodedConcepts
EnumCodedConcepts objDS

' Delete the Context Group
objDS.DeleteContextGroup
End Sub


Inserting a Wave Stream Into a Data Set Example for Visual Basic

Function InsertWaveFileIntoDataSet(objDataSet As LEADDicomDS, _
sInputWaveFilename As String) As Boolean
InsertWaveFileIntoDataSet = False

Dim objAudioWaveformGroup As New DicomWaveformGroup
objAudioWaveformGroup.EnableMethodErrors = False

' Load the audio file into the waveform group
If objAudioWaveformGroup.LoadAudio(sInputWaveFilename) <> DICOM_SUCCESS Then
Exit Function
End If

' Insert the audio waveform group into the Data Set
If objDataSet.AddWaveformGroup (objAudioWaveformGroup) <> DICOM_SUCCESS Then
Exit Function
End If

InsertWaveFileIntoDataSet = True
End Function


Inserting a Waveform Group Into a Data Set Example for Visual Basic

'*****************************************************************'
'* This is a comprehensive sample, which shows how to insert a *'
'* waveform group with one ECG channel into a Data Set. *'
'* The main function is InsertECGWaveform; the rest of the *'
'* functions are helping functions. *'
'*****************************************************************'

' The main function that creates the waveform group and adds to the Data Set
Function InsertECGWaveform(objDataSet As LEADDicomDS, Samples() As Integer) As Boolean
InsertECGWaveform = False

' Our new waveform group
Dim objECGWaveformGroup As New DicomWaveformGroup

objECGWaveformGroup.EnableMethodErrors = False

' Reset the waveform group, we don't really need to call this!
objECGWaveformGroup.Reset

' Set the Waveform Sample Interpretation
objECGWaveformGroup.SampleInterpretation = WAVEFORM_SAMPLE_INTERPRETATION_SS

Dim lNumberOfSamples As Long
lNumberOfSamples = UBound(Samples) - LBound(Samples) + 1

' Set the Number of Waveform Samples. You can obtain this number by accessing
' the NumberOfSamplesPerChannel property.
If objECGWaveformGroup.SetNumberOfSamplesPerChannel (lNumberOfSamples) <> DICOM_SUCCESS Then
Exit Function
End If

' Set the Sampling Frequency
objECGWaveformGroup.SamplingFrequency = 240#

' No Multiplex Group Time Offset. When the value is defined, it can be set using the
' MultiplexGroupTimeOffset property.
objECGWaveformGroup.ValueDefined (MULTIPLEX_GROUP_TIME_OFFSET) = False

' No Trigger Time Offset. When the value is defined, it can be set using the
' TriggerTimeOffset property.
objECGWaveformGroup.ValueDefined (TRIGGER_TIME_OFFSET) = False

' No Trigger Sample Position. When the value is defined, it can be set using the
' TriggerSamplePosition property.
objECGWaveformGroup.ValueDefined (TRIGGER_SAMPLE_POSITION) = False

' Waveform Originality is ORIGINAL
objECGWaveformGroup.WaveformOriginality = WAVEFORM_ORIGINALITY_ORIGINAL

' Set the Multiplex Group Label
objECGWaveformGroup.ValueDefined (MULTIPLEX_GROUP_LABEL) = True
objECGWaveformGroup.MultiplexGroupLabel = "SCPECG Waveform"

' Set the Waveform Padding Value
objECGWaveformGroup.ValueDefined (WAVEFORM_PADDING_VALUE) = True
objECGWaveformGroup.WaveformPaddingValue = 32768

If Not InsertECGChannel(objDataSet, objECGWaveformGroup, Samples) Then
Exit Function
End If

' Delete any waveform groups that already exist in the Data Set
Do While objDataSet.GetWaveformGroupCount () > 0
objDataSet.DeleteWaveformGroup 0
Loop

' Insert the new waveform group into the Data Set
If objDataSet.AddWaveformGroup (objECGWaveformGroup) <> DICOM_SUCCESS Then
Exit Function
End If

InsertECGWaveform = True
End Function

' Adds an ECG channel to the group
Function InsertECGChannel(objDataSet As LEADDicomDS, _
objWaveformGroup As DicomWaveformGroup, _
Samples() As Integer) As Boolean
InsertECGChannel = False

Dim objECGWaveformChannel As DicomWaveformChannel

' Add a channel to the group
On Error Resume Next
Set objECGWaveformChannel = objWaveformGroup.Channels.Add ()
If Err.Number <> 0 Then
Exit Function
End If
On Error GoTo 0

' Set the samples of the channel
If objECGWaveformChannel.SetChannelSamples (Samples) < 0 Then
Exit Function
End If

' Set the Channel Source and Sensitivity
If Not SetChannelSourceAndSensitivity(objDataSet, objECGWaveformChannel) Then
Exit Function
End If

' Set the Channel Status
objECGWaveformChannel.ValueDefined (CHANNEL_STATUS) = True
objECGWaveformChannel.ChannelStatus = CHANNEL_STATUS_OK

' Set the Channel Time Skew
objECGWaveformChannel.ValueDefined (CHANNEL_TIME_SKEW) = True
objECGWaveformChannel.ChannelTimeSkew = 0#

' Set the Waveform Channel Number
objECGWaveformChannel.ValueDefined (WAVEFORM_CHANNEL_NUMBER) = True
objECGWaveformChannel.WaveformChannelNumber = 0

' Set the Channel Label
objECGWaveformChannel.ValueDefined (CHANNEL_LABEL) = True
objECGWaveformChannel.ChannelLabel = "First Channel"

' No Channel Offset. When the value is defined, it can be set using the ChannelOffset
' property
objECGWaveformChannel.ValueDefined (CHANNEL_OFFSET) = False

' Set the Filter Low Frequency
objECGWaveformChannel.ValueDefined (FILTER_LOW_FREQUENCY) = True
objECGWaveformChannel.FilterLowFrequency = 0.05

' Set Filter High Frequency
objECGWaveformChannel.ValueDefined (FILTER_HIGH_FREQUENCY) = True
objECGWaveformChannel.FilterHighFrequency = 100#

' Set the Channel Minimum Value
objECGWaveformChannel.ValueDefined (CHANNEL_MINIMUM_VALUE) = True
objECGWaveformChannel.ChannelMinimumValue = -386

' Set the Channel Maximum Value
objECGWaveformChannel.ValueDefined (CHANNEL_MAXIMUM_VALUE) = True
objECGWaveformChannel.ChannelMaximumValue = 1264

' When the Notch Filter Frequency and Bandwidth are defined, they can be set using the
' NotchFilterFrequency and NotchFilterBandwidth properties.

' Last, but not least, set the channel annotations!
InsertECGChannel = SetChannelAnnotations(objECGWaveformChannel)
End Function

' Sets the Channel Source and Sensitivity
Function SetChannelSourceAndSensitivity(objDataSet As LEADDicomDS, _
objWaveformChannel As DicomWaveformChannel) _
As Boolean
SetChannelSourceAndSensitivity = False

' We will use the Context Group Table

' -------------------- Channel Source --------------------

Const CID_3001 = "CID 3001"

' Load the ECG Leads Context Group
objDataSet.LoadContextGroup CID_3001
If Not objDataSet.FindContextGroup(CID_3001) Then
Exit Function
End If

' 5.6.3-9-1 is Lead I (Einthoven)
If Not objDataSet.FindCodedConcept("SCPECG", "5.6.3-9-1") Then
Exit Function
End If

' Set the Channel Source
With objWaveformChannel.ChannelSource
.CodingSchemeDesignator = objDataSet.CurrentCodedConcept.CodingSchemeDesignator
.CodingSchemeVersion = objDataSet.CurrentCodedConcept.CodingSchemeVersion
.CodeValue = objDataSet.CurrentCodedConcept.CodeValue
.CodeMeaning = objDataSet.CurrentCodedConcept.CodeMeaning
End With

' -------------------- Channel Sensitivity --------------------

objWaveformChannel.ValueDefined (CHANNEL_SENSITIVITY) = True

' The Channel Sensitivity
objWaveformChannel.ChannelSensitivity = 0.00122

Const CID_3082 = "CID 3082"

' Load the Cardiology Units of Measurement Context Group
objDataSet.LoadContextGroup CID_3082
If Not objDataSet.FindContextGroup(CID_3082) Then
Exit Function
End If

If Not objDataSet.FindCodedConcept("UCUM", "mV") Then
Exit Function
End If

' The Channel Sensitivity Units
With objWaveformChannel.ChannelSensitivityUnits
.CodingSchemeDesignator = objDataSet.CurrentCodedConcept.CodingSchemeDesignator
.CodingSchemeVersion = objDataSet.CurrentCodedConcept.CodingSchemeVersion
.CodeValue = objDataSet.CurrentCodedConcept.CodeValue
.CodeMeaning = objDataSet.CurrentCodedConcept.CodeMeaning
End With

' The Channel Sensitivity Correction Factor
objWaveformChannel.ChannelSensitivityCF = 1#

' The Channel Baseline
objWaveformChannel.ChannelBaseline = 0#

SetChannelSourceAndSensitivity = True
End Function

' Adds annotations for the channel
Function SetChannelAnnotations(objWaveformChannel As DicomWaveformChannel) As Boolean
SetChannelAnnotations = False

' Delete any existing channel annotations
Do While objWaveformChannel.Annotations.Count > 0
objWaveformChannel.Annotations.Remove 0
Loop

Dim objECGWaveformAnnotation As DicomWaveformAnnotation

' Add an annotation object
On Error Resume Next
Set objECGWaveformAnnotation = objWaveformChannel.Annotations.Add ()
If Err.Number <> 0 Then
Exit Function
End If
On Error GoTo 0

' Our annotation is defined by a Coded Name/Numeric Measurement pair
objECGWaveformAnnotation.ValueType = TYPE_CODED_NAME_AND_NUMERIC_VALUE

' The Coded Name. Note: Instead of setting these values directly, you can also use
' the Context Group Table; the Context Groups defined by the DICOM Content Mapping
' Resource (DCMR) can be loaded into this table. Take a look at the function
' SetChannelSourceAndSensitivity above for an example.
With objECGWaveformAnnotation.CodedName
.CodingSchemeDesignator = "LN"
.CodingSchemeVersion = "19971101"
.CodeValue = "8867-4"
.CodeMeaning = "Heart rate"
End With

' The Numeric Value
On Error Resume Next
objECGWaveformAnnotation.NumericValueCount = 1
If Err.Number <> 0 Then
Exit Function
End If
On Error GoTo 0
objECGWaveformAnnotation.NumericValue(0) = 69#

' The Measurement Units. Refer to the note given when the Coded Name was set.
objECGWaveformAnnotation.ValueDefined (MEASUREMENT_UNITS) = True
With objECGWaveformAnnotation.MeasurementUnits
.CodingSchemeDesignator = "UCUM"
.CodingSchemeVersion = "1.4"
.CodeValue = "{H.B.}/min"
.CodeMeaning = "Heart beat per minute"
End With

SetChannelAnnotations = True
End Function


InsertIOD Example for Visual Basic

Private Sub TestFunc(bChild As Boolean)
Dim bInsert As Boolean
Dim lCode As Long
Dim nType As Integer
Dim hIOD As Long
Dim hTemp As Long
Dim nRet As Integer

bInsert = False

LEADDICOM1.EnableMethodErrors = True

On Error GoTo INSERTIODERROR
lCode = 1048593
nType = DICOM_IOD_TYPE_CLASS
'store current IOD
hIOD = LEADDICOM1.CurrentIOD.hIOD

LEADDICOM1.EnableMethodErrors = False

'does an IOD already exist on the target level?
If (bChild = True) Then
'if the current IOD has a child, move to that child's level
nRet = LEADDICOM1.MoveChildIOD
If (nRet <> 0) Then 'no children, so insert is OK
bInsert = True
LEADDICOM1.SetCurrentIOD hIOD
Else 'check the child's level to see if target IOD already exists
hTemp = LEADDICOM1.CurrentIOD.hIOD
LEADDICOM1.MoveFirstIOD True
nRet = LEADDICOM1.FindIOD(lCode, nType, True)
If (nRet <> 0) Then
bInsert = True
End If
'move back to parent level
LEADDICOM1.SetCurrentIOD hTemp
LEADDICOM1.MoveParentIOD
End If
Else
'check the current IOD's level
LEADDICOM1.MoveFirstIOD (True)
nRet = LEADDICOM1.FindIOD(lCode, nType, True)
If (nRet <> 0) Then
bInsert = True
End If
LEADDICOM1.SetCurrentIOD hIOD
End If

LEADDICOM1.EnableMethodErrors = True

'allow user to insert item at the same level as the current or as child
If (bInsert = True) Then
LEADDICOM1.InsertIOD bChild, nType, lCode, "My Test IOD", 5, "Test
Description"
Else
MsgBox "Already exists"
End If
Exit Sub

INSERTIODERROR:
MsgBox "Error"
LEADDICOM1.EnableMethodErrors = True
End Sub


InsertKey Example for Visual Basic

Dim x As Integer

LEADDICOM1.ResetDS
LEADDICOM1.InitDS DICOM_CLASS_UNKNOWN, 0

'insert some keys
LEADDICOM1.InsertKey "PATIENT", True 'insert PATIENT level key
LEADDICOM1.InsertKey "STUDY", True 'insert STUDY level key

'insert 5 SERIES level keys and some data
For x = 1 To 5
LEADDICOM1.StringValueCount = 1
LEADDICOM1.InsertKey "SERIES", True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.StringValues(0) = CStr(x)
LEADDICOM1.SetStringValue 1
LEADDICOM1.MoveParentElement
LEADDICOM1.MoveParentKey 'move back up one level
Next

'move to root key
LEADDICOM1.MoveRootKey 'PATIENT level
MsgBox LEADDICOM1.GetKeyValue

'move to SERIES level
LEADDICOM1.MoveChildKey 'STUDY
LEADDICOM1.MoveChildKey 'SERIES

'find first SERIES
LEADDICOM1.FindFirstKey "SERIES", True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.GetStringValue 0, 1
MsgBox LEADDICOM1.StringValues(0)

'find next series
LEADDICOM1.FindNextKey True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.GetStringValue 0, 1
MsgBox LEADDICOM1.StringValues(0)

'find last SERIES
LEADDICOM1.FindLastKey "SERIES", True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.GetStringValue 0, 1
MsgBox LEADDICOM1.StringValues(0)

'find previous SERIES
LEADDICOM1.FindPrevKey True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.GetStringValue 0, 1
MsgBox LEADDICOM1.StringValues(0)

'find last SERIES and delete it
LEADDICOM1.FindLastKey "SERIES", True
LEADDICOM1.DeleteKey

'move to root key
LEADDICOM1.MoveFirstKey False
MsgBox LEADDICOM1.GetKeyValue

'move to SERIES level
LEADDICOM1.MoveChildKey 'STUDY
LEADDICOM1.MoveChildKey 'SERIES

'move to first SERIES
LEADDICOM1.MoveFirstKey True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.GetStringValue 0, 1
MsgBox LEADDICOM1.StringValues(0)

'move to next series
LEADDICOM1.MoveNextKey True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.GetStringValue 0, 1
MsgBox LEADDICOM1.StringValues(0)

'move to last SERIES
LEADDICOM1.MoveLastKey True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.GetStringValue 0, 1
MsgBox LEADDICOM1.StringValues(0)

'move to previous SERIES
LEADDICOM1.MovePrevKey True
LEADDICOM1.MoveChildElement
LEADDICOM1.FindFirstElement TAG_REFERENCED_FILE_ID, True
LEADDICOM1.GetStringValue 0, 1
MsgBox LEADDICOM1.StringValues(0)


InsertModule Example for Visual Basic

Private Sub Test2Menu_Click()
Dim nRet As Integer

LEADDICOM1.EnableMethodErrors = False
LEADDICOM1.GetInfoDS
nRet = LEADDICOM1.InsertModule(DICOM_MODULE_LUT_IDENTIFICATION, True)
If (nRet <> 0) Then
MsgBox "Error Inserting Module!"
Else
nRet = LEADDICOM1.FindModuleIOD(LEADDICOM1.InfoClass, LEADDICOM1.CurrentModule.Module)
MsgBox "Inserted Module " & LEADDICOM1.CurrentIOD.Name
End If
End Sub


InsertTag Example for Visual Basic

Private Sub Command10_Click()
Dim nRet As Integer
Dim ItemX As ListItem
Dim szItem As String
Dim nLen As Integer
Dim x As Integer
Dim szItemL As String
Dim szItemR As String

On Error GoTo INSERTTAGERROR

LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.FindTag(131079)
If (nRet = 0) Then
MsgBox "Already Exists!"
Exit Sub
End If

nRet = LEADDICOM1.InsertTag(131079, -1, "My Test Tag", VR_OB, 1, 1, 1)
If (nRet <> 0) Then
MsgBox "Error"
End If

LEADDICOM1.EnableMethodErrors = True
'add item to the ListView control
Set ItemX = ListView1.ListItems.Add()
szItem = Hex$(LEADDICOM1.CurrentTag.Code)
nLen = Len(szItem)
szItemR = Right$(szItem, 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & Left$(szItem, nLen - 4)
ItemX.Text = szItemL & ":" & szItemR

szItem = Hex$(LEADDICOM1.CurrentTag.Mask)
nLen = Len(szItem)
szItemR = Right$(szItem, 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & Left$(szItem, nLen - 4)
ItemX.SubItems(1) = szItemL & ":" & szItemR
ItemX.SubItems(2) = LEADDICOM1.CurrentTag.Name
ItemX.SubItems(3) = CStr(LEADDICOM1.CurrentTag.VR)
ItemX.SubItems(4) = CStr(LEADDICOM1.CurrentTag.MinVM)
ItemX.SubItems(5) = CStr(LEADDICOM1.CurrentTag.MaxVM)
ItemX.SubItems(6) = CStr(LEADDICOM1.CurrentTag.DivideVM)

Set ListView1.SelectedItem = ListView1.FindItem(ItemX.Text)
ListView1.Refresh
ListView1.SetFocus

Exit Sub
INSERTTAGERROR:
MsgBox "Error"
End Sub


InsertUID Example for Visual Basic

Private Sub Command10_Click()
Dim nRet As Integer
Dim ItemX As ListItem

LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.FindUID("1.2.840.10008.1.3")
If (nRet = 0) Then
MsgBox "Already Exists!"
Exit Sub
End If

LEADDICOM1.EnableMethodErrors = True

On Error GoTo INSERTUIDERROR
nRet = LEADDICOM1.InsertUID("1.2.840.10008.1.3", "My Test UID", DICOM_UID_TYPE_OTHER)
If (nRet <> 0) Then
MsgBox "Error"
End If
'add item to the ListView control
Set ItemX = ListView1.ListItems.Add()
ItemX.Text = CStr(LEADDICOM1.CurrentUID.Code)
ItemX.SubItems(1) = LEADDICOM1.CurrentUID.Name

Set ListView1.SelectedItem = ListView1.FindItem(ItemX.Text)
ListView1.Refresh
ListView1.SetFocus

LEADDICOM1.EnableMethodErrors = True
Exit Sub
INSERTUIDERROR:
MsgBox "Error"
End Sub


InsertVR Example for Visual Basic

Private Sub Command10_Click()
Dim nRet As Integer
Dim ItemX As ListItem
Dim nCode As Integer
Dim nRestrict As Integer

LEADDICOM1.EnableMethodErrors = True

On Error GoTo INSERTVRERROR
LEADDICOM1.EnableMethodErrors = False
nCode = 20322
nRet = LEADDICOM1.FindVR(nCode)
If (nRet = 0) Then
MsgBox "Already Exists!"
Exit Sub
End If

nRestrict = DICOM_VR_FIXED + DICOM_VR_TEXT
nRet = LEADDICOM1.InsertVR(nCode, "My Test VR", 64, nRestrict, 1)
If (nRet <> 0) Then
MsgBox "Error"
End If
'add item to the ListView control
Set ItemX = ListView1.ListItems.Add()
ItemX.Text = CStr(LEADDICOM1.CurrentVR.Code)
ItemX.SubItems(1) = LEADDICOM1.CurrentVR.Name
ItemX.SubItems(2) = CStr(LEADDICOM1.CurrentVR.Length)
ItemX.SubItems(3) = CStr(LEADDICOM1.CurrentVR.Restrict)
ItemX.SubItems(4) = CStr(LEADDICOM1.CurrentVR.UnitSize)

Set ListView1.SelectedItem = ListView1.FindItem(ItemX.Text)
ListView1.Refresh
ListView1.SetFocus

LEADDICOM1.EnableMethodErrors = True
Exit Sub
INSERTVRERROR:
MsgBox "Error"
End Sub


IsActivated Example for Visual Basic

Dim out$
'test the local computer's connection
out$ = "Activated: " & CStr(LEADDICOMNet1.IsActivated (LEADDICOMNet1.hNet))
out$ = out$ & Chr(13)
out$ = out$ & "Connected: " & CStr(LEADDICOMNet1.IsConnected (LEADDICOMNet1.hNet))
out$ = out$ & Chr(13)
out$ = out$ & "Associated: " & CStr(LEADDICOMNet1.IsAssociated (LEADDICOMNet1.hNet))
MsgBox out$


IsAsyncOperations Example for Visual Basic

If LEADDICOMNet1.IsAsyncOperations (LEADDICOMNet1.hPDU) = True Then
MsgBox "AsyncOperations enabled"
'get the operations counts
MsgBox "Invoked " & CStr(LEADDICOMNet1.GetInvokedOperationsCount(LEADDICOMNet1.hPDU))
MsgBox "Performed " & CStr(LEADDICOMNet1.GetPerformedOperationsCount(LEADDICOMNet1.hPDU))
'now disable it
LEADDICOMNet1.SetAsyncOperations LEADDICOMNet1.hPDU, False, 0, 0
Else
MsgBox "AsyncOperations disabled"
'now enable it
LEADDICOMNet1.SetAsyncOperations LEADDICOMNet1.hPDU, True, 0, 0
End If


ISCLChallengeResponseSuccess example for Visual Basic

Private Sub LEADDICOMNet1_NetExternalAuthenticateISCL(ByVal hNet As Long, nChallenge As Variant, nResponse As Variant, nParameter As Variant)
nResponse = nChallenge + nParameter
LEADDICOMNet1.ISCLChallengeResponseSuccess = True
End Sub

Private Function GetRandom() As Currency
Dim RandVal As Currency
RandVal = Rnd() * &H10000
RandVal = RandVal * &H10000 + Rnd() * &H10000
RandVal = RandVal * &H10000 + Rnd() * &H10000
RandVal = RandVal * &H10000 + Rnd() * &H10000
End Function

Private Sub LEADDICOMNet1_NetGetChallengeISCL(ByVal hNet As Long, nChallenge As Variant, nParameter As Variant)
nChallenge = GetRandom() + nParameter
LEADDICOMNet1.ISCLChallengeResponseSuccess = True
End Sub

Private Sub LEADDICOMNet1_NetInternalAuthenticateISCL(ByVal hNet As Long, nChallenge As Variant, nResponse As Variant, nParameter As Variant)
nResponse = nChallenge + nParameter
LEADDICOMNet1.ISCLChallengeResponseSuccess = True
End Sub


IsImplementClass Example for Visual Basic

Dim szUID As String

'is max len enabled?
If (LEADDICOMNet1.IsImplementClass (LEADDICOMNet1.hPDU) = True) Then
'disable it
'display old value
szUID = LEADDICOMNet1.GetImplementClass (LEADDICOMNet1.hPDU)
MsgBox szUID
LEADDICOMNet1.SetImplementClass LEADDICOMNet1.hPDU, False, szUID
Else
'enable it
LEADDICOMNet1.SetImplementClass LEADDICOMNet1.hPDU, True, UID_RT_DOSE_STORAGE
szUID = LEADDICOMNet1.GetImplementClass (LEADDICOMNet1.hPDU)
MsgBox szUID
End If


IsImplementVersion Example for Visual Basic

Dim szVersion As String

If (LEADDICOMNet1.IsImplementVersion (LEADDICOMNet1.hPDU) = True) Then
'disable it
'display old value
szVersion = LEADDICOMNet1.GetImplementVersion (LEADDICOMNet1.hPDU)
MsgBox szVersion
LEADDICOMNet1.SetImplementVersion LEADDICOMNet1.hPDU, False, szVersion
Else
'enable it
LEADDICOMNet1.SetImplementVersion LEADDICOMNet1.hPDU, True, "v13.0"
szVersion = LEADDICOMNet1.GetImplementVersion (LEADDICOMNet1.hPDU)
MsgBox szVersion
End If


IsISCLQueueEmpty Example for Visual Basic

If LEADDICOMNet1.IsISCLQueueEmpty (LEADDICOMNet1.hNet) Then
MsgBox "ISCL queue is empty"
Else
MsgBox "ISCL queue is not empty"
End If


IsMaxLengthEnabled Example for Visual Basic

Dim lLen As Long

'is max len enabled?
If (LEADDICOMNet1.IsMaxLengthEnabled (LEADDICOMNet1.hPDU) = True) Then
'disable it
'display old value
lLen = LEADDICOMNet1.GetMaxLength (LEADDICOMNet1.hPDU)
MsgBox CStr(lLen)
LEADDICOMNet1.SetMaxLength LEADDICOMNet1.hPDU, False, lLen
Else
'enable it
LEADDICOMNet1.SetMaxLength LEADDICOMNet1.hPDU, True, 8
End If


IsRoleSelect Example for Visual Basic

Dim x As Long
Dim nID As Long
Dim szOut As String
Dim nUser As Integer
Dim nProvider As Integer

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU

'indicate that we wish to serve as user for each SOP associated
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetRoleSelect LEADDICOMNet1.hPDU, nID, True, PDU_ROLE_SUPPORT, PDU_ROLE_NON_SUPPORT
Next

'now, display the information
szOut = "Role Select Info" & Chr(13)
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x)
szOut = szOut & "ID: " & CStr(nID)
If (LEADDICOMNet1.IsRoleSelect(LEADDICOMNet1.hPDU, nID) = True) Then
nUser = LEADDICOMNet1.GetUserRole(LEADDICOMNet1.hPDU, nID)
nProvider = LEADDICOMNet1.GetProviderRole(LEADDICOMNet1.hPDU, nID)
szOut = szOut & " User: " & CStr(nUser)
szOut = szOut & " Provider: " & CStr(nProvider) & Chr(13)
Else
szOut = szOut & " No Role Select" & Chr(13)
End If
Next
MsgBox szOut


IsSupportLocked Example for Visual Basic

If (DicomKernel.IsSupportLocked(L_SUPPORT_MEDICAL)) Then
MsgBox "No Support"
End If


J2KCompressionControl example for Visual Basic

Private Sub TestProcBitmap()
LEADDICOM1.InitDS DICOM_CLASS_CR_IMAGE_STORAGE, DS_EXPLICIT_VR + _
DS_METAHEADER_ABSENT + DS_LITTLE_ENDIAN
'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap

' Use the Q factor for compression control.
LEADDICOM1.J2KOptions.J2KCompressionControl= DICOM_J2K_COMP_QFACTOR

'set the bitmap
LEADDICOM1.SetBitmapValue DICOM_IMAGE_COMPRESSION_J2K_LOSSY, _
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2, 0, 100, 0
End Sub


J2KCompressionRatio example for Visual Basic

Private Sub TestProcBitmap()
LEADDICOM1.InitDS DICOM_CLASS_CR_IMAGE_STORAGE, DS_EXPLICIT_VR + _
DS_METAHEADER_ABSENT + DS_LITTLE_ENDIAN

'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap

' Use the Compression ratio
LEADDICOM1.J2KOptions.J2KCompressionControl = DICOM_J2K_COMP_RATIO
LEADDICOM1.J2KOptions.J2KCompressionRatio = 50#
'set the bitmap
LEADDICOM1.SetBitmapValue DICOM_IMAGE_COMPRESSION_J2K_LOSSY, _
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2, 0, 0, 0
End Sub


J2KROIControl example for Visual Basic

Private Sub TestProcBitmap()
DS_METAHEADER_ABSENT + DS_LITTLE_ENDIAN
'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap
LEADDICOM1.J2KOptions.J2KSetDefaults
LEADDICOM1.J2KOptions.J2KCompressionControl = DICOM_J2K_COMP_RATIO
LEADDICOM1.J2KOptions.J2KCompressionRatio = 100#
LEADDICOM1.J2KOptions.J2KUseROI = True
LEADDICOM1.J2KOptions.J2KROIControl = J2K_USEOPTION_RECT
LEADDICOM1.J2KOptions.J2KROILeft = 200
LEADDICOM1.J2KOptions.J2KROITop = 200
LEADDICOM1.J2KOptions.J2KROIWidth = 400
LEADDICOM1.J2KOptions.J2KROIHeight = 400
LEADDICOM1.J2KOptions.J2KXTsiz = 100
LEADDICOM1.J2KOptions.J2KYTsiz = 100
'set the bitmap
LEADDICOM1.SetBitmapValue DICOM_IMAGE_COMPRESSION_J2K_LOSSY, _
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2, 0, 0, 0
End Sub


J2KSetDefaults example for Visual Basic

Private Sub TestProcBitmap()
Dim msg$
' Display all the default JPEG2000 advanced options
LEADDICOM1.J2KOptions.J2KSetDefaults

msg$ = msg$ + "J2KUseColorTransform = " + CStr(LEADDICOM1.J2KOptions.J2KUseColorTransform) + vbCrLf
msg$ = msg$ + "J2KDerivedQuantization = " + CStr(LEADDICOM1.J2KOptions.J2KDerivedQuantization) + vbCrLf

msg$ = msg$ + "J2KXOsiz = " + CStr(LEADDICOM1.J2KOptions.J2KXOsiz) + vbCrLf
msg$ = msg$ + "J2KYOsiz = " + CStr(LEADDICOM1.J2KOptions.J2KYOsiz) + vbCrLf
msg$ = msg$ + "J2KXTsiz = " + CStr(LEADDICOM1.J2KOptions.J2KXTsiz) + vbCrLf
msg$ = msg$ + "J2KYTsiz = " + CStr(LEADDICOM1.J2KOptions.J2KYTsiz) + vbCrLf
msg$ = msg$ + "J2KXTOsiz = " + CStr(LEADDICOM1.J2KOptions.J2KXTOsiz) + vbCrLf
msg$ = msg$ + "J2KYTOsiz = " + CStr(LEADDICOM1.J2KOptions.J2KYTOsiz) + vbCrLf

msg$ = msg$ + "J2KDecompLevel = " + CStr(LEADDICOM1.J2KOptions.J2KDecompLevel) + vbCrLf
msg$ = msg$ + "J2KProgressOrder = " + CStr(LEADDICOM1.J2KOptions.J2KProgressOrder) + vbCrLf
msg$ = msg$ + "J2KCodBlockWidth = " + CStr(LEADDICOM1.J2KOptions.J2KCodBlockWidth) + vbCrLf
msg$ = msg$ + "J2KCodBlockHeight = " + CStr(LEADDICOM1.J2KOptions.J2KCodBlockHeight) + vbCrLf

msg$ = msg$ + "J2KCBS_SelectiveACBypass = " + CStr(LEADDICOM1.J2KOptions.J2KCBS_SelectiveACBypass) + vbCrLf
msg$ = msg$ + "J2KCBS_ResetContextOnBoundaries = " + CStr(LEADDICOM1.J2KOptions.J2KCBS_ResetContextOnBoundaries) + vbCrLf
msg$ = msg$ + "J2KCBS_TerminationOnEachPass = " + CStr(LEADDICOM1.J2KOptions.J2KCBS_TerminationOnEachPass) + vbCrLf
msg$ = msg$ + "J2KCBS_VerticallyCausalContext = " + CStr(LEADDICOM1.J2KOptions.J2KCBS_VerticallyCausalContext) + vbCrLf
msg$ = msg$ + "J2KCBS_PredictableTermination = " + CStr(LEADDICOM1.J2KOptions.J2KCBS_PredictableTermination) + vbCrLf
msg$ = msg$ + "J2KCBS_ErrorResilienceSymbol = " + CStr(LEADDICOM1.J2KOptions.J2KCBS_ErrorResilienceSymbol) + vbCrLf

msg$ = msg$ + "J2KGuardBits = " + CStr(LEADDICOM1.J2KOptions.J2KGuardBits) + vbCrLf
msg$ = msg$ + "J2KDerivedBaseMantissa = " + CStr(LEADDICOM1.J2KOptions.J2KDerivedBaseMantissa) + vbCrLf
msg$ = msg$ + "J2KDerivedBaseExponent = " + CStr(LEADDICOM1.J2KOptions.J2KDerivedBaseExponent) + vbCrLf

msg$ = msg$ + "J2KUseSOPMarker = " + CStr(LEADDICOM1.J2KOptions.J2KUseSOPMarker) + vbCrLf
msg$ = msg$ + "J2KUseEPHMarker = " + CStr(LEADDICOM1.J2KOptions.J2KUseEPHMarker) + vbCrLf

MsgBox msg$

End Sub


J2KTargetFileSize example for Visual Basic

Private Sub TestProcBitmap()
LEADDICOM1.InitDS DICOM_CLASS_CR_IMAGE_STORAGE, DS_EXPLICIT_VR + _
DS_METAHEADER_ABSENT + DS_LITTLE_ENDIAN
'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap
' Use the Compression ratio
LEADDICOM1.J2KOptions.J2KCompressionControl = DICOM_J2K_COMP_TARGETSIZE
LEADDICOM1.J2KOptions.J2KTargetFileSize = 15 * 1024
'set the bitmap
LEADDICOM1.SetBitmapValue DICOM_IMAGE_COMPRESSION_J2K_LOSSY, _
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2, 0, 0, 0
End Sub


KeepPixelDataIntact Example for Visual Basic

' Load a Data Set
If LEADDICOM1.LoadDS ("d:\lead14\dist\images\dicom\Image1.dic", 0) = DICOM_SUCCESS Then
If LEADDICOM1.KeepPixelDataIntact = False Then
Dim strMessage As String
strMessage = "Would you like to keep the pixel data unchanged?" & _
vbCrLf & _
"If you choose Yes, then the resulting bitmap data " & _
"will represent exactly what appears inside the " & _
"DICOM file, but may not display properly. If you " & _
"choose No, then the resulting bitmap data may not " & _
"be identical to what appears inside the DICOM file, " & _
"but will display properly."
If MsgBox(strMessage, vbYesNo) = vbYes Then
LEADDICOM1.KeepPixelDataIntact = True
End If
End If

If LEADDICOM1.FindFirstElement (TAG_PIXEL_DATA, False) = DICOM_SUCCESS Then
LEADDICOM1.GetBitmapValue 0, 0, ORDER_BGR, 0

' ...
End If
End If


Listen Example for Visual Basic

'create a server to accept up to 25 clients
LEADDICOMNet1.Listen "", 104, 25


LoadDS Example for Visual Basic

Dim nRet As Integer

'load a Data Set
LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.LoadDS ("d:\lead14\dist\images\dicom\image2.dic", 0)
If (nRet <> DICOM_SUCCESS) Then
MsgBox "Error " & CStr(nRet) & " loading file!"
End If
LEADDICOM1.EnableMethodErrors = True


LoadDSArray Example for Visual Basic

Private Sub TestLoadDSArray()
Dim FileName As String
Dim FileSize
Dim Ret As Integer
Dim factory As New LEADDicomFactory
Dim kernel As LEADDicomKernel
Dim szLic As String
Dim szClass As String

'These two variables should have the same scope
Dim LeadDicomDS As LeadDicomDS
Dim DataBuffer() As Byte

'Create the DICOM kernel object and unlock support
szLic = "LEADTOOLS OCX Copyright (c) 1991-2005 LEAD Technologies, Inc."
Set kernel = factory.CreateObject("LEADDicomKernel.LEADDicomKernel", szLic)
kernel.EnableMethodErrors = False
'Make sure to replace L_KEY_MEDICAL with your key
kernel.UnlockSupport L_SUPPORT_MEDICAL, L_KEY_MEDICAL
If (kernel.IsSupportLocked(L_SUPPORT_DICOM)) Then
MsgBox "Unlock Failed!"
Exit Sub
End If
'Create the DICOM dataset object
Set LeadDicomDS = factory.CreateObject("LEADDicomDS.LEADDicomDS", szLic)
LeadDicomDS.EnableMethodErrors = False
'We will simulate loading from array by reading a
'physical DICOM file into a byte array and then loading it
FileName = "D:\Program Files\LEAD Technologies, Inc\LEADTOOLS14\Images\IMAGE2.dic"
'File length
FileSize = FileLen(FileName)
If FileSize = 0 Then
Exit Sub
End If
'Allocate a buffer to hold the file data
ReDim DataBuffer(FileSize)
'Open the file in binary mode
Open FileName For Binary Access Read As #1
Get #1, , DataBuffer
'Load DICOM file from byte array
Ret = LeadDicomDS.LoadDSArray(DataBuffer, 0)
If Ret <> DICOM_SUCCESS Then
MsgBox "Error " & CStr(Ret) & " loading file!"
End If

Close #1
'Get the info about this DICOM dataset
LeadDicomDS.GetInfoDS
LeadDicomDS.FindClassIOD LeadDicomDS.InfoClass
szClass = LeadDicomDS.CurrentIOD.Name
MsgBox "Class: " & szClass

End Sub


Modifying a Context Group Example for Visual Basic

Private Sub ModifyContextGroup(objDS As LEADDicomDS)
objDS.ResetContextGroup
objDS.LoadContextGroup

' Look for a Context Group
If Not objDS.FindContextGroup ("CID 6019") Then
Exit Sub
End If

' Look for a Coded Concept in the current Context Group
If Not objDS.FindCodedConcept ("SRT", "F-01781") Then
Exit Sub
End If

' Set the Code Meaning of the current Coded Concept (French translation)
objDS.SetCodedConceptCodeMeaning "Situé à 1 heure"
' Refer to Enumerating the Coded Concepts of a Context Group Example
' for Visual Basic for the function DisplayCodedConcept
DisplayCodedConcept objDS, False

' Delete the current Coded Concept
objDS.DeleteCodedConcept

' Add a (testing) Coded Concept to the current Context Group
objDS.InsertCodedConcept "CSD", "", "CV", "CM"
DisplayCodedConcept objDS, False

' Restore the current Context Group (discard all the changes
' made to the Group)
objDS.DefaultContextGroup
' Refer to Enumerating the Coded Concepts of a Context Group Example
' for Visual Basic for the procedure EnumCodedConcepts
EnumCodedConcepts objDS

' Delete the current Context Group
objDS.DeleteContextGroup
End Sub


MoveFirstIOD Example for Visual Basic

Private Sub Command14_Click()
Dim hIOD As Long

LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEIODERROR
'Move to the First IOD in the list
LEADDICOM1.MoveFirstIOD False
hIOD = LEADDICOM1.CurrentIOD.hIOD 'store it
MsgBox LEADDICOM1.CurrentIOD.Name

'Move to the Last IOD at this same level
LEADDICOM1.MoveLastIOD True
MsgBox LEADDICOM1.CurrentIOD.Name

'Move to the Previous IOD at this same level
LEADDICOM1.MovePrevIOD True
MsgBox LEADDICOM1.CurrentIOD.Name

'Move back to First IOD
LEADDICOM1.SetCurrentIOD hIOD

'Move to the Next IOD at this same level
LEADDICOM1.MoveNextIOD True
MsgBox LEADDICOM1.CurrentIOD.Name
Exit Sub

MOVEIODERROR:
MsgBox "Error"
End Sub


MoveFirstTag Example for Visual Basic

Private Sub Command10_Click()
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVETAGERROR
LEADDICOM1.MoveFirstTag
DisplayItem
MsgBox "wait"

LEADDICOM1.MoveNextTag
DisplayItem
MsgBox "wait"

LEADDICOM1.MoveLastTag
DisplayItem
MsgBox "wait"

LEADDICOM1.MovePrevTag
DisplayItem
MsgBox "wait"
MOVETAGERROR:
End Sub

Private Sub DisplayItem()
Dim szItem As String
Dim szItemL As String
Dim szItemR As String
Dim nLen As Integer
Dim x As Integer

LEADDICOM1.EnableMethodErrors = True
On Error GoTo DISPLAYERROR
szItem = Hex$(LEADDICOM1.CurrentTag.Code)
nLen = Len(szItem)
szItemR = Right$(szItem, 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & Left$(szItem, nLen - 4)
Text1.Text = szItemL & ":" & szItemR

szItem = Hex$(LEADDICOM1.CurrentTag.Mask)
nLen = Len(szItem)
szItemR = Right$(szItem, 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & Left$(szItem, nLen - 4)
Text2.Text = szItemL & ":" & szItemR

Text3.Text = LEADDICOM1.CurrentTag.Name

Select Case LEADDICOM1.CurrentTag.VR
Case VR_AE
Text4.Text = "AE"
Case VR_AS
Text4.Text = "AS"
Case VR_AT
Text4.Text = "AT"
Case VR_CS
Text4.Text = "CS"
Case VR_DA
Text4.Text = "DA"
Case VR_DS
Text4.Text = "DS"
Case VR_DT
Text4.Text = "DT"
Case VR_FD
Text4.Text = "FD"
Case VR_FL
Text4.Text = "FL"
Case VR_IS
Text4.Text = "IS"
Case VR_LO
Text4.Text = "LO"
Case VR_LT
Text4.Text = "LT"
Case VR_OB
Text4.Text = "OB"
Case VR_OW
Text4.Text = "OW"
Case VR_PN
Text4.Text = "PN"
Case VR_SH
Text4.Text = "SH"
Case VR_SL
Text4.Text = "SL"
Case VR_SQ
Text4.Text = "SQ"
Case VR_SS
Text4.Text = "SS"
Case VR_ST
Text4.Text = "ST"
Case VR_TM
Text4.Text = "TM"
Case VR_UI
Text4.Text = "UI"
Case VR_UL
Text4.Text = "UL"
Case VR_UN
Text4.Text = "UN"
Case VR_US
Text4.Text = "US"
Case VR_UT
Text4.Text = "UT"
Case Else
Text4.Text = CStr(LEADDICOM1.CurrentTag.VR)
End Select

Text5.Text = LEADDICOM1.CurrentTag.MinVM
Text6.Text = LEADDICOM1.CurrentTag.MaxVM
Text7.Text = LEADDICOM1.CurrentTag.DivideVM

DISPLAYERROR:
End Sub


MoveFirstUID Example for Visual Basic

Private Sub Command10_Click()
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEUIDERROR
LEADDICOM1.MoveFirstUID
'display the items information
Text1.Text = LEADDICOM1.CurrentUID.Code
Text2.Text = LEADDICOM1.CurrentUID.Name
MsgBox "wait"

LEADDICOM1.MoveNextUID
'display the items information
Text1.Text = LEADDICOM1.CurrentUID.Code
Text2.Text = LEADDICOM1.CurrentUID.Name
MsgBox "wait"

LEADDICOM1.MoveLastUID
'display the items information
Text1.Text = LEADDICOM1.CurrentUID.Code
Text2.Text = LEADDICOM1.CurrentUID.Name
MsgBox "wait"

LEADDICOM1.MovePrevUID
'display the items information
Text1.Text = LEADDICOM1.CurrentUID.Code
Text2.Text = LEADDICOM1.CurrentUID.Name
MsgBox "wait"
MOVEUIDERROR:
End Sub


MoveFirstVR Example for Visual Basic

Private Sub Command10_Click()
LEADDICOM1.EnableMethodErrors = True

On Error GoTo MOVEVRERROR
LEADDICOM1.MoveFirstVR
DisplayItem
MsgBox "wait"

LEADDICOM1.MoveNextVR
DisplayItem
MsgBox "wait"

LEADDICOM1.MoveLastVR
DisplayItem
MsgBox "wait"

LEADDICOM1.MovePrevVR
DisplayItem
MsgBox "wait"

MOVEVRERROR:
End Sub

Private Sub DisplayItem()
Dim nRestrict As Integer

LEADDICOM1.EnableMethodErrors = True

On Error GoTo DISPLAYERROR
'display the items information
Select Case LEADDICOM1.CurrentVR.Code
Case VR_AE
Text1.Text = "AE"
Case VR_AS
Text1.Text = "AS"
Case VR_AT
Text1.Text = "AT"
Case VR_CS
Text1.Text = "CS"
Case VR_DA
Text1.Text = "DA"
Case VR_DS
Text1.Text = "DS"
Case VR_DT
Text1.Text = "DT"
Case VR_FD
Text1.Text = "FD"
Case VR_FL
Text1.Text = "FL"
Case VR_IS
Text1.Text = "IS"
Case VR_LO
Text1.Text = "LO"
Case VR_LT
Text1.Text = "LT"
Case VR_OB
Text1.Text = "OB"
Case VR_OW
Text1.Text = "OW"
Case VR_PN
Text1.Text = "PN"
Case VR_SH
Text1.Text = "SH"
Case VR_SL
Text1.Text = "SL"
Case VR_SQ
Text1.Text = "SQ"
Case VR_SS
Text1.Text = "SS"
Case VR_ST
Text1.Text = "ST"
Case VR_TM
Text1.Text = "TM"
Case VR_UI
Text1.Text = "UI"
Case VR_UL
Text1.Text = "UL"
Case VR_UN
Text1.Text = "UN"
Case VR_US
Text1.Text = "US"
Case VR_UT
Text1.Text = "UT"
Case Else
Text1.Text = CStr(LEADDICOM1.CurrentVR.Code)
End Select
Text2.Text = LEADDICOM1.CurrentVR.Name
Text3.Text = CStr(LEADDICOM1.CurrentVR.Length)

nRestrict = LEADDICOM1.CurrentVR.Restrict
nRestrict = (nRestrict And (Not DICOM_VR_BINARY))
nRestrict = (nRestrict And (Not DICOM_VR_STRING))
nRestrict = (nRestrict And (Not DICOM_VR_TEXT))

Select Case nRestrict
Case DICOM_VR_FIXED
Text4.Text = "Fixed"
Case DICOM_VR_MAXIMUM
Text4.Text = "Maximum"
Case DICOM_VR_MAXIMUM_GROUP
Text4.Text = "Maximum Group"
Case DICOM_VR_ANY
Text4.Text = "Any Length"
Case DICOM_VR_NOT_APPLICABLE
Text4.Text = "Not Applicable"
Case DICOM_VR_MAX
Text4.Text = "Max"
Case Else
Text4.Text = CStr(LEADDICOM1.CurrentVR.Restrict)
End Select

Text5.Text = CStr(LEADDICOM1.CurrentVR.UnitSize)

DISPLAYERROR:
End Sub


MoveRootElement Example for Visual Basic

Private Sub DSDeleteModule_Click()
Dim nRet1 As Integer
Dim nRet2 As Integer

LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to first element in Data Set
LEADDICOM1.MoveFirstElement False
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name

'move to next element in the same level of the Data Set
LEADDICOM1.MoveNextElement True
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name

'move to last element in the same level of the Data Set
LEADDICOM1.MoveLastElement True
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name

'move to previous element in the same level of the Data Set
LEADDICOM1.MovePrevElement True
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name

'find the first element that has a child
LEADDICOM1.EnableMethodErrors = False
nRet1 = LEADDICOM1.MoveFirstElement(False)
While nRet1 = 0
nRet2 = LEADDICOM1.MoveChildElement
If (nRet2 = 0) Then
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name
nRet1 = 1 'end loop
End If
If (nRet1 <> 1) Then
'check next element in this same level
nRet1 = LEADDICOM1.MoveNextElement(True)
End If
Wend
LEADDICOM1.EnableMethodErrors = True
'move back to the element's parent
If (nRet1 = 1) Then
LEADDICOM1.MoveParentElement
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name
End If

Exit Sub
MOVEELEMENTERROR:
MsgBox "Error"
End Sub


MoveRootIOD Example for Visual Basic

Private Sub Command14_Click()
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEIODERROR
'Move to the Root IOD
LEADDICOM1.MoveRootIOD
MsgBox LEADDICOM1.CurrentIOD.Name

'Move to the first Child IOD
LEADDICOM1.MoveChildIOD
MsgBox LEADDICOM1.CurrentIOD.Name

'Move back to the Parent IOD
LEADDICOM1.MoveParentIOD
MsgBox LEADDICOM1.CurrentIOD.Name

Exit Sub

MOVEIODERROR:
MsgBox "Error"
End Sub


NetClose Example for Visual Basic

Private Sub LEADDICOMNet1_NetClose(ByVal hNet As Long, ByVal nStatus As Long, ByVal hPeer As Long)
Dim out$

'a connection is being closed
'display some information about the connection:
out$ = "Host: " & LEADDICOMNet1.GetHostAddress (hNet)
out$ = out$ & " Port: " & CStr(LEADDICOMNet1.GetHostPort (hNet))
out$ = out$ & Chr(13)
out$ = out$ & "Peer: " & LEADDICOMNet1.GetPeerAddress (hNet)
out$ = out$ & " Port: " & CStr(LEADDICOMNet1.GetPeerPort (hNet))
MsgBox out$, , "Connection Closed"
End Sub


NetConnect Example for Visual Basic

Private Sub LEADDICOMNet1_NetConnect (ByVal hNet As Long, ByVal nStatus As Long)
Dim strOut As String
Dim strTemp As String
Dim strPeerAddress As String
Dim lPort As Long

strOut = "*** NetConnect Event *** " & Chr(13) & CStr(hNet) & " Status = " & CStr(nStatus)

strPeerAddress = LEADDICOMNet1.GetPeerAddress (hNet)
lPort = LEADDICOMNet1.GetPeerPort (hNet)

strTemp = "PeerAddress = " & strPeerAddress & Chr(13) & "Port = " & CStr(lPort)
strOut = strOut & Chr(13) & strTemp

MsgBox strOut
End Sub


NetNonSecureReceivedISCL Example for Visual Basic

Private Sub LEADDICOMNet1_NetNonSecureReceivedISCL (ByVal hNet As Long, ByVal nError As Long, vBuffer As Variant, ByVal nLength As Long)
If nError = DICOM_SUCCESS Then
MsgBox "1st byte of data = " & vBuffer(0) & ", last byte of data = " & vBuffer(nLength - 1)
End If
End Sub


NetNonSecureSendISCL Example for Visual Basic

Private Sub LEADDICOMNet1_NetNonSecureSendISCL (ByVal hNet As Long, ByVal nError As Long, ByVal nType As Long, ByVal nLength As Long)
If nError = DICOM_SUCCESS Then
MsgBox "Data was successfully received"
End If
End Sub


NetReceive Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceive(ByVal hNet As Long, ByVal nStatus As Long, ByVal nType As Integer, ByVal pData As Variant, ByVal lSize As Long)
MsgBox "data received - " & LEADDICOMNet1.GetPeerAddress (hNet) & " Status=" & CStr(nStatus) & " Type=" & CStr(nType)
End Sub


NetReceiveAbort (Communication Control)Example for Visual Basic

NetReceiveAbort Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveAbort (ByVal hNet As Long, ByVal nSource As Integer, ByVal nReason As Integer)
MsgBox "data received - " & LEADDICOMNet1.GetPeerAddress (hNet) & " Status=" & CStr(nStatus) & " Type=" & CStr(nType)
End Sub


NetReceiveAssociateAccept (Communication Control)Example for Visual Basic

NetReceiveAssociateAccept Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveAssociateAccept (ByVal hNet As Long, ByVal hPDU As Long)
MsgBox "Associate Accept Received - " & CStr(LEADDICOMNet1.IsAssociated (hNet))
End Sub


NetReceiveAssociateReject (Communication Control)Example for Visual Basic

NetReceiveAssociateReject Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveAssociateReject (ByVal hNet As Long, ByVal nResult As Integer, ByVal nSource As Integer, ByVal nReason As Integer)
MsgBox "Associate Request was rejected: Result= " & CStr(nResult) & " Source=" & CStr(nSource) & " Reason=" & CStr(nReason)
End Sub


NetReceiveAssociateRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveAssociateRequest (ByVal hNet As Long, ByVal hPDU As Long)

Dim x As Long
Dim nId As Integer
Dim nResult As Integer
Dim szAbstract As String
Dim szTransfer As String

'we have received an AssociateRequest
List2.AddItem "Associate Request was received"

'check the version, if not 1, reject it
If (LEADDICOMNet1.GetVersion (hPDU) <> 1) Then
LEADDICOMNet1.SendAssociateReject hNet, PDU_REJECT_RESULT_PERMANENT, _
PDU_REJECT_SOURCE_USER, _
PDU_REJECT_REASON_UNKNOWN
Else
'send associate accept class back
LEADDICOMNet1.CreateAssociate False
LEADDICOMNet1.ResetAssociate LEADDICOMNet1.hPDU, False
'copy all presentation objects from received hPDU
'also, reply that we only support the first Transfer Syntax from the received hPDU
For x = 0 To LEADDICOMNet1.GetPresentationCount (hPDU) - 1
nId = LEADDICOMNet1.GetPresentationID (hPDU, x)
szTransfer = LEADDICOMNet1.GetTransferSyntax(hPDU, nId, 0)
nResult = PDU_ACCEPT_RESULT_SUCCESS
szAbstract = LEADDICOMNet1.GetPresentationAbstract (hPDU, nId)
LEADDICOMNet1.AddPresentation LEADDICOMNet1.hPDU, nId, nResult, szAbstract
LEADDICOMNet1.AddTransferSyntax LEADDICOMNet1.hPDU, nId, szTransfer
Next
LEADDICOMNet1.SendAssociateAccept hNet
LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU
End If

End Sub


NetReceiveCCancelRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCCancelRequest (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer)
'note, this sample AE ignores C-CANCEL-REQUEST commands for simplicity
MsgBox "C-CANCEL-REQUEST was received - " & LEADDICOMNet1.GetPeerAddress (hNet)
End Sub


NetReceiveCEchoResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCEchoResponse (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal nStatus As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-ECHO-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))

End Sub


NetReceiveCFindResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCFindResponse (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal nStatus As Long, ByVal hDS As Long)
Dim strPeerAddress As String
Dim strStatus As String
Dim strMsg As String
Dim strFileName As String

strPeerAddress = LEADDICOMNet1.GetPeerAddress (hNet)

If nStatus = COMMAND_STATUS_PENDING Then
strStatus = "COMMAND_STATUS_PENDING"
End If

If nStatus = COMMAND_STATUS_SUCCESS Then
strStatus = "COMMAND_STATUS_SUCCESS"
End If

If nStatus = COMMAND_STATUS_CANCEL Then
strStatus = "COMMAND_STATUS_CANCEL"
End If

strMsg = "*** OnNetReceiveCFindResponse ***" + vbNewLine + "Peer[" + strPeerAddress + "]" + vbNewLine + "nPresentationID[" + Str(nPresentationID) + "]" + vbNewLine + "nMessageID[" + Str(nMessageID) + "]" + vbNewLine + "pszClass[" + pszClass + "]" + vbNewLine + "strStatus[" + strStatus + "]" + vbNewLine

If (hDS <> 0) Then
gnFileCount = gnFileCount + 1
strFileName = "d:\temp\CFind" + Str(gnFileCount) + ".dic"
LEADDICOM1.SaveExtDS hDS, strFileName, 0
strMsg = strMsg + "Saving[" + strFileName + "]"
End If
MsgBox strMsg
End Sub


NetReceiveCGetRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCGetRequest(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal nPriority As Integer, ByVal hDS As Long)
Dim nRet As Integer
Dim szFile As String
Dim NewNode As Node
Dim szReply As String
Dim lParent As Long
Dim szName As String
Dim szAE As String
Dim hPDU As Long
Dim szInstance As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-GET-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Priority: " & CStr(nPriority))

'perform the get
'here, the AE should check the data set, and perform
'matching against the files stored on the AE to determine
'what data set(s) should be sent back to the calling AE.
'In our case, we just send back a predetermined file for
'this demo!

'load the sample file
'NOTE: this sample is looking for a particular filename TEST2.DIC
szFile = "e:\images\dicom16.dic"
nRet = LEADDICOM1.LoadDS (szFile, 0)

'now, send a store command for the get sub-operation
hPDU = LEADDICOMNet1.GetAssociate (hNet)
szAE = LEADDICOMNet1.GetCalling (hPDU)

nRet = LEADDICOM1.FindFirstElement (TAG_SOP_INSTANCE_UID, False)
If (nRet = 0) Then
nRet = LEADDICOM1.GetStringValue (0, 1)
If (nRet = 0) Then
szInstance = LEADDICOM1.StringValues (0)
End If
End If

nRet = LEADDICOMNet1.SendCStoreRequest (hNet, nPresentationID, nMessageID + 1, pszClass, szInstance, nPriority, szAE, nMessageID, LEADDICOM1.hDicomDS)
'the above will cause a ReceiveCStoreResponse event on this machine

'we will send a get response after we have received the CStoreResponse from the calling AE
End Sub


NetReceiveCGetResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCGetResponse (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal nStatus As Long, ByVal nRemaining As Integer, ByVal nCompleted As Integer, ByVal nFailed As Integer, ByVal nWarning As Integer, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-GET-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Remaining Operations: " & CStr(nRemaining))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Failed Operations: " & CStr(nFailed))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Warnings: " & CStr(nWarning))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))

End Sub


NetReceiveCMoveRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCMoveRequest (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal nPriority As Integer, ByVal pszMoveAE As String, ByVal hDS As Long)
Dim nRet As Integer
Dim NewNode As Node
Dim szReply As String
Dim lParent As Long
Dim szName As String
Dim hPDU As Long
Dim szAbstract As String
Dim szTransfer As String
Dim szInstance As String
Dim szClassUID As String
Dim nID As Integer

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-MOVE-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

hPDU = LEADDICOMNet1.GetAssociate (hNet)

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Priority: " & CStr(nPriority))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Move AE Title: " & pszMoveAE)

'this sample simply returns a fixed dicom data set.
LEADDICOM1.LoadDS "e:\images\dicom16.dic", 0

LEADDICOM1.MoveFirstElement False
LEADDICOM1.FindFirstElement TAG_SOP_INSTANCE_UID, False
LEADDICOM1.GetStringValue 0, 1
szInstance = LEADDICOM1.StringValues (0)

LEADDICOM1.MoveFirstElement False
LEADDICOM1.FindFirstElement TAG_SOP_CLASS_UID, False
LEADDICOM1.GetStringValue 0, 1
szClassUID = LEADDICOM1.StringValues (0)

nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
'send a response
LEADDICOMNet1.SendCMoveResponse hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_NO_SUCH_CLASS, 0, 0, 1, 0, 0
Exit Sub
End If

'now, send the C-STORE sub operation
LEADDICOMNet1.SendCStoreRequest hNet, nID, nMessageID + 1, szClassUID, szInstance, nPriority, pszMoveAE, nMessageID, LEADDICOM1.hDicomDS

'send a response
LEADDICOMNet1.SendCMoveResponse hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS, 0, 1, 0, 0, 0

End Sub


NetReceiveCMoveResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCMoveResponse (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal nStatus As Long, ByVal nRemaining As Integer, ByVal nCompleted As Integer, ByVal nFailed As Integer, ByVal nWarning As Integer, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-MOVE-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Remaining: " & CStr(nRemaining))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Completed: " & CStr(nCompleted))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Failed: " & CStr(nFailed))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Warning: " & CStr(nWarning))

End Sub


NetReceiveCStoreResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCStoreResponse (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-STORE-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszClass)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))
End Sub


NetReceiveData Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveData(ByVal hNet As Long, ByVal nID As Integer, ByVal hDicomCS As Long, ByVal hDicomDS As Long)
'data was received
List2.AddItem "Data was received - " & " ID: " & CStr(nID)

If (hDicomDS = 0) Then
List2.AddItem "Data is a command set only!"
Else
'save the data set to disk
List2.AddItem "Data includes a data set - saved to disk!"
LEADDICOM1.SaveExtDS hDicomDS, "c:\temp\test.dic", 0
End If
End Sub


NetReceiveNActionRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNActionRequest (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nAction As Integer, ByVal hDS As Long)
Dim nRet As Integer
Dim NewNode As Node
Dim szReply As String
Dim lParent As Long
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-ACTION-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Requested SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Requested SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Requested SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Action: " & CStr(nAction))

'this function should perform the action command
nRet = PerformACTIONCommand(pszClass, pszInstance, hDS)

If (nRet <> DICOM_SUCCESS) Then nRet = COMMAND_STATUS_PROCESSING_FAILURE

'send a response
LEADDICOMNet1.SendNActionResponse hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, nAction, hDS

End Sub


NetReceiveNActionResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNActionResponse(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long, ByVal nAction As Integer, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-ACTION-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Action: " & CStr(nAction))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))
End Sub


NetReceiveNCreateResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNCreateResponse (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-CREATE-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))

End Sub


NetReceiveNDeleteResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNDeleteResponse (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-DELETE-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))

End Sub


NetReceiveNGetRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNGetRequest(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String)
Dim nRet As Integer
Dim NewNode As Node
Dim szReply As String
Dim lParent As Long
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-GET-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)

'this function will fill the values the data set elements in LEADDICOM2.hDicomDS
nRet = PerformNGETCommand(pszClass, pszInstance)

If (nRet <> DICOM_SUCCESS) Then nRet = COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE

'send a response
LEADDICOMNet1.SendNGetResponse hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, LEADDICOM2.hDicomDS
End Sub

Private Function PerformNGETCommand(pszClass As String, pszInstance As String)
Dim nRet As Integer
Dim nTag As Long
Dim x As Long
Dim nVR As Integer

'this sample simply loads a fixed data set
'here, a server should check the class and instance against
'all SOP classes it manages, and then fill out hDS from the
'correctly matching instance, if one is found

nRet = LEADDICOM1.LoadDS ("e:\images\dicom16.dic", 0)
LEADDICOM2.InitDS DICOM_CLASS_UNKNOWN, 0
LEADDICOM2.ResetDS

If (nRet = 0) Then
LEADDICOM1.MoveFirstElement False
Else
PerformNGETCommand = nRet
Exit Function
End If

For x = 0 To LEADDICOMNet1.RequestAttributeCount - 1
'get each element
nTag = LEADDICOMNet1.RequestAttributes(x)
LEADDICOM1.FindTag nTag
nVR = LEADDICOM1.CurrentTag.VR
nRet = LEADDICOM1.FindFirstElement (nTag, False)
'in this sample, if we don't find the requested tag, we
'do not return an empty element!
If (nRet = 0) Then
'copy the element value
LEADDICOM1.GetConvertValue
LEADDICOM2.InsertElement False, nTag, nVR, False, 0
LEADDICOM2.StringValueCount = 1
LEADDICOM2.StringValues (0) = LEADDICOM1.StringValues (0)
LEADDICOM2.SetConvertValue
End If
Next
PerformNGETCommand = DICOM_SUCCESS

End Function


NetReceiveNGetResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNGetResponseNetReceiveNGetResponseEvent(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer, ByVal hDS As Long)
Private Sub LEADDICOMNet1_NetReceiveNGetResponse(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-GET-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))

If (hDS <> 0) Then
nRet = LEADDICOM1.SaveExtDS(hDS, gszGetFile, 0)
Set NewNode = TreeView1.Nodes.Add(, , , "Data Set - " & gszGetFile)
NewNode.EnsureVisible
End If
End Sub


NetReceiveNReportRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNReportRequest(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nEvent As Integer, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-REPORT-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Event: " & CStr(nEvent))

'send response
LEADDICOMNet1.SendNReportResponse hNet, nPresentationID, nMessageID, pszClass, pszInstance, COMMAND_STATUS_SUCCESS, nEvent, 0

End Sub


NetReceiveNReportResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNReportResponse (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long, ByVal nEvent As Integer, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-REPORT-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Client: " & LEADDICOMNet1.GetPeerAddress (hNet))

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Event: " & CStr(nEvent))

End Sub


NetReceiveNSetRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNSetRequest (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal hDS As Long)
Dim nRet As Integer
Dim NewNode As Node
Dim szReply As String
Dim lParent As Long
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-SET-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)

'this function will change the values of the requested SOP Instance
'to the values specefied in the data set elements in hDS
'this function should search all the managed SOP Instances for a
'match, and then change the requested elements.
'This is a function you must write
'nRet = PerformNSETCommand(pszClass, pszInstance, hDS)

If (nRet <> DICOM_SUCCESS) Then nRet = COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE

'send a response
LEADDICOMNet1.SendNSetResponse hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, 0

End Sub


NetReceiveNSetResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNSetResponse(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-SET-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))

End Sub


NetReceiveReleaseRequest Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveReleaseRequest (ByVal hNet As Long)
Dim out$
'Release Request was received
out$ = "Release Request was received"
List2.AddItem out$
LEADDICOMNet1.SendReleaseResponse hNet
End Sub


NetReceiveReleaseResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveReleaseResponse(ByVal hNet As Long)
Dim out$
'Release Response was received
out$ = "Release Response was received"
List2.AddItem out$
End Sub


NetReceiveUnknown Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveUnknown (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal hCS As Long, ByVal hDS As Long)
Dim out$

out$ = "Unknown Command Set/Data Set was received, and ignored"
out$ = out$ & Chr(13)
out$ = out$ & "Presentation ID: " & CStr(nPresentationID)
MsgBox out$

End Sub


NetSecureLinkReady Example for Visual Basic

Private Sub LEADDICOMNet1_NetSecureLinkReady (ByVal hNet As Long, ByVal nError As Long)
Dim lTest As Long
If nError <> DICOM_SUCCESS Then
MsgBox "Error Code is " & LEADDICOMNet1.GetErrorSecure(hNet)
Exit Sub
End If
lTest = LEADDICOMNet1.GetCiphersuiteTLS (LEADDICOMNet1.hNet)
If lTest = DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA Then _
MsgBox "Ciphersuite is DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA"
End Sub


NetSend Example for Visual Basic

Private Sub LEADDICOMNet1_NetSend (ByVal hNet As Long, ByVal nStatus As Integer, ByVal nType As Integer, ByVal lBytes As Long)
'Some data was sent
MsgBox "Data Sent to: " & LEADDICOMNet1.GetPeerAddress (hNet) & " Status = " & CStr(nStatus)
End Sub


Preamble Example for Visual Basic

Private Sub Preamble_Click()
LEADDICOM1.GetDSPreamble
MsgBox LEADDICOM1.Preamble
End Sub

Private Sub Preamble2_Click()
LEADDICOM1.Preamble = Text1.Text
LEADDICOM1.SetDSPreamble
End Sub


ProgressStatus Example for Visual Basic

Private Sub LEADDICOM1_ProgressStatus(ByVal nPercent As Integer)
Caption = "Loading..." & CStr(nPercent) & "%"
If (gbQuit = True) Then
LEADDICOM1.EnableProgressEvent = False 'stop the load
End If
DoEvents
End Sub


ResetDS Example for Visual Basic

'close the current Data Set
LEADDICOM1.ResetDS


ResetIOD Example for Visual Basic

'clear all IOD items
LEADDICOM1.ResetIOD


ResetTag Example for Visual Basic

'Clear all Tags
LEADDICOM1.ResetTag


ResetUID Example for Visual Basic

'Clear all UID Items
LEADDICOM1.ResetUID


ResetVR Example for Visual Basic

'Clear all items from the VR Table
LEADDICOM1.ResetVR


SaveDS Example for Visual Basic

Dim nRet As Integer

'save a Data Set
LEADDICOM1.EnableMethodErrors = False
MSCommDlg1.Filter = "DICOM Data Set|*.dic"
MSCommDlg1.ShowSave
If (MSCommDlg1.filename <> "") Then
nRet = LEADDICOM1.SaveDS(MSCommDlg1.filename, 0)
If (nRet <> DICOM_SUCCESS) Then
MsgBox "Error " & CStr(nRet) & " saving file!"
End If
End If

LEADDICOM1.EnableMethodErrors = True


Searching the Data Set for a Digital Signature Example for Visual Basic

Sub FindSignature(objDS As LEADDicomDS, sSignatureUID As String)
' Search the whole Data Set for the Digital Signature with the
' specified Digital Signature UID
If objDS.FindSignature (sSignatureUID) = False Then
MsgBox "The Digital Signature was not found.", , "Sample"
Exit Sub
End If

Dim sMsg As String
sMsg = "The Digital Signature was found." & vbNewLine & _
"Press Yes to examine it or No to delete it."

Select Case MsgBox(sMsg, vbYesNoCancel, "Sample")
Case vbYes
' Refer to Examining a Digital Signature Example for Visual Basic
' for the procedure ExamineSignature
ExamineSignature objDS, objDS.CurrentElement.hElement

Case vbNo
' Delete the Digital Signature
objDS.DeleteSignature
End Select
End Sub


SendAbort Example for Visual Basic

'send Abort message
LEADDICOMNet1.SendAbort LEADDICOMNet1.hNet, PDU_ABORT_SOURCE_USER, 0


SendAssociateRequest Example for Visual Basic

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True

'use default for association
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU

LEADDICOMNet1.SetCalling LEADDICOMNet1.hPDU, "MI_CLIENT"
LEADDICOMNet1.SetCalled LEADDICOMNet1.hPDU, "MI_SERVER"

'this shows a client sending to its server
LEADDICOMNet1.SendAssociateRequest LEADDICOMNet1.hNet

'now we can free the class
LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU


SendCCancelRequest Example for Visual Basic

'send a Cancel Request Command to the server
'gCancelPresentationID is a global variable that should be set before sending a command that could be canceled
'gCancelMessageID is a global variable that should be set before sending a command that could be canceled

LEADDICOMNet1.SendCCancelRequest LEADDICOMNet1.hNet, gCancelPresentationID, gCancelMessageID


SendCEchoRequest Example for Visual Basic

Dim szUID As String
Dim nID As Integer
Dim nRet As Integer
Dim hPDU As Long

'send an Echo Request Command to the server

szUID = UID_VERIFICATION_CLASS

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szUID & ", Not Supported by Association!"
End If
Exit Sub
End If

'now, use the high-level method to send the command set
LEADDICOMNet1.SendCEchoRequest LEADDICOMNet1.hNet, nID, 99, szUID


SendCEchoResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCEchoRequest (ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String)
Dim nRet As Integer
Dim NewNode As Node
Dim lParent As Long
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-ECHO-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If

'use high-level method to send a response
LEADDICOMNet1.SendCEchoResponse hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS

End Sub


SendCFindRequest Example for Visual Basic

Returns 20000 on the following line:

LEADDICOM2.InsertElement False, TAG_ADDITIONAL_PATIENT_HISTORY, nVR, False, 0

Dim hPDU As Long
Dim nID As Long
Dim b As Boolean
Dim nRet As Integer
Dim nVR As Integer
Dim szUID As String
Dim x As Long

'this example sends a command that will find all STUDIES on a called AE that
'supports the Study Root Query/Retrieve Information Model - FIND SOP Class

'send a Find request to the server
hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

szUID = UID_STUDY_ROOT_QUERY_FIND
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szUID & ", Not Supported by Association!"
End If
Exit Sub
End If

'create a find attribute data set
LEADDICOM2.InitDS DICOM_CLASS_UNKNOWN, 0
LEADDICOM2.ResetDS

'add the required fields for this seach
LEADDICOM2.FindTag TAG_QUERY_RETRIEVE_LEVEL
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0
LEADDICOM2.StringValueCount = 1
LEADDICOM2.StringValues (0) = "STUDY" 'we are searching at the study level
LEADDICOM2.SetStringValue 1

LEADDICOM2.FindTag TAG_STUDY_DATE
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_STUDY_DATE, nVR, False, 0

LEADDICOM2.FindTag TAG_STUDY_TIME
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_STUDY_TIME, nVR, False, 0

LEADDICOM2.FindTag TAG_ACCESSION_NUMBER
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_ACCESSION_NUMBER, nVR, False, 0

LEADDICOM2.FindTag TAG_PATIENT_NAME
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_PATIENT_NAME, nVR, False, 0

LEADDICOM2.FindTag TAG_PATIENT_ID
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_PATIENT_ID, nVR, False, 0

LEADDICOM2.FindTag TAG_STUDY_ID
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_STUDY_ID, nVR, False, 0

LEADDICOM2.FindTag TAG_STUDY_INSTANCE_UID
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_STUDY_INSTANCE_UID, nVR, False, 0

'optional tags
LEADDICOM2.FindTag TAG_STUDY_DESCRIPTION
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_STUDY_DESCRIPTION, nVR, False, 0

LEADDICOM2.FindTag TAG_PATIENT_BIRTH_DATE
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0

LEADDICOM2.FindTag TAG_PATIENT_SEX
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_PATIENT_SEX, nVR, False, 0

LEADDICOM2.FindTag TAG_OTHER_PATIENT_IDS
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_OTHER_PATIENT_IDS, nVR, False, 0

LEADDICOM2.FindTag TAG_PATIENT_BIRTH_DATE
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0

LEADDICOM2.FindTag TAG_ADDITIONAL_PATIENT_HISTORY
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_ADDITIONAL_PATIENT_HISTORY, nVR, False, 0

LEADDICOM2.FindTag TAG_NUMBER_OF_STUDY_RELATED_INSTANCES
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement False, TAG_NUMBER_OF_STUDY_RELATED_INSTANCES, nVR, False, 0

'now, send the command set and data set
LEADDICOMNet1.SendCFindRequest LEADDICOMNet1.hNet, nID, 1, szUID, COMMAND_PRIORITY_MEDIUM, LEADDICOM2.hDicomDS


SendCFindResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCFindRequest(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal nPriority As Integer, ByVal hDS As Long)
Dim x As Long
Dim hPDU As Long
Dim szAE As String
Dim lParent As Long
Dim NewNode As Node
Dim nRet As Integer
Dim szName As String
Dim szFile As String
Dim szReply As String

'this sample simple returns all the data sets that it is managing.
'in a real-life scenario, this should perform an actual query based
'on the attribute values supplied in hDS

hPDU = LEADDICOMNet1.GetAssociate (hNet)
szAE = LEADDICOMNet1.GetCalling (hPDU)

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-FIND-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Priority: " & CStr(nPriority))

If (File1.ListCount > 1) Then
For x = 0 To File1.ListCount - 1
'load each file and send it to the calling AE
szFile = File1.Path & "\" & File1.List(x)
nRet = LEADDICOM1.LoadDS (szFile, 0)
If (nRet = 0) Then
'now, send a Find Response - PENDING
LEADDICOMNet1.SendCFindResponse hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_PENDING, LEADDICOM1.hDicomDS
End If
Next
End If

'now, send a Find Response - SUCCESS
LEADDICOMNet1.SendCFindResponse hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS, 0

End Sub


SendCGetRequest Example for Visual Basic

Dim nRet As Integer
Dim szClassUID As String
Dim nVR As Integer
Dim hPDU As Long
Dim nID As Integer

'send a get request to the server

'gszGetFile will be used when this AE receives the NetReceiveCStoreRequest
'associated with this CGetRequest to save the data set
gszGetFile = InputBox("Select filename for retrieved data set", "Get Request", "d:\temp\get_request.dic")
If (Len(gszGetFile) < 1) Then Exit Sub

szClassUID = InputBox("What class do you wish to get?", "Get Request", UID_SC_IMAGE_STORAGE)
If (Len(szClassUID) < 1) Then Exit Sub

'create the data set that encodes the identifier to be matched
LEADDICOM1.InitDS DICOM_CLASS_UNKNOWN, 0
'add the required elements
LEADDICOM1.FindTag TAG_QUERY_RETRIEVE_LEVEL
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues (0) = "PATIENT"
LEADDICOM1.SetStringValue 1

LEADDICOM1.FindTag TAG_PATIENT_NAME
LEADDICOM1.InsertElement False, TAG_PATIENT_NAME, LEADDICOM1.CurrentTag.VR, False, 0
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues (0) = "*" 'get all patients
LEADDICOM1.SetStringValue 1

'add the optional fields that we want returned
LEADDICOM1.FindTag TAG_PATIENT_ID
LEADDICOM1.InsertElement False, TAG_PATIENT_ID, LEADDICOM1.CurrentTag.VR, False, 0

LEADDICOM1.FindTag TAG_PATIENT_BIRTH_DATE
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0

LEADDICOM1.FindTag TAG_PATIENT_SEX
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_PATIENT_SEX, nVR, False, 0

LEADDICOM1.FindTag TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES, nVR, False, 0

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Exit Sub
End If
LEADDICOMNet1.SendCGetRequest LEADDICOMNet1.hNet, nID, 999, szClassUID, COMMAND_PRIORITY_MEDIUM, LEADDICOM1.hDicomDS

'we now must wait for the response and for the C-STORE sub-operations


SendCGetResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCStoreResponse(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String
Dim szReply As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-STORE-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))

'use high-level method to send a response
LEADDICOMNet1.SendCGetResponse hNet, nPresentationID, nMessageID, pszClass, nRet, 0, 1, 0, 0, 0

End Sub


SendCMoveRequest Example for Visual Basic

Dim nRet As Integer
Dim szClassUID As String
Dim nVR As Integer
Dim hPDU As Long
Dim nID As Integer

'send a Move Request to the server

'gszGetFile is a global variable that will be used when we get
'the C-STORE-RQ event to store the file
gszGetFile = InputBox("Select filename for retrieved data set", "Move Request", "d:\temp\move_request.dic")
If (Len(gszGetFile) < 1) Then Exit Sub

szClassUID = InputBox("What class do you wish to move?", "Move Request", UID_NM_IMAGE_STORAGE)
If (Len(szClassUID) < 1) Then Exit Sub

'create the data set that encodes the identifier to be matched
LEADDICOM1.InitDS DICOM_CLASS_UNKNOWN, 0
'add the required elements
LEADDICOM1.FindTag TAG_QUERY_RETRIEVE_LEVEL
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues (0) = "PATIENT"
LEADDICOM1.SetStringValue 1

LEADDICOM1.FindTag TAG_PATIENT_NAME
LEADDICOM1.InsertElement False, TAG_PATIENT_NAME, LEADDICOM1.CurrentTag.VR, False, 0

'add the optional fields that we want returned
LEADDICOM1.FindTag TAG_PATIENT_ID
LEADDICOM1.InsertElement False, TAG_PATIENT_ID, LEADDICOM1.CurrentTag.VR, False, 0

LEADDICOM1.FindTag TAG_PATIENT_BIRTH_DATE
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0

LEADDICOM1.FindTag TAG_PATIENT_SEX
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_PATIENT_SEX, nVR, False, 0

LEADDICOM1.FindTag TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES, nVR, False, 0

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Exit Sub
End If

'we are asking the Called AE to move the SOP Instance to ourselves
LEADDICOMNet1.SendCMoveRequest LEADDICOMNet1.hNet, nID, 1, szClassUID, COMMAND_PRIORITY_MEDIUM, "MI_TEST", LEADDICOM1.hDicomDS

'we now must wait for the response and for the C-STORE sub-operations


SendCStoreRequest Example for Visual Basic

Dim nRet As Integer
Dim hPDU As Long
Dim nID As Long
Dim szClassUID As String
Dim szInstanceUID As String

'send a store request to the server

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

'pick the data set to send

nRet = LEADDICOM1.LoadDS ("e:\images\dicom16.dic", 0)
If (nRet <> 0) Then
MsgBox "Error Loading Data Set!", , "Error"
Screen.MousePointer = vbDefault
Exit Sub
End If
LEADDICOM1.FindFirstElement TAG_SOP_INSTANCE_UID, False
LEADDICOM1.GetStringValue 0, 1
szInstanceUID = LEADDICOM1.StringValues (0)

LEADDICOM1.MoveFirstElement False
LEADDICOM1.FindFirstElement TAG_SOP_CLASS_UID, False
LEADDICOM1.GetStringValue 0, 1
szClassUID = LEADDICOM1.StringValues (0)

'send the command set
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Screen.MousePointer = vbDefault
Exit Sub
End If

LEADDICOMNet1.SendCStoreRequest LEADDICOMNet1.hNet, nID, 999, szClassUID, szInstanceUID, COMMAND_PRIORITY_MEDIUM, "", 0, LEADDICOM1.hDicomDS

Screen.MousePointer = vbDefault


SendCStoreResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveCStoreRequest(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nPriority As Integer, ByVal pszMoveAE As String, ByVal nMoveMessageID As Integer, ByVal hDS As Long)
Dim nRet As Integer
Dim NewNode As Node
Dim szReply As String
Dim lParent As Long
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "C-STORE-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Priority: " & CStr(nPriority))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Move AE Title: " & pszMoveAE)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Move Message ID: " & CStr(nMoveMessageID))

'perform the store - this is a function that you have to write
nRet = PerformSTORECommand(hDS)

'send a response
szReply = "Store Response Command Set Sent - "
'use high-level method to send a response
LEADDICOMNet1.SendCStoreResponse hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet
MsgBox szReply & LEADDICOMNet1.GetPeerAddress (hNet)
End Sub


SendData Example for Visual Basic

'send a command set, then a data set
LEADDICOM2.InitCS COMMAND_C_STORE, True
LEADDICOM1.InitDS DICOM_CLASS_CR_IMAGE_STORAGE, 0
'client is sending data
LEADDICOMNet1.SendData LEADDICOMNet1.hNet, 1, LEADDICOM2.hDicomDS, LEADDICOM1.hDicomDS


SendNActionRequest Example for Visual Basic

'this sample shows how to send an N-ACTION-REQUEST
Dim nRet As Integer
Dim szClassUID As String
Dim szInstance As String
Dim nVR As Integer
Dim hPDU As Long
Dim nID As Integer
Dim nAction As Integer

'send an N-ACTION-REQUEST to the server

nAction = CInt(InputBox("What Action(1..10)?", "Action Request", 1))

szClassUID = InputBox("What class?", "Action Request", UID_BASIC_FILM_BOX_CLASS)
If (Len(szClassUID) < 1) Then Exit Sub

szInstance = InputBox("What instance?", "Action Request", "1.1.1.1")
If (Len(szInstance) < 1) Then Exit Sub

'here you would create a data set that encodes the Action Arguments
'for this example, we just load a dataset
'...
nRet = LEADDICOM1.LoadDS ("e:\images\dicom16.dic", 0)

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Exit Sub
End If

LEADDICOMNet1.SendNActionRequest LEADDICOMNet1.hNet, nID, 1, szClassUID, szInstance, nAction, LEADDICOM1.hDicomDS


SendNCreateRequest Example for Visual Basic

Dim szClassUID As String
Dim szInstanceUID As String
Dim nID As Integer
Dim hPDU As Long
Dim nRet As Integer

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

szClassUID = InputBox("Enter SOP Class to Create:", "Create", UID_SC_IMAGE_STORAGE)
szInstanceUID = InputBox("Enter SOP Instance to Create:", "Create", "1.2.840.113619.2.30.1.1762288927.1489.906240296.255")

'send a Create Request Command to the server
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Exit Sub
End If

'here, you should construct a Data Set that contains the attributes
'and values for the new SOP Instance.
'In this sample, we simply load a Data Set from a file on disk
'pick the data set to send
nRet = LEADDICOM1.LoadDS ("e:\images\dicom16.dic", 0)

'send a Delete Request message
LEADDICOMNet1.SendNCreateRequest LEADDICOMNet1.hNet, nID, 999, szClassUID, szInstanceUID, LEADDICOM1.hDicomDS


SendNCreateResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNCreateRequest(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal hDS As Long)
Dim nRet As Integer
Dim NewNode As Node
Dim szReply As String
Dim lParent As Long
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-CREATE-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)

'This is a function that would perform the actual creation of the SOP Instance
nRet = PerformCREATECommand(pszClass, pszInstance, hDS)

If (nRet <> DICOM_SUCCESS) Then nRet = COMMAND_STATUS_PROCESSING_FAILURE

'send a response
szReply = "Create Response Command Set Sent - "
'note, we simply send back the passed hDS in this sample
LEADDICOMNet1.SendNCreateResponse hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, hDS
End Sub


SendNDeleteRequest Example for Visual Basic

Dim szClassUID As String
Dim szInstanceUID As String
Dim nID As Integer
Dim hPDU As Long
Dim nRet As Integer

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

szClassUID = InputBox("Enter SOP Class to Delete:", "Delete", UID_SC_IMAGE_STORAGE)
szInstanceUID = InputBox("Enter SOP Instance to Delete:", "Delete", "1.2.840.113619.2.30.1.1762288927.1489.906240296.255")

'send a Delete Request Command to the server
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Exit Sub
End If
LEADDICOMNet1.SendNDeleteRequest LEADDICOMNet1.hNet, nID, 999, szClassUID, szInstanceUID


SendNDeleteResponse Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveNDeleteRequestNetReceiveNDeleteRequestEvent(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String)
Private Sub LEADDICOMNet1_NetReceiveNDeleteRequest(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String)
Dim nRet As Integer
Dim NewNode As Node
Dim szReply As String
Dim lParent As Long
Dim szName As String

Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-DELETE-REQUEST")
NewNode.EnsureVisible
lParent = NewNode.Index

Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)

'this is a function that you have to write
nRet = PerformDELETECommand(pszClass, pszInstance)

If (nRet <> DICOM_SUCCESS) Then nRet = COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE

'send a response
szReply = "Delete Response Command Set Sent - "
LEADDICOMNet1.SendNDeleteResponse hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet
MsgBox szReply & LEADDICOMNet1.GetPeerAddress (hNet)
End Sub


SendNGetRequest Example for Visual Basic

Dim nRet As Integer
Dim szClassUID As String
Dim szInstance As String
Dim nVR As Integer
Dim hPDU As Long
Dim nID As Integer

'send an N-GET-REQUEST to the server

'gszGetFile is a global variable used in the NetReceiveNGetResponse event
gszGetFile = InputBox("Select filename for retrieved data set", "Get Request", "d:\temp\N_GET_REQ.dic")
If (Len(gszGetFile) < 1) Then Exit Sub

szClassUID = InputBox("What class do you wish to get?", "Get Request", UID_SC_IMAGE_STORAGE)
If (Len(szClassUID) < 1) Then Exit Sub

szInstance = InputBox("What instance do you wish to get?", "Get Request", "1.1.1.1")
If (Len(szInstance) < 1) Then Exit Sub

'here, you must create a list of the identifiers
'that you wish to get from the server
LEADDICOMNet1.RequestAttributeCount = 4
LEADDICOMNet1.RequestAttributes(0) = TAG_PATIENT_NAME
LEADDICOMNet1.RequestAttributes(1) = TAG_PATIENT_ID
LEADDICOMNet1.RequestAttributes(2) = TAG_PATIENT_SEX
LEADDICOMNet1.RequestAttributes(3) = TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Exit Sub
End If

LEADDICOMNet1.SendNGetRequest LEADDICOMNet1.hNet, nID, 1, szClassUID, szInstance


SendNonSecureISCL Example for Visual Basic

' number of bytes is 10 becuase the string has a terminating null character
LEADDICOMNet1.SendNonSecureISCL LEADDICOMNet1.hNet, "Test ISCL", 10


SendNReportRequest Example for Visual Basic

Dim x As Long
Dim hClient As Long
Dim nVR As Integer
Dim szClass As String
Dim szInstance As String
Dim hPDU As Long
Dim nID As Integer
Dim nRet As Integer

'send an event report message to all clients
'let them know a new patient was created

'this sample just uses a made up instance
szClass = UID_US_IMAGE_STORAGE
szInstance = "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1"

'create the data set
LEADDICOM1.InitDS DICOM_CLASS_UNKNOWN, 0
LEADDICOM1.ResetDS

'add the required elements
LEADDICOM1.FindTag TAG_SPECIFIC_CHARACTER_SET
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_SPECIFIC_CHARACTER_SET, nVR, False, 0

LEADDICOM1.FindTag TAG_INSTANCE_CREATION_DATE
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_INSTANCE_CREATION_DATE, nVR, False, 0
LEADDICOM1.DateValueCount = 1
LEADDICOM1.DateValues (0).Day = 31
LEADDICOM1.DateValues (0).Month = 12
LEADDICOM1.DateValues (0).Year = 1999
LEADDICOM1.SetDateValue (1)

LEADDICOM1.FindTag TAG_INSTANCE_CREATION_TIME
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_INSTANCE_CREATION_TIME, nVR, False, 0
LEADDICOM1.TimeValueCount = 1
LEADDICOM1.TimeValues(0).Hours = 12
LEADDICOM1.TimeValues(0).Minutes = 30
LEADDICOM1.SetTimeValue (1)

LEADDICOM1.FindTag TAG_INSTANCE_CREATOR_UID
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_INSTANCE_CREATOR_UID, nVR, False, 0
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues (0) = "9.9.9999.9" 'some unique value
LEADDICOM1.SetStringValue (1)

LEADDICOM1.FindTag TAG_PATIENT_NAME
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_PATIENT_NAME, nVR, False, 0
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues (0) = "dummy_patient_name"
LEADDICOM1.SetStringValue (1)

'add the optional fields that we want returned
LEADDICOM1.FindTag TAG_PATIENT_ID
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_PATIENT_ID, nVR, False, 0
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues (0) = "dummy_patient_id"
LEADDICOM1.SetStringValue (1)

LEADDICOM1.FindTag TAG_PATIENT_BIRTH_DATE
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0
LEADDICOM1.DateValueCount = 1
LEADDICOM1.DateValues (0).Day = 31
LEADDICOM1.DateValues (0).Month = 12
LEADDICOM1.DateValues (0).Year = 1999
LEADDICOM1.SetDateValue (1)

LEADDICOM1.FindTag TAG_PATIENT_SEX
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement False, TAG_PATIENT_SEX, nVR, False, 0
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues (0) = "M"
LEADDICOM1.SetConvertValue

For x = 0 To LEADDICOMNet1.GetClientCount (LEADDICOMNet1.hNet) - 1
hClient = LEADDICOMNet1.GetClient (LEADDICOMNet1.hNet, x)
hPDU = LEADDICOMNet1.GetAssociate (hClient)
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClass)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClass)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClass & ", Not Supported by Association!"
End If
Screen.MousePointer = vbDefault
End If

'now, send the message
LEADDICOMNet1.SendNReportRequest hClient, nID, 1, szClass, szInstance, 1, LEADDICOM1.hDicomDS
Next

End Sub


SendNSetRequest Example for Visual Basic

Dim nRet As Integer
Dim szClassUID As String
Dim szInstance As String
Dim hPDU As Long
Dim nID As Integer
Dim szNewID As String

'this sample allows you to change the patient id of an SOP Instance

'send an N-GET-REQUEST to the server

szClassUID = InputBox("What class do you wish to set?", "Set Request", UID_SC_IMAGE_STORAGE)
If (Len(szClassUID) < 1) Then Exit Sub

szInstance = InputBox("What instance do you wish to set?", "Set Request", "1.1.1.1")
If (Len(szInstance) < 1) Then Exit Sub

szNewID = InputBox("Enter New Patient ID?", "Set Request", "123-45-6789")
If (Len(szNewID) < 1) Then Exit Sub

'create the data set that encodes the changed element(s)
LEADDICOM1.InitDS DICOM_CLASS_UNKNOWN, 0
LEADDICOM1.ResetDS

LEADDICOM1.FindTag TAG_PATIENT_ID
LEADDICOM1.InsertElement False, TAG_PATIENT_ID, LEADDICOM1.CurrentTag.VR, False, 0
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues (0) = szNewID
LEADDICOM1.SetStringValue 1

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Exit Sub
End If

LEADDICOMNet1.SendNSetRequest LEADDICOMNet1.hNet, nID, 1, szClassUID, szInstance, LEADDICOM1.hDicomDS


SendReleaseRequest Example for Visual Basic

'set called application title
LEADDICOMNet1.SetCalled LEADDICOMNet1.hPDU, "Called Program"
'set calling application title
LEADDICOMNet1.SetCalling LEADDICOMNet1.hPDU, "Calling Program"
'display the current values
MsgBox LEADDICOMNet1.GetCalled (LEADDICOMNet1.hPDU)
MsgBox LEADDICOMNet1.GetCalling (LEADDICOMNet1.hPDU)


SetAuthDataISCL Example for Visual Basic

'Example 1
LEADDICOMNet1.SetAuthDataISCL LEADDICOMNet1.hNethNetproperty, "Server LEAD ISCL", 16
'Example 2: Binary Data
Dim DataArray(0 To 4) As Byte
DataArray(0) = &H21
DataArray(1) = &H14
DataArray(2) = &H0
DataArray(3) = &H45
DataArray(4) = &HF4
LEADDICOMNet1.SetAuthDataISCL LEADDICOMNet1.hNethNetproperty, DataArray, 5


SetBitmapListValue example for Visual Basic

Private Sub TestProcList()
Dim lCount As Long
Dim nRet As Integer
Dim IO As New LEADRasterIO
Dim Process As New LEADRasterProcess

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the BitmapList Value
nRet = LEADDICOM1.FindFirstElement (TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0)

'load an image
IO.Load LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1
MsgBox "Image loaded from File - Wait"

'create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem 0, LEADRasterView1.Raster.Bitmap
Process.Flip LEADRasterView1.Raster
LEADRasterView2.Raster.InsertBitmapListItem 1, LEADRasterView1.Raster.Bitmap
Process.Reverse LEADRasterView1.Raster
LEADRasterView2.Raster.InsertBitmapListItem 2, LEADRasterView1.Raster.Bitmap

'insert the image list into the element
LEADDICOM1.BitmapList = LEADRasterView2.Raster.BitmapList

'set the bitmap list
nRet = LEADDICOM1.SetBitmapListValue(DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
MsgBox "Image set to Data Set - Wait"

LEADDICOM1.BitmapList = 0 'free the value
MsgBox "ImageList cleared from memory - Wait"

lCount = LEADDICOM1.GetBitmapCount

'get the bitmap list back
If (nRet = 0) Then
gbQuit = False
LEADDICOM1.GetBitmapListValue 0, lCount, 0, ORDER_RGB, 0
LEADRasterView1.Raster.BitmapList = LEADDICOM1.BitmapList
LEADRasterView1.ForceRepaint
End If
LEADDICOM1.EnableMethodErrors = True
MsgBox "ImageList loaded from Data Set - Wait"
End Sub


SetBitmapValue example for Visual Basic

Private Sub TestProcBitmap()
Dim lCount As Long
Dim nRet As Integer
Dim IO As New LEADRasterIO

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement False
LEADDICOM1.MoveRootElement

'insert a new element for the Bitmap Value
nRet = LEADDICOM1.FindFirstElement (TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0)

'load an image
IO.Load LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1
MsgBox "Image loaded from File - Wait"

'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap
'set the bitmap
nRet = LEADDICOM1.SetBitmapValue (DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)

If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
MsgBox "Image set to Data Set - Wait"

LEADDICOM1.Bitmap = 0 'free the value
MsgBox "Image cleared from memory - Wait"

'get the bitmap back
If (nRet = 0) Then
gbQuit = False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADRasterView1.ForceRepaint
End If
LEADDICOM1.EnableMethodErrors = True
MsgBox "Image loaded from Data Set - Wait"
End Sub


SetCalled Example for Visual Basic

'set called application title
LEADDICOMNet1.SetCalled LEADDICOMNet1.hPDU, "Called Program"
'set calling application title
LEADDICOMNet1.SetCalling LEADDICOMNet1.hPDU, "Calling Program"
'display the current values
MsgBox LEADDICOMNet1.GetCalled (LEADDICOMNet1.hPDU)
MsgBox LEADDICOMNet1.GetCalling (LEADDICOMNet1.hPDU)


SetCipherToIndexTLS Example for Visual Basic

LEADDICOMNet1.SetCipherToIndexTLS LEADDICOMNet1.hNet, 0, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Dim lTest As Long
lTest = LEADDICOMNet1.GetCipherFromIndexTLS (LEADDICOMNet1.hNet, 0)
If lTest = DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA Then
MsgBox "Cipher DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA"
End If


SetClientCertificateTLS Example for Visual Basic

If LEADDICOMNet1.SetClientCertificateTLS (LEADDICOMNet1.hNethNetproperty, "c:\cert\client.pem", L_TLS_FILETYPE_PEM, "") = DICOM_SUCCESS Then
MsgBox "Loading client certificate succeeded"
Else
MsgBox "Loading client certificate failed"
End If


SetCommandSet (DICOM Control) Example for Visual Basic

Private Sub LEADDICOMNet1_NetReceiveData(ByVal hNet As Long, ByVal nID As Integer, ByVal hDicomCS As Long, ByVal hDicomDS As Long)
Dim nRet As Integer

'we have received a data message
'copy the Command Set so we can examine its elements
LEADDICOM1.SetCommandSet hDicomCS
nRet = LEADDICOM1.FindFirstElement (TAG_COMMAND_FIELD, False)
nRet = LEADDICOM1.GetShortValue (0, 1)
MsgBox "Command Field = 0x" & Hex$(LEADDICOM1.ShortValues(0))
End Sub


SetCurrentElement example for Visual Basic

Private Sub DSDeleteModule_Click()
Dim lCount As Long

LEADDICOM1.EnableMethodErrors = False
'get total number of images in this Data Set
LEADDICOM1.SetCurrentElement 0
lCount = LEADDICOM1.GetBitmapCount
MsgBox "Total: " & CStr(lCount)
'move to last image tag in the Data Set
LEADDICOM1.FindLastElement TAG_PIXEL_DATA, False
'get total number of images in this tag
lCount = LEADDICOM1.GetBitmapCount
MsgBox "This tag: " & CStr(lCount)
End Sub


SetDefaultEncryptionISCL Example for Visual Basic

LEADDICOMNet1.SetDefaultEncryptionISCL LEADDICOMNet1.hNet, DICOM_ISCL_ENCRYPT_DESCBC


SetDefaultSigningISCL Example for Visual Basic

LEADDICOMNet1.SetDefaultSigningISCL LEADDICOMNet1.hNet, DICOM_ISCL_MAC_NONE


SetEncryptKey Example for Visual Basic

SetEncryptKeyISCL Example for Visual Basic

Private Type KeyLoHi
LoValue As Long
HiValue As Long
End Type

Private Type Key64
Value As Currency
End Type

Private Sub SetEncryptKeyISCL_Click()
Dim key As Key64
Dim compKey As KeyLoHi
' use a 64 bit key value of 0123456789ABCDEF hex.
compKey.HiValue = &H1234567
compKey.LoValue = &H89ABCDEF
LSet key = compKey
LEADDICOMNet1.SetEncryptKeyISCL LEADDICOMNet1.hNet, 1, key.Value
LEADDICOMNet1.SetIndexForEncryptISCL LEADDICOMNet1.hNet, 1
MsgBox "Index value is: " & LEADDICOMNet1.GetIndexForEncryptISCL(LEADDICOMNet1.hNet)
End Sub


SetMaxCommBlockLengthISCL Example for Visual Basic

Dim nBlockLen As Long
LEADDICOMNet1.NetworkSecurityMode = DICOM_SECURE_ISCL
LEADDICOMNet1.StartUp
LEADDICOMNet1.SetMaxCommBlockLengthISCL LEADDICOMNet1.hNet, 8160
' size of the blocks sent to network layer will be 8192 bytes (a 32-byte header is added)
' other initializations...
LEADDICOMNet1.Connect "", 0, "127.0.0.1", 2761
'connect to a server running on local computer at port 2761

nBlockLen = LEADDICOMNet1.GetCommBlockLengthISCL(LEADDICOMNet1.hNet)
MsgBox "Negotiated communication block size is" & nBlockLen


SetMaxMessageLengthISCL Example for Visual Basic

LEADDICOMNet1.SetMaxMessageLengthISCL LEADDICOMNet1.hNet, 1048576
' size of the message accepted is at most 1 MB - or 1048576 bytes


SetMutualAuthAlgISCL Example for Visual Basic

LEADDICOMNet1.SetMutualAuthAlgISCL LEADDICOMNet1.hNet, DICOM_ISCL_MUTUAL_AUTH_3P4W


SetMutualAuthKeyISCL Example for Visual Basic

Private Type KeyLoHi
LoValue As Long
HiValue As Long
End Type

Private Type Key64
Value As Currency
End Type

Private Sub SetMutualAuthKeyISCL_Click()
Dim key As Key64
Dim compKey As KeyLoHi
' use a 64 bit key value of 0123456789ABCDEF hex.
compKey.HiValue = &H1234567
compKey.LoValue = &H89ABCDEF
LSet key = compKey
LEADDICOMNet1.SetMutualAuthKeyISCL LEADDICOMNet1.hNet, 1, key.Value
LEADDICOMNet1.SetIndexForMutualAuthISCL LEADDICOMNet1.hNet, 1
MsgBox "Index value is: " & LEADDICOMNet1.GetIndexForMutualAuthISCL (LEADDICOMNet1.hNet)

End Sub


SetRequest Example for Visual Basic

'set associate as Accept
If (LEADDICOMNet1.hPDU <> 0) Then
LEADDICOMNet1.SetRequest LEADDICOMNet1.hPDU, False
End If


SetServerCertificateTLS Example for Visual Basic

If LEADDICOMNet1.SetServerCertificateTLS (LEADDICOMNet1.hNet, "c:\cert\Server.pem", L_TLS_FILETYPE_PEM, "") = DICOM_SUCCESS Then
MsgBox "Loading Server certificate succeeded"
Else
MsgBox "Loading Server certificate failed"
End If


SetTagName example for Visual Basic

Private Sub Command10_Click()
LEADDICOM1.EnableMethodErrors = True
On Error GoTo SETTAGNAMEERROR
'move to the selected Tag
LEADDICOM1.FindIndexTag (13)
'change the name
LEADDICOM1.SetTagName ("New Tag Name")

Exit Sub
SETTAGNAMEERROR:
MsgBox "Error"
End Sub


Setting an overlay bitmap list Example for Visual Basic

LEADDICOM1.OverlayBitmapList = LEADRasterView1.Raster.BitmapList
LEADDICOM1.SetOverlayBitmapList 0, 0


Setting modality LUT data and attributes Example for Visual Basic

' This example will set Rescale Intercept (0028,1052)
' element to -128.0 and Rescale Slope (0028,1053)
' element to 1.0

' Object that will hold modality LUT attributes
Dim ModalityLUTAttributes As LModalityLUTAttributes
Dim iRet As Integer
Dim Data As Variant

Set ModalityLUTAttributes = LEADDICOM1.ModalityLUTAttributes
'No Modality LUT Sequence (0028,3000)
ModalityLUTAttributes.IsModalityLUTSequence = False
'Yes there is a rescale slope and intercept
ModalityLUTAttributes.IsRescaleSlopeIntercept = True
ModalityLUTAttributes.RescaleIntercept = -128
ModalityLUTAttributes.RescaleSlope = 1
ModalityLUTAttributes.RescaleType = "UNSPECIFIED"
' Delete the existing modality LUT,
' although we don't have to !
LEADDICOM1.DeleteModalityLUT (0)
'Set rescale slope and intercept
iRet = LEADDICOM1.SetModalityLUT (Data, 0)


Setting palette color LUT data and attributes Example for Visual Basic

'This example will set the attributes and the data for a
'Palette Color Lookup Table

Dim lLUTIndex As Long
Dim iRet As Integer
Dim RedLUTData() As Long
Dim GreenLUTData() As Long
Dim BlueLUTData() As Long
Dim PaletteColorLUTAttributes As LPaletteColorLUTAttributes

Set PaletteColorLUTAttributes = LEADDICOM1.PaletteColorLUTAttributes

' Initialize Red Palette Color Lookup Table Descriptor (0028,1101)
PaletteColorLUTAttributes.RedLUTDescriptorFirstMapped = 0
PaletteColorLUTAttributes.RedLUTDescriptorEntryBits = 16
PaletteColorLUTAttributes.RedLUTDescriptorNumberOfEntries = &H10000

' Initialize Green Palette Color Lookup Table Descriptor (0028,1102)
PaletteColorLUTAttributes.GreenLUTDescriptorFirstMapped= 0
PaletteColorLUTAttributes.GreenLUTDescriptorEntryBits= 16
PaletteColorLUTAttributes.GreenLUTDescriptorNumberOfEntries= &H10000

' Initialize Blue Palette Color Lookup Table Descriptor (0028,1103)
PaletteColorLUTAttributes.BlueLUTDescriptorFirstMapped= 0
PaletteColorLUTAttributes.BlueLUTDescriptorEntryBits= 16
PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries= &H10000

ReDim RedLUTData(PaletteColorLUTAttributes.RedLUTDescriptorNumberOfEntries)
ReDim GreenLUTData(PaletteColorLUTAttributes.GreenLUTDescriptorNumberOfEntries)
ReDim BlueLUTData(PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries)

For lLUTIndex = 0 To (PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries - 1)
RedLUTData(lLUTIndex) = lLUTIndex
GreenLUTData(lLUTIndex) = lLUTIndex / 2
BlueLUTData(lLUTIndex) = lLUTIndex / 4
Next
' Delete all the elements that describe the "Palette Color Lookup Table".
iRet = LEADDICOM1.DeletePaletteColorLUT(0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
' Set the new "Palette Color Lookup Table" attributes
iRet = LEADDICOM1.SetPaletteColorLUTAttributes (0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
' Set Red Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData (RedLUTData, DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
' Set Green Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData (GreenLUTData, DICOM_PALETTE_COLOR_LUT_TYPE_GREEN, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
' Set Blue Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData (BlueLUTData, DICOM_PALETTE_COLOR_LUT_TYPE_BLUE, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If


Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for Visual Basic

' This function will store the overlays associated
' with a bitmap handle inside the DICOM dataset
Dim OverlayAttributesDS As LEADOverlayAttributes
Dim OverlayAttributesRaster As LEADOverlayAttributes
Dim GroupNumber As Long
Dim IsOverlayInDataset As Boolean
Dim OverlayCount As Long
Dim OverlayIndex As Long
Dim iRet As Integer
Dim Process As New LEADRasterProcess

IsOverlayInDataset = False
GroupNumber = 0
OverlayIndex = 0

Process.EnableMethodErrors = False

' Do we have any overlays at all?
OverlayCount = Process.GetOverlayCount (LEADRasterView1.Raster, 0)
' If no overlays just exit sub
If (OverlayCount = 0) Then
MsgBox ("error")
Exit Sub
End If
' Blow away all the overlays in the file
For OverlayIndex = 0 To OverlayCount - 1
LEADDICOM1.DeleteOverlay OverlayIndex, 0
Next

Set OverlayAttributesDS = LEADDICOM1.OverlayAttributes
' Loop through the overlays and add them into the DICOM file
For OverlayIndex = 0 To OverlayCount - 1
' Get overlay attributes
iRet = Process.GetOverlayAttributes (LEADRasterView1.Raster, OverlayIndex, OVERLAYATTRIBUTES_ORIGIN Or OVERLAYATTRIBUTES_FLAGS Or OVERLAYATTRIBUTES_BITINDEX Or OVERLAYATTRIBUTES_DICOM)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
Set OverlayAttributesRaster = Process.OverlayAttributes
OverlayAttributesDS.OriginX = OverlayAttributesRaster.OriginX
OverlayAttributesDS.OriginY = OverlayAttributesRaster.OriginY
OverlayAttributesDS.Flags = OverlayAttributesRaster.Flags
OverlayAttributesDS.Color = OverlayAttributesRaster.Color
OverlayAttributesDS.BitPosition = OverlayAttributesRaster.BitPosition
OverlayAttributesDS.Rows = OverlayAttributesRaster.Rows
OverlayAttributesDS.Columns = OverlayAttributesRaster.Columns
OverlayAttributesDS.Type = OverlayAttributesRaster.Type
OverlayAttributesDS.BitsAllocated = OverlayAttributesRaster.BitsAllocated
OverlayAttributesDS.Subtype = OverlayAttributesRaster.Subtype
OverlayAttributesDS.Label = OverlayAttributesRaster.Label
OverlayAttributesDS.ROIArea = OverlayAttributesRaster.ROIArea
OverlayAttributesDS.ROIMean = OverlayAttributesRaster.ROIMean
OverlayAttributesDS.ROIStandardDeviation = OverlayAttributesRaster.ROIStandardDeviation
OverlayAttributesDS.NumberFramesInOverlay = OverlayAttributesRaster.NumberFramesInOverlay
OverlayAttributesDS.ImageFrameOrigin = OverlayAttributesRaster.ImageFrameOrigin
OverlayAttributesDS.ActivationLayer = OverlayAttributesRaster.ActivationLayer
OverlayAttributesDS.Description = OverlayAttributesRaster.Description

' Set overlay attributes inside DICOM
iRet = LEADDICOM1.SetOverlayAttributes (OverlayIndex, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
' burn overlays which need to be part of the image
If (OverlayAttributesRaster.Flags And OVERLAY_USEBITPLANE) Then
iRet = Process.UpdateOverlayBits(LEADRasterView1.Raster(), OverlayIndex, SETOVERLAYBITS_FROMOVERLAY)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
End If
' Get the overlay data (if it's not part of the image)
LEADRasterView2.Raster.Free
iRet = Process.GetOverlayBitmap (LEADRasterView1.Raster, OverlayIndex, LEADRasterView2.Raster, OVERLAY_COPY)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
' Set overlay data into DICOM
LEADDICOM1.OverlayBitmap = LEADRasterView2.Raster.Bitmap
iRet = LEADDICOM1.SetOverlayBitmap (OverlayIndex, 0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
Next


SetUIDName example for Visual Basic

Private Sub Command10_Click()
LEADDICOM1.EnableMethodErrors = True

On Error GoTo SETNAMEERROR
'move to the selected UID
LEADDICOM1.FindIndexUID (13)
'change the name
LEADDICOM1.SetUIDName ("New UID Name")

Exit Sub
SETNAMEERROR:
MsgBox "Error"
End Sub


SetVRName example for Visual Basic

Private Sub Command10_Click()
Dim lIndex As Long
lIndex = 13
LEADDICOM1.EnableMethodErrors = True

On Error GoTo SETVRNAMEERROR
'move to the selected VR
LEADDICOM1.FindIndexVR (lIndex)
'change the name
LEADDICOM1.SetVRName ("New VR Name")

MsgBox "New Name = " & LEADDICOM1.CurrentVR.Name
Exit Sub

SETVRNAMEERROR:
MsgBox "Error"
End Sub


SSLCreateFlags Example for Visual Basic

' This sample creates an ILEADDicomNet object with security
' The ILEADDicomNet object is configured so that if a client connects:
' 1. it requires and verifies the client certificate
' 2. it will support SSL version 3 or TLS Version 1 for the handshake
' 3. it uses trusted certificate authority CA_CERT_NAME to verify the client certificate
' 4. it verifies the client certificate chain to a maximum depth of 2
'
' The ILEADDicomNet object is assigned the certificate SERVER_CERT_NAME,
' which contains a password encrypted private key
' The DicomNet_SSLPrivateKeyPasswordEvent is used
' to supply the encryption password of the private key

Dim DicomKernel As New LEADDicomKernel
Public WithEvents LEADDICOMNET1 As LEADDicomNet

Const CA_CERT_NAME = "e:\certificates\ca.pem"
Const SERVER_CERT_NAME = "e:\certificates\server.pem"

Private Sub Command1_Click()
Dim szMsg As String
Dim nRet As Integer

LEADDICOMNET1.UseSSLOptions = True
LEADDICOMNET1.SSLCreateFlags= DICOM_SSL_CTX_CREATE_CAFILE Or DICOM_SSL_CTX_CREATE_METHOD_TYPE Or DICOM_SSL_CTX_CREATE_OPTIONS Or DICOM_SSL_CTX_CREATE_VERIFY_DEPTH Or DICOM_SSL_CTX_CREATE_VERIFY_MODE
LEADDICOMNET1.SSLCAFile = CA_CERT_NAME
LEADDICOMNET1.SSLVerifyMode = DICOM_SSL_VERIFY_PEER Or DICOM_SSL_VERIFY_FAIL_IF_NO_PEER_CERT
LEADDICOMNET1.SSLVerifyDepth = 2
LEADDICOMNET1.SSLOptions = DICOM_SSL_OP_NO_SSLv2 Or DICOM_SSL_OP_ALL

LEADDICOMNET1.NetworkSecurityMode = DICOM_SECURE_TLS

LEADDICOMNET1.StartUp

nRet = LEADDICOMNET1.SetServerCertificateTLS(LEADDICOMNET1.hNet, SERVER_CERT_NAME, L_TLS_FILETYPE_PEM, SERVER_CERT_NAME)
If nRet = DICOM_SUCCESS Then
szMsg = SERVER_CERT_NAME + " loaded successfully"
Else
szMsg = SERVER_CERT_NAME + " could not be loaded successfully -- error " + CStr(nRet)
End If

MsgBox szMsg

'
' Use the hNet
'

End Sub


StartUp Example for Visual Basic

Dim nRet As Integer

'start the network
'set the temporary file path
LEADDICOMNet1.NetworkTempPath = "d:\temp"
LEADDICOMNet1.NetworkSecurityMode = DICOM_SECURE_NONE
nRet = LEADDICOMNet1.StartUp
If (nRet <> 0) Then
MsgBox "Error"
End If
'do some network communication here
'...
'...

'shut down the network
LEADDICOMNet1.ShutDown


Version Example for Visual Basic

'check the Associate Class version
MsgBox "Version: " & CStr(LEADDICOMNet1.GetVersion (LEADDICOMNet1.hPDU))
'set the version
LEADDICOMNet1.SetVersion LEADDICOMNet1.hPDU, 99
MsgBox "Version: " & CStr(LEADDICOMNet1.GetVersion (LEADDICOMNet1.hPDU))


Examples for Visual C++ 6.0 Programmers

You can test any of the following examples by adding a command button and pasting the sample code in the Click procedure.

Adding a DICOM Data Set to a DICOM Directory Example for C++ 6.0 and later

CreateObject Example for C++ 6.0 and later

Creating a DICOM Directory Example for C++ 6.0 and later

Loading a DICOM Directory Example for C++ 6.0 and later

Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control Example for C++ 6.0 and later

Using the DicomFileInsert Event Example for C++ 6.0 and later

Performing Basic Print Management Example for C++ 6.0 and later

Performing Pull Stored Print Management Example for C++ 6.0 and later

Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport Example for C++ 6.0 and later

Getting Printer Information Example for C++ 6.0 and later

Getting Printer Configuration Information Example for C++ 6.0 and later

Getting Print Job Information Example for C++ 6.0 and later

Loading a Data Set

Miscellaneous Examples


Adding a DICOM Data Set to a DICOM Directory Example for C++ 6.0 and later

// Use #import to incorporate the type library information.
// For example:
// #import "C:\Windows\System32\LTDicKrn14n.dll" no_namespace
// #import "C:\Windows\System32\LTDicDir14n.dll" no_namespace

// The following code snippet demonstrates how to use the LEADTOOLS DICOM
// OCX control (m_LeadDicomCtrl) to load a Data Set and then add it to a
// DICOM Directory

ILEADDicomDirPtr spDicomDir(__uuidof(LEADDicomDir));

// Set the destination folder
spDicomDir->ResetDicomDir("C:\\Medical Images");

// Load a Data Set and add it to the Directory
if (m_LeadDicomCtrl.LoadDS("C:\\Medical Images\\Image", 0) == DICOM_SUCCESS)
{
spDicomDir->InsertDicomDS(m_LeadDicomCtrl.GetHDicomDS(),
"C:\\Medical Images\\Image");
// Save the DICOMDIR File
spDicomDir->SaveDicomDir();
}

spDicomDir = NULL;


CreateObject Example for C++ 6.0 and later

For MFC, the factory object is not needed. The system API CoCreateInstanceLic can be used instead.


Creating a DICOM Directory Example for C++ 6.0 and later

// Use #import to incorporate the type library information.
// For example:
// #import "C:\Windows\System32\LTDicKrn14n.dll" no_namespace
// #import "C:\Windows\System32\LTDicDir14n.dll" no_namespace
void CreateDicomDirectory()
{
// Assumes CoInitialize has been called

ILEADDicomFactoryPtr
spDicomFactory( __uuidof(LEADDicomFactory));

ILEADDicomKernelPtr spDicomKernel;

LPTSTR pszLic = "LEADTOOLS OCX Copyright (c) 1991-2004"
"LEAD Technologies, Inc.";

spDicomKernel = spDicomFactory->CreateObject
(
"LEADDicomKernel.LEADDicomKernel",
pszLic
);

spDicomKernel->UnlockSupport( L_SUPPORT_MEDICAL,
L_KEY_MEDICAL);
if (spDicomKernel->IsSupportLocked(L_SUPPORT_MEDICAL))
{
spDicomFactory = NULL;
spDicomKernel = NULL;
MessageBox(NULL, "Failed to unlock the Medical Support.",
"DICOM Directory Sample",
MB_OK | MB_ICONERROR);
return;
}

ILEADDicomDirPtr spDicomDir(__uuidof(LEADDicomDir));

// Set the destination folder
spDicomDir->ResetDicomDir("C:\\Medical Images\\Patient 1");

// If it is desired to change the Implementation Class UID and
// the Implementation Version Name...
spDicomDir->ImplementationClassUID = "1.2.840.114257.0.1";
spDicomDir->ImplementationVersionName = "LEADTOOLS 14";

// Set the File-set Identifier
spDicomDir->SetFileSetID("SOME ID");

// We need icon images to be added
spDicomDir->InsertIconImageSequence = VARIANT_TRUE;

// Don't allow invalid File IDs
spDicomDir->RejectInvalidFileID = VARIANT_TRUE;

// Set the File-set descriptor file
spDicomDir->SetDescriptorFile("C:\\Medical Images\\Patient 1\\ReadMe", "");

// Enable generating runtime exceptions
spDicomDir->EnableMethodErrors = VARIANT_TRUE;

// Add some DICOM files to the Directory
spDicomDir->InsertDicomFile("C:\\Medical Images\\Patient 1\\Image1");
spDicomDir->InsertDicomFile("C:\\Medical Images\\Patient 1\\Image2");
spDicomDir->InsertDicomFile("C:\\Medical Images\\Patient 1\\Image3");

// Disable generating runtime exceptions
spDicomDir->EnableMethodErrors = VARIANT_FALSE;

// Save the DICOMDIR File
spDicomDir->SaveDicomDir();

spDicomFactory = NULL;
spDicomKernel = NULL;
spDicomDir = NULL;

// remember to call CoUninitialize() when your
// app no longer needs COM Objects
}


Loading a DICOM Directory Example for C++ 6.0 and later

// Use #import to incorporate the type library information.
// For example:
// #import "C:\Windows\System32\LTDicKrn14n.dll" no_namespace
// #import "C:\Windows\System32\LTDicDir14n.dll" no_namespace
void TestLoadingDicomDir()
{
CoInitialize(NULL);

ILEADDicomDirPtr spDicomDir(__uuidof(LEADDicomDir));

// Load a DICOMDIR File. Note: It is necessary to specify
// DS_LOAD_CLOSE so that we can save the Directory later.
spDicomDir->LoadDicomDir("C:\\Medical Images\\DICOMDIR", DS_LOAD_CLOSE);

// Add some additional DICOM files to the loaded Directory
spDicomDir->InsertDicomFile("C:\\Medical Images\\Image");
spDicomDir->InsertDicomFile("C:\\Medical Images\\Patient 2\\Image1");

// Save the DICOMDIR File
spDicomDir->SaveDicomDir();

spDicomDir = NULL;

CoUninitialize();
}


Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control Example for C++ 6.0 and later

// Use #import to incorporate the type library information.
// For example:
// #import "C:\Windows\System32\LTDicKrn14n.dll" no_namespace
// #import "C:\Windows\System32\LTDicDir14n.dll" no_namespace

// The following code snippet demonstrates how to use the LEADTOOLS DICOM
// OCX control (m_LeadDicomCtrl) to get the Value of the Implementation Class
// UID element of a DICOM Directory

ILEADDicomDirPtr spDicomDir(__uuidof(LEADDicomDir));
short nRetValue;

// Load a DICOMDIR File
nRetValue = spDicomDir->LoadDicomDir("C:\\Medical Images\\DICOMDIR",
DS_LOAD_CLOSE);

if (nRetValue == DICOM_SUCCESS)
{
m_LeadDicomCtrl.SetHDicomDS(spDicomDir->hDicomDirDS);
nRetValue = m_LeadDicomCtrl.FindFirstElement(TAG_IMPLEMENTATION_CLASS_UID,
FALSE);
if (nRetValue == DICOM_SUCCESS)
{
m_LeadDicomCtrl.GetConvertValue();

// Display the value of the element
AfxMessageBox(m_LeadDicomCtrl.GetStringValues(0));

m_LeadDicomCtrl.SetStringValueCount(0);
}
}

spDicomDir = NULL;


Using the DicomFileInsert Event Example for C++ 6.0 and later

// Use #import to incorporate the type library information.
// For example:
// #import "C:\Windows\System32\LTDicKrn14n.dll" no_namespace
// #import "C:\Windows\System32\LTDicDir14n.dll" no_namespace

// We are going to make use of some ATL-specific code, so we
// need to include <atlbase.h> and <atlcom.h>. Furthermore, as
// <atlcom.h> is looking for an instance of CComModule named
// _Module, we need to create a dummy object.

#include <atlbase.h>
CComModule _Module;
#include <atlcom.h>

/* Creating the Sink Object */

// Type info for the DicomFileInsert event handler function
_ATL_FUNC_INFO OnDicomFileInsertInfo = {CC_STDCALL,
VT_EMPTY,
4,
{VT_BSTR,
VT_I4,
VT_I2,
VT_BYREF | VT_I2}};

// The class implementing the sink
class CFileInsertSink :
public IDispEventSimpleImpl<1, CFileInsertSink,
&DIID__ILEADDicomDirEvents>
{
private:
ILEADDicomDir* m_pDicomDir;

public:
CFileInsertSink(ILEADDicomDir* pDicomDir)
{
m_pDicomDir = pDicomDir;
m_pDicomDir->AddRef();

// Attach to the source
DispEventAdvise((IUnknown*) m_pDicomDir);
}

virtual ~CFileInsertSink()
{
m_pDicomDir->Release();

// Detach from the source
DispEventUnadvise((IUnknown*) m_pDicomDir);
}

// This function will be called when the DicomFileInsert event
// is fired
void __stdcall OnDicomFileInsert(BSTR bstrFileName, long hDicomDS,
short nStatus, short* pReturnVal)
{
_bstr_t FileName = bstrFileName;
char szBuffer[512];

if (nStatus == DICOMDIR_INSERTDICOMFILE_PREADD)
{
wsprintf(szBuffer, "About to add the file \"%s\".\n\nProceed?",
FileName.operator const char *());
switch (MessageBox(NULL, szBuffer, "DICOM Directory Sample",
MB_YESNOCANCEL))
{
case IDNO:
*pReturnVal = DICOM_ERROR_FORMAT; // Skip the file
return;

case IDCANCEL:
*pReturnVal = DICOM_ERROR_END; // Abort
return;
}
}
else if (nStatus == DICOM_SUCCESS)
{
wsprintf(szBuffer,
"The file \"%s\" has been added successfully." \
"\n\nContinue?", FileName.operator const char *());
if (MessageBox(NULL, szBuffer, "DICOM Directory Sample",
MB_YESNO) == IDNO)
{
*pReturnVal = DICOM_ERROR_END; // Abort
return;
}
}
}

// IDispEventSimpleImpl<> needs a sink map
// Note: The DISPID of the DicomFileInsert event is 1
BEGIN_SINK_MAP(CFileInsertSink)
SINK_ENTRY_INFO(1, DIID__ILEADDicomDirEvents, 1,
OnDicomFileInsert, &OnDicomFileInsertInfo)
END_SINK_MAP()
};

void CreateDicomDir()
{
// Assumes CoInitialize(NULL) has been called

ILEADDicomFactoryPtr
spDicomFactory( __uuidof(LEADDicomFactory));

ILEADDicomKernelPtr spDicomKernel;

LPTSTR pszLic = "LEADTOOLS OCX Copyright (c) 1991-2004"
"LEAD Technologies, Inc.";

spDicomKernel = spDicomFactory->CreateObject
(
"LEADDicomKernel.LEADDicomKernel",
pszLic
);

spDicomKernel->UnlockSupport( L_SUPPORT_MEDICAL,
L_KEY_MEDICAL);
if (spDicomKernel->IsSupportLocked(L_SUPPORT_MEDICAL))
{
spDicomFactory = NULL;
spDicomKernel = NULL;
MessageBox(NULL, "Failed to unlock the Medical Support.",
"DICOM Directory Sample",
MB_OK | MB_ICONERROR);
return;
}

ILEADDicomDirPtr spDicomDir(__uuidof(LEADDicomDir));

// Set the destination folder
spDicomDir->ResetDicomDir("C:\\Medical Images");

// Files in subfolders should also be included
spDicomDir->IncludeSubfolders = VARIANT_TRUE;

// Make the sink
CFileInsertSink* pSink = new CFileInsertSink(spDicomDir);

// Add all the DICOM files to the Directory
spDicomDir->InsertDicomFile("");

delete pSink;

// Save the DICOMDIR File
spDicomDir->SaveDicomDir();

spDicomFactory = NULL;
spDicomKernel = NULL;
spDicomDir = NULL;

// remember to call CoUninitialize() when your
// app no longer needs COM objects.
}


Performing Basic Print Management Example for C++ 6.0 and later

void PerformBasicPM()
{
ILEADDicomPrintSCUPtr spPrintSCU(__uuidof(LEADDicomPrintSCU));

// The sink
//CPrintSCUSink PrintSCUSink(spPrintSCU);

spPrintSCU->Timeout = 60; // seconds

char szMsg[32];

// Establish the Association
short nRet = spPrintSCU->Associate("10.0.2.20", 7104, "PrintSCP", "PrintSCU",
DicomClassEnum(
PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS +
PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS +
PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS +
PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS +
PRNSCU_PRESENTATION_LUT_SOP_CLASS +
PRNSCU_PRINT_JOB_SOP_CLASS +
PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS));
if (nRet == DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED)
{
wsprintf(szMsg, "Source = %hd, Reason = %hd",
spPrintSCU->AssociateRejectSource, spPrintSCU->AssociateRejectReason);
MessageBox(NULL, szMsg, "Association Request was Rejected", MB_OK);
return;
}
else if (nRet != DICOM_SUCCESS)
{
wsprintf(szMsg, "Error code: %hd", nRet);
MessageBox(NULL, szMsg, "Failed to Establish the Association", MB_OK);
return;
}

// Abort the Association if none of the Basic Print Management Meta SOP Classes
// is supported on the Association
if (!spPrintSCU->IsClassSupported (PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS) &&
!spPrintSCU->IsClassSupported(PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS))
{
spPrintSCU->AbortAssociation();
return;
}

// Display some printer info
//GetPrinterInfo(spPrintSCU->Printer);

// Display some printer configuration info
//GetPrinterConfigInfo(spPrintSCU->PrinterConfiguration);

ILFilmSessionPtr spFilmSession = spPrintSCU->FilmSession;
ILFilmBoxPtr spFilmBox = spPrintSCU->FilmBox;

// Create a Film Session
spFilmSession->IncludedParameters = FilmSessionParameterEnum(0);
spFilmSession->Create(VARIANT_FALSE);
MessageBox(NULL, spFilmSession->SOPInstanceUID, "Film Session SOP Instance UID", MB_OK);

// Update the Number of Copies and Print Priority of the Film Session
spFilmSession->IncludedParameters = FilmSessionParameterEnum(FS_NUMBER_OF_COPIES +
FS_PRINT_PRIORITY);
spFilmSession->NumberOfCopies = 1;
spFilmSession->PrintPriority = "MED";
spFilmSession->Update ();

spFilmBox->IncludedParameters = FilmBoxParameterEnum(0);

if (spPrintSCU->IsClassSupported(PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS))
{
spFilmBox->IncludedParameters = FilmBoxParameterEnum(spFilmBox->IncludedParameters +
FB_ANNOTATION_DISPLAY_FORMAT_ID);
spFilmBox->AnnotationDisplayFormatID = "SomeID";
}

// Create a Film Box
spFilmBox->Create("STANDARD\\1,1");
MessageBox(NULL, spFilmBox->SOPInstanceUID, "Film Box SOP Instance UID", MB_OK);

_bstr_t sPresLUTInstanceUID;

// Create a Presentation LUT
if (spPrintSCU->IsClassSupported (PRNSCU_PRESENTATION_LUT_SOP_CLASS))
{
if (spPrintSCU->PresentationLUT->Create("C:\\PresLUT.dic", "") == DICOM_SUCCESS)
{
sPresLUTInstanceUID = spPrintSCU->PresentationLUT->GetSOPInstanceUID();
MessageBox(NULL, sPresLUTInstanceUID, "Pres LUT SOP Instance UID", MB_OK);
}
}
if (sPresLUTInstanceUID.length())
{
// Update the Film Box to reference the Presentation LUT we just created
spFilmBox->IncludedParameters = FB_REF_PRES_LUT_INSTANCE_UID;
spFilmBox->RefPresLUTInstanceUID = sPresLUTInstanceUID;
spFilmBox->Update ();
}

_bstr_t sOverlayBoxInstanceUID;

// Create an Image Overlay Box
if (spPrintSCU->IsClassSupported(PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS))
{
spPrintSCU->ImageOverlayBox->OverlayOriginRow = 1;
spPrintSCU->ImageOverlayBox->OverlayOriginColumn = 1;

spPrintSCU->ImageOverlayBox->IncludedParameters = OverlayBoxParameterEnum(0);

if (spPrintSCU->ImageOverlayBox->Create ("C:\\Overlay.dic") == DICOM_SUCCESS)
{
sOverlayBoxInstanceUID = spPrintSCU->ImageOverlayBox->GetSOPInstanceUID ();
MessageBox(NULL, sOverlayBoxInstanceUID, "Image Overlay Box SOP Instance UID", MB_OK);
}
}

// Update the Image Box. Since the Image Display Format of the Film Box was
// set to "STANDARD\1,1", then we are supposed to have one Image Box created
// by the Print SCP.
if (spPrintSCU->ImageBoxes->Count > 0)
{
ILImageBoxPtr spImageBox = spPrintSCU->ImageBoxes->Item(0);

MessageBox(NULL, spImageBox->SOPInstanceUID, "Image Box SOP Instance UID", MB_OK);

spImageBox->IncludedParameters = ImageBoxParameterEnum(0);

if (sOverlayBoxInstanceUID.length())
{
spImageBox->IncludedParameters = ImageBoxParameterEnum(spImageBox->IncludedParameters +
IB_REF_IMAGE_OVERLAY_BOX_INSTANCE_UID);
spImageBox->RefImageOverlayBoxInstanceUID = sOverlayBoxInstanceUID;
}

spImageBox->Update("C:\\Image.dic");
}

// Update the Annotation Boxes (if there are any)
long lAnnBoxesCount = spPrintSCU->AnnotationBoxes->Count;
for (long i = 0; i < lAnnBoxesCount; i++)
{
spPrintSCU->AnnotationBoxes->Item(i)->TextString = "Some Text";
spPrintSCU->AnnotationBoxes->Item(i)->Update(VARIANT_TRUE);
}

// Change the Overlay Origin of the Image Overlay Box referenced by the
// Image Box
if (sOverlayBoxInstanceUID.length())
{
spPrintSCU->ImageOverlayBox->IncludedParameters = OB_OVERLAY_ORIGIN;
spPrintSCU->ImageOverlayBox->OverlayOriginRow = 10;
spPrintSCU->ImageOverlayBox->OverlayOriginColumn = 10;

spPrintSCU->ImageOverlayBox->Update(sOverlayBoxInstanceUID);
}

_bstr_t sPrintJobInstanceUID;

// Print the Film Session (or the Film Box; there is no difference since we
// have a single Film Box in the Film Session)
if (TRUE)
{
spFilmSession->PrintSession();
sPrintJobInstanceUID = spFilmSession->PrintJobSOPInstanceUID;
}
else
{
spFilmBox->PrintBox();
sPrintJobInstanceUID = spFilmBox->PrintJobSOPInstanceUID;
}

// Display some info about the Print Job
if (spPrintSCU->IsClassSupported(PRNSCU_PRINT_JOB_SOP_CLASS))
{
//GetPrintJobInfo(spPrintSCU->PrintJob, sPrintJobInstanceUID);
}

// Delete the Film Box (anyway, it would be deleted when the Film Session
// is deleted)
spFilmBox->Delete();

// Delete the Film Session
spFilmSession->Delete();

// Delete the Presentation LUT
if (sPresLUTInstanceUID.length())
{
spPrintSCU->PresentationLUT->Delete(sPresLUTInstanceUID);
}

// Delete the Image Overlay Box
if (sOverlayBoxInstanceUID.length())
{
spPrintSCU->ImageOverlayBox->Delete(sOverlayBoxInstanceUID);
}

// Release the Association and close the connection
spPrintSCU->ReleaseAssociation();
}


Performing Pull Stored Print Management Example for C++ 6.0 and later

void PerformPullStoredPM()
{
ILEADDicomPrintSCUPtr spPrintSCU(__uuidof(LEADDicomPrintSCU));

// The sink
//CPrintSCUSink PrintSCUSink(spPrintSCU);

char szMsg[32];

// Establish the Association
short nRet = spPrintSCU->Associate("10.0.2.20", 7104, "PrintSCP", "PrintSCU",
DicomClassEnum(
PRNSCU_PULL_STORED_PM_META_SOP_CLASS +
PRNSCU_PRINT_JOB_SOP_CLASS +
PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS));
if (nRet == DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED)
{
wsprintf(szMsg, "Source = %hd, Reason = %hd",
spPrintSCU->AssociateRejectSource, spPrintSCU->AssociateRejectReason);
MessageBox(NULL, szMsg, "Association Request was Rejected", MB_OK);
return;
}
else if (nRet != DICOM_SUCCESS)
{
wsprintf(szMsg, "Error code: %hd", nRet);
MessageBox(NULL, szMsg, "Failed to Establish the Association", MB_OK);
return;
}

// Display some printer info
//GetPrinterInfo(spPrintSCU->Printer);

// Display some printer configuration info
//GetPrinterConfigInfo(spPrintSCU->PrinterConfiguration);

ILPullPrintRequestPtr spPullPrintReq = spPrintSCU->PullPrintRequest;

// A referenced Stored Print Storage SOP Instance
spPullPrintReq->RemoveAllStoredPrintItems();
spPullPrintReq->AddStoredPrintItem("SomeAE",
"1.2.840.114257.254.7638.6787",
"1.2.840.114257.945.5676.5674",
"1.2.840.114257.23.2343.3489",
"SomeID");

// Ask the Print SCP to create a Pull Print Request SOP Instance
spPullPrintReq->IncludedParameters = PPR_NUMBER_OF_COPIES;
spPullPrintReq->NumberOfCopies = 1;
spPullPrintReq->Create();
MessageBox(NULL, spPullPrintReq->SOPInstanceUID, "Pull Print Request SOP Instance UID", MB_OK);

// Print the session
spPullPrintReq->PrintSession();

// Display some info about the Print Job
if (spPrintSCU->IsClassSupported(PRNSCU_PRINT_JOB_SOP_CLASS))
{
//GetPrintJobInfo(spPrintSCU->PrintJob, spPullPrintReq->PrintJobSOPInstanceUID);
}

// Ask the Print SCP to delete the Pull Print Request SOP Instance
spPullPrintReq->Delete();

// Release the Association and close the connection
spPrintSCU->ReleaseAssociation();
}


Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport Example for C++ 6.0 and later

// We are going to make use of some ATL-specific code, so we
// need to include <atlbase.h> and <atlcom.h>. Furthermore, as
// <atlcom.h> is looking for an instance of CComModule named
// _Module, we need to create a dummy object.
#include <atlbase.h>
CComModule _Module;
#include <atlcom.h>

/* Creating the Sink Object */

// Type info for the OnStatus event handler function
_ATL_FUNC_INFO OnStatusInfo = { CC_STDCALL,
VT_EMPTY,
2,
{ VT_I4, VT_I4 } };

// Type info for the OnPrinterReport event handler function
_ATL_FUNC_INFO OnPrinterReportInfo = { CC_STDCALL,
VT_EMPTY,
4,
{ VT_I2,
VT_BSTR,
VT_BSTR,
VT_BSTR } };

// Type info for the OnPrintJobReport event handler function
_ATL_FUNC_INFO OnPrintJobReportInfo = { CC_STDCALL,
VT_EMPTY,
6,
{ VT_BSTR,
VT_I2,
VT_BSTR,
VT_BSTR,
VT_BSTR,
VT_BSTR } };

// The class implementing the sink
class CPrintSCUSink :
public IDispEventSimpleImpl<1, CPrintSCUSink,
&DIID__ILEADDicomPrintSCUEvents>
{
private:
ILEADDicomPrintSCU* m_pPrintSCU;

public:
CPrintSCUSink(ILEADDicomPrintSCU* pPrintSCU)
{
m_pPrintSCU = pPrintSCU;
m_pPrintSCU->AddRef();

// Attach to the source
DispEventAdvise((IUnknown*) m_pPrintSCU);
}

virtual ~CPrintSCUSink()
{
m_pPrintSCU->Release();

// Detach from the source
DispEventUnadvise((IUnknown*) m_pPrintSCU);
}

// This function will be called when the OnStatus event is fired
void __stdcall OnStatus(PrintScuStatusEnum Status,
long lOperationStatus)
{
ILEADDicomPrintSCUPtr spPrintSCU = m_pPrintSCU;
char szMsg[32];
LPCSTR pszStatusCodeType;

switch (Status)
{
case PRNSCU_STATUS_RECEIVE_ABORT:
wsprintf(szMsg, "Source = %hd, Reason = %hd",
spPrintSCU->AbortSource, spPrintSCU->AbortReason);
MessageBox(NULL, szMsg, "Print SCP Aborted the Association", MB_OK);

break;

case PRNSCU_STATUS_RECEIVE_PRINT_FILM_SESSION_RSP:
if (lOperationStatus == COMMAND_STATUS_SUCCESS)
{
if (spPrintSCU->LastOperationStatus == COMMAND_STATUS_SUCCESS)
{
pszStatusCodeType = "Success";
}
else
{
pszStatusCodeType = "Warning";
}
}
else
{
pszStatusCodeType = "Failure";
}

wsprintf(szMsg, "Status: 0x%04X (%s)",
spPrintSCU->LastOperationStatus, pszStatusCodeType);
MessageBox(NULL, szMsg, "Received N-ACTION-RSP (Basic Film Session SOP Class)", MB_OK);

break;
}
}

// This function will be called when the OnPrinterReport event is fired
void __stdcall OnPrinterReport(short nEventTypeID,
BSTR bstrPrinterStatusInfo,
BSTR bstrFilmDestination,
BSTR bstrPrinterName)
{
LPCSTR pszEventTypeName = "Normal";
switch (nEventTypeID)
{
case 2:
pszEventTypeName = "Warning";
break;

case 3:
pszEventTypeName = "Failure";
break;
}

char szMsg[256];

wsprintf(szMsg, "Event Type Name: %s", pszEventTypeName);

if (nEventTypeID != 1)
{
wsprintf(szMsg,
"%s\n"
"Printer Status Info: %s\n"
"Film Destination: %s\n"
"Printer Name: %s",
szMsg,
LPCSTR(_bstr_t(bstrPrinterStatusInfo)),
LPCSTR(_bstr_t(bstrFilmDestination)),
LPCSTR(_bstr_t(bstrPrinterName)));
}

MessageBox(NULL, szMsg, "Printer Status Report", MB_OK);
}

// This function will be called when the OnPrintJobReport event is fired
void __stdcall OnPrintJobReport(BSTR bstrPrintJobSOPInstanceUID,
short nEventTypeID,
BSTR bstrExecutionStatusInfo,
BSTR bstrPrintJobID,
BSTR bstrFilmSessionLabel,
BSTR bstrPrinterName)
{
LPCSTR pszEventTypeName = "Pending";
switch (nEventTypeID)
{
case 2:
pszEventTypeName = "Printing";
break;

case 3:
pszEventTypeName = "Done";
break;

case 4:
pszEventTypeName = "Failure";
break;
}

char szMsg[512];

wsprintf(szMsg,
"Print Job SOP Instance UID: %s\n"
"Event Type Name: %s\n"
"Execution Status Info: %s\n"
"Film Session Label: %s\n"
"Printer Name: %s\n",
LPCSTR(_bstr_t(bstrPrintJobSOPInstanceUID)),
pszEventTypeName,
LPCSTR(_bstr_t(bstrExecutionStatusInfo)),
LPCSTR(_bstr_t(bstrFilmSessionLabel)),
LPCSTR(_bstr_t(bstrPrinterName)));

MessageBox(NULL, szMsg, "Print Job Status Report", MB_OK);
}

// IDispEventSimpleImpl<> needs a sink map
// Note: The DISPIDs of the events OnStatus, OnPrinterReport, and
// OnPrintJobReport are 1, 2, and 3, respectively
BEGIN_SINK_MAP(CPrintSCUSink)
SINK_ENTRY_INFO(1, DIID__ILEADDicomPrintSCUEvents,
1, OnStatus, &OnStatusInfo)
SINK_ENTRY_INFO(1, DIID__ILEADDicomPrintSCUEvents,
2, OnPrinterReport, &OnPrinterReportInfo)
SINK_ENTRY_INFO(1, DIID__ILEADDicomPrintSCUEvents,
3, OnPrintJobReport, &OnPrintJobReportInfo)
END_SINK_MAP()
};


Getting Print Job Information Example for C++ 6.0 and later

void GetPrintJobInfo(ILPrintJobPtr& spPrintJob, _bstr_t& sPrintJobInstanceUID)
{
// We need only the Execution Status and Execution Status Info
spPrintJob->RequiredInfo = PrintJobInfoAttribEnum(PJ_EXECUTION_STATUS +
PJ_EXECUTION_STATUS_INFO);

// Query the Print SCP for the Print Job information
if (spPrintJob->GetInfo(sPrintJobInstanceUID) == DICOM_SUCCESS)
{
// Display the retrieved information

char szPrintJobInfo[256];
wsprintf(szPrintJobInfo, "Execution Status: %s\nExecution Status Info: %s",
LPCSTR(spPrintJob->ExecutionStatus),
LPCSTR(spPrintJob->ExecutionStatusInfo));

MessageBox(NULL, szPrintJobInfo, "Print Job Info", MB_OK);
}
}


Getting Printer Configuration Information Example for C++ 6.0 and later

void GetPrinterConfigInfo(ILPrinterConfigurationPtr& spPrnConfig)
{
// Assume that the Association is already established

// Query the Print SCP for the printer configuration information
if (spPrnConfig->Get() == DICOM_SUCCESS)
{
// We will display only the Attributes of the first Printer Configuration Item

if (spPrnConfig->PrinterConfigItems->Count > 0)
{
ILAttributesPtr spAttributes;
spAttributes = spPrnConfig->PrinterConfigItems->Item(0)->Attributes;
char szPrnConfigInfo[1024] = "";

long lAttribsCount = spAttributes->Count;
for (long i = 0; i < lAttribsCount; i++)
{
wsprintf(szPrnConfigInfo, "%s%s: %s\n",
szPrnConfigInfo,
LPCSTR(spAttributes->Item(i)->Name),
LPCSTR(spAttributes->Item(i)->Value));
}

MessageBox(NULL, szPrnConfigInfo, "Printer Config Info", MB_OK);
}
}
}


Getting Printer Information Example for C++ 6.0 and later

void GetPrinterInfo(ILPrinterPtr& spPrinter)
{
// Assume that the Association is already established

// We need only the Printer Status and Printer Status Info
spPrinter->RequiredInfo = PrinterInfoAttribEnum(PRN_PRINTER_STATUS +
PRN_PRINTER_STATUS_INFO);

// Query the Print SCP for the information
if (spPrinter->GetInfo(VARIANT_TRUE, VARIANT_FALSE) == DICOM_SUCCESS)
{
// Display the retrieved information

char szPrinterInfo[256];
wsprintf(szPrinterInfo, "Printer Status: %s\nPrinter Status Info: %s",
LPCSTR(spPrinter->PrinterStatus),
LPCSTR(spPrinter->PrinterStatusInfo));

MessageBox(NULL, szPrinterInfo, "Printer Info", MB_OK);
}
}


Loading a Data Set (Visual C++ 6.0)

Loading a Data Set (C++ 6.0 and later)

Take the following steps to start a project and to add some code that loads a DICOM Data Set and prints information about the data set.

1. | Start a new project as follows:
 | For C++ 6.0, run Microsoft Visual C++ 6.0, select the File >New menu option, and do the following:
 | a. | Click the Projects tab.
 | b. | Select MFC AppWizard (exe) as the project type
 | c. | In the Project name text box, specify dicom.
 | d. | In the Location text box, specify the path of the project.
 | e. | Click the OK button.
2. | In the Step 1 dialog box, do the following:
 | a. | Select Dialog based.
 | b. | Click the Next button.
3. | In the Step 2 of 4 dialog box, do the following:
 | a. | Ensure that About Box is selected.
 | b. | Ensure that 3D Controls is selected.
 | c. | Select ActiveX Controls.
 | d. | Click the Next button.
4. | In the Step 3 of 4 dialog box, do the following:
 | a. | For comments, ensure that Yes, Please is selected.
 | b. | For how to use the MFC library, select As a shared DLL.
 | c. | Click the Next button.
5. | In the Step 4 of 4 dialog box, just click Finish.
6. | Read New Project Information, and click OK. (The AppWizard creates the project files and opens the project.)
7. | Import the DICOM COM Object type libraries into your projects as follows:
 | a. | Copy the \lead\include\l_com.h and ltkey.h files to your project directory.
 | b. | In the Project Workspace, click the FileView tab.
 | c. | Double-click the dicom files folder to open it.
 | d. | Double-click the the Header Files folder to open it.
 | e. | Double-click the StdAfx.h file to edit it.
 | f. | Add the following lines to the file, just before "AFX_INSERT_LOCATION":

#include "l_com.h"
#import <ltrvr14n.dll> no_namespace, named_guids, exclude("RasterSupportLockConstants")
#import <ltr14n.dll> no_namespace, named_guids, exclude("RasterSupportLockConstants")
#import <ltrvw14n.ocx> no_namespace, named_guids
#import <ltrpr14n.dll> no_namespace, named_guids
#import <ltrio14n.dll> no_namespace, named_guids, exclude("LoadResizeConstants"), exclude("J2KLimitConstants"), exclude("J2KProgressionFlags"), exclude("J2KRegionOfInterest")
#import <LTDicKrn14n.dll> no_namespace, named_guids, exclude("LoadDirectoryFlags")
#import <LTDicDS14n.dll> no_namespace, named_guids, exclude("DicomAnnSaveModifyConstants"), exclude("DicomCommandSetMessagePriorities")
#import <LTDicNet14n.dll> no_namespace, named_guids
#import <LTDPScu14n.dll> no_namespace, named_guids#ifndef MAKETAG
#define MAKETAG(nGroup,nElement) ((unsigned long)((((unsigned long)nGroup) << 16) | nElement))
#define GETGROUP(nTag) ((unsigned short)(nTag >> 16))
#define GETELEMENT(nTag) ((unsigned short)(nTag & 0xFFFF))
#endif

8. | Add a LEADDicomDS COM Object to the application as follows:
 | a. | In the Project Workspace, click the FileView tab.
 | b. | Double-click the dicom files folder to open it.
 | c. | Double-click the Header Files folder to open it.
 | d. | Double-click the dicomDlg.h file to edit it.
 | e. | Add the following lines to the file, just after the class constructor:

ILEADDicomDS *m_pLEADDicomDS;

9. | Go to the OnInitDialog() function as follows:
 | a. | In the Project Workspace, click the ClassView tab.
 | b. | Double-click the Dicom classes folder to open it.
 | c. | Expand the CDicomDlg class.
 | d. | Double-click the OnInitDialog() function to edit it.
10. | Edit the OnInitDialog() function to add the following code after the line that says //TODO: Add extra initialization here:

BSTR lpLic = SysAllocString(_szLicString);
ILEADDicomFactory *pFactory=NULL;
CoCreateInstance(CLSID_LEADDicomFactory, NULL, CLSCTX_ALL,
IID_ILEADDicomFactory, (void**)&pFactory);
#if _MSC_VER < 1200
m_pLEADDicomDS = (ILEADDicomDS*)pFactory->CreateObject ("LEADDicomDS.LEADDicomDS", lpLic);
#else
ILEADDicomDSPtr spLEADDicomDS=NULL;
spLEADDicomDS = pFactory->CreateObject ("LEADDicomDS.LEADDicomDS", lpLic);
m_pLEADDicomDS = spLEADDicomDS;
m_pLEADDicomDS->AddRef();//because when spLEADDicomDS goes out of scope, it will auto Release()!
#endif
m_pLEADDicomDS->EnableMethodErrors = FALSE;

// Unlock DICOM support.
ILEADDicomKernel *pLEADDicomKernel = NULL;
#if _MSC_VER < 1200
pLEADDicomKernel = (ILEADDicomKernel*)pFactory->CreateObject ("LEADDicomKernel.LEADDicomKernel", lpLic);
#else
ILEADDicomKernelPtr spLEADDicomKernel=NULL;
spLEADDicomKernel = pFactory->CreateObject ("LEADDicomKernel.LEADDicomKernel", lpLic);
pLEADDicomKernel = spLEADDicomKernel;
pLEADDicomKernel->AddRef();//because when spLEADDicomKernel goes out of scope, it will auto Release()!
#endif
UNLOCKSUPPORT(*pLEADDicomKernel);
pLEADDicomKernel->Release();

pFactory->Release();
SysFreeString(lpLic);

11.

Add the following lines to the top of the file, after all the #include statements:

const WCHAR BASED_CODE _szLicString[] =
L"LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc.";

12. | Add a command button to your form and name it as follows:
 | a. | In the Project Workspace, click the ResourceView tab.
 | b. | Double-click the Dicom resources folder to open it.
 | c. | Double-click the Dialog folder to open it.
 | d. | Double-click IDD_DICOM_DIALOG to design the dialog box.
 | e. | Select the TODO... text control; then press the Delete key to delete it.
 | f. | Add a command button to the dialog, and name it as follows:
 | ID | Caption
 | IDC_LOADDICOM | Load

13. | Press Ctrl-W to go to the MFC Class Wizard; then do the following:
 | a. | Click the Message Maps tab.
 | b. | In the Class Name combo box, select CDicomDlg.
 | c. | In the Object IDs list box, select IDC_LOADDICOM.
 | d. | In the Messages list box, select BN_CLICKED.
 | e. | Click the Add function button. Choose OK for the default function name (OnLoaddicom).
 | f. | Click the Edit Code button and enter the following code:

int Result;
short nRet;
long lCount;
CString cs;

IDicomDSModulePtr pCurrentModule=NULL;

IDicomDSElementPtr pCurrentElement=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
nRet = m_pLEADDicomDS->LoadDS("D:\\LTWIN13\\images\\test2.dic", 0);
if (nRet != DICOM_SUCCESS)
AfxMessageBox("Error loading file");
else
{
AfxMessageBox("File is loaded.");
lCount = m_pLEADDicomDS->GetModuleCount();

m_pLEADDicomDS->FindIndexModule(0);
pCurrentModule = m_pLEADDicomDS->GetCurrentModule();
pCurrentElement = pCurrentModule->GetElement(0);
Result = m_pLEADDicomDS->SetCurrentElement (pCurrentElement->GethElement());
if(Result)
{
cs.Format("There are %d modules in this data set\n"
"The first module has %d elements.\n"
"The first element has:\n"
"Tag number: %08X\n"
"VR: %08X\n", lCount,
pCurrentModule->GetElementCount(),
pCurrentElement->GetTag(),
pCurrentElement->GetVR());
AfxMessageBox(cs);
}
}
m_pLEADDicomDS->EnableMethodErrors = TRUE;

14. | On the main menu, select Build > Build dicom.exe to build the project.
15. | On the main menu, select Build > Execute dicom.exe to run the project.
16. | Press Ctrl-W to go to the MFC Class Wizard; then do the following:
 | a. | Click the Message Maps tab.
 | b. | In the Class Name combo box, select CDicomDlg.
 | c. | In the Object IDs list box, select CDicomDlg.
 | d. | In the Messages list box, select WM_CLOSED.
 | e. | Click the Add function button. Choose OK for the default function name (OnClose).
 | f. | Click the Edit Code button and enter the following code:

if(m_pLEADDicomDS)
m_pLEADDicomDS->Release();


Miscellaneous Examples (Visual C++ 6.0)

Miscellaneous Examples (C++ 6.0 and later)

You can test any of the following examples by adding a command button and pasting the sample code in the Click procedure.

Accept Example for C++ 6.0 and later

AnnCount Example for C++ 6.0 and later

ChangeTransferSyntax Example for C++ 6.0 and later

CloseForced Example for C++ 6.0 and later

ConformanceStatus example for C++ 6.0 and later

Connect Example for C++ 6.0 and later

Converting DICOM Annotation Objects to LEAD Annotation Objects Example for C++ 5.0 and later

Converting LEAD Annotation Objects to DICOM Annotation Objects Example for C++ 5.0 and later

CreateAssociate Example for C++ 6.0 and later

Creating a Digital Signature Example for C++ 6.0 and later

Creating DICOM Annotations Example for C++ 5.0 and later

DefaultIOD example for C++ 6.0 and later

DefaultTag example for C++ 6.0 and later

DefaultUID example for C++ 6.0 and later

DefaultVR example for C++ 6.0 and later

DeleteBitmapValue Example for C++ 6.0 and later

DeleteElement Example for C++ 6.0 and later

DeleteIOD Example for C++ 6.0 and later

DeleteModule Example for C++ 6.0 and later

DeleteTag Example for C++ 6.0 and later

DeleteUID Example for C++ 6.0 and later

DeleteVR Example for C++ 6.0 and later

DSTempPath Example for C++ 6.0 and later

EnableMethodErrors (Communication Control) Example for C++ 6.0 and later

Enumerating Context Groups Example for C++ 6.0 and later

Enumerating Digital Signatures Example for C++ 6.0 and later

Enumerating the Coded Concepts of a Context Group Example for C++ 6.0 and later

Examining a Digital Signature Example for C++ 6.0 and later

Examining Annotations (1) Example for C++ 5.0 and later

Examining Annotations (2) Example for C++ 5.0 and later

Extracting a Wave Stream From a Data Set Example for C++ 6.0 and later

FindFirstElement Example for C++ 6.0 and later

FindIndexModule Example for C++ 6.0 and later

FindLastElement Example for C++ 6.0 and later

FindModule Example for C++ 6.0 and later

FindModuleIOD Example for C++ 6.0 and later

FindPresentationAbstract Example for C++ 6.0 and later

GetAgeValue Example for C++ 6.0 and later

GetApplication Example for C++ 6.0 and later

GetAuthenticationAlgorithmTLS example for C++ 6.0 and later

GetBinaryValue Example for C++ 6.0 and later

GetBitmapCount Example for C++ 6.0 and later

GetCharValue Example for C++ 6.0 and later

GetConvertValue Example for C++ 6.0 and later

GetDateTimeValue Example for C++ 6.0 and later

GetDateValue Example for C++ 6.0 and later

GetDoubleValue Example for C++ 6.0 and later

GetElementLevel Example for C++ 6.0 and later

GetEncryptionAlgorithmTLS Example for C++ 6.0 and later

GetEncryptKeyLengthTLS Example for C++ 6.0 and later

GetExtendedData Example for C++ 6.0 or later

GetFloatValue Example for C++ 6.0 and later

GetImageInformation Example for C++ 6.0 and later

GetInfoDS Example for C++ 6.0 and later

GetIntegrityAlgorithmTLS Example for C++ 6.0 and later

GetKeyExchangeAlgorithmTLS Example for C++ 6.0 and later

GetLongValue Example for C++ 6.0 and later

GetModuleCount Example for C++ 6.0 and later

GetMutualAuthKeyLengthTLS Example for C++ 6.0 and later

GetPeerAuthDataISCL Example for C++ 6.0 and later

GetPeerEncryptionISCL Example for C++ 6.0 and later

GetPeerMACISCL Example for C++ 6.0 and later

GetPeerRequestedMessageLengthISCL Example for C++ 6.0 and later

GetPresentationAbstract Example for C++ 6.0 and later

GetPresentationCount Example for C++ 6.0 and later

GetPresentationResult Example for C++ 6.0 and later

GetSendQueueSize Example for C++ 6.0 and later

GetServer Example for C++ 6.0 and later

GetShortValue Example for C++ 6.0 and later

GetStatusISCL Example for C++ 6.0 and later

GetStringValue Example for C++ 6.0 and later

GetTagCount Example for C++ 6.0 and later

GetTimeValue Example for C++ 6.0 and later

Getting an overlay bitmap list Example for C++ 6.0 and later

Getting and setting a non-linear VOI LUT Example for C++ 6.0 and later

Getting and setting window center and width Example for C++ 6.0 and later

Getting modality LUT data and attributes Example for C++ 6.0 and later

Getting palette color LUT data and attributes Example for C++ 6.0 and later

Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for C++ 6.0 and later

GetTransferCount Example for C++ 6.0 and later

GetUIDCount Example for C++ 6.0 and later

GetUserInfoCount Example for C++ 6.0 and later

GetVRCount Example for C++ 6.0 and later

IncludeVolatile Example for C++ 6.0 and later

InitCS Example for C++ 6.0 and later

InitDS Example for C++ 6.0 and later

InsertBitmapListValue Example for C++ 6.0 and later

InsertBitmapValue Example for C++ 6.0 and later

InsertDS Example for C++ 6.0 or later

InsertElement Example for C++ 6.0 and later

Inserting a Context Group Example for C++ 6.0 and later

Inserting a Wave Stream Into a Data Set Example for C++ 6.0 and later

Inserting a Waveform Group Into a Data Set Example for C++ 6.0 and later

InsertIOD Example for C++ 6.0 and later

InsertKey Example for C++ 6.0 or later

InsertModule Example for C++ 6.0 and later

InsertTag Example for C++ 6.0 and later

InsertUID Example for C++ 6.0 and later

InsertVR Example for C++ 6.0 and later

IsActivated Example for C++ 6.0 and later

IsAsyncOperations Example for C++ 6.0 and later

ISCLChallengeResponseSuccess Example for C++ 6.0 and later

IsImplementClass Example for C++ 6.0 and later

IsImplementVersion Example for C++ 6.0 and later

IsISCLQueueEmpty Example for C++ 6.0 and later

IsMaxLengthEnabled Example for C++ 6.0 and later

IsRoleSelect Example for C++ 6.0 and later

J2KCompressionRatio Example for C++ 5.0 and later

J2KROIControl Example for C++ 5.0 and later

J2KSetDefaults Example for C++ 5.0 and later

J2KTargetFileSize Example for C++ 5.0 and later

KeepPixelDataIntact Example for C++ 6.0 and later

Listen Example for C++ 6.0 and later

LoadDS Example for C++ 6.0 and later

LoadDSArray Example for C++ 6.0 and later

Modifying a Context Group Example for C++ 6.0 and later

MoveFirstIOD Example for C++ 6.0 and later

MoveFirstTag Example for C++ 6.0 and later

MoveFirstUID Example for C++ 6.0 and later

MoveFirstVR Example for C++ 6.0 and later

MoveRootElement Example for C++ 6.0 and later

MoveRootIOD Example for C++ 6.0 and later

NetClose Example for C++ 6.0 and later

NetConnect Example for C++ 6.0 and later

NetNonSecureReceivedISCL Example for C++ 6.0 and later

NetNonSecureSendISCL Example for C++ 6.0 and later

NetReceive Example for C++ 6.0 or later

NetReceiveAbort Example for C++ 6.0 or later

NetReceiveAssociateAccept Example for C++ 6.0 and later

NetReceiveAssociateReject Example for C++ 6.0 and later

NetReceiveAssociateRequest Example for C++ 6.0 and later

NetReceiveCCancelRequest Example for C++ 6.0 and later

NetReceiveCEchoResponse Example for C++ 6.0 and later

NetReceiveCFindResponse Example for C++ 6.0 and later

NetReceiveCGetRequest Example for C++ 6.0 and later

NetReceiveCGetResponse Example for C++ 6.0 and later

NetReceiveCMoveRequest Example for C++ 6.0 and later

NetReceiveCMoveResponse Example for C++ 6.0 and later

NetReceiveCStoreResponse Example for C++ 6.0 and later

NetReceiveData Example for C++ 6.0 or later

NetReceiveNActionRequest Example for C++ 6.0 or later

NetReceiveNActionResponse Example for C++ 6.0 or later

NetReceiveNCreateResponse Example for C++ 6.0 and later

NetReceiveNDeleteResponse Example for C++ 6.0 and later

NetReceiveNGetRequest Example for C++ 6.0 or later

NetReceiveNGetResponse Example for C++ 6.0 and later

NetReceiveNReportRequest Example for C++ 6.0 or later

NetReceiveNReportResponse Example for C++ 6.0 and later

NetReceiveNSetRequest Example for C++ 6.0 or later

NetReceiveNSetResponse Example for C++ 6.0 or later

NetReceiveReleaseRequest Example for C++ 6.0 or later

NetReceiveReleaseResponse Example for C++ 6.0 or later

NetReceiveUnknown Example for C++ 6.0 or later

NetSecureLinkReady example for C++ 6.0 and later

NetSend Example for C++ 6.0 and later

Preamble Example for C++ 6.0 and later

ProgressStatus Example for C++ 6.0 and later

ResetDS Example for C++ 6.0 and later

ResetIOD Example for C++ 6.0 and later

ResetTag Example for C++ 6.0 and later

ResetUID Example for C++ 6.0 and later

ResetVR Example for C++ 6.0 and later

SaveDS example for C++ 6.0 and later

Searching the Data Set for a Digital Signature Example for C++ 6.0 and later

SendAbort Example for C++ 6.0 and later

SendAssociateRequest Example for C++ 6.0 and later

SendCCancelRequest Example for C++ 6.0 and later

SendCEchoRequest Example for C++ 6.0 and later

SendCEchoResponse Example for C++ 6.0 and later

SendCFindRequest Example for C++ 6.0 or later

SendCFindResponse Example for C++ 6.0 and later

SendCGetRequest Example for C++ 6.0 and later

SendCMoveRequest Example for C++ 6.0 or later

SendCStoreRequest Example for C++ 6.0 and later

SendCStoreResponse Example for C++ 6.0 and later

SendData Example for C++ 6.0 or later

SendNActionRequest Example for C++ 6.0 or later

SendNCreateRequest Example for C++ 6.0 and later

SendNCreateResponse Example for C++ 6.0 and later

SendNDeleteRequest Example for C++ 6.0 and later

SendNDeleteResponse Example for C++ 6.0 and later

SendNGetRequest Example for C++ 6.0 and later

SendNonSecureISCL Example for C++ 6.0 and later

SendNReportRequest Example for C++ 6.0 or later

SendNSetRequest Example for C++ 6.0 or later

SendReleaseRequest Example for C++ 6.0 and later

SetAuthDataISCL Example for C++ 6.0 and later

SetBitmapListValue example for C++ 6.0 and later

SetBitmapValue example for C++ 6.0 and later

SetCalled Example for C++ 6.0 and later

SetCipherToIndexTLS Example for C++ 6.0 and later

SetClientCertificateTLS Example for C++ 6.0 and later

SetCommandSet Example for C++ 6.0 and later

SetCurrentElement example for C++ 6.0 and later

SetDefaultEncryptionISCL Example for C++ 6.0 and later

SetDefaultSigningISCL Example for C++ 6.0 and later

SetEncryptKeyISCL Example for C++ 6.0 and later

SetMaxCommBlockLengthISCL Example for C++ 6.0 and later

SetMaxMessageLengthISCL Example for C++ 6.0 and later

SetMutualAuthAlgISCL Example for C++ 6.0 and later

SetMutualAuthKeyISCL Example for C++ 6.0 and later

SetRequest Example for C++ 6.0 and later

SetServerCertificateTLS example for C++ 6.0 and later

SetTagName example for C++ 6.0 and later

Setting an overlay bitmap list Example for C++ 6.0 and later

Setting modality LUT data and attributes Example for C++ 6.0 and later

Setting palette color LUT data and attributes Example for C++ 6.0 and later

Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for C++ 6.0 and later

SetUIDName example for C++ 6.0 and later

SetVRName example for C++ 6.0 and later

SSLCreateFlags Example for C++ 6.0 and later

StartUp Example for C++ 6.0 and later

Version Example for C++ 6.0 and later


Accept Example for C++ 6.0 and later

void CDicomNetSink::OnNetAccept (long nStatus)
{
CString cStr;
CString strTmp;
long hClient;
long lClients;

cStr.Format("*** NetAccept Event ***\n nStatus[%d]\n", nStatus);

//accept the connection attempt
m_pDlg->m_pLEADDicomNet->Accept();
cStr = cStr + "Accepted\n";

//display some information about the connection
_bstr_t sHostAddress = m_pDlg->m_pLEADDicomNet->GetHostAddress(m_pDlg->m_pLEADDicomNet->GethNet());
cStr = cStr + "Host: " + (char *)sHostAddress + "\n";

//get the latest client
lClients = m_pDlg->m_pLEADDicomNet->GetClientCount(m_pDlg->m_pLEADDicomNet->GethNet());
hClient = m_pDlg->m_pLEADDicomNet->GetClient(m_pDlg->m_pLEADDicomNet->GethNet(), lClients - 1);

strTmp.Format("ClientCount[%d]\nLatest Client[%x]\n", lClients, hClient);
cStr = cStr + strTmp;

_bstr_t sPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress(hClient);
long lPeerPort = m_pDlg->m_pLEADDicomNet->GetPeerPort(hClient);

strTmp.Format("PeerAddress[%s]\nPeerPort[%d]\n", (char*)sPeerAddress, lPeerPort);
cStr = cStr + strTmp;

AfxMessageBox(cStr);

//reject the connection if we do not like the address
if ((char *)m_pDlg->m_pLEADDicomNet->GetPeerAddress (hClient) == "207.238.49.199")
//close the connection
m_pDlg->m_pLEADDicomNet->Close(hClient);
}


AnnCount Example for C++ 6.0 and later

{
//This example
// 1. Opens a dataset with annotations
// 2. Finds the location of one of the annotation files
// 3. Loads the annotations
// 4. Flips the annotations
// 5. Saves the annotations to index to slots 250 through 255
// 6. Deletes the annotation files from slot 253

int nRet;
int i;
CString strMsg;
CString strTmp;
int nIndexAnn;

ILEADRasterIO *pRasterIO=NULL;
ILEADRasterAnnotation *pRasterAnn = NULL;

CoCreateInstance(
CLSID_LEADRasterAnnotation,
NULL,
CLSCTX_ALL,
IID_ILEADRasterAnnotation,
(void**)&pRasterAnn);

CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);
pRasterIO->EnableMethodErrors
  = FALSE;
pRasterIO->Load
 (m_LEADRasterView1.GetRaster (), "c:\\1.cmp", 0, 0, 1);
pRasterIO->Release();

// Open the dataset with annotations
nRet = m_pLEADDicomDS->LoadDS("c:\\1.dic", 0);
if (nRet != DICOM_SUCCESS) return;

// Find the location of one of the annotation files
m_pLEADDicomDS->AnnCount();
if (nRet != DICOM_SUCCESS) return;

strMsg.Format("Private Creator Tag: 0x%x\n", m_pLEADDicomDS->GetAnnPrivateCreatorTag());
for (i = 0; i<=255; i++)
{
if (m_pLEADDicomDS->GetAnnEntries(i))
{
nIndexAnn = i;
strTmp.Format("\t%d\n", i);
strMsg = strMsg + strTmp;
}
}
MessageBox(strMsg);

// Loads the annotations
m_pLEADDicomDS->AnnLoad(nIndexAnn, 1);

//Attach the annotation object to the raster view control
IDispatch *pDispatch=NULL;
LPUNKNOWN pIUnknownNoRelease = m_LEADRasterView1.GetControlUnknown();
pIUnknownNoRelease->QueryInterface(IID_IDispatch, (void**)&pDispatch);
pRasterAnn->PutAnnParentRasterView
 (pDispatch);

if(pDispatch)
pDispatch->Release();

// Flip the annotations
pRasterAnn->put_AnnContainer
 (m_pLEADDicomDS->GetAnnContainer());
pRasterAnn->AnnFlip
 (TRUE, m_LEADRasterView1.GetRaster ().GetBitmapHeight ()/ 2, FALSE);
m_pLEADDicomDS->AnnContainer = pRasterAnn->GetAnnContainer ();

// Save the annotations to index to slots 250 through 255
for (i = 250; i<=255; i++)
nRet = m_pLEADDicomDS->AnnSave(i, ANN_FMT_NATIVE, FALSE, SAVE_OVERWRITE, 1);

// Delete the annotation files from slot 253
m_pLEADDicomDS->AnnDelete(253, -1);

// Display file info
m_pLEADDicomDS->AnnCount();
if (nRet != DICOM_SUCCESS) return;

strMsg.Format("Private Creator Tag: 0x%x\n",  m_pLEADDicomDS->GetAnnPrivateCreatorTag());
for (i = 0; i<=255; i++)
{
if (m_pLEADDicomDS->GetAnnEntries(i))
{
strTmp.Format("\t%d\n", i);
strMsg = strMsg + strTmp;
}
}
MessageBox(strMsg);

// Save the data set
m_pLEADDicomDS->SaveDS("e:\\erase\\dicom.dic", 0);

pRasterAnn->Release();

}


BinaryValues2 Example for C++ 6.0 and later

void GetSetPrivateData(ILEADDicomDSPtr
 spDataSet)
{
long nPrivateDataTag = 0x19100E;
SAFEARRAY* psaPrivateData = NULL;
unsigned char *piData = NULL;
IDicomDSElementPtr pCurrentElement = NULL;

VARIANT vPrivateData;
long nCount;
int nIndex;
int nDicomRet;

spDataSet->EnableMethodErrors
 = FALSE;
// I am assuming that the dataset already includes the
 private element
nDicomRet = spDataSet->FindFirstElement(nPrivateDataTag,
 FALSE);
if(nDicomRet != 0)
return;

//get the byte count
pCurrentElement = spDataSet->CurrentElement();
nCount = pCurrentElement->GetLength();
if(nCount == 0)
return;

//get the data
nDicomRet = spDataSet->GetBinaryValue(nCount);
if(nDicomRet != 0)
return;
VariantInit(&vPrivateData);
spDataSet->get_BinaryValues2(&vPrivateData);
//Remap the data
psaPrivateData = (SAFEARRAY*)V_ARRAYREF(&vPrivateData);
SafeArrayAccessData(psaPrivateData, (void HUGEP* FAR
 *) &piData);
for(nIndex =0; nIndex <= (nCount-1); nIndex++)
{
piData[nIndex] = piData[nIndex] + 1;
}
//put the data back
SafeArrayUnaccessData(psaPrivateData);
spDataSet->put_BinaryValues2(vPrivateData);
SafeArrayDestroy(psaPrivateData);
spDataSet->SetBinaryValue(nCount);
}


ChangeTransferSyntax Example for C++ 6.0 and later

// Load a Data Set
if (m_pLEADDicomDS->LoadDS("q:\\lead14\\dist\\Images\\dicom\\Image1.dic", 0) == DICOM_SUCCESS)
{
// Change the Transfer Syntax to Explicit VR Big Endian
m_pLEADDicomDS->ChangeTransferSyntax(UID_EXPLICIT_VR_BIG_ENDIAN, 0, 0);

// Save the new Data Set
m_pLEADDicomDS->SaveDS("d:\\temp\\Temp.dic", 0);
}


CloseForced Example for C++ 6.0 and later

{
m_pLEADDicomNet->NetworkSecurityMode = DICOM_SECURE_ISCL;
m_pLEADDicomNet->StartUp();
// do some communications
m_pLEADDicomNet->CloseForced(m_pLEADDicomNet->GethNet (), VARIANT_TRUE);
}


ConformanceStatus example for C++ 6.0 and later

short nRet;
nRet = m_pLEADDicomDS->ConformanceTestDS();
if(nRet)
AfxMessageBox("Error");

void CDicomDSSink::OnConformanceStatus(short nFlags)
{
CString msg;
short nRet;
CString szTag;
CString szOut;
IDicomDSElementPtr pCurrentElement=NULL;

//display info about non-standard element
switch(nFlags)
{
case CALLBACK_ERROR_UNKNOWN_CLASS:
msg = "Unknown Class";
break;
case CALLBACK_ERROR_UNKNOWN_TAG:
msg = "Unknown Tag";
break;
case CALLBACK_ERROR_UNKNOWN_VR:
msg = "Unknown VR";
break;
case CALLBACK_ERROR_WRONG_VR:
msg = "Error in VR";
break;
case CALLBACK_ERROR_MIN_VM:
msg = "Error in MinVM";
break;
case CALLBACK_ERROR_MAX_VM:
msg = "Error in MaxVM";
break;
case CALLBACK_ERROR_DIVIDE_VM:
msg = "Error in DivideVM";
break;
case CALLBACK_ERROR_IMAGE:
msg = "Error in Image";
break;
default:
return;
}

pCurrentElement = m_pDlg->m_pLEADDicomDS->GetCurrentElement();
szTag.Format("%04X:%04X", GETGROUP(pCurrentElement->GetTag()),
GETELEMENT(pCurrentElement->GetTag()));
szOut.Format("%s\nTag: %s", msg, szTag);
nRet = ::MessageBox(NULL, szOut, "Non-Standard Element", MB_OKCANCEL);
if(nRet == IDCANCEL)
m_pDlg->m_pLEADDicomDS->EnableConformanceStatus = FALSE;
return;
}


Connect Example for C++ 6.0 and later

#define PEER_PORT 104
void CDicomDlg::OnButton59()
{
int iHostPort = 0;
int iPeerPort = PEER_PORT;
CString strHostIP = ""; //empty string means use local IP
CString strPeerIP = "207.238.49.190"; //Put a valid IP addres of a computer to connect to

//startup the network
m_pLEADDicomNet->StartUp();

BSTR bstrPeerIP = strPeerIP.AllocSysString();
BSTR bstrHostIP = strHostIP.AllocSysString();
//connect to a server
m_pLEADDicomNet->Connect(bstrHostIP, iHostPort, bstrPeerIP, iPeerPort);

SysFreeString(bstrPeerIP);
SysFreeString(bstrHostIP);
}


Converting DICOM Annotation Objects to LEAD Annotation Objects example for Visual C++ 5.0

Converting DICOM Annotation Objects to LEAD Annotation Objects example for C++ 5.0 and later

void DicomAnnToLEADAnn(ILEADDicomDSPtr& spPresStateDS)
{
ILEADRasterAnnotationPtr spRasterAnn(__uuidof(LEADRasterAnnotation));

// Describe a DICOM graphic annotation object and then convert it to
// a LEAD annotation object
IDicomGraphicObjectAttributesPtr spGraphicObjAttribs;
spGraphicObjAttribs = spPresStateDS->GraphicObjectAttributes;
spGraphicObjAttribs->Type = DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE;
spGraphicObjAttribs->Filled = VARIANT_FALSE;
spGraphicObjAttribs->PointCount = 5;
spGraphicObjAttribs->PointsX [0] = float(90.7);
spGraphicObjAttribs->PointsY [0] = float(156.9);
spGraphicObjAttribs->PointsX [1] = float(195.9);
spGraphicObjAttribs->PointsY [1] = float(156.9);
spGraphicObjAttribs->PointsX [2] = float(195.9);
spGraphicObjAttribs->PointsY [2] = float(342.5);
spGraphicObjAttribs->PointsX [3] = float(90.7);
spGraphicObjAttribs->PointsY [3] = float(342.5);
spGraphicObjAttribs->PointsX [4] = float(90.7);
spGraphicObjAttribs->PointsY [4] = float(156.9);
if (spPresStateDS->ConvertDicomAnnObjToLEADAnnObj (VARIANT_TRUE) == DICOM_SUCCESS)
{
MessageBox(NULL, "The DICOM graphic annotation object was converted successfully.",
"Converting A DICOM Annotation Object", MB_OK);

// The handle to the resulted LEAD annotation object is available from the
// LEADAnnObject property. You can now use the functionality of a LEAD Raster
// Annotation object to manipulate the object.

// Once done from the object, don't forget to destroy it
spRasterAnn->AnnDestroy(spPresStateDS->LEADAnnObject, 0);
}

// Describe a DICOM text annotation object and then convert it to a
// LEAD annotation object
IDicomTextObjectAttributesPtr spTextObjAttribs;
spTextObjAttribs = spPresStateDS->TextObjectAttributes;
spTextObjAttribs->BoundingBoxUsed = VARIANT_TRUE;
spTextObjAttribs->AnchorPointUsed = VARIANT_FALSE;
spTextObjAttribs->TextValue = "Text annotation";
spTextObjAttribs->BoundingBoxTLHCornerX = float(290.5);
spTextObjAttribs->BoundingBoxTLHCornerY = float(158.1);
spTextObjAttribs->BoundingBoxBRHCornerX= float(424.1);
spTextObjAttribs->BoundingBoxBRHCornerY = float(176.1);
spTextObjAttribs->BoundingBoxTextJustification = DICOM_TEXT_JUSTIFICATION_LEFT;
if (spPresStateDS->ConvertDicomAnnObjToLEADAnnObj (VARIANT_FALSE) == DICOM_SUCCESS)
{
MessageBox(NULL, "The DICOM text annotation object was converted successfully.",
"Converting A DICOM Annotation Object", MB_OK);

// The handle to the resulted LEAD annotation object is available from the
// LEADAnnObject property. You can now use the functionality of a LEAD Raster
// Annotation object to manipulate the object.

// Once done from the object, don't forget to destroy it
spRasterAnn->AnnDestroy(spPresStateDS->LEADAnnObject, 0);
}
}


Converting LEAD Annotation Objects to DICOM Annotation Objects example for Visual C++ 5.0

Converting LEAD Annotation Objects to DICOM Annotation Objects example for C++ 5.0 and later

// We are going to make use of some ATL-specific code, so we
// need to include <atlbase.h> and <atlcom.h>. Furthermore, as
// <atlcom.h> is looking for an instance of CComModule named
// _Module, we need to create a dummy object.
#include <atlbase.h>
CComModule _Module;
#include <atlcom.h>

/* Creating the Sink Object */

// Type info for the OnConvertLEADAnnObjToDicomAnnObj event handler function
_ATL_FUNC_INFO OnConvertLEADAnnObjToDicomAnnObjInfo = { CC_STDCALL,
VT_EMPTY,
1,
{ VT_BOOL } };

// The class implementing the sink
class CDicomDSSink :
public IDispEventSimpleImpl<1, CDicomDSSink,
&DIID__LEADDicomDSEvents>
{
private:
ILEADDicomDS* m_pDicomDS;

public:
CDicomDSSink(ILEADDicomDS* pDicomDS)
{
m_pDicomDS = pDicomDS;
m_pDicomDS->AddRef();

// Attach to the source
DispEventAdvise((IUnknown*) m_pDicomDS);
}

virtual ~CDicomDSSink()
{
m_pDicomDS->Release();

// Detach from the source
DispEventUnadvise((IUnknown*) m_pDicomDS);
}

// This function will be called when the OnConvertLEADAnnObjToDicomAnnObj event is fired
void __stdcall OnConvertLEADAnnObjToDicomAnnObj(VARIANT_BOOL bGraphicObject)
{
char szMsg[512];

// Display the attributes of the resulted DICOM annotation object
if (bGraphicObject) // The resulted DICOM annotation object is a graphic object
{
IDicomGraphicObjectAttributesPtr spGraphicObjAttribs;
spGraphicObjAttribs = m_pDicomDS->GraphicObjectAttributes;

lstrcpy(szMsg, "Graphic Annotation Units: ");
switch (spGraphicObjAttribs->GetUnits())
{
case DICOM_UNIT_PIXEL:
lstrcat(szMsg, "PIXEL\n");
break;

case DICOM_UNIT_DISPLAY:
lstrcat(szMsg, "DISPLAY\n");
break;
}

lstrcat(szMsg, "Graphic Type: ");
switch (spGraphicObjAttribs->GetType())
{
case DICOM_GRAPHIC_OBJECT_TYPE_POINT:
lstrcat(szMsg, "POINT\n");
break;

case DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE:
lstrcat(szMsg, "POLYLINE\n");
break;

case DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED:
lstrcat(szMsg, "INTERPOLATED\n");
break;

case DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE:
lstrcat(szMsg, "CIRCLE\n");
break;

case DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE:
lstrcat(szMsg, "ELLIPSE\n");
break;
}

if (spGraphicObjAttribs->Filled)
{
lstrcat(szMsg, "Graphic Filled: Y\n");
}
else
{
lstrcat(szMsg, "Graphic Filled: N\n");
}

long lCount = spGraphicObjAttribs->PointCount;
wsprintf(szMsg, "%sNumber of Graphic Points: %li\n", szMsg, lCount);

if (lCount < 10)
{
lstrcat(szMsg, "Graphic Data: \n");
for (long i = 0; i < lCount; i++)
{
sprintf(szMsg, "%s X%i, Y%i = %.2f, %.2f\n", szMsg,
i + 1, i + 1,
spGraphicObjAttribs->PointsX [i],
spGraphicObjAttribs->PointsY [i]);
}
}

MessageBox(NULL, szMsg, "Graphic Annotation Object", MB_OK);
}
else // The resulted DICOM annotation object is a text object
{
IDicomTextObjectAttributesPtr spTextObjAttribs;
spTextObjAttribs = m_pDicomDS->TextObjectAttributes;

if (spTextObjAttribs->BoundingBoxUsed)
{
wsprintf(szMsg, "Unformatted Text Value: %s\n",
spTextObjAttribs->TextValue.operator char *());

lstrcat(szMsg, "Bounding Box Annotation Units: ");
switch(spTextObjAttribs->GetBoundingBoxUnits ())
{
case DICOM_UNIT_PIXEL:
lstrcat(szMsg, "PIXEL\n");
break;

case DICOM_UNIT_DISPLAY:
lstrcat(szMsg, "DISPLAY\n");
break;
}

sprintf(szMsg, "%sBounding Box Top Left Hand Corner: %.2f, %.2f\n",
szMsg,
spTextObjAttribs->BoundingBoxTLHCornerX,
spTextObjAttribs->BoundingBoxTLHCornerY);

sprintf(szMsg, "%sBounding Box Bottom Right Hand Corner: %.2f, %.2f\n",
szMsg,
spTextObjAttribs->BoundingBoxBRHCornerX,
spTextObjAttribs->BoundingBoxBRHCornerY);

lstrcat(szMsg, "Bounding Box Text Horizontal Justification: ");
switch (spTextObjAttribs->GetBoundingBoxTextJustification ())
{
case DICOM_TEXT_JUSTIFICATION_LEFT:
lstrcat(szMsg, "LEFT\n");
break;

case DICOM_TEXT_JUSTIFICATION_RIGHT:
lstrcat(szMsg, "RIGHT\n");
break;

case DICOM_TEXT_JUSTIFICATION_CENTER:
lstrcat(szMsg, "CENTER\n");
break;
}
}
else
{
wsprintf(szMsg, "Unformatted Text Value: %s\n",
spTextObjAttribs->TextValue.operator char *());

lstrcat(szMsg, "Anchor Point Annotation Units: ");
switch (spTextObjAttribs->GetAnchorPointUnits ())
{
case DICOM_UNIT_PIXEL:
lstrcat(szMsg, "PIXEL\n");
break;

case DICOM_UNIT_DISPLAY:
lstrcat(szMsg, "DISPLAY\n");
break;
}

sprintf(szMsg, "%sAnchor Point: %.2f, %.2f\n",
szMsg,
spTextObjAttribs->AnchorPointX,
spTextObjAttribs->AnchorPointY);

if (spTextObjAttribs->AnchorPointVisible)
{
lstrcat(szMsg, "Anchor Point Visibility: Y");
}
else
{
lstrcat(szMsg, "Anchor Point Visibility: N");
}
}

MessageBox(NULL, szMsg, "Text Annotation Object", MB_OK);
}

// If it is desired to stop the conversion process...
//m_pDicomDS->EndConversion(DICOM_ERROR_ANN); // Any error code, but not 0
}

// IDispEventSimpleImpl<> needs a sink map
// Note: The DISPID of the event OnConvertLEADAnnObjToDicomAnnObj is 3
BEGIN_SINK_MAP(CDicomDSSink)
SINK_ENTRY_INFO(1, DIID__LEADDicomDSEvents,
3, OnConvertLEADAnnObjToDicomAnnObj,
&OnConvertLEADAnnObjToDicomAnnObjInfo)
END_SINK_MAP()
};

void LEADAnnToDicomAnn(ILEADDicomDSPtr& spPresStateDS)
{
// The sink
CDicomDSSink DicomDSSink(spPresStateDS);

// Update the CurrentElement property with a Graphic Annotation Item so
// that the resulted DICOM annotation objects are added to the Data Set
if (spPresStateDS->FindFirstGraphicAnnItem () != 0)
{
// (Make sure that the specified layer is already defined in the
// "Graphic Layer Module")
spPresStateDS->CreateGraphicAnnItem (0, "LAYER_0");
spPresStateDS->FindFirstGraphicAnnItem ();
}

ILEADRasterAnnotationPtr spRasterAnn(__uuidof(LEADRasterAnnotation));

// Let's create a LEAD rectangle annotation object
spRasterAnn->AnnCreate(ANN_OBJECT_RECT, VARIANT_FALSE, VARIANT_FALSE);
long hAnnObject = spRasterAnn->AnnObject;
spRasterAnn->AnnRectLeft[hAnnObject] = 150;
spRasterAnn->AnnRectTop[hAnnObject] = 175;
spRasterAnn->AnnRectWidth[hAnnObject] = 200;
spRasterAnn->AnnRectHeight[hAnnObject] = 100;
spRasterAnn->AnnSetFillMode(hAnnObject, ANN_FILLMODE_TRANSPARENT, VARIANT_FALSE);

// Convert the LEAD annotation object. Now, for each resulted DICOM annotation
// object, the OnConvertLEADAnnObjToDicomAnnObj event gets fired. By handling
// the event, you can inspect the resulted object.
if (spPresStateDS->ConvertLEADAnnObjToDicomAnnObjs(hAnnObject, 0) == DICOM_SUCCESS)
{
MessageBox(NULL, "The LEAD annotation object was converted successfully.",
"Converting a LEAD Annotation Object", MB_OK);
}

// Destroy the LEAD annotation object
spRasterAnn->AnnDestroy(hAnnObject, 0);
}


CreateAssociate Example for C++ 6.0 and later

void CMFCdicomDlg::OnButton1()
{
//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate(TRUE);

//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate(m_pLEADDicomNet->GethPDU());

//Get presentations here
if (m_pLEADDicomNet->IsRequest(m_pLEADDicomNet->GethPDU()))
AfxMessageBox ("Associate Request? TRUE");
else
AfxMessageBox ("Associate Request? FALSE");

//reset the Associate class to Accept
m_pLEADDicomNet->ResetAssociate(m_pLEADDicomNet->GethPDU(), FALSE);

//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate(m_pLEADDicomNet->GethPDU());
if (m_pLEADDicomNet->IsRequest (m_pLEADDicomNet->GethPDU()))
AfxMessageBox ("Associate Request? TRUE");
else
AfxMessageBox ("Associate Request? FALSE");

//free the Associate class
m_pLEADDicomNet->FreeAssociate( m_pLEADDicomNet->GethPDU());
}


Creating DICOM Annotations example for Visual C++ 5.0

Creating DICOM Annotations example for C++ 5.0 and later

void CreateAnnotations(ILEADDicomDSPtr& spPresStateDS)
{
SYSTEMTIME SystemTime;
GetLocalTime(&SystemTime);

// Set the attributes that describe the "Presentation State Module"
IDicomPresStateAttributesPtr spPresStateAttribs = spPresStateDS->PresStateAttributes;
spPresStateAttribs->InstanceNumber = 1;
spPresStateAttribs->PresLabel = "SOME_LABEL";
spPresStateAttribs->PresDescription = "Description of the presentation";
spPresStateAttribs->PresCreationDate ->Year = SystemTime.wYear;
spPresStateAttribs->PresCreationDate ->Month = SystemTime.wMonth;
spPresStateAttribs->PresCreationDate ->Day = SystemTime.wDay;
spPresStateAttribs->PresCreationTime ->Hours = SystemTime.wHour;
spPresStateAttribs->PresCreationTime ->Minutes = SystemTime.wMinute;
spPresStateAttribs->PresCreationTime ->Seconds = SystemTime.wSecond;
spPresStateAttribs->PresCreationTime ->Fractions = 0;
spPresStateAttribs->PresCreatorName = "SomeOne";
if (spPresStateDS->SetPresStateAttributes () == DICOM_SUCCESS)
{
MessageBox(NULL, "Presentation State attributes were set successfully.",
"Presentation State Attributes", MB_OK);
}

// Add references to some images (under the "Presentation State Module")
spPresStateDS->AddPresStateImageRef ("C:\\Image1.dic");
spPresStateDS->AddPresStateImageRef ("C:\\Image2.dic");
spPresStateDS->AddPresStateImageRef ("C:\\Image3.dic");

char szMsg[128];
_bstr_t sLayerName;

// Create a layer
IDicomLayerAttributesPtr spLayerAttribs = spPresStateDS->LayerAttributes;
spLayerAttribs->LayerName = "LAYER_0"; // "Graphic Layer"
spLayerAttribs->LayerOrder = 1;
spLayerAttribs->DisplayGrayscaleValue = -1;
spLayerAttribs->DisplayRedValue = -1;
spLayerAttribs->DisplayGreenValue = -1;
spLayerAttribs->DisplayRedValue = -1;
spLayerAttribs->LayerDescription = "Description of the layer";
if (spPresStateDS->CreateLayer () == DICOM_SUCCESS)
{
sLayerName = spLayerAttribs->LayerName;

wsprintf(szMsg, "Layer '%s' was created successfully.",
sLayerName.operator char *());

MessageBox(NULL, szMsg, "Graphic Layer", MB_OK);

// Change one of the attributes and update the layer
spLayerAttribs->LayerOrder = 0;
spPresStateDS->SetLayerAttributes (spPresStateDS->NewLayerIndex);
}

long hGraphicAnnItem = 0;

// Create a Graphic Annotation Item
if (spPresStateDS->CreateGraphicAnnItem (0, sLayerName) == DICOM_SUCCESS)
{
MessageBox(NULL, "A Graphic Annotation Item was created successfully.",
"Graphic Annotation Item", MB_OK);

spPresStateDS->FindFirstGraphicAnnItem ();
hGraphicAnnItem = spPresStateDS->GetCurrentElement()->hElement;
}

_bstr_t sSOPInstanceUID;

// The annotations defined in the Item hGraphicAnnItem will be applied
// only to one of the images listed in the Presentation State Module
if (spPresStateDS->FindFirstPresStateRefSeriesItem () == DICOM_SUCCESS)
{
if (spPresStateDS->GetPresStateImageRefCount () > 0)
{
sSOPInstanceUID = spPresStateDS->GetPresStateImageRefInstanceUID (0);
}
}
spPresStateDS->SetCurrentElement (hGraphicAnnItem);
spPresStateDS->AddLayerImageRef(sSOPInstanceUID);

// Let's create a graphic annotation object
IDicomGraphicObjectAttributesPtr spGraphicObjAttribs;
spGraphicObjAttribs = spPresStateDS->GraphicObjectAttributes;
spGraphicObjAttribs->LayerName = sLayerName;
spGraphicObjAttribs->Units = DICOM_UNIT_PIXEL;
spGraphicObjAttribs->Type = DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE;
spGraphicObjAttribs->Filled = VARIANT_TRUE;
spGraphicObjAttribs->PointCount = 2; // "Number of Graphic Points"
// "Graphic Data":
spGraphicObjAttribs->PointsX [0] = float(252.5);
spGraphicObjAttribs->PointsY [0] = float(252.5);
spGraphicObjAttribs->PointsX [1] = float(209.2);
spGraphicObjAttribs->PointsY [1] = float(199.6);
if (spPresStateDS->CreateGraphicObject(VARIANT_TRUE) == DICOM_SUCCESS)
{
MessageBox(NULL, "A graphic annotation object was created successfully.",
"Graphic Annotation Object", MB_OK);

// Change one of the attributes and update the object
spGraphicObjAttribs->Filled = VARIANT_FALSE;
spPresStateDS->SetGraphicObjectAttributes (0);
}

IDicomTextObjectAttributesPtr spTextObjAttribs;
spTextObjAttribs = spPresStateDS->TextObjectAttributes;

// Let's now create a text annotation object
spTextObjAttribs->LayerName = sLayerName;
spTextObjAttribs->BoundingBoxUsed = VARIANT_TRUE;
spTextObjAttribs->AnchorPointUsed = VARIANT_FALSE;
spTextObjAttribs->BoundingBoxUnits = DICOM_UNIT_PIXEL;
spTextObjAttribs->TextValue = "Text annotation (using a bounding box)";
spTextObjAttribs->BoundingBoxTLHCornerX = float(176.7);
spTextObjAttribs->BoundingBoxTLHCornerY = float(117.7);
spTextObjAttribs->BoundingBoxBRHCornerX = float(320.3);
spTextObjAttribs->BoundingBoxBRHCornerY = float(136.1);
spTextObjAttribs->BoundingBoxTextJustification = DICOM_TEXT_JUSTIFICATION_RIGHT;
if (spPresStateDS->CreateTextObject(VARIANT_TRUE) == DICOM_SUCCESS)
{
MessageBox(NULL, "A text annotation object was created successfully.",
"Text Annotation Object", MB_OK);

// Change one of the attributes and update the object
spTextObjAttribs->BoundingBoxTextJustification = DICOM_TEXT_JUSTIFICATION_LEFT;
spPresStateDS->SetTextObjectAttributes (0);
}

// And another text annotation object
spTextObjAttribs->LayerName = sLayerName;
spTextObjAttribs->AnchorPointUsed = VARIANT_TRUE;
spTextObjAttribs->BoundingBoxUsed = VARIANT_FALSE;
spTextObjAttribs->AnchorPointUnits = DICOM_UNIT_PIXEL;
spTextObjAttribs->TextValue = "Text annotation (using an anchor point)";
spTextObjAttribs->AnchorPointX = float(277.9);
spTextObjAttribs->AnchorPointY = float(382.7);
spTextObjAttribs->AnchorPointVisible = VARIANT_TRUE;
if (spPresStateDS->CreateTextObject(VARIANT_TRUE) == DICOM_SUCCESS)
{
MessageBox(NULL, "Another text annotation object was created successfully.",
"Text Annotation Object", MB_OK);
}
}


Creating a Digital Signature Example for C++ 6.0 and later

void CreateSignature(ILEADDicomDSPtr& spDicomDS)
{
// Create a Digital Signature in the main Data Set
spDicomDS->SetCurrentElement(0);
short nRet = spDicomDS->CreateSignature("C:\\PrivateKey",
"C:\\Certificate.cer",
"",
"",
DICOM_MAC_ALGORITHM_RIPEMD160,
VARIANT_FALSE,
DICOM_SECURITY_PROFILE_NONE,
0);
if (nRet == DICOM_SUCCESS)
{
::MessageBox(NULL,
"The Digital Signature was created successfully.",
"Sample",
MB_OK);
}
else
{
char szMsg[64];

wsprintf(szMsg, "An error occurred [Error: %hd].", nRet);
::MessageBox(NULL, szMsg, "Sample", MB_OK);
return;
}

// Save the signed Data Set
spDicomDS->SaveDS("C:\\Signed.dic", 0);

// Examine the Digital Signature we just created
// Refer to Examining a Digital Signature Example for C++ 6.0 and later
// for the function ExamineSignature
ExamineSignature(spDicomDS, spDicomDS->GetCurrentElement()->hElement);
}


DefaultIOD example for Visual C++ 6.0

DefaultIOD example for C++ 6.0 and later

void CDicomDlg::OnButton2()
{
short nRet;
HCURSOR hOldCursor=NULL;

nRet = MessageBox("This may take a few seconds, are you sure?","", MB_YESNO);
if(nRet == IDYES)
{
m_TreeView1.DeleteAllItems();
hOldCursor = SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_WAIT)));
m_pLEADDicomDS->DefaultIOD();
FillTree();
SetCursor(hOldCursor);
DisplayNode();
}
}

void CDicomDlg::FillTree()
{
//move to root of tree
m_pLEADDicomDS->MoveFirstIOD(FALSE); //move to first IOD in tree
m_pLEADDicomDS->MoveRootIOD(); //get the root of this IOD

//now, add the IOD items
FillSubTree(NULL);
}

void CDicomDlg::FillSubTree(HTREEITEM hParent)
{
short nRet;
HTREEITEM hItem=NULL;
CString szText;

//add the node to the tree
IDicomIODItemPtr pCurrentIOD=NULL;
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
BSTR bstr = pCurrentIOD->GetName();
szText = bstr;
SysFreeString(bstr);
if(hParent)
hItem = m_TreeView1.InsertItem(szText, hParent);
else
hItem = m_TreeView1.InsertItem(szText);
m_TreeView1.SetItemData(hItem, pCurrentIOD->GethIOD());

nRet = m_pLEADDicomDS->MoveChildIOD(); //does this node have a child?
if(nRet == 0)
FillSubTree(hItem);

//move to next node in same level (if one)
nRet = m_pLEADDicomDS->MoveNextIOD(TRUE);
if(nRet == 0)
FillSubTree(hParent);
else
{
//move back to parent
m_pLEADDicomDS->MoveParentIOD();
}
}

void CDicomDlg::DisplayNode()
{
IDicomIODItemPtr pCurrentIOD=NULL;
CString szDisplay;
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();

szDisplay.Format("%ld", pCurrentIOD->GetCode());
m_Text1.SetWindowText(szDisplay);
BSTR bstr = pCurrentIOD->GetName();
szDisplay = bstr;
SysFreeString(bstr);
m_Text2.SetWindowText(szDisplay);
szDisplay.Format("%d", pCurrentIOD->GetType());
m_Text3.SetWindowText(szDisplay);
szDisplay.Format("%d", pCurrentIOD->GetUsage());
m_Text4.SetWindowText(szDisplay);
bstr = pCurrentIOD->GetDescription();
szDisplay = bstr;
SysFreeString(bstr);
m_Text5.SetWindowText(szDisplay);
m_Text6.SetWindowText(szDisplay);
}


DefaultTag example for Visual C++ 6.0

DefaultTag example for C++ 6.0 and later

HCURSOR hOldCursor=NULL;

hOldCursor = SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_WAIT)));
m_pLEADDicomDS->DefaultTag();
SetCursor(hOldCursor);


DefaultUID example for Visual C++ 6.0

DefaultUID example for C++ 6.0 and later

HCURSOR hOldCursor=NULL;

hOldCursor = SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_WAIT)));
m_pLEADDicomDS->DefaultUID();
SetCursor(hOldCursor);


DefaultVR example for Visual C++ 6.0

DefaultVR example for C++ 6.0 and later

HCURSOR hOldCursor=NULL;

hOldCursor = SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_WAIT)));
m_pLEADDicomDS->DefaultVR();


DeleteBitmapValue Example for C++ 6.0 and later

   short nRet;

m_pLEADDicomDS->EnableMethodErrors = FALSE;

//move to the first image element
nRet = m_pLEADDicomDS->FindFirstElement(TAG_PIXEL_DATA, FALSE);
//get the first image
nRet = m_pLEADDicomDS->GetBitmapValue(0, 0, ORDER_BGR, 0);
m_LEADRasterView1.GetRaster
 ().SetBitmap
 (m_pLEADDicomDS->GetBitmap());
//flip the image
ILEADRasterProcessPtr pRasterProcess=NULL;
CoCreateInstance(CLSID_LEADRasterProcess,
NULL,
CLSCTX_ALL,
IID_ILEADRasterProcess,
(void**)&pRasterProcess);
pRasterProcess->EnableMethodErrors
  = FALSE;
pRasterProcess->Flip(m_LEADRasterView1.GetRaster());

//delete the first image from the dataset
nRet = m_pLEADDicomDS->DeleteBitmapValue(0, 1);

//now update the list with the flipped image
nRet = m_pLEADDicomDS->InsertBitmapValue(m_LEADRasterView1.GetRaster().GetBitmap(),
0, DICOM_IMAGE_COMPRESSION_NONE,
DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);


DeleteElement Example for C++ 6.0 and later

short nRet;
m_pLEADDicomDS->EnableMethodErrors = FALSE;
m_pLEADDicomDS->FindFirstElement(TAG_STUDY_DATE, TRUE);
nRet = m_pLEADDicomDS->DeleteElement();
m_pLEADDicomDS->EnableMethodErrors = TRUE;
if(nRet != 0)
AfxMessageBox("Error Deleting Element!");


DeleteIOD Example for Visual C++ 6.0

DeleteIOD Example for C++ 6.0 and later

m_pLEADDicomDS->MoveFirstIOD(FALSE);
m_pLEADDicomDS->DeleteIOD();


DeleteModule Example for C++ 6.0 and later

short nRet;
IDicomDSModulePtr pCurrentModule=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the first module in the DataSet and delete it
m_pLEADDicomDS->FindIndexModule(0);
pCurrentModule = m_pLEADDicomDS->GetCurrentModule();
nRet = m_pLEADDicomDS->DeleteModule(pCurrentModule->GetModule());
if(nRet != 0)
AfxMessageBox("Error Deleting Module!");
m_pLEADDicomDS->EnableMethodErrors = TRUE;


DeleteTag Example for Visual C++ 6.0

DeleteTag Example for C++ 6.0 and later

long lCode;
short nRet;

lCode = 131073;
//move to the selected Tag
m_pLEADDicomDS->FindTag(lCode);
//delete it
nRet = m_pLEADDicomDS->DeleteTag();
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}


DeleteUID Example for Visual C++ 6.0

DeleteUID Example for C++ 6.0 and later

CString szCode;
short nRet;

szCode = "1.2.840.10008.1.2";
//move to the selected UID
BSTR bstr = szCode.AllocSysString();
m_pLEADDicomDS->FindUID(bstr);
SysFreeString(bstr);
//delete it
nRet = m_pLEADDicomDS->DeleteUID();
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}


DeleteVR Example for Visual C++ 6.0

DeleteVR Example for C++ 6.0 and later

short nCode;
short nRet;

nCode = 18771;
//move to the selected VR
m_pLEADDicomDS->FindVR(nCode);
//delete it
nRet = m_pLEADDicomDS->DeleteVR();
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}


DSTempPath Example for C++ 6.0 and later

m_pLEADDicomDS->DSTempPath = "d:\\temp";


EnableMethodErrors Example for C++ 6.0 and later

EnableMethodErrors (ILEADDicomNet) Example for C++ 6.0 and later

//Toggle method errors
BOOL bOldState;

bOldState = m_pLEADDicomNet->EnableMethodErrors;
m_pLEADDicomNet->EnableMethodErrors = !bOldState;
if (m_pLEADDicomNet->GetEnableMethodErrors())
AfxMessageBox("EnableMethodErrors is ENABLED");
else
AfxMessageBox("EnableMethodErrors is DISABLED");


Enumerating Context Groups Example for C++ 6.0 and later

int DisplayContextGroup(ILEADDicomDSPtr& spDicomDS)
{
IDicomContextGroupPtr spGroup = spDicomDS->CurrentCodedConcept;
char szMsg[256];

wsprintf(szMsg, "%s\n%s\n%s\n%04hd%02hd%02hd\n\nEnumerate Coded Concepts?",
spGroup->ContextIdentifier.operator char *(),
spGroup->Name.operator char *(),
spGroup->Extensible ? "Extensible" : "Non-extensible",
spGroup->ContextGroupVersion->Year,
spGroup->ContextGroupVersion->Month,
spGroup->ContextGroupVersion->Day);

return ::MessageBox(NULL, szMsg, "Context Group", MB_YESNOCANCEL);
}

void EnumContextGroups(ILEADDicomDSPtr& spDicomDS)
{
VARIANT_BOOL bRet;
int iRet;

spDicomDS->ResetContextGroup ();

// Load all the Context Groups
spDicomDS->LoadContextGroup ("");

// Enumerate them (3 possible ways)
#if 1

// One possible way to enumerate the Context Groups
bRet = spDicomDS->MoveFirstContextGroup();
while (bRet)
{
iRet = DisplayContextGroup(spDicomDS);
if (iRet == IDYES)
{
// Refer to Enumerating the Coded Concepts of a Context Group Example
// for C++ 6.0 and later for the function EnumCodedConcepts
EnumCodedConcepts(spDicomDS);
}
else if (iRet == IDCANCEL)
{
break;
}

bRet = spDicomDS->MoveNextContextGroup ();
}

#elif 0

// Another way to enumerate the Context Groups
long lGroupsCount = spDicomDS->GetContextGroupCount ();
for (long i = 0; i < lGroupsCount; i++)
{
spDicomDS->FindIndexContextGroup (i);

iRet = DisplayContextGroup(spDicomDS);
if (iRet == IDYES)
{
EnumCodedConcepts(spDicomDS);
}
else if (iRet == IDCANCEL)
{
break;
}
}

#elif 0

// A third way to enumerate the Context Groups
bRet = spDicomDS->MoveLastContextGroup ();
while (bRet)
{
iRet = DisplayContextGroup(spDicomDS);
if (iRet == IDYES)
{
EnumCodedConcepts(spDicomDS);
}
else if (iRet == IDCANCEL)
{
break;
}

bRet = spDicomDS->MovePrevContextGroup ();
}

#endif
}


Enumerating Digital Signatures Example for C++ 6.0 and later

void EnumerateSignatures(ILEADDicomDSPtr& spDicomDS)
{
// We will enumerate the Digital Signatures in the main Data Set

spDicomDS->SetCurrentElement (0);
long lSignaturesCount = spDicomDS->GetSignaturesCount();
if (lSignaturesCount == 0)
{
::MessageBox(NULL,
"No Digital Signatures in the main Data Set.",
"Sample",
MB_OK);
return;
}

char szMsg[128];

if (lSignaturesCount == 1)
{
lstrcpy(szMsg,
"There is 1 Digital Signature in the main Data Set. "
"Do you want to examine it?");
}
else
{
wsprintf(szMsg,
"There are %ld Digital Signatures in the main Data Set. "
"Do you want to examine them?", lSignaturesCount);
}
if (::MessageBox(NULL, szMsg, "Sample", MB_YESNO) != IDYES)
{
return;
}

for (long i = 0; i < lSignaturesCount; i++)
{
spDicomDS->MoveSignature(i);

// Refer to Examining a Digital Signature Example for C++ 6.0 and later
// for the function ExamineSignature
ExamineSignature(spDicomDS, spDicomDS->GetCurrentElement()->hElement);

spDicomDS->SetCurrentElement (0);
}
}


Enumerating the Coded Concepts of a Context Group Example for C++ 6.0 and later

BOOL DisplayCodedConcept(ILEADDicomDSPtr& spDicomDS, BOOL bYesNo)
{
IDicomCodedConceptPtr spConcept = spDicomDS->CurrentCodedConcept;
char szMsg[256], szTitle[32];

spDicomDS->MoveCodedConceptGroup ();
wsprintf(szTitle, "Coded Concept (%s)",
spDicomDS->CurrentContextGroup->ContextIdentifier.operator char *());

// Coding Scheme Designator
wsprintf(szMsg, "%s\n",
spConcept->CodingSchemeDesignator.operator char *());

// Coding Scheme Version
if (spConcept->CodingSchemeVersion.length())
{
wsprintf(szMsg, "%s%s\n", szMsg,
spConcept->CodingSchemeVersion.operator char *());
}

// Code Value and Code Meaning
wsprintf(szMsg, "%s%s\n%s\n", szMsg,
spConcept->CodeValue.operator char *(),
spConcept->CodeMeaning.operator char *());

// Context Group Local Version
if (spConcept->IsContextGroupLocalVersion)
{
wsprintf(szMsg, "%s%04hd%02hd%02hd\n", szMsg,
spConcept->ContextGroupLocalVersion->Year,
spConcept->ContextGroupLocalVersion->Month,
spConcept->ContextGroupLocalVersion->Day);
}

// Context Group Extension Creator UID
if (spConcept->ContextGroupExtensionCreatorUID.length())
{
wsprintf(szMsg, "%s%s\n", szMsg,
spConcept->ContextGroupExtensionCreatorUID.operator char *());
}

if (bYesNo)
{
lstrcat(szMsg, "\nContinue?");
return (::MessageBox(NULL, szMsg, szTitle, MB_YESNO) == IDYES);
}
else
{
::MessageBox(NULL, szMsg, szTitle, MB_OK);
return TRUE;
}
}

void EnumCodedConcepts(ILEADDicomDSPtr& spDicomDS)
{
VARIANT_BOOL bRet;

// Enumerate the Coded Concepts in the current Context Group (3 possible ways)
#if 1

// One possible way to enumerate the Coded Concepts
bRet = spDicomDS->MoveFirstCodedConcept();
while (bRet)
{
if (!DisplayCodedConcept(spDicomDS, TRUE))
{
break;
}

bRet = spDicomDS->MoveNextCodedConcept ();
}

#elif 0

// Another way to enumerate the Coded Concepts
long lConceptsCount = spDicomDS->GetCodedConceptCount ();
for (long i = 0; i < lConceptsCount; i++)
{
spDicomDS->FindIndexCodedConcept (i);

if (!DisplayCodedConcept(spDicomDS, TRUE))
{
break;
}
}

#elif 0

// A third way to enumerate the Coded Concepts
bRet = spDicomDS->MoveLastCodedConcept ();
while (bRet)
{
if (!DisplayCodedConcept(spDicomDS, TRUE))
{
break;
}

bRet = spDicomDS->MovePrevCodedConcept ();
}

#endif
}


Examining a Digital Signature Example for C++ 6.0 and later

void ExamineSignature(ILEADDicomDSPtr& spDicomDS, long hSignatureItem)
{
char szMsg[1024] = "";

spDicomDS->SetCurrentElement (hSignatureItem);

// Verify the Digital Signature; if hSignatureItem is 0, the method will
// verify all the Digital Signatures that exist in the Data Set
short nRet = spDicomDS->VerifySignature(0);
switch (nRet)
{
case DICOM_SUCCESS:
if (hSignatureItem)
{
::MessageBox(NULL,
"The Digital Signature was verified.",
"Sample",
MB_OK);
}
else
{
::MessageBox(NULL,
"All Digital Signatures were verified (if there are any).",
"Sample",
MB_OK);
return;
}
break;

case DICOM_ERROR_INVALID_SIGNATURE:
if (hSignatureItem)
{
::MessageBox(NULL,
"The Digital Signature is invalid.",
"Sample",
MB_OK);
}
else
{
::MessageBox(NULL,
"At least one Digital Signature is invalid.",
"Sample",
MB_OK);
}
return;

default:
wsprintf(szMsg, "An error occurred [Error: %hd].", nRet);
::MessageBox(NULL, szMsg, "Sample", MB_OK);
return;
}

// The Digital Signature UID
if (spDicomDS->GetSignatureUID() == DICOM_SUCCESS)
{
if (spDicomDS->StringValueCount> 0)
{
wsprintf(szMsg, "Digital Signature UID: %s\n",
spDicomDS->StringValues[0].operator char *());
}
}

// The Digital Signature DateTime
if (spDicomDS->GetSignatureDateTime() == DICOM_SUCCESS)
{
if (spDicomDS->DateTimeValueCount > 0)
{
IDATETIMEVALUEItemPtr spSignatureDateTime = spDicomDS->DateTimeValues [0];

wsprintf(szMsg, "%sDigital Signature DateTime: "
"%02hd/%02hd/%04hd %02hd:%02hd:%02hd.%06ld %c%04ld\n",
szMsg,
spSignatureDateTime->Month,
spSignatureDateTime->Day,
spSignatureDateTime->Year,
spSignatureDateTime->Hours,
spSignatureDateTime->Minutes,
spSignatureDateTime->Seconds,
spSignatureDateTime->Fractions,
(spSignatureDateTime->Offset >= 0) ? '+' : '-',
spSignatureDateTime->Offset);
}
}

// The MAC Calculation Transfer Syntax UID
if (spDicomDS->GetMacTransferSyntax () == DICOM_SUCCESS)
{
if (spDicomDS->StringValueCount > 0)
{
wsprintf(szMsg, "%sMAC Calculation Transfer Syntax UID: %s\n",
szMsg,
spDicomDS->StringValues[0].operator char *());
}
}

// The MAC Algorithm
if (spDicomDS->GetMacAlgorithm() == DICOM_SUCCESS)
{
if (spDicomDS->StringValueCount > 0)
{
wsprintf(szMsg, "%sMAC Algorithm: %s\n",
szMsg,
spDicomDS->StringValues[0].operator char *());
}
}

// The Data Elements Signed
if (spDicomDS->GetSignedElementsCount() > 0)
{
lstrcat(szMsg, "Data Elements Signed: ");

// We will display only one
if (spDicomDS->MoveSignedElement(0) == DICOM_SUCCESS)
{
long lTag = spDicomDS->GetCurrentElement()->Tag;

wsprintf(szMsg, "%s(%04X,%04X), ...",
szMsg,
lTag >> 16,
lTag & 0xFFFF);

spDicomDS->SetCurrentElement (hSignatureItem);
}

lstrcat(szMsg, "\n");
}

lstrcat(szMsg, "\nDo you want to save the Certificate of Signer?");

// Display the information we have about the Digital Signature
if (::MessageBox(NULL, szMsg, "Sample", MB_YESNO) == IDYES)
{
// Save the Certificate of Signer
spDicomDS->SaveCertificate("C:\\CertOfSigner.cer",
DICOM_CERTIFICATE_FORMAT_PEM);
}
}


Examining Annotations (1) Annotations example for Visual C++ 5.0

Examining Annotations (1) example for C++ 5.0 and later

void ExamineAnnotations1(ILEADDicomDSPtr& spPresStateDS)
{
char szMsg[1024];

// Get the attributes that describe the "Presentation State Module"
if (spPresStateDS->GetPresStateAttributes (0) == DICOM_SUCCESS)
{
IDicomPresStateAttributesPtr spPresStateAttribs = spPresStateDS->PresStateAttributes;

// Display some
wsprintf(szMsg,
"Instance Number: %li\n"
"Presentation Label: %s\n"
"Presentation Description: %s\n"
"Presentation Creator’s Name: %s\n",
spPresStateAttribs->InstanceNumber,
spPresStateAttribs->PresLabel.operator char *(),
spPresStateAttribs->PresDescription.operator char *(),
spPresStateAttribs->PresCreatorName.operator char *());

MessageBox(NULL, szMsg, "Presentation State Attributes", MB_OK);
}

_bstr_t sUID;
long lCount, i;

// Display the SOP Instance UIDs of all the images referenced in the
// "Presentation State Module"
if (spPresStateDS->FindFirstPresStateRefSeriesItem () == DICOM_SUCCESS)
{
lstrcpy(szMsg, "");

do
{
lCount = spPresStateDS->GetPresStateImageRefCount ();
for (i = 0; i < lCount; i++)
{
sUID = spPresStateDS->GetPresStateImageRefInstanceUID (i);
wsprintf(szMsg, "%s%s\n", szMsg, sUID.operator char *());
}

wsprintf(szMsg, "%s\n", szMsg);

} while (spPresStateDS->MoveNextPresStateRefSeriesItem () == DICOM_SUCCESS);

MessageBox(NULL, szMsg, "Referenced SOP Instance UID(s)", MB_OK);
}

// Enumerate all the layers defined
lCount = spPresStateDS->LayerCount;
wsprintf(szMsg, "Layer Count: %li", lCount);
MessageBox(NULL, szMsg, "Graphic Layers", MB_OK);
IDicomLayerAttributesPtr spLayerAttribs = spPresStateDS->LayerAttributes;
for (i = 0; i < lCount; i++)
{
// Display some of the attributes
if (spPresStateDS->GetLayerAttributes (i) == DICOM_SUCCESS)
{
wsprintf(szMsg,
"Graphic Layer: %s\n"
"Graphic Layer Order: %li\n"
"Graphic Layer Description: %s",
spLayerAttribs->LayerName.operator char *(),
spLayerAttribs->LayerOrder,
spLayerAttribs->LayerDescription.operator char *());

MessageBox(NULL, szMsg, "Graphic Layer Attributes", MB_OK);
}
}

long lGraphicObjectCount, lTextObjectCount;

IDicomGraphicObjectAttributesPtr spGraphicObjAttribs;
spGraphicObjAttribs = spPresStateDS->GraphicObjectAttributes;

IDicomTextObjectAttributesPtr spTextObjAttribs;
spTextObjAttribs = spPresStateDS->TextObjectAttributes;

// Enumerate all the Graphic Annotation Items
if (spPresStateDS->FindFirstGraphicAnnItem () == DICOM_SUCCESS)
{
do
{
lGraphicObjectCount = spPresStateDS->GetGraphicObjectCount ();
// Or:
//lGraphicObjectCount = spPresStateDS->GetLayerGraphicObjectCount ();

lTextObjectCount = spPresStateDS->GetTextObjectCount ();
// Or:
//lTextObjectCount = spPresStateDS->GetLayerTextObjectCount ();

wsprintf(szMsg,
"Graphic Layer: %s\n"
"Graphic object count: %li\n"
"Text object count: %li\n\n",
spPresStateDS->GetLayerName ().operator char *(),
lGraphicObjectCount,
lTextObjectCount);

lCount = spPresStateDS->GetLayerImageRefCount ();
if (lCount == 0)
{
wsprintf(szMsg,
"%sThe annotations defined in this Item apply to all the "
"images listed in the \"Presentation State Module\".",
szMsg);
}
else
{
wsprintf(szMsg, "%sReferenced SOP Instance UID(s):\n", szMsg);
for (i = 0; i < lCount; i++)
{
sUID = spPresStateDS->GetLayerImageRefInstanceUID (i);
wsprintf(szMsg, "%s %s\n", szMsg, sUID.operator char *());
}
}

MessageBox(NULL, szMsg, "Graphic Annotation Item", MB_OK);

// Enumerate all the graphic objects in the current Item
for (i = 0; i < lGraphicObjectCount; i++)
{
spPresStateDS->GetGraphicObjectAttributes (i);

lstrcpy(szMsg, "Graphic Annotation Units: ");
switch (spGraphicObjAttribs->GetUnits())
{
case DICOM_UNIT_PIXEL:
lstrcat(szMsg, "PIXEL\n");
break;

case DICOM_UNIT_DISPLAY:
lstrcat(szMsg, "DISPLAY\n");
break;
}

lstrcat(szMsg, "Graphic Type: ");
switch (spGraphicObjAttribs->GetType())
{
case DICOM_GRAPHIC_OBJECT_TYPE_POINT:
lstrcat(szMsg, "POINT\n");
break;

case DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE:
lstrcat(szMsg, "POLYLINE\n");
break;

case DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED:
lstrcat(szMsg, "INTERPOLATED\n");
break;

case DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE:
lstrcat(szMsg, "CIRCLE\n");
break;

case DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE:
lstrcat(szMsg, "ELLIPSE\n");
break;
}

if (spGraphicObjAttribs->Filled)
{
lstrcat(szMsg, "Graphic Filled: Y\n");
}
else
{
lstrcat(szMsg, "Graphic Filled: N\n");
}

lCount = spGraphicObjAttribs->PointCount;
wsprintf(szMsg, "%sNumber of Graphic Points: %li\n", szMsg, lCount);

if (lCount < 10)
{
lstrcat(szMsg, "Graphic Data: \n");
for (long j = 0; j < lCount; j++)
{
sprintf(szMsg, "%s X%i, Y%i = %.2f, %.2f\n", szMsg,
j + 1, j + 1,
spGraphicObjAttribs->PointsX [j],
spGraphicObjAttribs->PointsY [j]);
}
}

MessageBox(NULL, szMsg, "Graphic Annotation Object", MB_OK);
}

// Enumerate all the text objects in the current Item
for (i = 0; i < lTextObjectCount; i++)
{
spPresStateDS->GetTextObjectAttributes (i);

if (spTextObjAttribs->BoundingBoxUsed)
{
wsprintf(szMsg, "Unformatted Text Value: %s\n",
spTextObjAttribs->TextValue.operator char *());

lstrcat(szMsg, "Bounding Box Annotation Units: ");
switch(spTextObjAttribs->GetBoundingBoxUnits ())
{
case DICOM_UNIT_PIXEL:
lstrcat(szMsg, "PIXEL\n");
break;

case DICOM_UNIT_DISPLAY:
lstrcat(szMsg, "DISPLAY\n");
break;
}

sprintf(szMsg, "%sBounding Box Top Left Hand Corner: %.2f, %.2f\n",
szMsg,
spTextObjAttribs->BoundingBoxTLHCornerX,
spTextObjAttribs->BoundingBoxTLHCornerY);

sprintf(szMsg, "%sBounding Box Bottom Right Hand Corner: %.2f, %.2f\n",
szMsg,
spTextObjAttribs->BoundingBoxBRHCornerX,
spTextObjAttribs->BoundingBoxBRHCornerY);

lstrcat(szMsg, "Bounding Box Text Horizontal Justification: ");
switch (spTextObjAttribs->GetBoundingBoxTextJustification ())
{
case DICOM_TEXT_JUSTIFICATION_LEFT:
lstrcat(szMsg, "LEFT\n");
break;

case DICOM_TEXT_JUSTIFICATION_RIGHT:
lstrcat(szMsg, "RIGHT\n");
break;

case DICOM_TEXT_JUSTIFICATION_CENTER:
lstrcat(szMsg, "CENTER\n");
break;
}
}
else
{
wsprintf(szMsg, "Unformatted Text Value: %s\n",
spTextObjAttribs->TextValue.operator char *());

lstrcat(szMsg, "Anchor Point Annotation Units: ");
switch (spTextObjAttribs->GetAnchorPointUnits ())
{
case DICOM_UNIT_PIXEL:
lstrcat(szMsg, "PIXEL\n");
break;

case DICOM_UNIT_DISPLAY:
lstrcat(szMsg, "DISPLAY\n");
break;
}

sprintf(szMsg, "%sAnchor Point: %.2f, %.2f\n",
szMsg,
spTextObjAttribs->AnchorPointX,
spTextObjAttribs->AnchorPointY);

if (spTextObjAttribs->AnchorPointVisible)
{
lstrcat(szMsg, "Anchor Point Visibility: Y");
}
else
{
lstrcat(szMsg, "Anchor Point Visibility: N");
}
}

MessageBox(NULL, szMsg, "Text Annotation Object", MB_OK);
}

} while (spPresStateDS->MoveNextGraphicAnnItem () == DICOM_SUCCESS);
}
}


Examining Annotations (2) Annotations example for Visual C++ 5.0

Examining Annotations (2) example for C++ 5.0 and later

void ExamineAnnotations2(ILEADDicomDSPtr& spPresStateDS)
{
_bstr_t sRefSOPInstanceUID;

// Pick one of the images referenced in the "Presentation State Module" and
// get its SOP Instance UID
if (spPresStateDS->FindFirstPresStateRefSeriesItem () == DICOM_SUCCESS)
{
if (spPresStateDS->GetPresStateImageRefCount () > 0)
{
sRefSOPInstanceUID = spPresStateDS->GetPresStateImageRefInstanceUID (0);
}
}

// Find the SOP Class UID of that image
if (spPresStateDS->FindPresStateRefImageItem(sRefSOPInstanceUID) == DICOM_SUCCESS)
{
if (spPresStateDS->MoveChildElement () == 0)
{
if (spPresStateDS->FindFirstElement (TAG_REFERENCED_SOP_CLASS_UID, VARIANT_TRUE) == 0)
{
if (spPresStateDS->GetStringValue (0, 1) == 0)
{
MessageBox(NULL, spPresStateDS->StringValues [0],
"Referenced SOP Class UID", MB_OK);
}
}
}
}

// Remove the reference to that image from the "Presentation State Module"
spPresStateDS->RemovePresStateImageRef(sRefSOPInstanceUID);

char szMsg[1024];

// Pick a Graphic Annotation Item
if (spPresStateDS->FindFirstGraphicAnnItem () == DICOM_SUCCESS)
{
long hGraphicAnnotationItem;
hGraphicAnnotationItem = spPresStateDS->GetCurrentElement()->hElement;

// Pick an image reference
if (spPresStateDS->GetLayerImageRefCount () > 0)
{
sRefSOPInstanceUID = spPresStateDS->GetLayerImageRefInstanceUID (0);
spPresStateDS->FindLayerRefImageItem(sRefSOPInstanceUID);

// Display one of the attributes of the Referenced Image Item
if (spPresStateDS->MoveChildElement () == 0)
{
if (spPresStateDS->FindFirstElement (TAG_REFERENCED_SOP_CLASS_UID, VARIANT_TRUE) == 0)
{
if (spPresStateDS->GetStringValue (0, 1) == 0)
{
wsprintf(szMsg, "Referenced SOP Class UID: %s",
spPresStateDS->StringValues [0].operator char *());
MessageBox(NULL, szMsg, "Referenced Image Item", MB_OK);
}
}
}

spPresStateDS->SetCurrentElement (hGraphicAnnotationItem);

// Remove the image reference
spPresStateDS->RemoveLayerImageRef (sRefSOPInstanceUID);

// Remove all references to images that are listed in this Graphic Annotation
// Item (this way, the annotations defined by this Item will be applied to all
// the images listed in the "Presentation State Module")
spPresStateDS->RemoveAllLayerImageRefs();
}

_bstr_t sGraphicLayer;
sGraphicLayer = spPresStateDS->GetLayerName ();

// Display some of the layer's attributes
spPresStateDS->GetLayerAttributes (spPresStateDS->GetLayerIndex (sGraphicLayer));
IDicomLayerAttributesPtr spLayerAttribs = spPresStateDS->LayerAttributes;
wsprintf(szMsg,
"Graphic Layer: %s\n"
"Graphic Layer Order: %li\n"
"Graphic Layer Description: %s\n",
spLayerAttribs->LayerName.operator char *(),
spLayerAttribs->LayerOrder,
spLayerAttribs->LayerDescription.operator char *());
MessageBox(NULL, szMsg, "Graphic Layer Attributes", MB_OK);

// Change the layer of this Graphic Annotation Item (the specified new
// layer should already be defined in the "Graphic Layer Module")
spPresStateDS->SetLayerName ("ANOTHER_LAYER");

// Pick a graphic annotation object
if (spPresStateDS->GetGraphicObjectCount () > 0)
{
spPresStateDS->FindGraphicObjectItem (0);

// Display one of the attributes of this object
if (spPresStateDS->MoveChildElement () == 0)
{
// Graphic Type (0070,0023)
if (spPresStateDS->FindFirstElement (0x00700023, VARIANT_TRUE) == 0)
{
if (spPresStateDS->GetStringValue (0, 1) == 0)
{
wsprintf(szMsg, "Graphic Type: %s",
spPresStateDS->StringValues [0].operator char *());
MessageBox(NULL, szMsg, "Graphic Annotation Object", MB_OK);
}
}
}

spPresStateDS->SetCurrentElement (hGraphicAnnotationItem);

// Remove the object
spPresStateDS->RemoveGraphicObject(0);

// Remove all the graphic annotation objects defined by this Graphic
// Annotation Item
spPresStateDS->RemoveAllGraphicObjects();
// Or:
//spPresStateDS->RemoveLayerGraphicObjects();
}

// Pick a text annotation object
if (spPresStateDS->GetTextObjectCount () > 0)
{
spPresStateDS->FindTextObjectItem (0);

// Display one of the attributes of this object
if (spPresStateDS->MoveChildElement () == 0)
{
// Unformatted Text Value (0070,0006)
if (spPresStateDS->FindFirstElement (0x00700006, VARIANT_TRUE) == 0)
{
if (spPresStateDS->GetStringValue (0, 1) == 0)
{
wsprintf(szMsg, "Unformatted Text Value: %s",
spPresStateDS->StringValues [0].operator char *());
MessageBox(NULL, szMsg, "Text Annotation Object", MB_OK);
}
}
}

spPresStateDS->SetCurrentElement (hGraphicAnnotationItem);

// Remove the object
spPresStateDS->RemoveTextObject(0);

// Remove all the text annotation objects defined by this Graphic
// Annotation Item
spPresStateDS->RemoveAllTextObjects ();
// Or:
//spPresStateDS->RemoveLayerTextObjects ();
}
}

// Remove all references to images that are listed in all the Graphic Annotation
// Items (this way, the annotations defined by all the Items will be applied to all
// the images listed in the "Presentation State Module")
spPresStateDS->RemoveAllLayersImageRefs();

// Remove all references to images from the "Presentation State Module"
spPresStateDS->RemoveAllPresStateImageRefs ();

// Pick one of the layers
if (spPresStateDS->LayerCount > 0)
{
_variant_t LayerIndex(short(0));

spPresStateDS->FindLayerItem(LayerIndex);

// Display one of the attributes of this layer
if (spPresStateDS->MoveChildElement () == 0)
{
// Graphic Layer (0070,0002)
if (spPresStateDS->FindFirstElement (0x00700002, VARIANT_TRUE) == 0)
{
if (spPresStateDS->GetStringValue (0, 1) == 0)
{
wsprintf(szMsg, "Graphic Layer: %s",
spPresStateDS->StringValues [0].operator char *());
MessageBox(NULL, szMsg, "Graphic Layer", MB_OK);
}
}
}

// Remove the layer
spPresStateDS->RemoveLayer(LayerIndex, VARIANT_TRUE);

// Remove all the layers defined in the "Graphic Layer Module"
spPresStateDS->RemoveAllLayers(VARIANT_TRUE);
}
}


Extracting a Wave Stream From a Data Set Example for C++ 6.0 and later

BOOL GetWaveFileFromDataSet(ILEADDicomDSPtr& spDataSet, LPCSTR pszResultingWaveFilename)
{
// Do we have any waveforms in the Data Set?
if (spDataSet->GetWaveformGroupCount () < 1)
{
return FALSE;
}

IDicomWaveformGroupPtr spAudioWaveformGroup(__uuidof(DicomWaveformGroup));
spAudioWaveformGroup->EnableMethodErrors = VARIANT_FALSE;

// Extract the first waveform group
if (spDataSet->GetWaveformGroup (0, spAudioWaveformGroup) != DICOM_SUCCESS)
{
return FALSE;
}

// Extract the wave stream from the waveform group and save it to disk
if (spAudioWaveformGroup->SaveAudio (pszResultingWaveFilename, 0) != DICOM_SUCCESS)
{
return FALSE;
}

return TRUE;
}


FindFirstElement Example for C++ 6.0 and later

IDicomDSElementPtr pCurrentElement=NULL;
ILEADDicomTagPtr pCurrentTag=NULL;
short nRet;

m_LEADRasterView1.ShowWindow(SW_SHOW);
m_List1.ShowWindow(SW_HIDE);

//Find the first image element and display it
m_pLEADDicomDS->EnableMethodErrors = FALSE;

//move to first element in Data Set
m_pLEADDicomDS->MoveFirstElement(FALSE);

nRet = m_pLEADDicomDS->FindFirstElement(TAG_PIXEL_DATA, FALSE);
pCurrentElement = m_pLEADDicomDS->GetCurrentElement();
//find each image
while(nRet == 0)
{
m_pLEADDicomDS->GetBitmapValue(0, 0, ORDER_RGB, 0);
m_LEADRasterView1.GetRaster().SetBitmap(m_pLEADDicomDS->GetBitmap());
m_pLEADDicomDS->Bitmap = 0;
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
pCurrentTag = m_pLEADDicomDS->GetCurrentTag();
AfxMessageBox("Element: " + pCurrentTag->GetName());
nRet = m_pLEADDicomDS->FindNextElement(FALSE);
}
AfxMessageBox("No More Images");


FindIndexModule Example for C++ 6.0 and later

long lCount;
CString szOut;
long x;
IDicomDSModulePtr pCurrentModule=NULL;
IDicomIODItemPtr pCurrentIOD=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
lCount = m_pLEADDicomDS->GetModuleCount();
m_pLEADDicomDS->GetInfoDS();
szOut.Format("Found %ld Modules\n", lCount);
for(x=0; x<lCount; x++)
{
m_pLEADDicomDS->FindIndexModule(x);
pCurrentModule = m_pLEADDicomDS->GetCurrentModule();
m_pLEADDicomDS->FindModuleIOD(m_pLEADDicomDS->GetInfoClass(),
pCurrentModule->GetModule());
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
BSTR bstr = pCurrentIOD->GetName();
CString cs = bstr;
SysFreeString(bstr);
szOut = szOut + "Module " + cs + "\n";
}
AfxMessageBox(szOut);
m_pLEADDicomDS->EnableMethodErrors = TRUE;


FindLastElement Example for C++ 6.0 and later

IDicomDSElementPtr pCurrentElement=NULL;
ILEADDicomTagPtr pCurrentTag=NULL;
short nRet;

m_LEADRasterView1.ShowWindow(SW_SHOW);
m_List1.ShowWindow(SW_HIDE);

//Find the last image element and display it
m_pLEADDicomDS->EnableMethodErrors = FALSE;

//move to last element in Data Set
m_pLEADDicomDS->MoveLastElement(FALSE);

nRet = m_pLEADDicomDS->FindLastElement(TAG_PIXEL_DATA, FALSE);
pCurrentElement = m_pLEADDicomDS->GetCurrentElement();

//find each image
while(nRet == 0)
{
m_pLEADDicomDS->GetBitmapValue(0, 0, ORDER_RGB, 0);
m_LEADRasterView1.GetRaster().SetBitmap(m_pLEADDicomDS->GetBitmap());
m_pLEADDicomDS->Bitmap = 0;
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
pCurrentTag = m_pLEADDicomDS->GetCurrentTag();
AfxMessageBox("Element: " + pCurrentTag->GetName());
nRet = m_pLEADDicomDS->FindPrevElement(FALSE);
}
AfxMessageBox("No More Images");


FindModule Example for C++ 6.0 and later

short nRet;
IDicomIODItemPtr pCurrentIOD=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
nRet = m_pLEADDicomDS->FindModule(DICOM_MODULE_NM_TOMO_ACQUISITION);
if(nRet != 0)
AfxMessageBox("Not Found");
else
{
m_pLEADDicomDS->GetInfoDS();
m_pLEADDicomDS->FindModuleIOD(m_pLEADDicomDS->GetInfoClass(), DICOM_MODULE_NM_TOMO_ACQUISITION);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox("Found Module " + pCurrentIOD->GetName());
}
m_pLEADDicomDS->EnableMethodErrors = TRUE;


FindModuleIOD Example for Visual C++ 6.0

FindModuleIOD Example for C++ 6.0 and later

IDicomIODItemPtr pCurrentIOD=NULL;

//Find a Module
m_pLEADDicomDS->FindModuleIOD(DICOM_CLASS_CR_IMAGE_STORAGE, DICOM_MODULE_PATIENT);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName());

m_pLEADDicomDS->SetIODName("New IOD Name #1");
m_pLEADDicomDS->SetIODDescription("New IOD Description #1");
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName() + "\n" + pCurrentIOD->GetDescription());

//Find a Class
m_pLEADDicomDS->FindClassIOD(DICOM_CLASS_PRINT_QUEUE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName());

m_pLEADDicomDS->SetIODName("New IOD Name #2");
m_pLEADDicomDS->SetIODDescription("New IOD Description #2");
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName() + "\n" + pCurrentIOD->GetDescription());


FindPresentationAbstract Example for C++ 6.0 and later

{
int nID;
long hPDU;

//get the associate object for this client computer's connection
hPDU = m_pLEADDicomNet->GetAssociate(m_pLEADDicomNet->GethNet());

//find the id for UID_VERIFICATION_CLASS within this association
//if it is supported by the association
nID = m_pLEADDicomNet->FindPresentationAbstract(hPDU, UID_VERIFICATION_CLASS);
if (nID == 0)
AfxMessageBox("Not Supported by this association!");
else
{
CString strMsg;
strMsg.Format("Found[%d]", nID);
AfxMessageBox(strMsg);
}
}


GetAgeValue Example for C++ 6.0 and later

long lCount;
short nRet;
IDicomDSElementPtr pCurrentElement=NULL;
IAGEVALUEItemPtr pAgeValue=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement(FALSE);
m_pLEADDicomDS->MoveRootElement();
m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert a new element for the Age Values
nRet = m_pLEADDicomDS->InsertElement(FALSE, TAG_PATIENT_AGE, VR_AS, FALSE, 0);

//insert an Age value into the element
m_pLEADDicomDS->AgeValueCount = 1;
pAgeValue = m_pLEADDicomDS->GetAgeValues(0);
pAgeValue->Number = 21;
pAgeValue->Reference = 'Y';

//set the age
nRet = m_pLEADDicomDS->SetAgeValue(1);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}

m_pLEADDicomDS->AgeValueCount = 0; //free the vale

//get the value count
lCount = m_pLEADDicomDS->GetValueCount();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

//get the value
nRet = m_pLEADDicomDS->GetAgeValue (0, lCount);
//display the value
pAgeValue = m_pLEADDicomDS->GetAgeValues (0);
szOut.Format("Number: %d", pAgeValue->GetNumber());
m_List1.AddString(szOut);
szOut.Format("Reference: %c", (char)pAgeValue->GetReference());
m_List1.AddString(szOut);
AfxMessageBox("wait");


GetApplication Example for C++ 6.0 and later

{
CString strMsg;

//Create the associate
m_pLEADDicomNet->CreateAssociate(TRUE);

//Getthe current Application Context
_bstr_t sApplicationContext = m_pLEADDicomNet->GetApplication(m_pLEADDicomNet->GethPDU());
strMsg.Format("Current Application Context: %s", (char *)sApplicationContext );
AfxMessageBox(strMsg);

//change it
_bstr_t sApplicationContextNew = "9.9.999.99999.9.9.9.9";
m_pLEADDicomNet->SetApplication (m_pLEADDicomNet->GethPDU(), sApplicationContextNew);

sApplicationContext = m_pLEADDicomNet->GetApplication(m_pLEADDicomNet->GethPDU());
strMsg.Format("New Application Context %s", (char *)sApplicationContext);
AfxMessageBox(strMsg);

//Free associate
m_pLEADDicomNet->FreeAssociate( m_pLEADDicomNet->GethPDU());
}


GetAuthenticationAlgorithmTLS Example for C++ 6.0 and later

{
if(m_pLEADDicomNet->GetAuthenticationAlgorithmTLS(m_pLEADDicomNet->GethNet (), DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) == DICOM_MUTUALAUTH_RSA)
AfxMessageBox("Mutual authentication in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MUTUALAUTH_RSA");
}


GetBinaryValue Example for C++ 6.0 and later

void CDicomDlg::TestProc1()
{
long lCount;
long x;
short nRet;
short nLen;
short byteVal;
CString szBytes;
CString szByte;
IDicomDSElementPtr pCurrentElement=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement(FALSE);
m_pLEADDicomDS->MoveRootElement();
m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert some bytes into the element
szBytes = "This is a Test 1234!";
nLen = szBytes.GetLength();
m_pLEADDicomDS->BinaryValueCount = nLen;
for(x=0; x<nLen; x++)
{
byteVal = (short)szBytes.GetAt(x);
m_pLEADDicomDS->BinaryValues[x] = byteVal;
}
//set the bytes
nRet = m_pLEADDicomDS->SetBinaryValue(nLen);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
m_pLEADDicomDS->BinaryValueCount = 0; //free the values

//get the byte count
pCurrentElement = m_pLEADDicomDS->GetCurrentElement();
lCount = pCurrentElement->GetLength();
CString szOut;
szOut.Format("There are %ld bytes!", lCount);
AfxMessageBox(szOut);

//get the bytes
nRet = m_pLEADDicomDS->GetBinaryValue (lCount);
if(nRet == 0)
{
for(x=0; x<m_pLEADDicomDS->GetBinaryValueCount (); x++)
{
//display each byte as a char separated by a space
szOut.Format("%c", (char)m_pLEADDicomDS->GetBinaryValues (x));
m_List1.AddString(szOut);
}
}
AfxMessageBox("wait");
}


GetBitmapCount Example for C++ 6.0 and later

void CDicomDlg::TestProcBitmap()
{
long lCount;
CString szOut;

m_LEADRasterView1.ShowWindow(SW_SHOW);
m_List1.ShowWindow(SW_HIDE);
m_pLEADDicomDS->FindFirstElement(TAG_PIXEL_DATA, FALSE);
lCount = m_pLEADDicomDS->GetBitmapCount();
if(lCount == 1)
{
//get the bitmap
m_pLEADDicomDS->GetBitmapValue(0, 0, ORDER_RGB, 0);
m_LEADRasterView1.GetRaster().SetBitmap(m_pLEADDicomDS->GetBitmap());
m_pLEADDicomDS->Bitmap = 0; //free the imae
}
else if(lCount > 1)
{
//get the bitmap list
m_pLEADDicomDS->GetBitmapListValue(0, lCount, 0, ORDER_RGB, 0);
m_LEADRasterView1.GetRaster().SetBitmapList(m_pLEADDicomDS->BitmapList);
szOut.Format("There are %ld Images", lCount);
AfxMessageBox(szOut);
m_pLEADDicomDS->BitmapList = 0; //free the imae
//play the animation
m_LEADRasterView1.SetAnimationLoop(TRUE);
m_LEADRasterView1.SetAnimationEnable(TRUE);
}
else
AfxMessageBox("No Image!");

AfxMessageBox("wait");
}


GetCharValue Example for C++ 6.0 and later

void CDicomDlg::TestProc2()
{
long lCount;
long x;
short nRet;
short nLen;
short byteVal;
CString szChars;
CString szChar;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement(FALSE);
m_pLEADDicomDS->MoveRootElement();
m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert a new element for the Char Values
m_pLEADDicomDS->InsertElement(FALSE, TAG_PIXEL_DATA, VR_OB, FALSE, 0);

m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert some char values into the element
szChars = "This is a Test 1234!";
nLen = szChars.GetLength();
m_pLEADDicomDS->CharValueCount = nLen;
for(x=0; x<nLen; x++)
{
byteVal = (short)szChars.GetAt(x);
m_pLEADDicomDS->CharValues[x] = byteVal;
}
//set the chars
nRet = m_pLEADDicomDS->SetCharValue(nLen);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
m_pLEADDicomDS->CharValueCount = 0; //free the values

//get the value count
lCount = m_pLEADDicomDS->GetValueCount ();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

//get the values
nRet = m_pLEADDicomDS->GetCharValue (0, lCount);
if(nRet == 0)
{
for(x=0; x<m_pLEADDicomDS->GetCharValueCount (); x++)
{
//display each value separated by a '.'
szOut.Format("%c", (char)m_pLEADDicomDS->GetCharValues(x));
m_List1.AddString(szOut);
}
}
AfxMessageBox("wait");
}


GetConvertValue Example for C++ 6.0 and later

short nRet;
long lCount;
long x;
CString strVal;

//add some values to the element
//note, this will only work for elements that have a VR that support multiple values
m_pLEADDicomDS->EnableMethodErrors = FALSE;
m_pLEADDicomDS->StringValueCount = 3;
BSTR bstr;
strVal.Format("%f", 3.45);
bstr = strVal.AllocSysString();
m_pLEADDicomDS->StringValues[0] = bstr;
SysFreeString(bstr);

strVal.Format("%f", 9.99);
bstr = strVal.AllocSysString();
m_pLEADDicomDS->StringValues [1] = bstr;
SysFreeString(bstr);

strVal.Format("%f", 1.11);
bstr = strVal.AllocSysString();
m_pLEADDicomDS->StringValues [2] = bstr;
SysFreeString(bstr);

nRet = m_pLEADDicomDS->SetConvertValue();
//free the current values
m_pLEADDicomDS->StringValueCount = 0;

//now get the values and display them
nRet = m_pLEADDicomDS->GetConvertValue ();
if(nRet == 0)
{
lCount = m_pLEADDicomDS->GetStringValueCount();
m_List1.ResetContent();
for(x=0; x<lCount; x++)
{
//display each value on a separate line
m_List1.AddString(m_pLEADDicomDS->GetStringValues (x));
}
}


GetDateTimeValue Example for C++ 6.0 and later

Currently no DICOM Tags support the VR that this value requires.


GetDateValue Example for C++ 6.0 and later

void CDicomDlg::TestProc9()
{
long lCount;
short nRet;
IDATEVALUEItemPtr pDateValue=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement(FALSE);
m_pLEADDicomDS->MoveRootElement();

//insert a new element for the Date Values
nRet = m_pLEADDicomDS->InsertElement(FALSE, TAG_PATIENT_BIRTH_DATE, VR_DA, FALSE, 0);

//insert an Date value into the element
m_pLEADDicomDS->DateValueCount = 1;
pDateValue = m_pLEADDicomDS->GetDateValues(0);
pDateValue->Year = 1971;
pDateValue->Month = 12;
pDateValue->Day = 25;

//set the Date
nRet = m_pLEADDicomDS->SetDateValue (1);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}

m_pLEADDicomDS->DateValueCount= 0; //free the value

//get the value count
lCount = m_pLEADDicomDS->GetValueCount ();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

//get the value
nRet = m_pLEADDicomDS->GetDateValue (0, lCount);
//display the value
pDateValue = m_pLEADDicomDS->GetDateValues (0);
szOut.Format("Year: %d\nMonth: %d\nDay: %d", pDateValue->GetYear(),pDateValue->GetMonth(),pDateValue->GetDay());
AfxMessageBox(szOut);
}


GetDoubleValue Example for C++ 6.0 and later

void CDicomDlg::TestProc6()
{
long lCount;
long x;
short nRet;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement(FALSE);
m_pLEADDicomDS->MoveRootElement();
m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert a new element for the Double Values
nRet = m_pLEADDicomDS->InsertElement(FALSE, TAG_REFERENCE_PIXEL_PHYSICAL_VALUE_X, VR_FD, FALSE, 0);

m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert some Double values into the element
m_pLEADDicomDS->DoubleValueCount = 5;
for(x=0; x<5; x++)
{
m_pLEADDicomDS->DoubleValues[x] = 10 * x * 199.77;
}
//set the Doubles
nRet = m_pLEADDicomDS->SetDoubleValue (5);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
m_pLEADDicomDS->DoubleValueCount = 0; //free the values

//get the value count
lCount = m_pLEADDicomDS->GetValueCount ();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

//get the values
nRet = m_pLEADDicomDS->GetDoubleValue(0, lCount);
if(nRet == 0)
{
for(x=0; x<m_pLEADDicomDS->GetDoubleValueCount (); x++)
{
//display each value separated by a '.'
szOut.Format("%f", m_pLEADDicomDS->GetDoubleValues(x));
m_List1.AddString(szOut);
}
}
AfxMessageBox("wait");
}


GetElementLevel Example for C++ 6.0 and later

long x;
long lLevel;
IDicomDSElementPtr pCurrentElement=NULL;
ILEADDicomTagPtr pCurrentTag=NULL;

//Navigate the Data Set as a List, not as a Tree
//Move to the 20th element, and then find that element's level in the Tree
m_pLEADDicomDS->EnableMethodErrors = FALSE;

//move to first element in Data Set
m_pLEADDicomDS->MoveFirstElement(FALSE);

//move to the 20th element
for(x=2; x<20; x++)
m_pLEADDicomDS->MoveNextElement(FALSE);

pCurrentElement = m_pLEADDicomDS->GetCurrentElement();
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
lLevel = m_pLEADDicomDS->GetElementLevel();
pCurrentTag = m_pLEADDicomDS->GetCurrentTag();
CString szLevel;
szLevel.Format("%ld", lLevel);
AfxMessageBox("Element: " + pCurrentTag->GetName() + " at level " + szLevel);


GetEncryptionAlgorithmTLS Example for C++ 6.0 and later

{
if(m_pLEADDicomNet->GetEncryptionAlgorithmTLS(m_pLEADDicomNet->GethNet (), DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) == DICOM_CRYPT_3DES)
AfxMessageBox("Encryption in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_CRYPT_3DES");
}


GetEncryptKeyLengthTLS Example for C++ 6.0 and later

{
CString strMsg;
strMsg.Format("Effective key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is %ld", m_pLEADDicomNet->GetEncryptKeyLengthTLS(m_pLEADDicomNet->GethNet (), DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA));
AfxMessageBox(strMsg);
}


GetExtendedData Example for C++ 6.0 and later

GetExtendedData Example for C++ 6.0 or later

{
long x;
long n;
CString szOut;
CString szTemp;
VARIANT ExtData;
long lUBound;
char * pData=NULL;

BYTE b[5]={0,1,1,0,1};
SAFEARRAY FAR *psa;
SAFEARRAYBOUND rgsabound[1];

//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate(TRUE);
//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate(m_pLEADDicomNet->GethPDU());

VariantInit(&ExtData);
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = 5;

psa = SafeArrayCreate(VT_UI1, 1, rgsabound);
if (psa != NULL)
{
SafeArrayLock(psa);
memcpy(psa->pvData, b, 5);
SafeArrayUnlock(psa);
V_VT(&ExtData) = (VT_ARRAY | VT_UI1);
V_ARRAY(&ExtData) = psa;
m_pLEADDicomNet->SetExtendedData(m_pLEADDicomNet->GethPDU(), 1, &ExtData, 5);
SafeArrayDestroy(psa);
}
VariantClear(&ExtData);

//now, display the information

n = m_pLEADDicomNet->GetExtendedDataLength(m_pLEADDicomNet->GethPDU(), 1);
szOut = "Extended Data\n";

COleVariant VData = m_pLEADDicomNet->GetExtendedData(m_pLEADDicomNet->GethPDU(), 1);
psa = V_ARRAY(&VData);
SafeArrayGetUBound(psa, 1, &lUBound);
SafeArrayAccessData(psa, (void HUGEP**)&pData);
CString strData;
for(x=0; x<n; x++)
{
szTemp.Format("%d = %d\n", x, pData[x]);
szOut = szOut + szTemp;
}
AfxMessageBox(szOut);
SafeArrayUnaccessData(psa);
}


GetFloatValue Example for C++ 6.0 and later

void CDicomDlg::TestProc5()
{
long lCount;
long x;
short nRet;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement(FALSE);
m_pLEADDicomDS->MoveRootElement();
m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert a new element for the Float Values
nRet = m_pLEADDicomDS->InsertElement(FALSE, TAG_TABLE_OF_PARAMETER_VALUES, VR_FL, FALSE, 0);

m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert some float values into the element
m_pLEADDicomDS->FloatValueCount = 5;
for(x=0; x<5; x++)
{
m_pLEADDicomDS->FloatValues[x] = x*1.99f;
}
//set the floats
nRet = m_pLEADDicomDS->SetFloatValue(5);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
m_pLEADDicomDS->FloatValueCount = 0; //free the values

//get the value count
lCount = m_pLEADDicomDS->GetValueCount ();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

//get the values
nRet = m_pLEADDicomDS->GetFloatValue (0, lCount);
if(nRet == 0)
{
for(x=0; x<m_pLEADDicomDS->GetFloatValueCount(); x++)
{
//display each value separated by a '.'
szOut.Format("%f", m_pLEADDicomDS->GetFloatValues(x));
m_List1.AddString(szOut);
}
}
AfxMessageBox("wait");
}


GetImageInformation Example for C++ 6.0 and later

CString szMsg;
CString szTmp;
IDicomImageInfoPtr pImageInfo=NULL;

m_pLEADDicomDS->FindFirstElement(TAG_PIXEL_DATA, FALSE);
m_pLEADDicomDS->GetImageInformation(0);
pImageInfo = m_pLEADDicomDS->GetImageInfo();

szTmp.Format("Compression: %ld\n", pImageInfo->GetCompression());
szMsg = szTmp;
szTmp.Format("Photometric: %ld - %s\n", pImageInfo->GetPhotometric(), pImageInfo->GetPhotometricString());
szMsg = szMsg + szTmp;
szTmp.Format("Rows x Columns: %ld x %ld\n", pImageInfo->GetRows(), pImageInfo->GetColumns());
szMsg = szMsg + szTmp;
szTmp.Format("Bits Allocated: %ld\n", pImageInfo->GetBitsAllocated());
szMsg = szMsg + szTmp;
szTmp.Format("Bits Stored: %ld\n", pImageInfo->GetBitsStored());
szMsg = szMsg + szTmp;
szTmp.Format("High Bit: %ld\n", pImageInfo->GetHighBit());
szMsg = szMsg + szTmp;
szTmp.Format("Pixel Representation: %ld\n", pImageInfo->GetPixelRepresentation());
szMsg = szMsg + szTmp;
szTmp.Format("Planar Configuration: %ld\n", pImageInfo->GetPlanarConfiguration());
szMsg = szMsg + szTmp;
szTmp.Format("ResolutionX: %ld\n", pImageInfo->GetResolutionX());
szMsg = szMsg + szTmp;
szTmp.Format("ResolutionY: %ld\n", pImageInfo->GetResolutionY());
szMsg = szMsg + szTmp;
szTmp.Format("SmallestImagePixelValue: %ld\n", pImageInfo->GetSmallestImagePixelValue());
szMsg = szMsg + szTmp;
szTmp.Format("SmallestImagePixelValueFlag: %ld\n", pImageInfo->GetSmallestImagePixelValueFlag());
szMsg = szMsg + szTmp;
szTmp.Format("LargestImagePixelValue: %ld\n", pImageInfo->GetLargestImagePixelValue());
szMsg = szMsg + szTmp;
szTmp.Format("LargestImagePixelValueFlag: %ld\n", pImageInfo->GetLargestImagePixelValueFlag());
szMsg = szMsg + szTmp;
szTmp.Format("RedEntries: %ld\n", pImageInfo->GetRedEntries());
szMsg = szMsg + szTmp;
szTmp.Format("RedFirst: %ld\n", pImageInfo->GetRedFirst());
szMsg = szMsg + szTmp;
szTmp.Format("RedBits: %ld\n", pImageInfo->GetRedBits());
szMsg = szMsg + szTmp;
szTmp.Format("GreenEntries: %ld\n", pImageInfo->GetGreenEntries());
szMsg = szMsg + szTmp;
szTmp.Format("GreenFirst: %ld\n", pImageInfo->GetGreenFirst());
szMsg = szMsg + szTmp;
szTmp.Format("GreenBits: %ld\n", pImageInfo->GetGreenBits());
szMsg = szMsg + szTmp;
szTmp.Format("BlueEntries: %ld\n", pImageInfo->GetBlueEntries());
szMsg = szMsg + szTmp;
szTmp.Format("BlueFirst: %ld\n", pImageInfo->GetBlueFirst());
szMsg = szMsg + szTmp;
szTmp.Format("BlueBits: %ld\n", pImageInfo->GetBlueBits());
szMsg = szMsg + szTmp;
szTmp.Format("PaletteEntries: %ld\n", pImageInfo->GetPaletteEntries());
szMsg = szMsg + szTmp;
szTmp.Format("PaletteFirst: %ld\n", pImageInfo->GetPaletteFirst());
szMsg = szMsg + szTmp;
szTmp.Format("BitsPerPixel: %ld\n", pImageInfo->GetBitsPerPixel());
szMsg = szMsg + szTmp;
szTmp.Format("Gray: %ld\n", pImageInfo->GetGray());
szMsg = szMsg + szTmp;
szTmp.Format("Frames: %ld\n", pImageInfo->GetFrames());
szMsg = szMsg + szTmp;

AfxMessageBox(szMsg);


GetInfoDS Example for C++ 6.0 and later

CString szClass;
CString szFlags;
short nRet;
IDicomIODItemPtr pIOD=NULL;
CString szOut;

m_pLEADDicomDS->EnableMethodErrors = FALSE;

m_pLEADDicomDS->GetInfoDS();
nRet = m_pLEADDicomDS->FindClassIOD(m_pLEADDicomDS->GetInfoClass());
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
pIOD = m_pLEADDicomDS->GetCurrentIOD();

BSTR bstr = pIOD->GetName();
szClass = bstr;
SysFreeString(bstr);
szFlags.Format("%X", m_pLEADDicomDS->GetInfoFlags());
szOut.Format("Class: %s\nFlags: %s", szClass, szFlags);
AfxMessageBox(szOut);


GetIntegrityAlgorithmTLS Example for C++ 6.0 and later

{
if(m_pLEADDicomNet->GetIntegrityAlgorithmTLS(m_pLEADDicomNet->GethNet (), DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) == DICOM_MAC_SHA1)
AfxMessageBox("Message authentication code in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1");
}


GetKeyExchangeAlgorithmTLS Example for C++ 6.0 and later

{
if(m_pLEADDicomNet->GetKeyExchangeAlgorithmTLS(m_pLEADDicomNet->GethNet (), DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) == DICOM_MAC_SHA1)
AfxMessageBox("Key exchange in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1");
}


GetLongValue Example for C++ 6.0 and later

void CDicomDlg::TestProc4()
{
long lCount;
long x;
short nRet;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->ResetDS ();
m_pLEADDicomDS->FindTag(TAG_HISTOGRAM_DATA);
nRet = m_pLEADDicomDS->InsertElement ( FALSE,
TAG_HISTOGRAM_DATA,
m_pLEADDicomDS->GetCurrentTag ()->VR,
FALSE,
ELEMENT_INDEX_MAX);
if(nRet != 0)
{
AfxMessageBox("Error Inserting Element");
return;
}
//insert some short values into the element
m_pLEADDicomDS->LongValueCount= 5;
for(x=0; x<5; x++)
{
m_pLEADDicomDS->LongValues [x] = x*100000;
}
//set the shorts
nRet = m_pLEADDicomDS->SetLongValue(5);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
m_pLEADDicomDS->LongValueCount = 0; //free the values

//get the value count
lCount = m_pLEADDicomDS->GetValueCount ();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

//get the values
szOut.Empty();
CString strResult;
nRet = m_pLEADDicomDS->GetLongValue (0, lCount);
if(nRet == 0)
{
for(x=0; x<m_pLEADDicomDS->GetLongValueCount (); x++)
{
szOut.Format("%ld\n", m_pLEADDicomDS->GetLongValues (x));
strResult+=szOut;
}
}
AfxMessageBox(strResult);
}


GetModuleCount Example for C++ 6.0 and later

long lCount;
CString szCount;

lCount = m_pLEADDicomDS->GetModuleCount ();
szCount.Format("%ld", lCount);
AfxMessageBox("Module Count: " + szCount);


GetMutualAuthKeyLengthTLS Example for C++ 6.0 and later

{
CString strMsg;
strMsg.Format("Mutual authentication key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is %ld", m_pLEADDicomNet->GetMutualAuthKeyLengthTLS (m_pLEADDicomNet->GethNet (), DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA));
AfxMessageBox(strMsg);
}


GetPeerAuthDataISCL Example for C++ 6.0 and later

{
COleVariant vBuf;
long nLen;
m_pLEADDicomNet->GetPeerAuthDataISCL (m_pLEADDicomNet->GethNet (), vBuf, &nLen);

long Byte_1st, Byte_last, index_1st=0, index_last=nLen - 1;
SafeArrayGetElement(vBuf.parray, &index_1st, &Byte_1st);
SafeArrayGetElement(vBuf.parray, &index_last, &Byte_last);
CString strMsg;
strMsg.Format("1st byte of data = %ld, last byte of data = %ld", Byte_1st, Byte_last);
AfxMessageBox(strMsg);
}


GetPeerEncryptionISCL Example for C++ 6.0 and later

{
CString strEncr("Sender tried to send a message with encryption algorithm: ");
if(m_pLEADDicomNet->GetPeerEncryptionISCL (m_pLEADDicomNet->GethNet ()) == DICOM_ISCL_ENCRYPT_NONE)
strEncr += "None";
else if(m_pLEADDicomNet->GetPeerEncryptionISCL (m_pLEADDicomNet->GethNet()) == DICOM_ISCL_ENCRYPT_DESCBC)
strEncr += "DES algorithm, cipher block chaining mode";
else
strEncr += "Unknown";
AfxMessageBox(strEncr);
}


GetPeerMACISCL Example for C++ 6.0 and later

{
CString strMAC("SHA algorithm");
if(m_pLEADDicomNet->GetPeerMACISCL (m_pLEADDicomNet->GethNet ()) == DICOM_ISCL_MAC_NONE)
strMAC = "no message authentication code";
else if(m_pLEADDicomNet->GetPeerMACISCL (m_pLEADDicomNet->GethNet ()) == DICOM_ISCL_MAC_MD5)
strMAC = "MD5 algorithm";
AfxMessageBox("Sender tried to send a message with MAC " + strMAC);
}


GetPeerRequestedMessageLengthISCL Example for C++ 6.0 and later

{
CString strMsg;
strMsg.Format("Sender tried to send message with length %ld", m_pLEADDicomNet->GetPeerRequestedMessageLengthISCL L (m_pLEADDicomNet->GethNet ()));
AfxMessageBox(strMsg);
}


GetPresentationAbstract Example for C++ 6.0 and later

{
int i;
long lCount;
_bstr_t cStr;
int nID;

//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate (TRUE);

//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

//get current results for each Presentation Context
cStr = "Presentation Contexts--Results";
lCount = m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU());
for (i = 0; i<lCount; i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(),i);
_bstr_t sPresentationAbstract = m_pLEADDicomNet->GetPresentationAbstract (m_pLEADDicomNet->GethPDU(), nID);
cStr = cStr + "\n" + sPresentationAbstract;
}
AfxMessageBox(cStr);

//change first five abstracts
for (i = 0; i<lCount; i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(),i);
m_pLEADDicomNet->SetPresentationAbstract (m_pLEADDicomNet->GethPDU(), nID, UID_CR_IMAGE_STORAGE);
}

//redisplay
cStr = "Presentation Contexts--Results";
for (i = 0; i<lCount; i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(),i);
_bstr_t sPresentationAbstract = m_pLEADDicomNet->GetPresentationAbstract (m_pLEADDicomNet->GethPDU(), nID);
cStr = cStr + "\n" + sPresentationAbstract;

}
AfxMessageBox(cStr);

m_pLEADDicomNet->FreeAssociate (m_pLEADDicomNet->GethPDU());
}


GetPresentationCount Example for C++ 6.0 and later

{
int i;
int nID;
int iMaxID;
CString strMsg, strTmp;

//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate (TRUE);

//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

//get current ID's and display them
strMsg = "Presentation Contexts";
iMaxID = 0;
for (i = 0; i < m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(), i);
strTmp.Format("\n[%d]", nID);
strMsg = strMsg + strTmp;

//store the highest nID
if (nID > iMaxID)
iMaxID = nID;
}
AfxMessageBox(strMsg);

//nID must be unique and odd number
nID = iMaxID + 2;

//change the some ids and then display them all
for (i = 0; i<m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
m_pLEADDicomNet->SetPresentationID (m_pLEADDicomNet->GethPDU(), i, nID);
nID = nID + 2;
}

strMsg = "Presentation Contexts--new IDs";
for (i = 0; i<m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(), i);
strTmp.Format("\n[%d]", nID);
strMsg = strMsg + strTmp;
}
AfxMessageBox(strMsg);

//add a presentation context
strMsg = "Presentation Contexts--Added 1";
m_pLEADDicomNet->AddPresentation (m_pLEADDicomNet->GethPDU(), 1, 1, UID_CT_IMAGE_STORAGE);
for (i = 0; i<m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(), i);
strTmp.Format("\n[%d]", nID);
strMsg = strMsg + strTmp;
}
AfxMessageBox(strMsg);

//delete the one we added
strMsg = "Presentation Contexts--Deleted 1";
m_pLEADDicomNet->DeletePresentation (m_pLEADDicomNet->GethPDU(), 1);
for (i = 0; i<m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(), i);
strTmp.Format("\n[%d]", nID);
strMsg = strMsg + strTmp;
}
AfxMessageBox(strMsg);

m_pLEADDicomNet->FreeAssociate (m_pLEADDicomNet->GethPDU());
}


GetPresentationResult Example for C++ 6.0 and later

{
int i;
int lResult;
CString strMsg, strTmp;

//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate (TRUE);

//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

//get current results for each Presentation Context
strMsg = "Current Results";
for (i = 0; i < m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
lResult = m_pLEADDicomNet->GetPresentationResult (m_pLEADDicomNet->GethPDU(), i);
strTmp.Format("\n[%d]", lResult);
strMsg = strMsg + strTmp;
}
AfxMessageBox(strMsg);

//change all results to 1
for (i = 0; i< m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
m_pLEADDicomNet->SetPresentationResult (m_pLEADDicomNet->GethPDU(), i, 1);
}

//Display new results for each Presentation Context
strMsg = "New Results";
for (i = 0; i < m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
lResult = m_pLEADDicomNet->GetPresentationResult (m_pLEADDicomNet->GethPDU(), i);
strTmp.Format("\n[%d]", lResult);
strMsg = strMsg + strTmp;
}
AfxMessageBox(strMsg);
m_pLEADDicomNet->FreeAssociate (m_pLEADDicomNet->GethPDU());
}


GetSendQueueSize Example for C++ 6.0 and later

{
//display queue size--this should be called with a Client hNet
long lSize = m_pLEADDicomNet->GetSendQueueSize (m_pLEADDicomNet->GethNet());
CString strMsg;
strMsg.Format("SendQueueSize[%d]", lSize);
AfxMessageBox(strMsg);
}


GetServer Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveAssociateRequest (long hNet, long hPDU)
{
long hServer;
_bstr_t szServer;
long lPort;
CString szOut;

hServer = m_pDlg->m_pLEADDicomNet->GetServer (hNet);
if(hServer != 0)
{
szServer = m_pDlg->m_pLEADDicomNet->GetHostAddress (hServer);
lPort = m_pDlg->m_pLEADDicomNet->GetHostPort (hServer);
szOut.Format("Server = %s Port = %ld", (char*)szServer, lPort);
AfxMessageBox(szOut);
}
}


GetShortValue Example for C++ 6.0 and later

void CDicomDlg::TestProc3()
{
long lCount;
long x;
short nRet;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement (FALSE);
m_pLEADDicomDS->MoveRootElement ();
m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert a new element for the Short Values
nRet = m_pLEADDicomDS->InsertElement (FALSE, TAG_RECORD_IN_USE_FLAG, VR_US, FALSE, 0);

m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert some short values into the element
m_pLEADDicomDS->ShortValueCount = 5;
for(x=0; x<5; x++)
{
m_pLEADDicomDS->ShortValues[x] = x*100;
}
//set the shorts
nRet = m_pLEADDicomDS->SetShortValue(5);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
m_pLEADDicomDS->ShortValueCount = 0; //free the values

//get the value count
lCount = m_pLEADDicomDS->GetValueCount ();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

//get the values
nRet = m_pLEADDicomDS->GetShortValue (0, lCount);
if(nRet == 0)
{
for(x=0; x<m_pLEADDicomDS->GetShortValueCount(); x++)
{
//display each value separated by a '.'
szOut.Format("%ld", m_pLEADDicomDS->GetShortValues(x));
m_List1.AddString(szOut);
}
}
AfxMessageBox("wait");
}


GetStatusISCL Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceive(long hNet, long nStatus, short nType, const VARIANT FAR& pData, long lSize)
{
// In this example, assume an error occurs in the NetReceive event. The code to
// determine why this happened should look like this:
// . . .
long nStatusISCL = m_pDlg->m_pLEADDicomNet->GetStatusISCL (hNet);
if(nStatus == DICOM_ERROR_ISCL_DECRYPT)
{
if(nStatusISCL == 24)
// error decrypting message data
AfxMessageBox("Error decrypting message");
if(nStatusISCL == 25)
// error decrypting MAC code
AfxMessageBox("Error decrypting MAC code");
}
// . . .
}


GetStringValue Example for C++ 6.0 and later

void CDicomDlg::TestProc7()
{
long lCount;
long x;
short nRet;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement (FALSE);
m_pLEADDicomDS->MoveRootElement ();
//insert a new element for the String Values
nRet = m_pLEADDicomDS->InsertElement (FALSE, TAG_IMAGE_TYPE, VR_CS, FALSE, 0);

//insert some String values into the element
m_pLEADDicomDS->StringValueCount = 5;
for(x=0; x<5; x++)
{
CString szText;
szText.Format("%d", x+1);
szText = "String#" + szText;
BSTR bstr = szText.AllocSysString();
m_pLEADDicomDS->StringValues [x] = bstr;
SysFreeString(bstr);
}
//set the Strings
nRet = m_pLEADDicomDS->SetStringValue (5);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
m_pLEADDicomDS->StringValueCount = 0; //free the values

//get the value count
lCount = m_pLEADDicomDS->GetValueCount ();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

szOut.Empty();
//get the values
nRet = m_pLEADDicomDS->GetStringValue (0, lCount);
if(nRet == 0)
{
for(x=0; x<m_pLEADDicomDS->GetStringValueCount (); x++)
{
//display each value separated by a '.'
szOut += m_pLEADDicomDS->GetStringValues (x);
szOut += "\n";
}
}
AfxMessageBox(szOut);
}


GetTagCount Example for Visual C++ 6.0

GetTagCount Example for C++ 6.0 and later

long lCount;
CString szOut;
lCount = m_pLEADDicomDS->GetTagCount ();
szOut.Format("There are %ld Tag Items.", lCount);
AfxMessageBox(szOut);


GetTimeValue Example for C++ 6.0 and later

void CDicomDlg::TestProc10()
{
long lCount;
short nRet;
ITIMEVALUEItemPtr pTimeValue=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement (FALSE);
m_pLEADDicomDS->MoveRootElement ();
m_List1.ShowWindow(SW_SHOW);
m_List1.ResetContent();

//insert a new element for the Time Values
nRet = m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_BIRTH_TIME, VR_TM, FALSE, 0);

//insert an Time value into the element
m_pLEADDicomDS->TimeValueCount = 1;
pTimeValue = m_pLEADDicomDS->GetTimeValues (0);
pTimeValue->Hours = 12;
pTimeValue->Minutes = 25;
pTimeValue->Seconds = 33;
pTimeValue->Fractions = 50;

//set the Time
nRet = m_pLEADDicomDS->SetTimeValue(1);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}

m_pLEADDicomDS->TimeValueCount = 0; //free the value

//get the value count
lCount = m_pLEADDicomDS->GetValueCount ();
CString szOut;
szOut.Format("There are %ld values!", lCount);
AfxMessageBox(szOut);

//get the value
nRet = m_pLEADDicomDS->GetTimeValue (0, lCount);
//display the value
pTimeValue = m_pLEADDicomDS->GetTimeValues (0);
szOut.Format("Hours: %d", pTimeValue->GetHours());
m_List1.AddString(szOut);
szOut.Format("Minutes: %d", pTimeValue->GetMinutes());
m_List1.AddString(szOut);
szOut.Format("Seconds: %d", pTimeValue->GetSeconds());
m_List1.AddString(szOut);
szOut.Format("Fractions: %ld", pTimeValue->GetFractions());
m_List1.AddString(szOut);
AfxMessageBox("wait");
}


Getting an overlay bitmap list Example for C++ 6.0 and later

short iRet;
ILEADOverlayAttributesPtr pOverlayAttributesDS = NULL;
long GroupNumber = 0;
BOOL bIsOverlayInDataset = FALSE;

CString cs;

iRet = m_pLEADDicomDS->GetOverlayAttributes (0, 0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
pOverlayAttributesDS = m_pLEADDicomDS->GetOverlayAttributes ();

BSTR bstr = m_pLEADDicomDS->GetOverlayActivationLayer(0);
cs = bstr;
SysFreeString(bstr);
AfxMessageBox(cs);
iRet = m_pLEADDicomDS->GetOverlayBitmapList (0, 0, pOverlayAttributesDS->NumberFramesInOverlay, 0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
m_LEADRasterView1.GetRaster().SetBitmapList(m_pLEADDicomDS->OverlayBitmapList);
return;


Getting and setting a non-linear VOI LUT Example for C++ 6.0 and later

// This example will add a new VOI LUT to the dataset or
// replace the existing one(s)

BOOL bAddVOILUT = TRUE; // add or replace
ILVOILUTAttributesPtr pVOILUTAttributes = NULL;
short iRet;
long lVOILUTCount=0;
long lLUTIndex;
long lNewLUTIndex = 0;
long lDataSize;
SAFEARRAY* psaVOILUTData = NULL;
VARIANT vVOILUTData;
long *piData = NULL;

// Get the number of VOI LUT(s) in the file
lVOILUTCount = m_pLEADDicomDS->VOILUTCount;
if(lVOILUTCount>0)
{
// Get he attributes of the first VOI LUT
iRet = m_pLEADDicomDS->GetVOILUTAttributes (0,0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
pVOILUTAttributes = m_pLEADDicomDS->GetVOILUTAttributes ();
lDataSize = pVOILUTAttributes->LUTDescriptorNumberOfEntries;

// Get the LUT data
VariantInit(&vVOILUTData);
iRet = m_pLEADDicomDS->GetVOILUTData(0,&vVOILUTData,lDataSize);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
// Remap the data
psaVOILUTData = (SAFEARRAY*)V_ARRAYREF(&vVOILUTData);
SafeArrayAccessData(psaVOILUTData, (void HUGEP* FAR *) &piData);
for(lLUTIndex=0; lLUTIndex<=(lDataSize-1); lLUTIndex++)
{
piData[lLUTIndex] = piData[lLUTIndex]/2;
}
SafeArrayUnaccessData(psaVOILUTData);
}
else
{
pVOILUTAttributes = m_pLEADDicomDS->GetVOILUTAttributes ();
// Define our own LUT
pVOILUTAttributes->LUTDescriptorFirstMapped = 0;
pVOILUTAttributes->LUTDescriptorEntryBits = 16;
pVOILUTAttributes->LUTDescriptorNumberOfEntries = 0x10000;
lDataSize = pVOILUTAttributes->LUTDescriptorNumberOfEntries;
psaVOILUTData = SafeArrayCreateVector(VT_I4, 0, lDataSize);
for(lLUTIndex=0; lLUTIndex<=(lDataSize-1);lLUTIndex++)
{
unsigned short iVal = (unsigned short)lLUTIndex;
SafeArrayPutElement(psaVOILUTData, &lLUTIndex, (void*)&iVal);
}
VariantInit(&vVOILUTData);
vVOILUTData.vt = VT_ARRAY | VT_I4;
vVOILUTData.parray = psaVOILUTData;
}
lNewLUTIndex = lVOILUTCount;
if(!bAddVOILUT)
{
// Delete existing LUT
iRet = m_pLEADDicomDS->DeleteVOILUT(0);
if(iRet != 0)
{
SafeArrayDestroy(psaVOILUTData);
AfxMessageBox("error");
return;
}
lNewLUTIndex = 0 ;
}
// Set the new LUT
iRet = m_pLEADDicomDS->SetVOILUT (lNewLUTIndex,&vVOILUTData,0);
SafeArrayDestroy(psaVOILUTData);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
return;


Getting and setting window center and width Example for C++ 6.0 and later

// This example will add a new "Window Width" and
// "Window Center" to the dataset , or replace
// the existing one(s)

BOOL bAddWindow=TRUE;// add or replace
ILWindowAttributesPtr pWindowAttributes = NULL;
short iRet;
long lWindowCount=0;
long lWindowIndex=0;
int iBitsStored = 12;

lWindowCount = m_pLEADDicomDS->WindowCount;
if(lWindowCount>0)
{
iRet = m_pLEADDicomDS->GetWindowAttributes(0,0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
pWindowAttributes = m_pLEADDicomDS->GetWindowAttributes();

// Half the width for the first window
pWindowAttributes->WindowWidth = pWindowAttributes->WindowWidth/2;
pWindowAttributes->WindowCenter = pWindowAttributes->WindowCenter/2;
}
else
{
// This represents an identity VOI LUT transformation in the case
// where no Modality LUT is specified and the stored pixel data are
// iBitsStored bit unsigned integers.
pWindowAttributes = m_pLEADDicomDS->GetWindowAttributes();
pWindowAttributes->WindowWidth = 1 << iBitsStored;
pWindowAttributes->WindowCenter = 1 << (iBitsStored-1);
pWindowAttributes->WindowCWExplaination = "";
}
lWindowIndex = lWindowCount;
if(!bAddWindow)
{
// Delete the existing window(s)
iRet = m_pLEADDicomDS->DeleteWindow (0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
lWindowIndex = 0;
}

// Add the new window
iRet = m_pLEADDicomDS->SetWindowAttributes (lWindowIndex,0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
return;


Getting modality LUT data and attributes Example for C++ 6.0 and later

// This example will retrieve the LUT Data (0028,3006)
// under the Modality LUT Sequence (0028,3000)

short iRet;

// Object that will hold modality LUT attributes
ILModalityLUTAttributesPtr pModalityLUTAttributes = NULL;
// Get modality LUT attributes
iRet = m_pLEADDicomDS->GetModalityLUTAttributes(0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
pModalityLUTAttributes = m_pLEADDicomDS->GetModalityLUTAttributes();

// If there is no modality LUT sequence then there is no data !
if(!pModalityLUTAttributes->IsModalityLUTSequence)
{
AfxMessageBox("No LUT");
return;
}

VARIANT vData;

VariantInit(&vData);
// Retrieve the LUT Data (0028,3006)
m_pLEADDicomDS->GetModalityLUTData (&vData, 0);
// Do something with the data


Getting palette color LUT data and attributes Example for C++ 6.0 and later

// This example will retrieve the data under
// "Red Palette Color Lookup Table Data"(0028,1201)
// element and if the data is segmented it will get the data under
// "Segmented Red Palette Color Lookup Table Data" (0028,1221) and decode it

// Object that will hold Palette Color LUT attributes
ILPaletteColorLUTAttributesPtr pPaletteColorLUTAttributes = NULL;
short iRet;

// Get "Palette Color Lookup Table" attributes
iRet = m_pLEADDicomDS->GetPaletteColorLUTAttributes (0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
pPaletteColorLUTAttributes = m_pLEADDicomDS->GetPaletteColorLUTAttributes ();

// Retrieve "Red Palette Color Lookup Table Data"
// This function will automatically decode the LUT data
// if it was segmented
VARIANT vData;
VariantInit(&vData);
iRet = m_pLEADDicomDS->GetPaletteColorLUTData (&vData, DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0);
//do something with vData
//...
return;


Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for C++ 6.0 and later

// This example will extract the overlays from a
// DICOM dataset and associate them with a bitmap,
// the bitmap is assumed to be extracted from the
// same DICOM dataset.
short iRet;
long lOverlayCount = 0;
long lOverlayIndex = 0;
ILEADOverlayAttributesPtr pOverlayAttributesDS = NULL;
ILEADOverlayAttributesPtr pOverlayAttributesRaster = NULL;
ILEADRasterProcessPtr pRasterProcess = NULL;
long GroupNumber = 0;
BOOL bIsOverlayInDataset = FALSE;
short iLEADOverlayIndex = 0;
long lFlags = 0;
COLORREF crColor;

m_pLEADDicomDS->GetBitmapValue (0,0,ORDER_BGRORGRAY,0);
m_LEADRasterView1.GetRaster().SetBitmap(m_pLEADDicomDS->Bitmap);

CoCreateInstance(CLSID_LEADRasterProcess,
NULL,
CLSCTX_ALL,
IID_ILEADRasterProcess,
(void**)&pRasterProcess);
pRasterProcess->EnableMethodErrors = FALSE;

//Do we have any overlays at all?
lOverlayCount = m_pLEADDicomDS->OverlayCount;
if(lOverlayCount==0)
return;

//Go through the overlays one by one
lOverlayIndex = 0;
iLEADOverlayIndex = 0;
// Reset the overlay bitmap
if(m_LEADRasterView2.GetRaster().GetBitmap())
m_LEADRasterView2.GetRaster().Free();
m_LEADRasterView2.GetRaster().CreateBitmap(1.0f,1.0f,1);
while(lOverlayIndex < lOverlayCount)
{
GroupNumber = 0;
bIsOverlayInDataset = FALSE;
lFlags = 0;
// Get the attributes of this overlay
iRet = m_pLEADDicomDS->GetOverlayAttributes (lOverlayIndex, 0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
GroupNumber = m_pLEADDicomDS->GetOverlayGroupNumber(lOverlayIndex, 0);
bIsOverlayInDataset = m_pLEADDicomDS->IsOverlayInDataSet(lOverlayIndex, 0);

if(!bIsOverlayInDataset)
{
lOverlayIndex++;
continue;
}

pOverlayAttributesDS = m_pLEADDicomDS->GetOverlayAttributes ();
pOverlayAttributesRaster = pRasterProcess->GetOverlayAttributes ();

// Auto paint and process overlays
lFlags = pOverlayAttributesDS->Flags;
lFlags |= OVERLAY_AUTOPAINT|OVERLAY_AUTOPROCESS;
pOverlayAttributesRaster->Flags = lFlags;
pOverlayAttributesRaster->OriginX = pOverlayAttributesDS->OriginX;
pOverlayAttributesRaster->OriginY = pOverlayAttributesDS->OriginY;
crColor = RGB(0xFF,0xFF,0xFF);
pOverlayAttributesRaster->Color = crColor;
pOverlayAttributesRaster->BitPosition = pOverlayAttributesDS->BitPosition;
pOverlayAttributesRaster->Rows = pOverlayAttributesDS->Rows;
pOverlayAttributesRaster->Columns = pOverlayAttributesDS->Columns;
pOverlayAttributesRaster->Type = pOverlayAttributesDS->Type;
pOverlayAttributesRaster->BitsAllocated = pOverlayAttributesDS->BitsAllocated;
pOverlayAttributesRaster->Subtype = pOverlayAttributesDS->Subtype;
pOverlayAttributesRaster->Label = pOverlayAttributesDS->Label;
pOverlayAttributesRaster->ROIArea = pOverlayAttributesDS->ROIArea;
pOverlayAttributesRaster->ROIMean = pOverlayAttributesDS->ROIMean;
pOverlayAttributesRaster->ROIStandardDeviation = pOverlayAttributesDS->ROIStandardDeviation;
pOverlayAttributesRaster->NumberFramesInOverlay = pOverlayAttributesDS->NumberFramesInOverlay;
pOverlayAttributesRaster->ImageFrameOrigin = pOverlayAttributesDS->ImageFrameOrigin;
pOverlayAttributesRaster->ActivationLayer = pOverlayAttributesDS->ActivationLayer;
pOverlayAttributesRaster->Description = pOverlayAttributesDS->Description;

iRet = pRasterProcess->SetOverlayAttributes(m_LEADRasterView1.GetRaster(), iLEADOverlayIndex, 0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}

// Is the overlay embedded inside the image data ?
lFlags = pOverlayAttributesDS->Flags;
if(lFlags & OVERLAY_USEBITPLANE)
{
// Add this overlay to the list of overlays in the bitmap handle
iRet = pRasterProcess->SetOverlayAttributes(m_LEADRasterView1.GetRaster(),
iLEADOverlayIndex,
OVERLAYATTRIBUTES_FLAGS |
OVERLAYATTRIBUTES_BITINDEX |
OVERLAYATTRIBUTES_ORIGIN |
OVERLAYATTRIBUTES_DICOM |
OVERLAYATTRIBUTES_COLOR);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}

// Make sure to extract the overlay data from the image data
iRet = pRasterProcess->UpdateOverlayBits(m_LEADRasterView1.GetRaster(),
iLEADOverlayIndex,
SETOVERLAYBITS_FROMBITMAP);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
}
// The overlay is inside overlay data
else
{
// Add this overlay to the list of overlays in the bitmap handle
iRet = pRasterProcess->SetOverlayAttributes(m_LEADRasterView1.GetRaster(),
iLEADOverlayIndex,
OVERLAYATTRIBUTES_FLAGS |
OVERLAYATTRIBUTES_ORIGIN |
OVERLAYATTRIBUTES_DICOM |
OVERLAYATTRIBUTES_COLOR);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}

// Get the overlay bitmap from the overlay data
iRet = m_pLEADDicomDS->GetOverlayBitmap (lOverlayIndex, 0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
//store it temp. in RasterView2
if(m_LEADRasterView2.GetRaster().GetBitmap())
m_LEADRasterView2.GetRaster().Free();
m_LEADRasterView2.GetRaster().SetBitmap(m_pLEADDicomDS->OverlayBitmap);

// Set the bitmap for this overlay inside the
// list of overlays we have in the bitmap handle

iRet = pRasterProcess->SetOverlayBitmap (m_LEADRasterView1.GetRaster(),
iLEADOverlayIndex,
m_LEADRasterView2.GetRaster(),
OVERLAY_COPY);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
}
lOverlayIndex++;
iLEADOverlayIndex++;
}
return;


GetTransferCount Example for C++ 6.0 and later

{
long i;
_bstr_t cStr;
int nID, nTransferSyntaxCount;

//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate (TRUE);

//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

//display each Transfer Syntax for the first Presentation Context
cStr = "Transfer Syntax";
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(), 0);
nTransferSyntaxCount = m_pLEADDicomNet->GetTransferCount (m_pLEADDicomNet->GethPDU(), nID);
for (i = 0; i<nTransferSyntaxCount; i++)
{
_bstr_t sTransferSyntax = m_pLEADDicomNet->GetTransferSyntax(m_pLEADDicomNet->GethPDU(), nID, i);
cStr = cStr + "\n" + sTransferSyntax;
}
AfxMessageBox(cStr);

//add a transfer syntax
m_pLEADDicomNet->AddTransferSyntax (m_pLEADDicomNet->GethPDU(), nID, UID_IMPLICIT_VR_LITTLE_ENDIAN);

//display each Transfer Syntax for the first Presentation Context
cStr = "Transfer Syntax--add a transfer syntax";
nTransferSyntaxCount = m_pLEADDicomNet->GetTransferCount (m_pLEADDicomNet->GethPDU(), nID);
for (i = 0; i<nTransferSyntaxCount; i++)
cStr = cStr + "\n" + m_pLEADDicomNet->GetTransferSyntax(m_pLEADDicomNet->GethPDU(), nID, i);
AfxMessageBox(cStr);

//change them
nTransferSyntaxCount = m_pLEADDicomNet->GetTransferCount (m_pLEADDicomNet->GethPDU(), nID);
for (i = 0; i<nTransferSyntaxCount; i++)
m_pLEADDicomNet->SetTransferSyntax(m_pLEADDicomNet->GethPDU(), nID, i, UID_EXPLICIT_VR_BIG_ENDIAN);

//display each Transfer Syntax for the first Presentation Context
cStr = "Transfer Syntax--changed";
nTransferSyntaxCount = m_pLEADDicomNet->GetTransferCount (m_pLEADDicomNet->GethPDU(), nID);
for (i = 0; i<nTransferSyntaxCount; i++)
{
cStr = cStr + "\n" + m_pLEADDicomNet->GetTransferSyntax(m_pLEADDicomNet->GethPDU(), nID, i);
}
AfxMessageBox(cStr);

//delete the last one
nTransferSyntaxCount = m_pLEADDicomNet->GetTransferCount (m_pLEADDicomNet->GethPDU(), nID);
m_pLEADDicomNet->DeleteTransferSyntax(m_pLEADDicomNet->GethPDU(), nID, nTransferSyntaxCount - 1);

//display each Transfer Syntax for the first Presentation Context
cStr = "Transfer Syntax--delete last one";
nTransferSyntaxCount = m_pLEADDicomNet->GetTransferCount (m_pLEADDicomNet->GethPDU(), nID);
for (i = 0; i<nTransferSyntaxCount; i++)
cStr = cStr + "\n" + m_pLEADDicomNet->GetTransferSyntax(m_pLEADDicomNet->GethPDU(), nID, i);
AfxMessageBox(cStr);

m_pLEADDicomNet->FreeAssociate (m_pLEADDicomNet->GethPDU());
}


GetUIDCount Example for Visual C++ 6.0

GetUIDCount Example for C++ 6.0 and later

long lCount;
CString szOut;
lCount = m_pLEADDicomDS->GetUIDCount ();
szOut.Format("There are %ld UID Items.", lCount);
AfxMessageBox(szOut);


GetUserInfoCount Example for C++ 6.0 and later

{
int i ;
int nType;
int nLen;
CString strMsg;
CString strTmp;
long lUBound;
SAFEARRAY FAR *psa=NULL;
char * pData=NULL;

//create the Associate Class as Request, and set to default
m_pLEADDicomNet->CreateAssociate (TRUE);
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

//get current user info types, lengths, and data then display them
strMsg = "Current user type, length, data:";
if (m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()) > 0)
{
for (i = 0; i<m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()); i++)
{
nType = m_pLEADDicomNet->GetUserInfoType (m_pLEADDicomNet->GethPDU(), i);
nLen = m_pLEADDicomNet->GetUserInfoLength(m_pLEADDicomNet->GethPDU(), i);

COleVariant VData = m_pLEADDicomNet->GetUserInfoData (m_pLEADDicomNet->GethPDU(), i);
BSTR bStr = ((LPVARIANT)VData)->bstrVal;

strTmp.Format("Type[%d]\tLength[%d]\tData[%s]", nType, nLen, bStr);
strMsg = strMsg + "\n" + strTmp;
}
}
else
strMsg = strMsg + "\nNone";
AfxMessageBox(strMsg);

//add a user info item item
strMsg = "Add user info item";
COleVariant VDescString;
CString strTest = "Just a test";
VDescString = CString(strTest);

m_pLEADDicomNet->AddUserInfo(m_pLEADDicomNet->GethPDU(), 99, VDescString, strTest.GetLength());
if (m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()) > 0)
{
for (i = 0; i<m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()); i++)
{
nType = m_pLEADDicomNet->GetUserInfoType (m_pLEADDicomNet->GethPDU(), i);
nLen = m_pLEADDicomNet->GetUserInfoLength(m_pLEADDicomNet->GethPDU(), i);

COleVariant VData = m_pLEADDicomNet->GetUserInfoData (m_pLEADDicomNet->GethPDU(), i);
psa = V_ARRAY(&VData);
SafeArrayGetUBound(psa, 1, &lUBound);
SafeArrayAccessData(psa, (void HUGEP**)&pData);
CString strData;
for(int nIndex = 0; nIndex <= lUBound; nIndex++ )
{
strTmp.Format("%c", pData[nIndex]);
strData += strTmp;
}
SafeArrayUnaccessData(psa);

strTmp.Format("Type[%d]\tLength[%d]\tData[%s]", nType, nLen, strData);
strMsg = strMsg + "\n" + strTmp;
}
}
else
strMsg = strMsg + "\nNone";
AfxMessageBox(strMsg);

//for each user info item, change the data
strTest = "a second test";
COleVariant VTest(strTest);

for (i = 0; i<m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()); i++)
{
nType = m_pLEADDicomNet->GetUserInfoType (m_pLEADDicomNet->GethPDU(), i);
m_pLEADDicomNet->SetUserInfo(m_pLEADDicomNet->GethPDU(), i, nType, VTest, strTest.GetLength());
}

strMsg = "Change user data";
if (m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()) > 0)
{
for (i = 0; i<m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()); i++)
{
nType = m_pLEADDicomNet->GetUserInfoType (m_pLEADDicomNet->GethPDU(), i);
nLen = m_pLEADDicomNet->GetUserInfoLength(m_pLEADDicomNet->GethPDU(), i);
COleVariant VData = m_pLEADDicomNet->GetUserInfoData (m_pLEADDicomNet->GethPDU(), i);
psa = V_ARRAY(&VData);
SafeArrayGetUBound(psa, 1, &lUBound);
SafeArrayAccessData(psa, (void HUGEP**)&pData);
CString strData;
for(int nIndex = 0; nIndex <= lUBound; nIndex++ )
{
strTmp.Format("%c", pData[nIndex]);
strData += strTmp;
}
SafeArrayUnaccessData(psa);
strTmp.Format("Type[%d]\tLength[%d]\tData[%s]", nType, nLen, strData);
strMsg = strMsg + "\n" + strTmp;
}
}
else
strMsg = strMsg + "\nNone";
AfxMessageBox(strMsg);

//delete the one we added
m_pLEADDicomNet->DeleteUserInfo(m_pLEADDicomNet->GethPDU(), m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()) - 1);
strMsg = "Delete the added user";
if (m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()) > 0)
{
for (i = 0; i<m_pLEADDicomNet->GetUserInfoCount (m_pLEADDicomNet->GethPDU()); i++)
{
nType = m_pLEADDicomNet->GetUserInfoType (m_pLEADDicomNet->GethPDU(), i);
nLen = m_pLEADDicomNet->GetUserInfoLength(m_pLEADDicomNet->GethPDU(), i);

COleVariant VData = m_pLEADDicomNet->GetUserInfoData (m_pLEADDicomNet->GethPDU(), i);
BSTR bStr = ((LPVARIANT)VData)->bstrVal;
_bstr_t sVal = bStr;

strTmp.Format("Type[%d]\tLength[%d]\tData[%s]", nType, nLen, (char *)sVal);
strMsg = strMsg + "\n" + strTmp;
}
}
else
strMsg = strMsg + "\nNone";
AfxMessageBox(strMsg);

m_pLEADDicomNet->FreeAssociate (m_pLEADDicomNet->GethPDU());
}


GetVRCount Example for Visual C++ 6.0

GetVRCount Example for C++ 6.0 and later

long lCount;
CString szOut;
lCount = m_pLEADDicomDS->GetVRCount ();
szOut.Format("There are %ld VR Items.", lCount);
AfxMessageBox(szOut);


IncludeVolatile Example for C++ 6.0 and later

short nRet;
CString csItem;
IDicomDSElementPtr pCurrentElement=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//list all elements
m_pLEADDicomDS->IncludeVolatile = TRUE;
nRet = m_pLEADDicomDS->MoveFirstElement (FALSE);
while(nRet == 0)
{
pCurrentElement = m_pLEADDicomDS->GetCurrentElement();
csItem.Format("%X", pCurrentElement->GetTag());
m_List1.AddString(csItem);
nRet = m_pLEADDicomDS->MoveNextElement (FALSE);
}
csItem.Format("Element Count = %ld", m_List1.GetCount());
AfxMessageBox(csItem);

//list only non-volatile elements
m_pLEADDicomDS->IncludeVolatile = FALSE;
nRet = m_pLEADDicomDS->MoveFirstElement (FALSE);
while(nRet == 0)
{
pCurrentElement = m_pLEADDicomDS->GetCurrentElement();
csItem.Format("%X", pCurrentElement->GetTag());
m_List2.AddString(csItem);
nRet = m_pLEADDicomDS->MoveNextElement (FALSE);
}
csItem.Format("Non-Volatile Element Count = %ld", m_List2.GetCount());
AfxMessageBox(csItem);


InitCS Example for C++ 6.0 and later

CString strMsg;

//create a data set as a command set
m_pLEADDicomDS->InitCS (COMMAND_C_STORE, TRUE);

//gets information about the command set
m_pLEADDicomDS->GetInfoCS ();

strMsg.Format("Command: %d\nRequest: %d", m_pLEADDicomDS->GetInfoCommand (), m_pLEADDicomDS->GetInfoRequest () );
AfxMessageBox(strMsg);


InitDS Example for C++ 6.0 and later

//init a DS
m_pLEADDicomDS->InitDS (DICOM_CLASS_CR_IMAGE_STORAGE, DS_EXPLICIT_VR|DS_METAHEADER_ABSENT|DS_BIG_ENDIAN);


InsertBitmapListValue Example for C++ 6.0 and later

void CDicomDlg::TestProcInsertList()
{
short nRet;

m_pLEADDicomDS->EnableMethodErrors = FALSE;

//move to the first image element and delete what's there
nRet = m_pLEADDicomDS->FindFirstElement (TAG_PIXEL_DATA, FALSE);
nRet = m_pLEADDicomDS->DeleteElement();
nRet = m_pLEADDicomDS->InsertElement (FALSE, TAG_PIXEL_DATA, VR_OB, FALSE, 0);

m_List1.ShowWindow(SW_HIDE);
m_LEADRasterView1.ShowWindow(SW_SHOW);

//load an image
ILEADRasterIO *pRasterIO=NULL;
HRESULT hr;
hr = CoCreateInstance(CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO);
pRasterIO->EnableMethodErrors = FALSE;
pRasterIO->Load(m_LEADRasterView1.GetRaster(),"d:\\ltwin\\images\\image1.cmp", 0, 1, 1);
pRasterIO->Release();
AfxMessageBox("Image loaded from File - Wait");

//create a bitmap list
BSTR lpLic = SysAllocString(_szLicString);
ILEADRasterFactory *pFactory=NULL;
ILEADRaster *pRaster=NULL;
CoCreateInstance(CLSID_LEADRasterFactory, NULL, CLSCTX_ALL, IID_ILEADRasterFactory, (void**)&pFactory);
#if _MSC_VER < 1200
pRaster = (ILEADRaster*)pFactory->CreateObject ("LEADRaster.LEADRaster", lpLic);
#else
ILEADRasterPtr spLEADRaster=NULL;
spLEADRaster = pFactory->CreateObject ("LEADRaster.LEADRaster", lpLic);
pRaster = spLEADRaster;
pRaster->AddRef();//because when spLEADRaster goes out of scope, it will auto Release()!
#endif
pFactory->Release();
SysFreeString(lpLic);

ILEADRasterProcess *pRasterProcess=NULL;
hr = CoCreateInstance(CLSID_LEADRasterProcess,
NULL,
CLSCTX_ALL,
IID_ILEADRasterProcess,
(void**)&pRasterProcess);

pRasterProcess->EnableMethodErrors = FALSE;
pRaster->InsertBitmapListItem(0, m_LEADRasterView1.GetRaster().GetBitmap());
pRasterProcess->Flip(m_LEADRasterView1.GetRaster());
pRaster->InsertBitmapListItem(1, m_LEADRasterView1.GetRaster().GetBitmap());
pRasterProcess->Reverse(m_LEADRasterView1.GetRaster());
pRaster->InsertBitmapListItem(2, m_LEADRasterView1.GetRaster().GetBitmap());
pRasterProcess->Release();

//insert the image list into the element
nRet = m_pLEADDicomDS->InsertBitmapListValue(pRaster->GetBitmapList(), 0, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, DICOM_SETIMAGE_AUTO_SET_VOI_LUT);
pRaster->Release();

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
AfxMessageBox("ImageList inserted into Data Set - Wait");
}


InsertBitmapValue Example for C++ 6.0 and later

void CDicomDlg::TestProcInsertBitmap()
{
long lCount;
short nRet;

m_pLEADDicomDS->EnableMethodErrors = FALSE;

//move to the first image element and delete what's there
nRet = m_pLEADDicomDS->FindFirstElement (TAG_PIXEL_DATA, FALSE);
nRet = m_pLEADDicomDS->DeleteElement();
nRet = m_pLEADDicomDS->InsertElement (FALSE, TAG_PIXEL_DATA, VR_OB, FALSE, 0);

m_List1.ShowWindow(SW_HIDE);
m_LEADRasterView1.ShowWindow(SW_SHOW);

//load an image
ILEADRasterIO *pRasterIO=NULL;
HRESULT hr;
hr = CoCreateInstance(CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO);
pRasterIO->EnableMethodErrors = FALSE;
pRasterIO->Load(m_LEADRasterView1.GetRaster(),"d:\\ltwin\\images\\image1.cmp", 0, 1, 1);
pRasterIO->Release();
AfxMessageBox("Image loaded from File - Wait");

lCount = m_pLEADDicomDS->GetBitmapCount();

//insert some images
nRet = m_pLEADDicomDS->InsertBitmapValue(m_LEADRasterView1.GetRaster().GetBitmap(), lCount, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, DICOM_SETIMAGE_AUTO_SET_VOI_LUT);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}

ILEADRasterProcess *pRasterProcess=NULL;
hr = CoCreateInstance(CLSID_LEADRasterProcess,
NULL,
CLSCTX_ALL,
IID_ILEADRasterProcess,
(void**)&pRasterProcess);
pRasterProcess->EnableMethodErrors = FALSE;
pRasterProcess->Flip(m_LEADRasterView1.GetRaster());
nRet = m_pLEADDicomDS->InsertBitmapValue (m_LEADRasterView1.GetRaster().GetBitmap(), lCount + 1, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, DICOM_SETIMAGE_AUTO_SET_VOI_LUT);
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
pRasterProcess->Reverse(m_LEADRasterView1.GetRaster());
pRasterProcess->Release();
nRet = m_pLEADDicomDS->InsertBitmapValue (m_LEADRasterView1.GetRaster().GetBitmap(), lCount + 2, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, DICOM_SETIMAGE_AUTO_SET_VOI_LUT);
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}

AfxMessageBox("Images inserted - Wait");
}


InsertDS Example for C++ 6.0 and later

InsertDS Example for C++ 6.0 or later

//find the first PATIENT KEY, copy it to a new
//DS, and then save it to a file
m_pLEADDicomDS->FindFirstKey ("PATIENT", FALSE);
m_pLEADDicomDS2->ResetDS ();
IDicomDSElementPtr pCurrentElement = m_pLEADDicomDS->GetCurrentElement ();
m_pLEADDicomDS2->InsertDS(m_pLEADDicomDS->GethDicomDS(), pCurrentElement->GethElement());
m_pLEADDicomDS2->SaveDS ("d:\\temp\\save.dic", 0);


InsertElement Example for C++ 6.0 and later

short nRet;
HTREEITEM hItem=NULL;
HTREEITEM hParent=NULL;
ILEADDicomTagPtr pCurrentTag=NULL;
IDicomDSElementPtr pCurrentElement=NULL;

m_pLEADDicomDS->FindTag(TAG_DISCHARGE_DATE);
pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();
nRet = m_pLEADDicomDS->InsertElement (FALSE, TAG_DISCHARGE_DATE, pCurrentTag->GetVR(), FALSE, ELEMENT_INDEX_MAX);
if(nRet != 0)
AfxMessageBox("Error Inserting Element");
else
{
pCurrentElement = m_pLEADDicomDS->GetCurrentElement ();
//update the tree view
hParent = m_TreeView1.GetSelectedItem();
hItem = m_TreeView1.InsertItem(pCurrentTag->GetName(), hParent);
m_TreeView1.SetItemData(hItem, pCurrentElement->GethElement());
}


Inserting a Context Group Example for C++ 6.0 and later

void InsertContextGroup(ILEADDicomDSPtr& spDicomDS)
{
// Context Group Version
spDicomDS->DateTimeValueCount = 1;
spDicomDS->DateTimeValues[0]->Year = 2004;
spDicomDS->DateTimeValues[0]->Month = 3;
spDicomDS->DateTimeValues[0]->Day = 22;
spDicomDS->DateTimeValues[0]->Hours = 0;
spDicomDS->DateTimeValues[0]->Minutes = 0;
spDicomDS->DateTimeValues[0]->Seconds = 0;
spDicomDS->DateTimeValues[0]->Fractions = 0;
spDicomDS->DateTimeValues[0]->Offset = 0;

// Insert a (testing) Context Group
spDicomDS->InsertContextGroup ("CID XXXX", "New Context Group", VARIANT_TRUE, 0);

spDicomDS->DateTimeValueCount = 0;

// Fill the Context Group with some (testing) Coded Concepts
spDicomDS->InsertCodedConcept ("CSD1", "", "CV1", "CM1", VARIANT_FALSE, "", 0);
spDicomDS->InsertCodedConcept ("CSD2", "", "CV2", "CM2", VARIANT_FALSE, "", 0);
spDicomDS->InsertCodedConcept ("CSD3", "", "CV3", "CM3", VARIANT_FALSE, "", 0);

// Refer to Enumerating the Coded Concepts of a Context Group Example
// for C++ 6.0 and later for the function EnumCodedConcepts
EnumCodedConcepts(spDicomDS);

// Delete the Context Group
spDicomDS->DeleteContextGroup ();
}


Inserting a Wave Stream Into a Data Set Example for C++ 6.0 and later

BOOL InsertWaveFileIntoDataSet(ILEADDicomDSPtr& spDataSet, LPCSTR pszInputWaveFilename)
{
IDicomWaveformGroupPtr spAudioWaveformGroup(__uuidof(DicomWaveformGroup));
spAudioWaveformGroup->EnableMethodErrors = VARIANT_FALSE;

// Load the audio file into the waveform group
if (spAudioWaveformGroup->LoadAudio(pszInputWaveFilename, 0) != DICOM_SUCCESS)
{
return FALSE;
}

// Insert the audio waveform group into the Data Set
if (spDataSet->AddWaveformGroup(spAudioWaveformGroup, 0, ELEMENT_INDEX_MAX) != DICOM_SUCCESS)
{
return FALSE;
}

return TRUE;
}


Inserting a Waveform Group Into a Data Set Example for C++ 6.0 and later

/*****************************************************************/
/* This is a comprehensive sample, which shows how to insert a */
/* waveform group with one ECG channel into a Data Set. */
/* The main function is InsertECGWaveform; the rest of the */
/* functions are helping functions. */
/*****************************************************************/

#pragma warning(disable: 4786)

// Functions Prototypes
BOOL InsertECGChannel(ILEADDicomDSPtr& spDataSet,
IDicomWaveformGroupPtr& spWaveformGroup,
SAFEARRAY* psaSamples);
BOOL SetChannelSourceAndSensitivity(ILEADDicomDSPtr& spDataSet,
IDicomWaveformChannelPtr& spWaveformChannel);
BOOL SetChannelAnnotations(IDicomWaveformChannelPtr& spWaveformChannel);

// The main function that creates the waveform group and adds to the Data Set
// Note: The function assumes that psaSamples is a safearray of short (VT_I2) values.
BOOL InsertECGWaveform(ILEADDicomDSPtr& spDataSet, SAFEARRAY* psaSamples)
{
if (!psaSamples)
{
return FALSE;
}

// Our new waveform group
IDicomWaveformGroupPtr spECGWaveformGroup(__uuidof(DicomWaveformGroup));

spECGWaveformGroup->EnableMethodErrors = VARIANT_FALSE;

// Reset the waveform group, we don't really need to call this!
spECGWaveformGroup->Reset ();

// Set the Waveform Sample Interpretation
spECGWaveformGroup->SampleInterpretation = WAVEFORM_SAMPLE_INTERPRETATION_SS;

ULONG uNumberOfSamples = psaSamples->rgsabound->cElements;

// Set the Number of Waveform Samples. You can obtain this number by accessing
// the NumberOfSamplesPerChannel property.
if (spECGWaveformGroup->SetNumberOfSamplesPerChannel (uNumberOfSamples) != DICOM_SUCCESS)
{
return FALSE;
}

// Set the Sampling Frequency
spECGWaveformGroup->SamplingFrequency = 240.0;

// No Multiplex Group Time Offset. When the value is defined, it can be set using the
// MultiplexGroupTimeOffset property.
spECGWaveformGroup->ValueDefined [MULTIPLEX_GROUP_TIME_OFFSET] = VARIANT_FALSE;

// No Trigger Time Offset. When the value is defined, it can be set using the
// TriggerTimeOffset property.
spECGWaveformGroup->ValueDefined [TRIGGER_TIME_OFFSET] = VARIANT_FALSE;

// No Trigger Sample Position. When the value is defined, it can be set using the
// TriggerSamplePosition property.
spECGWaveformGroup->ValueDefined [TRIGGER_SAMPLE_POSITION] = VARIANT_FALSE;

// Waveform Originality is ORIGINAL
spECGWaveformGroup->WaveformOriginality = WAVEFORM_ORIGINALITY_ORIGINAL;

// Set the Multiplex Group Label
spECGWaveformGroup->ValueDefined [MULTIPLEX_GROUP_LABEL] = VARIANT_TRUE;
spECGWaveformGroup->MultiplexGroupLabel = "SCPECG Waveform";

// Set the Waveform Padding Value
spECGWaveformGroup->ValueDefined [WAVEFORM_PADDING_VALUE] = VARIANT_TRUE;
spECGWaveformGroup->WaveformPaddingValue = 32768;

if (!InsertECGChannel(spDataSet, spECGWaveformGroup, psaSamples))
{
return FALSE;
}

// Delete any waveform groups that already exist in the Data Set
while (spDataSet->GetWaveformGroupCount() > 0)
{
spDataSet->DeleteWaveformGroup (0, 0);
}

// Insert the new waveform group into the Data Set
if (spDataSet->AddWaveformGroup (spECGWaveformGroup, 0, ELEMENT_INDEX_MAX) != DICOM_SUCCESS)
{
return FALSE;
}

return TRUE;
}

// Adds an ECG channel to the group
BOOL InsertECGChannel(ILEADDicomDSPtr& spDataSet,
IDicomWaveformGroupPtr& spWaveformGroup,
SAFEARRAY* psaSamples)
{
IDicomWaveformChannelPtr spECGWaveformChannel;

// Add a channel to the group
spECGWaveformChannel = spWaveformGroup->Channels->Add();

VARIANT varSamples;
varSamples.vt = VT_ARRAY | VT_I2;
varSamples.parray = psaSamples;

// Set the samples of the channel
if (spECGWaveformChannel->SetChannelSamples (varSamples) < 0)
{
return FALSE;
}

// Set the Channel Source and Sensitivity
if (!SetChannelSourceAndSensitivity(spDataSet, spECGWaveformChannel))
{
return FALSE;
}

// Set the Channel Status
spECGWaveformChannel->ValueDefined [CHANNEL_STATUS] = VARIANT_TRUE;
spECGWaveformChannel->ChannelStatus = CHANNEL_STATUS_OK;

// Set the Channel Time Skew
spECGWaveformChannel->ValueDefined [CHANNEL_TIME_SKEW] = VARIANT_TRUE;
spECGWaveformChannel->ChannelTimeSkew = 0.0;

// Set the Waveform Channel Number
spECGWaveformChannel->ValueDefined [WAVEFORM_CHANNEL_NUMBER] = VARIANT_TRUE;
spECGWaveformChannel->WaveformChannelNumber = 0;

// Set the Channel Label
spECGWaveformChannel->ValueDefined [CHANNEL_LABEL] = VARIANT_TRUE;
spECGWaveformChannel->ChannelLabel = "First Channel";

// No Channel Offset. When the value is defined, it can be set using the ChannelOffset
// property
spECGWaveformChannel->ValueDefined [CHANNEL_OFFSET] = VARIANT_FALSE;

// Set the Filter Low Frequency
spECGWaveformChannel->ValueDefined [FILTER_LOW_FREQUENCY] = VARIANT_TRUE;
spECGWaveformChannel->FilterLowFrequency = 0.05;

// Set Filter High Frequency
spECGWaveformChannel->ValueDefined [FILTER_HIGH_FREQUENCY] = VARIANT_TRUE;
spECGWaveformChannel->FilterHighFrequency = 100.0;

// Set the Channel Minimum Value
spECGWaveformChannel->ValueDefined [CHANNEL_MINIMUM_VALUE] = VARIANT_TRUE;
spECGWaveformChannel->ChannelMinimumValue = -386;

// Set the Channel Maximum Value
spECGWaveformChannel->ValueDefined [CHANNEL_MAXIMUM_VALUE] = VARIANT_TRUE;
spECGWaveformChannel->ChannelMaximumValue = 1264;

// When the Notch Filter Frequency and Bandwidth are defined, they can be set using the
// NotchFilterFrequency and NotchFilterBandwidth properties.

// Last, but not least, set the channel annotations!
return SetChannelAnnotations(spECGWaveformChannel);
}

#define CID_3001 "CID 3001"
#define CID_3082 "CID 3082"

// Sets the Channel Source and Sensitivity
BOOL SetChannelSourceAndSensitivity(ILEADDicomDSPtr& spDataSet,
IDicomWaveformChannelPtr& spWaveformChannel)
{
// We will use the Context Group Table

IDicomCodedConceptPtr spCodedConcept;
spCodedConcept = spDataSet->CurrentCodedConcept;

// -------------------- Channel Source --------------------

// Load the ECG Leads Context Group
spDataSet->LoadContextGroup(CID_3001);
if (!spDataSet->FindContextGroup(CID_3001))
{
return FALSE;
}

// 5.6.3-9-1 is Lead I (Einthoven)
if (!spDataSet->FindCodedConcept("SCPECG", "5.6.3-9-1"))
{
return FALSE;
}

IDicomCodeSequenceItemPtr spChannelSource;
spChannelSource = spWaveformChannel->ChannelSource;

// Set the Channel Source
spChannelSource->CodingSchemeDesignator = spCodedConcept->CodingSchemeDesignator;
spChannelSource->CodingSchemeVersion = spCodedConcept->CodingSchemeVersion;
spChannelSource->CodeValue = spCodedConcept->CodeValue;
spChannelSource->CodeMeaning = spCodedConcept->CodeMeaning;

// -------------------- Channel Sensitivity --------------------

spWaveformChannel->ValueDefined [CHANNEL_SENSITIVITY] = VARIANT_TRUE;

// The Channel Sensitivity
spWaveformChannel->ChannelSensitivity= 0.00122;

// Load the Cardiology Units of Measurement Context Group
spDataSet->LoadContextGroup(CID_3082);
if (!spDataSet->FindContextGroup(CID_3082))
{
return FALSE;
}

if (!spDataSet->FindCodedConcept("UCUM", "mV"))
{
return FALSE;
}

IDicomCodeSequenceItemPtr spChannelSensitivityUnits;
spChannelSensitivityUnits = spWaveformChannel->ChannelSensitivityUnits;

// The Channel Sensitivity Units
spChannelSensitivityUnits->CodingSchemeDesignator = spCodedConcept->CodingSchemeDesignator;
spChannelSensitivityUnits->CodingSchemeVersion = spCodedConcept->CodingSchemeVersion;
spChannelSensitivityUnits->CodeValue = spCodedConcept->CodeValue;
spChannelSensitivityUnits->CodeMeaning = spCodedConcept->CodeMeaning;

// The Channel Sensitivity Correction Factor
spWaveformChannel->ChannelSensitivityCF = 1.0;

// The Channel Baseline
spWaveformChannel->ChannelBaseline = 0.0;

return TRUE;
}

// Adds annotations for the channel
BOOL SetChannelAnnotations(IDicomWaveformChannelPtr& spWaveformChannel)
{
// Delete any existing channel annotations
while (spWaveformChannel->Annotations->Count> 0)
{
spWaveformChannel->Annotations->Remove (0);
}

IDicomWaveformAnnotationPtr spECGWaveformAnnotation;

// Add an annotation object
spECGWaveformAnnotation = spWaveformChannel->Annotations->Add();

// Our annotation is defined by a Coded Name/Numeric Measurement pair
spECGWaveformAnnotation->ValueType = TYPE_CODED_NAME_AND_NUMERIC_VALUE;

IDicomCodeSequenceItemPtr spCodeSequenceItem;

// The Coded Name. Note: Instead of setting these values directly, you can also use
// the Context Group Table; the Context Groups defined by the DICOM Content Mapping
// Resource (DCMR) can be loaded into this table. Take a look at the function
// SetChannelSourceAndSensitivity above for an example.
spCodeSequenceItem = spECGWaveformAnnotation->CodedName;
spCodeSequenceItem->CodingSchemeDesignator = "LN";
spCodeSequenceItem->CodingSchemeVersion = "19971101";
spCodeSequenceItem->CodeValue = "8867-4";
spCodeSequenceItem->CodeMeaning = "Heart rate";

// The Numeric Value
spECGWaveformAnnotation->NumericValueCount = 1;
spECGWaveformAnnotation->NumericValue[0] = 69.0;

// The Measurement Units. Refer to the note given when the Coded Name was set.
spECGWaveformAnnotation->ValueDefined[MEASUREMENT_UNITS] = VARIANT_TRUE;
spCodeSequenceItem = spECGWaveformAnnotation->MeasurementUnits;
spCodeSequenceItem->CodingSchemeDesignator = "UCUM";
spCodeSequenceItem->CodingSchemeVersion = "1.4";
spCodeSequenceItem->CodeValue = "{H.B.}/min";
spCodeSequenceItem->CodeMeaning = "Heart beat per minute";

return TRUE;
}


InsertIOD Example for Visual C++ 6.0

InsertIOD Example for C++ 6.0 and later

BOOL bInsert;
long lCode;
short nType;
long hIOD;
long hTemp;
short nRet;
IDicomIODItemPtr pCurrentIOD=NULL;

bInsert = FALSE;

m_pLEADDicomDS->EnableMethodErrors = FALSE;

lCode = 1048593;
nType = DICOM_IOD_TYPE_CLASS;
//store current IOD
m_pLEADDicomDS->MoveFirstIOD (FALSE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
hIOD = pCurrentIOD->GethIOD();

//does an IOD already exist on the target level?
if(bChild)
{
//if the current IOD has a child, move to that child's level
nRet = m_pLEADDicomDS->MoveChildIOD();
if(nRet != 0) //no children, so insert is OK
{
bInsert = TRUE;
m_pLEADDicomDS->SetCurrentIOD (hIOD);
}
else //check the child's level to see if target IOD already exists
{
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
hTemp = pCurrentIOD->GethIOD();
m_pLEADDicomDS->MoveFirstIOD (TRUE);
nRet = m_pLEADDicomDS->FindIOD (lCode, nType, TRUE);
if(nRet != 0)
bInsert = TRUE;
//move back to parent level
m_pLEADDicomDS->SetCurrentIOD (hTemp);
m_pLEADDicomDS->MoveParentIOD ();
}
}
else
{
//check the current IOD's level
m_pLEADDicomDS->MoveFirstIOD (TRUE);
nRet = m_pLEADDicomDS->FindIOD (lCode, nType, TRUE);
if(nRet != 0)
bInsert = TRUE;
m_pLEADDicomDS->SetCurrentIOD (hIOD);
}

//allow user to insert item at the same level as the current or as child
if(bInsert)
{
nRet = m_pLEADDicomDS->InsertIOD(bChild, nType, lCode, "My Test IOD", 5, "Test Description");
if(nRet != 0)
AfxMessageBox("Error");
}
else
AfxMessageBox("Already exists");


InsertKey Example for C++ 6.0 and later

InsertKey Example for C++ 6.0 or later

void CDicomDlg::DisplayKeyInfo1()
{
CString strMsg;
CString strTmp;

//move to root KEY (PATIENT)
m_pLEADDicomDS->MoveFirstKey(FALSE);
BSTR bstr = m_pLEADDicomDS->GetKeyValue();
CString cs = bstr;
SysFreeString(bstr);
strMsg.Format("Root Key[%s]\n", cs );

//move to child KEY (STUDY)
m_pLEADDicomDS->MoveChildKey ();

//move to child KEY (SERIES)
m_pLEADDicomDS->MoveChildKey ();

//find first SERIES
m_pLEADDicomDS->FindFirstKey ("SERIES", TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);
m_pLEADDicomDS->GetStringValue (0, 1);
bstr = m_pLEADDicomDS->GetStringValues (0);
cs = bstr;
SysFreeString(bstr);
strTmp.Format("First Series Key[%s]\n", cs);
strMsg = strMsg + strTmp;

//find next series
m_pLEADDicomDS->FindNextKey(TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);
m_pLEADDicomDS->GetStringValue (0, 1);
bstr = m_pLEADDicomDS->GetStringValues (0);
cs = bstr;
SysFreeString(bstr);
strTmp.Format("Next Series Key[%s]\n", cs );
strMsg = strMsg + strTmp;

//find last SERIES
m_pLEADDicomDS->FindLastKey("SERIES", TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);
m_pLEADDicomDS->GetStringValue (0, 1);
bstr = m_pLEADDicomDS->GetStringValues (0);
cs = bstr;
SysFreeString(bstr);
strTmp.Format("Last Series Key[%s]\n", cs );
strMsg = strMsg + strTmp;

//find previous SERIES
m_pLEADDicomDS->FindPrevKey(TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);
m_pLEADDicomDS->GetStringValue (0, 1);
bstr = m_pLEADDicomDS->GetStringValues (0);
cs = bstr;
SysFreeString(bstr);
strTmp.Format("Previous Series Key[%s]\n", cs );
strMsg = strMsg + strTmp;

AfxMessageBox(strMsg);
}

void CDicomDlg::DisplayKeyInfo2()
{
CString strMsg;
CString strTmp;

//move to root KEY (PATIENT)
m_pLEADDicomDS->MoveFirstKey(FALSE);
strMsg.Format("Root Key[%s]\n", m_pLEADDicomDS->GetKeyValue() );

//move to child KEY (STUDY)
m_pLEADDicomDS->MoveChildKey ();

//move to child KEY (SERIES)
m_pLEADDicomDS->MoveChildKey ();

//find first SERIES
m_pLEADDicomDS->MoveFirstKey(TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);
m_pLEADDicomDS->GetStringValue (0, 1);
strTmp.Format("First Series Key[%s]\n", m_pLEADDicomDS->GetStringValues (0));
strMsg = strMsg + strTmp;

//find next series
m_pLEADDicomDS->MoveNextKey(TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);
m_pLEADDicomDS->GetStringValue (0, 1);
strTmp.Format("Next Series Key[%s]\n", m_pLEADDicomDS->GetStringValues (0) );
strMsg = strMsg + strTmp;

//find last SERIES
m_pLEADDicomDS->MoveLastKey(TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);
m_pLEADDicomDS->GetStringValue (0, 1);
strTmp.Format("Last Series Key[%s]\n", m_pLEADDicomDS->GetStringValues (0) );
strMsg = strMsg + strTmp;

//find previous SERIES
m_pLEADDicomDS->MovePrevKey(TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);
m_pLEADDicomDS->GetStringValue (0, 1);
strTmp.Format("Previous Series Key[%s]\n", m_pLEADDicomDS->GetStringValues (0) );
strMsg = strMsg + strTmp;

AfxMessageBox(strMsg);
}

void CDicomDlg::TestInsertKey()
{
CString strMsg;
CString strTmp;
long hTemp=0;

m_pLEADDicomDS->ResetDS ();
m_pLEADDicomDS->InitDS (DICOM_CLASS_BASIC_DIRECTORY, 0);

//insert some keys
m_pLEADDicomDS->InsertKey ("PATIENT", TRUE); //insert PATIENT level key
m_pLEADDicomDS->InsertKey ("STUDY", TRUE); //insert STUDY level key

//insert 5 SERIES level keys and some data
for (int i=0; i<5; i++)
{
m_pLEADDicomDS->StringValueCount = 1;
m_pLEADDicomDS->InsertKey ("SERIES", TRUE);
m_pLEADDicomDS->MoveChildElement ();
m_pLEADDicomDS->FindFirstElement (TAG_REFERENCED_FILE_ID, TRUE);

strTmp.Format("%d", i);
BSTR bstr = strTmp.AllocSysString();
m_pLEADDicomDS->StringValues [0] = bstr;
SysFreeString(bstr);
m_pLEADDicomDS->SetStringValue (1);
m_pLEADDicomDS->MoveParentElement ();
m_pLEADDicomDS->MoveParentKey (); //move back up one level
}

//DisplayKeyInfo1 displays the information in the tree
DisplayKeyInfo1();

//find last SERIES and delete it
m_pLEADDicomDS->MoveRootKey ();
m_pLEADDicomDS->MoveChildKey ();
m_pLEADDicomDS->MoveChildKey ();
m_pLEADDicomDS->FindLastKey ("SERIES", TRUE);
m_pLEADDicomDS->DeleteKey ();

AfxMessageBox("Deleting Last Series Key...");

//DisplayKeyInfo2 displays the same information as DisplayKeyInfo1 using different functions
DisplayKeyInfo1();
}


InsertModule Example for C++ 6.0 and later

short nRet;
IDicomDSModulePtr pCurrentModule=NULL;
IDicomIODItemPtr pCurrentIOD=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
m_pLEADDicomDS->GetInfoDS ();
nRet = m_pLEADDicomDS->InsertModule (DICOM_MODULE_LUT_IDENTIFICATION, TRUE);
if(nRet != 0)
AfxMessageBox("Error Inserting Module!");
else
{
pCurrentModule = m_pLEADDicomDS->GetCurrentModule();
nRet = m_pLEADDicomDS->FindModuleIOD (m_pLEADDicomDS->GetInfoClass(), pCurrentModule->GetModule());
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD ();
AfxMessageBox("Inserted Module " + pCurrentIOD->GetName());
}


InsertTag Example for Visual C++ 6.0

InsertTag Example for C++ 6.0 and later

short nRet;
ILEADDicomTagPtr pCurrentTag=NULL;
int nIndex;
CString szItem;

nRet = m_pLEADDicomDS->FindTag(131079);
if(nRet == 0)
{
AfxMessageBox("Already Exists!");
return;
}
nRet = m_pLEADDicomDS->InsertTag (131079, -1, "My Test Tag", VR_OB, 1, 1, 1);
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
//add item to the ListView control
pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();
szItem.Format("%04X:%04X", GETGROUP(pCurrentTag->GetCode()),
GETELEMENT(pCurrentTag->GetCode()));
nIndex = m_ListView1.InsertItem(m_ListView1.GetItemCount(), szItem);

szItem.Format("%04X:%04X", GETGROUP(pCurrentTag->GetMask()), GETELEMENT(pCurrentTag->GetMask()));
m_ListView1.SetItemText(nIndex, 1, szItem);
BSTR bstr = pCurrentTag->GetName();
szItem = bstr;
SysFreeString(bstr);
m_ListView1.SetItemText(nIndex, 2, szItem);
szItem.Format("%d", pCurrentTag->GetVR());
m_ListView1.SetItemText(nIndex, 3, szItem);
szItem.Format("%d", pCurrentTag->GetMinVM());
m_ListView1.SetItemText(nIndex, 4, szItem);
szItem.Format("%d", pCurrentTag->GetMaxVM());
m_ListView1.SetItemText(nIndex, 5, szItem);
szItem.Format("%d", pCurrentTag->GetDivideVM());
m_ListView1.SetItemText(nIndex, 6, szItem);

m_ListView1.SetItemState(nIndex, LVIS_SELECTED, LVIF_STATE);
m_ListView1.Update(nIndex);


InsertUID Example for Visual C++ 6.0

InsertUID Example for C++ 6.0 and later

short nRet;
IDicomUIDItemPtr pCurrentUID=NULL;
int nIndex;
CString szItem;

nRet = m_pLEADDicomDS->FindUID("1.2.840.10008.1.3");
if(nRet == 0)
{
AfxMessageBox("Already Exists!");
return;
}
nRet = m_pLEADDicomDS->InsertUID ("1.2.840.10008.1.3", "My Test UID", DICOM_UID_TYPE_OTHER);
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
//add item to the ListView control
pCurrentUID = m_pLEADDicomDS->GetCurrentUID ();
BSTR bstr = pCurrentUID->GetCode();
szItem = bstr;
SysFreeString(bstr);
nIndex = m_ListView1.InsertItem(m_ListView1.GetItemCount(), szItem);

bstr = pCurrentUID->GetName();
szItem = bstr;
SysFreeString(bstr);
m_ListView1.SetItemText(nIndex, 1, szItem);

m_ListView1.SetItemState(nIndex, LVIS_SELECTED, LVIF_STATE);
m_ListView1.Update(nIndex);


InsertVR Example for Visual C++ 6.0

InsertVR Example for C++ 6.0 and later

short nRet;
short nCode;
short nRestrict;
IDicomVRItemPtr pCurrentVR=NULL;
int nIndex;
CString szItem;

nCode = 10234;
nRestrict = DICOM_VR_FIXED | DICOM_VR_TEXT;
nRet = m_pLEADDicomDS->FindVR (nCode);
if(nRet == 0)
{
AfxMessageBox("Already Exists!");
return;
}
nRet = m_pLEADDicomDS->InsertVR (nCode, "My Test VR", 64, nRestrict, 1);
if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
//add item to the ListView control
pCurrentVR = m_pLEADDicomDS->GetCurrentVR();
szItem.Format("%ld", pCurrentVR->GetCode());
nIndex = m_ListView1.InsertItem(m_ListView1.GetItemCount(), szItem);

BSTR bstr = pCurrentVR->GetName();
szItem = bstr;
SysFreeString(bstr);
m_ListView1.SetItemText(nIndex, 1, szItem);
szItem.Format("%ld", pCurrentVR->GetLength());
m_ListView1.SetItemText(nIndex, 2, szItem);
szItem.Format("%d", pCurrentVR->GetRestrict());
m_ListView1.SetItemText(nIndex, 3, szItem);
szItem.Format("%d", pCurrentVR->GetUnitSize());
m_ListView1.SetItemText(nIndex, 4, szItem);

m_ListView1.SetItemState(nIndex, LVIS_SELECTED, LVIF_STATE);
m_ListView1.Update(nIndex);


IsActivated Example for C++ 6.0 and later

{

CString strMsg;
BOOL bActivated, bConnected, bAssociated;

bActivated = m_pLEADDicomNet->IsActivated (m_pLEADDicomNet->GethNet());
bConnected = m_pLEADDicomNet->IsConnected (m_pLEADDicomNet->GethNet());
bAssociated = m_pLEADDicomNet->IsAssociated (m_pLEADDicomNet->GethNet());

strMsg.Format("IsActive[%d]\nIsConnected[%d]\nIsAssociated[%d]", bActivated, bConnected, bAssociated);
AfxMessageBox(strMsg);
}


IsAsyncOperations Example for C++ 6.0 and later

{
CString cStr;

//...Assume association has been created
if (m_pLEADDicomNet->IsAsyncOperations(m_pLEADDicomNet->GethPDU()) )
{
//get the operations counts
long lInvoked = m_pLEADDicomNet->GetInvokedOperationsCount(m_pLEADDicomNet->GethPDU());
long lPerformed = m_pLEADDicomNet->GetPerformedOperationsCount(m_pLEADDicomNet->GethPDU());

//now disable it
m_pLEADDicomNet->SetAsyncOperations(m_pLEADDicomNet->GethPDU(), FALSE, 0, 0);
cStr.Format("AsyncOperations Disabled:\n\tInvoked[%d]\n\tPerformed[%d]", lInvoked, lPerformed);
AfxMessageBox(cStr);
}
else
{
m_pLEADDicomNet->SetAsyncOperations(m_pLEADDicomNet->GethPDU(), TRUE, 0, 0);
AfxMessageBox("AsyncOperations enabled");
}
}


ISCLChallengeResponseSuccess Example for C++ 6.0 and later

void CDicomNetSink::OnNetExternalAuthenticateISCL(long hNet, VARIANT FAR* pnChallenge, VARIANT FAR* pnResponse, VARIANT FAR* pnParameter)
{
if(pnChallenge->cyVal.int64 + pnParameter->cyVal.int64 == pnResponse->cyVal.int64)
m_pDlg->m_pLEADDicomNet->ISCLChallengeResponseSuccess = VARIANT_TRUE;
else
m_pDlg->m_pLEADDicomNet->ISCLChallengeResponseSuccess = VARIANT_FALSE;
}

static __int64 GetRandom()
{
__int64 RandVal;
RandVal = rand();
RandVal = RandVal * 0x10000 + rand();
RandVal = RandVal * 0x10000 + rand();
RandVal = RandVal * 0x10000 + rand();
return RandVal;
}

void CDicomNetSink::OnNetGetChallengeISCL(long hNet, VARIANT FAR* pnChallenge, VARIANT FAR* pnParameter)
{
COleCurrency cyChallenge;
cyChallenge.m_cur.int64 = GetRandom() + pnParameter->cyVal.int64;
*pnChallenge = COleVariant(cyChallenge);
m_pDlg->m_pLEADDicomNet->ISCLChallengeResponseSuccess = VARIANT_TRUE;
}

void CDicomNetSink::OnNetInternalAuthenticateISCL(long hNet, VARIANT FAR* pnChallenge, VARIANT FAR* pnResponse, VARIANT FAR* pnParameter)
{
COleCurrency cyResponse;
cyResponse.m_cur.int64 = pnChallenge->cyVal.int64 + pnParameter->cyVal.int64;
*pnResponse = COleVariant(cyResponse);
m_pDlg->m_pLEADDicomNet->ISCLChallengeResponseSuccess = VARIANT_TRUE;
}


IsImplementClass Example for C++ 6.0 and later

{
_bstr_t szUID;

//...Assume association has been created

//is implement enabled?
if (m_pLEADDicomNet->IsImplementClass (m_pLEADDicomNet->GethPDU()))
{
//disable it
//display old value
szUID = m_pLEADDicomNet->GetImplementClass (m_pLEADDicomNet->GethPDU());
AfxMessageBox("Implement Class Disabled: " + szUID);
m_pLEADDicomNet->SetImplementClass(m_pLEADDicomNet->GethPDU(), FALSE, szUID);
}
else
{
//enable it
m_pLEADDicomNet->SetImplementClass(m_pLEADDicomNet->GethPDU(), TRUE, UID_RT_DOSE_STORAGE);
szUID = m_pLEADDicomNet->GetImplementClass (m_pLEADDicomNet->GethPDU());
AfxMessageBox("Implement Class Enabled: " + szUID);
}
}


IsImplementVersion Example for C++ 6.0 and later

{
_bstr_t strVersion, strMsg;
int nRet;

//...Assume association has been created
if (m_pLEADDicomNet->IsImplementVersion (m_pLEADDicomNet->GethPDU()))
{
//disable it and display old value
strVersion = m_pLEADDicomNet->GetImplementVersion (m_pLEADDicomNet->GethPDU());
nRet = m_pLEADDicomNet->SetImplementVersion (m_pLEADDicomNet->GethPDU(), FALSE, strVersion);
strMsg = "ImplementVersion Disabled: \n" + strVersion;
AfxMessageBox(strMsg);
}
else
{
//enable it
nRet = m_pLEADDicomNet->SetImplementVersion (m_pLEADDicomNet->GethPDU(), TRUE, "v11.0");
strVersion = m_pLEADDicomNet->GetImplementVersion (m_pLEADDicomNet->GethPDU());
strMsg = "ImplementVersion Enabled: \n" + strVersion;
AfxMessageBox(strMsg);
}
}


IsISCLQueueEmpty Example for C++ 6.0 and later

{
if(m_pLEADDicomNet->IsISCLQueueEmpty (m_pLEADDicomNet->GethNet ()))
AfxMessageBox("ISCL queue is empty");
else
AfxMessageBox("ISCL queue is not empty");
}


IsMaxLengthEnabled Example for C++ 6.0 and later

{
long lLen;
CString cStr;

//...Assume association has been created

//is max len enabled?
if (m_pLEADDicomNet->IsMaxLengthEnabled (m_pLEADDicomNet->GethPDU()) )
{
//disable it and display old value
lLen = m_pLEADDicomNet->GetMaxLength (m_pLEADDicomNet->GethPDU());
cStr.Format("Maximum Length Disabled: %d", lLen);
AfxMessageBox(cStr);
m_pLEADDicomNet->SetMaxLength (m_pLEADDicomNet->GethPDU(), FALSE, lLen);
}
else
{
//enable it
long lNewLen = 8;
m_pLEADDicomNet->SetMaxLength (m_pLEADDicomNet->GethPDU(), TRUE, lNewLen);
cStr.Format("Maximum Length Enabled: %d", lNewLen);
AfxMessageBox(cStr);
}
}


IsRoleSelect Example for C++ 6.0 and later

{
long i ;
short nID ;
CString strMsg ;
CString strTmp;
int nUser ;
int nProvider;

//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate (TRUE);
//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

//indicate that we wish to serve as user for each SOP associated
for (i = 0; i < m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(), i);
m_pLEADDicomNet->SetRoleSelect( m_pLEADDicomNet->GethPDU(),
nID, TRUE,
PDU_ROLE_SUPPORT,
PDU_ROLE_NON_SUPPORT);
}

//now, display the information
strMsg = "Role Select Info\n";
for (i = 0; i < m_pLEADDicomNet->GetPresentationCount (m_pLEADDicomNet->GethPDU()); i++)
{
nID = m_pLEADDicomNet->GetPresentationID (m_pLEADDicomNet->GethPDU(), i);
strTmp.Format("ID[%d]\n", nID);
strMsg = strMsg + strTmp;

if (m_pLEADDicomNet->IsRoleSelect(m_pLEADDicomNet->GethPDU(), nID))
{
nUser = m_pLEADDicomNet->GetUserRole(m_pLEADDicomNet->GethPDU(), nID);
nProvider = m_pLEADDicomNet->GetProviderRole(m_pLEADDicomNet->GethPDU(), nID);
strTmp.Format("User[%d]\nProvider[%d]\n", nUser, nProvider);
strMsg = strMsg + strTmp;
}
else
{
strMsg = strMsg + "No Role Select\n";
}
}
AfxMessageBox(strMsg);
}


J2KCompressionRatio example for Visual C++ 5.0

J2KCompressionRatio example for C++ 5.0 and later

ILEADDicomDS *pLEADDicomDS = NULL;

BSTR lpLic = SysAllocString(_szLicString);
ILEADDicomFactory *pFactory=NULL;
CoCreateInstance(CLSID_LEADDicomFactory, NULL, CLSCTX_ALL,
IID_ILEADDicomFactory, (void**)&pFactory);
#if _MSC_VER < 1200
pLEADDicomDS = (ILEADDicomDS*)pFactory->CreateObject ("LEADDicomDS.LEADDicomDS", lpLic);
#else
ILEADDicomDSPtr spLEADDicomDS=NULL;
spLEADDicomDS = pFactory->CreateObject ("LEADDicomDS.LEADDicomDS", lpLic);
pLEADDicomDS = spLEADDicomDS;
pLEADDicomDS->AddRef();//because when spLEADDicomDS goes out of scope, it will auto Release()!
#endif
pLEADDicomDS->EnableMethodErrors = FALSE;

// Unlock DICOM & J2K support.
ILEADDicomKernel *pLEADDicomKernel = NULL;
#if _MSC_VER < 1200
pLEADDicomKernel = (ILEADDicomKernel*)pFactory->CreateObject ("LEADDicomKernel.LEADDicomKernel", lpLic);
#else
ILEADDicomKernelPtr spLEADDicomKernel=NULL;
spLEADDicomKernel = pFactory->CreateObject ("LEADDicomKernel.LEADDicomKernel", lpLic);
pLEADDicomKernel = spLEADDicomKernel;
pLEADDicomKernel->AddRef();//because when spLEADDicomKernel goes out of scope, it will auto Release()!
#endif
pFactory->Release();
SysFreeString(lpLic);

pLEADDicomKernel->UnlockSupport (L_SUPPORT_J2K,L_KEY_J2K);
pLEADDicomKernel->UnlockSupport (L_SUPPORT_MEDICAL,L_KEY_MEDICAL);
pLEADDicomKernel->Release();

pLEADDicomDS->InitDS (DICOM_CLASS_CR_IMAGE_STORAGE,
DS_EXPLICIT_VR |
DS_METAHEADER_ABSENT |
DS_LITTLE_ENDIAN);
//load an image
ILEADRasterIO *pRasterIO=NULL;
HRESULT hr;
hr = CoCreateInstance(CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO);
pRasterIO->EnableMethodErrors = FALSE;

pRasterIO->Load(m_LEADRasterView1.GetRaster(), "d:\\lead14\\dist\\images\\dicom\\image3.dic", 0, 1, 1);
AfxMessageBox("Image loaded from File - Wait");
pRasterIO->Release();
//insert the image into the element
pLEADDicomDS->Bitmap = m_LEADRasterView1.GetRaster().GetBitmap();
// Default Options
IDicomJ2KOptionsPtr pJ2K = pLEADDicomDS->J2KOptions();
pJ2K->J2KSetDefaults();
//Use the Compression ratio
pJ2K->J2KCompressionControl = DICOM_J2K_COMP_RATIO;
pJ2K->J2KCompressionRatio= 10;
//set the bitmap
pLEADDicomDS->SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
0, 0, 0);
pLEADDicomDS->SaveDS ("d:\\temp\\out.dic", 0);


J2KROIControl example for Visual C++ 5.0

J2KROIControl example for C++ 5.0 and later

ILEADDicomDS *pLEADDicomDS = NULL;

BSTR lpLic = SysAllocString(_szLicString);
ILEADDicomFactory *pFactory=NULL;
CoCreateInstance(CLSID_LEADDicomFactory, NULL, CLSCTX_ALL,
IID_ILEADDicomFactory, (void**)&pFactory);
#if _MSC_VER < 1200
pLEADDicomDS = (ILEADDicomDS*)pFactory->CreateObject ("LEADDicomDS.LEADDicomDS", lpLic);
#else
ILEADDicomDSPtr spLEADDicomDS=NULL;
spLEADDicomDS = pFactory->CreateObject ("LEADDicomDS.LEADDicomDS", lpLic);
pLEADDicomDS = spLEADDicomDS;
pLEADDicomDS->AddRef();//because when spLEADDicomDS goes out of scope, it will auto Release()!
#endif
pLEADDicomDS->EnableMethodErrors = FALSE;

// Unlock DICOM & J2K support.
ILEADDicomKernel *pLEADDicomKernel = NULL;
#if _MSC_VER < 1200
pLEADDicomKernel = (ILEADDicomKernel*)pFactory->CreateObject ("LEADDicomKernel.LEADDicomKernel", lpLic);
#else
ILEADDicomKernelPtr spLEADDicomKernel=NULL;
spLEADDicomKernel = pFactory->CreateObject ("LEADDicomKernel.LEADDicomKernel", lpLic);
pLEADDicomKernel = spLEADDicomKernel;
pLEADDicomKernel->AddRef();//because when spLEADDicomKernel goes out of scope, it will auto Release()!
#endif
pFactory->Release();
SysFreeString(lpLic);

pLEADDicomKernel->UnlockSupport (L_SUPPORT_J2K,L_KEY_J2K);
pLEADDicomKernel->UnlockSupport (L_SUPPORT_MEDICAL,L_KEY_MEDICAL);
pLEADDicomKernel->Release();

pLEADDicomDS->InitDS (DICOM_CLASS_CR_IMAGE_STORAGE,
DS_EXPLICIT_VR |
DS_METAHEADER_ABSENT |
DS_LITTLE_ENDIAN);
//load an image
ILEADRasterIO *pRasterIO=NULL;
HRESULT hr;
hr = CoCreateInstance(CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO);
pRasterIO->EnableMethodErrors = FALSE;

pRasterIO->Load(m_LEADRasterView1.GetRaster(), "d:\\lead14\\dist\\images\\dicom\\image3.dic", 0, 1, 1);
AfxMessageBox("Image loaded from File - Wait");
pRasterIO->Release();
//insert the image into the element
pLEADDicomDS->Bitmap = m_LEADRasterView1.GetRaster().GetBitmap();
// Default Options
IDicomJ2KOptionsPtr pJ2K = pLEADDicomDS->J2KOptions();
pJ2K->J2KSetDefaults();
//Use the Compression ratio
pJ2K->J2KCompressionControl = DICOM_J2K_COMP_RATIO;
pJ2K->J2KCompressionRatio = 200;

pJ2K->J2KUseROI = TRUE;
pJ2K->J2KROIControl = J2K_USEOPTION_RECT;
pJ2K->J2KROILeft = 200;
pJ2K->J2KROITop = 200;
pJ2K->J2KROIWidth = 600;
pJ2K->J2KROIHeight = 600;
pJ2K->J2KXTsiz = 100;
pJ2K->J2KYTsiz = 100;
//set the bitmap
pLEADDicomDS->SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
0, 0, 0);
pLEADDicomDS->SaveDS ("d:\\temp\\out.dic", 0);


J2KSetDefaults example for Visual C++ 5.0

J2KSetDefaults example for C++ 5.0 and later

CString csmsg;
CString cstemp;

// Default Options
IDicomJ2KOptionsPtr pJ2K = m_pLEADDicomDS->J2KOptions();
pJ2K->J2KSetDefaults ();
pJ2K->J2KSetDefaults ();

cstemp.Format("J2KUseColorTransform = %d\n",
pJ2K->GetJ2KUseColorTransform());
csmsg = csmsg + cstemp;
cstemp.Format("J2KDerivedQuantization = %d\n",
pJ2K->GetJ2KDerivedQuantization());
csmsg = csmsg + cstemp;

cstemp.Format("J2KXOsiz = %d\n", pJ2K->J2KXOsiz);
csmsg = csmsg + cstemp;
cstemp.Format("J2KYOsiz = %d\n", pJ2K->J2KYOsiz);
csmsg = csmsg + cstemp;
cstemp.Format("J2KXTsiz = %d\n", pJ2K->J2KXTsiz);
csmsg = csmsg + cstemp;
cstemp.Format("J2KYTsiz = %d\n", pJ2K->J2KYTsiz);
csmsg = csmsg + cstemp;
cstemp.Format("J2KXTOsiz = %d\n", pJ2K->J2KXTOsiz);
csmsg = csmsg + cstemp;
cstemp.Format("J2KYTOsiz = %d\n", pJ2K->J2KYTOsiz);
csmsg = csmsg + cstemp;

cstemp.Format("J2KDecompLevel = %d\n", pJ2K->J2KDecompLevel);
csmsg = csmsg + cstemp;
cstemp.Format("J2KProgressOrder = %d\n", pJ2K->J2KProgressOrder);
csmsg = csmsg + cstemp;
cstemp.Format("J2KCodBlockWidth = %d\n", pJ2K->J2KCodBlockWidth);
csmsg = csmsg + cstemp;
cstemp.Format("J2KCodBlockHeight = %d\n", pJ2K->J2KCodBlockHeight);
csmsg = csmsg + cstemp;

cstemp.Format( "J2KCBS_SelectiveACBypass = %d\n",
pJ2K->GetJ2KCBS_SelectiveACBypass());
csmsg = csmsg + cstemp;
cstemp.Format("J2KCBS_ResetContextOnBoundaries = %d\n",
pJ2K->GetJ2KCBS_ResetContextOnBoundaries());
csmsg = csmsg + cstemp;
cstemp.Format( "J2KCBS_TerminationOnEachPass = %d\n",
pJ2K->GetJ2KCBS_TerminationOnEachPass());
csmsg = csmsg + cstemp;
cstemp.Format("J2KCBS_VerticallyCausalContext = %d\n",
pJ2K->GetJ2KCBS_VerticallyCausalContext());
csmsg = csmsg + cstemp;
cstemp.Format("J2KCBS_PredictableTermination = %d\n",
pJ2K->GetJ2KCBS_PredictableTermination());
csmsg = csmsg + cstemp;
cstemp.Format( "J2KCBS_ErrorResilienceSymbol = %d\n",
pJ2K->GetJ2KCBS_ErrorResilienceSymbol());
csmsg = csmsg + cstemp;

cstemp.Format( "J2KGuardBits = %d\n",
pJ2K->GetJ2KGuardBits());
csmsg = csmsg + cstemp;
cstemp.Format("J2KDerivedBaseMantissa = %d\n",
pJ2K->GetJ2KDerivedBaseMantissa());
csmsg = csmsg + cstemp;
cstemp.Format("J2KDerivedBaseExponent = %d\n",
pJ2K->GetJ2KDerivedBaseExponent());
csmsg = csmsg + cstemp;

cstemp.Format( "J2KUseSOPMarker = %d\n",
pJ2K->GetJ2KUseSOPMarker());
csmsg = csmsg + cstemp;
cstemp.Format("J2KUseEPHMarker = %d\n",
pJ2K->GetJ2KUseEPHMarker());
csmsg = csmsg + cstemp;
AfxMessageBox(csmsg);


J2KTargetFileSize example for Visual C++ 5.0

J2KTargetFileSize example for C++ 5.0 and later

ILEADDicomDS *pLEADDicomDS = NULL;

BSTR lpLic = SysAllocString(_szLicString);
ILEADDicomFactory *pFactory=NULL;
CoCreateInstance(CLSID_LEADDicomFactory, NULL, CLSCTX_ALL,
IID_ILEADDicomFactory, (void**)&pFactory);
#if _MSC_VER < 1200
pLEADDicomDS = (ILEADDicomDS*)pFactory->CreateObject ("LEADDicomDS.LEADDicomDS", lpLic);
#else
ILEADDicomDSPtr spLEADDicomDS=NULL;
spLEADDicomDS = pFactory->CreateObject ("LEADDicomDS.LEADDicomDS", lpLic);
pLEADDicomDS = spLEADDicomDS;
pLEADDicomDS->AddRef();//because when spLEADDicomDS goes out of scope, it will auto Release()!
#endif
pLEADDicomDS->EnableMethodErrors = FALSE;

// Unlock DICOM & J2K support.
ILEADDicomKernel *pLEADDicomKernel = NULL;
#if _MSC_VER < 1200
pLEADDicomKernel = (ILEADDicomKernel*)pFactory->CreateObject ("LEADDicomKernel.LEADDicomKernel", lpLic);
#else
ILEADDicomKernelPtr spLEADDicomKernel=NULL;
spLEADDicomKernel = pFactory->CreateObject ("LEADDicomKernel.LEADDicomKernel", lpLic);
pLEADDicomKernel = spLEADDicomKernel;
pLEADDicomKernel->AddRef();//because when spLEADDicomKernel goes out of scope, it will auto Release()!
#endif
pFactory->Release();
SysFreeString(lpLic);

pLEADDicomKernel->UnlockSupport (L_SUPPORT_J2K,L_KEY_J2K);
pLEADDicomKernel->UnlockSupport (L_SUPPORT_MEDICAL,L_KEY_MEDICAL);
pLEADDicomKernel->Release();

pLEADDicomDS->InitDS (DICOM_CLASS_CR_IMAGE_STORAGE,
DS_EXPLICIT_VR |
DS_METAHEADER_ABSENT |
DS_LITTLE_ENDIAN);
//load an image
ILEADRasterIO *pRasterIO=NULL;
HRESULT hr;
hr = CoCreateInstance(CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO);
pRasterIO->EnableMethodErrors = FALSE;

pRasterIO->Load(m_LEADRasterView1.GetRaster(), "d:\\lead14\\dist\\images\\dicom\\image3.dic", 0, 1, 1);
AfxMessageBox("Image loaded from File - Wait");
pRasterIO->Release();
//insert the image into the element
pLEADDicomDS->Bitmap = m_LEADRasterView1.GetRaster().GetBitmap();
// Default Options
IDicomJ2KOptionsPtr pJ2K = pLEADDicomDS->J2KOptions();
pJ2K->J2KSetDefaults ();

//Use the Compression ratio
pJ2K->J2KCompressionControl = DICOM_J2K_COMP_TARGETSIZE;
pJ2K->J2KTargetFileSize= 5*1024;

//set the bitmap
pLEADDicomDS->SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
0, 0, 0);
pLEADDicomDS->SaveDS ("d:\\temp\\out.dic", 0);


KeepPixelDataIntact Example for C++ 6.0 and later

// Load a Data Set
if (m_pLEADDicomDS->LoadDS ("d:\\LEAD14\\dist\\Images\\dicom\\Image1.dic", 0) == DICOM_SUCCESS)
{
if (m_pLEADDicomDS->GetKeepPixelDataIntact () == FALSE)
{
LPTSTR pszMessage;
pszMessage = "Would you like to keep the pixel data unchanged?\n" \
"If you choose Yes, then the resulting bitmap data " \
"will represent exactly what appears inside the " \
"DICOM file, but may not display properly. If you " \
"choose No, then the resulting bitmap data may not " \
"be identical to what appears inside the DICOM file, " \
"but will display properly.";
if (AfxMessageBox(pszMessage, MB_YESNO) == IDYES)
m_pLEADDicomDS->KeepPixelDataIntact = TRUE;
}

if (m_pLEADDicomDS->FindFirstElement (TAG_PIXEL_DATA, FALSE) == DICOM_SUCCESS)
{
m_pLEADDicomDS->GetBitmapValue (0, 0, ORDER_BGR, 0);

// ...
}
}


Listen Example for C++ 6.0 and later

#define PEER_PORT 1000
{
_bstr_t strMsg;
int nRet;

_bstr_t strHostIP = "";
int iPeerPort = PEER_PORT;

//startup the network
nRet = m_pLEADDicomNet->StartUp ();
AfxMessageBox("Startup\n");

//create a server to accept up to 25 clients
m_pLEADDicomNet->Listen (strHostIP, iPeerPort, 25);

AfxMessageBox("Listen\n");

//Display "Listen" in window pane
this->SetWindowText("Listen");
m_nClientOrServer = STATUS_SERVER;
}


LoadDS Example for C++ 6.0 and later

short nRet;

//load a Data Set
m_pLEADDicomDS->EnableMethodErrors = FALSE;
nRet = m_pLEADDicomDS->LoadDS ("d:\\lead14\\dist\\images\\dicom\\image2.dic", 0);
if(nRet != DICOM_SUCCESS)
AfxMessageBox("Error loading file!");
m_pLEADDicomDS->EnableMethodErrors = TRUE;


LoadDSArray Example for C++ 6.0 and later

void TestLoadArray(ILEADDicomDSPtr spDataSet)
{
HRESULT hr;
VARIANT varData;
BYTE* pData;
CFile DicomFile;
DWORD dwSize;
LPBYTE pByteArray;
int nDicomRet;
CString szClass;
CString szFlags;
CString szOut;

IDicomIODItemPtr pIOD=NULL;

spDataSet->EnableMethodErrors
 = FALSE;
spDataSet->ResetDS();

//Load the DICOM file from disk
DicomFile.Open("D:\\Program Files\\LEAD Technologies,
 Inc\\LEADTOOLS14\\Images\\IMAGE2.dic", CFile::modeRead);
//Get the size of the file
dwSize = DicomFile.GetLength();
//Allocate a buffer to hold the DICOM data
pByteArray = (LPBYTE) malloc(dwSize);
memset(pByteArray, 0,dwSize);
//Read data into buffer
DicomFile.Read(pByteArray, dwSize);
DicomFile.Close();
//Create a safe array to hold the data
SAFEARRAY* psa = SafeArrayCreateVector(VT_UI1, 0, dwSize);
VariantInit(&varData);
varData.vt = VT_ARRAY | VT_UI1;
varData.parray = psa;
_variant_t v;
v.Attach(varData);
if(psa)
{
if( SUCCEEDED( hr = SafeArrayAccessData(psa,
 (VOID**)&pData)))
{
//Put the data into
 the safe array
CopyMemory(pData,
 pByteArray, dwSize);
hr = SafeArrayUnaccessData(
 psa );
if ( SUCCEEDED( hr
 ) )
{
//Load
 the DICOM file from memory
nDicomRet
 = spDataSet->LoadDSArray(v,
 0);
if(nDicomRet
 == 0)
{
//Get
 the info of the DICOM dataset
spDataSet->GetInfoDS();
nDicomRet
 = spDataSet->FindClassIOD(spDataSet->GetInfoClass());
if(nDicomRet
 == 0)
{
//Get
 the name of the IOD class for this DICOM file and display it
pIOD
 = spDataSet->GetCurrentIOD();
BSTR
 bstr = pIOD->GetName();
szClass
 = bstr;
SysFreeString(bstr);
szOut.Format("Class:
 %s", szClass);
AfxMessageBox(szOut);
}
}
}
}
}

//Clean up
v.Detach();
SafeArrayDestroy(psa);
free(pByteArray);
spDataSet->ResetDS();
spDataSet->EnableMethodErrors = TRUE;
}


Modifying a Context Group Example for C++ 6.0 and later

void ModifyContextGroup(ILEADDicomDSPtr& spDicomDS)
{
spDicomDS->ResetContextGroup ();
spDicomDS->LoadContextGroup ("");

// Look for a Context Group
if (!spDicomDS->FindContextGroup ("CID 6019"))
{
return;
}

// Look for a Coded Concept in the current Context Group
if (!spDicomDS->FindCodedConcept ("SRT", "F-01781"))
{
return;
}

// Set the Code Meaning of the current Coded Concept (French translation)
spDicomDS->SetCodedConceptCodeMeaning("Situé à 1 heure");
// Refer to Enumerating the Coded Concepts of a Context Group Example
// for C++ 6.0 and later for the function DisplayCodedConcept
DisplayCodedConcept(spDicomDS, FALSE);

// Delete the current Coded Concept
spDicomDS->DeleteCodedConcept ();

// Add a (testing) Coded Concept to the current Context Group
spDicomDS->InsertCodedConcept ("CSD", "", "CV", "CM", VARIANT_FALSE, "", 0);
DisplayCodedConcept(spDicomDS, FALSE);

// Restore the current Context Group (discard all the changes
// made to the Group)
spDicomDS->DefaultContextGroup (VARIANT_FALSE);
// Refer to Enumerating the Coded Concepts of a Context Group Example
// for C++ 6.0 and later for the function EnumCodedConcepts
EnumCodedConcepts(spDicomDS);

// Delete the current Context Group
spDicomDS->DeleteContextGroup ();
}


MoveFirstIOD Example for Visual C++ 6.0

MoveFirstIOD Example for C++ 6.0 and later

IDicomIODItemPtr pCurrentIOD=NULL;
long hIOD;

//Move to the First IOD in the list
m_pLEADDicomDS->MoveFirstIOD (FALSE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
hIOD = pCurrentIOD->GethIOD(); //store it
AfxMessageBox(pCurrentIOD->GetName());

//Move to the Last IOD at this same level
m_pLEADDicomDS->MoveLastIOD(TRUE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName());

//Move to the Previous IOD at this same level
m_pLEADDicomDS->MovePrevIOD(TRUE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName());

//Move back to First IOD
m_pLEADDicomDS->SetCurrentIOD (hIOD);

//Move to the Next IOD at this same level
m_pLEADDicomDS->MoveNextIOD(TRUE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName());


MoveFirstTag Example for Visual C++ 6.0

MoveFirstTag Example for C++ 6.0 and later

m_pLEADDicomDS->MoveFirstTag ();
DisplayItem();
AfxMessageBox("wait");

m_pLEADDicomDS->MoveNextTag ();
DisplayItem();
AfxMessageBox("wait");

m_pLEADDicomDS->MoveLastTag ();
DisplayItem();
AfxMessageBox("wait");

m_pLEADDicomDS->MovePrevTag ();
DisplayItem();
AfxMessageBox("wait");

void CDicomDlg::DisplayItem()
{
CString szOut;
ILEADDicomTagPtr pCurrentTag=NULL;

pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();

szOut.Format("%04X:%04X", GETGROUP(pCurrentTag->GetCode()), GETELEMENT(pCurrentTag->GetCode()));
m_Text1.SetWindowText(szOut);

szOut.Format("%04X:%04X", GETGROUP(pCurrentTag->GetMask()), GETELEMENT(pCurrentTag->GetMask()));
m_Text2.SetWindowText(szOut);

m_Text3.SetWindowText(pCurrentTag->GetName());

//display the items information
switch(pCurrentTag->GetVR())
{
case VR_AE:
m_Text4.SetWindowText("AE");
break;
case VR_AS:
m_Text4.SetWindowText("AS");
break;
case VR_AT:
m_Text4.SetWindowText("AT");
break;
case VR_CS:
m_Text4.SetWindowText("CS");
break;
case VR_DA:
m_Text4.SetWindowText("DA");
break;
case VR_DS:
m_Text4.SetWindowText("DS");
break;
case VR_DT:
m_Text4.SetWindowText("DT");
break;
case VR_FD:
m_Text4.SetWindowText("FD");
break;
case VR_FL:
m_Text4.SetWindowText("FL");
break;
case VR_IS:
m_Text4.SetWindowText("IS");
break;
case VR_LO:
m_Text4.SetWindowText("LO");
break;
case VR_LT:
m_Text4.SetWindowText("LT");
break;
case VR_OB:
m_Text4.SetWindowText("OB");
break;
case VR_OW:
m_Text4.SetWindowText("OW");
break;
case VR_PN:
m_Text4.SetWindowText("PN");
break;
case VR_SH:
m_Text4.SetWindowText("SH");
break;
case VR_SL:
m_Text4.SetWindowText("SL");
break;
case VR_SQ:
m_Text4.SetWindowText("SQ");
break;
case VR_SS:
m_Text4.SetWindowText("SS");
break;
case VR_ST:
m_Text4.SetWindowText("ST");
break;
case VR_TM:
m_Text4.SetWindowText("TM");
break;
case VR_UI:
m_Text4.SetWindowText("UI");
break;
case VR_UL:
m_Text4.SetWindowText("UL");
break;
case VR_UN:
m_Text4.SetWindowText("UN");
break;
case VR_US:
m_Text4.SetWindowText("US");
break;
case VR_UT:
m_Text4.SetWindowText("UT");
break;
default:
szOut.Format("%d", pCurrentTag->GetVR());
m_Text4.SetWindowText(szOut);
break;
}

szOut.Format("%d", pCurrentTag->GetMinVM());
m_Text5.SetWindowText(szOut);
szOut.Format("%d", pCurrentTag->GetMaxVM());
m_Text6.SetWindowText(szOut);
szOut.Format("%d", pCurrentTag->GetDivideVM());
m_Text7.SetWindowText(szOut);
}


MoveFirstUID Example for Visual C++ 6.0

MoveFirstUID Example for C++ 6.0 and later

IDicomUIDItemPtr pCurrentUID=NULL;

m_pLEADDicomDS->MoveFirstUID();
pCurrentUID = m_pLEADDicomDS->GetCurrentUID ();
//display the items information
m_Text1.SetWindowText(pCurrentUID->GetCode());
m_Text2.SetWindowText(pCurrentUID->GetName());
AfxMessageBox("wait");

m_pLEADDicomDS->MoveNextUID();
pCurrentUID = m_pLEADDicomDS->GetCurrentUID ();
//display the items information
m_Text1.SetWindowText(pCurrentUID->GetCode());
m_Text2.SetWindowText(pCurrentUID->GetName());
AfxMessageBox("wait");

m_pLEADDicomDS->MoveLastUID();
pCurrentUID = m_pLEADDicomDS->GetCurrentUID ();
//display the items information
m_Text1.SetWindowText(pCurrentUID->GetCode());
m_Text2.SetWindowText(pCurrentUID->GetName());
AfxMessageBox("wait");

m_pLEADDicomDS->MovePrevUID();
pCurrentUID = m_pLEADDicomDS->GetCurrentUID ();
//display the items information
m_Text1.SetWindowText(pCurrentUID->GetCode());
m_Text2.SetWindowText(pCurrentUID->GetName());
AfxMessageBox("wait");


MoveFirstVR Example for Visual C++ 6.0

MoveFirstVR Example for C++ 6.0 and later

m_pLEADDicomDS->MoveFirstVR ();
DisplayVRItem();
AfxMessageBox("wait");

m_pLEADDicomDS->MoveNextVR ();
DisplayVRItem();
AfxMessageBox("wait");

m_pLEADDicomDS->MoveLastVR ();
DisplayVRItem();
AfxMessageBox("wait");

m_pLEADDicomDS->MovePrevVR ();
DisplayVRItem();
AfxMessageBox("wait");

void CDicomDlg::DisplayVRItem()
{
short nRestrict;
CString szOut;
IDicomVRItemPtr pCurrentVR=NULL;

pCurrentVR = m_pLEADDicomDS->GetCurrentVR();

//display the items information
switch(pCurrentVR->GetCode())
{
case VR_AE:
m_Text1.SetWindowText("AE");
break;
case VR_AS:
m_Text1.SetWindowText("AS");
break;
case VR_AT:
m_Text1.SetWindowText("AT");
break;
case VR_CS:
m_Text1.SetWindowText("CS");
break;
case VR_DA:
m_Text1.SetWindowText("DA");
break;
case VR_DS:
m_Text1.SetWindowText("DS");
break;
case VR_DT:
m_Text1.SetWindowText("DT");
break;
case VR_FD:
m_Text1.SetWindowText("FD");
break;
case VR_FL:
m_Text1.SetWindowText("FL");
break;
case VR_IS:
m_Text1.SetWindowText("IS");
break;
case VR_LO:
m_Text1.SetWindowText("LO");
break;
case VR_LT:
m_Text1.SetWindowText("LT");
break;
case VR_OB:
m_Text1.SetWindowText("OB");
break;
case VR_OW:
m_Text1.SetWindowText("OW");
break;
case VR_PN:
m_Text1.SetWindowText("PN");
break;
case VR_SH:
m_Text1.SetWindowText("SH");
break;
case VR_SL:
m_Text1.SetWindowText("SL");
break;
case VR_SQ:
m_Text1.SetWindowText("SQ");
break;
case VR_SS:
m_Text1.SetWindowText("SS");
break;
case VR_ST:
m_Text1.SetWindowText("ST");
break;
case VR_TM:
m_Text1.SetWindowText("TM");
break;
case VR_UI:
m_Text1.SetWindowText("UI");
break;
case VR_UL:
m_Text1.SetWindowText("UL");
break;
case VR_UN:
m_Text1.SetWindowText("UN");
break;
case VR_US:
m_Text1.SetWindowText("US");
break;
case VR_UT:
m_Text1.SetWindowText("UT");
break;
default:
szOut.Format("%d", pCurrentVR->GetCode());
m_Text1.SetWindowText(szOut);
break;
}
m_Text2.SetWindowText(pCurrentVR->GetName());
szOut.Format("%d", pCurrentVR->GetLength());
m_Text3.SetWindowText(szOut);

nRestrict = pCurrentVR->GetRestrict();
nRestrict &= ~DICOM_VR_BINARY;
nRestrict &= ~DICOM_VR_STRING;
nRestrict &= ~DICOM_VR_TEXT;

switch(nRestrict)
{
case DICOM_VR_FIXED:
m_Text4.SetWindowText("Fixed");
break;
case DICOM_VR_MAXIMUM:
m_Text4.SetWindowText("Maximum");
break;
case DICOM_VR_MAXIMUM_GROUP:
m_Text4.SetWindowText("Maximum Group");
break;
case DICOM_VR_ANY:
m_Text4.SetWindowText("Any Length");
break;
case DICOM_VR_NOT_APPLICABLE:
m_Text4.SetWindowText("Not Applicable");
break;
case DICOM_VR_MAX:
m_Text4.SetWindowText("Max");
break;
default:
szOut.Format("%d", pCurrentVR->GetRestrict());
m_Text4.SetWindowText(szOut);
break;
}
szOut.Format("%d", pCurrentVR->GetUnitSize());
m_Text5.SetWindowText(szOut);
}


MoveRootElement Example for C++ 6.0 and later

short nRet1;
short nRet2;
IDicomDSElementPtr pCurrentElement=NULL;
ILEADDicomTagPtr pCurrentTag=NULL;

m_pLEADDicomDS->EnableMethodErrors = FALSE;

//move to first element in Data Set
m_pLEADDicomDS->MoveFirstElement (FALSE);
pCurrentElement = m_pLEADDicomDS->GetCurrentElement ();
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();
AfxMessageBox("Element: " + pCurrentTag->GetName());

//move to next element in the same level of the Data Set
m_pLEADDicomDS->MoveNextElement (TRUE);
pCurrentElement = m_pLEADDicomDS->GetCurrentElement ();
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();
AfxMessageBox("Element: " + pCurrentTag->GetName());

//move to last element in the same level of the Data Set
m_pLEADDicomDS->MoveLastElement(TRUE);
pCurrentElement = m_pLEADDicomDS->GetCurrentElement();
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();
AfxMessageBox("Element: " + pCurrentTag->GetName());

//move to previous element in the same level of the Data Set
m_pLEADDicomDS->MovePrevElement(TRUE);
pCurrentElement = m_pLEADDicomDS->GetCurrentElement ();
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();
AfxMessageBox("Element: " + pCurrentTag->GetName());

//find the first element that has a child
nRet1 = m_pLEADDicomDS->MoveFirstElement (FALSE);
while(nRet1 == 0)
{
nRet2 = m_pLEADDicomDS->MoveChildElement ();
if(nRet2 == 0)
{
pCurrentElement = m_pLEADDicomDS->GetCurrentElement ();
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();
AfxMessageBox("Element: " + pCurrentTag->GetName());
nRet1 = 1; //end loop
}
if(nRet1 != 1)
{
//check next element in this same level
nRet1 = m_pLEADDicomDS->MoveNextElement (TRUE);
}
}
m_pLEADDicomDS->EnableMethodErrors = TRUE;
//move back to the element's parent
if(nRet1 == 1)
{
m_pLEADDicomDS->MoveParentElement ();
pCurrentElement = m_pLEADDicomDS->GetCurrentElement ();
m_pLEADDicomDS->FindTag(pCurrentElement->GetTag());
pCurrentTag = m_pLEADDicomDS->GetCurrentTag ();
AfxMessageBox("Element: " + pCurrentTag->GetName());
}


MoveRootIOD Example for Visual C++ 6.0

MoveRootIOD Example for C++ 6.0 and later

IDicomIODItemPtr pCurrentIOD=NULL;

m_pLEADDicomDS->FindIOD (DICOM_CLASS_US_IMAGE_STORAGE,
DICOM_IOD_TYPE_CLASS,
TRUE);

//Move to the Root IOD
m_pLEADDicomDS->MoveRootIOD ();
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD ();

AfxMessageBox(pCurrentIOD->GetName());

//Move to the first Child IOD
m_pLEADDicomDS->MoveChildIOD();
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD ();
AfxMessageBox(pCurrentIOD->GetName());

//Move back to the Parent IOD
m_pLEADDicomDS->MoveParentIOD ();
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD ();
AfxMessageBox(pCurrentIOD->GetName());


NetClose Example for C++ 6.0 and later

void CDicomNetSink::OnNetClose(long hNet, long nStatus, long hPeer)
{
_bstr_t strMsg;
CString strTmp;

strMsg = "*** NetClose Event ***\n";

//display some information about the connection:
strMsg = strMsg + "Host [" + m_pDlg->m_pLEADDicomNet->GetHostAddress (hNet) + "]\n";
strTmp.Format("Port[%d]\n\n", m_pDlg->m_pLEADDicomNet->GetHostPort (hNet));
strMsg = strMsg + strTmp;
strMsg = strMsg + "Peer[" + m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet) + "]\n";
strTmp.Format("Port[%d]\n", m_pDlg->m_pLEADDicomNet->GetPeerPort (hNet));
strMsg = strMsg + strTmp;
AfxMessageBox(strMsg);
}


NetConnect Example for C++ 6.0 and later

void CDicomNetSink::OnNetConnect (long hNet, short nStatus)
{

CString cStr;
CString strTemp;
cStr.Format("*** NetConnect Event ***\nhNet[%x]\tnStatus[%d]\n", hNet, nStatus);

BSTR bstr = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
CString strPeerAddress = bstr;
SysFreeString(bstr);

long lPeerPort = m_pDlg->m_pLEADDicomNet->GetPeerPort (hNet);

strTemp.Format("PeerAddress[%s]\nPeerPort[%d]\n", strPeerAddress, lPeerPort);
cStr = cStr + strTemp;

AfxMessageBox(cStr);
}


NetNonSecureReceivedISCL example for C++ 6.0 and later

void CDicomNetSink::OnNetNonSecureReceivedISCL ( long hNet, long nError, VARIANT * vBuffer, long nLength )
{
if(nError == DICOM_SUCCESS)
{

long Byte_1st, Byte_last, index_1st=0, index_last=nLength - 1;
SafeArrayGetElement(vBuffer->parray, &index_1st, &Byte_1st);
SafeArrayGetElement(vBuffer->parray, &index_last, &Byte_last);
CString strMsg;
strMsg.Format("1st byte of data = %ld, last byte of data = %ld", Byte_1st, Byte_last);
AfxMessageBox(strMsg);
}
}


NetNonSecureSendISCL Example for C++ 6.0 and later

void CDicomNetSink::OnNetNonSecureSendISCL ( long hNet, long nError, long nType, long nLength )
{
if(nError == DICOM_SUCCESS)
AfxMessageBox("Data was successfully received");
}


NetReceive Example for C++ 6.0 and later

NetReceive Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceive(long hNet, short nStatus, short nType, const VARIANT FAR& pData, long lSize)
{
CString strMsg;
BSTR bstr;
CString strPeerAddress;

bstr = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strPeerAddress = bstr;
SysFreeString(bstr);

strMsg.Format("*** NetReceive Event***\nPeer[%s]\nnStatus[%d]\nnType[%d]\nlSize[%d]",
strPeerAddress,
nStatus,
nType,
lSize);

AfxMessageBox(strMsg);
}


NetReceiveAbort (Communication Control)Example for C++ 6.0 and later

NetReceiveAbort Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveAbort (long hNet, short nSource, short nReason)
{
CString strMsg;
strMsg.Format("*** NetReceiveAbort Event ***\nSource[%d]\nReason[%d]", nSource, nReason);
AfxMessageBox(strMsg);
}


NetReceiveAssociateAccept (Communication Control)Example for C++ 6.0 and later

NetReceiveAssociateAccept Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveAssociateAccept (long hNet, long hPDU)
{
//Client receives this event
CString strMsg;
strMsg.Format("*** NetReceiveAssociateAccept Event ***\nIsAssociated[%d]",m_pDlg->m_pLEADDicomNet->IsAssociated (hNet));
AfxMessageBox(strMsg);
}


NetReceiveAssociateReject (Communication Control)Example for C++ 6.0 and later

NetReceiveAssociateReject Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveAssociateReject ( long hNet, short nResult, short nSource, short nReason )
{
//Client receives this event
CString strMsg;
strMsg.Format("*** NetReceiveAssociateReject Event ***\nResult[%d]\nSource[%d]\nReason[%d]",
nResult, nSource, nReason);
AfxMessageBox(strMsg);
}


NetReceiveAssociateRequest Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveAssociateRequest (long hNet, long hPDU)
{
CString strMsg;
int i;
int nId;
int nResult;
_bstr_t strAbstract;
_bstr_t strTransfer;

//we have received an AssociateRequest

strMsg = "*** NetReceiveAssociateRequest Event ***\n";

//check the version, if not 1, reject it
if (m_pDlg->m_pLEADDicomNet->GetVersion (hPDU) != 1)
{
m_pDlg->m_pLEADDicomNet->SendAssociateReject (hNet,
PDU_REJECT_RESULT_PERMANENT,
PDU_REJECT_SOURCE_USER,
PDU_REJECT_REASON_UNKNOWN
);
strMsg = strMsg + "SendAssociateReject\n";
}
else
{
//send associate accept class back
m_pDlg->m_pLEADDicomNet->CreateAssociate (FALSE);
m_pDlg->m_pLEADDicomNet->ResetAssociate (m_pDlg->m_pLEADDicomNet->GethPDU(), FALSE);

//copy all presentation objects from received hPDU
//reply that we only support the first Transfer Syntax from the received hPDU
for (i = 0; i<m_pDlg->m_pLEADDicomNet->GetPresentationCount (hPDU); i++)
{
nId = m_pDlg->m_pLEADDicomNet->GetPresentationID (hPDU, i);
strTransfer = m_pDlg->m_pLEADDicomNet->GetTransferSyntax(hPDU, nId, 0);
nResult = PDU_ACCEPT_RESULT_SUCCESS;
strAbstract = m_pDlg->m_pLEADDicomNet->GetPresentationAbstract (hPDU, nId);
m_pDlg->m_pLEADDicomNet->AddPresentation (m_pDlg->m_pLEADDicomNet->GethPDU(), nId, nResult, strAbstract);
m_pDlg->m_pLEADDicomNet->AddTransferSyntax (m_pDlg->m_pLEADDicomNet->GethPDU(), nId, strTransfer);
}
m_pDlg->m_pLEADDicomNet->SendAssociateAccept(hNet);
strMsg = strMsg + "SendAssociateAccept\n";
m_pDlg->m_pLEADDicomNet->FreeAssociate (m_pDlg->m_pLEADDicomNet->GethPDU());
}

AfxMessageBox(strMsg);
}


NetReceiveCCancelRequest Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCCancelRequest (long hNet, short nPresentationID, short nMessageID)
{
CString strMsg;

//This sample receives the cancel request, but does not actually perform the cancel
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveCCancelRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID
);
AfxMessageBox(strMsg);
}


NetReceiveCEchoResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCEchoResponse (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, long nStatus)
{
//This example receives a C-Echo Response from the server
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
CString strMsg;
strMsg.Format("*** OnNetReceiveCEchoResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\nnStatus[%d]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
nStatus);
AfxMessageBox(strMsg);
}


NetReceiveCFindResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCFindResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, long nStatus, long hDS)
{
//In this example, the Client receives several C-Find responses from the Server
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;

_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
CString strStatus;
strStatus.Format("%d", nStatus);

switch(nStatus)
{
case COMMAND_STATUS_PENDING:
strStatus = "COMMAND_STATUS_PENDING";
break;

case COMMAND_STATUS_SUCCESS:
strStatus = "COMMAND_STATUS_SUCCESS";
break;

case COMMAND_STATUS_CANCEL:
strStatus = "COMMAND_STATUS_CANCEL";
break;
}

strMsg.Format("*** OnNetReceiveCFindResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\nstrStatus[%s]\npDS[%x]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
strStatus,
hDS);

//save the data set to disk
if (hDS != 0)
{
m_pDlg->m_FileCount++;
CString strFileName;
strFileName.Format("d:\\temp\\CFind%d.dic", m_pDlg->m_FileCount);
_bstr_t sFileName = strFileName;
m_pDlg->m_pLEADDicomDS2->SaveExtDS(hDS, sFileName,0);
strMsg = strMsg + "Saving[" + strFileName + "]";
}
AfxMessageBox(strMsg);
}


NetReceiveCGetRequest Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCGetRequest (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, short nPriority, long hDS)
{
//In this example, the server receives a C-Get request, and sends a C-Store request to the client
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;

_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveCGetRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\nnPriority[%d]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
nPriority);

//The AE should check the data set, and perform
//matching against the files stored on the AE to determine
//what data set(s) should be sent back to the calling AE.
//For this sample, just send a predetermined file

//load the sample file
_bstr_t strFile = "e:\\images\\dicom16.dic";
m_pDlg->m_pLEADDicomDS->LoadDS (strFile, 0);

//send a store command for the GET sub-operation
long hAssociate = m_pDlg->m_pLEADDicomNet->GetAssociate (hNet);
_bstr_t strAE = m_pDlg->m_pLEADDicomNet->GetCalling (hAssociate);

//Find element with TAG == TAG_SOP_INSTANCE_UID
m_pDlg->m_pLEADDicomDS->FindFirstElement (TAG_SOP_INSTANCE_UID, FALSE);
m_pDlg->m_pLEADDicomDS->GetStringValue (0,1);
_bstr_t strInstance = m_pDlg->m_pLEADDicomDS->GetStringValues (0);

//the following will cause a ReceiveCStoreResponse event on this machine
m_pDlg->m_nDataCommand = COMMAND_C_GET;
m_pDlg->m_pLEADDicomNet->SendCStoreRequest (
hNet,
nPresentationID,
nMessageID+ 1,
pszClass,
strInstance,
nPriority,
strAE,
nMessageID,
m_pDlg-> m_pLEADDicomDS->GethDicomDS()
);

strMsg = strMsg + "SendCStoreRequest\n";
AfxMessageBox(strMsg);
//Client sends C-Get response after receiving the CStoreResponse from the calling AE
}


NetReceiveCGetResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCGetResponse (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, long nStatus, short nRemaining, short nCompleted, short nFailed, short nWarning, long hDS)
{
//1. A connection exists between client and server
//2. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveCGetResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\nnStatus[%d]\nnRemaining[%d],nCompleted[%d]\nnFailed[%d]\nnWarning[%d]\nhDS[%x]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
nStatus,
nRemaining,
nCompleted,
nFailed,
nWarning,
hDS
);
AfxMessageBox(strMsg);
}


NetReceiveCMoveRequest Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCMoveRequest(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, short nPriority, LPCTSTR pszMoveAE, long hDS)
{
//The Server receives a C-Move request and sends a C-Store request to the client
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveCMoveRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\nnPriority[%d]\npszMoveAE[%s]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
nPriority,
pszMoveAE,
hDS
);

//The AE should check the data set, and perform
//matching against the files stored on the AE to determine
//what data set(s) should be moved to the destination AE.
//For this sample, just send a predetermined file

//load the sample file
_bstr_t strFile = "e:\\images\\dicom16.dic";
m_pDlg->m_pLEADDicomDS->LoadDS (strFile, 0);

//Find element with TAG == TAG_SOP_INSTANCE_UID
m_pDlg->m_pLEADDicomDS->MoveFirstElement (FALSE);
m_pDlg->m_pLEADDicomDS->FindFirstElement(TAG_SOP_INSTANCE_UID, FALSE);
m_pDlg->m_pLEADDicomDS->GetStringValue (0, 1);
_bstr_t strInstance = m_pDlg->m_pLEADDicomDS->GetStringValues (0);

m_pDlg->m_nDataCommand = COMMAND_C_MOVE;
//the following will cause a ReceiveCStoreResponse event on this machine
m_pDlg->m_pLEADDicomNet->SendCStoreRequest (
hNet,
nPresentationID,
nMessageID+ 1,
pszClass,
strInstance,
nPriority,
pszMoveAE,
nMessageID,
m_pDlg->m_pLEADDicomDS->GethDicomDS()
);
strMsg = strMsg + "SendCStoreRequest\n";
AfxMessageBox(strMsg);
//Server sends a CMove-Response after receiving the CStoreResponse from the calling AE
}


NetReceiveCMoveResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCMoveResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, long nStatus, short nRemaining, short nCompleted, short nFailed, short nWarning, long hDS)
{
//The Client receives a C-Move response from the server
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnReceiveCMoveResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\nnStatus[%d]\nnRemaining[%d],nCompleted[%d]\nnFailed[%d]\nnWarning[%d]\nhDS[%x]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
nStatus,
nRemaining,
nCompleted,
nFailed,
nWarning,
hDS
);
AfxMessageBox(strMsg);
}


NetReceiveCStoreResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCStoreResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus)
{
//In this example, a C-Store Response is received.
//Depending on the source of the message, several actions can take place.
//See comments below for specific details.
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveCStoreResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus);

//If I am a server, I receive this message from
//
// 1.Client sends C-Get
// I send SendCStoreRequest
// Clientsends SendCStoreResponse
//
//... or
//
// 2.Client sends C-Move
// I send SendCStoreRequest
// Clientsends SendCStoreResponse

// m_nClientOrServer is a member variable that identifieds whether I am a client or server
if (m_pDlg->m_nClientOrServer == STATUS_SERVER)
{

//m_nDataCommand is a member variable that is set so the server
//knows how a C-Store Response was generated
//m_nDataCommand can be:
// COMMAND_C_MOVE
// COMMAND_C_GET

switch (m_pDlg->m_nDataCommand)
{
case COMMAND_C_GET:
strMsg = strMsg + "SendCGetResponse\n";
m_pDlg->m_pLEADDicomNet->SendCGetResponse (
hNet,
nPresentationID,
nMessageID,
pszClass,
COMMAND_STATUS_SUCCESS, //L_UINT16 nStatus
0, //L_UINT16 nRemaining
1, //L_UINT16 nCompleted
0, //L_UINT16 nFailed
0, //L_UINT16 nWarning
0 //LDicomDS1 *pDS
);
break;

case COMMAND_C_MOVE:
strMsg = strMsg + "SendCMoveResponse\n";
m_pDlg->m_pLEADDicomNet->SendCMoveResponse(
hNet,
nPresentationID,
nMessageID,
pszClass,
COMMAND_STATUS_SUCCESS, //L_UINT16 nStatus
0, //L_UINT16 nRemaining
1, //L_UINT16 nCompleted
0, //L_UINT16 nFailed
0, //L_UINT16 nWarning
0 //LDicomDS1 *pDS
);
break;
};
}
m_pDlg->m_nDataCommand = 0;
AfxMessageBox(strMsg);
}


NetReceiveData Example for C++ 6.0 and later

NetReceiveData Example for C++ 6.0 or later

{
CString strMsg;
strMsg.Format("*** NetReceiveData Event ***\n\nnID[%d]", nID);

if (hDicomCS )
strMsg = strMsg + "\nData is a command set!";
else
{
strMsg = strMsg + "Data is a data set - saved to disk!";
m_pDlg->m_pLEADDicomDS->SaveExtDS(hDicomDS, "c:\temp\test.dic", 0);
}
AfxMessageBox(strMsg);
}


NetReceiveNActionRequest Example for C++ 6.0 and later

NetReceiveNActionRequest Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveNActionRequest(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, short nAction, long hDS)
{
//The Server receives a N-Action request and sends a N-Action response to the client
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveNActionRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnAction[%d]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nAction,
hDS);

//...
//...Here the server should perform the Action command
//...
//...
//...nStatus = status of the the above--assume DICOM_SUCCESS
//...

short nStatus = COMMAND_STATUS_SUCCESS;
m_pDlg->m_pLEADDicomNet->SendNActionResponse(
hNet,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus,
nAction,
hDS);
strMsg = strMsg + "SendNActionResponse\n";
AfxMessageBox(strMsg);
}


NetReceiveNActionResponse Example for C++ 6.0 and later

NetReceiveNActionResponse Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveNActionResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus, short nAction, long hDS)
{
//The Client receives a N-Action response from the server
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveNActionResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]\nnAction[%d]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus,
nAction,
hDS);

AfxMessageBox(strMsg);
}


NetReceiveNCreateResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveNCreateResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus, long hDS)
{
CString strMsg;

_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);

strMsg.Format("*** OnNetReceiveNCreateResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]\npDS[%x]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus,
hDS);

AfxMessageBox(strMsg);
}


NetReceiveNDeleteResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveNDeleteResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus)
{
//In this example, the client receives a N-Delete Response from the server
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveNDeleteResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus);
AfxMessageBox(strMsg);
}


NetReceiveNGetRequest Example for C++ 6.0 and later

NetReceiveNGetRequest Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveNGetRequest (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance)
{
//In this example, the server receives a N-Get request, and sends an N-Get response to the client
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);

strMsg.Format("*** OnNetReceiveNGetRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance
);

//An acutal server should check the class and instance against all SOP classes
//it manages, and then fill out hDS from the correctly matching instance
//This sample loads a fixed data set

//Load DS1
m_pDlg->m_pLEADDicomDS->LoadDS ("e:\\images\\dicom16.dic", 0);

//Initialize DS2 to send
m_pDlg->m_pLEADDicomDS2->InitDS (DICOM_CLASS_UNKNOWN, 0);

m_pDlg->m_pLEADDicomDS->MoveFirstElement (FALSE);

for (int i = 0; i<m_pDlg->m_pLEADDicomNet->GetRequestAttributeCount(); i++)
{
//get each element
long nTag = m_pDlg->m_pLEADDicomNet->GetRequestAttributes(i);
m_pDlg->m_pLEADDicomDS->FindTag(nTag);
int nRet = m_pDlg->m_pLEADDicomDS->FindFirstElement (nTag, FALSE);
if (nRet == 0)
{
//copy the element value
m_pDlg->m_pLEADDicomDS->GetConvertValue ();
m_pDlg->m_pLEADDicomDS2->InsertElement (FALSE, nTag, m_pDlg->m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);
m_pDlg->m_pLEADDicomDS2->StringValueCount = 1;
m_pDlg->m_pLEADDicomDS2->PutStringValues(0, m_pDlg->m_pLEADDicomDS->GetStringValues (0));
m_pDlg->m_pLEADDicomDS2->SetConvertValue();
}
}

//send a response
short nStatus = COMMAND_STATUS_SUCCESS;
m_pDlg->m_pLEADDicomNet->SendNGetResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nStatus, m_pDlg->m_pLEADDicomDS2->GethDicomDS());
strMsg = strMsg + "SendNGetResponse\n";
AfxMessageBox(strMsg);
}


NetReceiveNGetResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveNGetResponse (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus, long hDS)
{
//The client receives a N-Get response from the server
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);

strMsg.Format("*** OnNetReceiveNGetResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus,
hDS);

CString strFileName;
strFileName.Format("d:\\temp\\NGet%d.dic", m_pDlg->m_FileCount);
_bstr_t sFileName;
m_pDlg->m_pLEADDicomDS->SaveExtDS(hDS, sFileName, 0);
strMsg = strMsg + "Saving[" + strFileName + "]";
AfxMessageBox(strMsg);
}


NetReceiveNReportRequest Example for C++ 6.0 and later

NetReceiveNReportRequest Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveNReportRequest (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, short nEvent, long hDS)
{
//The Client receives an N-Report request and sends an N-Report response
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);

strMsg.Format("*** OnNetReceiveNReportRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnEvent[%d]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nEvent,
hDS);

//send response
short nStatus = COMMAND_STATUS_SUCCESS;
m_pDlg->m_pLEADDicomNet->SendNReportResponse( hNet,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus,
nEvent,
hDS);
strMsg = strMsg + "SendNReportResponse\n";
AfxMessageBox(strMsg);
}


NetReceiveNReportResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveNReportResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus, short nEvent, long hDS)
{
//The Server receives an N-Report response from all clients
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);

strMsg.Format("*** OnNetReceiveNReportResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]\nnEvent[%d]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus,
nEvent,
hDS);
AfxMessageBox(strMsg);
}


NetReceiveNSetRequest Example for C++ 6.0 and later

NetReceiveNSetRequest Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveNSetRequest(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long hDS)
{
//The Server receives a N-Set request and sends a N-Set response to the client
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress ( hNet);

strMsg.Format("*** OnNetReceiveNSetRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
hDS);

//...
//...The server should change the values of the requested SOP Instance
//...to the values specefied in the data set elements in pDS
//...This function should search all the managed SOP Instances for a
//...match, and then change the requested elements.
//...
//...nStatus = status of the the above--assume DICOM_SUCCESS
//...

short nStatus = COMMAND_STATUS_SUCCESS;

m_pDlg->m_pLEADDicomNet->SendNSetResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nStatus, hDS);
strMsg = strMsg + "SendNSetResponse\n";
AfxMessageBox(strMsg);
}


NetReceiveNSetResponse Example for C++ 6.0 and later

NetReceiveNSetResponse Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveNSetResponse (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus, long hDS)
{
//The client receives a N-Set response from the server
//
//In this example:
//1. A connection exists between client and server
//2. An association exists between the client and server
CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress ( hNet);
strMsg.Format("*** OnNetReceiveNSetResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus,
hDS);
AfxMessageBox(strMsg);
}


NetReceiveReleaseRequest Example for C++ 6.0 and later

NetReceiveReleaseRequest Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveReleaseRequest(long hNet)
{
CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** ReceiveReleaseRequest Event ***\nPeer[%s]",(char *)strPeerAddress);
m_pDlg->m_pLEADDicomNet->SendReleaseResponse(hNet);
AfxMessageBox(strMsg);
}


NetReceiveReleaseResponse Example for C++ 6.0 and later

NetReceiveReleaseResponse Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveReleaseResponse (long hNet)
{
CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** NetReceiveReleaseResponse Event ***\nPeer[%s]", (char *)strPeerAddress);
AfxMessageBox(strMsg);
}


NetReceiveUnknown Example for C++ 6.0 and later

NetReceiveUnknown Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveUnknown (long hNet, short nPresentationID, long hCS, long hDS)
{
//In this example, the server receives an unknown request from the client
//
//In this example:
//1. A connection exists between client and server
//2. An association exists between the client and server

_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
CString strMsg;

strMsg.Format("*** OnNetReceiveUnknown ***\nPeer[%s]\nhNet[%x]\nnPresentationID[%d]\nnpCS[%x]\npDS[%x]",
(char *)strPeerAddress,
hNet,
nPresentationID,
hCS,
hDS);
AfxMessageBox(strMsg);
}


NetSecureLinkReady for C++ 6.0 and later

NetSecureLinkReady Example for C++ 6.0 and later

void CDicomNetSink::OnNetSecureLinkReady( long hNet, long nError )
{
if(nError != DICOM_SUCCESS)
{
CString strMsg;
strMsg.Format("Error Code is %ld", m_pDlg->m_pLEADDicomNet->GetErrorSecure (hNet));
AfxMessageBox(strMsg);
return;
}
if(m_pDlg->m_pLEADDicomNet->GetCiphersuiteTLS (m_pDlg->m_pLEADDicomNet->GethNet ()) == DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)
AfxMessageBox("Ciphersuite is DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA");
}


NetSend Example for C++ 6.0 and later

void CDicomNetSink::OnNetSend(long hNet, long nStatus, short nType, long lBytes)
{
CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** NetSend Event ***\nData Sent to [%s]\nStatus [%d]",
(char *)strPeerAddress,
nStatus);
AfxMessageBox(strMsg);
}


Preamble Example for C++ 6.0 and later

void CMFCdicomDlg::OnPreamble2()
{
// Set the preamble
_bstr_t sPreamble("Test String");
m_pLEADDicomDS->Preamble= sPreamble;
m_pLEADDicomDS->SetDSPreamble ();
}
void CMFCdicomDlg::OnPreamble()
{
// Get the preamble
_bstr_t sPreamble = m_pLEADDicomDS->GetDSPreamble();
AfxMessageBox((char*)m_pLEADDicomDS->GetPreamble ());
}


ProgressStatus Example for C++ 6.0 and later

MSG msg;
CString szStatus;
// are there any messages in the queue (like a button being pressed) ?
while( PeekMessage(&msg,NULL, 0, 0, PM_REMOVE) )
{
TranslateMessage( &msg ); /* Translates virtual key codes. */
DispatchMessage( &msg ); /* Dispatches message to window. */
}
if( !m_pDlg->m_bQuit ) // Look for the Click on the LEAD Control to Quit
{
szStatus.Format("Loading...%d%%", nPercent);
m_pDlg->SetWindowText(szStatus);
}
else
m_pDlg->m_pLEADDicomDS->EnableProgressEvent = FALSE; // Cancel the task


ResetDS Example for C++ 6.0 and later

//close the current Data Set
m_pLEADDicomDS->ResetDS ();


ResetIOD Example for Visual C++ 6.0

ResetIOD Example for C++ 6.0 and later

//clear all IOD items
m_pLEADDicomDS->ResetIOD ();


ResetTag Example for Visual C++ 6.0

ResetTag Example for C++ 6.0 and later

//Clear all items from the Data Element Tag Table
m_pLEADDicomDS->ResetTag ();


ResetUID Example for Visual C++ 6.0

ResetUID Example for C++ 6.0 and later

//Clear all items from the UID Table
m_pLEADDicomDS->ResetUID ();


ResetVR Example for Visual C++ 6.0

ResetVR Example for C++ 6.0 and later

//Clear all items from the VR Table
m_pLEADDicomDS->ResetVR ();


SaveDS Example for C++ 6.0 and later

short nRet;
CFileDialog SaveDlg(FALSE);

//save a Data Set
m_pLEADDicomDS->EnableMethodErrors = FALSE;
if(SaveDlg.DoModal()==IDOK)
{
BSTR bstr = SaveDlg.GetFileName().AllocSysString();
nRet = m_pLEADDicomDS->SaveDS (bstr, 0);
SysFreeString(bstr);
if(nRet != DICOM_SUCCESS)
AfxMessageBox("Error saving file!");
}
m_pLEADDicomDS->EnableMethodErrors = TRUE;


Searching the Data Set for a Digital Signature Example for C++ 6.0 and later

void FindSignature(ILEADDicomDSPtr& spDicomDS, LPCSTR pszSignatureUID)
{
// Search the whole Data Set for the Digital Signature with the
// specified Digital Signature UID
if (!spDicomDS->FindSignature(pszSignatureUID))
{
::MessageBox(NULL,
"The Digital Signature was not found.",
"Sample",
MB_OK);
return;
}

char* pszMsg = "The Digital Signature was found.\n"
"Press Yes to examine it or No to delete it.";

switch (::MessageBox(NULL, pszMsg, "Sample", MB_YESNOCANCEL))
{
case IDYES:
// Refer to Examining a Digital Signature Example for C++ 6.0 and later
// for the function ExamineSignature
ExamineSignature(spDicomDS, spDicomDS->GetCurrentElement()->hElement);
break;

case IDNO:
// Delete the Digital Signature
spDicomDS->DeleteSignature();
break;
}
}


SendAbort Example for C++ 6.0 and later

{
//send Abort message
m_pLEADDicomNet->SendAbort (m_pLEADDicomNet->GethNet(), PDU_ABORT_SOURCE_USER, 0);
}


SendAssociateRequest Example for C++ 6.0 and later

{
//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate (TRUE);

//use default for association
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

m_pLEADDicomNet->SetCalling (m_pLEADDicomNet->GethPDU(),"Terry");
m_pLEADDicomNet->SetCalled(m_pLEADDicomNet->GethPDU(), "MI_SERVER");

//this shows a client sending to its server
m_pLEADDicomNet->SendAssociateRequest(m_pLEADDicomNet->GethNet());

//now we can free the class
m_pLEADDicomNet->FreeAssociate (m_pLEADDicomNet->GethPDU());
}


SendCCancelRequest Example for C++ 6.0 and later

{
//This example sends a C-Cancel Request to a server
//
//In this example:
//1. A connection exists between client and server
//2. An association exists between the client and server

CString strMsg = "N-Cancel\n";

short nPresentationID = 1; //PresentationID of message to cancel
short nMessageID = 1; //ID of message to cancel
m_pLEADDicomNet->SendCCancelRequest(m_pLEADDicomNet->GethNet(),nPresentationID, nMessageID);
AfxMessageBox(strMsg);
}


SendCEchoRequest Example for C++ 6.0 and later

{
//This example sends a C-Echo Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "C-Echo Request\n";
_bstr_t strUID = UID_VERIFICATION_CLASS;
long hNet = m_pLEADDicomNet->GethNet();
long hPDU = m_pLEADDicomNet->GetAssociate (hNet);
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hPDU, strUID);

//nPresentationID must be odd--if 0, indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association", UID_VERIFICATION_CLASS);
strMsg = strMsg + strTmp;
}
else
//success
{
short nUniqueID = 99;
m_pLEADDicomNet->SendCEchoRequest (
hNet,
nPresentationID,
nUniqueID,
UID_VERIFICATION_CLASS);
}
AfxMessageBox(strMsg);
}


SendCEchoResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCEchoRequest (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass)
{
//This example receives a C-Echo Request from the client, and sends a C-Echo-Response
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
CString strMsg;
strMsg.Format("*** OnNetReceiveCEchoRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass);

int nStatus = COMMAND_STATUS_SUCCESS;
m_pDlg->m_pLEADDicomNet->SendCEchoResponse (hNet, nPresentationID, nMessageID, pszClass, nStatus);
strMsg = strMsg + "SendCEchoResponse\n";

AfxMessageBox(strMsg);
}


SendCFindRequest Example for C++ 6.0 and later

SendCFindRequest Example for C++ 6.0 or later

{
//This example sends a C-Find Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "C-Find\n";
_bstr_t strClassUID = UID_STUDY_ROOT_QUERY_FIND;
_bstr_t sStudyRoot("STUDY_ROOT");

//get the associate object for this client computer's connection
long hAssociate = m_pLEADDicomNet->GetAssociate (m_pLEADDicomNet->GethNet());

//find the id for UID_VERIFICATION_CLASS within this association
//if it is supported by the association
int nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association", (char *)strClassUID);
strMsg = strMsg + strTmp;
}
else
//success
{
//create a find attribute data set

m_pLEADDicomDS->InitDS (DICOM_CLASS_UNKNOWN, 0);

//add the required fields for this seach
m_pLEADDicomDS->FindTag(TAG_QUERY_RETRIEVE_LEVEL);
m_pLEADDicomDS->InsertElement (FALSE, TAG_QUERY_RETRIEVE_LEVEL, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);
m_pLEADDicomDS->StringValueCount = 1;
m_pLEADDicomDS->put_StringValues (0, sStudyRoot);
m_pLEADDicomDS->SetStringValue (1);

m_pLEADDicomDS->FindTag(TAG_STUDY_DATE);
m_pLEADDicomDS->InsertElement (FALSE, TAG_STUDY_DATE, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_STUDY_TIME);
m_pLEADDicomDS->InsertElement (FALSE, TAG_STUDY_TIME, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_ACCESSION_NUMBER);
m_pLEADDicomDS->InsertElement (FALSE, TAG_ACCESSION_NUMBER, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_NAME);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_NAME, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_ID);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_ID, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_STUDY_ID);
m_pLEADDicomDS->InsertElement (FALSE, TAG_STUDY_ID, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_STUDY_INSTANCE_UID);
m_pLEADDicomDS->InsertElement (FALSE, TAG_STUDY_INSTANCE_UID, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

//optional tags
m_pLEADDicomDS->FindTag(TAG_STUDY_DESCRIPTION);
m_pLEADDicomDS->InsertElement (FALSE, TAG_STUDY_DESCRIPTION, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_SEX);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_SEX, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_OTHER_PATIENT_IDS);
m_pLEADDicomDS->InsertElement (FALSE, TAG_OTHER_PATIENT_IDS, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_BIRTH_DATE);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_BIRTH_DATE, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_ADDITIONAL_PATIENT_HISTORY);
m_pLEADDicomDS->InsertElement (FALSE, TAG_ADDITIONAL_PATIENT_HISTORY, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_NUMBER_OF_STUDY_RELATED_INSTANCES);
m_pLEADDicomDS->InsertElement (FALSE, TAG_NUMBER_OF_STUDY_RELATED_INSTANCES, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

//global variable to count results
m_FileCount = 0;

short uUniqueID = 99;
m_pLEADDicomNet->SendCFindRequest (
m_pLEADDicomNet->GethNet(),
nPresentationID,
uUniqueID,
strClassUID,
COMMAND_PRIORITY_MEDIUM,
m_pLEADDicomDS->GethDicomDS()
);

strMsg = strMsg + "SendCFindRequest\n";
}
AfxMessageBox(strMsg);
}


SendCFindResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCFindRequest( long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, short nPriority, long hDS )
{
//The Server receives a C-Find request and sends several C-Find Responses to the client
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server
CString strMsg;

_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveCFindRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\nnPriority[%d]\nhDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
nPriority,
hDS);

//Load each file and send it to the calling AE
//For this example, assume the following two files match the find criteria

//load sample file 1
m_pDlg->m_pLEADDicomDS->LoadDS ("e:\\images\\dicom16.dic", 0);

//send a Find Response - PENDING
strMsg=strMsg + "SendCFindResponse\n";
m_pDlg->m_pLEADDicomNet->SendCFindResponse ( hNet,
nPresentationID,
nMessageID,
pszClass,
COMMAND_STATUS_PENDING,
m_pDlg->m_pLEADDicomDS->GethDicomDS()
);

//load sample file 2
m_pDlg->m_pLEADDicomDS2->LoadDS ("e:\\images\\test.dic", 0);

strMsg=strMsg + "SendCFindResponse\n";
//send a Find Response - PENDING
m_pDlg->m_pLEADDicomNet->SendCFindResponse (
hNet,
nPresentationID,
nMessageID,
pszClass,
COMMAND_STATUS_PENDING,
m_pDlg->m_pLEADDicomDS->GethDicomDS()
);

strMsg=strMsg + "SendCFindResponse\n";
//now, send a Find Response - SUCCESS
m_pDlg->m_pLEADDicomNet->SendCFindResponse (hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS, 0);
AfxMessageBox(strMsg);
}


SendCGetRequest Example for C++ 6.0 and later

{
//This example sends a C-Get Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server
CString strMsg = "C-Get\n";

//Choose a class
_bstr_t strClassUID = UID_SC_IMAGE_STORAGE;

//create the data set that encodes the identifier to be matched
m_pLEADDicomDS->InitDS (DICOM_CLASS_UNKNOWN, 0);

//Add the required elements
// TAG_QUERY_RETRIEVE_LEVEL
// TAG_PATIENT_NAME
m_pLEADDicomDS->FindTag(TAG_QUERY_RETRIEVE_LEVEL);
m_pLEADDicomDS->InsertElement (FALSE, TAG_QUERY_RETRIEVE_LEVEL,m_pLEADDicomDS->GetCurrentTag ()->VR,FALSE,0);
m_pLEADDicomDS->StringValueCount = 1;
_bstr_t sPatient = "PATIENT";
m_pLEADDicomDS->put_StringValues (0, sPatient);
m_pLEADDicomDS->SetStringValue (1);

m_pLEADDicomDS->FindTag(TAG_PATIENT_NAME);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_NAME, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE,0);

//Add the optional fields that we want returned
// TAG_PATIENT_ID
// TAG_PATIENT_BIRTH_DATE
// TAG_PATIENT_SEX
// TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES
m_pLEADDicomDS->FindTag(TAG_PATIENT_ID);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_ID, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_BIRTH_DATE);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_BIRTH_DATE, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_SEX);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_SEX, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);
m_pLEADDicomDS->InsertElement (FALSE, TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

//Get the associate object
long hAssociate = m_pLEADDicomNet->GetAssociate (m_pLEADDicomNet->GethNet());

//Is class supported in the assocation?
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association", (char *)strClassUID);
strMsg = strMsg + strTmp;
}
else
//success
{
short uUniqueID = 99;
m_FileCount = 0; //used for file name in OnReceiveCStoreRequest event

m_pLEADDicomNet->SendCGetRequest(
m_pLEADDicomNet->GethNet(),
nPresentationID,
uUniqueID,
strClassUID,
COMMAND_PRIORITY_MEDIUM,
m_pLEADDicomDS->GethDicomDS()
);
}
AfxMessageBox(strMsg);
//now wait for one or more C-STORE sub-operations and finally the C-Get response

}


SendCMoveRequest Example for C++ 6.0 and later

SendCMoveRequest Example for C++ 6.0 or later

{
//This example sends a C-Move Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "C-Move\n";

//Choose a class to move
_bstr_t strClassUID = UID_NM_IMAGE_STORAGE;

//create the data set that encodes the identifier to be matched
m_pLEADDicomDS->InitDS (DICOM_CLASS_UNKNOWN, 0);

//Add the required elements
// TAG_QUERY_RETRIEVE_LEVEL
// TAG_PATIENT_NAME
_bstr_t sPatient("PATIENT");
m_pLEADDicomDS->FindTag(TAG_QUERY_RETRIEVE_LEVEL);
m_pLEADDicomDS->InsertElement (FALSE, TAG_QUERY_RETRIEVE_LEVEL,m_pLEADDicomDS->GetCurrentTag ()->VR,FALSE,0);
m_pLEADDicomDS->StringValueCount = 1;
m_pLEADDicomDS->put_StringValues (0, sPatient);
m_pLEADDicomDS->SetStringValue (1);

m_pLEADDicomDS->FindTag(TAG_PATIENT_NAME);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_NAME, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE,0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_ID);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_ID, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_BIRTH_DATE);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_BIRTH_DATE, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_SEX);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_SEX, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

m_pLEADDicomDS->FindTag(TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);
m_pLEADDicomDS->InsertElement (FALSE, TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

//global variable to count results
m_FileCount = 0;

//Get the associate object
long hAssociate = m_pLEADDicomNet->GetAssociate (m_pLEADDicomNet->GethNet());

//Is class supported in the assocation?
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association",(char*) strClassUID);
strMsg = strMsg + strTmp;
}
else //success
{
short uUniqueID = 99;

//Choose DICOM AE title of the destination DICOM AE
//from which the C-store operations are being performed
//This is set by the SetCalling() method of the LDicomAssociateRequest object
//before doing a SendAssociateRequest
_bstr_t strMoveAE = "LEADtest";

m_FileCount = 0; //used for file name in OnReceiveCStoreRequest event

//The client requests the server to move the SOP Instance to itself (the client)
m_pLEADDicomNet->SendCMoveRequest (
m_pLEADDicomNet->GethNet(),
nPresentationID,
uUniqueID,
strClassUID,
COMMAND_PRIORITY_MEDIUM,
strMoveAE,
m_pLEADDicomDS->GethDicomDS()
);
}
AfxMessageBox(strMsg);
//now wait for one or more C-STORE sub-operations and finally the C-Get response
}


SendCStoreRequest Example for C++ 6.0 and later

{
//This example sends a C-Store Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg= "C-Store\n";

//Pick a dicom file to send as the data set
m_pLEADDicomDS->LoadDS ("e:\\images\\dicom16.dic",0);

//Find element with TAG == TAG_SOP_INSTANCE_UID
m_pLEADDicomDS->MoveFirstElement (FALSE);
m_pLEADDicomDS->FindFirstElement (TAG_SOP_INSTANCE_UID, FALSE);

//Get first string in Value Field of dicom element
_bstr_t strInstanceUID = m_pLEADDicomDS->GetStringValues (m_pLEADDicomDS->GetStringValue (0,1));

m_pLEADDicomDS->FindFirstElement (TAG_SOP_CLASS_UID, FALSE);

//Get first string in Value Field of dicom element
_bstr_t strClassUID = m_pLEADDicomDS->GetStringValues (m_pLEADDicomDS->GetStringValue (0,1));

//Get the associate object
long hAssociate = m_pLEADDicomNet->GetAssociate (m_pLEADDicomNet->GethNet());

//See if class is supported in the assocation
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association", (char *)strClassUID);
strMsg = strMsg + strTmp;
}
else
{
short uUniqueID = 99;

m_FileCount = 0; //used for file name in OnReceiveCStoreRequest event
m_pLEADDicomNet->SendCStoreRequest (
m_pLEADDicomNet->GethNet(),
nPresentationID,
uUniqueID,
strClassUID,
strInstanceUID,
COMMAND_PRIORITY_MEDIUM,
"",
0,
m_pLEADDicomDS->GethDicomDS()
);
}
AfxMessageBox(strMsg);
}


SendCStoreResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveCStoreResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus)
{
//In this example, a C-Store Response is received.
//Depending on the source of the message, several actions can take place.
//See comments below for specific details.
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveCStoreResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
nStatus);

//If I am a server, I receive this message from
//
// 1.Client sends C-Get
// I send SendCStoreRequest
// Clientsends SendCStoreResponse
//
//... or
//
// 2.Client sends C-Move
// I send SendCStoreRequest
// Clientsends SendCStoreResponse

// m_nClientOrServer is a member variable that identifieds whether I am a client or server
if (m_pDlg->m_nClientOrServer == STATUS_SERVER)
{

//m_nDataCommand is a member variable that is set so the server
//knows how a C-Store Response was generated
//m_nDataCommand can be:
// COMMAND_C_MOVE
// COMMAND_C_GET

switch (m_pDlg->m_nDataCommand)
{
case COMMAND_C_GET:
strMsg = strMsg + "SendCGetResponse\n";
m_pDlg->m_pLEADDicomNet->SendCGetResponse (
hNet,
nPresentationID,
nMessageID,
pszClass,
COMMAND_STATUS_SUCCESS, //L_UINT16 nStatus
0, //L_UINT16 nRemaining
1, //L_UINT16 nCompleted
0, //L_UINT16 nFailed
0, //L_UINT16 nWarning
0 //LDicomDS1 *pDS
);
break;

case COMMAND_C_MOVE:
strMsg = strMsg + "SendCMoveResponse\n";
m_pDlg->m_pLEADDicomNet->SendCMoveResponse(
hNet,
nPresentationID,
nMessageID,
pszClass,
COMMAND_STATUS_SUCCESS, //L_UINT16 nStatus
0, //L_UINT16 nRemaining
1, //L_UINT16 nCompleted
0, //L_UINT16 nFailed
0, //L_UINT16 nWarning
0 //LDicomDS1 *pDS
);
break;
};
}
m_pDlg->m_nDataCommand = 0;
AfxMessageBox(strMsg);
}


SendData Example for C++ 6.0 and later

SendData Example for C++ 6.0 or later

{
//send a command set, then a data set
m_pLEADDicomDS2->InitCS (COMMAND_C_STORE, TRUE);
m_pLEADDicomDS->InitDS (DICOM_CLASS_CR_IMAGE_STORAGE, 0);

//client is sending data
m_pLEADDicomNet->SendData(m_pLEADDicomNet->GethNet(), TRUE, 1, m_pLEADDicomDS2->GethDicomDS()); //the command set
m_pLEADDicomNet->SendData(m_pLEADDicomNet->GethNet(), FALSE, 1, m_pLEADDicomDS->GethDicomDS()); //the data set
}


SendNActionRequest Example for C++ 6.0 and later

SendNActionRequest Example for C++ 6.0 or later

{
//This example sends a N-Action Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "N-Action\n";

//Choose a supported Action ID
short nAction = 1;

//Choose an SOP Class to find
_bstr_t strClassUID = UID_BASIC_FILM_BOX_CLASS;

//Choose an SOP Instance to modify
_bstr_t strInstanceUID = "1.1.1.1";

//...
//...Create a data set that encodes the Action Arguments (based on value of nAction)
//...For this example, add a tag to the Data set so that it is non-empty
//...
m_pLEADDicomDS->InitDS (DICOM_CLASS_UNKNOWN, 0);
//...Add the action arugments

m_pLEADDicomDS->FindTag(TAG_IMAGE_TYPE);
m_pLEADDicomDS->InsertElement (FALSE, TAG_IMAGE_TYPE, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

//Get the associate object
long hAssociate = m_pLEADDicomNet->GetAssociate (m_pLEADDicomNet->GethNet());

//Is class supported in the assocation?
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association", (char*)strClassUID);
strMsg = strMsg + strTmp;
}
else //success
{
short uUniqueID = 99;
m_pLEADDicomNet->SendNActionRequest(
m_pLEADDicomNet->GethNet(),
nPresentationID,
uUniqueID,
strClassUID,
strInstanceUID,
nAction,
m_pLEADDicomDS->GethDicomDS());
}
AfxMessageBox(strMsg);
}


SendNCreateRequest Example for C++ 6.0 and later

{
//This example sends a N-Create Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "N-Create\n";

//Get the associate object
long hAssociate = m_pLEADDicomNet->GetAssociate (m_pLEADDicomNet->GethNet());

//Choose an SOP Class to create--in this example, choose UID_SC_IMAGE_STORAGE
_bstr_t strClassUID = UID_SC_IMAGE_STORAGE;

//Choose an SOP Instance to create
_bstr_t strInstanceUID = "1.2.840.113619.2.30.1.1762288927.1489.906240296.255";

//Is class supported in the assocation?
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association", (char *)strClassUID);
strMsg = strMsg + strTmp;
}
else
//success
{
//Here you would normally construct a data set containing the attributes, values for the new SOP instance
//For this sample, pick a dicom file to send as the data set
short uUniqueID = 99;
m_pLEADDicomDS->LoadDS ("e:\\images\\dicom16.dic",0);
m_pLEADDicomNet->SendNCreateRequest (
m_pLEADDicomNet->GethNet(),
nPresentationID,
uUniqueID,
strClassUID,
strInstanceUID,
m_pLEADDicomDS->GethDicomDS()
);
}
AfxMessageBox(strMsg);
}


SendNCreateResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveNCreateRequest(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long hDS)
{
//In this example a N-Create request is received, and a N-Create Response is sent
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);

strMsg.Format("*** OnNetReceiveNCreateRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\npDS[%x]\n",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance,
hDS);

//...
//...Do the create here
//...nStatus = status of the create
//...
short nStatus = COMMAND_STATUS_SUCCESS;

//send a create response
//For this sample, send back the passed hDS in this sample
m_pDlg->m_pLEADDicomNet->SendNCreateResponse (hNet, nPresentationID, nMessageID, pszClass, pszInstance, nStatus, hDS);
strMsg = strMsg + "SendNCreateResponse\n";

AfxMessageBox(strMsg);
}


SendNDeleteRequest Example for C++ 6.0 and later

{
//This example sends a N-Delete Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "N-Delete\n";

long hNet = m_pLEADDicomNet->GethNet();

//Choose an SOP Class to delete--in this example, choose UID_SC_IMAGE_STORAGE
_bstr_t strClassUID = UID_SC_IMAGE_STORAGE;

//Choose an SOP Instance to delete
_bstr_t strInstanceUID = "1.2.840.113619.2.30.1.1762288927.1489.906240296.255";

//Get the associate object
long hAssociate = m_pLEADDicomNet->GetAssociate (hNet);

//Is class supported in the assocation?
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association", (char *)strClassUID);
strMsg = strMsg + strTmp;
}
else
//success
{
short uUniqueID = 99;
m_pLEADDicomNet->SendNDeleteRequest ( hNet,
nPresentationID,
uUniqueID,
strClassUID,
(strInstanceUID)
);
}

AfxMessageBox(strMsg);
}


SendNDeleteResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveNDeleteRequest(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance)
{
//In this example, the server receives a N-Delete Request from the client, and sends an N-Delete Response
//
//In this example:
//1. m_LEADRasterView1, m_LEADRasterView2 are LEAD ActiveX Raster View (CLEADRasterView)
//
//2. m_pLEADDicomNet is LEAD DicomNet COM object (ILEADDicomNet *m_pLEADDicomNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg;
_bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
strMsg.Format("*** OnNetReceiveNDeleteRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]",
(char *)strPeerAddress,
nPresentationID,
nMessageID,
pszClass,
pszInstance);

//...
//... Do the delete
//...

//send a delete response
short nStatus = COMMAND_STATUS_SUCCESS;
m_pDlg->m_pLEADDicomNet->SendNDeleteResponse (hNet, nPresentationID, nMessageID, pszClass, pszInstance, nStatus);

strMsg = strMsg + "SendNDeleteResponse\n";
AfxMessageBox(strMsg);
}


SendNGetRequest Example for C++ 6.0 and later

{
//This example sends a N-Get Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "N-Get\n";

//Get the associate object
long hAssociate = m_pLEADDicomNet->GetAssociate (m_pLEADDicomNet->GethNet());

//Choose an SOP Class to find
_bstr_t strClassUID = UID_SC_IMAGE_STORAGE;

//Is class supported in the assocation?
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association", (char *)strClassUID);
strMsg = strMsg + strTmp;
}
else //success
{
//Create a list of the identifiers that you wish to get from the server
CString strGetFile = "d:\\temp\\nGet.dic";
_bstr_t strInstanceUID = "1.1.1.1";

short uUniqueID = 99;

m_pLEADDicomNet->RequestAttributeCount = 4;
m_pLEADDicomNet->put_RequestAttributes(0,TAG_PATIENT_NAME);
m_pLEADDicomNet->put_RequestAttributes(1,TAG_PATIENT_ID);
m_pLEADDicomNet->put_RequestAttributes(2,TAG_PATIENT_SEX);
m_pLEADDicomNet->put_RequestAttributes(3,TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);

//global variable to count results
m_FileCount = 0;
m_pLEADDicomNet->SendNGetRequest (
m_pLEADDicomNet->GethNet(),
nPresentationID,
uUniqueID,
strClassUID,
strInstanceUID
);
strMsg = strMsg + "SendNGetRequest\n";
}
AfxMessageBox(strMsg);
}


SendNonSecureISCL Example for C++ 6.0 and later

// number of bytes is 10 becuase the string has a terminating null character
COleVariant vSendData("Test ISCL");
m_DicomNet.SendNonSecureISCL (m_DicomNet.GetHNet (), vSendData, 10);


SendNReportRequest Example for C++ 6.0 and later

SendNReportRequest Example for C++ 6.0 or later

{
//The Server sends an N-Report message to all its clients
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "N-Event Report\n";

//Choose a class
_bstr_t strClassUID = UID_US_IMAGE_STORAGE;

//Choose an instance
_bstr_t strInstance = "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1";

//create the data set
m_pLEADDicomDS->InitDS (DICOM_CLASS_UNKNOWN, 0);

//add the required elements

//Add the required elements
// TAG_QUERY_RETRIEVE_LEVEL
// TAG_PATIENT_NAME
m_pLEADDicomDS->FindTag(TAG_SPECIFIC_CHARACTER_SET);
m_pLEADDicomDS->InsertElement (FALSE, TAG_SPECIFIC_CHARACTER_SET,m_pLEADDicomDS->GetCurrentTag ()->VR,FALSE,0);

m_pLEADDicomDS->FindTag(TAG_INSTANCE_CREATION_DATE);
m_pLEADDicomDS->InsertElement (FALSE, TAG_INSTANCE_CREATION_DATE,m_pLEADDicomDS->GetCurrentTag ()->VR,FALSE,0);

//set the Date
m_pLEADDicomDS->DateValueCount = 1;
IDATEVALUEItemPtr pDateValue = m_pLEADDicomDS->GetDateValues (0);
pDateValue->Year = 1999;
pDateValue->Month = 12;
pDateValue->Day = 31;
m_pLEADDicomDS->SetDateValue (1);

m_pLEADDicomDS->FindTag(TAG_INSTANCE_CREATION_TIME);
m_pLEADDicomDS->InsertElement (FALSE, TAG_INSTANCE_CREATION_TIME, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);
m_pLEADDicomDS->TimeValueCount = 1;
ITIMEVALUEItemPtr pTimeValue = m_pLEADDicomDS->TimeValues [0];
pTimeValue->Hours = 12;
pTimeValue->Minutes = 30;
pTimeValue->Seconds = 25;
pTimeValue->Fractions = 0;
m_pLEADDicomDS->SetTimeValue(1);

m_pLEADDicomDS->FindTag(TAG_INSTANCE_CREATOR_UID);
m_pLEADDicomDS->InsertElement (FALSE, TAG_INSTANCE_CREATOR_UID, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);
m_pLEADDicomDS->StringValueCount = 1;
_bstr_t sUniqueValue("9.9.9999.9");
m_pLEADDicomDS->put_StringValues (0, sUniqueValue); //some unique value
m_pLEADDicomDS->SetStringValue (1);

_bstr_t sDummyPatientName("dummy_patient_name");
m_pLEADDicomDS->FindTag(TAG_PATIENT_NAME);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_NAME, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);
m_pLEADDicomDS->StringValueCount = 1;
m_pLEADDicomDS->put_StringValues (0,sDummyPatientName);
m_pLEADDicomDS->SetStringValue (1);

//add the optional fields that we want returned
_bstr_t sDummyPatientID("dummy_patient_id");
m_pLEADDicomDS->FindTag(TAG_PATIENT_ID);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_ID, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);
m_pLEADDicomDS->StringValueCount = 1;
m_pLEADDicomDS->put_StringValues (0,sDummyPatientID);
m_pLEADDicomDS->SetStringValue (1);

m_pLEADDicomDS->FindTag(TAG_PATIENT_BIRTH_DATE);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_BIRTH_DATE, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

pDateValue = m_pLEADDicomDS->GetDateValues (0);
pDateValue->Year = 1999;
pDateValue->Month = 12;
pDateValue->Day = 31;
m_pLEADDicomDS->SetDateValue (1);

_bstr_t sMale = "M";
m_pLEADDicomDS->FindTag(TAG_PATIENT_SEX);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_SEX, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);
m_pLEADDicomDS->StringValueCount = 1;
m_pLEADDicomDS->put_StringValues (0,sMale);
m_pLEADDicomDS->SetConvertValue();

//iterate through all clients
for (long i=0; i<m_pLEADDicomNet->GetClientCount(m_pLEADDicomNet->GethNet()); i++)
{
long hNetClient = m_pLEADDicomNet->GetClient(m_pLEADDicomNet->GethNet(), i);

//Get the associate object of client[i]
long hAssociate = m_pLEADDicomNet->GetAssociate (hNetClient);

//Is class supported in the assocation?
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate,strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association",(char*) strClassUID);
strMsg = strMsg + strTmp;
}
else
{
//Send N-Report Request message
short uUniqueID = 99;
short nEvent = 1;

m_pLEADDicomNet->SendNReportRequest (
hNetClient,
nPresentationID,
uUniqueID,
strClassUID,
strInstance,
nEvent,
m_pLEADDicomDS->GethDicomDS()
);
}
}
AfxMessageBox(strMsg);
}


SendNSetRequest Example for C++ 6.0 and later

SendNSetRequest Example for C++ 6.0 or later

{
//This example sends a N-Set Request to a server
//
//In this example:
//1. m_Dicom, m_Dicom2 are LEAD ActiveX Dicom objects (CLEADDICOM)
//
//2. m_DicomNet is LEAD ActiveX DicomNet object (CLEADDICOMNet)
//
//3. m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
//4. m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//5. A connection exists between client and server
//6. An association exists between the client and server

CString strMsg = "N-Set\n";

//Choose an SOP Class to find
_bstr_t strClassUID = UID_SC_IMAGE_STORAGE;

//Choose an SOP Instance to modify
_bstr_t strInstanceUID = "1.1.1.1";

//create the data set that encodes the changed element(s)
m_pLEADDicomDS->InitDS (DICOM_CLASS_UNKNOWN, 0);

m_pLEADDicomDS->FindTag(TAG_PATIENT_ID);
m_pLEADDicomDS->InsertElement (FALSE, TAG_PATIENT_ID, m_pLEADDicomDS->GetCurrentTag ()->VR, FALSE, 0);

//Choose new patient ID
_bstr_t sPatientID("123-45-6789");
m_pLEADDicomDS->StringValueCount = 1;
m_pLEADDicomDS->put_StringValues (0, sPatientID);
m_pLEADDicomDS->SetStringValue (1);

//Get the associate object
long hAssociate = m_pLEADDicomNet->GetAssociate (m_pLEADDicomNet->GethNet());

//Is class supported in the assocation?
short nPresentationID = m_pLEADDicomNet->FindPresentationAbstract (hAssociate, strClassUID);

//nPresentationID must be odd--0 indicates failure
if (nPresentationID==0)
{
CString strTmp;
strTmp.Format("Abstract Syntax[%s] Not Included in the Association",(char*) strClassUID);
strMsg = strMsg + strTmp;
}
else //success
{
//send a request
short uUniqueID = 99;
m_pLEADDicomNet->SendNSetRequest (
m_pLEADDicomNet->GethNet(),
nPresentationID,
uUniqueID,
strClassUID,
strInstanceUID,
m_pLEADDicomDS->GethDicomDS()
);
}
AfxMessageBox(strMsg);
}


SendReleaseRequest Example for C++ 6.0 and later

{

long hNet = m_pLEADDicomNet->GethNet();

//send a Release Request message
m_pLEADDicomNet->SendReleaseRequest (hNet);
CString strMsg;
strMsg.Format("Sending ReleaseRequest message\nhNet[%x]", hNet);
AfxMessageBox(strMsg);
}


SetAuthDataISCL example for C++ 6.0 and later

{
//Example 1
COleVariant vData1("Server LEAD ISCL");
m_pLEADDicomNet->SetAuthDataISCL (m_pLEADDicomNet->GethNet (), vData1, 16);
//Example 2: Binary Data
VARIANT vData2;
BYTE DataArray[5]= {0x21, 0x14, 0x0, 0x45, 0xF4};
SAFEARRAY FAR *psa;
SAFEARRAYBOUND rgsabound[1];
VariantInit(&vData2);
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = 5;
psa = SafeArrayCreate(VT_UI1, 1, rgsabound);
if (psa != NULL)
{
SafeArrayLock(psa);
memcpy(psa->pvData, DataArray, 5);
SafeArrayUnlock(psa);
V_VT(&vData2) = (VT_ARRAY | VT_UI1);
V_ARRAY(&vData2) = psa;
m_pLEADDicomNet->SetAuthDataISCL (m_pLEADDicomNet->GethNet (), &vData2, 5);
SafeArrayDestroy(psa);
}
VariantClear(&vData2);
}


SetBitmapListValue example for C++ 6.0 and later

short nRet;
long lCount;

m_pLEADDicomDS->EnableMethodErrors = FALSE;

//move to the root element
m_pLEADDicomDS->MoveFirstElement (FALSE);
m_pLEADDicomDS->MoveRootElement ();

//insert a new element for the Bitmap Value
nRet = m_pLEADDicomDS->FindFirstElement (TAG_PIXEL_DATA, FALSE);
nRet = m_pLEADDicomDS->DeleteElement();
nRet = m_pLEADDicomDS->InsertElement (FALSE, TAG_PIXEL_DATA, VR_OB, FALSE, 0);

m_LEADRasterView1.ShowWindow(SW_SHOW);

//load an image
ILEADRasterIO *pRasterIO=NULL;
HRESULT hr;
hr = CoCreateInstance(CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO);
pRasterIO->EnableMethodErrors = FALSE;
pRasterIO->Load(m_LEADRasterView1.GetRaster(),"e:\\lead14\\dist\\images\\image1.cmp", 0, 1, 1);
AfxMessageBox("Image loaded from File - Wait");
pRasterIO->Release();

//flip the image
ILEADRasterProcessPtr pRasterProcess=NULL;
CoCreateInstance(CLSID_LEADRasterProcess,
NULL,
CLSCTX_ALL,
IID_ILEADRasterProcess,
(void**)&pRasterProcess);
pRasterProcess->EnableMethodErrors = FALSE;

//create a bitmap list
m_LEADRasterView2.GetRaster().InsertBitmapListItem(0, m_LEADRasterView1.GetRaster().GetBitmap());
pRasterProcess->Flip(m_LEADRasterView1.GetRaster());
m_LEADRasterView2.GetRaster().InsertBitmapListItem(1, m_LEADRasterView1.GetRaster().GetBitmap());
pRasterProcess->Reverse(m_LEADRasterView1.GetRaster());
m_LEADRasterView2.GetRaster().InsertBitmapListItem(2, m_LEADRasterView1.GetRaster().GetBitmap());

//insert the image list into the element
m_pLEADDicomDS->BitmapList = m_LEADRasterView2.GetRaster().GetBitmapList();
//set the bitmap list
nRet = m_pLEADDicomDS->SetBitmapListValue(DICOM_IMAGE_COMPRESSION_NONE,
DICOM_IMAGE_PHOTOMETRIC_PALETTE_COLOR,
24,
0,
0);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
AfxMessageBox("ImageList set to Data Set - Wait");

m_pLEADDicomDS->BitmapList = 0; //free the value
AfxMessageBox("ImageList cleared from memory - Wait");

lCount = m_pLEADDicomDS->GetBitmapCount();

//get the bitmap list back
if(nRet == 0)
{
m_pLEADDicomDS->GetBitmapListValue(0, lCount, 0, ORDER_RGB, 0);
m_LEADRasterView1.GetRaster().SetBitmapList(m_pLEADDicomDS->BitmapList);
m_LEADRasterView1.ForceRepaint();
}
AfxMessageBox("ImageList loaded from Data Set - Wait");


SetBitmapValue example for C++ 6.0 and later

short nRet;
m_pLEADDicomDS->EnableMethodErrors = FALSE;
//move to the root element
m_pLEADDicomDS->MoveFirstElement (FALSE);
m_pLEADDicomDS->MoveRootElement ();

//insert a new element for the Bitmap Value
nRet = m_pLEADDicomDS->FindFirstElement (TAG_PIXEL_DATA, FALSE);
nRet = m_pLEADDicomDS->DeleteElement();
nRet = m_pLEADDicomDS->InsertElement (FALSE, TAG_PIXEL_DATA, VR_OB, FALSE, 0);

m_LEADRasterView1.ShowWindow(SW_SHOW);

//load an image
ILEADRasterIO *pRasterIO=NULL;
HRESULT hr;
hr = CoCreateInstance(CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO);
pRasterIO->EnableMethodErrors = FALSE;
nRet = pRasterIO->Load( m_LEADRasterView1.GetRaster(),
"e:\\lead14\\dist\\images\\image1.cmp",
0,
1,
1);
AfxMessageBox("Image loaded from File - Wait");
pRasterIO->Release();

//insert the image into the element
m_pLEADDicomDS->Bitmap = m_LEADRasterView1.GetRaster().GetBitmap();
//set the bitmap
nRet = m_pLEADDicomDS->SetBitmapValue ( DICOM_IMAGE_COMPRESSION_NONE,
DICOM_IMAGE_PHOTOMETRIC_PALETTE_COLOR,
24,
0,
0);

if(nRet != 0)
{
AfxMessageBox("Error");
return;
}
AfxMessageBox("Image set to Data Set - Wait");

m_pLEADDicomDS->Bitmap = 0; //free the value
AfxMessageBox("Image cleared from memory - Wait");

//get the bitmap back
if(nRet == 0)
{
m_pLEADDicomDS->GetBitmapValue (0, 0, ORDER_RGB, 0);
m_LEADRasterView1.GetRaster().SetBitmap(m_pLEADDicomDS->Bitmap);
m_LEADRasterView1.ForceRepaint ();
}
AfxMessageBox("Image loaded from Data Set - Wait");


SetCalled Example for C++ 6.0 and later

{
CString strMsg;

//Create the associate
m_pLEADDicomNet->CreateAssociate (TRUE);

//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

//set called application title
m_pLEADDicomNet->SetCalled (m_pLEADDicomNet->GethPDU(), "The Called Program");
//set calling application title
m_pLEADDicomNet->SetCalling (m_pLEADDicomNet->GethPDU(),"The Calling Program");

//display the current values
_bstr_t sCalled = m_pLEADDicomNet->GetCalled (m_pLEADDicomNet->GethPDU());
_bstr_t sCalling = m_pLEADDicomNet->GetCalling (m_pLEADDicomNet->GethPDU());

strMsg.Format( "GetCalled[%s]\nGetCalling[%s]", (char *)sCalled, (char *)sCalling);
AfxMessageBox (strMsg);

//Free associate
m_pLEADDicomNet->FreeAssociate ( m_pLEADDicomNet->GethPDU());
}


SetCipherToIndexTLS Example for C++ 6.0 and later

{
m_pLEADDicomNet->SetCipherToIndexTLS (m_pLEADDicomNet->GethNet (), 0, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA);
if(m_pLEADDicomNet->GetCipherFromIndexTLS (m_pLEADDicomNet->GethNet (), 0) == DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA)
AfxMessageBox("Cipher DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA");
}


SetClientCertificateTLS Example for C++ 6.0 and later

{
_bstr_t sPathToCertificateFile( "c:\\cert\\client.pem");
_bstr_t sPathToKeyFile("");
if(m_pLEADDicomNet->SetClientCertificateTLS (m_pLEADDicomNet->GethNet(), sPathToCertificateFile, L_TLS_FILETYPE_PEM, sPathToKeyFile) == DICOM_SUCCESS)
AfxMessageBox("Loading client certificate succeeded");
else
AfxMessageBox("Loading client certificate failed");
}


SetCommandSet (DICOM Control) Example for C++ 6.0 and later

SetCommandSet Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveData(long hNet, short nID, long hDicomCS, long hDicomDS)
{
short nRet;
CString szOut;

//we have received a data message
//copy the Command Set so we can examine its elements
m_pDlg->m_pLEADDicomDS->SetCommandSet (hDicomCS);
nRet = m_pDlg->m_pLEADDicomDS->FindFirstElement (TAG_COMMAND_FIELD, FALSE);
nRet = m_pDlg->m_pLEADDicomDS->GetShortValue (0, 1);
szOut.Format("Command Field = %04X", m_pDlg->m_pLEADDicomDS->GetShortValues(0));
AfxMessageBox(szOut);
}


SetCurrentElement example for C++ 6.0 and later

long lCount;

m_pLEADDicomDS->EnableMethodErrors = FALSE;
//get total number of images in this Data Set
m_pLEADDicomDS->SetCurrentElement ((short)0);
lCount = m_pLEADDicomDS->GetBitmapCount();
CString szCount;
szCount.Format("%ld", lCount);
AfxMessageBox("Total: " + szCount);
//move to last image tag in the Data Set
m_pLEADDicomDS->FindLastElement (TAG_PIXEL_DATA, FALSE);
//get total number of images in this tag
lCount = m_pLEADDicomDS->GetBitmapCount();
szCount.Format("%ld", lCount);
AfxMessageBox("This Tag: " + szCount);


SetDefaultEncryptionISCL Example for C++ 6.0 and later

{
m_pLEADDicomNet->SetDefaultEncryptionISCL (m_pLEADDicomNet->GethNet(), DICOM_ISCL_ENCRYPT_DESCBC);
}


SetDefaultSigningISCL Example for C++ 6.0 and later

{
m_pLEADDicomNet->SetDefaultSigningISCL (m_pLEADDicomNet->GethNet (), DICOM_ISCL_MAC_NONE);
}


SetEncryptKeyISCL Example for C++ 6.0 and later

{
COleCurrency tmpKey;
// use a 64 bit key value of 0123456789ABCDEF hex.
tmpKey.m_cur.int64 = 0x0123456789ABCDEF;
COleVariant key(tmpKey);
CString strMsg;
m_pLEADDicomNet->SetEncryptKeyISCL (m_pLEADDicomNet->GethNet (), 1, key);
m_pLEADDicomNet->SetIndexForEncryptISCL (m_pLEADDicomNet->GethNet(), 1);
strMsg.Format("Index value is: %ld", m_pLEADDicomNet->GetIndexForEncryptISCL (m_pLEADDicomNet->GethNet()));
AfxMessageBox(strMsg);
}


SetMaxCommBlockLengthISCL Example for C++ 6.0 and later

{
m_pLEADDicomNet->NetworkSecurityMode = DICOM_SECURE_ISCL;
m_pLEADDicomNet->StartUp ();
m_pLEADDicomNet->SetMaxCommBlockLengthISCL (m_pLEADDicomNet->GethNet(), 8160);
// size of the blocks sent to network layer will be 8192 bytes (a 32-byte header is added)
// other initializations...
m_pLEADDicomNet->Connect ("", 0, "127.0.0.1", 2761);
//connect to a server running on local computer at port 2761
long nBlockLen = m_pLEADDicomNet->GetCommBlockLengthISCL (m_pLEADDicomNet->GethNet());
CString strMsg;
strMsg.Format("Negotiated communication block size is %ld", nBlockLen);
AfxMessageBox(strMsg);
}


SetMaxMessageLengthISCL Example for C++ 6.0 and later

{
m_pLEADDicomNet->SetMaxMessageLengthISCL (m_pLEADDicomNet->GethNet(), 1048576);
// size of the message accepted is at most 1 MB - or 1048576 bytes
}


SetMutualAuthAlgISCL Example for C++ 6.0 and later

{
m_pLEADDicomNet->SetMutualAuthAlgISCL (m_pLEADDicomNet->GethNet (), DICOM_ISCL_MUTUAL_AUTH_3P4W);
}


SetMutualAuthKeyISCL Example for C++ 6.0 and later

{
COleCurrency tmpKey;
// use a 64 bit key value of 0123456789ABCDEF hex.
tmpKey.m_cur.int64 = 0x0123456789ABCDEF;
COleVariant key(tmpKey);
CString strMsg;

m_pLEADDicomNet->SetMutualAuthKeyISCL (m_pLEADDicomNet->GethNet(), 1, key);
m_pLEADDicomNet->SetIndexForMutualAuthISCL (m_pLEADDicomNet->GethNet(), 1);
strMsg.Format("Index value is: %ld", m_pLEADDicomNet->GetIndexForMutualAuthISCL (m_pLEADDicomNet->GethNet()));
AfxMessageBox(strMsg);
}


SetRequest Example for C++ 6.0 and later

{
//set associate as Accept
if(m_pLEADDicomNet->GethPDU() != 0)
m_pLEADDicomNet->SetRequest ( m_pLEADDicomNet->GethPDU(), FALSE);
}


SetServerCertificateTLS example for C++ 6.0 and later

{
_bstr_t sPathToCertificateFile("c:\\cert\\Server.pem");
_bstr_t sPathToKeyFile("");
if(m_pLEADDicomNet->SetServerCertificateTLS (m_pLEADDicomNet->GethNet (), sPathToCertificateFile, L_TLS_FILETYPE_PEM, sPathToKeyFile) == DICOM_SUCCESS)
AfxMessageBox("Loading Server certificate succeeded");
else
AfxMessageBox("Loading Server certificate failed");
}


SetTagName example for Visual C++ 6.0

SetTagName example for C++ 6.0 and later

//move to the selected Tag
m_pLEADDicomDS->FindIndexTag (13);
//change the name
m_pLEADDicomDS->SetTagName ("New Tag Name");


Setting an overlay bitmap list Example for C++ 6.0 and later

m_pLEADDicomDS->OverlayBitmapList = m_LEADRasterView1.GetRaster().GetBitmapList();
m_pLEADDicomDS->SetOverlayBitmapList (0,0);


Setting modality LUT data and attributes Example for C++ 6.0 and later

// This example will set Rescale Intercept (0028,1052)
// element to -128.0 and Rescale Slope (0028,1053)
// element to 1.0

// Object that will hold modality LUT attributes
ILModalityLUTAttributesPtr pModalityLUTAttributes = NULL;
short iRet;

pModalityLUTAttributes = m_pLEADDicomDS->GetModalityLUTAttributes();
//No Modality LUT Sequence (0028,3000)
pModalityLUTAttributes->IsModalityLUTSequence = FALSE;
//Yes there is a rescale slope and intercept
pModalityLUTAttributes->IsRescaleSlopeIntercept = TRUE;
pModalityLUTAttributes->RescaleIntercept = -128.0f;
pModalityLUTAttributes->RescaleSlope = 1.0f;
pModalityLUTAttributes->RescaleType = "UNSPECIFIED";
// Delete the existing modality LUT,
// although we don't have to !
m_pLEADDicomDS->DeleteModalityLUT(0);
//Set rescale slope and intercept
VARIANT vData;
VariantInit(&vData);
iRet = m_pLEADDicomDS->SetModalityLUT (vData, 0);
return;


Setting palette color LUT data and attributes Example for C++ 6.0 and later

//This example will set the attributes and the data for a
// Palette Color Lookup Table

long lLUTIndex;
short iRet;
VARIANT vRedLUTData;
VARIANT vGreenLUTData;
VARIANT vBlueLUTData;
ILPaletteColorLUTAttributesPtr pPaletteColorLUTAttributes = NULL;

pPaletteColorLUTAttributes = m_pLEADDicomDS->GetPaletteColorLUTAttributes ();

// Initialize Red Palette Color Lookup Table Descriptor (0028,1101)
pPaletteColorLUTAttributes->RedLUTDescriptorFirstMapped = 0;
pPaletteColorLUTAttributes->RedLUTDescriptorEntryBits = 16;
pPaletteColorLUTAttributes->RedLUTDescriptorNumberOfEntries = 0x10000;

// Initialize Green Palette Color Lookup Table Descriptor (0028,1102)
pPaletteColorLUTAttributes->GreenLUTDescriptorFirstMapped = 0;
pPaletteColorLUTAttributes->GreenLUTDescriptorEntryBits = 16;
pPaletteColorLUTAttributes->GreenLUTDescriptorNumberOfEntries = 0x10000;

// Initialize Blue Palette Color Lookup Table Descriptor (0028,1103)
pPaletteColorLUTAttributes->BlueLUTDescriptorFirstMapped = 0;
pPaletteColorLUTAttributes->BlueLUTDescriptorEntryBits = 16;
pPaletteColorLUTAttributes->BlueLUTDescriptorNumberOfEntries = 0x10000;

// Allocate a buffer to hold Red Palette Color Lookup Table Data
SAFEARRAY* psaRedLUTData = SafeArrayCreateVector(VT_I4, 0, 0x10000);

// Allocate a buffer to hold Green Palette Color Lookup Table Data
SAFEARRAY* psaGreenLUTData = SafeArrayCreateVector(VT_I4, 0, 0x10000);

// Allocate a buffer to hold Red Palette Color Lookup Table Data
SAFEARRAY* psaBlueLUTData = SafeArrayCreateVector(VT_I4, 0, 0x10000);

for(lLUTIndex=0; lLUTIndex<=0xFFFF; lLUTIndex++)
{
HRESULT hr;
long iVal;

iVal = (long)lLUTIndex;
hr = SafeArrayPutElement(psaRedLUTData, &lLUTIndex, (void*)&iVal);
iVal = (long)(lLUTIndex/2);
hr = SafeArrayPutElement(psaGreenLUTData, &lLUTIndex, (void*)&iVal);
iVal = (long)(lLUTIndex/4);
hr = SafeArrayPutElement(psaBlueLUTData, &lLUTIndex, (void*)&iVal);
}

// Delete all the elements that describe the "Palette Color Lookup Table".
iRet = m_pLEADDicomDS->DeletePaletteColorLUT(0);
if(iRet != 0)
{
SafeArrayDestroy(psaRedLUTData);
SafeArrayDestroy(psaGreenLUTData);
SafeArrayDestroy(psaBlueLUTData);
AfxMessageBox("error");
return;
}

// Set the new "Palette Color Lookup Table" attributes
iRet = m_pLEADDicomDS->SetPaletteColorLUTAttributes (0);
if(iRet != 0)
{
SafeArrayDestroy(psaRedLUTData);
SafeArrayDestroy(psaGreenLUTData);
SafeArrayDestroy(psaBlueLUTData);
AfxMessageBox("error");
return;
}

// Set Red Palette Color Lookup Table Data
VariantInit(&vRedLUTData);
vRedLUTData.vt = VT_ARRAY | VT_I4;
vRedLUTData.parray = psaRedLUTData;
iRet = m_pLEADDicomDS->SetPaletteColorLUTData (&vRedLUTData,DICOM_PALETTE_COLOR_LUT_TYPE_RED,0);
if(iRet != 0)
{
SafeArrayDestroy(psaRedLUTData);
SafeArrayDestroy(psaGreenLUTData);
SafeArrayDestroy(psaBlueLUTData);
AfxMessageBox("error");
return;
}

// Set Green Palette Color Lookup Table Data
VariantInit(&vGreenLUTData);
vGreenLUTData.vt = VT_ARRAY | VT_I4;
vGreenLUTData.parray = psaGreenLUTData;
iRet = m_pLEADDicomDS->SetPaletteColorLUTData (&vGreenLUTData,DICOM_PALETTE_COLOR_LUT_TYPE_GREEN,0);
if(iRet != 0)
{
SafeArrayDestroy(psaGreenLUTData);
SafeArrayDestroy(psaGreenLUTData);
SafeArrayDestroy(psaBlueLUTData);
AfxMessageBox("error");
return;
}

// Set Blue Palette Color Lookup Table Data
VariantInit(&vBlueLUTData);
vBlueLUTData.vt = VT_ARRAY | VT_I4;
vBlueLUTData.parray = psaBlueLUTData;
iRet = m_pLEADDicomDS->SetPaletteColorLUTData (&vBlueLUTData,DICOM_PALETTE_COLOR_LUT_TYPE_BLUE,0);
if(iRet != 0)
{
SafeArrayDestroy(psaBlueLUTData);
SafeArrayDestroy(psaGreenLUTData);
SafeArrayDestroy(psaBlueLUTData);
AfxMessageBox("error");
return;
}

SafeArrayDestroy(psaRedLUTData);
SafeArrayDestroy(psaGreenLUTData);
SafeArrayDestroy(psaBlueLUTData);

return;


Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for C++ 6.0 and later

void CDicomDlg::DeleteAllOverlays()
{
long lOverlayCount = 0;
short iRet;
long lOverlayIndex;

lOverlayCount = m_pLEADDicomDS->GetOverlayCount ();
for(lOverlayIndex = 0; lOverlayIndex<lOverlayCount; lOverlayIndex++)
{
iRet = m_pLEADDicomDS->DeleteOverlay(lOverlayIndex,0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
}
return;
}

void CDicomDlg::OnButtonSetOverlays()
{
// This function will store the overlays associated
// with a bitmap handle inside the DICOM dataset

ILEADOverlayAttributesPtr pOverlayAttributesDS = NULL;
ILEADOverlayAttributesPtr pOverlayAttributesRaster = NULL;
ILEADRasterProcessPtr pRasterProcess=NULL;
long GroupNumber = 0;
BOOL bIsOverlayInDataset = FALSE;

short iOverlayCount;
short iOverlayIndex=0;
short iRet;

CoCreateInstance(CLSID_LEADRasterProcess,
NULL,
CLSCTX_ALL,
IID_ILEADRasterProcess,
(void**)&pRasterProcess);
pRasterProcess->EnableMethodErrors = FALSE;

// Do we have any overlays at all?
iOverlayCount = pRasterProcess->GetOverlayCount (m_LEADRasterView1.GetRaster(), 0);
// If no overlays just return
if(iOverlayCount == 0)
{
AfxMessageBox("error");
return;
}
// Blow away all the overlays in the file
DeleteAllOverlays();
pOverlayAttributesDS = m_pLEADDicomDS->GetOverlayAttributes ();

// Loop through the overlays and add them into the DICOM file
for(iOverlayIndex=0; iOverlayIndex<iOverlayCount; iOverlayIndex++)
{
// Get overlay attributes
iRet = pRasterProcess->GetOverlayAttributes (m_LEADRasterView1.GetRaster(), iOverlayIndex,
OVERLAYATTRIBUTES_ORIGIN |
OVERLAYATTRIBUTES_FLAGS |
OVERLAYATTRIBUTES_BITINDEX |
OVERLAYATTRIBUTES_DICOM);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
pOverlayAttributesRaster = pRasterProcess->GetOverlayAttributes ();

pOverlayAttributesDS->OriginX = pOverlayAttributesRaster->OriginX;
pOverlayAttributesDS->OriginY = pOverlayAttributesRaster->OriginY;
pOverlayAttributesDS->Flags = pOverlayAttributesRaster->Flags;
pOverlayAttributesDS->Color = pOverlayAttributesRaster->Color;
pOverlayAttributesDS->BitPosition = pOverlayAttributesRaster->BitPosition;
pOverlayAttributesDS->Rows = pOverlayAttributesRaster->Rows;
pOverlayAttributesDS->Columns = pOverlayAttributesRaster->Columns;
pOverlayAttributesDS->Type = pOverlayAttributesRaster->Type;
pOverlayAttributesDS->BitsAllocated = pOverlayAttributesRaster->BitsAllocated;
pOverlayAttributesDS->Subtype = pOverlayAttributesRaster->Subtype;
pOverlayAttributesDS->Label = pOverlayAttributesRaster->Label;
pOverlayAttributesDS->ROIArea = pOverlayAttributesRaster->ROIArea;
pOverlayAttributesDS->ROIMean = pOverlayAttributesRaster->ROIMean;
pOverlayAttributesDS->ROIStandardDeviation = pOverlayAttributesRaster->ROIStandardDeviation;
pOverlayAttributesDS->NumberFramesInOverlay = pOverlayAttributesRaster->NumberFramesInOverlay;
pOverlayAttributesDS->ImageFrameOrigin = pOverlayAttributesRaster->ImageFrameOrigin;
pOverlayAttributesDS->ActivationLayer = pOverlayAttributesRaster->ActivationLayer;
pOverlayAttributesDS->Description = pOverlayAttributesRaster->Description;

// Set overlay attributes inside DICOM
iRet = m_pLEADDicomDS->SetOverlayAttributes(iOverlayIndex,0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}

// burn overlays which need to be part of the image
if(pOverlayAttributesRaster->Flags & OVERLAY_USEBITPLANE)
{
iRet = pRasterProcess->UpdateOverlayBits(m_LEADRasterView1.GetRaster(),
iOverlayIndex,
SETOVERLAYBITS_FROMOVERLAY);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
}
// Get the overlay data (if it's not part of the image)
m_LEADRasterView2.GetRaster().Free();
iRet = pRasterProcess->GetOverlayBitmap (m_LEADRasterView1.GetRaster(),
iOverlayIndex,
m_LEADRasterView2.GetRaster(),
OVERLAY_COPY);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}

// Set overlay data into DICOM
m_pLEADDicomDS->OverlayBitmap = m_LEADRasterView2.GetRaster().GetBitmap();
iRet = m_pLEADDicomDS->SetOverlayBitmap (iOverlayIndex, 0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
}

return;
}


SetUIDName example for Visual C++ 6.0

SetUIDName example for C++ 6.0 and later

long lIndex;
lIndex = 13;
CString szOut;
CString szName;
IDicomUIDItemPtr pCurrentUID=NULL;

//move to the selected UID
m_pLEADDicomDS->FindIndexUID (lIndex);
//change the name
m_pLEADDicomDS->SetUIDName ("New UID Name");
pCurrentUID = m_pLEADDicomDS->GetCurrentUID ();
BSTR bstr = pCurrentUID->GetName();
szName = bstr;
SysFreeString(bstr);
szOut = "New Name = " + szName;
AfxMessageBox(szOut);


SetVRName example for Visual C++ 6.0

SetVRName example for C++ 6.0 and later

long lIndex;
lIndex = 13;
CString szOut;
CString szName;
IDicomVRItemPtr pCurrentVR=NULL;

//move to the selected VR
m_pLEADDicomDS->FindIndexVR (lIndex);
//change the name
m_pLEADDicomDS->SetVRName ("New VR Name");
pCurrentVR = m_pLEADDicomDS->GetCurrentVR ();
BSTR bstr = pCurrentVR->GetName();
szName = bstr;
SysFreeString(bstr);
szOut = "New Name = " + szName;
AfxMessageBox(szOut);


SSLCreateFlags Example for C++ 6.0 and later

// This sample creates ILEADDicomNet object with security (m_pLEADDicomNet1)
// The ILEADDicomNet object is configured so that if a client connects:
// 1. it requires and verifies the client certificate
// 2. it will support SSL version 3 or TLS Version 1 for the handshake
// 3. it uses trusted certificate authority CA_CERT_NAME to verify the client certificate
// 4. it verifies the client certificate chain to a max depth of 2
//
// The ILEADDicomNet object is assigned the certificate SERVER_CERT_NAME,
// which contains a password encrypted private key
// The OnSSLPrivateKeyPassword event is used
// to supply the encryption password of the private key

#define CA_CERT_NAME "e:\\certificates\\ca.pem"
#define SERVER_CERT_NAME "e:\\certificates\\server.pem"

void CDicomExamplesDlg::OnButton()
{
CString csMsg;
int nRet;

m_pLEADDicomNet1->UseSSLOptions = TRUE;
m_pLEADDicomNet1->SSLCreateFlags = (enum DicomSSLCreateFlags)(DICOM_SSL_CTX_CREATE_CAFILE | DICOM_SSL_CTX_CREATE_METHOD_TYPE | DICOM_SSL_CTX_CREATE_OPTIONS | DICOM_SSL_CTX_CREATE_VERIFY_DEPTH | DICOM_SSL_CTX_CREATE_VERIFY_MODE);
m_pLEADDicomNet1->SSLCAFile = CA_CERT_NAME;
m_pLEADDicomNet1->SSLVerifyMode = (enum DicomSSLVerifyMode)(DICOM_SSL_VERIFY_PEER | DICOM_SSL_VERIFY_FAIL_IF_NO_PEER_CERT);
m_pLEADDicomNet1->SSLVerifyDepth = 2;
m_pLEADDicomNet1->SSLOptions = (enum DicomSSLOptions)(DICOM_SSL_OP_NO_SSLv2 | DICOM_SSL_OP_ALL);

m_pLEADDicomNet1->NetworkSecurityMode = DICOM_SECURE_TLS;

m_pLEADDicomNet1->StartUp ();

nRet = m_pLEADDicomNet1->SetServerCertificateTLS (m_pLEADDicomNet1->hNet, SERVER_CERT_NAME, L_TLS_FILETYPE_PEM, SERVER_CERT_NAME);
if (nRet == 0)
csMsg.Format("%s loaded successfully", SERVER_CERT_NAME);
else
csMsg.Format("%s could not be loaded successfully -- error %d", SERVER_CERT_NAME,nRet);

AfxMessageBox(csMsg);

//
// Use the hNet
//
}

void CDicomNetSink::OnSSLPrivateKeyPassword(long hNet, long nStatus)
{
m_pDlg->m_pLEADDicomNet1->SSLPrivateKeyPassword= "test";
}


StartUp Example for C++ 6.0 and later

{
int nRet;

//set the temporary file path
m_pLEADDicomNet->PutNetworkTempPath("d:\\temp");

//start the network
nRet = m_pLEADDicomNet->StartUp ();

if (nRet == 0)
AfxMessageBox("StartUp() Successful");
else
AfxMessageBox("StartUp() Failed");
//do some network communication here
//...
//...

//shut down the network
m_pLEADDicomNet->ShutDown();
}


Version Example for C++ 6.0 and later

{
CString strMsg;

//create the Associate Class as Request
m_pLEADDicomNet->CreateAssociate (TRUE);

//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());

//check the Associate Class version
strMsg.Format("Version[%d]", m_pLEADDicomNet->GetVersion (m_pLEADDicomNet->GethPDU()) );
AfxMessageBox(strMsg);

//set the version
m_pLEADDicomNet->SetVersion (m_pLEADDicomNet->GethPDU(), 99);
strMsg.Format("Version[%d]", m_pLEADDicomNet->GetVersion (m_pLEADDicomNet->GethPDU()) );
AfxMessageBox(strMsg);

//Free associate
m_pLEADDicomNet->FreeAssociate (m_pLEADDicomNet->GethPDU());
}


Examples for Delphi Programmers

You can test any of the following examples by adding a command button and pasting the sample code in the Click procedure.

Adding a DICOM Data Set to a DICOM Directory (Delphi)

CreateObject (Delphi)

Creating a DICOM Directory (Delphi)

Getting Print Job Information (Delphi)

Getting Printer Configuration Information (Delphi)

Getting Printer Information (Delphi)

Loading a Data Set (Delphi)

Loading a DICOM Directory (Delphi)

Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control (Delphi)

Performing Basic Print Management (Delphi)

Performing Pull Stored Print Management (Delphi)

Using the DicomFileInsert Event (Delphi)

Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport (Delphi)

Miscellaneous Examples (Delphi)


Adding a DICOM Data Set to a DICOM Directory (Delphi)

// The following code snippet demonstrates how to use the LEADTOOLS DICOM
// DS COM control (TLEADDicomDS) to load a Data Set and then add it to a
// DICOM Directory
// global
LEADDicomDir1: TLEADDicomDir;
LEADDicomDS1: TLEADDicomDS;

begin
// Set the destination folder
LEADDicomDir1.ResetDicomDir ('C:\Medical Images');

// Load a Data Set and add it to the Directory
if(LEADDicomDS1.LoadDS('C:\Medical Images\Image', 0) = DICOM_SUCCESS)then
begin
LEADDicomDir1.InsertDicomDS (LEADDicomDS1.hDicomDS, 'C:\Medical Images\Image');

// Save the DICOMDIR File
LEADDicomDir1.SaveDicomDir ();
end;
end;


CreateObject (Delphi)

//This sample will dynamically create a LEAD Dicom Kernel
//object and use it to unlock DICOM support

//global
LEADDicomFactory1: TLEADDicomFactory;

var
szLic: String;
kernel: LEADDicomKernel;
begin
szLic:= 'LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc.';

kernel:= LEADDicomFactory1.CreateObject ('LEADDicomKernel.LEADDicomKernel', szLic) as ILEADDicomKernel;
kernel.EnableMethodErrors:= False;
kernel.UnlockSupport (L_SUPPORT_DICOM, 'MyUnlockKey');
if (kernel.IsSupportLocked (L_SUPPORT_DICOM)) Then
ShowMessage('Unlock Failed!');
end;


Creating a DICOM Directory (Delphi)

//global
LEADDicomDir1: TLEADDicomDir;
LEADDicomFactory1: TLEADDicomFactory;

Procedure TForm1.CreateDicomDirectory();
var
strLic: String;
DicomKernel: LEADDicomKernel;
begin
strLic:= 'LEADTOOLS OCX Copyright (c)' + ' 1991-2004 LEAD Technologies, Inc.';
DicomKernel:= LEADDicomFactory1.CreateObject ('LEADDicomKernel.LEADDicomKernel', strLic) as ILEADDicomKernel;

DicomKernel.UnlockSupport (L_SUPPORT_MEDICAL, L_KEY_MEDICAL);
if(DicomKernel.IsSupportLocked (L_SUPPORT_MEDICAL))then
begin
Application.MessageBox('Medical Support must be unlocked for this demo!','Error', MB_OK + MB_ICONEXCLAMATION);
Application.Terminate();
end;

// Set the destination folder
LEADDicomDir1.ResetDicomDir ('C:\Medical Images\Patient 1');

// If it is desired to change the Implementation Class UID and
// the Implementation Version Name...
LEADDicomDir1.ImplementationClassUID:= '1.2.840.114257.0.1';
LEADDicomDir1.ImplementationVersionName:= 'LEADTOOLS 14';

// Set the File-set Identifier
LEADDicomDir1.SetFileSetID ('SOME ID');

// We need icon images to be added
LEADDicomDir1.InsertIconImageSequence:= True;

// Don’t allow invalid File IDs
LEADDicomDir1.RejectInvalidFileID:= True;

// Set the File-set descriptor file
LEADDicomDir1.SetDescriptorFile('C:\Medical Images\Patient 1\ReadMe', '');

// Enable generating runtime exceptions
LEADDicomDir1.EnableMethodErrors:= True;

// Add some DICOM files to the Directory
LEADDicomDir1.InsertDicomFile ('C:\Medical Images\Patient 1\Image1');
LEADDicomDir1.InsertDicomFile('C:\Medical Images\Patient 1\Image2');
LEADDicomDir1.InsertDicomFile('C:\Medical Images\Patient 1\Image3');

// Disable generating runtime exceptions
LEADDicomDir1.EnableMethodErrors:= False;

// Save the DICOMDIR File
LEADDicomDir1.SaveDicomDir ();
end;


Getting Print Job Information (Delphi)

Procedure TForm1.GetPrintJobInfo(LEADDicomPrintSCU: LEADDicomPrintSCU; strPrintJobInstanceUID: String);
var
strMsg: String;
begin
with (LEADDicomPrintSCU.PrintJob) do
begin
// We need only the Execution Status and Execution Status Info
RequiredInfo:= PJ_EXECUTION_STATUS + PJ_EXECUTION_STATUS_INFO;

// Query the Print SCP for the Print Job information
if(GetInfo (strPrintJobInstanceUID) = DICOM_SUCCESS)then
begin
strMsg:= 'Execution Status: ' + ExecutionStatus + Chr(13) +
'Execution Status Info: ' + ExecutionStatusInfo;
// Display the retrieved information
Application.MessageBox(PChar(strMsg), 'Print Job Info', MB_OK);
end;
end;
end;


Getting Printer Configuration Information (Delphi)

Procedure TForm1.GetPrinterConfigInfo(LEADDicomPrintSCU: TLEADDicomPrintSCU);
var
i: Integer;
strMsg: String;
Attrib: LAttribute;
begin
// Assume that the Association is already established

// Query the Print SCP for the printer configuration information
with (LEADDicomPrintSCU.PrinterConfiguration) do
begin
if(Get () = DICOM_SUCCESS)then
begin
// We will display only the Attributes of the first Printer Configuration Item
if(PrinterConfigItems.Count > 0)then
begin
for i:= 0 to PrinterConfigItems.Item(0).Attributes.Count-1 do
begin
Attrib:= PrinterConfigItems.Item(0).Attributes.Item(i);
strMsg:= strMsg + Attrib.Name + ': ' + Attrib.Value + Chr(13);
end;
Application.MessageBox(PChar(strMsg), 'Printer Config Info', MB_OK);
end;
end;
end;
end;


Getting Printer Information (Delphi)

Procedure TForm1.GetPrinterInfo(LEADDicomPrintSCU: TLEADDicomPrintSCU);
var
strMsg: String;
begin
// Assume that the Association is already established
// We need only the Printer Status and Printer Status Info
LEADDicomPrintSCU.Printer.RequiredInfo:= PRN_PRINTER_STATUS + PRN_PRINTER_STATUS_INFO;

// Query the Print SCP for the information
if(LEADDicomPrintSCU.Printer.GetInfo (True, False) = DICOM_SUCCESS)then
begin
strMsg:= 'Printer Status: ' + LEADDicomPrintSCU.Printer.PrinterStatus + Chr(13) +
'Printer Status Info: ' + LEADDicomPrintSCU.Printer.PrinterStatusInfo;
// Display the retrieved information
Application.MessageBox(PChar(strMsg), 'Printer Info', MB_OK);
end;
end;


Loading a Data Set (Delphi)

Take the following steps to start a project and to add some code that loads a DICOM Data Set and prints information about the data set:

1. | Start Delphi.
2. | On the Project pull-down menu, use the Import Type library… and select LEAD DICOM DS COM Object Library (14.0) and LEAD DICOM Kernel COM Object Library (14.0) then press OK.
3. | Select LEAD DICOM DS and LEAD DICOM Factory from the ActiveX tab and add them to your form.
4. | Add a button to your form and name it as follows:
 | Name | Caption
 | btnLoadImage | Load Image
5. | Code the main form's Create procedure as follows.

procedure TForm1.FormCreate(Sender: TObject);
var
strLic: String;
DicomKernel: LEADDicomKernel;
begin
//Unlock DICOM support.
//Note that this is a sample key, which will not work in your toolkit.
strLic:= 'LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc.';
DicomKernel:= LEADDicomFactory1.CreateObject ('LEADDicomKernel.LEADDicomKernel', strLic) as LEADDicomKernel;
DicomKernel.UnlockSupport (L_SUPPORT_MEDICAL, 'TestKey');
end;

6.

Code the btnLoadImage button's click procedure as follows:

procedure TForm1.btnLoadImageClick(Sender: TObject);
var
nRet: Integer;
nCount: Integer;
bResult: Boolean;
begin
LEADDicomDS1.EnableMethodErrors:= False;
nRet:= LEADDicomDS1.LoadDS ('D:\lead14\dist\images\dicom\image1.dic', 0);
if(nRet <> DICOM_SUCCESS)then
begin
ShowMessage('Error ' + IntToStr(nRet) + ' loading file!');
Exit;
end;

nCount:= LEADDicomDS1.GetModuleCount ();
LEADDicomDS1.FindIndexModule (0);
bResult:= LEADDicomDS1.SetCurrentElement (LEADDicomDS1.DefaultInterface.Get_CurrentModule().Element[0].hElement);
if(bResult)then
begin
ShowMessage('There are ' + IntToStr(nCount) + ' modules in this data set.' + (Chr(13)) +
'The first module has ' + IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentModule().ElementCount) +
' elements.' + (Chr(13)) + 'The first element has: ' + (Chr(13)) + 'Tag number:' +
IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentElement().Tag) + (Chr(13)) + 'VR: ' +
IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentElement().VR));
end;

LEADDicomDS1.EnableMethodErrors:= True;
end;

7. | Run your program to test it.
8. | Save the project to be used as a starting point for other tasks in this tutorial.


Loading a DICOM Directory (Delphi)

//global
LEADDicomDir1: TLEADDicomDir;

Procedure TForm1.TestLoadingDicomDir();
begin
// Load a DICOMDIR File. Note: It is necessary to specify
// DS_LOAD_CLOSE so that we can save the Directory later.
LEADDicomDir1.LoadDicomDir ('C:\Medical Images\DICOMDIR', DS_LOAD_CLOSE);

// Add some additional DICOM files to the loaded Directory
LEADDicomDir1.InsertDicomFile ('C:\Medical Images\Image');
LEADDicomDir1.InsertDicomFile('C:\Medical Images\Patient 2\Image1');

// Save the DICOMDIR File
LEADDicomDir1.SaveDicomDir ();
end;


Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control (Delphi)

// The following code snippet demonstrates how to use the LEADTOOLS DICOM
// DS COM control (TLEADDicomDS) to get the Value of the Implementation Class
// UID element of a DICOM Directory.

//global
LEADDicomDir1: TLEADDicomDir;
LEADDicomDS1: TLEADDicomDS;

var
nRetValue: Integer;
begin
// Load a DICOMDIR File
nRetValue:= LEADDicomDir1.LoadDicomDir ('C:\Medical Images\DICOMDIR', DS_LOAD_CLOSE);

if(nRetValue = DICOM_SUCCESS)then
begin
LEADDicomDS1.hDicomDS:= LEADDicomDir1.hDicomDirDS;
nRetValue:= LEADDicomDS1.FindFirstElement (TAG_IMPLEMENTATION_CLASS_UID, False);
if(nRetValue = DICOM_SUCCESS)then
begin
LEADDicomDS1.GetConvertValue ();

// Display the value of the element
ShowMessage(LEADDicomDS1.StringValues [0]);

LEADDicomDS1.StringValueCount:= 0;
end;
end;
end;


Performing Basic Print Management (Delphi)

// global
LEADDicomPrintSCU1: TLEADDicomPrintSCU;

Procedure TForm1.PerformBasicPM();
var
i: Integer;
nRet: Integer;
strMsg: String;
strPresLUTInstanceUID: String;
strOverlayBoxInstanceUID: String;
nAnnBoxesCount: Integer;
vOpt: TVarData;
strPrintJobInstanceUID: String;
begin
LEADDicomPrintSCU1.Timeout:= 60; // 60 seconds

LEADDicomPrintSCU1.EnableMethodErrors:= False;

// Establish the Association
nRet:= LEADDicomPrintSCU1.Associate ('10.0.2.20', 7104, 'PrintSCP', 'PrintSCU',
PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS +
PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS +
PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS +
PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS +
PRNSCU_PRESENTATION_LUT_SOP_CLASS +
PRNSCU_PRINT_JOB_SOP_CLASS +
PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS);
if(nRet = DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED)then
begin
strMsg:= 'Source:= ' + IntToStr(LEADDicomPrintSCU1.AssociateRejectSource) + ', ' +'Reason:= ' + IntToStr(LEADDicomPrintSCU1.AssociateRejectReason);
Application.MessageBox(PChar(strMsg),
'Association Request was Rejected',
MB_OK);
Exit;
end
else
begin
if(nRet <> DICOM_SUCCESS)then
begin
strMsg:= 'Error code: ' + IntToStr(nRet);
Application.MessageBox(PChar(strMsg),
'Failed to Establish the Association',
MB_OK);
Exit;
end;
end;

// Abort the Association if none of the Basic Print Management Meta SOP Classes
// is supported on the Association
if((LEADDicomPrintSCU1.IsClassSupported (PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS)= False) And
(LEADDicomPrintSCU1.IsClassSupported (PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS)= False))then
begin
LEADDicomPrintSCU1.AbortAssociation ();
Exit;
end;

// Display some printer info
//GetPrinterInfo(LEADDicomPrintSCU1);

// Display some printer configuration info
//GetPrinterConfigInfo(LEADDicomPrintSCU1);

// Create a Film Session
LEADDicomPrintSCU1.FilmSession.IncludedParameters:= 0;
LEADDicomPrintSCU1.FilmSession.Create (false);
strMsg:= LEADDicomPrintSCU1.FilmSession.SOPInstanceUID;
Application.MessageBox(PChar(strMsg), 'Film Session SOP Instance UID', MB_OK);

// Update the Number of Copies and Print Priority of the Film Session
LEADDicomPrintSCU1.FilmSession.IncludedParameters:= FS_NUMBER_OF_COPIES + FS_PRINT_PRIORITY;
LEADDicomPrintSCU1.FilmSession.NumberOfCopies:= 1;
LEADDicomPrintSCU1.FilmSession.PrintPriority:= 'MED';
LEADDicomPrintSCU1.FilmSession.Update ();

LEADDicomPrintSCU1.FilmBox.IncludedParameters:= 0;
if(LEADDicomPrintSCU1.FilmBox.MainObject.IsClassSupported (PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS))then
begin
LEADDicomPrintSCU1.FilmBox.IncludedParameters:= LEADDicomPrintSCU1.FilmBox.IncludedParameters + FB_ANNOTATION_DISPLAY_FORMAT_ID;
LEADDicomPrintSCU1.FilmBox.AnnotationDisplayFormatID:= 'SomeID';
end;

// Create a Film Box
LEADDicomPrintSCU1.FilmBox.Create('STANDARD\1,1');
strMsg:= LEADDicomPrintSCU1.FilmBox.SOPInstanceUID;
Application.MessageBox(PChar(strMsg), 'Film Box SOP Instance UID', MB_OK);

// Create a Presentation LUT
if(LEADDicomPrintSCU1.PresentationLUT.MainObject.IsClassSupported (PRNSCU_PRESENTATION_LUT_SOP_CLASS))then
begin
if(LEADDicomPrintSCU1.PresentationLUT.Create('C:\PresLUT.dic','IDENTITY')= DICOM_SUCCESS)then
begin
strPresLUTInstanceUID:= LEADDicomPrintSCU1.PresentationLUT.GetSOPInstanceUID ();
Application.MessageBox(PChar(strPresLUTInstanceUID), 'Pres LUT SOP Instance UID', MB_OK);
end;
end;

if(Length(strPresLUTInstanceUID) > 0)then
begin
// Update the Film Box to reference the Presentation LUT we just created
LEADDicomPrintSCU1.FilmBox.IncludedParameters:= FB_REF_PRES_LUT_INSTANCE_UID;
LEADDicomPrintSCU1.FilmBox.RefPresLUTInstanceUID:= strPresLUTInstanceUID;
LEADDicomPrintSCU1.FilmBox.Update ();
end;

// Create an Image Overlay Box
if(LEADDicomPrintSCU1.ImageOverlayBox.MainObject.IsClassSupported (PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS))then
begin
LEADDicomPrintSCU1.ImageOverlayBox.OverlayOriginRow:= 1;
LEADDicomPrintSCU1.ImageOverlayBox.OverlayOriginColumn:= 1;

LEADDicomPrintSCU1.ImageOverlayBox.IncludedParameters:= 0;

if(LEADDicomPrintSCU1.ImageOverlayBox.Create('C:\Overlay.dic')= DICOM_SUCCESS)then
begin
strOverlayBoxInstanceUID:= LEADDicomPrintSCU1.ImageOverlayBox.GetSOPInstanceUID();
Application.MessageBox(PChar(strOverlayBoxInstanceUID), 'Image Overlay Box SOP Instance UID', MB_OK);
end;
end;

// Update the Image Box. Since the Image Display Format of the Film Box was
// set to 'STANDARD\1,1', then we are supposed to have one Image Box created
// by the Print SCP.
if(LEADDicomPrintSCU1.ImageBoxes.Count > 0)then
begin
strMsg:= LEADDicomPrintSCU1.ImageBoxes.Item(0).SOPInstanceUID;
Application.MessageBox(PChar(strMsg), 'Image Box SOP Instance UID', MB_OK);

LEADDicomPrintSCU1.ImageBoxes.Item(0) .IncludedParameters:= 0;

if(Length(strOverlayBoxInstanceUID) > 0)then
begin
LEADDicomPrintSCU1.ImageBoxes.Item(0).IncludedParameters:= LEADDicomPrintSCU1.ImageBoxes.Item(0) .IncludedParameters + IB_REF_IMAGE_OVERLAY_BOX_INSTANCE_UID;
LEADDicomPrintSCU1.ImageBoxes.Item(0).RefImageOverlayBoxInstanceUID:= strOverlayBoxInstanceUID;
end;

LEADDicomPrintSCU1.ImageBoxes.Item(0).Update('C:\Image.dic');
end;

// Update the Annotation Boxes (if there are any)
nAnnBoxesCount:= LEADDicomPrintSCU1.AnnotationBoxes.Count;
for i:= 0 to nAnnBoxesCount-1 do
begin
LEADDicomPrintSCU1.AnnotationBoxes.Item(i).TextString:= 'Some Text';
LEADDicomPrintSCU1.AnnotationBoxes.Item(i).Update(True);
end;

// Change the Overlay Origin of the Image Overlay Box referenced by the
// Image Box
if(Length(strOverlayBoxInstanceUID) > 0)then
begin
LEADDicomPrintSCU1.ImageOverlayBox.IncludedParameters:= OB_OVERLAY_ORIGIN;
LEADDicomPrintSCU1.ImageOverlayBox.OverlayOriginRow:= 10;
LEADDicomPrintSCU1.ImageOverlayBox.OverlayOriginColumn:= 10;

vOpt.VType:= varError;
vOpt.VError:= DISP_E_PARAMNOTFOUND;
LEADDicomPrintSCU1.ImageOverlayBox.Update(strOverlayBoxInstanceUID, OleVariant(vOpt));
end;

// Print the Film Session (or the Film Box; there is no difference since we
// have a single Film Box in the Film Session)
if(True)then
begin
LEADDicomPrintSCU1.FilmSession. .PrintSession ();
strPrintJobInstanceUID:= LEADDicomPrintSCU1.FilmSession.PrintJobSOPInstanceUID;
end
else
begin
LEADDicomPrintSCU1.FilmBox.PrintBox ();
strPrintJobInstanceUID:= LEADDicomPrintSCU1.FilmBox.PrintJobSOPInstanceUID;
end;

// Display some info about the Print Job
if(LEADDicomPrintSCU1.IsClassSupported (PRNSCU_PRINT_JOB_SOP_CLASS))then
begin
//GetPrintJobInfo(LEADDicomPrintSCU1, strPrintJobInstanceUID);
end;

// Delete the Film Box (anyway, it would be deleted when the Film Session
// is deleted)
LEADDicomPrintSCU1.FilmBox.Delete ();

// Delete the Film Session
LEADDicomPrintSCU1.FilmSession.Delete();

// Delete the Presentation LUT
if(Length(strPresLUTInstanceUID) > 0)then
LEADDicomPrintSCU1.PresentationLUT.Delete (strPresLUTInstanceUID);

// Delete the Image Overlay Box
if(Length(strOverlayBoxInstanceUID) > 0)then
LEADDicomPrintSCU1.ImageOverlayBox.Delete (strOverlayBoxInstanceUID);

// Release the Association and close the connection
LEADDicomPrintSCU1.ReleaseAssociation ();
end;


Performing Pull Stored Print Management (Delphi)

// global
LEADDicomPrintSCU1: TLEADDicomPrintSCU;
Procedure TForm1.PerformPullStoredPM();
var
nRet: Integer;
strMsg: String;
begin
// Establish the Association
nRet:= LEADDicomPrintSCU1.Associate ('10.0.2.20', 7104, 'PrintSCP', 'PrintSCU',
PRNSCU_PULL_STORED_PM_META_SOP_CLASS +
PRNSCU_PRINT_JOB_SOP_CLASS +
PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS);
if(nRet = DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED)then
begin
strMsg:= 'Source = ' + IntToStr(LEADDicomPrintSCU1.AssociateRejectSource) + ', ' +
'Reason = ' + IntToStr(LEADDicomPrintSCU1.AssociateRejectReason);
Application.MessageBox(PChar(strMsg), 'Association Request was Rejected', MB_OK);
Exit;
end
else
begin
if(nRet <> DICOM_SUCCESS)then
begin
strMsg:= 'Error code: ' + IntToStr(nRet);
Application.MessageBox(PChar(strMsg), 'Failed to Establish the Association', MB_OK);
Exit;
end;
end;

// Display some printer info
//GetPrinterInfo(LEADDicomPrintSCU1);

// Display some printer configuration info
//GetPrinterConfigInfo(LEADDicomPrintSCU1);

// A referenced Stored Print Storage SOP Instance
LEADDicomPrintSCU1.PullPrintRequest.RemoveAllStoredPrintItems();
LEADDicomPrintSCU1.PullPrintRequest.AddStoredPrintItem('SomeAE',
'1.2.840.114257.254.7638.6787',
'1.2.840.114257.945.5676.5674',
'1.2.840.114257.23.2343.3489',
'SomeID');

// Ask the Print SCP to create a Pull Print Request SOP Instance
LEADDicomPrintSCU1.PullPrintRequest.IncludedParameters:= PPR_NUMBER_OF_COPIES;
LEADDicomPrintSCU1.PullPrintRequest.NumberOfCopies:= 1;
LEADDicomPrintSCU1.PullPrintRequest.Create();
strMsg:= LEADDicomPrintSCU1.PullPrintRequest.SOPInstanceUID;
Application.MessageBox(PChar(strMsg), 'Pull Print Request SOP Instance UID', MB_OK);

// Print the session
LEADDicomPrintSCU1.PullPrintRequest.PrintSession ();

// Display some info about the Print Job
if(LEADDicomPrintSCU1.PullPrintRequest.MainObject.IsClassSupported (PRNSCU_PRINT_JOB_SOP_CLASS))then
begin
//GetPrintJobInfo objPrintSCU, .PrintJobSOPInstanceUID
end;

// Ask the Print SCP to delete the Pull Print Request SOP Instance
LEADDicomPrintSCU1.PullPrintRequest.Delete ();

// Release the Association and close the connection
LEADDicomPrintSCU1.ReleaseAssociation ();
end;


Using the DicomFileInsert Event (Delphi)

//global
LEADDicomDir1: TLEADDicomDir;
LEADDicomFactory1: TLEADDicomFactory;

Procedure TForm1.CreateDicomDir();
var
strLic: String;
DicomKernel: LEADDicomKernel;
begin
strLic:= 'LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc.';
DicomKernel:= LEADDicomFactory1.CreateObject ('LEADDicomKernel.LEADDicomKernel', strLic) as ILEADDicomKernel;

DicomKernel.UnlockSupport (L_SUPPORT_MEDICAL, L_KEY_MEDICAL);
if(DicomKernel.IsSupportLocked (L_SUPPORT_MEDICAL))then
begin
Application.MessageBox('Medical Support must be unlocked for this demo!', 'Error', MB_OK + MB_ICONEXCLAMATION);
Exit;
end;

// Set the destination folder
LEADDicomDir1.ResetDicomDir ('C:\Medical Images');

// Files in subfolders should also be included
LEADDicomDir1.IncludeSubfolders:= True;

// Add all the DICOM files to the Directory
LEADDicomDir1.InsertDicomFile ('');

// Save the DICOMDIR File
LEADDicomDir1.SaveDicomDir ();
end;

procedure TForm1.LEADDicomDir1DicomFileInsert(ASender: TObject;
const bstrFileName: WideString; hDicomDS: Integer; nStatus: Smallint;
out pReturnVal: Smallint);
var
strBuffer: String;
nResult: Integer;
begin
if(nStatus = DICOMDIR_INSERTDICOMFILE_PREADD)then
begin
strBuffer:= 'About to add the file ''' + bstrFileName + '''.' + Chr(13) + Chr(13) + 'Proceed?';
nResult:= Application.MessageBox(PChar(strBuffer), 'DICOM Directory Sample', MB_YESNOCANCEL);
if(nResult = mrNo)then
begin
pReturnVal:= DICOM_ERROR_FORMAT; // Skip the file
Exit;
end
else
begin
if(nResult = mrCancel)then
begin
pReturnVal:= DICOM_ERROR_END; // Abort
Exit;
end;
end;
end
else
begin
if(nStatus = DICOM_SUCCESS)then
begin
strBuffer:= 'The file ''' + bstrFileName + ''' has been added successfully.' + Chr(13) + Char(13) + 'Continue?';
nResult:= Application.MessageBox(PChar(strBuffer), 'DICOM Directory Sample', MB_YESNO);
if(nResult = mrNo)then
begin
pReturnVal:= DICOM_ERROR_END; // Abort
Exit;
end;
end;
end;
end;


Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport (Delphi)

// global
LEADDicomPrintSCU1: TLEADDicomPrintSCU;
procedure TForm1.LEADDicomPrintSCU1Status(ASender: TObject;
Status: TOleEnum; OperationStatus: Integer);
var
strMsg: String;
strStatusCodeType: String;
strOpStatus: String;
begin
Case (Status) of

PRNSCU_STATUS_RECEIVE_ABORT:
begin
strMsg:= 'Source = ' + IntToStr(LEADDicomPrintSCU1.AbortSource) + ', ' +
'Reason = ' + IntToStr(LEADDicomPrintSCU1.AbortReason);
Application.MessageBox(PChar(strMsg), 'Print SCP Aborted the Association', MB_OK);
end;

PRNSCU_STATUS_RECEIVE_PRINT_FILM_SESSION_RSP:
begin
if(OperationStatus = COMMAND_STATUS_SUCCESS)then
begin
if(LEADDicomPrintSCU1.LastOperationStatus = COMMAND_STATUS_SUCCESS)then
strStatusCodeType:= 'Success'
else
strStatusCodeType:= 'Warning';
end
else
strStatusCodeType:= 'Failure';

strOpStatus:= IntToStr(LEADDicomPrintSCU1.LastOperationStatus);
while(Length(strOpStatus) < 4)do
begin
strOpStatus:= '0' + strOpStatus;
end;
strOpStatus:= '0x' + strOpStatus;

StrMsg:= 'Status: ' + strOpStatus + ' (' + strStatusCodeType + ')';
Application.MessageBox(PChar(strMsg), 'Received N-ACTION-RSP (Basic Film Session SOP Class)', MB_OK);
end;
end;
end;

procedure TForm1.LEADDicomPrintSCU1PrinterReport(ASender: TObject;
EventTypeID: Smallint; const PrinterStatusInfo, FilmDestination,
PrinterName: WideString);
var
strMsg: String;
strEventTypeName: String;
begin
strEventTypeName:= 'Normal';
Case (EventTypeID) of

2:
begin
strEventTypeName:= 'Warning';
end;

3:
begin
strEventTypeName:= 'Failure';
end;
end;

strMsg:= 'Event Type Name: ' + strEventTypeName;

if(EventTypeID <> 1)then
begin
strMsg:= strMsg + Chr(13) +
'Printer Status Info: ' + PrinterStatusInfo + Chr(13) +
'Film Destination: ' + FilmDestination + Chr(13) +
'Printer Name: ' + PrinterName;
end;

Application.MessageBox(Pchar(strMsg), 'Printer Status Report', MB_OK);
end;

procedure TForm1.LEADDicomPrintSCU1PrintJobReport(ASender: TObject;
const PrintJobSOPInstanceUID: WideString; EventTypeID: Smallint;
const ExecutionStatusInfo, PrintJobID, FilmSessionLabel,
PrinterName: WideString);
var
strMsg: String;
strEventTypeName: String;
begin
strEventTypeName:= 'Pending';
Case (EventTypeID) of

2:
begin
strEventTypeName:= 'Printing';
end;

3:
begin
strEventTypeName:= 'Done';
end;

4:
begin
strEventTypeName:= 'Failure'
end;
end;

strMsg:= 'Print Job SOP Instance UID: ' + PrintJobSOPInstanceUID + Chr(13) +
'Event Type Name: ' + strEventTypeName + Chr(13) +
'Execution Status Info: ' + ExecutionStatusInfo + Chr(13) +
'Film Session Label: ' + FilmSessionLabel + Chr(13) +
'Printer Name: ' + PrinterName;

Application.MessageBox(PChar(strMsg), 'Print Job Status Report', MB_OK);
end;


Miscellaneous Examples (Delphi)

You can test any of the following examples by adding a command button and pasting the sample code in the Click procedure:

Accept Example for Delphi

AnnCount Example for Delphi

ChangeTransferSyntax Example for Delphi

CloseForced Example for Delphi

ConformanceStatus Example for Delphi

Connect Example for Delphi

Converting DICOM Annotation Objects to LEAD Annotation Objects Example for Delphi

Converting LEAD Annotation Objects to DICOM Annotation Objects Example for Delphi

Creating DICOM Annotations Example for Delphi Example for Delphi

CreateAssociate Example for Delphi

DefaultIOD Example for Delphi

DefaultTag Example for Delphi

DefaultUID Example for Delphi

DefaultVR Example for Delphi

DeleteBitmapValue Example for Delphi

DeleteElement Example for Delphi

DeleteIOD Example for Delphi

DeleteModule Example for Delphi

DeleteTag Example for Delphi

DeleteUID Example for Delphi

DeleteVR Example for Delphi

DSTempPath Example for Delphi

EnableMethodErrors (ILEADDicomNet) Example for Delphi

Examining Annotations (1) Example for Delphi

Examining Annotations (2) Example for Delphi

FindFirstElement Example for Delphi

FindIndexModule Example for Delphi

FindLastElement Example for Delphi

FindModule Example for Delphi

FindModuleIOD Example for Delphi

FindPresentationAbstract Example for Delphi

GetAgeValue Example for Delphi

GetApplication Example for Delphi

GetAuthenticationAlgorithmTLS Example for Delphi

GetBinaryValue Example for Delphi

GetBitmapCount Example for Delphi

GetCharValue Example for Delphi

GetConvertValue Example for Delphi

GetDateTimeValue Example for Delphi

GetDateValue Example for Delphi

GetDoubleValue Example for Delphi

GetElementLevel Example for Delphi

GetEncryptionAlgorithmTLS Example for Delphi

GetEncryptKeyLengthTLS Example for Delphi

GetExtendedData Example for Delphi

GetFloatValue Example for Delphi

GetImageInformation Example for Delphi

GetInfoDS Example for Delphi

GetIntegrityAlgorithmTLS Example for Delphi

GetKeyExchangeAlgorithmTLS Example for Delphi

GetLongValue Example for Delphi

GetModuleCount Example for Delphi

GetMutualAuthKeyLengthTLS Example for Delphi

GetPeerAuthDataISCL Example for Delphi

GetPeerEncryptionISCL Example for Delphi

GetPeerMACISCL Example for Delphi

GetPeerRequestedMessageLengthISCL Example for Delphi

GetPresentationAbstract Example for Delphi

GetPresentationCount Example for Delphi

GetPresentationResult Example for Delphi

GetSendQueueSize Example for Delphi

GetServer Example for Delphi

GetShortValue Example for Delphi

GetStatusISCL Example for Delphi

GetStringValue Example for Delphi

GetTagCount Example for Delphi

GetTimeValue Example for Delphi

Getting an overlay bitmap list Example for Delphi

Getting and setting a non-linear VOI LUT Example for Delphi

Getting and setting window center and width Example for Delphi

Getting modality LUT data and attributes Example for Delphi

Getting palette color LUT data and attributes Example for Delphi

Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for Delphi

GetTransferCount Example for Delphi

GetUIDCount Example for Delphi

GetUserInfoCount Example for Delphi

GetVRCount Example for Delphi

IncludeVolatile Example for Delphi

InitCS Example for Delphi

InitDS Example for Delphi

InsertBitmapListValue Example for Delphi

InsertBitmapValue Example for Delphi

InsertDS Example for Delphi

InsertElement Example for Delphi

InsertIOD Example for Delphi

InsertKey Example for Delphi

InsertModule Example for Delphi

InsertTag Example for Delphi

InsertUID Example for Delphi

InsertVR Example for Delphi

IsActivated Example for Delphi

IsAsyncOperations Example for Delphi

ISCLChallengeResponseSuccess Example for Delphi

IsImplementClass Example for Delphi

IsImplementVersion Example for Delphi

IsISCLQueueEmpty Example for Delphi

IsMaxLengthEnabled Example for Delphi

IsRoleSelect Example for Delphi

IsSupportLocked Example for Delphi

J2KCompressionControl Example for Delphi

J2KCompressionRatio Example for Delphi

J2KROIControl Example for Delphi

J2KSetDefaults Example for Delphi

J2KTargetFileSize Example for Delphi

KeepPixelDataIntact Example for Delphi

Listen Example for Delphi

LoadDS Example for Delphi

MoveFirstIOD Example for Delphi

MoveFirstTag Example for Delphi

MoveFirstUID Example for Delphi

MoveFirstVR Example for Delphi

MoveRootElement Example for Delphi

MoveRootIOD Example for Delphi

NetClose Example for Delphi

NetConnect Example for Delphi

NetNonSecureReceivedISCL Example for Delphi

NetNonSecureSendISCL Example for Delphi

NetReceive Example for Delphi

NetReceiveAbort Example for Delphi

NetReceiveAssociateAccept Example for Delphi

NetReceiveAssociateReject Example for Delphi

NetReceiveAssociateRequest Example for Delphi

NetReceiveCCancelRequest Example for Delphi

NetReceiveCEchoResponse Example for Delphi

NetReceiveCFindResponse Example for Delphi

NetReceiveCGetRequest Example for Delphi

NetReceiveCGetResponse Example for Delphi

NetReceiveCMoveRequest Example for Delphi

NetReceiveCMoveResponse Example for Delphi

NetReceiveCStoreResponse Example for Delphi

NetReceiveData Example for Delphi

NetReceiveNActionRequest Example for Delphi

NetReceiveNActionResponse Example for Delphi

NetReceiveNCreateResponse Example for Delphi

NetReceiveNDeleteResponse Example for Delphi

NetReceiveNGetRequest Example for Delphi

NetReceiveNGetResponse Example for Delphi

NetReceiveNReportRequest Example for Delphi

NetReceiveNReportResponse Example for Delphi

NetReceiveNSetRequest Example for Delphi

NetReceiveNSetResponse Example for Delphi

NetReceiveReleaseRequest Example for Delphi

NetReceiveReleaseResponse Example for Delphi

NetReceiveUnknown Example for Delphi

NetSecureLinkReady Example for Delphi

NetSend Example for Delphi

Preamble Example for Delphi

ProgressStatus Example for Delphi

ResetDS Example for Delphi

ResetIOD Example for Delphi

ResetTag Example for Delphi

ResetUID Example for Delphi

ResetVR Example for Delphi

SaveDS Example for Delphi

SendAbort Example for Delphi

SendAssociateRequest Example for Delphi

SendCCancelRequest Example for Delphi

SendCEchoRequest Example for Delphi

SendCEchoResponse Example for Delphi

SendCFindRequest Example for Delphi

SendCFindResponse Example for Delphi

SendCGetRequest Example for Delphi

SendCGetResponse Example for Delphi

SendCMoveRequest Example for Delphi

SendCStoreRequest Example for Delphi

SendCStoreResponse Example for Delphi

SendData Example for Delphi

SendNActionRequest Example for Delphi

SendNCreateRequest Example for Delphi

SendNCreateResponse Example for Delphi

SendNDeleteRequest Example for Delphi

SendNDeleteResponse Example for Delphi

SendNGetRequest Example for Delphi

SendNonSecureISCL Example for Delphi

SendNReportRequest Example for Delphi

SendNSetRequest Example for Delphi

SendReleaseRequest Example for Delphi

SetAuthDataISCL Example for Delphi

SetBitmapListValue Example for Delphi

SetBitmapValue Example for Delphi

SetCalled Example for Delphi

SetCipherToIndexTLS Example for Delphi

SetClientCertificateTLS Example for Delphi

SetCommandSet Example for Delphi

SetCurrentElement Example for Delphi

SetDefaultEncryptionISCL Example for Delphi

SetDefaultSigningISCL Example for Delphi

SetEncryptKeyISCL Example for Delphi

SetMaxCommBlockLengthISCL Example for Delphi

SetMaxMessageLengthISCL Example for Delphi

SetMutualAuthAlgISCL Example for Delphi

SetMutualAuthKeyISCL Example for Delphi

SetRequest Example for Delphi

SetServerCertificateTLS Example for Delphi

SetTagName Example for Delphi

Setting an overlay bitmap list Example for Delphi

Setting modality LUT data and attributes Example for Delphi

Setting palette color LUT data and attributes Example for Delphi

Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for Delphi

SetUIDName Example for Delphi

SetVRName Example for Delphi

StartUp Example for Delphi

Version Example for Delphi


Accept Example for Delphi

procedure TForm1.LEADDicomNet1NetAccept(ASender: TObject;
nStatus: Integer);
var
strOut: String;
hClient: LongInt;
nClients: LongInt;
begin
//accepting the connection attempt
LEADDICOMNet1.Accept();
//get the latest client
nClients:= LEADDICOMNet1.GetClientCount (LEADDICOMNet1.hNet);
hClient:= LEADDICOMNet1.GetClient (LEADDICOMNet1.hNet, nClients - 1);
//display some information about the connection:
strOut:= 'Connection Accepted - ' + 'Peer: ' + LEADDICOMNet1.GetPeerAddress (hClient);
Memo1.Lines.Add(strOut);
//reject the connection if we don//t like the address
if(LEADDICOMNet1.GetPeerAddress (hClient) <> '207.238.49.199')then
begin
//close the connection
LEADDICOMNet1.Close(hClient);
end;
end;


AnnCount Example for Delphi

//This example
// 1. Opens a dataset with annotations
// 2. Finds the location of one of the annotation files
// 3. Loads the annotations
// 4. Flips the annotations
// 5. Saves the annotations to index to slots 250 through 255
// 6. Deletes the annotation files from slot 253
procedure TForm1.AnnCountClick(Sender: TObject);
var
nRet: Integer;
i: Integer;
strMsg: String;
strTmp: String;
nIndexAnn: Integer;
RasterIO: LEADRASTERIO;
RasterAnn: LEADRasterAnnotation;
begin
RasterIO:= coLEADRASTERIO.Create ();
RasterAnn:= coLEADRasterAnnotation.Create();

// Open the dataset with annotations
nRet:= LEADDicomDS1.LoadDS ('e:\images\DicomAnn.dic', 0);
if(nRet <> DICOM_SUCCESS)then
Exit;

RasterIO.EnableMethodErrors:= False;
RasterIO.Load(LEADRasterView1.Raster, 'e:\images\DicomAnn.dic', 0, 0, 1);

// Find the location of one of the annotation files
LEADDicomDS1.AnnCount ();
if(nRet <> DICOM_SUCCESS)then
Exit;

strMsg:= 'Private Creator Tag: ' + IntToStr(LEADDicomDS1.AnnPrivateCreatorTag) + Chr(13);
nIndexAnn:= 0;
for i:= 0 to 255 do
begin
if(LEADDicomDS1.AnnEntries[i] = True)then
begin
nIndexAnn:= i;
strTmp:= Chr(VK_TAB) + IntToStr(i) + Chr(13);
strMsg:= strMsg + strTmp;
end;
end;
ShowMessage(strMsg);

// Loads the annotations
LEADDicomDS1.AnnLoad(nIndexAnn, 1);

// Flip the annotations
RasterAnn.AnnContainer:= LEADDicomDS1.AnnContainer;
RasterAnn.AnnFlip(True, LEADRasterView1.Raster.BitmapHeight / 2, False);
LEADDicomDS1.AnnContainer:= RasterAnn.AnnContainer;

// Save the annotations to index to slots 250 through 255
for i:= 250 to 255 do
begin
nRet:= LEADDicomDS1.AnnSave(i, ANN_FMT_NATIVE, False, SAVE_OVERWRITE, 1);
end;

// Delete the annotation files from slot 253
LEADDicomDS1.AnnDelete(253, -1);

// Display file info
LEADDicomDS1.AnnCount ();
if(nRet <> DICOM_SUCCESS)then
Exit;

strMsg:= 'Private Creator Tag: ' + IntToStr(LEADDicomDS1.AnnPrivateCreatorTag) + Chr(13);
for i:= 0 to 255 do
begin
if(LEADDicomDS1.AnnEntries [i] = True)then
begin
strTmp:= Chr(VK_TAB) + IntToStr(i) + Chr(13);
strMsg:= strMsg + strTmp;
end;
end;
ShowMessage(strMsg);

// Save the data set
LEADDicomDS1.SaveDS('e:\erase\dicom.dic', 0);
end;


ChangeTransferSyntax Example for Delphi

// Load a Data Set
if(LEADDicomDS1.LoadDS ('d:\lead14\dist\images\dicom\image2.dic', 0) = DICOM_SUCCESS)then
begin
// Change the Transfer Syntax to Explicit VR Big Endian
LEADDicomDS1.ChangeTransferSyntax (UID_EXPLICIT_VR_BIG_ENDIAN, 0, 0);

// Save the new Data Set
LEADDicomDS1.SaveDS('d:\temp\Temp.dic', 0);
end;


CloseForced Example for Delphi

LEADDICOMNet1.NetworkSecurityMode:= Integer(DICOM_SECURE_ISCL);
LEADDICOMNet1.StartUp ();
// do some communications
LEADDICOMNet1.CloseForced (LEADDICOMNet1.hNet, True);


ConformanceStatus Example for Delphi

procedure TForm1.LEADDicomDS1ConformanceStatus (ASender: TObject;
nFlags: Smallint);
var
msg: String;
nRet: Integer;
strTag: String;
strTagL: String;
strTagR: String;
nLen: Integer;
x: Integer;
begin
//display info about non-standard element
Case (nFlags) of
CALLBACK_ERROR_UNKNOWN_CLASS:
msg:= 'Unknown Class' + Chr(13);

CALLBACK_ERROR_UNKNOWN_TAG:
msg:= 'Unknown Tag' + Chr(13);

CALLBACK_ERROR_UNKNOWN_VR:
msg:= 'Unknown VR' + Chr(13);

CALLBACK_ERROR_WRONG_VR:
msg:= 'Error in VR' + Chr(13);

CALLBACK_ERROR_MIN_VM:
msg:= 'Error in MinVM' + Chr(13);

CALLBACK_ERROR_MAX_VM:
msg:= 'Error in MaxVM' + Chr(13);

CALLBACK_ERROR_DIVIDE_VM:
msg:= 'Error in DivideVM' + Chr(13);

CALLBACK_ERROR_IMAGE:
msg:= 'Error in Image' + Chr(13);
else
Exit;
end;
strTag:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentElement ().Tag);
nLen:= Length(strTag);
strTagR:= RightStr(strTag, 4);
strTagL:= '';
for x:= nLen to 7 do
strTagL:= strTagL + IntToStr(0);

strTagL:= strTagL + LeftStr(strTag, nLen - 4);
strTag:= strTagL + ':' + strTagR;
msg:= msg + 'Tag: ' + strTag;
nRet:= Application.MessageBox(PChar(msg), 'Non-Standard Element', MB_OKCANCEL);
if(nRet = IDCANCEL)then
LEADDicomDS1.EnableConformanceStatus:= False;
end;


Connect Example for Delphi

//connect to a server
LEADDicomNet1.DefaultInterface.Connect('', 0, '207.238.49.190', 104);


Converting DICOM Annotation Objects to LEAD Annotation Objects Example for Delphi

Procedure TForm1.DicomAnnToLEADAnn(objPresStateDS: TLEADDicomDS);
var
objRasterAnn: LEADRasterAnnotation;
begin
objRasterAnn:= coLEADRasterAnnotation.Create();
// Describe a DICOM graphic annotation object and then convert it to
// a LEAD annotation object
with (objPresStateDS.GraphicObjectAttributes) do
begin
type_:= DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE;
Filled:= False;
PointCount:= 5;
PointsX[0]:= 90.7;
PointsY[0]:= 156.9;
PointsX[1]:= 195.9;
PointsY[1]:= 156.9;
PointsX[2]:= 195.9;
PointsY[2]:= 342.5;
PointsX[3]:= 90.7;
PointsY[3]:= 342.5;
PointsX[4]:= 90.7;
PointsY[4]:= 156.9;
end;

if(objPresStateDS.ConvertDicomAnnObjToLEADAnnObj (True) = DICOM_SUCCESS)then
begin
ShowMessage('The DICOM graphic annotation object was converted successfully.');

// The handle to the resulted LEAD annotation object is available from the
// LEADAnnObject property. You can now use the functionality of a LEAD Raster
// Annotation object to manipulate the object.

// Once done from the object, don//t forget to destroy it
objRasterAnn.AnnDestroy(objPresStateDS.LEADAnnObject, 0);
end;

// Describe a DICOM text annotation object and then convert it to a
// LEAD annotation object
with (objPresStateDS.TextObjectAttributes) do
begin
BoundingBoxUsed:= True;
AnchorPointUsed:= False;
TextValue:= 'Text annotation';
BoundingBoxTLHCornerX:= 290.5;
BoundingBoxTLHCornerY:= 158.1;
BoundingBoxBRHCornerX:= 424.1;
BoundingBoxBRHCornerY:= 176.1;
BoundingBoxTextJustification:= DICOM_TEXT_JUSTIFICATION_LEFT;
end;
if(objPresStateDS.ConvertDicomAnnObjToLEADAnnObj (False) = DICOM_SUCCESS)then
begin
ShowMessage('The DICOM text annotation object was converted successfully.');

// The handle to the resulted LEAD annotation object is available from the
// LEADAnnObject property. You can now use the functionality of a LEAD Raster
// Annotation object to manipulate the object.

// Once done from the object, don//t forget to destroy it
objRasterAnn.AnnDestroy(objPresStateDS.LEADAnnObject, 0);
end;
end;


Converting LEAD Annotation Objects to DICOM Annotation Objects Example for Delphi

procedure TForm1.objPresStateConvertLEADAnnObjToDicomAnnObj(
ASender: TObject; bGraphicObject: WordBool);
var
strMsg: String;
nCount: Integer;
I: Integer;
begin
// Display the attributes of the resulted DICOM annotation object
if(bGraphicObject)then // The resulted DICOM annotation object is a graphic object
begin
with (objPresState.GraphicObjectAttributes) do
begin
strMsg:= 'Graphic Annotation Units: ';
Case (Units) of
DICOM_UNIT_PIXEL:
strMsg:= strMsg + 'PIXEL' + Chr(13);

DICOM_UNIT_DISPLAY:
strMsg:= strMsg + 'DISPLAY' + Chr(13);
end;

strMsg:= strMsg + 'Graphic Type: ';
Case (type_) of
DICOM_GRAPHIC_OBJECT_TYPE_POINT:
strMsg:= strMsg + 'POINT' + Chr(13);

DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE:
strMsg:= strMsg + 'POLYLINE' + Chr(13);

DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED:
strMsg:= strMsg + 'INTERPOLATED' + Chr(13);

DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE:
strMsg:= strMsg + 'CIRCLE' + Chr(13);

DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE:
strMsg:= strMsg + 'ELLIPSE' + Chr(13);
end;

strMsg:= strMsg + 'Graphic Filled: ';
if (Filled) then
strMsg:= strMsg + 'Y' + Chr(13)
else
strMsg:= strMsg + 'N' + Chr(13);

nCount:= PointCount;
strMsg:= strMsg + 'Number of Graphic Points: ' + IntToStr(nCount) + Chr(13);

if(nCount < 10)then
begin
strMsg:= strMsg + 'Graphic Data: ' + Chr(13);
for I:= 0 To nCount - 1 do
begin
strMsg:= strMsg + ' ' +
'X' + IntToStr(I) + IntToStr(1) + ', Y' + IntToStr(I) + IntToStr(1) + ':= ' +
FloatToStr(PointsX[I]) + ', ' + FloatToStr(PointsY[I]) + Chr(13);
end;
end;

Application.MessageBox(PChar(strMsg), 'Graphic Annotation Object', MB_OK);
end;
end
else // The resulted DICOM annotation object is a text object
begin
with (objPresState.TextObjectAttributes) do
begin
if(BoundingBoxUsed)then
begin
strMsg:= 'Unformatted Text Value: ' + TextValue + Chr(13);

strMsg:= strMsg + 'Bounding Box Annotation Units: ';
Case (BoundingBoxUnits) of
DICOM_UNIT_PIXEL:
strMsg:= strMsg + 'PIXEL' + Chr(13);

DICOM_UNIT_DISPLAY:
strMsg:= strMsg + 'DISPLAY' + Chr(13);
end;

strMsg:= strMsg +
'Bounding Box Top Left Hand Corner: ' +
FloatToStr(BoundingBoxTLHCornerX) + ', ' +
FloatToStr(BoundingBoxTLHCornerY) + Chr(13);

strMsg:= strMsg +
'Bounding Box Bottom Right Hand Corner: ' +
FloatToStr(BoundingBoxBRHCornerX) + ', ' +
FloatToStr(BoundingBoxBRHCornerY) + Chr(13);

strMsg:= strMsg + 'Bounding Box Text Horizontal Justification: ';

Case (BoundingBoxTextJustification) of
DICOM_TEXT_JUSTIFICATION_LEFT:
strMsg:= strMsg + 'LEFT' + Chr(13);
DICOM_TEXT_JUSTIFICATION_RIGHT:
strMsg:= strMsg + 'RIGHT' + Chr(13);
DICOM_TEXT_JUSTIFICATION_CENTER:
strMsg:= strMsg + 'CENTER' + Chr(13);
end;
end
else
begin
strMsg:= 'Unformatted Text Value: ' + TextValue + Chr(13);

strMsg:= strMsg + 'Anchor Point Annotation Units: ';
Case (AnchorPointUnits) of
DICOM_UNIT_PIXEL:
strMsg:= strMsg + 'PIXEL' + Chr(13);

DICOM_UNIT_DISPLAY:
strMsg:= strMsg + 'DISPLAY' + Chr(13);
end;

strMsg:= strMsg + 'Anchor Point: ' +
FloatToStr(AnchorPointX) + ', ' +
FloatToStr(AnchorPointY) + Chr(13);

strMsg:= strMsg + 'Anchor Point Visibility: ';
if(AnchorPointVisible)then
strMsg:= strMsg + 'Y'
else
strMsg:= strMsg + 'N';
end;

Application.MessageBox(PChar(strMsg), 'Text Annotation Object', MB_OK);
end;
end;

// If it is desired to stop the conversion process...
//objPresState.EndConversion DICOM_ERROR_ANN // Any error code, but not 0

end;

Procedure TForm1.LEADAnnToDicomAnn(objPresStateDS: TLEADDicomDS);
var
objRasterAnn: LEADRasterAnnotation;
begin
// Update the CurrentElement property with a Graphic Annotation Item so
// that the resulted DICOM annotation objects are added to the Data Set
if(objPresStateDS.FindFirstGraphicAnnItem () <> 0)then
begin
// (Make sure that the specified layer is already defined in the
// 'Graphic Layer Module')
objPresStateDS.CreateGraphicAnnItem (0, 'LAYER_0');
objPresStateDS.FindFirstGraphicAnnItem ();
end;

objRasterAnn:= coLEADRasterAnnotation.Create();
// Let//s create a LEAD rectangle annotation object
with (objRasterAnn) do
begin
AnnCreate(ANN_OBJECT_RECT, False, False);
AnnRectLeft[AnnObject]:= 150;
AnnRectTop[AnnObject]:= 175;
AnnRectWidth[AnnObject]:= 200;
AnnRectHeight[AnnObject]:= 100;
AnnSetFillMode(AnnObject, ANN_FILLMODE_TRANSPARENT, False);
end;

// Convert the LEAD annotation object. Now, for each resulted DICOM annotation
// object, the OnConvertLEADAnnObjToDicomAnnObj event gets fired. By handling
// the event, you can inspect the resulted object.
if(objPresStateDS.ConvertLEADAnnObjToDicomAnnObjs (objRasterAnn.AnnObject, 0) = DICOM_SUCCESS)then
ShowMessage('The LEAD annotation object was converted successfully.');

// Destroy the LEAD annotation object
objRasterAnn.AnnDestroy(objRasterAnn.AnnObject, 0);
end;


CreateAssociate Example for Delphi

//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate (True);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);
ShowMessage('Associate Request? ' + BoolToStr(LEADDICOMNet1.IsRequest(LEADDICOMNet1.hPDU)));
//reset the Associate class to Accept
LEADDICOMNet1.ResetAssociate (LEADDICOMNet1.hPDU, False);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);
ShowMessage('Associate Request? ' + BoolToStr(LEADDICOMNet1.IsRequest(LEADDICOMNet1.hPDU)));
//free the Associate class
LEADDICOMNet1.FreeAssociate (LEADDICOMNet1.hPDU);


Creating DICOM Annotations Example for Delphi Example for Delphi

Creating DICOM Annotations Example for Delphi

Procedure TForm1.CreateAnnotations(objPresStateDS: TLEADDicomDS);
var
vOpt: TVarData;
strLayerName: String;
hGraphicAnnItem: LongInt;
strSOPInstanceUID: String;
begin
hGraphicAnnItem:= 0;
// Set the attributes that describe the "Presentation State Module"
with (objPresStateDS.PresStateAttributes) do
begin
InstanceNumber:= 1;
PresLabel:= 'SOME_LABEL';
PresDescription:= 'Description of the presentation';
with (PresCreationDate) do
begin
Year:= YearOf(Date);
Month:= MonthOf(Date);
Day:= DayOf(Date);
end;
with (PresCreationTime) do
begin
Hours:= HourOf(Time);
Minutes:= MinuteOf(Time);
Seconds:= SecondOf(Time);
Fractions:= 0;
end;
PresCreatorName:= 'SomeOne';
end;

if(objPresStateDS.SetPresStateAttributes () = DICOM_SUCCESS)then
ShowMessage('Presentation State attributes were set successfully.');

vOpt.VType:= varError;
vOpt.VError:= DISP_E_PARAMNOTFOUND;

// Add references to some images (under the "Presentation State Module")
objPresStateDS.AddPresStateImageRef ('C:\Image1.dic', OleVariant(vOpt));
objPresStateDS.AddPresStateImageRef('C:\Image2.dic', OleVariant(vOpt));
objPresStateDS.AddPresStateImageRef('C:\Image3.dic', OleVariant(vOpt));

// Create a layer
with (objPresStateDS.LayerAttributes) do
begin
LayerName:= 'LAYER_0'; // 'Graphic Layer'
LayerOrder:= 1;
DisplayGrayscaleValue:= -1;
DisplayRedValue:= -1;
DisplayGreenValue:= -1;
DisplayRedValue:= -1;
LayerDescription:= 'Description of the layer';
end;
if(objPresStateDS.CreateLayer () = DICOM_SUCCESS)then
begin
strLayerName:= objPresStateDS.LayerAttributes.LayerName;

ShowMessage('Layer `' + strLayerName + '` was created successfully.');

// Change one of the attributes and update the layer
objPresStateDS.LayerAttributes.LayerOrder:= 0;
objPresStateDS.SetLayerAttributes (objPresStateDS.NewLayerIndex);
end;

// Create a Graphic Annotation Item
if(objPresStateDS.CreateGraphicAnnItem (0, strLayerName) = DICOM_SUCCESS)then
begin
ShowMessage('A Graphic Annotation Item was created successfully.');

objPresStateDS.FindFirstGraphicAnnItem ();
hGraphicAnnItem:= objPresStateDS.DefaultInterface.Get_CurrentElement ().hElement;
end;

// The annotations defined in the Item hGraphicAnnItem will be applied
// only to one of the images listed in the Presentation State Module
if(objPresStateDS.FindFirstPresStateRefSeriesItem () = DICOM_SUCCESS)then
begin
if(objPresStateDS.GetPresStateImageRefCount () > 0)then
strSOPInstanceUID:= objPresStateDS.GetPresStateImageRefInstanceUID (0);
end;
objPresStateDS.SetCurrentElement (hGraphicAnnItem);
objPresStateDS.AddLayerImageRef(strSOPInstanceUID);

// Let//s create a graphic annotation object
with(objPresStateDS.GraphicObjectAttributes) do
begin
LayerName:= strLayerName;
Units:= DICOM_UNIT_PIXEL;
type_:= DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE;
Filled:= True;
PointCount:= 2; // "Number of Graphic Points"
// 'Graphic Data':
PointsX[0]:= 252.5;
PointsY[0]:= 252.5;
PointsX[1]:= 209.2;
PointsY[1]:= 199.6;
end;

if(objPresStateDS.CreateGraphicObject(True) = DICOM_SUCCESS)then
begin
ShowMessage('A graphic annotation object was created successfully.');

// Change one of the attributes and update the object
objPresStateDS.GraphicObjectAttributes.Filled:= False;
objPresStateDS.SetGraphicObjectAttributes(0);
end;

// Let//s now create a text annotation object
with (objPresStateDS.TextObjectAttributes) do
begin
LayerName:= strLayerName;
BoundingBoxUsed:= True;
AnchorPointUsed:= False;
BoundingBoxUnits:= DICOM_UNIT_PIXEL;
TextValue:= 'Text annotation (using a bounding box)';
BoundingBoxTLHCornerX:= 176.7;
BoundingBoxTLHCornerY:= 117.7;
BoundingBoxBRHCornerX:= 320.3;
BoundingBoxBRHCornerY:= 136.1;
BoundingBoxTextJustification:= DICOM_TEXT_JUSTIFICATION_RIGHT;
end;

if(objPresStateDS.CreateTextObject(True) = DICOM_SUCCESS)then
begin
ShowMessage('A text annotation object was created successfully.');

// Change one of the attributes and update the object
objPresStateDS.TextObjectAttributes. BoundingBoxTextJustification:= DICOM_TEXT_JUSTIFICATION_LEFT;
objPresStateDS.SetTextObjectAttributes(0);
end;

// And another text annotation object
with (objPresStateDS.TextObjectAttributes) do
begin
LayerName:= strLayerName;
AnchorPointUsed:= True;
BoundingBoxUsed:= False;
AnchorPointUnits:= DICOM_UNIT_PIXEL;
TextValue:= 'Text annotation (using an anchor point)';
AnchorPointX:= 277.9;
AnchorPointY:= 382.7;
AnchorPointVisible:= True;
end;
if(objPresStateDS.CreateTextObject(True) = DICOM_SUCCESS)then
ShowMessage('Another text annotation object was created successfully.');
end;


DefaultIOD Example for Delphi

//Restore Default IOD table
Screen.Cursor:= crHourGlass;
LEADDicomDS1.DefaultIOD ();
Screen.Cursor:= crDefault;


DefaultTag Example for Delphi

//Restore default Tag values
Screen.Cursor:= crHourglass;
LEADDicomDS1.DefaultTag ();
Screen.Cursor:= crDefault;


DefaultUID Example for Delphi

Screen.Cursor:= crHourglass;
//Restore default Tag values
LEADDicomDS1.DefaultUID ();
Screen.Cursor:= crDefault;


DefaultVR Example for Delphi

Screen.Cursor:= crHourglass;
LEADDicomDS1.DefaultVR ();
Screen.Cursor:= crDefault;


DeleteBitmapValue Example for Delphi

Procedure TForm1.TestProcReplaceBitmap();
var
nRet: Integer;
Process: LEADRasterProcess;
begin
Process:= CreateComObject(CLASS_LEADRasterProcess) as LEADRasterProcess;
LEADDicomDS1.EnableMethodErrors:= False;
//move to the first image element
nRet:= LEADDicomDS1.FindFirstElement (TAG_PIXEL_DATA, False);
//get the first image
nRet:= LEADDicomDS1.GetBitmapValue (0, 0, ORDER_BGR, 0);
LEADRasterView1.Raster.Bitmap:= LEADDicomDS1.Bitmap;
//flip the image
Process.Flip(LEADRasterView1.Raster);

//delete the first image from the dataset
nRet:= LEADDicomDS1.DeleteBitmapValue(0, 1);

//now update the list with the flipped image
nRet:= LEADDicomDS1.InsertBitmapValue (LEADRasterView1.Raster.Bitmap, 0, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);
end;


DeleteElement Example for Delphi

var
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
LEADDicomDS1.FindFirstElement (TAG_STUDY_DATE, False);
nRet:= LEADDicomDS1.DeleteElement ();
LEADDicomDS1.EnableMethodErrors:= True;
if(nRet <> 0)then
ShowMessage('Error Deleting Element!');
end;


DeleteIOD Example for Delphi

LEADDicomDS1.EnableMethodErrors:= True;
LEADDicomDS1.MoveFirstIOD (False);
LEADDicomDS1.DeleteIOD ();


DeleteModule Example for Delphi

var
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
// move to the first module in the DataSet and delete it
LEADDicomDS1.FindIndexModule (0);
nRet:= LEADDicomDS1.DeleteModule(LEADDicomDS1.DefaultInterface.Get_CurrentModule().Module);
if(nRet <> 0)then
ShowMessage('Error Deleting Module!');

LEADDicomDS1.EnableMethodErrors:= True;
end;


DeleteTag Example for Delphi

var
nCode: Integer;
begin
nCode:= 131073;
//move to the selected Tag
LEADDicomDS1.FindTag (nCode);
//delete it
LEADDicomDS1.DeleteTag ();
end;


DeleteUID Example for Delphi

var
strCode: String;
begin
LEADDicomDS1.EnableMethodErrors:= True;
strCode:= '1.2.840.10008.1.2';
//move to the selected UID
LEADDicomDS1.FindUID (strCode);
//delete it
LEADDicomDS1.DeleteUID ();
end;


DeleteVR Example for Delphi

var
nCode: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= True;
nCode:= 18771;
//move to the selected VR
LEADDicomDS1.FindVR (nCode);
//delete it
LEADDicomDS1.DeleteVR ();
end;


DSTempPath Example for Delphi

LEADDicomDS1.DSTempPath:= 'd:\temp';


EnableMethodErrors (ILEADDicomNet) Example for Delphi

//disable method errors
LEADDICOMNet1.EnableMethodErrors:= False;


Examining Annotations (1) Example for Delphi

Procedure TForm1.ExamineAnnotations1(objPresStateDS: TLEADDicomDS);
var
strMsg: String;
nCount: Integer;
I: Integer;
J: Integer;
nGraphicObjectCount: Integer;
nTextObjectCount: Integer;
begin
// Get the attributes that describe the 'Presentation State Module'
if(objPresStateDS.GetPresStateAttributes (0) = DICOM_SUCCESS)then
begin
// Display some
with(objPresStateDS.PresStateAttributes) do
begin
strMsg:= 'Instance Number: ' + IntToStr(InstanceNumber) + Chr(13) +
'Presentation Label: ' + PresLabel + Chr(13) +
'Presentation Description: ' + PresDescription + Chr(13) +
'Presentation Creator//s Name: ' + PresCreatorName;
end;

Application.MessageBox(PChar(strMsg), 'Presentation State Attributes', MB_OK);
end;

// Display the SOP Instance UIDs of all the images referenced in the
// 'Presentation State Module'
if(objPresStateDS.FindFirstPresStateRefSeriesItem () = DICOM_SUCCESS)then
begin
strMsg:= '';
Repeat
nCount:= objPresStateDS.GetPresStateImageRefCount ();
for I:= 0 To nCount - 1 do
begin
strMsg:= strMsg +
objPresStateDS.GetPresStateImageRefInstanceUID (I) +
Chr(13);
end;

strMsg:= strMsg + Chr(13);
Until(objPresStateDS.MoveNextPresStateRefSeriesItem () <> DICOM_SUCCESS);

Application.MessageBox(PChar(strMsg), 'Referenced SOP Instance UID(s)', MB_OK);
end;

// Enumerate all the layers defined
nCount:= objPresStateDS.LayerCount;
ShowMessage('Layer Count: ' + IntToStr(nCount));
for I:= 0 to nCount - 1 do
begin
// Display some of the attributes
if(objPresStateDS.GetLayerAttributes (I) = DICOM_SUCCESS)then
begin
with(objPresStateDS.LayerAttributes) do
begin
strMsg:= 'Graphic Layer: ' + LayerName + Chr(13) +
'Graphic Layer Order: ' + IntToStr(LayerOrder) + Chr(13) +
'Graphic Layer Description: ' + LayerDescription;
end;

Application.MessageBox(PChar(strMsg), 'Graphic Layer Attributes', MB_OK);
end;
end;

// Enumerate all the Graphic Annotation Items
if(objPresStateDS.FindFirstGraphicAnnItem () = DICOM_SUCCESS)then
begin
Repeat
nGraphicObjectCount:= objPresStateDS.GetGraphicObjectCount ();
// Or:
//lGraphicObjectCount = objPresStateDS.GetLayerGraphicObjectCount ()

nTextObjectCount:= objPresStateDS.GetTextObjectCount ();
// Or:
//lTextObjectCount = objPresStateDS.GetLayerTextObjectCount ()

strMsg:= 'Graphic Layer: ' + objPresStateDS.GetLayerName() + Chr(13) +
'Graphic object count: ' + IntToStr(nGraphicObjectCount) + Chr(13) +
'Text object count: ' + IntToStr(nTextObjectCount) + Chr(13) + Chr(13);

nCount:= objPresStateDS.GetLayerImageRefCount();
if(nCount = 0)then
begin
strMsg:= strMsg +
'The annotations defined in this Item apply to all the ' +
'images listed in the ''Presentation State Module''.';
end
else
begin
strMsg:= strMsg + 'Referenced SOP Instance UID(s):' + Chr(13);
for I:= 0 to nCount - 1 do
begin
strMsg:= strMsg + ' ' +
objPresStateDS.GetLayerImageRefInstanceUID(I) + Chr(13);
end;
end;

Application.MessageBox(PChar(strMsg), 'Graphic Annotation Item', MB_OK);

// Enumerate all the graphic objects in the current Item
for I:= 0 to nGraphicObjectCount - 1 do
begin
objPresStateDS.GetGraphicObjectAttributes (I);
with (objPresStateDS.GraphicObjectAttributes) do
begin
strMsg:= 'Graphic Annotation Units: ';
Case (Units) of
DICOM_UNIT_PIXEL:
strMsg:= strMsg + 'PIXEL' + Chr(13);

DICOM_UNIT_DISPLAY:
strMsg:= strMsg + 'DISPLAY' + Chr(13);
end;

strMsg:= strMsg + 'Graphic Type: ';
Case (type_) of
DICOM_GRAPHIC_OBJECT_TYPE_POINT:
strMsg:= strMsg + 'POINT' + Chr(13);

DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE:
strMsg:= strMsg + 'POLYLINE' + Chr(13);

DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED:
strMsg:= strMsg + 'INTERPOLATED' + Chr(13);

DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE:
strMsg:= strMsg + 'CIRCLE' + Chr(13);

DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE:
strMsg:= strMsg + 'ELLIPSE' + Chr(13);
end;

if(Filled)then
strMsg:= strMsg + 'Graphic Filled: Y' + Chr(13)
else
strMsg:= strMsg + 'Graphic Filled: N' + Chr(13);

nCount:= PointCount;
strMsg:= strMsg + 'Number of Graphic Points: ' + IntToStr(nCount) + Chr(13);

if(nCount < 10)then
begin
strMsg:= strMsg + 'Graphic Data: ' + Chr(13);
for J:= 0 to nCount - 1 do
begin
strMsg:= strMsg + ' ' +
'X' + IntToStr(J) + IntToStr(1) + ', Y' + IntToStr(J) + IntToStr(1) + ' = ' +
FloatToStr(PointsX[J]) + ', ' + FloatToStr(PointsY[J]) + Chr(13);
end;
end;

Application.MessageBox(PChar(strMsg), 'Graphic Annotation Object', MB_OK);
end;
end;

// Enumerate all the text objects in the current Item
for I:= 0 to nTextObjectCount - 1 do
begin
objPresStateDS.GetTextObjectAttributes(I);
with (objPresStateDS.TextObjectAttributes) do
begin
if(BoundingBoxUsed)then
begin
strMsg:= 'Unformatted Text Value: ' + TextValue + Chr(13);

strMsg:= strMsg + 'Bounding Box Annotation Units: ';
Case (BoundingBoxUnits) of
DICOM_UNIT_PIXEL:
strMsg:= strMsg + 'PIXEL' + Chr(13);

DICOM_UNIT_DISPLAY:
strMsg:= strMsg + 'DISPLAY' + Chr(13);
end;

strMsg:= strMsg +
'Bounding Box Top Left Hand Corner: ' +
FloatToStr(BoundingBoxTLHCornerX) + ', ' +
FloatToStr(BoundingBoxTLHCornerY) + Chr(13);

strMsg:= strMsg +
'Bounding Box Bottom Right Hand Corner: ' +
FloatToStr(BoundingBoxBRHCornerX) + ', ' +
FloatToStr(BoundingBoxBRHCornerY) + Chr(13);

strMsg:= strMsg + 'Bounding Box Text Horizontal Justification: ';
Case (BoundingBoxTextJustification) of
DICOM_TEXT_JUSTIFICATION_LEFT:
strMsg:= strMsg + 'LEFT' + Chr(13);

DICOM_TEXT_JUSTIFICATION_RIGHT:
strMsg:= strMsg + 'RIGHT' + Chr(13);

DICOM_TEXT_JUSTIFICATION_CENTER:
strMsg:= strMsg + 'CENTER' + Chr(13);
end;
end
else
begin
strMsg:= 'Unformatted Text Value: ' + TextValue + Chr(13);

strMsg:= strMsg + 'Anchor Point Annotation Units: ';
Case (AnchorPointUnits) of
DICOM_UNIT_PIXEL:
strMsg:= strMsg + 'PIXEL' + Chr(13);

DICOM_UNIT_DISPLAY:
strMsg:= strMsg + 'DISPLAY' + Chr(13);
end;

strMsg:= strMsg + 'Anchor Point: ' +
FloatToStr(AnchorPointX) + ', ' +
FloatToStr(AnchorPointY) + Chr(13);

if(AnchorPointVisible)then
strMsg:= strMsg + 'Anchor Point Visibility: Y'
else
strMsg:= strMsg + 'Anchor Point Visibility: N';
end;

Application.MessageBox(PChar(strMsg), 'Text Annotation Object', MB_OK);
end;
end;
Until(objPresStateDS.MoveNextGraphicAnnItem() <> DICOM_SUCCESS);
end;
end;


Examining Annotations (2) Example for Delphi

Procedure TForm1.ExamineAnnotations2(objPresStateDS: TLEADDicomDS);
var
strMsg: String;
strRefSOPInstanceUID: String;
hGraphicAnnotationItem: LongInt;
strGraphicLayer: String;
begin
// Pick one of the images referenced in the 'Presentation State Module' and
// get its SOP Instance UID
if(objPresStateDS.FindFirstPresStateRefSeriesItem () = DICOM_SUCCESS)then
begin
if(objPresStateDS.GetPresStateImageRefCount () > 0)then
strRefSOPInstanceUID:= objPresStateDS.GetPresStateImageRefInstanceUID (0);
end;

// Find the SOP Class UID of that image
if(objPresStateDS.FindPresStateRefImageItem(strRefSOPInstanceUID) = DICOM_SUCCESS)then
begin
if(objPresStateDS.MoveChildElement () = 0)then
begin
if(objPresStateDS.FindFirstElement (TAG_REFERENCED_SOP_CLASS_UID, True) = 0)then
begin
if(objPresStateDS.GetStringValue (0, 1) = 0)then
begin
strMsg:= objPresStateDS.StringValues [0];
Application.MessageBox(PChar(strMsg), 'Referenced SOP Class UID', MB_OK);
end;
end;
end;
end;

// Remove the reference to that image from the 'Presentation State Module'
objPresStateDS.RemovePresStateImageRef(strRefSOPInstanceUID);

// Pick a Graphic Annotation Item
if(objPresStateDS.FindFirstGraphicAnnItem () = DICOM_SUCCESS)then
begin
hGraphicAnnotationItem:= objPresStateDS.DefaultInterface.Get_CurrentElement ().hElement;

// Pick an image reference
if(objPresStateDS.GetLayerImageRefCount() > 0)then
begin
strRefSOPInstanceUID:= objPresStateDS.GetLayerImageRefInstanceUID(0);
objPresStateDS.FindLayerRefImageItem(strRefSOPInstanceUID);

// Display one of the attributes of the Referenced Image Item
if(objPresStateDS.MoveChildElement () = 0)then
begin
if(objPresStateDS.FindFirstElement (TAG_REFERENCED_SOP_CLASS_UID, True) = 0)then
if(objPresStateDS.GetStringValue (0, 1) = 0)then
begin
strMsg:= 'Referenced SOP Class UID: ' + objPresStateDS.StringValues [0];
Application.MessageBox(PChar(strMsg),
'Referenced Image Item',
MB_OK);
end;
end;

objPresStateDS.SetCurrentElement (hGraphicAnnotationItem);

// Remove the image reference
objPresStateDS.RemoveLayerImageRef(strRefSOPInstanceUID);

// Remove all references to images that are listed in this Graphic Annotation
// Item(this way, the annotations defined by this Item will be applied to all
// the images listed in the 'Presentation State Module')
objPresStateDS.RemoveAllLayerImageRefs
end;

strGraphicLayer:= objPresStateDS.GetLayerName();

// Display some of the layer//s attributes
objPresStateDS.GetLayerAttributes (objPresStateDS.GetLayerIndex(strGraphicLayer));
with (objPresStateDS.LayerAttributes) do
begin
strMsg:= 'Graphic Layer: ' + LayerName + Chr(13) +
'Graphic Layer Order: ' + IntToStr(LayerOrder) + Chr(13) +
'Graphic Layer Description: ' + LayerDescription;
Application.MessageBox(PChar(strMsg),
'Graphic Layer Attributes',
MB_OK);
end;

// Change the layer of this Graphic Annotation Item(the specified new
// layer should already be defined in the 'Graphic Layer Module')
objPresStateDS.SetLayerName('ANOTHER_LAYER');

// Pick a graphic annotation object
if(objPresStateDS.GetGraphicObjectCount () > 0)then
begin
objPresStateDS.FindGraphicObjectItem (0);

// Display one of the attributes of this object
if(objPresStateDS.MoveChildElement () = 0)then
begin
// Graphic Type(0070,0023)
if(objPresStateDS.FindFirstElement ($700023, True) = 0)then
begin
if(objPresStateDS.GetStringValue (0, 1) = 0)then
begin
strMsg:= 'Graphic Type: ' + objPresStateDS.StringValues [0];
Application.MessageBox(PChar(strmsg),
'Graphic Annotation Object',
MB_OK);
end;
end;
end;

objPresStateDS.SetCurrentElement (hGraphicAnnotationItem);

// Remove the object
objPresStateDS.RemoveGraphicObject(0);

// Remove all the graphic annotation objects defined by this Graphic
// Annotation Item
objPresStateDS.RemoveAllGraphicObjects();
// Or:
//objPresStateDS.RemoveLayerGraphicObjects
end;

// Pick a text annotation object
if(objPresStateDS.GetTextObjectCount () > 0)then
begin
objPresStateDS.FindTextObjectItem (0);

// Display one of the attributes of this object
if(objPresStateDS.MoveChildElement () = 0)then
begin
// Unformatted Text Value(0070,0006)
if(objPresStateDS.FindFirstElement ($700006, True) = 0)then
begin
if(objPresStateDS.GetStringValue (0, 1) = 0)then
begin
strMsg:= 'Unformatted Text Value: ' +
objPresStateDS.StringValues [0];
Application.MessageBox(PChar(strMsg),
'Text Annotation Object',
MB_OK);
end;
end;
end;

objPresStateDS.SetCurrentElement (hGraphicAnnotationItem);

// Remove the object
objPresStateDS.RemoveTextObject(0);

// Remove all the text annotation objects defined by this Graphic
// Annotation Item
objPresStateDS.RemoveAllTextObjects
// Or:
//objPresStateDS.RemoveLayerTextObjects
end;
end;

// Remove all references to images that are listed in all the Graphic Annotation
// Items(this way, the annotations defined by all the Items will be applied to all
// the images listed in the 'Presentation State Module')
objPresStateDS.RemoveAllLayersImageRefs();

// Remove all references to images from the 'Presentation State Module'
objPresStateDS.RemoveAllPresStateImageRefs ();

// Pick one of the layers
if(objPresStateDS.LayerCount > 0)then
begin
objPresStateDS.FindLayerItem(0);

// Display one of the attributes of this layer
if(objPresStateDS.MoveChildElement () = 0)then
begin
// Graphic Layer(0070,0002)
if(objPresStateDS.FindFirstElement ($700002, True) = 0)then
begin
if(objPresStateDS.GetStringValue (0, 1) = 0)then
begin
strMsg:= 'Graphic Layer: ' + objPresStateDS.StringValues [0];
Application.MessageBox(PChar(strMsg),
'Graphic Layer',
MB_OK);
end;
end;
end;

// Remove the layer
objPresStateDS.RemoveLayer(0, True);

// Remove all the layers defined in the 'Graphic Layer Module'
objPresStateDS.RemoveAllLayers(True);
end;
end;


FindFirstElement Example for Delphi

var
nRet: Integer;
begin
//Find the first image element and display it
LEADDicomDS1.EnableMethodErrors:= True;

//move to first element in Data Set
LEADDicomDS1.MoveFirstElement (False);

nRet:= LEADDicomDS1.FindFirstElement (TAG_PIXEL_DATA, False);
//find each image
while (nRet = 0) do
begin
LEADDicomDS1.GetBitmapValue (0, 0, ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap:= LEADDicomDS1.Bitmap;
LEADDicomDS1.Bitmap:= 0;
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement ().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);
nRet:= LEADDicomDS1.FindNextElement(False);
end;
ShowMessage('No More Images');
end;


FindIndexModule Example for Delphi

var
nCount: LongInt;
strOut: String;
x: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
nCount:= LEADDicomDS1.GetModuleCount ();
LEADDicomDS1.GetInfoDS ();
strOut:= 'Found ' + IntToStr(nCount) + ' Modules' + Chr(10) + Chr(13);
for x:= 0 to nCount - 1 do
begin
LEADDicomDS1.FindIndexModule (x);
LEADDicomDS1.FindModuleIOD (LEADDicomDS1.InfoClass, LEADDicomDS1.DefaultInterface.Get_CurrentModule().Module);
strOut:= strOut + 'Module ' + LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name + Chr(10) + Chr(13);
end;
ShowMessage(strOut);
LEADDicomDS1.EnableMethodErrors:= True;
end;


FindLastElement Example for Delphi

var
nRet: Integer;
begin
//Find the last image element and display it
LEADDicomDS1.EnableMethodErrors:= True;

//move to last element in Data Set
LEADDicomDS1.MoveLastElement(False);

nRet:= LEADDicomDS1.FindLastElement (TAG_PIXEL_DATA, False);

//find each image
while (nRet = 0) do
begin
LEADDicomDS1.GetBitmapValue (0, 0, ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap:= LEADDicomDS1.Bitmap;
LEADDicomDS1.Bitmap:= 0;
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement ().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);
nRet:= LEADDicomDS1.FindPrevElement(False);
end;
ShowMessage('No More Images');
end;


FindModule Example for Delphi

var
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
nRet:= LEADDicomDS1.FindModule(DICOM_MODULE_NM_TOMO_ACQUISITION);
if(nRet <> 0)then
ShowMessage('Not Found')
else
begin
LEADDicomDS1.GetInfoDS ();
LEADDicomDS1.FindModuleIOD (LEADDicomDS1.InfoClass, DICOM_MODULE_NM_TOMO_ACQUISITION);
ShowMessage('Found Module ' + LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);
end;
LEADDicomDS1.EnableMethodErrors:= True;
end;


FindModuleIOD Example for Delphi

var
strPrompt: String;
begin
LEADDicomDS1.EnableMethodErrors:= True;
//Find a Module
LEADDicomDS1.FindModuleIOD (DICOM_CLASS_CR_IMAGE_STORAGE,
DICOM_MODULE_BIPLANE_IMAGE);
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);

LEADDicomDS1.SetIODName ('New IOD Name #1');
LEADDicomDS1.SetIODDescription ('New IOD Description #1');
strPrompt:= 'Name: ' + LEADDicomDS1.DefaultInterface.Get_CurrentIOD.Name + Chr(13);
strPrompt:= strPrompt + 'Desc: ' + LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Description;
ShowMessage(strPrompt);

//Find a Class
LEADDicomDS1.FindClassIOD (DICOM_CLASS_PRINT_QUEUE);
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);

LEADDicomDS1.SetIODName ('New IOD Name #2');
LEADDicomDS1.SetIODDescription ('New IOD Description #2');
strPrompt:= 'Name: ' + LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name + Chr(13);
strPrompt:= strPrompt + 'Desc: ' + LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Description;
ShowMessage(strPrompt);
end;


FindPresentationAbstract Example for Delphi

var
nID: Integer;
hPDU: LongInt;
begin
//get the associate object for this client computer//s connection
hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

//find the id for UID_VERIFICATION_CLASS within this association
//if it is supported by the association
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, UID_VERIFICATION_CLASS);
if(nID = 0)then
ShowMessage('Not Supported by this association!')
else
ShowMessage('Found: ' + IntToStr(nID));
end;


GetAgeValue Example for Delphi

var
nRet: Integer;
nCount: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;

//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Age Value
LEADDicomDS1.InsertElement (False, TAG_PATIENT_AGE, VR_AS, False, 0);

//insert an Age value into the element
LEADDicomDS1.AgeValueCount:= 1;
LEADDicomDS1.AgeValues [0].Number:= 21;
LEADDicomDS1.AgeValues [0].Reference:= SmallInt('Y');

//set the age
nRet:= LEADDicomDS1.SetAgeValue(1);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;

LEADDicomDS1.AgeValueCount:= 0; //free the value

//get the value count
nCount:= LEADDicomDS1.GetValueCount;
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the value
nRet:= LEADDicomDS1.GetAgeValue (0, nCount);
//display the value
Edit1.Text:= 'Number: ' + IntToStr(LEADDicomDS1.AgeValues [0].Number) + 'Ref: ' + Chr(LEADDicomDS1.AgeValues [0].Reference);
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('wait');
end;


GetApplication Example for Delphi

var
hPDU: LongInt;
begin
hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);
//display current Application Context
ShowMessage(LEADDICOMNet1.GetApplication (hPDU));
//change it
LEADDICOMNet1.SetApplication(hPDU, '9.9.999.99999.9.9.9.9');
ShowMessage(LEADDICOMNet1.GetApplication (hPDU));
end;


GetAuthenticationAlgorithmTLS Example for Delphi

if(LEADDICOMNet1.GetAuthenticationAlgorithmTLS (LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = DICOM_MUTUALAUTH_RSA)then
ShowMessage('Mutual authentication in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MUTUALAUTH_RSA');


GetBinaryValue Example for Delphi

Procedure TForm1.TestProc1();
var
nCount: Integer;
x: Integer;
nRet: Integer;
nLen: Integer;
strBytes: String;
strByte: Byte;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();
Edit1.Visible:= True;
Edit1.Text:= '';

//insert some bytes into the element
strBytes:= 'This is a Test 1234!';
nLen:= Length(strBytes);
LEADDicomDS1.BinaryValueCount:= nLen;
for x:= 0 to nLen - 1 do
begin
strByte:= Byte(strBytes[x + 1]);
LEADDicomDS1.BinaryValues[x]:= strByte;
end;
//set the bytes
nRet:= LEADDicomDS1.SetBinaryValue (nLen);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
LEADDicomDS1.BinaryValueCount:= 0; //free the values

//get the byte count
nCount:= LEADDicomDS1.DefaultInterface.Get_CurrentElement ().Length;
ShowMessage('There are ' + IntToStr(nCount) + ' bytes!');

//get the bytes
nRet:= LEADDicomDS1.GetBinaryValue(nCount);
if(nRet = 0)then
begin
for x:= 0 to LEADDicomDS1.BinaryValueCount - 1 do
begin
//display each byte as a char separated by a space
Edit1.Text:= Edit1.Text + ' ' + Chr(LEADDicomDS1.BinaryValues[x]);
end;
end;
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('wait');
end;


GetBitmapCount Example for Delphi

Procedure TForm1.TestFunc();
var
nCount: Integer;
begin
nCount:= LEADDicomDS1.GetBitmapCount ();
if(nCount = 1)then
begin
//get the bitmap
LEADDicomDS1.GetBitmapValue (0, 0, ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap:= LEADDicomDS1.Bitmap;
LEADDicomDS1.Bitmap:= 0; //free the image
end
else
begin
if(nCount > 1)then
begin
//get the bitmap list
LEADDicomDS1.GetBitmapListValue(0, nCount, 0, ORDER_RGB, 0);
LEADRasterView1.Raster.BitmapList:= LEADDicomDS1.BitmapList;
ShowMessage('There are ' + IntToStr(LEADDicomDS1.BitmapListCount) + ' Images');
LEADDicomDS1.BitmapList:= 0; //free the image
//play the animation
LEADRasterView1.AnimationLoop:= True;
LEADRasterView1.AnimationEnable:= True;
end
else
ShowMessage('No Image!');
end;
ShowMessage('wait');
end;


GetCharValue Example for Delphi

Procedure TForm1.TestProc2();
var
nCount: Integer;
x: Integer;
nRet: Integer;
nLen: Integer;
strChars: String;
strChar: Byte;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Char Values
LEADDicomDS1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0);

Edit1.Visible:= True;
EDit1.Text:= '';

//insert some char values into the element
strChars:= 'This is a Test 1234!';
nLen:= Length(strChars);
LEADDicomDS1.CharValueCount:= nLen;
for x:= 0 to nLen - 1 do
begin
strChar:= Byte(strChars[x + 1]);
LEADDicomDS1.CharValues[x]:= Integer(strChar);
end;
//set the chars
nRet:= LEADDicomDS1.SetCharValue(nLen);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
LEADDicomDS1.CharValueCount:= 0; //free the values

//get the value count
nCount:= LEADDicomDS1.GetValueCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the values
nRet:= LEADDicomDS1.GetCharValue(0, nCount);
if(nRet = 0)then
begin
for x:= 0 to LEADDicomDS1.CharValueCount - 1 do
begin
//display each value separated by a //.//
EDit1.Text:= Edit1.Text + '.' + Chr(LEADDicomDS1.CharValues[x])
end;
end;
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('wait');
end;


GetConvertValue Example for Delphi

Procedure TForm1.TestProc();
var
x: Integer;
nRet: Integer;
nCount: Integer;
begin
//add some values to the element
//note, this will only work for elements that have a VR that supports multiple values
LEADDicomDS1.EnableMethodErrors:= False;
LEADDicomDS1.StringValueCount:= 3;
LEADDicomDS1.StringValues [0]:= FloatToStr(3.45);
LEADDicomDS1.StringValues[1]:= FloatToStr(9.99);
LEADDicomDS1.StringValues[2]:= FloatToStr(1.11);

nRet:= LEADDicomDS1.SetConvertValue;
//free the current values
LEADDicomDS1.StringValueCount:= 0;

//now get the values and display them
nRet:= LEADDicomDS1.GetConvertValue ();
if(nRet = 0)then
begin
nCount:= LEADDicomDS1.StringValueCount;
Edit5.Text:= '';
for x:= 0 To nCount - 1 do
begin
//display each value on a separate line
Edit5.Text:= Edit5.Text + LEADDicomDS1.StringValues [x] + Chr(13) + Chr(10)
end;
end;
LEADDicomDS1.EnableMethodErrors:= True;
end;


GetDateTimeValue Example for Delphi

Currently no DICOM Tags support the VR that this value requires.


GetDateValue Example for Delphi

Procedure TForm1.TestProc();
var
nCount: Integer;
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;

//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Date Value
LEADDicomDS1.InsertElement (False, TAG_PATIENT_BIRTH_DATE, VR_DA, False, 0);

//insert an Date value into the element
LEADDicomDS1.DateValueCount:= 1;
LEADDicomDS1.DateValues [0].Year:= 1971;
LEADDicomDS1.DateValues [0].Month:= 12;
LEADDicomDS1.DateValues [0].Day:= 12;

//set the date
nRet:= LEADDicomDS1.SetDateValue (1);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;

LEADDicomDS1.DateValueCount:= 0; //free the value

Edit1.Visible:= True;
Edit1.Text:= '';

//get the value count
nCount:= LEADDicomDS1.GetValueCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the value
nRet:= LEADDicomDS1.GetDateValue (0, nCount);
//display the value
Edit1.Text:= 'Year: ' + IntToStr(LEADDicomDS1.DateValues [0].Year) + ' Month: ' + IntToStr(LEADDicomDS1.DateValues [0].Month) + ' Day: ' + IntToStr(LEADDicomDS1.DateValues [0].Day);
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('wait');
end;


GetDoubleValue Example for Delphi

Procedure TForm1.TestProc6();
var
nCount: Integer;
x: Integer;
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Double Values
LEADDicomDS1.InsertElement (False, TAG_REFERENCE_PIXEL_PHYSICAL_VALUE_X, VR_FD, False, 0);
Edit1.Visible:= True;
Edit1.Text:= '';

//insert some Double values into the element
LEADDicomDS1.DoubleValueCount:= 5;
for x:= 0 to 5 - 1 do
LEADDicomDS1.DoubleValues[x]:= 10 * x * 199.77;

//set the floats
nRet:= LEADDicomDS1.SetDoubleValue(5);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
LEADDicomDS1.DoubleValueCount:= 0; //free the values

Edit1.Visible:= True;
Edit1.Text:= '';
//get the value count
nCount:= LEADDicomDS1.GetValueCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the values
nRet:= LEADDicomDS1.GetDoubleValue(0, nCount);
if(nRet = 0)then
begin
for x:= 0 To LEADDicomDS1.DoubleValueCount - 1 do
//display each value separated by a ' X '
Edit1.Text:= Edit1.Text + ' X ' + FloatToStr(LEADDicomDS1.DoubleValues[x]);
end;
LEADDicomDS1.EnableMethodErrors:= True;
end;


GetElementLevel Example for Delphi

Procedure TForm1.TestProc();
var
x: Integer;
nLevel: Integer;
begin
//Navigate the Data Set as a List, not as a Tree
//Move to the 20th element, and then find that element//s level in the Tree
LEADDicomDS1.EnableMethodErrors:= True;

//move to first element in Data Set
LEADDicomDS1.MoveFirstElement (False);

//move to the 20th element
for x:= 2 To 20 do
LEADDicomDS1.MoveNextElement(False);

LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement ().Tag);
nLevel:= LEADDicomDS1.GetElementLevel;
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name + ' at level ' + IntToStr(nLevel));
end;


GetEncryptionAlgorithmTLS Example for Delphi

if(LEADDICOMNet1.GetEncryptionAlgorithmTLS(LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = DICOM_CRYPT_3DES)then
ShowMessage('Encryption in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_CRYPT_3DES');


GetEncryptKeyLengthTLS Example for Delphi

ShowMessage('Effective key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is ' + IntToStr(LEADDICOMNet1.GetEncryptKeyLengthTLS(LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)));


GetExtendedData Example for Delphi

var
x: Integer;
n: Integer;
strOut: String;
ExtData: OleVariant;
Data: OleVariant;
begin
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate (True);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);

//add some extended data for the first presentation context
ExtData:= VarArrayCreate([0,4], varByte);
ExtData[0]:= 0;
ExtData[1]:= 1;
ExtData[2]:= 1;
ExtData[3]:= 0;
ExtData[4]:= 1;
//ExtData:= ttt;
LEADDICOMNet1.SetExtendedData(LEADDICOMNet1.hPDU, 1, ExtData, 5);

//now, display the information
n:= LEADDICOMNet1.GetExtendedDataLength (LEADDICOMNet1.hPDU, 1);
strOut:= 'Extended Data' + Chr(13);
Data:= LEADDICOMNet1.GetExtendedData(LEADDICOMNet1.hPDU, 1);
for x:= 0 to n - 1 do
begin
strOut:= strOut + IntToStr(x) + ' = ';
strOut:= strOut + IntToStr(Data[x]) + Chr(13);
end;
ShowMessage(strOut);
end;


GetFloatValue Example for Delphi

Procedure TForm1.TestProc5();
var
nCount: Integer;
x: Integer;
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Float Values
LEADDicomDS1.InsertElement (False, TAG_TABLE_OF_PARAMETER_VALUES, VR_FL, False, 0);
Edit1.Visible:= True;
Edit1.Text:= '';

//insert some float values into the element
LEADDicomDS1.FloatValueCount:= 5;
for x:= 0 to 5 - 1 do
LEADDicomDS1.FloatValues[x]:= x * 1.99;

//set the floats
nRet:= LEADDicomDS1.SetFloatValue (5);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
LEADDicomDS1.FloatValueCount:= 0; //free the values

Edit1.Visible:= True;
Edit1.Text:= '';

//get the value count
nCount:= LEADDicomDS1.GetValueCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the values
nRet:= LEADDicomDS1.GetFloatValue (0, nCount);
if(nRet = 0)then
begin
For x:= 0 To LEADDicomDS1.FloatValueCount- 1 do
begin
//display each value separated by a ' X '
Edit1.Text:= Edit1.Text + ' X ' + FloatToStr(LEADDicomDS1.FloatValues [x]);
end;
end;
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('wait');
end;


GetImageInformation Example for Delphi

var
strMsg: String;
begin
LEADDicomDS1.GetImageInformation(0);
strMsg:= 'Compression: ' + IntToStr(LEADDicomDS1.ImageInfo.Compression) + Chr(13) + Chr(10);
strMsg:= strMsg + 'Photometric: ' + IntToStr(LEADDicomDS1.ImageInfo.Photometric) + ' - ' + LEADDicomDS1.ImageInfo.PhotometricString + Chr(13) + Chr(10);
strMsg:= strMsg + 'Rows x Columns: ' + IntToStr(LEADDicomDS1.ImageInfo.Rows) + ' x ' + IntToStr(LEADDicomDS1.ImageInfo.Columns) + Chr(13) + Chr(10);
strMsg:= strMsg + 'Bits Allocated: ' + IntToStr(LEADDicomDS1.ImageInfo.BitsAllocated) + Chr(13) + Chr(10);
strMsg:= strMsg + 'Bits Stored: ' + IntToStr(LEADDicomDS1.ImageInfo.BitsStored) + Chr(13) + Chr(10);
strMsg:= strMsg + 'High Bit: ' + IntToStr(LEADDicomDS1.ImageInfo.HighBit) + Chr(13) + Chr(10);
strMsg:= strMsg + 'Pixel Representation: ' + IntToStr(LEADDicomDS1.ImageInfo.PixelRepresentation) + Chr(13) + Chr(10);
strMsg:= strMsg + 'Planar Configuration: ' + IntToStr(LEADDicomDS1.ImageInfo.PlanarConfiguration) + Chr(13) + Chr(10);
strMsg:= strMsg + 'ResolutionX: ' + IntToStr(LEADDicomDS1.ImageInfo.ResolutionX) + Chr(13) + Chr(10);
strMsg:= strMsg + 'ResolutionY: ' + IntToStr(LEADDicomDS1.ImageInfo.ResolutionY) + Chr(13) + Chr(10);
strMsg:= strMsg + 'SmallestImagePixelValue: ' + IntToStr(LEADDicomDS1.ImageInfo.SmallestImagePixelValue) + Chr(13) + Chr(10);
strMsg:= strMsg + 'SmallestImagePixelValueFlag: ' + BoolToStr(LEADDicomDS1.ImageInfo.SmallestImagePixelValueFlag) + Chr(13) + Chr(10);
strMsg:= strMsg + 'LargestImagePixelValue: ' + IntToStr(LEADDicomDS1.ImageInfo.LargestImagePixelValue) + Chr(13) + Chr(10);
strMsg:= strMsg + 'LargestImagePixelValueFlag: ' + BoolToStr(LEADDicomDS1.ImageInfo.LargestImagePixelValueFlag) + Chr(13) + Chr(10);
strMsg:= strMsg + 'RedEntries: ' + IntToStr(LEADDicomDS1.ImageInfo.RedEntries) + Chr(13) + Chr(10);
strMsg:= strMsg + 'RedFirst: ' + IntToStr(LEADDicomDS1.ImageInfo.RedFirst) + Chr(13) + Chr(10);
strMsg:= strMsg + 'RedBits: ' + IntToStr(LEADDicomDS1.ImageInfo.RedBits) + Chr(13) + Chr(10);
strMsg:= strMsg + 'GreenEntries: ' + IntToStr(LEADDicomDS1.ImageInfo.GreenEntries) + Chr(13) + Chr(10);
strMsg:= strMsg + 'GreenFirst: ' + IntToStr(LEADDicomDS1.ImageInfo.GreenFirst) + Chr(13) + Chr(10);
strMsg:= strMsg + 'GreenBits: ' + IntToStr(LEADDicomDS1.ImageInfo.GreenBits) + Chr(13) + Chr(10);
strMsg:= strMsg + 'BlueEntries: ' + IntToStr(LEADDicomDS1.ImageInfo.BlueEntries) + Chr(13) + Chr(10);
strMsg:= strMsg + 'BlueFirst: ' + IntToStr(LEADDicomDS1.ImageInfo.BlueFirst) + Chr(13) + Chr(10);
strMsg:= strMsg + 'BlueBits: ' + IntToStr(LEADDicomDS1.ImageInfo.BlueBits) + Chr(13) + Chr(10);
strMsg:= strMsg + 'PaletteEntries: ' + IntToStr(LEADDicomDS1.ImageInfo.PaletteEntries) + Chr(13) + Chr(10);
strMsg:= strMsg + 'PaletteFirst: ' + IntToStr(LEADDicomDS1.ImageInfo.PaletteFirst) + Chr(13) + Chr(10);
strMsg:= strMsg + 'BitsPerPixel: ' + IntToStr(LEADDicomDS1.ImageInfo.BitsPerPixel) + Chr(13) + Chr(10);
strMsg:= strMsg + 'Gray: ' + BoolToStr(LEADDicomDS1.ImageInfo.Gray) + Chr(13) + Chr(10);
strMsg:= strMsg + 'Frames: ' + IntToStr(LEADDicomDS1.ImageInfo.Frames) + Chr(13) + Chr(10);

ShowMessage(strMsg);
end;


GetInfoDS Example for Delphi

var
strClass: String;
strFlags: String;
begin
LEADDicomDS1.EnableMethodErrors:= True;
LEADDicomDS1.GetInfoDS ();
LEADDicomDS1.FindClassIOD (LEADDicomDS1.InfoClass);
strClass:= LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name;
strFlags:= IntToStr(LEADDicomDS1.InfoFlags);
ShowMessage( 'Class: ' + strClass + Chr(10) + Chr(13) + 'Flags: ' + strFlags);
end;


GetIntegrityAlgorithmTLS Example for Delphi

if(LEADDICOMNet1.GetIntegrityAlgorithmTLS(LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = DICOM_MAC_SHA1)then
ShowMessage('Message authentication code in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1');


GetKeyExchangeAlgorithmTLS Example for Delphi

if(LEADDICOMNet1.GetKeyExchangeAlgorithmTLS(LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = DICOM_MAC_SHA1)then
ShowMessage('Key exchange in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1');


GetLongValue Example for Delphi

Procedure TForm1.TestProc4();
var
nCount: Integer;
x: Integer;
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Long Values
LEADDicomDS1.InsertElement (False, TAG_OFFSET_FIRST_ROOT_DIRECTORY, VR_UL, False, 0);
Edit1.Visible:= True;
Edit1.Text:= '';

//insert some long values into the element
LEADDicomDS1.LongValueCount:= 5;
for x:= 0 to 5 - 1 do
LEADDicomDS1.LongValues [x]:= x * 100000;

//set the longs
nRet:= LEADDicomDS1.SetLongValue (5);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
LEADDicomDS1.LongValueCount:= 0; //free the values

//get the value count
nCount:= LEADDicomDS1.GetValueCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the values
nRet:= LEADDicomDS1.GetLongValue (0, nCount);
if(nRet = 0)then
begin
for x:= 0 to LEADDicomDS1.LongValueCount - 1 do
begin
//display each value separated by a ' X '
Edit1.Text:= Edit1.Text + ' X ' + IntToStr(LEADDicomDS1.LongValues [x]);
end;
end;
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('wait');
end;


GetModuleCount Example for Delphi

var
nCount: Integer;
begin
nCount:= LEADDicomDS1.GetModuleCount ();
ShowMessage('Module Count: ' + IntToStr(nCount));
end;


GetMutualAuthKeyLengthTLS Example for Delphi

ShowMessage('Mutual authentication key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is ' + IntToStr(LEADDicomNet1.GetMutualAuthKeyLengthTLS (LEADDICOMNet1.hNet, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)));


GetPeerAuthDataISCL Example for Delphi

var
buf: OleVariant;
nLen: Integer;
begin
LEADDICOMNet1.GetPeerAuthDataISCL (LEADDICOMNet1.hNet, buf, nLen);
ShowMessage('1st byte of data = ' + buf[0] + ', last byte of data = ' + buf[nLen - 1]);
end;


GetPeerEncryptionISCL Example for Delphi

var
strEncr: String;
begin
strEncr:= 'Unknown';
if(LEADDICOMNet1.GetPeerEncryptionISCL (LEADDICOMNet1.hNet) = DICOM_ISCL_ENCRYPT_NONE)then
strEncr:= 'None'
else
begin
if(LEADDICOMNet1.GetPeerEncryptionISCL (LEADDICOMNet1.hNet) = DICOM_ISCL_ENCRYPT_DESCBC)then
strEncr:= 'DES algorithm, cipher block chaining mode'
end;
ShowMessage('Sender tried to send a message with encryption algorithm: ' + strEncr);
end;


GetPeerMACISCL Example for Delphi

var
strMAC: String;
begin
strMAC:= 'SHA algorithm';
if(LEADDICOMNet1.GetPeerMACISCL (LEADDICOMNet1.hNet) = DICOM_ISCL_MAC_NONE)then
strMAC:= 'no message authentication code'
else
begin
if(LEADDICOMNet1.GetPeerMACISCL (LEADDICOMNet1.hNet) = DICOM_ISCL_MAC_MD5)then
strMAC:= 'MD5 algorithm';
end;

ShowMessage('Sender tried to send a message with MAC ' + strMAC);
end;


GetPeerRequestedMessageLengthISCL Example for Delphi

ShowMessage('Sender tried to send message with length' + IntToStr(LEADDICOMNet1.GetPeerRequestedMessageLengthISCL (LEADDICOMNet1.hNet)));


GetPresentationAbstract Example for Delphi

var
x: Integer;
strout: String;
strResult: String;
nID: Integer;
begin
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate (True);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);

//get abstracts for each Presentation Context
strOut:= '';
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
strResult:= LEADDICOMNet1.GetPresentationAbstract (LEADDICOMNet1.hPDU, nID);
strOut:= strOut + strResult;
strOut:= strOut + Chr(13);
end;
ShowMessage(strOut);

//change the abstracts
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
LEADDICOMNet1.SetPresentationAbstract (LEADDICOMNet1.hPDU, nID, UID_CR_IMAGE_STORAGE);
end;

//redisplay
strOut:= '';
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
strOut:= strOut + LEADDICOMNet1.GetPresentationAbstract (LEADDICOMNet1.hPDU, nID);
strOut:= strOut + Chr(13);
end;
ShowMessage(strOut);

LEADDICOMNet1.FreeAssociate (LEADDICOMNet1.hPDU);
end;


GetPresentationCount Example for Delphi

var
x: Integer;
id: Integer;
maxID: Integer;
strOut: String;
begin
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate (True);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);

//get current id//s and display them
strOut:= '';
maxID:= 0;
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
id:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
strOut:= strOut + IntToStr(id);
strOut:= strOut + Chr(13);
//store the highest id
if(id > maxID)then
maxID:= id;
end;
ShowMessage(strOut);

id:= maxID + 2; //id must be unique and odd number
//change the some ids and then display them all
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
LEADDICOMNet1.SetPresentationID (LEADDICOMNet1.hPDU, x, id);
id:= id + 2 //id must be odd number
end;
strOut:= '';
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
strOut:= strOut + IntToStr(LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x));
strOut:= strOut + Chr(13);
end;
ShowMessage(strOut);

//add a presentation context
strOut:= '';
LEADDICOMNet1.AddPresentation(LEADDICOMNet1.hPDU, 1, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
strOut:= strOut + IntToStr(LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x));
strOut:= strOut + Chr(13);
end;
ShowMessage(strOut);

//delete the one we added
strOut:= '';
LEADDICOMNet1.DeletePresentation(LEADDICOMNet1.hPDU, 1);
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
strOut:= strOut + IntToStr(LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x));
strOut:= strOut + Chr(13);
end;
ShowMessage(strOut);

LEADDICOMNet1.FreeAssociate (LEADDICOMNet1.hPDU);
end;


GetPresentationResult Example for Delphi

var
x: Integer;
nID: Integer;
nRes: Integer;
strOut: String;
begin
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate (True);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);

//get current results for each Presentation Context
strOut:= '';
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
nRes:= LEADDICOMNet1.GetPresentationResult (LEADDICOMNet1.hPDU, nID);
strOut:= strOut + IntToStr(nRes);
strOut:= strOut + Chr(13);
end;
ShowMessage(strOut);

//change all results to 1
for x:= 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
LEADDICOMNet1.SetPresentationResult (LEADDICOMNet1.hPDU, nID, 1);
end;

//redisplay
strOut:= '';
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
strOut:= strOut + IntToStr(LEADDICOMNet1.GetPresentationResult (LEADDICOMNet1.hPDU, nID));
strOut:= strOut + Chr(13);
end;
ShowMessage(strOut);

LEADDICOMNet1.FreeAssociate (LEADDICOMNet1.hPDU);
end;


GetSendQueueSize Example for Delphi

//display queue size
Application.MessageBox(PChar(IntToStr(LEADDICOMNet1.GetSendQueueSize (LEADDICOMNet1.hNet))), 'SendQueueSize', MB_OK);


GetServer Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveAssociateRequest (ASender: TObject;
hNet, hPDU: Integer);
var
hServer: LongInt;
strServer: String;
nPort: Integer;
begin
hServer:= LEADDICOMNet1.DefaultInterface.GetServer (hNet);
if(hServer <> 0)then
begin
strServer:= LEADDICOMNet1.GetHostAddress (hServer);
nPort:= LEADDICOMNet1.GetHostPort (hServer);
ShowMessage('Server = ' + strServer + ' Port = ' + IntToStr(nPort));
end;
end;


GetShortValue Example for Delphi

Procedure TForm1.TestProc3();
var
nCount: Integer;
x: Integer;
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Short Values
LEADDicomDS1.InsertElement (False, TAG_RECORD_IN_USE_FLAG, VR_US, False, 0);
Edit1.Visible:= True;
Edit1.Text:= '';

//insert some short values into the element
LEADDicomDS1.ShortValueCount:= 5;
for x:= 0 to 5 - 1 do
LEADDicomDS1.ShortValues [x]:= x * 100;

//set the shorts
nRet:= LEADDicomDS1.SetShortValue (5);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
LEADDicomDS1.ShortValueCount:= 0; //free the values

//get the value count
nCount:= LEADDicomDS1.GetValueCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the values
nRet:= LEADDicomDS1.GetShortValue (0, nCount);
if(nRet = 0)then
begin
For x:= 0 to LEADDicomDS1.ShortValueCount - 1 do
begin
//display each value separated by a ' X '
Edit1.Text:= Edit1.Text + ' X ' + IntToStr(LEADDicomDS1.ShortValues [x]);
end;
end;
ShowMessage('wait');
LEADDicomDS1.EnableMethodErrors:= True;
end;


GetStatusISCL Example for Delphi

// In this example, assume an error occurs in the NetReceive event. The code to
// determine why this happened should look like this:
procedure TForm1.LEADDicomNet1NetReceive(ASender: TObject; hNet,
nStatus: Integer; nType: Smallint; pData: OleVariant; lSize: Integer);
var
nStatusISCL: Integer;
begin
nStatusISCL:= LEADDICOMNet1.GetStatusISCL (hNet);
if(nStatus = DICOM_ERROR_ISCL_DECRYPT)then
begin
if(nStatusISCL = 24)then
begin
// error decrypting message data
ShowMessage('Error decrypting message');
end;
if(nStatusISCL = 25)then
begin
// error decrypting MAC code
ShowMessage('Error decrypting MAC code');
end;
end;
end;


GetStringValue Example for Delphi

procedure TForm1.TestProc7();
var
nCount: Integer;
x: Integer;
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;

//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the String Values
LEADDicomDS1.InsertElement (False, TAG_IMAGE_TYPE, VR_CS, False, 0);

//insert some string values into the element
LEADDicomDS1.StringValueCount:= 5;
for x:= 0 to 5 - 1 do
LEADDicomDS1.StringValues [x]:= 'String #' + IntToStr(x + 1);

//set the strings
nRet:= LEADDicomDS1.SetStringValue(5);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;

LEADDicomDS1.StringValueCount:= 0; //free the values

Edit5.Visible:= True;
Edit5.Text:= '';
//get the value count
nCount:= LEADDicomDS1.GetValueCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the values
nRet:= LEADDicomDS1.GetStringValue (0, nCount);;
if(nRet = 0)then
begin
for x:= 0 to LEADDicomDS1.StringValueCount - 1 do
//display each value separated on a separate line
Edit5.Text:= Edit5.Text + Chr(13) + Chr(10) + LEADDicomDS1.StringValues [x];
end;
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('wait');
end;


GetTagCount Example for Delphi

var
nCount: Integer;
begin
nCount:= LEADDicomDS1.GetTagCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' Tag Items.');
end;


GetTimeValue Example for Delphi

Procedure TForm1.TestProc();
var
nCount: Integer;
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;

//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Time Value
LEADDicomDS1.InsertElement (False, TAG_PATIENT_BIRTH_TIME, VR_TM, False, 0);

//insert an Time value into the element
LEADDicomDS1.TimeValueCount:= 1;
LEADDicomDS1.TimeValues [0].Hours:= 12;
LEADDicomDS1.TimeValues [0].Minutes:= 25;
LEADDicomDS1.TimeValues [0].Seconds:= 33;
LEADDicomDS1.TimeValues [0].Fractions:= 50;

//set the time
nRet:= LEADDicomDS1.SetTimeValue (1);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;

LEADDicomDS1.TimeValueCount:= 0; //free the value

Edit1.Visible:= True;
Edit1.Text:= '';

//get the value count
nCount:= LEADDicomDS1.GetValueCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' values!');

//get the value
nRet:= LEADDicomDS1.GetTimeValue (0, nCount);
//display the value
Edit1.Text:= 'Hours: ' + IntToStr(LEADDicomDS1.TimeValues [0].Hours) + ' Minutes: ' + IntToStr(LEADDicomDS1.TimeValues [0].Minutes) + ' Seconds: ' + IntToStr(LEADDicomDS1.TimeValues [0].Seconds) + ' Fractions: ' + IntToStr(LEADDicomDS1.TimeValues [0].Fractions);
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('wait');
end;


Getting an overlay bitmap list Example for Delphi

var
nRet: Integer;
OverlayAttributesDS: LEADOverlayAttributes;
cs: String;
begin
nRet:= LEADDicomDS1.GetOverlayAttributes (0, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
OverlayAttributesDS:= LEADDicomDS1.OverlayAttributes;
cs:= LEADDicomDS1.OverlayActivationLayer[0];
ShowMessage(cs);

nRet:= LEADDicomDS1.GetOverlayBitmapList (0, 0, OverlayAttributesDS.NumberFramesInOverlay, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
LEADRasterView1.Raster.BitmapList:= LEADDicomDS1.OverlayBitmapList;
end;


Getting and setting a non-linear VOI LUT Example for Delphi

// This example will add a new VOI LUT to the dataset or
// replace the existing one(s)
var
VOILUTAttributes: LVOILUTAttributes;
nRet: Integer;
nVOILUTCount: Integer;
nLUTIndex: Integer;
nNewLUTIndex: Integer;
nDataSize: Integer;
LUTData: OleVariant;
bAddVOILUT: Boolean;
begin
bAddVOILUT:= True;
// Get the number of VOI LUT(s) in the file
nVOILUTCount:= LEADDicomDS1.VOILUTCount;
if(nVOILUTCount > 0)then
begin
// Get he attributes of the first VOI LUT
nRet:= LEADDicomDS1.GetVOILUTAttributes (0, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
VOILUTAttributes:= LEADDicomDS1.VOILUTAttributes;
nDataSize:= VOILUTAttributes.LUTDescriptorNumberOfEntries;
// Get the LUT data
VariantInit(LUTData);
nRet:= LEADDicomDS1.GetVOILUTData(0, LUTData, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
// Remap the data
for nLUTIndex:= 0 to (nDataSize - 1) do
LUTData[nLUTIndex]:= LUTData[nLUTIndex] / 2;
end
else
begin
VOILUTAttributes:= LEADDicomDS1.VOILUTAttributes;
// Define our own LUT
VOILUTAttributes.LUTDescriptorFirstMapped:= 0;
VOILUTAttributes.LUTDescriptorEntryBits:= 16;
VOILUTAttributes.LUTDescriptorNumberOfEntries:= $10000;
nDataSize:= VOILUTAttributes.LUTDescriptorNumberOfEntries;
VarArrayCreate([0, nDataSize-1], LUTData);
for nLUTIndex:= 0 to (nDataSize - 1) do
LUTData[nLUTIndex]:= nLUTIndex;
end;
nNewLUTIndex:= nVOILUTCount;
if(bAddVOILUT = False)then
begin
// Delete existing LUT
nRet:= LEADDicomDS1.DeleteVOILUT(0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
nNewLUTIndex:= 0;
end;
// Set the new LUT
nRet:= LEADDicomDS1.SetVOILUT(nNewLUTIndex, LUTData, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
end;


Getting and setting window center and width Example for Delphi

// This example will add a new 'Window Width' and
// 'Window Center' to the dataset , or replace
// the existing one(s)
var
bAddWindow: Boolean;
WindowAttributes: LWindowAttributes;
nRet: Integer;
nWindowCount: Integer;
nWindowIndex: Integer;
nBitsStored: Integer;
begin
bAddWindow:= True;
nBitsStored:= 12;

nWindowCount:= LEADDicomDS1.WindowCount;
if(nWindowCount > 0)then
begin
nRet:= LEADDicomDS1.GetWindowAttributes(0, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
WindowAttributes:= LEADDicomDS1.WindowAttributes;

// Half the width for the first window
WindowAttributes.WindowWidth:= WindowAttributes.WindowWidth / 2;
WindowAttributes.WindowCenter:= WindowAttributes.WindowCenter / 2;
end
else
begin
// This represents an identity VOI LUT transformation in the case
// where no Modality LUT is specified and the stored pixel data are
// iBitsStored bit unsigned integers.
WindowAttributes:= LEADDicomDS1.WindowAttributes;
WindowAttributes.WindowWidth:= Power(2, nBitsStored);
WindowAttributes.WindowCenter:= Power(2, nBitsStored - 1);
WindowAttributes.WindowCWExplaination:= '';
end;
nWindowIndex:= nWindowCount;
if(bAddWindow = False)then
begin
// Delete the existing window(s)
nRet:= LEADDicomDS1.DeleteWindow (0);
if(nRet <> 0)then
begin
ShowMessage ('error');
Exit;
end;
nWindowIndex:= 0
end;
// Add the new window
nRet:= LEADDicomDS1.SetWindowAttributes (nWindowIndex, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
end;


Getting modality LUT data and attributes Example for Delphi

// This example will retrieve the LUT Data (0028,3006)
// under the Modality LUT Sequence (0028,3000)
var
nRet: Integer;
// Object that will hold modality LUT attributes
MLUTAttributes: LModalityLUTAttributes;
Data: OleVariant;
begin
// Get modality LUT attributes
nRet:= LEADDicomDS1.GetModalityLUTAttributes(0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
MLUTAttributes:= LEADDicomDS1.ModalityLUTAttributes;
// If there is no modality LUT sequence then there is no data !
if (MLUTAttributes.IsModalityLUTSequence = False)then
begin
ShowMessage('No LUT');
Exit;
end;

// Retrieve the LUT Data (0028,3006)
LEADDicomDS1.GetModalityLUTData(Data, 0);
// Do something with the data
end;


Getting palette color LUT data and attributes Example for Delphi

// This example will retrieve the data under
// 'Red Palette Color Lookup Table Data'(0028,1201)
// element and if the data is segmented it will get the data under
// 'Segmented Red Palette Color Lookup Table Data' (0028,1221) and decode it
var
LUTData: OleVariant;
// Object that will hold Palette Color LUT attributes
PaletteColorLUTAttributes: LPaletteColorLUTAttributes;
nRet: Integer;
begin
// Get 'Palette Color Lookup Table' attributes
nRet:= LEADDicomDS1.GetPaletteColorLUTAttributes (0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
PaletteColorLUTAttributes:= LEADDicomDS1.PaletteColorLUTAttributes;
// Retrieve 'Red Palette Color Lookup Table Data'
// This function will automatically decode the LUT data
// if it was segmented
nRet:= LEADDicomDS1.GetPaletteColorLUTData (LUTData, DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0);
//do something with vData
//...
end;


Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for Delphi

// This example will extract the overlays from a
// DICOM dataset and associate them with a bitmap,
// the bitmap is assumed to be extracted from the
// same DICOM dataset.
var
nRet: Integer;
nOverlayCount: Integer;
nOverlayIndex: Integer;
OverlayAttributesDS: LEADOverlayAttributes;
OverlayAttributesRaster: LEADOverlayAttributes;
RasterProcess: LEADRasterProcess;
GroupNumber: Integer;
bIsOverlayInDataSet: Boolean;
nLEADOverlayIndex: Integer;
nFlags: Integer;
crColor: COLORREF;
begin
RasterProcess:= coLEADRasterProcess.Create();

LEADDicomDS1.GetBitmapValue (0, 0, ORDER_BGRORGRAY, 0);
LEADRasterView1.Raster.Bitmap:= LEADDicomDS1.Bitmap;

// Do we have any overlays at all?
nOverlayCount:= LEADDicomDS1.OverlayCount;
if(nOverlayCount = 0)then
Exit;

// Go through the overlays one by one
nOverlayIndex:= 0;
nLEADOverlayIndex:= 0;
// Reset the overlay bitmap
if(LEADRasterView2.Raster.Bitmap > 0)then
LEADRasterView2.Raster.Free();

LEADRasterView2.Raster.CreateBitmap(1, 1, 1);
while(nOverlayIndex < nOverlayCount) do
begin
GroupNumber:= 0;
//bIsOverlayInDataSet:= False;
//nFlags:= 0;
// Get the attributes of this overlay
nRet:= LEADDicomDS1.GetOverlayAttributes (nOverlayIndex, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
GroupNumber:= LEADDicomDS1.OverlayGroupNumber[nOverlayIndex, 0];
bIsOverlayInDataSet:= LEADDicomDS1.IsOverlayInDataset(nOverlayIndex, 0);

if(bIsOverlayInDataSet = False)then
begin
nOverlayIndex:= nOverlayIndex + 1;
Continue;
end;

OverlayAttributesDS:= LEADDicomDS1.OverlayAttributes;
OverlayAttributesRaster:= RasterProcess.OverlayAttributes;

// Auto paint and process overlays
nFlags:= OverlayAttributesDS.Flags;
nFlags:= nFlags Or OVERLAY_AUTOPAINT Or OVERLAY_AUTOPROCESS;
OverlayAttributesRaster.Flags:= nFlags;
OverlayAttributesRaster.OriginX:= OverlayAttributesDS.OriginX;
OverlayAttributesRaster.OriginY:= OverlayAttributesDS.OriginY;
crColor:= clWhite;
OverlayAttributesRaster.Color:= crColor;
OverlayAttributesRaster.BitPosition:= OverlayAttributesDS.BitPosition;
OverlayAttributesRaster.Rows:= OverlayAttributesDS.Rows;
OverlayAttributesRaster.Columns:= OverlayAttributesDS.Columns;
OverlayAttributesRaster.type_:= OverlayAttributesDS.type_;
OverlayAttributesRaster.BitsAllocated:= OverlayAttributesDS.BitsAllocated;
OverlayAttributesRaster.Subtype:= OverlayAttributesDS.Subtype;
OverlayAttributesRaster.label_:= OverlayAttributesDS.label_;
OverlayAttributesRaster.ROIArea:= OverlayAttributesDS.ROIArea;
OverlayAttributesRaster.ROIMean:= OverlayAttributesDS.ROIMean;
OverlayAttributesRaster.ROIStandardDeviation:= OverlayAttributesDS.ROIStandardDeviation;
OverlayAttributesRaster.NumberFramesInOverlay:= OverlayAttributesDS.NumberFramesInOverlay;
OverlayAttributesRaster.ImageFrameOrigin:= OverlayAttributesDS.ImageFrameOrigin;
OverlayAttributesRaster.ActivationLayer:= OverlayAttributesDS.ActivationLayer;
OverlayAttributesRaster.Description:= OverlayAttributesDS.Description;

nRet:= RasterProcess.SetOverlayAttributes (LEADRasterView1.Raster, nLEADOverlayIndex, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
exit;
end;

// Is the overlay embedded inside the image data ?
nFlags:= OverlayAttributesDS.Flags;
if((nFlags And OVERLAY_USEBITPLANE)=OVERLAY_USEBITPLANE)then
begin
// Add this overlay to the list of overlays in the bitmap handle
nRet:= RasterProcess.SetOverlayAttributes (LEADRasterView1.Raster,
nLEADOverlayIndex,
OVERLAYATTRIBUTES_FLAGS Or
OVERLAYATTRIBUTES_BITINDEX Or
OVERLAYATTRIBUTES_ORIGIN Or
OVERLAYATTRIBUTES_DICOM Or
OVERLAYATTRIBUTES_COLOR);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;

// Make sure to extract the overlay data from the image data
nRet:= RasterProcess.UpdateOverlayBits(LEADRasterView1.Raster,
nLEADOverlayIndex,
SETOVERLAYBITS_FROMBITMAP);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
end
// The overlay is inside overlay data
else
begin
// Add this overlay to the list of overlays in the bitmap handle
nRet:= RasterProcess.SetOverlayAttributes (LEADRasterView1.Raster,
nLEADOverlayIndex,
OVERLAYATTRIBUTES_FLAGS Or
OVERLAYATTRIBUTES_ORIGIN Or
OVERLAYATTRIBUTES_DICOM Or
OVERLAYATTRIBUTES_COLOR);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;

// Get the overlay bitmap from the overlay data
nRet:= LEADDicomDS1.GetOverlayBitmap (nOverlayIndex, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
// store it temp. in RasterView2
if(LEADRasterView2.Raster.Bitmap > 0)then
LEADRasterView2.Raster.Free();

LEADRasterView2.Raster.Bitmap:= LEADDicomDS1.OverlayBitmap;

// Set the bitmap for this overlay inside the
// list of overlays we have in the bitmap handle

nRet:= RasterProcess.SetOverlayBitmap (LEADRasterView1.Raster,
nLEADOverlayIndex,
LEADRasterView2.Raster,
OVERLAY_COPY);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
end;
nOverlayIndex:= nOverlayIndex + 1;
nLEADOverlayIndex:= nLEADOverlayIndex + 1;
end;
end;


GetTransferCount Example for Delphi

var
x: Integer;
strOut: String;
result: String;
begin
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate (True);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);

//display each Transfer Syntax for the first Presentation Context
strOut:= '';
for x:= 0 to LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1 do
begin
result:= LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x);
strOut:= strOut + result;
strOut:= strOut + Chr(13);
end;

ShowMessage(strOut);

//add a transfer syntax
LEADDICOMNet1.AddTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), UID_IMPLICIT_VR_LITTLE_ENDIAN);
//display each Transfer Syntax for the first Presentation Context
strOut:= '';
for x:= 0 To LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1 do
begin
result:= LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x);
strOut:= strOut + result;
strOut:= strOut + Chr(13);
end;

ShowMessage(strOut);

//change them
for x:= 0 to LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1 do
LEADDICOMNet1.SetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x, UID_EXPLICIT_VR_BIG_ENDIAN);

//display each Transfer Syntax for the first Presentation Context
strOut:= '';
for x:= 0 to LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1 do
begin
result:= LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x);
strOut:= strOut + result;
strOut:= strOut + Chr(13);
end;
ShowMessage(strOut);

//delete the last one
LEADDICOMNet1.DeleteTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1);

//display each Transfer Syntax for the first Presentation Context
strOut:= '';
for x:= 0 to LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0)) - 1 do
begin
result:= LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, 0), x);
strOut:= strOut + result;
strOut:= strOut + Chr(13);
end;

ShowMessage(strOut);

LEADDICOMNet1.FreeAssociate (LEADDICOMNet1.hPDU);
end;


GetUIDCount Example for Delphi

var
nCount: Integer;
begin
nCount:= LEADDicomDS1.GetUIDCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' UID Items.');
end;


GetUserInfoCount Example for Delphi

var
x: Integer;
y: Integer;
nType: Integer;
nLen: Integer;
vData: OleVariant;
strOut: String;
test: OleVariant;
begin
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate (True);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);

//get current user info types, lengths, and datathen display them
strOut:= '';
if(LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) > 0)then
begin
for x:= 0 to LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1 do
begin
nType:= LEADDICOMNet1.GetUserInfoType (LEADDICOMNet1.hPDU, x);
strOut:= strOut + 'Type: ' + IntToStr(nType);
nLen:= LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x);
strOut:= strOut + ' Length: ' + IntToStr(nLen);
vData:= LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU, x);
strOut:= strOut + ' Data: ';
for y:= 0 to nLen - 1 do
strOut:= strOut + Chr(Byte(vData[y]));
strOut:= strOut + Chr(13);
end;
end
else
strOut:= 'None';

ShowMessage(strOut);

//add a user info item item
strOut:= '';
test:= 'just a test';
nLen:= Length(test);
LEADDICOMNet1.AddUserInfo(LEADDICOMNet1.hPDU, 99, test, nLen);
strOut:= '';
if(LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) > 0)then
begin
for x:= 0 To LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1 do
begin
nType:= LEADDICOMNet1.GetUserInfoType (LEADDICOMNet1.hPDU, x);
strOut:= strOut + 'Type: ' + IntToStr(nType);
nLen:= LEADDICOMNet1.GetUserInfoLength (LEADDICOMNet1.hPDU, x);
strOut:= strOut + ' Length: ' + IntToStr(nLen);
vData:= LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU, x);
strOut:= strOut + ' Data: ';

for y:= 0 to nLen - 1 do
strOut:= strOut + Chr(Byte(vData[y]));
strOut:= strOut + Chr(13);
end;
end
else
strOut:= 'None';

ShowMessage(strOut);

//for each user info item, change the data
test:= 'a second test';
for x:= 0 To LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1 do
begin
nType:= LEADDICOMNet1.GetUserInfoType (LEADDICOMNet1.hPDU, x);
LEADDICOMNet1.SetUserInfo(LEADDICOMNet1.hPDU, x, nType, test, Length(test));
end;
strOut:= '';
if(LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) > 0)then
begin
for x:= 0 to LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1 do
begin
nType:= LEADDICOMNet1.GetUserInfoType (LEADDICOMNet1.hPDU, x);
strOut:= strOut + 'Type: ' + IntToStr(nType);
nLen:= LEADDICOMNet1.GetUserInfoLength (LEADDICOMNet1.hPDU, x);
strOut:= strOut + ' Length: ' + IntToStr(nLen);
vData:= LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU, x);
strOut:= strOut + ' Data: ';
for y:= 0 to nLen - 1 do
strOut:= strOut + Chr(Byte(vData[y]));

strOut:= strOut + Chr(13)
end;
end
else
strOut:= 'None';

ShowMessage(strOut);

//delete the one we added
LEADDICOMNet1.DeleteUserInfo(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1);

LEADDICOMNet1.FreeAssociate (LEADDICOMNet1.hPDU);
end;


GetVRCount Example for Delphi

var
nCount: Integer;
begin
nCount:= LEADDicomDS1.GetVRCount ();
ShowMessage('There are ' + IntToStr(nCount) + ' VR Items.');
end;


IncludeVolatile Example for Delphi

var
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//list all elements
LEADDicomDS1.IncludeVolatile:= True;
nRet:= LEADDicomDS1.MoveFirstElement (False);
while (nRet= 0) do
begin
Memo1.Lines.Add(IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentElement ().Tag));
nRet:= LEADDicomDS1.MoveNextElement(False);
end;
ShowMessage('Element Count:= ' + IntToStr(Memo1.Lines.Count));
//list only non-volatile elements
LEADDicomDS1.IncludeVolatile:= False;
nRet:= LEADDicomDS1.MoveFirstElement (False);
While (nRet = 0) do
begin
Memo2.Lines.Add(IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentElement().Tag));
nRet:= LEADDicomDS1.MoveNextElement(False);
end;
ShowMessage('Non Volatile Element Count:= ' + IntToStr(Memo2.Lines.Count));
end;


InitCS Example for Delphi

var
strOut: String;
begin
//create a data set as a command set
LEADDicomDS1.InitCS (COMMAND_C_STORE, True);

//gets information about the command set
LEADDicomDS1.GetInfoCS ();
strOut:= 'Command: ' + IntToStr(LEADDicomDS1.InfoCommand);
strOut:= strOut + Chr(13);
strOut:= strOut + 'Request: ' + BoolToStr(LEADDicomDS1.InfoRequest);
ShowMessage(strOut);
end;


InitDS Example for Delphi

//init a DS with default options
LEADDicomDS1.InitDS (DICOM_CLASS_CR_IMAGE_STORAGE, DS_EXPLICIT_VR + DS_METAHEADER_ABSENT + DS_BIG_ENDIAN);


InsertBitmapListValue Example for Delphi

Procedure TForm1.TestProcInsertList();
var
nRet: Integer;
IO: LEADRasterIO;
Process: LEADRasterProcess;
begin
IO:= coLEADRasterIO.Create();
Process:= coLEADRasterProcess.Create();

LEADDicomDS1.EnableMethodErrors:= False;

//move to the first image element and delete what//s there
nRet:= LEADDicomDS1.FindFirstElement (TAG_PIXEL_DATA, False);
nRet:= LEADDicomDS1.DeleteElement ();
nRet:= LEADDicomDS1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0);

//load an image
IO.Load(LEADRasterView1.Raster, 'd:\lead14\dist\images\image1.cmp', 0, 1, 1);
ShowMessage('Image loaded from File - Wait');

//create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem(0, LEADRasterView1.Raster.Bitmap);
Process.Flip(LEADRasterView1.Raster);
LEADRasterView2.Raster.InsertBitmapListItem(1, LEADRasterView1.Raster.Bitmap);
Process.Reverse(LEADRasterView1.Raster);
LEADRasterView2.Raster.InsertBitmapListItem(2, LEADRasterView1.Raster.Bitmap);

//insert the image list into the element
nRet:= LEADDicomDS1.InsertBitmapListValue(LEADRasterView2.Raster.BitmapList, 0, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
ShowMessage('ImageList inserted into Data Set - Wait');
end;


InsertBitmapValue Example for Delphi

Procedure TForm1.TestProcInsertBitmap();
var
nRet: Integer;
nCount: Integer;
IO: LEADRasterIO;
Process: LEADRasterProcess;
begin
IO:= coLEADRasterIO.Create();
Process:= coLEADRasterProcess.Create();

LEADDicomDS1.EnableMethodErrors:= False;

//move to the first image element and delete what//s there
nRet:= LEADDicomDS1.FindFirstElement (TAG_PIXEL_DATA, False);
nRet:= LEADDicomDS1.DeleteElement ();
nRet:= LEADDicomDS1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0);

//load an image
IO.Load(LEADRasterView1.Raster, 'd:\lead14\dist\images\image1.cmp', 0, 1, 1);
ShowMessage('Image loaded from File - Wait');

nCount:= LEADDicomDS1.GetBitmapCount ();

//insert some images
nRet:= LEADDicomDS1.InsertBitmapValue (LEADRasterView1.Raster.Bitmap, nCount, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
Process.Flip(LEADRasterView1.Raster);
nRet:= LEADDicomDS1.InsertBitmapValue (LEADRasterView1.Raster.Bitmap, nCount + 1, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
Process.Reverse(LEADRasterView1.Raster);
nRet:= LEADDicomDS1.InsertBitmapValue (LEADRasterView1.Raster.Bitmap, nCount + 2, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;

ShowMessage('Images inserted - Wait');
end;


InsertDS Example for Delphi

//find the first PATIENT KEY, copy it to a new
//DS, and then save it to a file
LEADDicomDS1.FindFirstKey('PATIENT', False);
LEADDicomDS2.ResetDS();
LEADDicomDS2.InsertDS(LEADDicomDS1.hDicomDS, LEADDicomDS1.DefaultInterface.Get_CurrentElement().hElement);
LEADDicomDS2.SaveDS('d:\temp\save.dic', 0);


InsertElement Example for Delphi

var
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//insert the new element
LEADDicomDS1.FindTag (TAG_DISCHARGE_DATE);
nRet:= LEADDicomDS1.InsertElement (False, TAG_DISCHARGE_DATE, LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR, False, Integer(ELEMENT_INDEX_MAX));
if(nRet <> 0)then
ShowMessage('Error Inserting Element');

LEADDicomDS1.EnableMethodErrors:= True;
end;


InsertIOD Example for Delphi

procedure TForm1.TestProc(bChild: Boolean);
var
bInsert: Boolean;
lCode: LongInt;
nType: Integer;
hIOD: LongInt;
hTemp: LongInt;
nRet: Integer;
begin
bInsert:= False;

LEADDicomDS1.EnableMethodErrors:= True;

lCode:= 1048593;
nType:= DICOM_IOD_TYPE_CLASS;
//store current IOD
hIOD:= LEADDicomDS1.DefaultInterface.Get_CurrentIOD().hIOD;

LEADDicomDS1.EnableMethodErrors:= False;

//does an IOD already exist on the target level?
if(bChild = True)then
begin
//if the current IOD has a child, move to that child//s level
nRet:= LEADDicomDS1.MoveChildIOD;
if(nRet <> 0)then //no children, so insert is OK
begin
bInsert:= True;
LEADDicomDS1.SetCurrentIOD(hIOD);
end
else //check the child//s level to see if target IOD already exists
begin
hTemp:= LEADDicomDS1.DefaultInterface.Get_CurrentIOD().hIOD;
LEADDicomDS1.MoveFirstIOD(True);
nRet:= LEADDicomDS1.FindIOD(lCode, nType, True);
if(nRet <> 0)then
bInsert:= True;
//move back to parent level
LEADDicomDS1.SetCurrentIOD(hTemp);
LEADDicomDS1.MoveParentIOD ();
end;
end
else
begin
//check the current IOD//s level
LEADDicomDS1.MoveFirstIOD (True);
nRet:= LEADDicomDS1.FindIOD(lCode, nType, True);
if(nRet <> 0)then
bInsert:= True;
LEADDicomDS1.SetCurrentIOD(hIOD);
end;

LEADDicomDS1.EnableMethodErrors:= True;

//allow user to insert item at the same level as the current or as child
if(bInsert = True)then
begin
LEADDicomDS1.InsertIOD(bChild,
nType,
lCode,
'My Test IOD',
5,
'Test Description');
if(nRet <> 0)then
ShowMessage('Error'); end else
ShowMessage('Already exists');
end;


InsertKey Example for Delphi

var
x: Integer;
begin
LEADDicomDS1.ResetDS();
LEADDicomDS1.InitDS (DICOM_CLASS_UNKNOWN, 0);

//insert some keys
LEADDicomDS1.InsertKey('PATIENT', True); //insert PATIENT level key
LEADDicomDS1.InsertKey('STUDY', True); //insert STUDY level key

//insert 5 SERIES level keys and some data
for x:= 1 to 5 do
begin
LEADDicomDS1.StringValueCount:= 1;
LEADDicomDS1.InsertKey('SERIES', True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.StringValues [0]:= IntToStr(x);
LEADDicomDS1.SetStringValue(1);
LEADDicomDS1.MoveParentElement();
LEADDicomDS1.MoveParentKey(); //move back up one level
end;

//move to root key
LEADDicomDS1.MoveRootKey(); //PATIENT level
ShowMessage(LEADDicomDS1.GetKeyValue);

//move to SERIES level
LEADDicomDS1.MoveChildKey(); //STUDY
LEADDicomDS1.MoveChildKey(); //SERIES

//find first SERIES
LEADDicomDS1.FindFirstKey('SERIES', True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.GetStringValue (0, 1);
ShowMessage(LEADDicomDS1.StringValues [0]);

//find next series
LEADDicomDS1.FindNextKey(True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.GetStringValue (0, 1);
ShowMessage(LEADDicomDS1.StringValues [0]);

//find last SERIES
LEADDicomDS1.FindLastKey('SERIES', True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.GetStringValue (0, 1);
ShowMessage(LEADDicomDS1.StringValues [0]);

//find previous SERIES
LEADDicomDS1.FindPrevKey(True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.GetStringValue (0, 1);
ShowMessage(LEADDicomDS1.StringValues [0]);

//find last SERIES and delete it
LEADDicomDS1.FindLastKey('SERIES', True);
LEADDicomDS1.DeleteKey();

//move to root key
LEADDicomDS1.MoveFirstKey(False);
ShowMessage(LEADDicomDS1.GetKeyValue);

//move to SERIES level
LEADDicomDS1.MoveChildKey(); //STUDY
LEADDicomDS1.MoveChildKey(); //SERIES

//move to first SERIES
LEADDicomDS1.MoveFirstKey(True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.GetStringValue (0, 1);
ShowMessage(LEADDicomDS1.StringValues [0]);

//move to next series
LEADDicomDS1.MoveNextKey(True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.GetStringValue (0, 1);
ShowMessage(LEADDicomDS1.StringValues [0]);

//move to last SERIES
LEADDicomDS1.MoveLastKey(True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.GetStringValue (0, 1);
ShowMessage(LEADDicomDS1.StringValues [0]);

//move to previous SERIES
LEADDicomDS1.MovePrevKey(True);
LEADDicomDS1.MoveChildElement ();
LEADDicomDS1.FindFirstElement (TAG_REFERENCED_FILE_ID, True);
LEADDicomDS1.GetStringValue (0, 1);
ShowMessage(LEADDicomDS1.StringValues [0]);
end;


InsertModule Example for Delphi

var
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
LEADDicomDS1.GetInfoDS ();
nRet:= LEADDicomDS1.InsertModule(DICOM_MODULE_LUT_IDENTIFICATION, True);
if(nRet <> 0)then
ShowMessage('Error Inserting Module!')
else
begin
nRet:= LEADDicomDS1.FindModuleIOD (LEADDicomDS1.InfoClass, LEADDicomDS1.DefaultInterface.Get_CurrentModule().Module);
ShowMessage('Inserted Module ' + LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);
end;
end;


InsertTag Example for Delphi

var
nRet: Integer;
ItemX: TListItem;
strItem: String;
nLen: Integer;
x: Integer;
strItemL: String;
strItemR: String;
begin
LEADDicomDS1.EnableMethodErrors:= False;
nRet:= LEADDicomDS1.FindTag (131079);
if(nRet = 0)then
begin
ShowMessage('Already Exists!');
Exit;
end;

nRet:= LEADDicomDS1.InsertTag(131079, -1, 'My Test Tag', VR_OB, 1, 1, 1);
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;

LEADDicomDS1.EnableMethodErrors:= True;
//add item to the ListView control
ItemX:= ListView1.Items.Add();
strItem:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().Code);
nLen:= Length(strItem);
strItemR:= RightStr(strItem, 4);
strItemL:= '';
for x:= nLen to 7 do
strItemL:= strItemL + IntToStr(0);

strItemL:= strItemL + LeftStr(strItem, nLen - 4);
ItemX.Caption:= strItemL + ':' + strItemR;

strItem:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().Mask);
nLen:= Length(strItem);
strItemR:= RightStr(strItem, 4);
strItemL:= '';
for x:= nLen to 7 do
strItemL:= strItemL + IntToStr(0);

strItemL:= strItemL + LeftStr(strItem, nLen - 4);
ItemX.SubItems[1]:= strItemL + ':' + strItemR;
ItemX.SubItems[2]:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name;
ItemX.SubItems[3]:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR);
ItemX.SubItems[4]:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().MinVM);
ItemX.SubItems[5]:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().MaxVM);
ItemX.SubItems[6]:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().DivideVM);

ListView1.Selected:= ItemX;
ListView1.Refresh();
ListView1.SetFocus();
end;


InsertUID Example for Delphi

var
nRet: Integer;
ItemX: TListItem;
begin
LEADDicomDS1.EnableMethodErrors:= False;
nRet:= LEADDicomDS1.FindUID ('1.2.840.10008.1.3');
if(nRet = 0)then
begin
ShowMessage('Already Exists!');
Exit;
end;

LEADDicomDS1.EnableMethodErrors:= True;
nRet:= LEADDicomDS1.InsertUID('1.2.840.10008.1.3', 'My Test UID', DICOM_UID_TYPE_OTHER);
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
//add item to the ListView control
ItemX:= ListView1.Items.Add();
ItemX.Caption:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Code;
ItemX.SubItems[1]:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;

ListView1.Selected:= ItemX;
ListView1.Refresh();
ListView1.SetFocus();

LEADDicomDS1.EnableMethodErrors:= True;
end;


InsertVR Example for Delphi

var
nRet: Integer;
ItemX: TListItem;
nCode: Integer;
nRestrict: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= True;
LEADDicomDS1.EnableMethodErrors:= False;
nCode:= 20322;
nRet:= LEADDicomDS1.FindVR (nCode);
if(nRet = 0)then
begin
ShowMessage('Already Exists!');
Exit;
end;

nRestrict:= DICOM_VR_FIXED + DICOM_VR_TEXT;
nRet:= LEADDicomDS1.InsertVR(nCode, 'My Test VR', 64, nRestrict, 1);
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
//add item to the ListView control
ItemX:= ListView1.Items.Add();

ItemX.Caption:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentVR ().Code);
ItemX.SubItems[1]:= LEADDicomDS1.DefaultInterface.Get_CurrentVR().Name;
ItemX.SubItems[2]:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentVR().Length);
ItemX.SubItems[3]:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentVR().Restrict);
ItemX.SubItems[4]:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentVR().UnitSize);

ListView1.Selected:= ItemX;
ListView1.Refresh();
ListView1.SetFocus();

LEADDicomDS1.EnableMethodErrors:= True;
end;


IsActivated Example for Delphi

var
strOut: String;
begin
//test the local computer's connection
strOut:= 'Activated: ' + BoolToStr(LEADDICOMNet1.IsActivated (LEADDICOMNet1.hNet));
strOut:= strOut + Chr(13);
strOut:= strOut + 'Connected: ' + BoolToStr(LEADDICOMNet1.IsConnected (LEADDICOMNet1.hNet));
strOut:= strOut + Chr(13);
strOut:= strOut + 'Associated: ' + BoolToStr(LEADDICOMNet1.IsAssociated (LEADDICOMNet1.hNet));
ShowMessage(strOut);
end;


IsAsyncOperations Example for Delphi

if(LEADDICOMNet1.IsAsyncOperations (LEADDICOMNet1.hPDU) = True)then
begin
ShowMessage('AsyncOperations enabled');
//get the operations counts
ShowMessage('Invoked ' + IntToStr(LEADDICOMNet1.GetInvokedOperationsCount(LEADDICOMNet1.hPDU)));
ShowMessage('Performed ' + IntToStr(LEADDICOMNet1.GetPerformedOperationsCount(LEADDICOMNet1.hPDU)));
//now disable it
LEADDICOMNet1.SetAsyncOperations(LEADDICOMNet1.hPDU, False, 0, 0);
end
else
begin
ShowMessage('AsyncOperations disabled');
//now enable it
LEADDICOMNet1.SetAsyncOperations(LEADDICOMNet1.hPDU, True, 0, 0);
end;


ISCLChallengeResponseSuccess Example for Delphi

procedure TForm1.LEADDicomNet1NetExternalAuthenticateISCL(ASender: TObject;
hNet: Integer; var nChallenge, nResponse, nParameter: OleVariant);
begin
nResponse:= nChallenge + nParameter;
LEADDicomNet1.ISCLChallengeResponseSuccess:= True;
end;

Function TForm1.GetRandom(): Int64;
var
RandVal: Int64;
begin
RandVal:= Random(1) * $10000;
RandVal:= RandVal * $10000 + Random(1) * $10000;
RandVal:= RandVal * $10000 + Random(1) * $10000;
RandVal:= RandVal * $10000 + Random(1) * $10000;

Result:= RandVal;
end;

procedure TForm1.LEADDicomNet1NetGetChallengeISCL(ASender: TObject;
hNet: Integer; var nChallenge, nParameter: OleVariant);
begin
nChallenge:= GetRandom() + nParameter;
LEADDICOMNet1.ISCLChallengeResponseSuccess:= True;
end;

procedure TForm1.LEADDicomNet1NetInternalAuthenticateISCL(ASender: TObject;
hNet: Integer; var nChallenge, nResponse, nParameter: OleVariant);
begin
nResponse:= nChallenge + nParameter;
LEADDICOMNet1.ISCLChallengeResponseSuccess:= True;
end;


IsImplementClass Example for Delphi

var
strUID: String;
begin
//is max len enabled?
if(LEADDICOMNet1.IsImplementClass (LEADDICOMNet1.hPDU) = True)then
begin
//disable it
//display old value
strUID:= LEADDICOMNet1.GetImplementClass(LEADDICOMNet1.hPDU);
ShowMessage(strUID);
LEADDICOMNet1.SetImplementClass(LEADDICOMNet1.hPDU, False, strUID);
end
else
begin
//enable it
LEADDICOMNet1.SetImplementClass(LEADDICOMNet1.hPDU, True, UID_RT_DOSE_STORAGE);
strUID:= LEADDICOMNet1.GetImplementClass(LEADDICOMNet1.hPDU);
ShowMessage(strUID);
end;
end;


IsImplementVersion Example for Delphi

var
strVersion: String;
begin
if(LEADDICOMNet1.IsImplementVersion (LEADDICOMNet1.hPDU) = True)then
begin
//disable it
//display old value
strVersion:= LEADDICOMNet1.GetImplementVersion (LEADDICOMNet1.hPDU);
ShowMessage(strVersion);
LEADDICOMNet1.SetImplementVersion (LEADDICOMNet1.hPDU, False, strVersion);
end
else
begin
//enable it
LEADDICOMNet1.SetImplementVersion (LEADDICOMNet1.hPDU, True, 'v13.0');
strVersion:= LEADDICOMNet1.GetImplementVersion (LEADDICOMNet1.hPDU);
ShowMessage(strVersion);
end;
end;


IsISCLQueueEmpty Example for Delphi

if(LEADDICOMNet1.IsISCLQueueEmpty (LEADDICOMNet1.hNet))then
ShowMessage('ISCL queue is empty')
else
ShowMessage('ISCL queue is not empty');


IsMaxLengthEnabled Example for Delphi

var
nLen: Integer;
begin
//is max len enabled?
if(LEADDICOMNet1.IsMaxLengthEnabled (LEADDICOMNet1.hPDU) = True)then
begin
//disable it
//display old value
nLen:= LEADDICOMNet1.GetMaxLength (LEADDICOMNet1.hPDU);
ShowMessage(IntToStr(nLen));
LEADDICOMNet1.SetMaxLength (LEADDICOMNet1.hPDU, False, nLen);
end
else
//enable it
LEADDICOMNet1.SetMaxLength (LEADDICOMNet1.hPDU, True, 8);
end;


IsRoleSelect Example for Delphi

var
x: Integer;
nID: Integer;
szOut: String;
nUser: Integer;
nProvider: Integer;
begin
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate (True);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);

//indicate that we wish to serve as user for each SOP associated
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
LEADDICOMNet1.SetRoleSelect(LEADDICOMNet1.hPDU, nID, True, PDU_ROLE_SUPPORT, PDU_ROLE_NON_SUPPORT);
end;

//now, display the information
szOut:= 'Role Select Info' + Chr(13);
for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
begin
nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
szOut:= szOut + 'ID: ' + IntToStr(nID);
if(LEADDICOMNet1.IsRoleSelect(LEADDICOMNet1.hPDU, nID) = True)then
begin
nUser:= LEADDICOMNet1.GetUserRole(LEADDICOMNet1.hPDU, nID);
nProvider:= LEADDICOMNet1.GetProviderRole(LEADDICOMNet1.hPDU, nID);
szOut:= szOut + ' User: ' + IntToStr(nUser);
szOut:= szOut + ' Provider: ' + IntToStr(nProvider) + Chr(13);
end
else
szOut:= szOut + ' No Role Select' + Chr(13);
end;
ShowMessage(szOut);
end;


IsSupportLocked Example for Delphi

if(DicomKernel.IsSupportLocked (L_SUPPORT_MEDICAL))then
ShowMessage('No Support');


J2KCompressionControl Example for Delphi

LEADDicomDS1.InitDS (DICOM_CLASS_CR_IMAGE_STORAGE,
DS_EXPLICIT_VR + DS_METAHEADER_ABSENT + DS_LITTLE_ENDIAN);
//insert the image into the element
LEADDicomDS1.Bitmap:= LEADRasterView1.Raster.Bitmap;

// Use the Q factor for compression control.
LEADDicomDS1.J2KOptions.J2KCompressionControl:= DICOM_J2K_COMP_QFACTOR;

//set the bitmap
LEADDicomDS1.SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
0,
100,
0);


J2KCompressionRatio Example for Delphi

LEADDicomDS1.InitDS (DICOM_CLASS_CR_IMAGE_STORAGE,
DS_EXPLICIT_VR + DS_METAHEADER_ABSENT + DS_LITTLE_ENDIAN);

//insert the image into the element
LEADDicomDS1.Bitmap:= LEADRasterView1.Raster.Bitmap;

// Use the Compression ratio
LEADDicomDS1.J2KOptions.J2KCompressionControl:= DICOM_J2K_COMP_RATIO;
LEADDicomDS1.J2KOptions.J2KCompressionRatio:= 50;
//set the bitmap
LEADDicomDS1.SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
0,
0,
0);


J2KROIControl Example for Delphi

//insert the image into the element
LEADDicomDS1.Bitmap:= LEADRasterView1.Raster.Bitmap;
LEADDicomDS1.J2KOptions.J2KSetDefaults;
LEADDicomDS1.J2KOptions.J2KCompressionControl:= DICOM_J2K_COMP_RATIO;
LEADDicomDS1.J2KOptions.J2KCompressionRatio:= 100;
LEADDicomDS1.J2KOptions.J2KUseROI:= True;
LEADDicomDS1.J2KOptions.J2KROIControl:= J2K_USEOPTION_RECT;
LEADDicomDS1.J2KOptions.J2KROILeft:= 200;
LEADDicomDS1.J2KOptions.J2KROITop:= 200;
LEADDicomDS1.J2KOptions.J2KROIWidth:= 400;
LEADDicomDS1.J2KOptions.J2KROIHeight:= 400;
LEADDicomDS1.J2KOptions.J2KXTsiz:= 100;
LEADDicomDS1.J2KOptions.J2KYTsiz:= 100;
//set the bitmap
LEADDicomDS1.SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
0,
0,
0);


J2KSetDefaults Example for Delphi

var
strMsg: String;
begin
// Display all the default JPEG2000 advanced options
LEADDicomDS1.J2KOptions.J2KSetDefaults ();

strMsg:= 'J2KUseColorTransform = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KUseColorTransform) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KDerivedQuantization = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KDerivedQuantization) + Chr(13) + Chr(10);

strMsg:= strMsg + 'J2KXOsiz = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KXOsiz) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KYOsiz = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KYOsiz) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KXTsiz = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KXTsiz) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KYTsiz = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KYTsiz) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KXTOsiz = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KXTOsiz) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KYTOsiz = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KYTOsiz) + Chr(13) + Chr(10);

strMsg:= strMsg + 'J2KDecompLevel = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KDecompLevel) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KProgressOrder = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KProgressOrder) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KCodBlockWidth = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KCodBlockWidth) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KCodBlockHeight = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KCodBlockHeight) + Chr(13) + Chr(10);

strMsg:= strMsg + 'J2KCBS_SelectiveACBypass = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KCBS_SelectiveACBypass) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KCBS_ResetContextOnBoundaries = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KCBS_ResetContextOnBoundaries) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KCBS_TerminationOnEachPass = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KCBS_TerminationOnEachPass) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KCBS_VerticallyCausalContext = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KCBS_VerticallyCausalContext) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KCBS_PredictableTermination = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KCBS_PredictableTermination) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KCBS_ErrorResilienceSymbol = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KCBS_ErrorResilienceSymbol) + Chr(13) + Chr(10);

strMsg:= strMsg + 'J2KGuardBits = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KGuardBits) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KDerivedBaseMantissa = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KDerivedBaseMantissa) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KDerivedBaseExponent = ' + IntToStr(LEADDicomDS1.J2KOptions.J2KDerivedBaseExponent) + Chr(13) + Chr(10);

strMsg:= strMsg + 'J2KUseSOPMarker = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KUseSOPMarker) + Chr(13) + Chr(10);
strMsg:= strMsg + 'J2KUseEPHMarker = ' + BoolToStr(LEADDicomDS1.J2KOptions.J2KUseEPHMarker) + Chr(13) + Chr(10);

ShowMessage(strMsg);
end;


J2KTargetFileSize Example for Delphi

LEADDicomDS1.InitDS (DICOM_CLASS_CR_IMAGE_STORAGE,
DS_EXPLICIT_VR + DS_METAHEADER_ABSENT + DS_LITTLE_ENDIAN);
//insert the image into the element
LEADDicomDS1.Bitmap:= LEADRasterView1.Raster.Bitmap;
// Use the Compression ratio
LEADDicomDS1.J2KOptions.J2KCompressionControl:= DICOM_J2K_COMP_TARGETSIZE;
LEADDicomDS1.J2KOptions.J2KTargetFileSize:= 15 * 1024;
//set the bitmap
LEADDicomDS1.SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
0,
0,
0);


KeepPixelDataIntact Example for Delphi

var
strMessage: String;
begin
// Load a Data Set
if(LEADDicomDS1.LoadDS ('d:\lead14\dist\images\dicom\Image1.dic', 0) = DICOM_SUCCESS)then
begin
if(LEADDicomDS1.KeepPixelDataIntact = False)then
begin
strMessage:= 'Would you like to keep the pixel data unchanged?' +
Chr(10) + Chr(10) +
'If you choose Yes, then the resulting bitmap data ' +
'will represent exactly what appears inside the ' +
'DICOM file, but may not display properly. If you ' +
'choose No, then the resulting bitmap data may not ' +
'be identical to what appears inside the DICOM file, ' +
'but will display properly.';
if(Application.MessageBox(PChar(strMessage), '', MB_YESNO) = IDYES)then
LEADDicomDS1.KeepPixelDataIntact:= True;
end;

if(LEADDicomDS1.FindFirstElement (TAG_PIXEL_DATA, False) = DICOM_SUCCESS)then
begin
LEADDicomDS1.GetBitmapValue (0, 0, ORDER_BGR, 0);
// ...
end;
end;
end;


Listen Example for Delphi

//create a server to accept up to 25 clients
LEADDICOMNet1.Listen ('', 104, 25);


LoadDS Example for Delphi

var
nRet: Integer;
begin
//load a Data Set
LEADDicomDS1.EnableMethodErrors:= False;
nRet:= LEADDicomDS1.LoadDS ('d:\lead14\dist\images\dicom\image2.dic', 0);
if(nRet <> DICOM_SUCCESS)then
ShowMessage('Error ' + IntToStr(nRet) + ' loading file!');

LEADDicomDS1.EnableMethodErrors:= True;
end;


MoveFirstIOD Example for Delphi

var
hIOD: LongInt;
begin
LEADDicomDS1.EnableMethodErrors:= True;

//Move to the First IOD in the list
LEADDicomDS1.MoveFirstIOD (False);
hIOD:= LEADDicomDS1.DefaultInterface.Get_CurrentIOD().hIOD; //store it
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);

//Move to the Last IOD at this same level
LEADDicomDS1.MoveLastIOD(True);
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);

//Move to the Previous IOD at this same level
LEADDicomDS1.MovePrevIOD(True);
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);

//Move back to First IOD
LEADDicomDS1.SetCurrentIOD(hIOD);

//Move to the Next IOD at this same level
LEADDicomDS1.MoveNextIOD(True);
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);
end;


MoveFirstTag Example for Delphi

Procedure TForm1.DisplayItem();
var
strItem: String;
strItemL: String;
strItemR: String;
nLen: Integer;
x: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= True;
strItem:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().Code);
nLen:= Length(strItem);
strItemR:= RightStr(strItem, 4);
strItemL:= '';
for x:= nLen to 7 do
strItemL:= strItemL + IntToStr(0);

strItemL:= strItemL + LeftStr(strItem, nLen - 4);
Edit1.Text:= strItemL + ':' + strItemR;

strItem:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().Mask);
nLen:= Length(strItem);
strItemR:= RightStr(strItem, 4);
strItemL:= '';
for x:= nLen to 7 do
strItemL:= strItemL + IntToStr(0);

strItemL:= strItemL + LeftStr(strItem, nLen - 4);
Edit2.Text:= strItemL + ':' + strItemR;

Edit3.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name;

Case (LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR) of
VR_AE:
Edit4.Text:= 'AE';

VR_AS:
Edit4.Text:= 'AS';

VR_AT:
Edit4.Text:= 'AT';

VR_CS:
Edit4.Text:= 'CS';

VR_DA:
Edit4.Text:= 'DA';

VR_DS:
Edit4.Text:= 'DS';

VR_DT:
Edit4.Text:= 'DT';

VR_FD:
Edit4.Text:= 'FD';

VR_FL:
Edit4.Text:= 'FL';

VR_IS:
Edit4.Text:= 'IS';

VR_LO:
Edit4.Text:= 'LO';

VR_LT:
Edit4.Text:= 'LT';

VR_OB:
Edit4.Text:= 'OB';

VR_OW:
Edit4.Text:= 'OW';

VR_PN:
Edit4.Text:= 'PN';

VR_SH:
Edit4.Text:= 'SH';

VR_SL:
Edit4.Text:= 'SL';

VR_SQ:
Edit4.Text:= 'SQ';

VR_SS:
Edit4.Text:= 'SS';

VR_ST:
Edit4.Text:= 'ST';

VR_TM:
Edit4.Text:= 'TM';

VR_UI:
Edit4.Text:= 'UI';

VR_UL:
Edit4.Text:= 'UL';

VR_UN:
Edit4.Text:= 'UN';

VR_US:
Edit4.Text:= 'US';

VR_UT:
Edit4.Text:= 'UT';

else
Edit4.Text:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR);
end;

Edit5.Text:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().MinVM);
Edit6.Text:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().MaxVM);
Edit7.Text:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentTag().DivideVM);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
LEADDicomDS1.EnableMethodErrors:= True;

LEADDicomDS1.MoveFirstTag ();
DisplayItem();
ShowMessage('wait');

LEADDicomDS1.MoveNextTag ();
DisplayItem();
ShowMessage('wait');

LEADDicomDS1.MoveLastTag ();
DisplayItem();
ShowMessage('wait');

LEADDicomDS1.MovePrevTag ();
DisplayItem();
ShowMessage('wait');
end;


MoveFirstUID Example for Delphi

LEADDicomDS1.EnableMethodErrors:= True;

LEADDicomDS1.MoveFirstUID ();
//display the items information
Edit1.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Code;
Edit2.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
ShowMessage('wait');

LEADDicomDS1.MoveNextUID;
//display the items information
Edit1.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Code;
Edit2.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
ShowMessage('wait');

LEADDicomDS1.MoveLastUID;
//display the items information
Edit1.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Code;
Edit2.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
ShowMessage('wait');

LEADDicomDS1.MovePrevUID;
//display the items information
Edit1.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Code;
Edit2.Text:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
ShowMessage('wait');


MoveFirstVR Example for Delphi

Procedure TForm1.DisplayItem();
var
nRestrict: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= True;
//display the items information
Case (LEADDicomDS1.DefaultInterface.Get_CurrentVR().Code) of
VR_AE:
Edit1.Text := 'AE';
VR_AS:
Edit1.Text := 'AS';
VR_AT:
Edit1.Text := 'AT';
VR_CS:
Edit1.Text := 'CS';
VR_DA:
Edit1.Text := 'DA';
VR_DS:
Edit1.Text := 'DS';
VR_DT:
Edit1.Text := 'DT';
VR_FD:
Edit1.Text := 'FD';
VR_FL:
Edit1.Text := 'FL';
VR_IS:
Edit1.Text := 'IS';
VR_LO:
Edit1.Text := 'LO';
VR_LT:
Edit1.Text := 'LT';
VR_OB:
Edit1.Text := 'OB';
VR_OW:
Edit1.Text := 'OW';
VR_PN:
Edit1.Text := 'PN';
VR_SH:
Edit1.Text := 'SH';
VR_SL:
Edit1.Text := 'SL';
VR_SQ:
Edit1.Text := 'SQ';
VR_SS:
Edit1.Text := 'SS';
VR_ST:
Edit1.Text := 'ST';
VR_TM:
Edit1.Text := 'TM';
VR_UI:
Edit1.Text := 'UI';
VR_UL:
Edit1.Text := 'UL';
VR_UN:
Edit1.Text := 'UN';
VR_US:
Edit1.Text := 'US';
VR_UT:
Edit1.Text := 'UT'
else
Edit1.Text := IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentVR().Code)
end;
Edit2.Text := LEADDicomDS1.DefaultInterface.Get_CurrentVR().Name;
Edit3.Text := IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentVR().Length);

nRestrict:= LEADDicomDS1.DefaultInterface.Get_CurrentVR().Restrict;
nRestrict:= (nRestrict And (Not DICOM_VR_BINARY));
nRestrict:= (nRestrict And (Not DICOM_VR_STRING));
nRestrict:= (nRestrict And (Not DICOM_VR_TEXT));

Case (nRestrict) of
DICOM_VR_FIXED:
Edit4.Text:= 'Fixed';
DICOM_VR_MAXIMUM:
Edit4.Text := 'Maximum';
DICOM_VR_MAXIMUM_GROUP:
Edit4.Text := 'Maximum Group';
DICOM_VR_ANY:
Edit4.Text := 'Any Length';
DICOM_VR_NOT_APPLICABLE:
Edit4.Text := 'Not Applicable';
DICOM_VR_MAX:
Edit4.Text := 'Max';
else
Edit4.Text := IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentVR().Restrict);
end;

Edit5.Text := IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentVR().UnitSize);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
LEADDicomDS1.EnableMethodErrors:= True;
LEADDicomDS1.MoveFirstVR ();
DisplayItem();
ShowMessage('wait');

LEADDicomDS1.MoveNextVR ();
DisplayItem();
ShowMessage('wait');

LEADDicomDS1.MoveLastVR ();
DisplayItem();
ShowMessage('wait');

LEADDicomDS1.MovePrevVR ();
DisplayItem();
ShowMessage('wait');
end;


MoveRootElement Example for Delphi

procedure TForm1.DSDeleteModuleClick(Sender: TObject);
var
nRet1: Integer;
nRet2: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= True;
//move to first element in Data Set
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);

//move to next element in the same level of the Data Set
LEADDicomDS1.MoveNextElement(True);
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);

//move to last element in the same level of the Data Set
LEADDicomDS1.MoveLastElement(True);
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);

//move to previous element in the same level of the Data Set
LEADDicomDS1.MovePrevElement(True);
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);

//find the first element that has a child
LEADDicomDS1.EnableMethodErrors:= False;
nRet1:= LEADDicomDS1.MoveFirstElement (False);
while (nRet1 = 0) do
begin
nRet2:= LEADDicomDS1.MoveChildElement;
if(nRet2 = 0)then
begin
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);
nRet1:= 1; //end loop
end;
if(nRet1 <> 1)then
begin
//check next element in this same level
nRet1:= LEADDicomDS1.MoveNextElement(True);
end;
end;

LEADDicomDS1.EnableMethodErrors:= True;
//move back to the element//s parent
if(nRet1 = 1)then
begin
LEADDicomDS1.MoveParentElement();
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);
end;
end;


MoveRootIOD Example for Delphi

Private Sub Command14_Click()
LEADDicomDS1.EnableMethodErrors:= True;

//Move to the Root IOD
LEADDicomDS1.MoveRootIOD ();
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);

//Move to the first Child IOD
LEADDicomDS1.MoveChildIOD;
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);

//Move back to the Parent IOD
LEADDicomDS1.MoveParentIOD ();
ShowMessage(LEADDicomDS1.DefaultInterface.Get_CurrentIOD().Name);


NetClose Example for Delphi

procedure TForm1.LEADDicomNet1NetClose(ASender: TObject; hNet, nStatus,
hPeer: Integer);
var
strOut: String;
begin
//a connection is being closed
//display some information about the connection:
strOut:= 'Host: ' + LEADDICOMNet1.GetHostAddress (hNet);
strOut:= strOut + ' Port: ' + IntToStr(LEADDICOMNet1.GetHostPort (hNet));
strOut:= strOut + Chr(13);
strOut:= strOut + 'Peer: ' + LEADDICOMNet1.GetPeerAddress (hNet);
strOut:= strOut + ' Port: ' + IntToStr(LEADDICOMNet1.GetPeerPort(hNet));
Application.MessageBox(PChar(strOut), 'Connection Closed', MB_OK);
end;


NetConnect Example for Delphi

procedure TForm1.LEADDicomNet1NetConnect (ASender: TObject; hNet,
nStatus: Integer);
var
strOut: String;
strTemp: String;
strPeerAddress: String;
nPort: Integer;
begin
strOut:= '*** NetConnect Event *** ' + Chr(13) + IntToStr(hNet) + ' Status = ' + IntToStr(nStatus);

strPeerAddress:= LEADDICOMNet1.GetPeerAddress (hNet);
nPort:= LEADDICOMNet1.GetPeerPort(hNet);

strTemp:= 'PeerAddress = ' + strPeerAddress + Chr(13) + 'Port = ' + IntToStr(nPort);
strOut:= strOut + Chr(13) + strTemp;

ShowMessage(strOut);
end;


NetNonSecureReceivedISCL Example for Delphi

procedure TForm1.LEADDicomNet1NetNonSecureReceivedISCL (ASender: TObject;
hNet, nError: Integer; var vBuffer: OleVariant; nLength: Integer);
begin
if(nError = DICOM_SUCCESS)then
ShowMessage('1st byte of data = ' + vBuffer[0] + ', last byte of data = ' + vBuffer[nLength - 1]);
end;


NetNonSecureSendISCL Example for Delphi

procedure TForm1.LEADDicomNet1NetNonSecureSendISCL (ASender: TObject; hNet,
nError, nType, nLength: Integer);
begin
if(nError = DICOM_SUCCESS)then
ShowMessage('Data was successfully received');
end;


NetReceive Example for Delphi

procedure TForm1.LEADDicomNet1NetReceive(ASender: TObject; hNet,
nStatus: Integer; nType: Smallint; pData: OleVariant; lSize: Integer);
begin
ShowMessage('data received - ' + LEADDICOMNet1.GetPeerAddress (hNet) + ' Status=' + IntToStr(nStatus) + ' Type=' + IntToStr(nType));
end;


NetReceiveAbort Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveAbort (ASender: TObject;
hNet: Integer; nSource, nReason: Smallint);
begin
ShowMessage('*** NetReceiveAbort Event ***' + Chr(13) +
'Source = ' + IntToStr(nSource) + Chr(13) +
'Reason = ' + IntToStr(nReason));
end;


NetReceiveAssociateAccept Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveAssociateAccept (ASender: TObject;
hNet, hPDU: Integer);
begin
ShowMessage('Associate Accept Received - ' + BoolToStr(LEADDICOMNet1.IsAssociated (hNet)));
end;


NetReceiveAssociateReject Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveAssociateReject (ASender: TObject;
hNet: Integer; nResult, nSource, nReason: Smallint);
begin
ShowMessage('Associate Request was rejected: Result= ' + IntToStr(nResult) + ' Source=' + IntToStr(nSource) + ' Reason=' + IntToStr(nReason));
end;


NetReceiveAssociateRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveAssociateRequest (ASender: TObject;
hNet, hPDU: Integer);
var
x: Integer;
nId: Integer;
nResult: Integer;
strAbstract: String;
strTransfer: String;
begin
//we have received an AssociateRequest
Memo1.Lines.Add('Associate Request was received');

//check the version, if not 1, reject it
if(LEADDICOMNet1.GetVersion (hPDU) <> 1)then
LEADDICOMNet1.SendAssociateReject(hNet,
PDU_REJECT_RESULT_PERMANENT,
PDU_REJECT_SOURCE_USER,
PDU_REJECT_REASON_UNKNOWN)
else
begin
//send associate accept class back
LEADDICOMNet1.CreateAssociate (False);
LEADDICOMNet1.ResetAssociate (LEADDICOMNet1.hPDU, False);
//copy all presentation objects from received hPDU
//also, reply that we only support the first Transfer Syntax from the received hPDU
for x:= 0 to LEADDICOMNet1.GetPresentationCount (hPDU) - 1 do
begin
nId:= LEADDICOMNet1.GetPresentationID (hPDU, x);
strTransfer:= LEADDICOMNet1.GetTransferSyntax(hPDU, nId, 0);
nResult:= PDU_ACCEPT_RESULT_SUCCESS;
strAbstract:= LEADDICOMNet1.GetPresentationAbstract (hPDU, nId);
LEADDICOMNet1.AddPresentation(LEADDICOMNet1.hPDU, nId, nResult, strAbstract);
LEADDICOMNet1.AddTransferSyntax(LEADDICOMNet1.hPDU, nId, strTransfer);
end;
LEADDICOMNet1.SendAssociateAccept(hNet);
LEADDICOMNet1.FreeAssociate (LEADDICOMNet1.hPDU);
end;
end;


NetReceiveCCancelRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCCancelRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint);
begin
//note, this sample AE ignores C-CANCEL-REQUEST commands for simplicity
ShowMessage('C-CANCEL-REQUEST was received - ' + LEADDICOMNet1.GetPeerAddress (hNet));
end;


NetReceiveCEchoResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCEchoResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString; nStatus: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-ECHO-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.AddChild(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.AddChild(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.AddChild(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.AddChild(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.AddChild(NewNode, 'Status: ' + IntToStr(nStatus));
end;


NetReceiveCFindResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCFindResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString; nStatus, hDS: Integer);
var
strPeerAddress: String;
strStatus: String;
strMsg: String;
strFileName: String;
begin
strPeerAddress:= LEADDICOMNet1.GetPeerAddress (hNet);

if(nStatus = COMMAND_STATUS_PENDING)then
strStatus:= 'COMMAND_STATUS_PENDING';

if(nStatus = COMMAND_STATUS_SUCCESS)then
strStatus:= 'COMMAND_STATUS_SUCCESS';

if(nStatus = COMMAND_STATUS_CANCEL)then
strStatus:= 'COMMAND_STATUS_CANCEL';

strMsg:= '*** OnNetReceiveCFindResponse ***' + Chr(13) + 'Peer[' + strPeerAddress + ']' + Chr(13) + 'nPresentationID[' + IntToStr(nPresentationID) + ']' + Chr(13) + 'nMessageID[' + IntToStr(nMessageID) + ']' + Chr(13) + 'pszClass[' + pszClass + ']' + Chr(13) + 'strStatus[' + strStatus + ']' + Chr(13);

if(hDS <> 0)then
begin
gnFileCount:= gnFileCount + 1;
strFileName:= 'd:\temp\CFind' + IntToStr(gnFileCount) + '.dic';
LEADDicomDS1.SaveExtDS(hDS, strFileName, 0);
strMsg:= strMsg + 'Saving[' + strFileName + ']';
end;
ShowMessage(strMsg);
end;


NetReceiveCGetRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCGetRequest (ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString; nPriority: Smallint; hDS: Integer);
var
nRet: Integer;
szFile: String;
NewNode: TTreeNode;
strName: String;
strAE: String;
hPDU: LongInt;
strInstance: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-GET-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Priority: ' + IntToStr(nPriority));

//perform the get
//here, the AE should check the data set, and perform
//matching against the files stored on the AE to determine
//what data set(s)should be sent back to the calling AE.
//In our case, we just send back a predetermined file for
//this demo!

//load the sample file
//NOTE: this sample is looking for a particular filename TEST2.DIC
szFile:= 'e:\images\dicom16.dic';
nRet:= LEADDicomDS1.LoadDS (szFile, 0);

//now, send a store command for the get sub-operation
hPDU:= LEADDICOMNet1.GetAssociate (hNet);
strAE:= LEADDICOMNet1.GetCalling(hPDU);

nRet:= LEADDicomDS1.FindFirstElement (TAG_SOP_INSTANCE_UID, False);
if(nRet = 0)then
begin
nRet:= LEADDicomDS1.GetStringValue (0, 1);
if(nRet = 0)then
strInstance:= LEADDicomDS1.StringValues [0];
end;

nRet:= LEADDICOMNet1.SendCStoreRequest(hNet, nPresentationID, nMessageID + 1, pszClass, strInstance, nPriority, strAE, nMessageID, LEADDicomDS1.hDicomDS)
//the above will cause a ReceiveCStoreResponse event on this machine

//we will send a get response after we have received the CStoreResponse from the calling AE
end;


NetReceiveCGetResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCGetResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString; nStatus: Integer; nRemaining, nCompleted,
nFailed, nWarning: Smallint; hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-GET-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));
TreeView1.Items.Add(NewNode, 'Remaining Operations: ' + IntToStr(nRemaining));
TreeView1.Items.Add(NewNode, 'Failed Operations: ' + IntToStr(nFailed));
TreeView1.Items.Add(NewNode, 'Warnings: ' + IntToStr(nWarning));
TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));
end;


NetReceiveCMoveRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCMoveRequest (ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString; nPriority: Smallint;
const pszMoveAE: WideString; hDS: Integer);
var
nRet: Integer;
NewNode: TTreeNode;
strName: String;
hPDU: LongInt;
strInstance: String;
strClassUID: String;
nID: Integer;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-MOVE-REQUEST');
NewNode.MakeVisible();

hPDU:= LEADDICOMNet1.GetAssociate (hNet);

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass)
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Priority: ' + IntToStr(nPriority));
TreeView1.Items.Add(NewNode, 'Move AE Title: ' + pszMoveAE);

//this sample simply returns a fixed dicom data set.
LEADDicomDS1.LoadDS ('e:\images\dicom16.dic', 0);

LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.FindFirstElement (TAG_SOP_INSTANCE_UID, False);
LEADDicomDS1.GetStringValue (0, 1);
strInstance:= LEADDicomDS1.StringValues [0];

LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.FindFirstElement (TAG_SOP_CLASS_UID, False);
LEADDicomDS1.GetStringValue (0, 1);
strClassUID:= LEADDicomDS1.StringValues [0];

nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet= 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');

//send a response
LEADDICOMNet1.SendCMoveResponse(hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_NO_SUCH_CLASS, 0, 0, 1, 0, 0);
Exit;
end;

//now, send the C-STORE sub operation
LEADDICOMNet1.SendCStoreRequest(hNet, nID, nMessageID + 1, strClassUID, strInstance, nPriority, pszMoveAE, nMessageID, LEADDicomDS1.hDicomDS);

//send a response
LEADDICOMNet1.SendCMoveResponse(hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS, 0, 1, 0, 0, 0);
end;


NetReceiveCMoveResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCMoveResponse (ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString; nStatus: Integer; nRemaining, nCompleted,
nFailed, nWarning: Smallint; hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-MOVE-RESPONSE');
NewNode.MakeVisible;

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));
TreeView1.Items.Add(NewNode, 'Remaining: ' + IntToStr(nRemaining));
TreeView1.Items.Add(NewNode, 'Completed: ' + IntToStr(nCompleted));
TreeView1.Items.Add(NewNode, 'Failed: ' + IntToStr(nFailed));
TreeView1.Items.Add(NewNode, 'Warning: ' + IntToStr(nWarning));
end;


NetReceiveCStoreResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCStoreResponse (ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nStatus: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-STORE-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszClass);
TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));
end;


NetReceiveData Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveData(ASender: TObject;
hNet: Integer; nID: Smallint; hDicomCS, hDicomDS: Integer);
begin
//data was received
Memo1.LInes.Add('Data was received - ' + ' ID: ' + IntToStr(nID));

if(hDicomDS = 0)then
Memo1.Lines.Add('Data is a command set only!')
else
begin
//save the data set to disk
Memo1.Lines.Add('Data includes a data set - saved to disk!');
LEADDicomDS1.SaveExtDS(hDicomDS, 'c:\temp\test.dic', 0);
end;
end;


NetReceiveNActionRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNActionRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nAction: Smallint; hDS: Integer);
var
nRet: Integer;
NewNode: TTreeNode;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-ACTION-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Requested SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Requested SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Requested SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Action: ' + IntToStr(nAction));

//this function should perform the action command
nRet:= PerformACTIONCommand(pszClass, pszInstance, hDS);

if(nRet <> DICOM_SUCCESS)then
nRet:= COMMAND_STATUS_PROCESSING_FAILURE;

//send a response
LEADDICOMNet1.SendNActionResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, nAction, hDS);
end;


NetReceiveNActionResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNActionResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nStatus: Integer; nAction: Smallint;
hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-ACTION-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Action: ' + IntToStr(nAction));
TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));
end;


NetReceiveNCreateResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNCreateResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nStatus, hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-CREATE-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass)
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));
end;


NetReceiveNDeleteResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNDeleteResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nStatus: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-DELETE-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass)
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));
end;


NetReceiveNGetRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNGetRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString);
var
nRet: Integer;
NewNode: TTreeNode;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-GET-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass)
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);

//this function will fill the values the data set elements in LEADDICOM2.hDicomDS
nRet:= PerformNGETCommand(pszClass, pszInstance);

if(nRet <> DICOM_SUCCESS)then
nRet:= COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE;

//send a response
LEADDICOMNet1.SendNGetResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, LEADDicomDS2.hDicomDS);
end;

Function TForm1.PerformNGETCommand(strClass: String; strInstance: String): Integer;
var
nRet: Integer;
nTag: Integer;
x: Integer;
nVR: Integer;
begin
//this sample simply loads a fixed data set
//here, a server should check the class and instance against
//all SOP classes it manages, and then fill out hDS from the
//correctly matching instance, if one is found

nRet:= LEADDicomDS1.LoadDS ('e:\images\dicom16.dic', 0);
LEADDicomDS2.InitDS(DICOM_CLASS_UNKNOWN, 0);
LEADDicomDS2.ResetDS();

if(nRet = 0)then
LEADDicomDS1.MoveFirstElement (False)
else
begin
Result:= nRet;
Exit;
end;

for x:= 0 to LEADDICOMNet1.RequestAttributeCount - 1 do
begin
//get each element
nTag:= LEADDICOMNet1.RequestAttributes[x];
LEADDicomDS1.FindTag (nTag);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
nRet:= LEADDicomDS1.FindFirstElement (nTag, False);
//in this sample, if we don//t find the requested tag, we
//do not return an empty element!
if(nRet = 0)then
begin
//copy the element value
LEADDicomDS1.GetConvertValue ();
LEADDicomDS2.InsertElement (False, nTag, nVR, False, 0);
LEADDicomDS2.StringValueCount:= 1;
LEADDicomDS2.StringValues [0]:= LEADDicomDS1.StringValues[0];
LEADDicomDS2.SetConvertValue();
end;
end;
Result:= DICOM_SUCCESS;
end;


NetReceiveNGetResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNGetResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nStatus, hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-GET-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));

if(hDS <> 0)then
begin
nRet:= LEADDicomDS1.SaveExtDS(hDS, gszGetFile, 0);
NewNode:= TreeView1.Items.Add(Nil, 'Data Set - ' + gszGetFile);
NewNode.MakeVisible();
end;
end;


NetReceiveNReportRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNReportRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nEvent: Smallint; hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-REPORT-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Event: ' + IntToStr(nEvent));

//send response
LEADDICOMNet1.SendNReportResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, COMMAND_STATUS_SUCCESS, nEvent, 0);
end;


NetReceiveNReportResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNReportResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nStatus: Integer; nEvent: Smallint;
hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-REPORT-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Client: ' + LEADDICOMNet1.GetPeerAddress (hNet));

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(Newnode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(Newnode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(Newnode, 'Status: ' + IntToStr(nStatus));
TreeView1.Items.Add(Newnode, 'Event: ' + IntToStr(nEvent));
end;


NetReceiveNSetRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNSetRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; hDS: Integer);
var
nRet: Integer;
NewNode: TTreeNode;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-SET-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(Newnode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);

//this function will change the values of the requested SOP Instance
//to the values specefied in the data set elements in hDS
//this function should search all the managed SOP Instances for a
//match, and then change the requested elements.
//This is a function you must write
//nRet:= PerformNSETCommand(pszClass, pszInstance, hDS)

if(nRet <> DICOM_SUCCESS)then
nRet:= COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE;

//send a response
LEADDICOMNet1.SendNSetResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, 0);
end;


NetReceiveNSetResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNSetResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nStatus, hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-SET-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(Newnode, 'Status: ' + IntToStr(nStatus));
end;


NetReceiveReleaseRequest Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveReleaseRequest(ASender: TObject;
hNet: Integer);
var
strOut: String;
begin
//Release Request was received
strOut:= 'Release Request was received';
Memo1.Lines.Add(strOut);
LEADDICOMNet1.SendReleaseResponse(hNet);
end;


NetReceiveReleaseResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveReleaseResponse(ASender: TObject;
hNet: Integer);
var
strOut: String;
begin
//Release Response was received
strOut:= 'Release Response was received';
Memo1.Lines.Add(strOut);
end;


NetReceiveUnknown Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveUnknown(ASender: TObject;
hNet: Integer; nPresentationID: Smallint; hCS, hDS: Integer);
var
strOut: String;
begin
strOut:= 'Unknown Command Set/Data Set was received, and ignored';
strOut:= strOut + Chr(13);
strOut:= strOut + 'Presentation ID: ' + IntToStr(nPresentationID);
ShowMessage(strOut);
end;


NetSecureLinkReady Example for Delphi

procedure TForm1.LEADDicomNet1NetSecureLinkReady(ASender: TObject; hNet,
nError: Integer);
var
nTest: LongInt;
begin
if(nError <> DICOM_SUCCESS)then
begin
ShowMessage('Error Code is ' + IntTOStr(LEADDICOMNet1.GetErrorSecure(hNet)));
Exit;
end;
nTest:= LEADDICOMNet1.GetCiphersuiteTLS(LEADDICOMNet1.hNet);
if(nTest = DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)then
ShowMessage('Ciphersuite is DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA');
end;


NetSend Example for Delphi

procedure TForm1.LEADDicomNet1NetSend(ASender: TObject; hNet: Integer;
nStatus, nType: Smallint; lBytes: Integer);
begin
//Some data was sent
ShowMessage('Data Sent to: ' + LEADDICOMNet1.GetPeerAddress (hNet) + ' Status = ' + IntToStr(nStatus));
end;


Preamble Example for Delphi

Procedure TForm1.Preamble();
begin
LEADDicomDS1.GetDSPreamble();
ShowMessage(LEADDicomDS1.Preamble);
end;

Procedure TForm1.Preamble2();
begin
LEADDicomDS1.Preamble:= Edit1.Text;
LEADDicomDS1.SetDSPreamble();
end;


ProgressStatus Example for Delphi

procedure TForm1.LEADDicomDS1ProgressStatus(ASender: TObject;
nPercent: Smallint);
begin
Caption:= 'Loading...' + IntToStr(nPercent) + '%';
if(gbQuit = True)then
LEADDicomDS1.EnableProgressEvent:= False; //stop the load

Application.ProcessMessages();
end;


ResetDS Example for Delphi

//close the current Data Set
LEADDicomDS1.ResetDS();


ResetIOD Example for Delphi

//clear all IOD items
LEADDicomDS1.ResetIOD();


ResetTag Example for Delphi

//Clear all Tags
LEADDicomDS1.ResetTag();


ResetUID Example for Delphi

//Clear all UID Items
LEADDicomDS1.ResetUID();


ResetVR Example for Delphi

//Clear all items from the VR Table
LEADDicomDS1.ResetVR();


SaveDS Example for Delphi

Procedure TForm1.SaveDS(FileName: String);
var
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//save a Data Set
if(FileName <> '')then
begin
nRet:= LEADDicomDS1.SaveDS(FileName, 0);
if(nRet <> DICOM_SUCCESS)then
ShowMessage('Error ' + IntToStr(nRet) + ' saving file!');
end;
LEADDicomDS1.EnableMethodErrors:= True;
end;


SendAbort Example for Delphi

//send Abort message
LEADDICOMNet1.SendAbort(LEADDICOMNet1.hNet, PDU_ABORT_SOURCE_USER, 0);


SendAssociateRequest Example for Delphi

//create the Associate Class as Request
LEADDicomNet1.CreateAssociate (True);

//use default for association
LEADDicomNet1.DefaultAssociate (LEADDicomNet1.hPDU);

LEADDicomNet1.SetCalling(LEADDicomNet1.hPDU, 'MI_CLIENT');
LEADDicomNet1.SetCalled(LEADDicomNet1.hPDU, 'MI_SERVER');

//this shows a client sending to its server
LEADDicomNet1.SendAssociateRequest(LEADDicomNet1.hNet);

//now we can free the class
LEADDicomNet1.FreeAssociate (LEADDicomNet1.hPDU);


SendCCancelRequest Example for Delphi

//send a Cancel Request Command to the server
//gCancelPresentationID is a global variable that should be set before sending a command that could be canceled
//gCancelMessageID is a global variable that should be set before sending a command that could be canceled

LEADDicomNet1.SendCCancelRequest(LEADDicomNet1.hNet, gCancelPresentationID, gCancelMessageID);


SendCEchoRequest Example for Delphi

var
strUID: String;
nID: Integer;
nRet: Integer;
hPDU: LongInt;
begin
//send an Echo Request Command to the server
strUID:= UID_VERIFICATION_CLASS;

hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strUID + ', Not Supported by Association!');
Exit;
end;

//now, use the high-level method to send the command set
LEADDICOMNet1.SendCEchoRequest(LEADDICOMNet1.hNet, nID, 99, strUID);
end;


SendCEchoResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCEchoRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString);
var
nRet: Integer;
NewNode: TTreeNode;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-ECHO-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.AddChild(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.AddChild(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.AddChild(Newnode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.AddChild(Newnode, 'Affected SOP Class: ' + pszClass);

//use high-level method to send a response
LEADDICOMNet1.SendCEchoResponse(hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS);
end;


SendCFindRequest Example for Delphi

var
hPDU: LongInt;
nID: Integer;
nRet: Integer;
nVR: Integer;
strUID: String;
begin
//this example sends a command that will find all STUDIES on a called AE that
//supports the Study Root Query/Retrieve Information Model - FIND SOP Class

//send a Find request to the server
hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

strUID:= UID_STUDY_ROOT_QUERY_FIND;
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strUID + ', Not Supported by Association!');
Exit;
end;

//create a find attribute data set
LEADDicomDS2.InitDS(DICOM_CLASS_UNKNOWN, 0);
LEADDicomDS2.ResetDS();

//add the required fields for this seach
LEADDicomDS2.FindTag (TAG_QUERY_RETRIEVE_LEVEL);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0);
LEADDicomDS2.StringValueCount:= 1;
LEADDicomDS2.StringValues [0]:= 'STUDY'; //we are searching at the study level
LEADDicomDS2.SetStringValue(1);

LEADDicomDS2.FindTag (TAG_STUDY_DATE);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_STUDY_DATE, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_STUDY_TIME);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_STUDY_TIME, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_ACCESSION_NUMBER);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_ACCESSION_NUMBER, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_PATIENT_NAME);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_PATIENT_NAME, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_PATIENT_ID);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_PATIENT_ID, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_STUDY_ID);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_STUDY_ID, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_STUDY_INSTANCE_UID);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_STUDY_INSTANCE_UID, nVR, False, 0);

//optional tags
LEADDicomDS2.FindTag (TAG_STUDY_DESCRIPTION);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_STUDY_DESCRIPTION, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_PATIENT_BIRTH_DATE);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_PATIENT_SEX);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_PATIENT_SEX, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_OTHER_PATIENT_IDS);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag.VR;
LEADDicomDS2.InsertElement (False, TAG_OTHER_PATIENT_IDS, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_PATIENT_BIRTH_DATE);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag.VR;
LEADDicomDS2.InsertElement (False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_ADDITIONAL_PATIENT_HISTORY);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag.VR;
LEADDicomDS2.InsertElement (False, TAG_ADDITIONAL_PATIENT_HISTORY, nVR, False, 0);

LEADDicomDS2.FindTag (TAG_NUMBER_OF_STUDY_RELATED_INSTANCES);
nVR:= LEADDicomDS2.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS2.InsertElement (False, TAG_NUMBER_OF_STUDY_RELATED_INSTANCES, nVR, False, 0);

//now, send the command set and data set
LEADDICOMNet1.SendCFindRequest(LEADDICOMNet1.hNet, nID, 1, strUID, COMMAND_PRIORITY_MEDIUM, LEADDicomDS2.hDicomDS);
end;


SendCFindResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCFindRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString; nPriority: Smallint; hDS: Integer);
var
x: Integer;
hPDU: LongInt;
strAE: String;
NewNode: TTreeNode;
nRet: Integer;
strName: String;
strFile: String;
begin
//this sample simple returns all the data sets that it is managing.
//in a real-life scenario, this should perform an actual query based
//on the attribute values supplied in hDS

hPDU:= LEADDICOMNet1.GetAssociate (hNet);
strAE:= LEADDICOMNet1.GetCalling(hPDU);

NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-FIND-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Priority: ' + IntToStr(nPriority));

if(FileListBox1.Items.Count > 1)then
begin
for x:= 0 to FileListBox1.Items.Count - 1 do
begin
//load each file and send it to the calling AE
strFile:= FileListBox1.Directory + '\' + FileListBox1.Items[x];
nRet:= LEADDicomDS1.LoadDS (strFile, 0);
if(nRet = 0)then
begin
//now, send a Find Response - PENDING
LEADDICOMNet1.SendCFindResponse(hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_PENDING, LEADDicomDS1.hDicomDS);
end;
end;
end;

//now, send a Find Response - SUCCESS
LEADDICOMNet1.SendCFindResponse(hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS, 0);
end;


SendCGetRequest Example for Delphi

var
nRet: Integer;
strClassUID: String;
nVR: Integer;
hPDU: LongInt;
nID: Integer;
begin
//send a get request to the server

//gszGetFile will be used when this AE receives the NetReceiveCStoreRequest
//associated with this CGetRequest to save the data set
gszGetFile:= InputBox('Select filename for retrieved data set', 'Get Request', 'd:\temp\get_request.dic');
if(Length(gszGetFile) < 1)then
Exit;

strClassUID:= InputBox('What class do you wish to get?', 'Get Request', UID_SC_IMAGE_STORAGE);
if(Length(strClassUID) < 1)then
Exit;

//create the data set that encodes the identifier to be matched
LEADDicomDS1.InitDS (DICOM_CLASS_UNKNOWN, 0);
//add the required elements
LEADDicomDS1.FindTag (TAG_QUERY_RETRIEVE_LEVEL);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0);
LEADDicomDS1.StringValueCount:= 1;
LEADDicomDS1.StringValues [0]:= 'PATIENT';
LEADDicomDS1.SetStringValue(1);

LEADDicomDS1.FindTag (TAG_PATIENT_NAME);
LEADDicomDS1.InsertElement (False, TAG_PATIENT_NAME, LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR, False, 0);
LEADDicomDS1.StringValueCount:= 1;
LEADDicomDS1.StringValues [0]:= '*'; //get all patients
LEADDicomDS1.SetStringValue(1);

//add the optional fields that we want returned
LEADDicomDS1.FindTag (TAG_PATIENT_ID);
LEADDicomDS1.InsertElement (False, TAG_PATIENT_ID, LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR, False, 0);

LEADDicomDS1.FindTag (TAG_PATIENT_BIRTH_DATE);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0);

LEADDicomDS1.FindTag (TAG_PATIENT_SEX);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_PATIENT_SEX, nVR, False, 0);

LEADDicomDS1.FindTag (TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES, nVR, False, 0);

hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

//now, send a request
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');
Exit;
end;
LEADDICOMNet1.SendCGetRequest (LEADDICOMNet1.hNet, nID, 999, strClassUID, COMMAND_PRIORITY_MEDIUM, LEADDicomDS1.hDicomDS);

//we now must wait for the response and for the C-STORE sub-operations
end;


SendCGetResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCStoreResponse(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nStatus: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-STORE-RESPONSE');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Status: ' + IntToStr(nStatus));

//use high-level method to send a response
LEADDICOMNet1.SendCGetResponse (hNet, nPresentationID, nMessageID, pszClass, nRet, 0, 1, 0, 0, 0);
end;


SendCMoveRequest Example for Delphi

var
nRet: Integer;
strClassUID: String;
nVR: Integer;
hPDU: LongInt;
nID: Integer;
begin
//send a Move Request to the server

//gszGetFile is a global variable that will be used when we get
//the C-STORE-RQ event to store the file
gszGetFile:= InputBox('Select filename for retrieved data set', 'Move Request', 'd:\temp\move_request.dic');
if(Length(gszGetFile) < 1)then
Exit;

strClassUID:= InputBox('What class do you wish to move?', 'Move Request', UID_NM_IMAGE_STORAGE);
if(Length(strClassUID) < 1)then
Exit;

//create the data set that encodes the identifier to be matched
LEADDicomDS1.InitDS (DICOM_CLASS_UNKNOWN, 0);
//add the required elements
LEADDicomDS1.FindTag (TAG_QUERY_RETRIEVE_LEVEL);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0);
LEADDicomDS1.StringValueCount:= 1;
LEADDicomDS1.StringValues [0]:= 'PATIENT';
LEADDicomDS1.SetStringValue(1);

LEADDicomDS1.FindTag (TAG_PATIENT_NAME);
LEADDicomDS1.InsertElement (False, TAG_PATIENT_NAME, LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR, False, 0);

//add the optional fields that we want returned
LEADDicomDS1.FindTag (TAG_PATIENT_ID);
LEADDicomDS1.InsertElement (False, TAG_PATIENT_ID, LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR, False, 0);

LEADDicomDS1.FindTag (TAG_PATIENT_BIRTH_DATE);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0);

LEADDicomDS1.FindTag (TAG_PATIENT_SEX);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_PATIENT_SEX, nVR, False, 0);

LEADDicomDS1.FindTag (TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);
nVR:= LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES, nVR, False, 0);

hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

//now, send a request
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');
Exit;
end;

//we are asking the Called AE to move the SOP Instance to ourselves
LEADDICOMNet1.SendCMoveRequest(LEADDICOMNet1.hNet, nID, 1, strClassUID, COMMAND_PRIORITY_MEDIUM, 'MI_TEST', LEADDicomDS1.hDicomDS);

//we now must wait for the response and for the C-STORE sub-operations
end;


SendCStoreRequest Example for Delphi

var
nRet: Integer;
hPDU: LongInt;
nID: Integer;
strClassUID: String;
strInstanceUID: String;
begin
//send a store request to the server
hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

//pick the data set to send
nRet:= LEADDicomDS1.LoadDS ('e:\images\dicom16.dic', 0);
if(nRet <> 0)then
begin
Application.MessageBox('Error Loading Data Set!', 'Error', MB_OK);
Screen.Cursor:= crDefault;
Exit;
end;
LEADDicomDS1.FindFirstElement (TAG_SOP_INSTANCE_UID, False);
LEADDicomDS1.GetStringValue (0, 1);
strInstanceUID:= LEADDicomDS1.StringValues [0];

LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.FindFirstElement (TAG_SOP_CLASS_UID, False);
LEADDicomDS1.GetStringValue (0, 1);
strClassUID:= LEADDicomDS1.StringValues [0];

//send the command set
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');

Screen.Cursor:= crDefault;
Exit;
end;

LEADDICOMNet1.SendCStoreRequest(LEADDICOMNet1.hNet, nID, 999, strClassUID, strInstanceUID, COMMAND_PRIORITY_MEDIUM, '', 0, LEADDicomDS1.hDicomDS);

Screen.Cursor:= crDefault;
end;


SendCStoreResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveCStoreRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nPriority: Smallint;
const pszMoveAE: WideString; nMoveMessageID: Smallint; hDS: Integer);
var
nRet: Integer;
NewNode: TTreeNode;
strName: String;
strReply: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-STORE-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Priority: ' + IntToStr(nPriority));
TreeView1.Items.Add(NewNode, 'Move AE Title: ' + pszMoveAE);
TreeView1.Items.Add(NewNode, 'Move Message ID: ' + IntToStr(nMoveMessageID));

//perform the store - this is a function that you have to write
nRet:= PerformSTORECommand(hDS);

//send a response
strReply:= 'Store Response Command Set Sent - ';
//use high-level method to send a response
LEADDICOMNet1.SendCStoreResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet);
ShowMessage(strReply + LEADDICOMNet1.GetPeerAddress (hNet));
end;


SendData Example for Delphi

//send a command set, then a data set
LEADDicomDS2.InitCS (COMMAND_C_STORE, True);
LEADDicomDS1.InitDS (DICOM_CLASS_CR_IMAGE_STORAGE, 0);
//client is sending data
LEADDICOMNet1.SendData(LEADDICOMNet1.hNet, 1, LEADDicomDS2.hDicomDS, LEADDicomDS1.hDicomDS);


SendNActionRequest Example for Delphi

//this sample shows how to send an N-ACTION-REQUEST
var
nRet: Integer;
strClassUID: String;
strInstance: String;
hPDU: LongInt;
nID: Integer;
nAction: Integer;
begin
//send an N-ACTION-REQUEST to the server

nAction:= StrToInt(InputBox('What Action(1..10)?', 'Action Request', '1'));

strClassUID:= InputBox('What class?', 'Action Request', UID_BASIC_FILM_BOX_CLASS);
if(Length(strClassUID) < 1)then
Exit;

strInstance:= InputBox('What instance?', 'Action Request', '1.1.1.1');
if(Length(strInstance) < 1)then
Exit;

//here you would create a data set that encodes the Action Arguments
//for this example, we just load a dataset
//...
nRet:= LEADDicomDS1.LoadDS ('e:\images\dicom16.dic', 0);

hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

//now, send a request
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
Else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');
Exit;
end;

LEADDICOMNet1.SendNActionRequest(LEADDICOMNet1.hNet, nID, 1, strClassUID, strInstance, nAction, LEADDicomDS1.hDicomDS);
end;


SendNCreateRequest Example for Delphi

var
strClassUID: String;
strInstanceUID: String;
nID: Integer;
hPDU: LongInt;
nRet: Integer;
begin
hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

strClassUID:= InputBox('Enter SOP Class to Create:', 'Create', UID_SC_IMAGE_STORAGE);
strInstanceUID:= InputBox('Enter SOP Instance to Create:', 'Create', '1.2.840.113619.2.30.1.1762288927.1489.906240296.255');

//send a Create Request Command to the server
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');
Exit;
end;

//here, you should construct a Data Set that contains the attributes
//and values for the new SOP Instance.
//In this sample, we simply load a Data Set from a file on disk
//pick the data set to send
nRet:= LEADDicomDS1.LoadDS ('e:\images\dicom16.dic', 0);

//send a Delete Request message
LEADDICOMNet1.SendNCreateRequest(LEADDICOMNet1.hNet, nID, 999, strClassUID, strInstanceUID, LEADDicomDS1.hDicomDS);
end;


SendNCreateResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNCreateRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; hDS: Integer);
var
nRet: Integer;
NewNode: TTreeNode;
strReply: String;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-CREATE-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);

//This is a function that would perform the actual creation of the SOP Instance
nRet:= PerformCREATECommand(pszClass, pszInstance, hDS);

if(nRet <> DICOM_SUCCESS)then
nRet:= COMMAND_STATUS_PROCESSING_FAILURE;

//send a response
strReply:= 'Create Response Command Set Sent - ';
//note, we simply send back the passed hDS in this sample
LEADDICOMNet1.SendNCreateResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, hDS);
end;


SendNDeleteRequest Example for Delphi

var
strClassUID: String;
strInstanceUID: String;
nID: Integer;
hPDU: LongInt;
nRet: Integer;
begin
hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

strClassUID:= InputBox('Enter SOP Class to Delete:', 'Delete', UID_SC_IMAGE_STORAGE);
strInstanceUID:= InputBox('Enter SOP Instance to Delete:', 'Delete', '1.2.840.113619.2.30.1.1762288927.1489.906240296.255');

//send a Delete Request Command to the server
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');
Exit;
end;
LEADDICOMNet1.SendNDeleteRequest(LEADDICOMNet1.hNet, nID, 999, strClassUID, strInstanceUID);
end;


SendNDeleteResponse Example for Delphi

procedure TForm1.LEADDicomNet1NetReceiveNDeleteRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString);
var
nRet: Integer;
NewNode: TTreeNode;
strReply: String;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-DELETE-REQUEST');
NewNode.MakeVisible();

TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);

TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);

//this is a function that you have to write
nRet:= PerformDELETECommand(pszClass, pszInstance);

if(nRet <> DICOM_SUCCESS)then
nRet:= COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE;

//send a response
strReply:= 'Delete Response Command Set Sent - ';
LEADDICOMNet1.SendNDeleteResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet);
ShowMessage(strReply + LEADDICOMNet1.GetPeerAddress (hNet));
end;


SendNGetRequest Example for Delphi

var
nRet: Integer;
strClassUID: String;
strInstance: String;
hPDU: LongInt;
nID: Integer;
begin
//send an N-GET-REQUEST to the server

//gszGetFile is a global variable used in the NetReceiveNGetResponse event
gstrGetFile:= InputBox('Select filename for retrieved data set', 'Get Request', 'd:\temp\N_GET_REQ.dic');
if(Length(gstrGetFile) < 1)then
Exit;

strClassUID:= InputBox('What class do you wish to get?', 'Get Request', UID_SC_IMAGE_STORAGE);
if(Length(strClassUID) < 1)then
Exit;

strInstance:= InputBox('What instance do you wish to get?', 'Get Request', '1.1.1.1');
if(Length(strInstance) < 1)then
Exit;

//here, you must create a list of the identifiers
//that you wish to get from the server
LEADDICOMNet1.RequestAttributeCount:= 4;
LEADDICOMNet1.RequestAttributes[0]:= TAG_PATIENT_NAME;
LEADDICOMNet1.RequestAttributes[1]:= TAG_PATIENT_ID;
LEADDICOMNet1.RequestAttributes[2]:= TAG_PATIENT_SEX;
LEADDICOMNet1.RequestAttributes[3]:= TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES;

hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

//now, send a request
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);

if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');

Exit;
end;

LEADDICOMNet1.SendNGetRequest(LEADDICOMNet1.hNet, nID, 1, strClassUID, strInstance);
end;


SendNonSecureISCL Example for Delphi

var
vBuffer: OleVariant;
begin
vBuffer:= 'Test ISCL';
// number of bytes is 10 becuase the string has a terminating null character
LEADDICOMNet1.SendNonSecureISCL(LEADDICOMNet1.hNet, vBuffer, 10);
end;


SendNReportRequest Example for Delphi

var
x: Integer;
hClient: LongInt;
nVR: Integer;
szClass: String;
szInstance: String;
hPDU: LongInt;
nID: Integer;
nRet: Integer;
begin
//send an event report message to all clients
//let them know a new patient was created

//this sample just uses a made up instance
szClass := UID_US_IMAGE_STORAGE;
szInstance := '1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1';

//create the data set
LEADDicomDS1.InitDS (DICOM_CLASS_UNKNOWN, 0);
LEADDicomDS1.ResetDS();

//add the required elements
LEADDicomDS1.FindTag (TAG_SPECIFIC_CHARACTER_SET);
nVR := LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_SPECIFIC_CHARACTER_SET, nVR, False, 0);

LEADDicomDS1.FindTag (TAG_INSTANCE_CREATION_DATE);
nVR := LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_INSTANCE_CREATION_DATE, nVR, False, 0);
LEADDicomDS1.DateValueCount := 1;
LEADDicomDS1.DateValues [0].Day := 31;
LEADDicomDS1.DateValues [0].Month := 12;
LEADDicomDS1.DateValues [0].Year := 1999;
LEADDicomDS1.SetDateValue (1);

LEADDicomDS1.FindTag (TAG_INSTANCE_CREATION_TIME);
nVR := LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_INSTANCE_CREATION_TIME, nVR, False, 0);
LEADDicomDS1.TimeValueCount := 1;
LEADDicomDS1.TimeValues [0].Hours := 12;
LEADDicomDS1.TimeValues [0].Minutes := 30;
LEADDicomDS1.SetTimeValue (1);

LEADDicomDS1.FindTag (TAG_INSTANCE_CREATOR_UID);
nVR := LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_INSTANCE_CREATOR_UID, nVR, False, 0);
LEADDicomDS1.StringValueCount := 1;
LEADDicomDS1.StringValues [0] := '9.9.9999.9'; //some unique value
LEADDicomDS1.SetStringValue (1);

LEADDicomDS1.FindTag (TAG_PATIENT_NAME);
nVR := LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_PATIENT_NAME, nVR, False, 0);
LEADDicomDS1.StringValueCount := 1;
LEADDicomDS1.StringValues [0] := 'dummy_patient_name';
LEADDicomDS1.SetStringValue (1);

//add the optional fields that we want returned
LEADDicomDS1.FindTag (TAG_PATIENT_ID);
nVR := LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_PATIENT_ID, nVR, False, 0);
LEADDicomDS1.StringValueCount := 1;
LEADDicomDS1.StringValues [0] := 'dummy_patient_id';
LEADDicomDS1.SetStringValue (1);

LEADDicomDS1.FindTag (TAG_PATIENT_BIRTH_DATE);
nVR := LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_PATIENT_BIRTH_DATE, nVR, False, 0);
LEADDicomDS1.DateValueCount := 1;
LEADDicomDS1.DateValues [0].Day := 31;
LEADDicomDS1.DateValues [0].Month := 12;
LEADDicomDS1.DateValues [0].Year := 1999;
LEADDicomDS1.SetDateValue (1);

LEADDicomDS1.FindTag (TAG_PATIENT_SEX);
nVR := LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR;
LEADDicomDS1.InsertElement (False, TAG_PATIENT_SEX, nVR, False, 0);
LEADDicomDS1.StringValueCount := 1;
LEADDicomDS1.StringValues [0] := 'M';
LEADDicomDS1.SetConvertValue();

for x:= 0 to LEADDICOMNet1.GetClientCount (LEADDICOMNet1.hNet) - 1 do
begin
hClient := LEADDICOMNet1.GetClient (LEADDICOMNet1.hNet, x);
hPDU := LEADDICOMNet1.GetAssociate (hClient);
nID := LEADDICOMNet1.FindPresentationAbstract (hPDU, szClass);
if(nID = 0)then
begin
nRet := LEADDicomDS1.FindUID (szClass);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + szClass + ', Not Supported by Association!');
Screen.Cursor:= crDefault;
end;

//now, send the message
LEADDICOMNet1.SendNReportRequest(hClient, nID, 1, szClass, szInstance, 1, LEADDicomDS1.hDicomDS);
end;
end;


SendNSetRequest Example for Delphi

var
nRet: Integer;
strClassUID: String;
strInstance: String;
hPDU: LongInt;
nID: Integer;
strNewID: String;
begin
//this sample allows you to change the patient id of an SOP Instance

//send an N-GET-REQUEST to the server

strClassUID:= InputBox('What class do you wish to set?', 'Set Request', UID_SC_IMAGE_STORAGE);
if(Length(strClassUID) < 1)then
Exit;

strInstance:= InputBox('What instance do you wish to set?', 'Set Request', '1.1.1.1');
if(Length(strInstance) < 1)then
Exit;

strNewID:= InputBox('Enter New Patient ID?', 'Set Request', '123-45-6789');
if(Length(strNewID) < 1)then
Exit;

//create the data set that encodes the changed element(s)
LEADDicomDS1.InitDS (DICOM_CLASS_UNKNOWN, 0);
LEADDicomDS1.ResetDS();

LEADDicomDS1.FindTag (TAG_PATIENT_ID);
LEADDicomDS1.InsertElement (False, TAG_PATIENT_ID, LEADDicomDS1.DefaultInterface.Get_CurrentTag().VR, False, 0);
LEADDicomDS1.StringValueCount:= 1;
LEADDicomDS1.StringValues [0]:= strNewID;
LEADDicomDS1.SetStringValue(1);

hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);

//now, send a request
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');
Exit;
end;

LEADDICOMNet1.SendNSetRequest(LEADDICOMNet1.hNet, nID, 1, strClassUID, strInstance, LEADDicomDS1.hDicomDS);
end;


SendReleaseRequest Example for Delphi

//set called application title
LEADDICOMNet1.SetCalled(LEADDICOMNet1.hPDU, 'Called Program');
//set calling application title
LEADDICOMNet1.SetCalling(LEADDICOMNet1.hPDU, 'Calling Program');
//display the current values
ShowMessage(LEADDICOMNet1.GetCalled(LEADDICOMNet1.hPDU));
ShowMessage(LEADDICOMNet1.GetCalling(LEADDICOMNet1.hPDU));


SetAuthDataISCL Example for Delphi

//Example 1
var
vBuffer: OleVariant;
begin
vBuffer:= 'Server LEAD ISCL';
LEADDICOMNet1.SetAuthDataISCL(LEADDicomNet1.hNet, vBuffer, 16);
end;
//Example 2: Binary Data
var
DataArray: OleVariant;
begin
VarArrayCreate([0, 4], varByte);
DataArray[0]:= $21;
DataArray[1]:= $14;
DataArray[2]:= $0;
DataArray[3]:= $45;
DataArray[4]:= $F4;
LEADDICOMNet1.SetAuthDataISCL(LEADDICOMNet1.hNet, DataArray, 5);
end;


SetBitmapListValue Example for Delphi

Procedure TForm1.TestProcList();
var
nCount: Integer;
nRet: Integer;
IO: LEADRasterIO;
Process: LEADRasterProcess;
begin

IO:= coLEADRasterIO.Create();
Process:= coLEADRasterProcess.Create();

LEADDicomDS1.EnableMethodErrors:= False;

//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the BitmapList Value
nRet:= LEADDicomDS1.FindFirstElement (TAG_PIXEL_DATA, False);
nRet:= LEADDicomDS1.DeleteElement ();
nRet:= LEADDicomDS1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0);

//load an image
IO.Load(LEADRasterView1.Raster, 'd:\lead14\dist\images\image1.cmp', 0, 1, 1);
ShowMessage('Image loaded from File - Wait');

//create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem(0, LEADRasterView1.Raster.Bitmap);
Process.Flip(LEADRasterView1.Raster);
LEADRasterView2.Raster.InsertBitmapListItem(1, LEADRasterView1.Raster.Bitmap);
Process.Reverse(LEADRasterView1.Raster);
LEADRasterView2.Raster.InsertBitmapListItem(2, LEADRasterView1.Raster.Bitmap);

//insert the image list into the element
LEADDicomDS1.BitmapList:= LEADRasterView2.Raster.BitmapList;

//set the bitmap list
nRet:= LEADDicomDS1.SetBitmapListValue(DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
ShowMessage('Image set to Data Set - Wait');

LEADDicomDS1.BitmapList:= 0; //free the value
ShowMessage('ImageList cleared from memory - Wait');

nCount:= LEADDicomDS1.GetBitmapCount ();

//get the bitmap list back
if(nRet = 0)then
begin
gbQuit:= False;
LEADDicomDS1.GetBitmapListValue(0, nCount, 0, ORDER_RGB, 0);
LEADRasterView1.Raster.BitmapList:= LEADDicomDS1.BitmapList;
LEADRasterView1.ForceRepaint();
end;
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('ImageList loaded from Data Set - Wait');
end;


SetBitmapValue Example for Delphi

Procedure TForm1.TestProcBitmap();
var
nRet: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;

//move to the root element
LEADDicomDS1.MoveFirstElement (False);
LEADDicomDS1.MoveRootElement ();

//insert a new element for the Bitmap Value
nRet:= LEADDicomDS1.FindFirstElement (TAG_PIXEL_DATA, False);
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
nRet:= LEADDicomDS1.DeleteElement ();
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
nRet:= LEADDicomDS1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0);
if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;
//load an image
LEADRasterIO1.Load(LEADRasterView1.Raster, 'd:\lead14\dist\images\image1.cmp', 0, 1, 1);
ShowMessage('Image loaded from File - Wait');

//insert the image into the element
LEADDicomDS1.Bitmap:= LEADRasterView1.Raster.Bitmap;
//set the bitmap
nRet:= LEADDicomDS1.SetBitmapValue (DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);

if(nRet <> 0)then
begin
ShowMessage('Error');
Exit;
end;

ShowMessage('Image set to Data Set - Wait');

LEADDicomDS1.Bitmap:= 0; //free the value
ShowMessage('Image cleared from memory - Wait');

//get the bitmap back
if(nRet = 0)then
begin
gbQuit:= False;
LEADDicomDS1.GetBitmapValue (0, 0, ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap:= LEADDicomDS1.Bitmap;
LEADRasterView1.ForceRepaint();
end;
LEADDicomDS1.EnableMethodErrors:= True;
ShowMessage('Image loaded from Data Set - Wait');
end;


SetCalled Example for Delphi

//set called application title
LEADDICOMNet1.SetCalled(LEADDICOMNet1.hPDU, 'Called Program');
//set calling application title
LEADDICOMNet1.SetCalling(LEADDICOMNet1.hPDU, 'Calling Program');
//display the current values
ShowMessage(LEADDICOMNet1.GetCalled(LEADDICOMNet1.hPDU));
ShowMessage(LEADDICOMNet1.GetCalling(LEADDICOMNet1.hPDU));


SetCipherToIndexTLS Example for Delphi

var
nTest: Integer;
begin
LEADDICOMNet1.SetCipherToIndexTLS(LEADDICOMNet1.hNet, 0, DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA);

nTest:= LEADDICOMNet1.GetCipherFromIndexTLS (LEADDICOMNet1.hNet, 0);
if(nTest = DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA)then
ShowMessage('Cipher DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA');
end;


SetClientCertificateTLS Example for Delphi

if(LEADDICOMNet1.SetClientCertificateTLS(LEADDICOMNet1.hNet, 'c:\cert\client.pem', L_TLS_FILETYPE_PEM, '') = DICOM_SUCCESS)then
ShowMessage('Loading client certificate succeeded')
else
ShowMessage('Loading client certificate failed');


SetCommandSet Example for Delphi

SetCommandSet (DICOM Control) Example for Delphi

//we have received a data message
//copy the Command Set so we can examine its elements
LEADDicomDS1.SetCommandSet(hDicomCS);
LEADDicomDS1.FindFirstElement (TAG_COMMAND_FIELD, False);
LEADDicomDS1.GetShortValue (0, 1);
ShowMessage('Command Field = 0x' + IntToStr(LEADDicomDS1.ShortValues [0]));


SetCurrentElement Example for Delphi

var
nCount: Integer;
begin
LEADDicomDS1.EnableMethodErrors:= False;
//get total number of images in this Data Set
LEADDicomDS1.SetCurrentElement (0);
nCount:= LEADDicomDS1.GetBitmapCount ();
ShowMessage('Total: ' + IntToStr(nCount));
//move to last image tag in the Data Set
LEADDicomDS1.FindLastElement (TAG_PIXEL_DATA, False);
//get total number of images in this tag
nCount:= LEADDicomDS1.GetBitmapCount ();
ShowMessage('This tag: ' + IntToStr(nCount));
end;


SetDefaultEncryptionISCL Example for Delphi

LEADDICOMNet1.SetDefaultEncryptionISCL (LEADDICOMNet1.hNet, DICOM_ISCL_ENCRYPT_DESCBC);


SetDefaultSigningISCL Example for Delphi

LEADDICOMNet1.SetDefaultSigningISCL (LEADDICOMNet1.hNet, DICOM_ISCL_MAC_NONE);


SetEncryptKeyISCL Example for Delphi

Key64 = Packed Record
Value: Int64;
end;

procedure TForm1.SetEncryptKeyISCLClick(Sender: TObject);
var
key: Key64;
begin
// use a 64 bit key value of 0123456789ABCDEF hex.
key.Value:= $0123456789ABCDEF;
LEADDICOMNet1.SetEncryptKeyISCL (LEADDICOMNet1.hNet, 1, key.Value);
LEADDICOMNet1.SetIndexForEncryptISCL(LEADDICOMNet1.hNet, 1);
ShowMessage('Index value is: ' + IntToStr(LEADDICOMNet1.GetIndexForEncryptISCL(LEADDICOMNet1.hNet)));
end;


SetMaxCommBlockLengthISCL Example for Delphi

var
nBlockLen: Integer;
begin
LEADDICOMNet1.NetworkSecurityMode:= Integer(DICOM_SECURE_ISCL);
LEADDICOMNet1.StartUp ();
LEADDICOMNet1.SetMaxCommBlockLengthISCL (LEADDICOMNet1.hNet, 8160);
// size of the blocks sent to network layer will be 8192 bytes (a 32-byte header is added)
// other initializations...
LEADDICOMNet1.DefaultInterface.Connect ('', 0, '127.0.0.1', 2761);
//connect to a server running on local computer at port 2761

nBlockLen:= LEADDICOMNet1.GetCommBlockLengthISCL(LEADDICOMNet1.hNet);
ShowMessage('Negotiated communication block size is' + IntToStr(nBlockLen));
end;


SetMaxMessageLengthISCL Example for Delphi

LEADDICOMNet1.SetMaxMessageLengthISCL(LEADDICOMNet1.hNet, 1048576);
// size of the message accepted is at most 1 MB - or 1048576 bytes


SetMutualAuthAlgISCL Example for Delphi

LEADDICOMNet1.SetMutualAuthAlgISCL (LEADDICOMNet1.hNet, DICOM_ISCL_MUTUAL_AUTH_3P4W);


SetMutualAuthKeyISCL Example for Delphi

Key64 = Packed Record
Value: Int64;
end;

procedure TForm1.SetMutualAuthKeyISCL Click(Sender: TObject);
var
key: Key64;
begin
// use a 64 bit key value of 0123456789ABCDEF hex.
key.Value:= $0123456789ABCDEF;
LEADDICOMNet1.SetMutualAuthKeyISCL (LEADDICOMNet1.hNet, 1, key.Value);
LEADDICOMNet1.SetIndexForMutualAuthISCL (LEADDICOMNet1.hNet, 1);
ShowMessage('Index value is: ' + IntToStr(LEADDICOMNet1.GetIndexForMutualAuthISCL(LEADDICOMNet1.hNet)));
end;


SetRequest Example for Delphi

//set associate as Accept
if(LEADDICOMNet1.hPDU <> 0)then
LEADDICOMNet1.SetRequest (LEADDICOMNet1.hPDU, False);


SetServerCertificateTLS Example for Delphi

if(LEADDICOMNet1.SetServerCertificateTLS (LEADDICOMNet1.hNet, 'c:\cert\Server.pem', L_TLS_FILETYPE_PEM, '') = DICOM_SUCCESS)then
ShowMessage('Loading Server certificate succeeded')
else
ShowMessage('Loading Server certificate failed');


SetTagName Example for Delphi

LEADDicomDS1.EnableMethodErrors:= True;
//move to the selected Tag
LEADDicomDS1.FindIndexTag (13);
//change the name
LEADDicomDS1.SetTagName ('New Tag Name');


Setting an overlay bitmap list Example for Delphi

LEADDicomDS1.OverlayBitmapList:= LEADRasterView1.Raster.BitmapList;
LEADDicomDS1.SetOverlayBitmapList (0, 0);


Setting modality LUT data and attributes Example for Delphi

// This example will set Rescale Intercept (0028,1052)
// element to -128.0 and Rescale Slope (0028,1053)
// element to 1.0

var
// Object that will hold modality LUT attributes
ModalityLUTAttributes: LModalityLUTAttributes;
nRet: Integer;
Data: OleVariant;
begin
ModalityLUTAttributes:= LEADDicomDS1.ModalityLUTAttributes;
//No Modality LUT Sequence (0028,3000)
ModalityLUTAttributes.IsModalityLUTSequence:= False;
//Yes there is a rescale slope and intercept
ModalityLUTAttributes.IsRescaleSlopeIntercept:= True;
ModalityLUTAttributes.RescaleIntercept:= -128;
ModalityLUTAttributes.RescaleSlope:= 1;
ModalityLUTAttributes.RescaleType:= 'UNSPECIFIED';
// Delete the existing modality LUT,
// although we don//t have to !
LEADDicomDS1.DeleteModalityLUT (0);
//Set rescale slope and intercept
nRet:= LEADDicomDS1.SetModalityLUT (Data, 0);
ShowMessage(IntToStr(nRet));
end;


Setting palette color LUT data and attributes Example for Delphi

//This example will set the attributes and the data for a
//Palette Color Lookup Table
var
nLUTIndex: Integer;
nRet: Integer;
RedLUTData: Array of Integer;
GreenLUTData: Array of Integer;
BlueLUTData: Array of Integer;
PaletteColorLUTAttributes: LPaletteColorLUTAttributes;
begin
PaletteColorLUTAttributes:= LEADDicomDS1.PaletteColorLUTAttributes;

// Initialize Red Palette Color Lookup Table Descriptor (0028,1101)
PaletteColorLUTAttributes.RedLUTDescriptorFirstMapped:= 0;
PaletteColorLUTAttributes.RedLUTDescriptorEntryBits:= 16;
PaletteColorLUTAttributes.RedLUTDescriptorNumberOfEntries:= $10000;

// Initialize Green Palette Color Lookup Table Descriptor (0028,1102)
PaletteColorLUTAttributes.GreenLUTDescriptorFirstMapped:= 0;
PaletteColorLUTAttributes.GreenLUTDescriptorEntryBits:= 16;
PaletteColorLUTAttributes.GreenLUTDescriptorNumberOfEntries:= $10000;

// Initialize Blue Palette Color Lookup Table Descriptor (0028,1103)
PaletteColorLUTAttributes.BlueLUTDescriptorFirstMapped:= 0;
PaletteColorLUTAttributes.BlueLUTDescriptorEntryBits:= 16;
PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries:= $10000;

SetLength(RedLUTData, PaletteColorLUTAttributes.RedLUTDescriptorNumberOfEntries);
SetLength(GreenLUTData, PaletteColorLUTAttributes.GreenLUTDescriptorNumberOfEntries);
SetLength(BlueLUTData, PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries);

for nLUTIndex:= 0 to (PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries - 1) do
begin
RedLUTData[nLUTIndex]:= nLUTIndex;
GreenLUTData[nLUTIndex]:= Trunc(nLUTIndex / 2);
BlueLUTData[nLUTIndex]:= Trunc(nLUTIndex / 4);
end;
// Delete all the elements that describe the 'Palette Color Lookup Table'.
nRet:= LEADDicomDS1.DeletePaletteColorLUT(0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
// Set the new 'Palette Color Lookup Table' attributes
nRet:= LEADDicomDS1.SetPaletteColorLUTAttributes (0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
// Set Red Palette Color Lookup Table Data
nRet:= LEADDicomDS1.SetPaletteColorLUTData (RedLUTData, DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
// Set Green Palette Color Lookup Table Data
nRet:= LEADDicomDS1.SetPaletteColorLUTData (GreenLUTData, DICOM_PALETTE_COLOR_LUT_TYPE_GREEN, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
End;
// Set Blue Palette Color Lookup Table Data
nRet:= LEADDicomDS1.SetPaletteColorLUTData (BlueLUTData, DICOM_PALETTE_COLOR_LUT_TYPE_BLUE, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
end;


Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for Delphi

// This function will store the overlays associated
// with a bitmap handle inside the DICOM dataset
var
OverlayAttributesDS: LEADOverlayAttributes;
OverlayAttributesRaster: LEADOverlayAttributes;
OverlayCount: LongInt;
OverlayIndex: LongInt;
nRet: Integer;
Process: LEADRasterProcess;
begin
Process:= CoLEADRasterProcess.Create();

Process.EnableMethodErrors:= False;

// Do we have any overlays at all?
OverlayCount:= Process.GetOverlayCount (LEADRasterView1.Raster, 0);
// If no overlays just exit sub
if(OverlayCount = 0)then
begin
ShowMessage('error');
Exit;
end;
// Blow away all the overlays in the file
for OverlayIndex:= 0 to OverlayCount - 1 do
LEADDicomDS1.DeleteOverlay(OverlayIndex, 0);

OverlayAttributesDS:= LEADDicomDS1.OverlayAttributes;
// Loop through the overlays and add them into the DICOM file
for OverlayIndex:= 0 to OverlayCount - 1 do
begin
// Get overlay attributes
nRet:= Process.GetOverlayAttributes (LEADRasterView1.Raster, OverlayIndex, OVERLAYATTRIBUTES_ORIGIN Or OVERLAYATTRIBUTES_FLAGS Or OVERLAYATTRIBUTES_BITINDEX Or OVERLAYATTRIBUTES_DICOM);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;

OverlayAttributesRaster:= Process.OverlayAttributes;
OverlayAttributesDS.OriginX:= OverlayAttributesRaster.OriginX;
OverlayAttributesDS.OriginY:= OverlayAttributesRaster.OriginY;
OverlayAttributesDS.Flags:= OverlayAttributesRaster.Flags;
OverlayAttributesDS.Color:= OverlayAttributesRaster.Color;
OverlayAttributesDS.BitPosition:= OverlayAttributesRaster.BitPosition;
OverlayAttributesDS.Rows:= OverlayAttributesRaster.Rows;
OverlayAttributesDS.Columns:= OverlayAttributesRaster.Columns;
OverlayAttributesDS.type_:= OverlayAttributesRaster.type_;
OverlayAttributesDS.BitsAllocated:= OverlayAttributesRaster.BitsAllocated;
OverlayAttributesDS.Subtype:= OverlayAttributesRaster.Subtype;
OverlayAttributesDS.Label_:= OverlayAttributesRaster.Label_;
OverlayAttributesDS.ROIArea:= OverlayAttributesRaster.ROIArea;
OverlayAttributesDS.ROIMean:= OverlayAttributesRaster.ROIMean;
OverlayAttributesDS.ROIStandardDeviation:= OverlayAttributesRaster.ROIStandardDeviation;
OverlayAttributesDS.NumberFramesInOverlay:= OverlayAttributesRaster.NumberFramesInOverlay;
OverlayAttributesDS.ImageFrameOrigin:= OverlayAttributesRaster.ImageFrameOrigin;
OverlayAttributesDS.ActivationLayer:= OverlayAttributesRaster.ActivationLayer;
OverlayAttributesDS.Description:= OverlayAttributesRaster.Description;

// Set overlay attributes inside DICOM
nRet:= LEADDicomDS1.SetOverlayAttributes (OverlayIndex, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
// burn overlays which need to be part of the image
if((OverlayAttributesRaster.Flags And OVERLAY_USEBITPLANE)=OVERLAY_USEBITPLANE)then
begin
nRet:= Process.UpdateOverlayBits(LEADRasterView1.Raster, OverlayIndex, SETOVERLAYBITS_FROMOVERLAY);
if(nRet <> 0)then
ShowMessage('error');
end;

// Get the overlay data (if it//s not part of the image)
LEADRasterView2.Raster.Free();
nRet:= Process.GetOverlayBitmap (LEADRasterView1.Raster, OverlayIndex, LEADRasterView2.Raster, OVERLAY_COPY);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
// Set overlay data into DICOM
LEADDicomDS1.OverlayBitmap:= LEADRasterView2.Raster.Bitmap;
nRet:= LEADDicomDS1.SetOverlayBitmap (OverlayIndex, 0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
end;
end;


SetUIDName Example for Delphi

LEADDicomDS1.EnableMethodErrors:= True;

//move to the selected UID
LEADDicomDS1.FindIndexUID (13);
//change the name
LEADDicomDS1.SetUIDName ('New UID Name');


SetVRName Example for Delphi

var
nIndex: Integer;
begin
nIndex:= 13;
LEADDicomDS1.EnableMethodErrors:= True;

//move to the selected VR
LEADDicomDS1.FindIndexVR (nIndex);
//change the name
LEADDicomDS1.SetVRName ('New VR Name');

ShowMessage('New Name = ' + LEADDicomDS1.DefaultInterface.Get_CurrentVR ().Name);
end;


StartUp Example for Delphi

var
nRet: Integer;
begin
//start the network
//set the temporary file path
LEADDICOMNet1.NetworkTempPath:= 'd:\temp';
LEADDICOMNet1.NetworkSecurityMode:= DICOM_SECURE_NONE;
nRet:= LEADDICOMNet1.StartUp ();
if(nRet <> 0)then
ShowMessage('Error');
//do some network communication here
//...
//...

//shut down the network
LEADDICOMNet1.ShutDown ();
end;


Version Example for Delphi

// check the Associate Class version
ShowMessage('Version: ' + IntToStr(LEADDICOMNet1.GetVersion (LEADDICOMNet1.hPDU)));
//set the version
LEADDICOMNet1.SetVersion (LEADDICOMNet1.hPDU, 99);
ShowMessage('Version: ' + IntToStr(LEADDICOMNet1.GetVersion (LEADDICOMNet1.hPDU)));


Examples for VB.NET Programmers

You can test any of the following examples by adding a command button and pasting the sample code in the Click procedure.

Adding a DICOM Data Set to a DICOM Directory for VB.NET

CreateObject Example for VB.NET

Creating a DICOM Directory for VB.NET

Loading a DICOM Directory for VB.NET

Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control for VB.NET

Using the DicomFileInsert Event for VB.NET

Performing Basic Print Management Example for VB.NET

Performing Pull Stored Print Management Example for VB.NET

Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport Example for VB.NET

Getting Printer Information Example for VB.NET

Getting Printer Configuration Information Example for VB.NET

Getting Print Job Information Example for VB.NET

Loading a Data Set

Miscellaneous Examples


Adding a DICOM Data Set to a DICOM Directory for VB.NET

'LEADDicomDS is a DICOM Dataset defined outside this method
Private Sub AddingDICOMDataSetToDICOMDirectory()
' The following code snippet demonstrates how to use the LEADTOOLS DICOM
' DS COM Object (ILEADDicomDS) to load a Data Set and then add it to a
' DICOM Directory
Dim DicomDir As New LTDICDIRLib.LEADDicomDir

' Set the destination folder
DicomDir.ResetDicomDir("C:\Medical Images")

' Load a Data Set and add it to the Directory
If LEADDicomDS.LoadDS("C:\Medical Images\Image", 0) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
DicomDir.InsertDicomDS(LEADDicomDS.hDicomDS, "C:\Medical Images\Image")

' Save the DICOMDIR File
DicomDir.SaveDicomDir()
End If
End Sub


CreateObject Example for VB.NET

Private Sub TestCreateObject()
'CreateObject Example
'this sample will dynamically create a LEAD Dicom Kernel
'object and use it to unlock DICOM support
Dim factory As New LTDicomKernelLib.LEADDicomFactory
Dim kernel As LTDicomKernelLib.LEADDicomKernel
Dim szLic As String

szLic = "LEADTOOLS OCX Copyright (c) 1991-2005 LEAD Technologies, Inc."
kernel = factory.CreateObject("LEADDicomKernel.LEADDicomKernel", szLic)
kernel.EnableMethodErrors = False
kernel.UnlockSupport(LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_DICOM, "MyUnlockKey")
If (kernel.IsSupportLocked(LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_DICOM)) Then
MessageBox.Show("Unlock Failed!")
End If
End Sub


Creating a DICOM Directory for VB.NET

Private Sub CreateDicomDirectory()
Dim L_KEY_MEDICAL As String = ""
Dim DicomDir As New LTDICDIRLib.LEADDicomDir
Dim DicomFactory As New LTDicomKernelLib.LEADDicomFactory
Dim DicomKernel As LTDicomKernelLib.LEADDicomKernel
Dim strLic As String

strLic = "LEADTOOLS OCX Copyright (c)" & " 1991-2005 LEAD Technologies, Inc."
DicomKernel = DicomFactory.CreateObject("LEADDicomKernel.LEADDicomKernel", strLic)

DicomKernel.UnlockSupport(LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL, L_KEY_MEDICAL)
If DicomKernel.IsSupportLocked(LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL) Then
MessageBox.Show("Medical Support must be unlocked for this demo!", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If

' Set the destination folder
DicomDir.ResetDicomDir("C:\Medical Images\Patient 1")

' If it is desired to change the Implementation Class UID and
' the Implementation Version Name...
DicomDir.ImplementationClassUID = "1.2.840.114257.0.1"
DicomDir.ImplementationVersionName = "LEADTOOLS 14.5"

' Set the File-set Identifier
DicomDir.SetFileSetID("SOME ID")

' We need icon images to be added
DicomDir.InsertIconImageSequence = True

' Don't allow invalid File IDs
DicomDir.RejectInvalidFileID = True

' Set the File-set descriptor file
DicomDir.SetDescriptorFile("C:\Medical Images\Patient 1\ReadMe", "")

' Enable generating runtime exceptions
DicomDir.EnableMethodErrors = True

' Add some DICOM files to the Directory
DicomDir.InsertDicomFile("C:\Medical Images\Patient 1\Image1")
DicomDir.InsertDicomFile("C:\Medical Images\Patient 1\Image2")
DicomDir.InsertDicomFile("C:\Medical Images\Patient 1\Image3")

' Disable generating runtime exceptions
DicomDir.EnableMethodErrors = False

' Save the DICOMDIR File
DicomDir.SaveDicomDir()

End Sub


Getting Print Job Information Example for VB.NET

Private Sub GetPrintJobInfo(ByRef objPrintSCU As LTDICPRNSCULib.LEADDicomPrintSCU, ByRef sPrintJobInstanceUID As String)
With objPrintSCU.PrintJob
' We need only the Execution Status and Execution Status Info
.RequiredInfo = LTDICPRNSCULib.PrintJobInfoAttribEnum.PJ_EXECUTION_STATUS + LTDICPRNSCULib.PrintJobInfoAttribEnum.PJ_EXECUTION_STATUS_INFO

' Query the Print SCP for the Print Job information
If .GetInfo(sPrintJobInstanceUID) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
' Display the retrieved information
MessageBox.Show("Execution Status: " & .ExecutionStatus & vbNewLine & "Execution Status Info: " & .ExecutionStatusInfo, "Print Job Info")
End If
End With
End Sub


Getting Printer Configuration Information Example for VB.NET

Private Sub GetPrinterConfigInfo(ByRef objPrintSCU As LTDICPRNSCULib.LEADDicomPrintSCU)
' Assume that the Association is already established
' Query the Print SCP for the printer configuration information
Dim sMsg As String
Dim Attrib As LTDICPRNSCULib.LAttribute

With objPrintSCU.PrinterConfiguration
If .Get() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
' We will display only the Attributes of the first Printer Configuration Item
If .PrinterConfigItems.Count > 0 Then
For Each Attrib In .PrinterConfigItems.Item(0).Attributes
sMsg = sMsg & Attrib.Name & ": " & Attrib.Value & vbNewLine
Next Attrib
MessageBox.Show(sMsg, "Printer Config Info")
End If
End If
End With
End Sub


Getting Printer Information Example for VB.NET

Private Sub GetPrinterInfo(ByRef objPrintSCU As LTDICPRNSCULib.LEADDicomPrintSCU)
' Assume that the Association is already established
With objPrintSCU.Printer
' We need only the Printer Status and Printer Status Info
.RequiredInfo = LTDICPRNSCULib.PrinterInfoAttribEnum.PRN_PRINTER_STATUS + LTDICPRNSCULib.PrinterInfoAttribEnum.PRN_PRINTER_STATUS_INFO
' Query the Print SCP for the information
If .GetInfo() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
' Display the retrieved information
MessageBox.Show("Printer Status: " & .PrinterStatus & vbNewLine & "Printer Status Info: " & .PrinterStatusInfo, "Printer Info")
End If
End With
End Sub


InsertKey Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestInsertKey ()
Dim x As Short

LEADDICOM1.ResetDS()
LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN, 0)

'insert some keys
LEADDICOM1.InsertKey("PATIENT", True)
'insert PATIENT level key
LEADDICOM1.InsertKey("STUDY", True)
'insert STUDY level key

'insert 5 SERIES level keys and some data
For x = 1 To 5
LEADDICOM1.StringValueCount = 1
LEADDICOM1.InsertKey("SERIES", True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.StringValues(0) = CStr(x)
LEADDICOM1.SetStringValue(1)
LEADDICOM1.MoveParentElement()
LEADDICOM1.MoveParentKey()
'move back up one level
Next

'move to root key
LEADDICOM1.MoveRootKey()
'PATIENT level
MessageBox.Show(LEADDICOM1.GetKeyValue)

'move to SERIES level
LEADDICOM1.MoveChildKey()
'STUDY
LEADDICOM1.MoveChildKey()
'SERIES

'find first SERIES
LEADDICOM1.FindFirstKey("SERIES", True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.GetStringValue(0, 1)
MessageBox.Show(LEADDICOM1.StringValues(0))

'find next series
LEADDICOM1.FindNextKey(True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.GetStringValue(0, 1)
MessageBox.Show(LEADDICOM1.StringValues(0))

'find last SERIES
LEADDICOM1.FindLastKey("SERIES", True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.GetStringValue(0, 1)
MessageBox.Show(LEADDICOM1.StringValues(0))

'find previous SERIES
LEADDICOM1.FindPrevKey(True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.GetStringValue(0, 1)
MessageBox.Show(LEADDICOM1.StringValues(0))

'find last SERIES and delete it
LEADDICOM1.FindLastKey("SERIES", True)
LEADDICOM1.DeleteKey()

'move to root key
LEADDICOM1.MoveFirstKey(False)
MessageBox.Show(LEADDICOM1.GetKeyValue)

'move to SERIES level
LEADDICOM1.MoveChildKey()
'STUDY
LEADDICOM1.MoveChildKey()
'SERIES

'move to first SERIES
LEADDICOM1.MoveFirstKey(True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.GetStringValue(0, 1)
MessageBox.Show(LEADDICOM1.StringValues(0))

'move to next series
LEADDICOM1.MoveNextKey(True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.GetStringValue(0, 1)
MessageBox.Show(LEADDICOM1.StringValues(0))

'move to last SERIES
LEADDICOM1.MoveLastKey(True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.GetStringValue(0, 1)
MessageBox.Show(LEADDICOM1.StringValues(0))

'move to previous SERIES
LEADDICOM1.MovePrevKey(True)
LEADDICOM1.MoveChildElement()
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID, True)
LEADDICOM1.GetStringValue(0, 1)
MessageBox.Show(LEADDICOM1.StringValues(0))
End Sub


Loading a Data Set (Visual Basic)

Loading a Data Set (VB.NET)

Take the following steps to start a project and to add some code that loads a DICOM Data Set and prints information about the data set:

1. | Start Visual Studio .NET.
3. | Add the LEAD COM Objects to your project.
 | On the Tools pull-down menu, use the Add/Remove Toolbox Items... option, select the COM Components Tab, then select the LEAD Raster View Control (14.0).
 | On the Project pull-down menu, use the Add Reference... option, select the COM Tab, then select the following: LEAD Raster Object Library (14.0) LEAD Raster Variant Object Library (14.0 LEAD Raster Process Object Library (14.0) LEAD Raster IO Object Library (14.0) LEAD DICOM Kernel COM Object Library (14.0) LEAD DICOM DS COM Object Library (14.0).
4. | Select the LEAD Raster View Control, then add the control to your main form.
5. | Add a button to your form and name it as follows:
 | Name | Text
 | LoadImage | Load Image
6. | Add the following initialization code to the main form's Load event handler. In online help, you can use the Edit pull-down menu to copy the block of code.

'class data-members
Private WithEvents LEADDICOM1 As LEADDicomDS

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Unlock DICOM support.
'Note that this is a sample key, which will not work in your toolkit.
Dim Factory As New LTDicomKernelLib.LEADDicomFactory
Dim DicomKernel As LTDicomKernelLib.LEADDicomKernel
Dim szLic As String

szLic = "LEADTOOLS OCX Copyright (c) 1991-2005 LEAD Technologies, Inc." Factory = CreateObject("LEADDicomFactory.LEADDicomFactory")
DicomKernel = Factory.CreateObject("LEADDicomKernel.LEADDicomKernel", szLic)
LEADDICOM1 = Factory.CreateObject("LEADDicomDS.LEADDicomDS", szLic)

DicomKernel.UnlockSupport(LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL, "TestKey")

End Sub

6.

Code the LoadImage button's click event handler as follows:

Private Sub LoadImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadImage.Click

Dim nRet As Short
Dim lCount As Short
Dim result As Boolean

LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.LoadDS("D:\lead14\dist\images\dicom\image1.dic", 0)
If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
MessageBox.Show("Error " & CStr(nRet) & " loading file!")
End If
lCount = LEADDICOM1.GetModuleCount
LEADDICOM1.FindIndexModule(0)
result = LEADDICOM1.SetCurrentElement(LEADDICOM1.CurrentModule.Element(0).hElement)
If (result = True) Then
MessageBox.Show("There are " & CStr(lCount) & " modules in this data set." & (Chr(13)) & "The first module has " & CStr(LEADDICOM1.CurrentModule.ElementCount) & " elements." & (Chr(13)) & "The first element has: " & (Chr(13)) & "Tag number:" & Hex(LEADDICOM1.CurrentElement.Tag) & (Chr(13)) & "VR: " & Hex(LEADDICOM1.CurrentElement.VR))
End If

LEADDICOM1.EnableMethodErrors = True

End Sub

7. | Run your program to test it.
8. | Save the project to use as a starting point for other tasks in this tutorial.


Loading a DICOM Directory for VB.NET

Private Sub TestLoadingDicomDir()
Dim DicomDir As New LTDICDIRLib.LEADDicomDir

' Load a DICOMDIR File. Note: It is necessary to specify
' DS_LOAD_CLOSE so that we can save the Directory later.
DicomDir.LoadDicomDir("C:\Medical Images\DICOMDIR", LTDICLib.DicomDataSetFlags.DS_LOAD_CLOSE)

' Add some additional DICOM files to the loaded Directory
DicomDir.InsertDicomFile("C:\Medical Images\Image")
DicomDir.InsertDicomFile("C:\Medical Images\Patient 2\Image1")

' Save the DICOMDIR File
DicomDir.SaveDicomDir()
End Sub


Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control for VB.NET

'LEADDicomDS is a DICOM Dataset defined outside this method
Private Sub TestManipulatingDataSetUsingLEADTOOLSDICOMOCXControl()

' The following code snippet demonstrates how to use the LEADTOOLS DICOM
' DS COM Object (ILEADDicomDS) to get the Value of the Implementation Class
' UID element of a DICOM Directory

Dim DicomDir As New LTDICDIRLib.LEADDicomDir
Dim nRetValue As Short

' Load a DICOMDIR File
nRetValue = DicomDir.LoadDicomDir("C:\Medical Images\DICOMDIR", LTDICLib.DicomDataSetFlags.DS_LOAD_CLOSE)

If nRetValue = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
LEADDicomDS.hDicomDS = DicomDir.hDicomDirDS
nRetValue = LEADDicomDS.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_IMPLEMENTATION_CLASS_UID, False)
If nRetValue = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
LEADDicomDS.GetConvertValue()

' Display the value of the element
MessageBox.Show(LEADDicomDS.StringValues(0))

LEADDicomDS.StringValueCount = 0
End If
End If
End Sub


Performing Basic Print Management Example for VB.NET

Private Sub PerformBasicPM()
Dim objPrintSCU As New LTDICPRNSCULib.LEADDicomPrintSCU
objPrintSCU.Timeout = 60 ' 60 seconds
objPrintSCU.EnableMethodErrors = False
' Establish the Association
Dim nRet As Short
nRet = objPrintSCU.Associate("10.0.2.20", 7104, "PrintSCP", "PrintSCU", LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS + LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS + LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS + LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS + LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRESENTATION_LUT_SOP_CLASS + LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINT_JOB_SOP_CLASS + LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS)
If nRet = LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED Then
MessageBox.Show("Source = " & objPrintSCU.AssociateRejectSource & ", " & "Reason = " & objPrintSCU.AssociateRejectReason, "Association Request was Rejected")
Exit Sub
ElseIf nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("Error code: " & nRet, "Failed to Establish the Association")
Exit Sub
End If
' Abort the Association if none of the Basic Print Management Meta SOP Classes
' is supported on the Association
If objPrintSCU.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS) = False And objPrintSCU.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS) = False Then
objPrintSCU.AbortAssociation()
Exit Sub
End If
' Display some printer info
'GetPrinterInfo objPrintSCU
' Display some printer configuration info
'GetPrinterConfigInfo objPrintSCU
' Create a Film Session
With objPrintSCU.FilmSession
.IncludedParameters = 0
.Create()
MessageBox.Show(.SOPInstanceUID, "Film Session SOP Instance UID")
End With
' Update the Number of Copies and Print Priority of the Film Session
With objPrintSCU.FilmSession
.IncludedParameters = LTDICPRNSCULib.FilmSessionParameterEnum.FS_NUMBER_OF_COPIES + LTDICPRNSCULib.FilmSessionParameterEnum.FS_PRINT_PRIORITY
.NumberOfCopies = 1
.PrintPriority = "MED"
.Update()
End With
With objPrintSCU.FilmBox
.IncludedParameters = 0
If .MainObject.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS) Then
.IncludedParameters = .IncludedParameters + LTDICPRNSCULib.FilmBoxParameterEnum.FB_ANNOTATION_DISPLAY_FORMAT_ID
.AnnotationDisplayFormatID = "SomeID"
End If
' Create a Film Box
.Create()
MessageBox.Show(.SOPInstanceUID, "Film Box SOP Instance UID")
End With
Dim sPresLUTInstanceUID As String
' Create a Presentation LUT
With objPrintSCU.PresentationLUT
If .MainObject.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRESENTATION_LUT_SOP_CLASS) Then
If .Create("C:\PresLUT.dic") = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
sPresLUTInstanceUID = .GetSOPInstanceUID()
MessageBox.Show(sPresLUTInstanceUID, "Pres LUT SOP Instance UID")
End If
End If
End With
If Len(sPresLUTInstanceUID) Then
' Update the Film Box to reference the Presentation LUT we just created
With objPrintSCU.FilmBox
.IncludedParameters = LTDICPRNSCULib.FilmBoxParameterEnum.FB_REF_PRES_LUT_INSTANCE_UID
.RefPresLUTInstanceUID = sPresLUTInstanceUID
.Update()
End With
End If
Dim sOverlayBoxInstanceUID As String
' Create an Image Overlay Box
With objPrintSCU.ImageOverlayBox
If .MainObject.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS) Then
.OverlayOriginRow = 1
.OverlayOriginColumn = 1
.IncludedParameters = 0
If .Create("C:\Overlay.dic") = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
sOverlayBoxInstanceUID = .GetSOPInstanceUID()
MessageBox.Show(sOverlayBoxInstanceUID, "Image Overlay Box SOP Instance UID")
End If
End If
End With
' Update the Image Box. Since the Image Display Format of the Film Box was
' set to "STANDARD\1,1", then we are supposed to have one Image Box created
' by the Print SCP.
If objPrintSCU.ImageBoxes.Count Then
With objPrintSCU.ImageBoxes.Item(0)
MessageBox.Show(.SOPInstanceUID, "Image Box SOP Instance UID")
.IncludedParameters = 0
If Len(sOverlayBoxInstanceUID) Then
.IncludedParameters = .IncludedParameters + LTDICPRNSCULib.ImageBoxParameterEnum.IB_REF_IMAGE_OVERLAY_BOX_INSTANCE_UID .RefImageOverlayBoxInstanceUID = sOverlayBoxInstanceUID
End If
.Update("C:\Image.dic")
End With
End If
' Update the Annotation Boxes (if there are any)
Dim AnnBox As LTDICPRNSCULib.LAnnotationBox
For Each AnnBox In objPrintSCU.AnnotationBoxes
AnnBox.TextString = "Some Text"
AnnBox.Update()
Next AnnBox
' Change the Overlay Origin of the Image Overlay Box referenced by the
' Image Box
If Len(sOverlayBoxInstanceUID) Then
With objPrintSCU.ImageOverlayBox
.IncludedParameters = LTDICPRNSCULib.OverlayBoxParameterEnum.OB_OVERLAY_ORIGIN
.OverlayOriginRow = 10
.OverlayOriginColumn = 10
.Update(sOverlayBoxInstanceUID)
End With
End If
Dim sPrintJobInstanceUID As String
' Print the Film Session (or the Film Box; there is no difference since we
' have a single Film Box in the Film Session)
If True Then
With objPrintSCU.FilmSession
.PrintSession()
sPrintJobInstanceUID = .PrintJobSOPInstanceUID
End With
Else
With objPrintSCU.FilmBox
.PrintBox()
sPrintJobInstanceUID = .PrintJobSOPInstanceUID
End With
End If
' Display some info about the Print Job
If (objPrintSCU.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINT_JOB_SOP_CLASS)) Then
'GetPrintJobInfo objPrintSCU, sPrintJobInstanceUID
End If
' Delete the Film Box (anyway, it would be deleted when the Film Session
' is deleted)
objPrintSCU.FilmBox.Delete()
' Delete the Film Session
objPrintSCU.FilmSession.Delete()
' Delete the Presentation LUT
If Len(sPresLUTInstanceUID) Then
objPrintSCU.PresentationLUT.Delete(sPresLUTInstanceUID)
End If
' Delete the Image Overlay Box
If Len(sOverlayBoxInstanceUID) Then
objPrintSCU.ImageOverlayBox.Delete(sOverlayBoxInstanceUID)
End If
' Release the Association and close the connection
objPrintSCU.ReleaseAssociation()
End Sub


Performing Pull Stored Print Management Example for VB.NET

Private Sub PerformPullStoredPM()
Dim objPrintSCU As New LTDICPRNSCULib.LEADDicomPrintSCU
' Establish the Association
Dim nRet As Short
nRet = objPrintSCU.Associate("10.0.2.20", 7104, "PrintSCP", "PrintSCU", LTDICPRNSCULib.DicomClassEnum.PRNSCU_PULL_STORED_PM_META_SOP_CLASS + LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINT_JOB_SOP_CLASS + LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS)
If nRet = LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED Then
MessageBox.Show("Source = " & objPrintSCU.AssociateRejectSource & ", " & "Reason = " & objPrintSCU.AssociateRejectReason, "Association Request was Rejected")
Exit Sub
ElseIf nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("Error code: " & nRet, "Failed to Establish the Association")
Exit Sub
End If
' Display some printer info
'GetPrinterInfo objPrintSCU
' Display some printer configuration info
'GetPrinterConfigInfo objPrintSCU
With objPrintSCU.PullPrintRequest
' A referenced Stored Print Storage SOP Instance
.RemoveAllStoredPrintItems()
.AddStoredPrintItem("SomeAE", "1.2.840.114257.254.7638.6787", "1.2.840.114257.945.5676.5674", "1.2.840.114257.23.2343.3489", "SomeID")
' Ask the Print SCP to create a Pull Print Request SOP Instance
.IncludedParameters = LTDICPRNSCULib.PullPrintRequestParameterEnum.PPR_NUMBER_OF_COPIES
.NumberOfCopies = 1
.Create()
MessageBox.Show(.SOPInstanceUID, "Pull Print Request SOP Instance UID")
' Print the session
.PrintSession()
' Display some info about the Print Job
If .MainObject.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINT_JOB_SOP_CLASS) Then
'GetPrintJobInfo objPrintSCU,
.PrintJobSOPInstanceUID
End If
' Ask the Print SCP to delete the Pull Print Request SOP Instance
.Delete()
End With
' Release the Association and close the connection
objPrintSCU.ReleaseAssociation()
End Sub


Using the DicomFileInsert Event for VB.NET

Private WithEvents DicomDir As LTDICDIRLib.LEADDicomDir
Private Sub DicomDir_DicomFileInsert(ByVal
 bstrFileName As String, ByVal hDicomDS As Integer, ByVal nStatus As Short,
 ByRef pReturnVal As Short)
Dim Buffer As String
Dim Result As DialogResult
If nStatus = LTDicomKernelLib.DicomErrorCodes.DICOMDIR_INSERTDICOMFILE_PREADD
 Then
Buffer = "About to add the file
 """ & bstrFileName & """."
 & vbCrLf & vbCrLf & "Proceed?"
Result = MessageBox.Show(Buffer, "DICOM
 Directory Sample", MessageBoxButtons.YesNoCancel)
If Result = DialogResult.No Then
pReturnVal = LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_FORMAT '
 Skip the file
Exit Sub
ElseIf Result = DialogResult.Cancel Then
pReturnVal = LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_END
' Abort
Exit Sub
End If
ElseIf nStatus = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Buffer = "The file """ & bstrFileName & """
 has been added successfully." & vbCrLf & vbCrLf & "Continue?"
Result = MessageBox.Show(Buffer, "DICOM Directory Sample",MessageBoxButtons.YesNo)
If Result = DialogResult.No Then
pReturnVal = LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_END
' Abort
Exit Sub
End If
End If
End Sub

Private Sub CreateDicomDir()
Dim L_KEY_MEDICAL As String = ""
DicomDir = New LTDICDIRLib.LEADDicomDir
Dim DicomFactory As New LTDicomKernelLib.LEADDicomFactory
Dim DicomKernel As LTDicomKernelLib.LEADDicomKernel
Dim strLic As String
strLic = "LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc." DicomKernel = DicomFactory.CreateObject("LEADDicomKernel.LEADDicomKernel", strLic)
DicomKernel.UnlockSupport(LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL, L_KEY_MEDICAL)
If DicomKernel.IsSupportLocked(LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL) Then
MessageBox.Show("Medical Support must be unlocked for this demo!", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If
' Set the destination folder
DicomDir.ResetDicomDir("C:\Medical Images")
' Files in subfolders should also be included
DicomDir.IncludeSubfolders = True
' Add all the DICOM files to the Directory
DicomDir.InsertDicomFile("")
' Save the DICOMDIR File
DicomDir.SaveDicomDir()
End Sub


Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport Example for VB.NET

Private WithEvents objPrintSCU As LTDICPRNSCULib.LEADDicomPrintSCU
Private Sub objPrintSCU_OnStatus(ByVal Status As LTDICPRNSCULib.PrintScuStatusEnum, ByVal OperationStatus As Integer)
Dim sStatusCodeType As String
Dim sOpStatus As String
Select Case Status
Case LTDICPRNSCULib.PrintScuStatusEnum.PRNSCU_STATUS_RECEIVE_ABORT
MessageBox.Show("Source = " & objPrintSCU.AbortSource & ", " & "Reason = " & objPrintSCU.AbortReason, "Print SCP Aborted the Association")
Case LTDICPRNSCULib.PrintScuStatusEnum.PRNSCU_STATUS_RECEIVE_PRINT_FILM_SESSION_RSP
If OperationStatus = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS Then
If objPrintSCU.LastOperationStatus = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS Then
sStatusCodeType = "Success"
Else
sStatusCodeType = "Warning"
End If Else sStatusCodeType = "Failure"
End If
sOpStatus = Hex(objPrintSCU.LastOperationStatus)
Do While Len(sOpStatus) < 4
sOpStatus = "0" & sOpStatus
Loop
sOpStatus = "0x" & sOpStatus
MessageBox.Show("Status: " & sOpStatus & " (" & sStatusCodeType & ")", "Received N-ACTION-RSP (Basic Film Session SOP Class)")
End Select
End Sub

Private Sub objPrintSCU_OnPrinterReport(ByVal EventTypeID As Short, ByVal PrinterStatusInfo As String, ByVal FilmDestination As String, ByVal PrinterName As String)
Dim sEventTypeName As String
sEventTypeName = "Normal"
Select Case EventTypeID
Case 2
sEventTypeName = "Warning"
Case 3
sEventTypeName = "Failure"
End Select
Dim sMsg As String
sMsg = "Event Type Name: " & sEventTypeName
If EventTypeID <> 1 Then
sMsg = sMsg & vbNewLine & "Printer Status Info: " & PrinterStatusInfo & vbNewLine & "Film Destination: " & FilmDestination & vbNewLine & "Printer Name: " & PrinterName
End If
MessageBox.Show(sMsg, "Printer Status Report")
End Sub

Private Sub objPrintSCU_OnPrintJobReport(ByVal PrintJobSOPInstanceUID As String, ByVal EventTypeID As Short, ByVal ExecutionStatusInfo As String, ByVal PrintJobID As String, ByVal FilmSessionLabel As String, ByVal PrinterName As String)
Dim sEventTypeName As String
sEventTypeName = "Pending"
Select Case EventTypeID
Case 2
sEventTypeName = "Printing"
Case 3 sEventTypeName = "Done"
Case 4 sEventTypeName = "Failure"
End Select

MessageBox.Show("Print Job SOP Instance UID: " & PrintJobSOPInstanceUID & vbNewLine & "Event Type Name: " & sEventTypeName & vbNewLine & "Execution Status Info: " & ExecutionStatusInfo & vbNewLine & "Film Session Label: " & FilmSessionLabel & vbNewLine & "Printer Name: " & PrinterName, "Print Job Status Report")
End Sub


Miscellaneous Examples (VB.NET)

You can test any of the following examples by adding a command button and pasting the sample code in the Click procedure.

Accept Example for VB.NET

AnnCount Example for VB.NET

ChangeTransferSyntax Example for VB.NET

CloseForced Example for VB.NET

ConformanceStatus example for VB.NET

Connect Example for VB.NET

Converting DICOM Annotation Objects to LEAD Annotation Objects Example for VB.NET

Converting LEAD Annotation Objects to DICOM Annotation Objects Example for VB.NET

CreateAssociate Example for VB.NET

Creating a Digital Signature Example for VB.NET

Creating DICOM Annotations Example for VB.NET

DefaultIOD example for VB.NET

DefaultTag example for VB.NET

DefaultUID example for VB.NET

DefaultVR example for VB.NET

DeleteBitmapValue Example for VB.NET

DeleteElement Example for VB.NET

DeleteIOD Example for VB.NET

DeleteModule Example for VB.NET

DeleteTag Example for VB.NET

DeleteUID Example for VB.NET

DeleteVR Example for VB.NET

DSTempPath Example for VB.NET

EnableMethodErrors Example for VisualBasic

Enumerating Context Groups Example for VB.NET

Enumerating Digital Signatures Example for VB.NET

Enumerating the Coded Concepts of a Context Group Example for VB.NET

Examining a Digital Signature Example for VB.NET

Examining Annotations (1) Example for VB.NET

Examining Annotations (2) Example for VB.NET

Extracting a Wave Stream From a Data Set Example for VB.NET

FindFirstElement Example for VB.NET

FindIndexModule Example for VB.NET

FindLastElement Example for VB.NET

FindModule Example for VB.NET

FindModuleIOD Example for VB.NET

FindPresentationAbstract Example for VB.NET

GetAgeValue Example for VB.NET

GetApplication Example for VB.NET

GetAuthenticationAlgorithmTLS example for VB.NET

GetBinaryValue Example for VB.NET

GetBitmapCount Example for VB.NET

GetCharValue Example for VB.NET

GetConvertValue example for VB.NET

GetDateTimeValue Example for VB.NET

GetDateValue Example for VB.NET

GetDoubleValue Example for VB.NET

GetElementLevel Example for VB.NET

GetEncryptionAlgorithmTLS Example for VB.NET

GetEncryptKeyLengthTLS Example for VB.NET

GetExtendedData Example for VB.NET

GetFloatValue Example for VB.NET

GetImageInformation Example for VB.NET

GetInfoDS Example for VB.NET

GetIntegrityAlgorithmTLS Example for VB.NET

GetKeyExchangeAlgorithmTLS Example for VB.NET

GetLongValue Example for VB.NET

GetModuleCount Example for VB.NET

GetMutualAuthKeyLengthTLS Example for VB.NET

GetPeerAuthDataISCL Example for VB.NET

GetPeerEncryptionISCL Example for VB.NET

GetPeerMACISCL Example for VB.NET

GetPeerRequestedMessageLengthISCL Example for VB.NET

GetPresentationAbstract Example for VB.NET

GetPresentationCount Example for VB.NET

GetPresentationResult Example for VB.NET

GetSendQueueSize Example for VB.NET

GetServer Example for VB.NET

GetShortValue Example for VB.NET

GetStatusISCL Example for VB.NET

GetStringValue Example for VB.NET

GetTagCount Example for VB.NET

GetTimeValue Example for VB.NET

Getting an overlay bitmap list Example for VB.NET

Getting and setting a non-linear VOI LUT Example for VB.NET

Getting and setting window center and width Example for VB.NET

Getting modality LUT data and attributes Example for VB.NET

Getting palette color LUT data and attributes Example for VB.NET

Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for VB.NET

GetTransferCount Example for VB.NET

GetUIDCount Example for VB.NET

GetUserInfoCount Example for VB.NET

GetVRCount Example for VB.NET

IncludeVolatile Example for VB.NET

InitCS Example for VB.NET

InitDS Example for VB.NET

InsertBitmapListValue Example for VB.NET

InsertBitmapValue Example for VB.NET

InsertDS Example for VB.NET

InsertElement Example for VB.NET

Inserting a Context Group Example for VB.NET

Inserting a Wave Stream Into a Data Set Example for VB.NET

Inserting a Waveform Group Into a Data Set Example for VB.NET

InsertIOD Example for VB.NET

InsertKey Example for VB.NET

InsertModule Example for VB.NET

InsertTag Example for VB.NET

InsertUID Example for VB.NET

InsertVR Example for VB.NET

IsActivated Example for VB.NET

IsAsyncOperations Example for VB.NET

ISCLChallengeResponseSuccess Example for VB.NET

IsImplementClass Example for VB.NET

IsImplementVersion Example for VB.NET

IsISCLQueueEmpty Example for VB.NET

IsMaxLengthEnabled Example for VB.NET

IsRoleSelect Example for VB.NET

IsSupportLocked Example for VB.NET

J2KCompressionControl Example for VB.NET

J2KCompressionRatio Example for VB.NET

J2KROIControl Example for VB.NET

J2KSetDefaults Example for VB.NET

J2KTargetFileSize Example for VB.NET

KeepPixelDataIntact Example for VB.NET

Listen Example for VB.NET

LoadDS Example for VB.NET

Modifying a Context Group Example for VB.NET

MoveFirstIOD Example for VB.NET

MoveFirstTag Example for VB.NET

MoveFirstUID Example for VB.NET

MoveFirstVR Example for VB.NET

MoveRootElement Example for VB.NET

MoveRootIOD Example for VB.NET

NetClose Example for VB.NET

NetConnect Example for VB.NET

NetNonSecureReceivedISCL Example for VB.NET

NetNonSecureSendISCL Example for VB.NET

NetReceive Example for VB.NET

NetReceiveAbort Example for VB.NET

NetReceiveAssociateAccept Example for VB.NET

NetReceiveAssociateReject Example for VB.NET

NetReceiveAssociateRequest Example for VB.NET

NetReceiveCCancelRequest Example for VB.NET

NetReceiveCEchoResponse Example for VB.NET

NetReceiveCFindResponse Example for VB.NET

NetReceiveCGetRequest Example for VB.NET

NetReceiveCGetResponse Example for VB.NET

NetReceiveCMoveRequest Example for VB.NET

NetReceiveCMoveResponse Example for VB.NET

NetReceiveCStoreResponse Example for VB.NET

NetReceiveData Example for VB.NET

NetReceiveNActionRequest Example for VB.NET

NetReceiveNActionResponse Example for VB.NET

NetReceiveNCreateResponse Example for VB.NET

NetReceiveNDeleteResponse Example for VB.NET

NetReceiveNGetRequest Example for VB.NET

NetReceiveNGetResponse Example for VB.NET

NetReceiveNReportRequest Example for VB.NET

NetReceiveNReportResponse Example for VB.NET

NetReceiveNSetRequest Example for VB.NET

NetReceiveNSetResponse Example for VB.NET

NetReceiveReleaseRequest Example for VB.NET

NetReceiveReleaseResponse Example for VB.NET

NetReceiveUnknown Example for VB.NET

NetSecureLinkReady example for VB.NET

NetSend Example for VB.NET

Preamble Example for VB.NET

ProgressStatus Example for VB.NET

ResetDS Example for VB.NET

ResetIOD Example for VB.NET

ResetTag Example for VB.NET

ResetUID Example for VB.NET

ResetVR Example for VB.NET

SaveDS example for VB.NET

Searching the Data Set for a Digital Signature Example for VB.NET

SendAbort Example for VB.NET

SendAssociateRequest Example for VB.NET

SendCCancelRequest Example for VB.NET

SendCEchoRequest Example for VB.NET

SendCEchoResponse Example for VB.NET

SendCFindRequest Example for VB.NET

SendCFindResponse Example for VB.NET

SendCGetRequest Example for VB.NET

SendCGetResponse Example for VB.NET

SendCMoveRequest Example for VB.NET

SendCStoreRequest Example for VB.NET

SendCStoreResponse Example for VB.NET

SendData Example for VB.NET

SendNActionRequest Example for VB.NET

SendNCreateRequest Example for VB.NET

SendNCreateResponse Example for VB.NET

SendNDeleteRequest Example for VB.NET

SendNDeleteResponse Example for VB.NET

SendNGetRequest Example for VB.NET

SendNonSecureISCL Example for VB.NET

SendNReportRequest Example for VB.NET

SendNSetRequest Example for VB.NET

SendReleaseRequest Example for VB.NET

SetAuthDataISCL Example for VB.NET

SetBitmapListValue example for VB.NET

SetBitmapValue example for VB.NET

SetCalled Example for VB.NET

SetCipherToIndexTLS Example for VB.NET

SetClientCertificateTLS Example for VB.NET

SetCommandSet (DICOM Control) Example for VB.NET

SetCurrentElement example for VB.NET

SetDefaultEncryptionISCL Example for VB.NET

SetDefaultSigningISCL Example for VB.NET

SetEncryptKeyISCL Example for VB.NET

SetMaxCommBlockLengthISCL Example for VB.NET

SetMaxMessageLengthISCL Example for VB.NET

SetMutualAuthAlgISCL Example for VB.NET

SetMutualAuthKeyISCL Example for VB.NET

SetRequest Example for VB.NET

SetServerCertificateTLS example for VB.NET

SetTagName example for VB.NET

Setting an overlay bitmap list Example for VB.NET

Setting modality LUT data and attributes Example for VB.NET

Setting palette color LUT data and attributes Example for VB.NET

Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for VB.NET

SetUIDName example for VB.NET

SetVRName example for VB.NET

SSLCreateFlags Example for VB.NET

StartUp Example for VB.NET

Version Example for VB.NET


Accept Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'This example uses the predefined variable "List2" of type "ListBox" from ".NET Framework".
Private Sub LEADDICOMNet1_NetAccept(ByVal nStatus As Integer) Handles LEADDICOMNet1.NetAccept
Dim out As String
Dim hClient As Integer
Dim lClients As Integer

'accepting the connection attempt
LEADDICOMNet1.Accept(

'get the latest client
lClients = LEADDICOMNet1.GetClientCount(LEADDICOMNet1.hNet)
hClient = LEADDICOMNet1.GetClient(LEADDICOMNet1.hNet, lClients - 1)

'display some information about the connection:
out = "Peer: " & LEADDICOMNet1.GetPeerAddress (hClient)
List2.Items.Add("Connection Accepted - " & out)

'reject the connection if we don't like the address
If (LEADDICOMNet1.GetPeerAddress(hClient) = "207.238.49.199") Then
'close the connection
LEADDICOMNet1.Close(hClient)
End If
End Sub


AnnCount Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestAnnCount()

'This example
' 1. Opens a dataset with annotations
' 2. Finds the location of one of the annotation files
' 3. Loads the annotations
' 4. Flips the annotations
' 5. Saves the annotations to index to slots 250 through 255
' 6. Deletes the annotation files from slot 253

Dim nRet As Short
Dim i As Short
Dim hAnnContainer As Integer
Dim strMsg As String
Dim strTmp As String
Dim nIndexAnn As Short
Dim RasterIO As New LTRASTERIOLib.LEADRasterIO
Dim RasterAnn As New LTANNLib.LEADRasterAnnotation

' Open the dataset with annotations
nRet = LEADDICOM1.LoadDS("e:\images\DicomAnn.dic", 0)
If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
Exit Sub

RasterIO.EnableMethodErrors = False RasterIO.Load(LEADRasterView1.Raster, "e:\images\DicomAnn.dic", 0, 0, 1)

' Find the location of one of the annotation files
LEADDICOM1.AnnCount()
If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
Exit Sub

   strMsg = "Private Creator Tag: "
 & Hex(LEADDICOM1.AnnPrivateCreatorTag) & vbNewLine
For i = 0 To 255
If (LEADDICOM1.AnnEntries(i)
 = True) Then
nIndexAnn = i
strTmp = vbTab &
 Str(i) & vbNewLine
strMsg = strMsg &
 strTmp
End If
Next i
MessageBox.Show(strMsg)

' Loads the annotations
LEADDICOM1.AnnLoad(nIndexAnn, 1)

' Flip the annotations
RasterAnn.AnnContainer = LEADDICOM1.AnnContainer
RasterAnn.AnnFlip(True, LEADRasterView1.Raster.BitmapHeight / 2, False)
LEADDICOM1.AnnContainer = RasterAnn.AnnContainer

' Save the annotations to index to slots 250 through 255
For i = 250 To 255
nRet = LEADDICOM1.AnnSave(i, LTANNLib.AnnFMTConstants.ANN_FMT_NATIVE, False, LTDICLib.DicomAnnSaveModifyConstants.SAVE_OVERWRITE, 1)
Next i

' Delete the annotation files from slot 253
LEADDICOM1.AnnDelete(253, -1)

' Display file info
LEADDICOM1.AnnCount()
If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
Exit Sub

   strMsg = "Private Creator Tag: "
 & Hex(LEADDICOM1.AnnPrivateCreatorTag) & vbNewLine
For i = 0 To 255
If (LEADDICOM1.AnnEntries(i)
 = True) Then
strTmp = vbTab &
 Str(i) & vbNewLine
strMsg = strMsg &
 strTmp
End If
Next i
MessageBox.Show(strMsg)

' Save the data set LEADDICOM1.SaveDS("e:\erase\dicom.dic", 0)

End Sub


ChangeTransferSyntax Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestChangeTransferSyntax ()
Const UID_EXPLICIT_VR_BIG_ENDIAN As String = "1.2.840.10008.1.2.2" ' Explicit VR Big Endian
' Load a Data Set
If LEADDICOM1.LoadDS("d:\lead14\dist\images\dicom\image2.dic", 0) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
' Change the Transfer Syntax to Explicit VR Big Endian
LEADDICOM1.ChangeTransferSyntax(UID_EXPLICIT_VR_BIG_ENDIAN, 0, 0)

' Save the new Data Set
LEADDICOM1.SaveDS("d:\temp\Temp.dic", 0)
End If
End Sub


CloseForced Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestCloseForced()
LEADDICOMNet1.NetworkSecurityMode = LTDNCLib.DicomSecurityModes.DICOM_SECURE_ISCL
LEADDICOMNet1.StartUp()
' do some communications
LEADDICOMNet1.CloseForced(LEADDICOMNet1.hNet, True)
End Sub


ConformanceStatus example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub LEADDICOM1_ConformanceStatus(ByVal
 nFlags As Short) Handles LEADDICOM1.ConformanceStatus
Dim msg As String
Dim nRet As Short
Dim szTag As String
Dim szTagL As String
Dim szTagR As String
Dim nLen As Short
Dim x As Short

   'display info about non-standard element
Select Case nFlags
Case LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_UNKNOWN_CLASS
msg = "Unknown
 Class" & Chr(13)
Case LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_UNKNOWN_TAG
msg = "Unknown
 Tag" & Chr(13)
Case LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_UNKNOWN_VR
msg = "Unknown
 VR" & Chr(13)
Case LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_WRONG_VR
msg = "Error
 in VR" & Chr(13)
Case LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_MIN_VM
msg = "Error
 in MinVM" & Chr(13)
Case LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_MAX_VM
msg = "Error
 in MaxVM" & Chr(13)
Case LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_DIVIDE_VM
msg = "Error
 in DivideVM" & Chr(13)
Case LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_IMAGE
msg = "Error
 in Image" & Chr(13)
Case Else
Exit Sub
End Select

szTag = Hex(LEADDICOM1.CurrentElement.Tag)
nLen = Len(szTag)
szTagR = szTag.Substring(0, nLen - 4)
szTagL = ""

For x = nLen To 7
szTagL = szTagL & CStr(0)
Next

szTagL = szTagL & szTag.Substring(0, nLen - 4)
szTag = szTagL & ":" & szTagR
msg = msg & "Tag: " & szTag

nRet = MessageBox.Show(msg, MsgBoxStyle.OKCancel, "Non-Standard
 Element")
If (nRet = DialogResult.Cancel) Then
LEADDICOM1.EnableConformanceStatus
 = False
End If
End Sub


Connect Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestConnect()
'connect to a server
LEADDICOMNet1.Connect("", 0, "10.1.1.138", 104)
End Sub


Converting DICOM Annotation Objects to LEAD Annotation Objects Example for VB.NET

Private Sub DicomAnnToLEADAnn(ByRef objPresStateDS As LTDICLib.LEADDicomDS)
Dim objRasterAnn As New LTANNLib.LEADRasterAnnotation
' Describe a DICOM graphic annotation object and then convert it to
' a LEAD annotation object
With objPresStateDS.GraphicObjectAttributes
.Type = LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE
.Filled = False
.PointCount = 5
.PointsX(0) = 90.7
.PointsY(0) = 156.9
.PointsX(1) = 195.9
.PointsY(1) = 156.9
.PointsX(2) = 195.9
.PointsY(2) = 342.5
.PointsX(3) = 90.7
.PointsY(3) = 342.5
.PointsX(4) = 90.7
.PointsY(4) = 156.9
End With
If objPresStateDS.ConvertDicomAnnObjToLEADAnnObj(True) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("The DICOM graphic annotation object was converted successfully.")
' The handle to the resulted LEAD annotation object is available from the
' LEADAnnObject property. You can now use the functionality of a LEAD Raster
' Annotation object to manipulate the object.
' Once done from the object, don't forget to destroy it
objRasterAnn.AnnDestroy(objPresStateDS.LEADAnnObject, 0)
End If

' Describe a DICOM text annotation object and then convert it to a
' LEAD annotation object
With objPresStateDS.TextObjectAttributes
.BoundingBoxUsed = True
.AnchorPointUsed = False
.TextValue = "Text annotation"
.BoundingBoxTLHCornerX = 290.5
.BoundingBoxTLHCornerY = 158.1
.BoundingBoxBRHCornerX = 424.1
.BoundingBoxBRHCornerY = 176.1
.BoundingBoxTextJustification = LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_LEFT
End With
If objPresStateDS.ConvertDicomAnnObjToLEADAnnObj(False) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("The DICOM text annotation object was converted successfully.")

' The handle to the resulted LEAD annotation object is available from the
' LEADAnnObject property. You can now use the functionality of a LEAD Raster
' Annotation object to manipulate the object.
' Once done from the object, don't forget to destroy it objRasterAnn.AnnDestroy(objPresStateDS.LEADAnnObject, 0)
End If
End Sub


Converting LEAD Annotation Objects to DICOM Annotation Objects Example for VB.NET

'This example uses the predefined variable "objPresState" of type "LEADDicomDS" from "LEADTOOLS Toolkit".
Private Sub objPresState_OnConvertLEADAnnObjToDicomAnnObj(ByVal bGraphicObject As Boolean)
Dim sMsg As String

' Display the attributes of the resulted DICOM annotation object
Dim lCount, I As Integer
If bGraphicObject Then
' The resulted DICOM annotation object is a graphic object
With objPresState.GraphicObjectAttributes
sMsg = "Graphic Annotation Units: "
Select Case .Units
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Graphic Type: "
Select Case .Type
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POINT
sMsg = sMsg & "POINT" & vbNewLine
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE
sMsg = sMsg & "POLYLINE" & vbNewLine
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED
sMsg = sMsg & "INTERPOLATED" & vbNewLine
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE
sMsg = sMsg & "CIRCLE" & vbNewLine
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE
sMsg = sMsg & "ELLIPSE" & vbNewLine
End Select

sMsg = sMsg & "Graphic Filled: "
If .Filled Then
sMsg = sMsg & "Y" & vbNewLine
Else
sMsg = sMsg & "N" & vbNewLine
End If

lCount = .PointCount
sMsg = sMsg & "Number of Graphic Points: " & lCount & vbNewLine

If lCount < 10 Then
sMsg = sMsg & "Graphic Data: " & vbNewLine
For I = 0 To lCount - 1
sMsg = sMsg & " " & "X" & I + 1 & ", Y" & I + 1 & " = " & .PointsX(I) & ", " & .PointsY(I) & vbNewLine
Next
End If

MessageBox.Show(sMsg, "Graphic Annotation Object")
End With
Else
' The resulted DICOM annotation object is a text object
With objPresState.TextObjectAttributes
If .BoundingBoxUsed Then
sMsg = "Unformatted Text Value: " & .TextValue & vbNewLine
sMsg = sMsg & "Bounding Box Annotation Units: "
Select Case .BoundingBoxUnits
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Bounding Box Top Left Hand Corner: " & .BoundingBoxTLHCornerX & ", " & .BoundingBoxTLHCornerY & vbNewLine
sMsg = sMsg & "Bounding Box Bottom Right Hand Corner: " & .BoundingBoxBRHCornerX & ", " & .BoundingBoxBRHCornerY & vbNewLine
sMsg = sMsg & "Bounding Box Text Horizontal Justification: "
Select Case .BoundingBoxTextJustification
Case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_LEFT
sMsg = sMsg & "LEFT" & vbNewLine
Case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_RIGHT
sMsg = sMsg & "RIGHT" & vbNewLine
Case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_CENTER
sMsg = sMsg & "CENTER" & vbNewLine
End Select
Else
sMsg = "Unformatted Text Value: " & .TextValue & vbNewLine
sMsg = sMsg & "Anchor Point Annotation Units: "
Select Case .AnchorPointUnits
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select
sMsg = sMsg & "Anchor Point: " & .AnchorPointX & ", " & .AnchorPointY & vbNewLine
sMsg = sMsg & "Anchor Point Visibility: "
If .AnchorPointVisible Then
sMsg = sMsg & "Y" Else sMsg = sMsg & "N"
End If
End If

MessageBox.Show(sMsg, "Text Annotation Object")
End With
End If

' If it is desired to stop the conversion process... objPresState.EndConversion
objPresState.EndConversion( LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_ANN)
' Any error code, but not 0
End Sub

Private Sub LEADAnnToDicomAnn(ByRef objPresStateDS As LTDICLib.LEADDicomDS)
' Update the CurrentElement property with a Graphic Annotation Item so
' that the resulted DICOM annotation objects are added to the Data Set
If objPresStateDS.FindFirstGraphicAnnItem() <> 0 Then
' (Make sure that the specified layer is already defined in the
' "Graphic Layer Module")
objPresStateDS.CreateGraphicAnnItem(0, "LAYER_0")
objPresStateDS.FindFirstGraphicAnnItem()
End If

Dim objRasterAnn As New LTANNLib.LEADRasterAnnotation

' Let's create a LEAD rectangle annotation object
With objRasterAnn .AnnCreate(LTANNLib.AnnObjectType.ANN_OBJECT_RECT, False, False)
.AnnRectLeft(.AnnObject) = 150
.AnnRectTop(.AnnObject) = 175
.AnnRectWidth(.AnnObject) = 200
.AnnRectHeight(.AnnObject) = 100
.AnnSetFillMode(.AnnObject, LTANNLib.AnnFillModeConstants.ANN_FILLMODE_TRANSPARENT, False)
End With

' Convert the LEAD annotation object. Now, for each resulted DICOM annotation
' object, the OnConvertLEADAnnObjToDicomAnnObj event gets fired. By handling
' the event, you can inspect the resulted object.
If objPresStateDS.ConvertLEADAnnObjToDicomAnnObjs(objRasterAnn.AnnObject, 0) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("The LEAD annotation object was converted successfully.")
End If

' Destroy the LEAD annotation object
objRasterAnn.AnnDestroy(objRasterAnn.AnnObject, 0)
End Sub


CreateAssociate Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestCreateAssociate ( )
'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)
MessageBox.Show("Associate Request? " & CStr(LEADDICOMNet1.IsRequest(LEADDICOMNet1.hPDU)))
'reset the Associate class to Accept
LEADDICOMNet1.ResetAssociate(LEADDICOMNet1.hPDU, False)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)
MessageBox.Show("Associate Request? " & CStr(LEADDICOMNet1.IsRequest(LEADDICOMNet1.hPDU)))
'free the Associate class
'LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU
End Sub


Creating a Digital Signature Example for VB.NET

Sub CreateSignature(ByRef objDS As LTDICLib.LEADDicomDS)
Dim nRet As Short

' Create a Digital Signature in the main Data Set
objDS.SetCurrentElement(0)
nRet = objDS.CreateSignature("C:\PrivateKey", "C:\Certificate.cer", "")
If nRet = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("The Digital Signature was created successfully.", "Sample")
Else
MessageBox.Show("An error occurred [Error: " & nRet & "].", "Sample")
Exit Sub
End If

' Save the signed Data Set
objDS.SaveDS("C:\Signed.dic", 0)

' Examine the Digital Signature we just created
' Refer to Examining a Digital Signature Example
' for the procedure ExamineSignature
ExamineSignature(objDS, objDS.CurrentElement.hElement)
End Sub


Creating DICOM Annotations Example for VB.NET

Private Sub CreateAnnotations(ByRef objPresStateDS As LTDICLib.LEADDicomDS)
' Set the attributes that describe the "Presentation State Module"
With objPresStateDS.PresStateAttributes
.InstanceNumber = 1
.PresLabel = "SOME_LABEL"
.PresDescription = "Description of the presentation"
With .PresCreationDate
.Year = Today.Year
.Month = Today.Month
.Day = Today.Day
End With
With .PresCreationTime
.Hours = TimeOfDay.Hour
.Minutes = TimeOfDay.Minute
.Seconds = TimeOfDay.Second
.Fractions = 0
End With
.PresCreatorName = "SomeOne"
End With
If objPresStateDS.SetPresStateAttributes() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("Presentation State attributes were set successfully.")
End If

' Add references to some images (under the "Presentation State Module")
objPresStateDS.AddPresStateImageRef("C:\Image1.dic")
objPresStateDS.AddPresStateImageRef("C:\Image2.dic")
objPresStateDS.AddPresStateImageRef("C:\Image3.dic")

Dim sLayerName As String
' Create a layer
With objPresStateDS.LayerAttributes
.LayerName = "LAYER_0" ' "Graphic Layer"
.LayerOrder = 1
.DisplayGrayscaleValue = -1
.DisplayRedValue = -1
.DisplayGreenValue = -1
.DisplayRedValue = -1
.LayerDescription = "Description of the layer"
End With
If objPresStateDS.CreateLayer() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
sLayerName = objPresStateDS.LayerAttributes.LayerName

MessageBox.Show("Layer '" & sLayerName & "' was created successfully.")

' Change one of the attributes and update the layer
objPresStateDS.LayerAttributes.LayerOrder = 0
objPresStateDS.SetLayerAttributes(objPresStateDS.NewLayerIndex)
End If

Dim hGraphicAnnItem As Integer

' Create a Graphic Annotation Item
If objPresStateDS.CreateGraphicAnnItem(0, sLayerName) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("A Graphic Annotation Item was created successfully.")

objPresStateDS.FindFirstGraphicAnnItem()
hGraphicAnnItem = objPresStateDS.CurrentElement.hElement
End If

Dim sSOPInstanceUID As String

' The annotations defined in the Item hGraphicAnnItem will be applied
' only to one of the images listed in the Presentation State Module
If objPresStateDS.FindFirstPresStateRefSeriesItem() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
If objPresStateDS.GetPresStateImageRefCount() > 0 Then
sSOPInstanceUID = objPresStateDS.GetPresStateImageRefInstanceUID(0)
End If
End If
objPresStateDS.SetCurrentElement(hGraphicAnnItem)
objPresStateDS.AddLayerImageRef(sSOPInstanceUID)

' Let's create a graphic annotation object
With objPresStateDS.GraphicObjectAttributes
.LayerName = sLayerName
.Units = LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
.Type = LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE
.Filled = True
.PointCount = 2 ' "Number of Graphic Points"
' "Graphic Data":
.PointsX(0) = 252.5
.PointsY(0) = 252.5
.PointsX(1) = 209.2
.PointsY(1) = 199.6
End With
If objPresStateDS.CreateGraphicObject(True) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("A graphic annotation object was created successfully.")

' Change one of the attributes and update the object
objPresStateDS.GraphicObjectAttributes.Filled = False
objPresStateDS.SetGraphicObjectAttributes(0)
End If

' Let's now create a text annotation object
With objPresStateDS.TextObjectAttributes
.LayerName = sLayerName
.BoundingBoxUsed = True
.AnchorPointUsed = False
.BoundingBoxUnits = LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
.TextValue = "Text annotation (using a bounding box)"
.BoundingBoxTLHCornerX = 176.7
.BoundingBoxTLHCornerY = 117.7
.BoundingBoxBRHCornerX = 320.3
.BoundingBoxBRHCornerY = 136.1
.BoundingBoxTextJustification = LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_RIGHT
End With
If objPresStateDS.CreateTextObject(True) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("A text annotation object was created successfully.")

' Change one of the attributes and update the object
objPresStateDS.TextObjectAttributes.BoundingBoxTextJustification = LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_LEFT
objPresStateDS.SetTextObjectAttributes(0)
End If

' And another text annotation object
With objPresStateDS.TextObjectAttributes
.LayerName = sLayerName
.AnchorPointUsed = True
.BoundingBoxUsed = False
.AnchorPointUnits = LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
.TextValue = "Text annotation (using an anchor point)"
.AnchorPointX = 277.9
.AnchorPointY = 382.7
.AnchorPointVisible = True
End With
If objPresStateDS.CreateTextObject(True) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("Another text annotation object was created successfully.")
End If
End Sub


DefaultIOD example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDefaultIOD ( )
'Restore Default IOD table
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
LEADDICOM1.DefaultIOD()
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
End Sub


DefaultTag example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDefaultTag ( )
'Restore default Tag values
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
LEADDICOM1.DefaultTag()
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
End Sub


DefaultUID example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDefaultUID ( )
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
'Restore to default values
LEADDICOM1.DefaultUID()
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
End Sub


DefaultVR example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDefaultVR ( )
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
LEADDICOM1.DefaultVR()
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
End Sub


DeleteBitmapValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestDeleteBitmapValue()
Dim nRet As Short
Dim Process As New LTRASTERPROCLib.LEADRasterProcess

LEADDICOM1.EnableMethodErrors = False

'move to the first image element
nRet = LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
'get the first image
nRet = LEADDICOM1.GetBitmapValue(0, 0, LTDICLib.DicomColorOrderConstants.ORDER_BGR, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
'flip the image
Process.Flip(LEADRasterView1.Raster)

'delete the first image from the dataset
nRet = LEADDICOM1.DeleteBitmapValue(0, 1)

'now update the list with the flipped image
nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap, 0, LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)
End Sub


DeleteElement Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDeleteElement()
Dim nRet As Short
LEADDICOM1.EnableMethodErrors = False
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DATE, False)
nRet = LEADDICOM1.DeleteElement
LEADDICOM1.EnableMethodErrors = True
If (nRet <> 0) Then
MessageBox.Show("Error Deleting Element!")
End If
End Sub


DeleteIOD Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDeleteIOD()

LEADDICOM1.EnableMethodErrors = True
On Error GoTo DELETEIODERROR
LEADDICOM1.MoveFirstIOD(False)
LEADDICOM1.DeleteIOD()
Exit Sub

DELETEIODERROR:
MessageBox.Show("Error")

End Sub


DeleteModule Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDeleteModule()
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False
'move to the first module in the DataSet and delete it
LEADDICOM1.FindIndexModule(0)
nRet = LEADDICOM1.DeleteModule(LEADDICOM1.CurrentModule.Module)
If (nRet <> 0) Then
MessageBox.Show("Error Deleting Module!")
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


DeleteTag Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDeleteTag()
Dim lCode As Integer

On Error GoTo DELETETAGERROR
lCode = 131073
'move to the selected Tag
LEADDICOM1.FindTag(lCode)
'delete it
LEADDICOM1.DeleteTag()
Exit Sub

DELETETAGERROR:
MessageBox.Show("Error")
End Sub


DeleteUID Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDeleteUID()
Dim pszCode As String
Dim nIndex As Short

LEADDICOM1.EnableMethodErrors = True
On Error GoTo DELETEUIDERROR
pszCode = "1.2.840.10008.1.2"
'move to the selected UID
LEADDICOM1.FindUID(pszCode)
'delete it
LEADDICOM1.DeleteUID()
Exit Sub

DELETEUIDERROR:
MessageBox.Show("Error")

End Sub


DeleteVR Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDeleteVR()
Dim nCode As Short
Dim lIndex As Integer

LEADDICOM1.EnableMethodErrors = True
On Error GoTo DELETEVRERROR
nCode = 18771
'move to the selected VR
LEADDICOM1.FindVR(nCode)
'delete it
LEADDICOM1.DeleteVR()

Exit Sub

DELETEVRERROR:
MessageBox.Show("Error")

End Sub


DSTempPath Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestDSTempPath ( )
LEADDICOM1.DSTempPath = "d:\temp"
End Sub


EnableMethodErrors Example for VB.NET

EnableMethodErrors (ILEADDicomNet) Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestEnableMethodErrors ( )
LEADDICOM1.EnableMethodErrors = False
End Sub


Enumerating Context Groups Example for VB.NET

Private Function DisplayContextGroup(ByRef objDS As LTDICLib.LEADDicomDS) As DialogResult
Dim objGroup As LTDICLib.DicomContextGroup
objGroup = objDS.CurrentContextGroup
Dim sMsg As String
' Context ID and name
sMsg = objGroup.ContextIdentifier & vbNewLine & objGroup.Name & vbNewLine
' Extensibility
If objGroup.Extensible Then
sMsg = sMsg & "Extensible" & vbNewLine
Else
sMsg = sMsg & "Non-extensible" & vbNewLine
End If
' Context Group Version
Dim sMonth, sYear, sDay As String
With objGroup.ContextGroupVersion
sYear = CStr(.Year)
Do While Len(sYear) < 4
sYear = "0" & sYear
Loop
sMonth = CStr(.Month)
If Len(sMonth) < 2 Then
sMonth = "0" & sMonth
sDay = CStr(.Day)
If Len(sDay) < 2 Then
sDay = "0" & sDay
End With
sMsg = sMsg & sYear & sMonth & sDay & vbNewLine
sMsg = sMsg & vbNewLine & "Enumerate Coded Concepts?"
Return DisplayContextGroup = MessageBox.Show(sMsg, "Context Group", MessageBoxButtons.YesNoCancel)
End Function

Private Sub EnumContextGroups(ByRef objDS As LTDICLib.LEADDicomDS)
Dim bRet As Boolean
Dim sMsg As String
objDS.ResetContextGroup()
' Load all the Context Groups
objDS.LoadContextGroup()
' Enumerate them (3 possible ways)
Dim I As Integer
If True Then
' One possible way to enumerate the Context Groups
bRet = objDS.MoveFirstContextGroup()
Do While bRet
Select Case DisplayContextGroup(objDS)
Case DialogResult.Yes
' Refer to Enumerating the Coded Concepts of a Context Group
' Example for the procedure EnumCodedConcepts
EnumCodedConcepts(objDS)
Case DialogResult.Cancel
Exit Do
End Select
bRet = objDS.MoveNextContextGroup()
Loop
ElseIf False Then
' Another way to enumerate the Context Groups
For I = 0 To objDS.GetContextGroupCount() - 1
objDS.FindIndexContextGroup(I)
Select Case DisplayContextGroup(objDS)
Case DialogResult.Yes
EnumCodedConcepts(objDS)
Case DialogResult.Cancel
Exit For
End Select
Next
ElseIf False Then
' A third way to enumerate the Context Groups
bRet = objDS.MoveLastContextGroup()
Do While bRet
Select Case DisplayContextGroup(objDS)
Case DialogResult.Yes
EnumCodedConcepts(objDS)
Case DialogResult.Cancel
Exit Do
End Select
bRet = objDS.MovePrevContextGroup()
Loop
End If
End Sub


Enumerating Digital Signatures Example for VB.NET

Sub EnumerateSignatures(ByRef objDS As LTDICLib.LEADDicomDS)
' We will enumerate the Digital Signatures in the main Data Set

Dim lSignaturesCount As Integer

objDS.SetCurrentElement(0)
lSignaturesCount = objDS.GetSignaturesCount()
If lSignaturesCount = 0 Then
MessageBox.Show("No Digital Signatures in the main Data Set.", "Sample")
Exit Sub
End If

Dim sMsg As String

If lSignaturesCount = 1 Then
sMsg = "There is 1 Digital Signature in the main Data Set. " & "Do you want to examine it?"
Else
sMsg = "There are " & lSignaturesCount & " Digital Signatures in the main Data Set. " & "Do you want to examine them?"
End If
If MessageBox.Show(sMsg, "Sample", MessageBoxButtons.YesNo) <> DialogResult.Yes Then
Exit Sub
End If

Dim I As Integer

For I = 0 To lSignaturesCount - 1
objDS.MoveSignature(I)

' Refer to Examining a Digital Signature Example
' for the procedure ExamineSignature
ExamineSignature(objDS, objDS.CurrentElement.hElement)

objDS.SetCurrentElement(0)
Next
End Sub


Enumerating the Coded Concepts of a Context Group Example for VB.NET

Private Function DisplayCodedConcept(ByRef objDS As LTDICLib.LEADDicomDS, ByRef bYesNo As Boolean) As Boolean
Dim sTitle As String
objDS.MoveCodedConceptGroup()
sTitle = "Coded Concept (" & objDS.CurrentContextGroup.ContextIdentifier & ")"

Dim sMsg As String

Dim sYear As String
Dim sMonth As String
Dim sDay As String
With objDS.CurrentCodedConcept
' Coding Scheme Designator
sMsg = .CodingSchemeDesignator & vbNewLine

' Coding Scheme Version
If Len(.CodingSchemeVersion) Then
sMsg = sMsg & .CodingSchemeVersion & vbNewLine
End If

' Code Value and Code Meaning
sMsg = sMsg & .CodeValue & vbNewLine & .CodeMeaning & vbNewLine

' Context Group Local Version
If .IsContextGroupLocalVersion Then
sYear = CStr(.ContextGroupLocalVersion.Year)
Do While Len(sYear) < 4
sYear = "0" & sYear
Loop

sMonth = CStr(.ContextGroupLocalVersion.Month)
If Len(sMonth) < 2 Then
sMonth = "0" & sMonth

sDay = CStr(.ContextGroupLocalVersion.Day)
If Len(sDay) < 2 Then
sDay = "0" & sDay

sMsg = sMsg & sYear & sMonth & sDay & vbNewLine
End If

' Context Group Extension Creator UID
If Len(.ContextGroupExtensionCreatorUID) Then
sMsg = sMsg & .ContextGroupExtensionCreatorUID & vbNewLine
End If
End With

If bYesNo Then
sMsg = sMsg & vbNewLine & "Continue?"
DisplayCodedConcept = MessageBox.Show(sMsg, sTitle, MessageBoxButtons.YesNo) = DialogResult.Yes
Else MessageBox.Show(sMsg, sTitle, MessageBoxButtons.OK)
DisplayCodedConcept = True
End If
End Function

Private Sub EnumCodedConcepts(ByRef objDS As LTDICLib.LEADDicomDS)
Dim bRet As Boolean

' Enumerate the Coded Concepts in the current Context Group (3 possible ways)
Dim I As Integer
If True Then
' One possible way to enumerate the Coded Concepts
bRet = objDS.MoveFirstCodedConcept()
Do While bRet
If Not DisplayCodedConcept(objDS, True) Then
Exit Do
End If

bRet = objDS.MoveNextCodedConcept()
Loop

ElseIf False Then
' Another way to enumerate the Coded Concepts
For I = 0 To objDS.GetCodedConceptCount() - 1
objDS.FindIndexCodedConcept(I)

If Not DisplayCodedConcept(objDS, True) Then
Exit For
End If
Next

ElseIf False Then
' A third way to enumerate the Coded Concepts
bRet = objDS.MoveLastCodedConcept()
Do While bRet
If Not DisplayCodedConcept(objDS, True) Then
Exit Do
End If

bRet = objDS.MovePrevCodedConcept()
Loop
End If
End Sub


Examining a Digital Signature Example for VB.NET

Function GetFormatted(ByRef sValue As String, ByRef nWidth As Short) As String
GetFormatted = sValue
Do While Len(GetFormatted) < nWidth
GetFormatted = "0" & GetFormatted
Loop
End Function

Sub ExamineSignature(ByRef objDS As LTDICLib.LEADDicomDS, ByRef hSignatureItem As Integer)
Dim nRet As Short
 objDS.SetCurrentElement(hSignatureItem)

' Verify the Digital Signature; if hSignatureItem is 0, the method will
' verify all the Digital Signatures that exist in the Data Set
nRet = objDS.VerifySignature()
Select Case nRet
Case LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS
If hSignatureItem <> 0 Then
MessageBox.Show("The Digital Signature was verified.", "Sample")
Else
MessageBox.Show("All Digital Signatures were verified (if there are any).", "Sample")
Exit Sub
End If

Case LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_INVALID_SIGNATURE
If hSignatureItem <> 0 Then
MessageBox.Show("The Digital Signature is invalid.", "Sample")
Else
MessageBox.Show("At least one Digital Signature is invalid.", "Sample")
End If
Exit Sub

Case Else
MessageBox.Show("An error occurred [Error: " & nRet & "].", "Sample")
Exit Sub
End Select

Dim sMsg As String

' The Digital Signature UID
If objDS.GetSignatureUID() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
If objDS.StringValueCount > 0 Then
sMsg = "Digital Signature UID: " & objDS.StringValues(0) & vbNewLine
End If
End If

' The Digital Signature DateTime
Dim sSign As String
If objDS.GetSignatureDateTime() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
If objDS.DateTimeValueCount > 0 Then
With objDS.DateTimeValues(0)
If .Offset >= 0 Then
sSign = "+"
Else sSign = "-"
sMsg = sMsg & "Digital Signature DateTime: " & GetFormatted(CStr(.Month), 2) & "/" & GetFormatted(CStr(.Day), 2) & "/" & GetFormatted(CStr(.Year), 4) & " " & GetFormatted(CStr(.Hours), 2) & ":" & GetFormatted(CStr(.Minutes), 2) & ":" & GetFormatted(CStr(.Seconds), 2) & "." & GetFormatted(CStr(.Fractions), 6) & " " & sSign & GetFormatted(CStr(.Offset), 4) & vbNewLine
End With
End If
End If

' The MAC Calculation Transfer Syntax UID
If objDS.GetMacTransferSyntax() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
If objDS.StringValueCount > 0 Then
sMsg = sMsg & "MAC Calculation Transfer Syntax UID: " & objDS.StringValues(0) & vbNewLine
End If
End If

' The MAC Algorithm
If objDS.GetMacAlgorithm() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
If objDS.StringValueCount > 0 Then
sMsg = sMsg & "MAC Algorithm: " &
objDS.StringValues(0) & vbNewLine
End If
End If

' The Data Elements Signed
Dim sGroup, sTag, sElement As String
If objDS.GetSignedElementsCount() > 0 Then
sMsg = sMsg & "Data Elements Signed: "

' We will display only one
If objDS.MoveSignedElement(0) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then

sTag = Hex(objDS.CurrentElement.Tag)
sElement = sTag.Substring(sTag.Length - 4)
sGroup = sTag.Substring(0, Len(sTag) - 4)

sMsg = sMsg & "(" & GetFormatted(sGroup, 4) & "," & sElement & "), ..."

objDS.SetCurrentElement(hSignatureItem)
End If

sMsg = sMsg & vbNewLine
End If

sMsg = sMsg & vbNewLine & "Do you want to save the Certificate of Signer?"

' Display the information we have about the Digital Signature
If MessageBox.Show(sMsg, "Sample", MessageBoxButtons.YesNo) = DialogResult.Yes Then
' Save the Certificate of Signer
objDS.SaveCertificate("C:\CertOfSigner.cer")
End If
End Sub


Examining Annotations (1) Example for VB.NET

Private Sub ExamineAnnotations1(ByRef objPresStateDS As LTDICLib.LEADDicomDS)
Dim sMsg As String

' Get the attributes that describe the "Presentation State Module"
If objPresStateDS.GetPresStateAttributes(0) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
' Display some
With objPresStateDS.PresStateAttributes
sMsg = "Instance Number: " & .InstanceNumber & vbNewLine & "Presentation Label: " & .PresLabel & vbNewLine & "Presentation Description: " & .PresDescription & vbNewLine & "Presentation Creator’s Name: " & .PresCreatorName
End With

MessageBox.Show(sMsg, "Presentation State Attributes")
End If

Dim I, lCount, J As Integer

' Display the SOP Instance UIDs of all the images referenced in the
' "Presentation State Module"
If objPresStateDS.FindFirstPresStateRefSeriesItem() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
sMsg = ""
Do
lCount = objPresStateDS.GetPresStateImageRefCount()
For I = 0 To lCount - 1
sMsg = sMsg & objPresStateDS.GetPresStateImageRefInstanceUID(I) & vbNewLine
Next

sMsg = sMsg & vbNewLine
Loop While objPresStateDS.MoveNextPresStateRefSeriesItem() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS

MessageBox.Show(sMsg, "Referenced SOP Instance UID(s)")
End If

' Enumerate all the layers defined
lCount = objPresStateDS.LayerCount
MessageBox.Show("Layer Count: " & lCount)
For I = 0 To lCount - 1
' Display some of the attributes
If objPresStateDS.GetLayerAttributes(I) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
With objPresStateDS.LayerAttributes
sMsg = "Graphic Layer: " & .LayerName & vbNewLine & "Graphic Layer Order: " & .LayerOrder & vbNewLine & "Graphic Layer Description: " & .LayerDescription
End With

MessageBox.Show(sMsg, "Graphic Layer Attributes")
End If
Next

Dim lGraphicObjectCount, lTextObjectCount As Integer

' Enumerate all the Graphic Annotation Items
If objPresStateDS.FindFirstGraphicAnnItem() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Do
lGraphicObjectCount = objPresStateDS.GetGraphicObjectCount()
' Or:
'lGraphicObjectCount = objPresStateDS.GetLayerGraphicObjectCount ()

lTextObjectCount = objPresStateDS.GetTextObjectCount()
' Or:
'lTextObjectCount = objPresStateDS.GetLayerTextObjectCount()

sMsg = "Graphic Layer: " & objPresStateDS.GetLayerName() & vbNewLine & "Graphic object count: " & lGraphicObjectCount & vbNewLine & "Text object count: " & lTextObjectCount & vbNewLine & vbNewLine

lCount = objPresStateDS.GetLayerImageRefCount()
If lCount = 0 Then
sMsg = sMsg & "The annotations defined in this Item apply to all the " & "images listed in the ""Presentation State Module""."
Else
sMsg = sMsg & "Referenced SOP Instance UID(s):" & vbNewLine
For I = 0 To lCount - 1
sMsg = sMsg & " " & objPresStateDS.GetLayerImageRefInstanceUID(I) & vbNewLine
Next
End If

MessageBox.Show(sMsg, "Graphic Annotation Item")

' Enumerate all the graphic objects in the current Item
For I = 0 To lGraphicObjectCount - 1
objPresStateDS.GetGraphicObjectAttributes(I)
With objPresStateDS.GraphicObjectAttributes
sMsg = "Graphic Annotation Units: "
Select Case .Units
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Graphic Type: "
Select Case .Type
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POINT
sMsg = sMsg & "POINT" & vbNewLine
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE
sMsg = sMsg & "POLYLINE" & vbNewLine
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED
sMsg = sMsg & "INTERPOLATED" & vbNewLine
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE
sMsg = sMsg & "CIRCLE" & vbNewLine
Case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE
sMsg = sMsg & "ELLIPSE" & vbNewLine
End Select

If .Filled Then
sMsg = sMsg & "Graphic Filled: Y" & vbNewLine
Else
sMsg = sMsg & "Graphic Filled: N" & vbNewLine
End If

lCount = .PointCount
sMsg = sMsg & "Number of Graphic Points: " & lCount & vbNewLine

If lCount < 10 Then
sMsg = sMsg & "Graphic Data: " & vbNewLine
For J = 0 To lCount - 1
sMsg = sMsg & " " & "X" & J + 1 & ", Y" & J + 1 & " = " & .PointsX(J) & ", " & .PointsY (J) & vbNewLine
Next
End If

MessageBox.Show(sMsg, "Graphic Annotation Object")
End With
Next

' Enumerate all the text objects in the current Item
For I = 0 To lTextObjectCount - 1
objPresStateDS.GetTextObjectAttributes(I)
With objPresStateDS.TextObjectAttributes
If .BoundingBoxUsed Then
sMsg = "Unformatted Text Value: " & .TextValue & vbNewLine

sMsg = sMsg & "Bounding Box Annotation Units: "
Select Case .BoundingBoxUnits
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Bounding Box Top Left Hand Corner: " & .BoundingBoxTLHCornerX & ", " & .BoundingBoxTLHCornerY & vbNewLine

sMsg = sMsg & "Bounding Box Bottom Right Hand Corner: " & .BoundingBoxBRHCornerX & ", " & .BoundingBoxBRHCornerY & vbNewLine

sMsg = sMsg & "Bounding Box Text Horizontal Justification: "
Select Case .BoundingBoxTextJustification
Case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_LEFT
sMsg = sMsg & "LEFT" & vbNewLine
Case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_RIGHT
sMsg = sMsg & "RIGHT" & vbNewLine
Case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_CENTER
sMsg = sMsg & "CENTER" & vbNewLine
End Select
Else
sMsg = "Unformatted Text Value: " & .TextValue & vbNewLine

sMsg = sMsg & "Anchor Point Annotation Units: "
Select Case .AnchorPointUnits
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL
sMsg = sMsg & "PIXEL" & vbNewLine
Case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY
sMsg = sMsg & "DISPLAY" & vbNewLine
End Select

sMsg = sMsg & "Anchor Point: " & .AnchorPointX & ", " & .AnchorPointY & vbNewLine

If .AnchorPointVisible Then
sMsg = sMsg & "Anchor Point Visibility: Y"
Else
sMsg = sMsg & "Anchor Point Visibility: N"
End If
End If

MessageBox.Show(sMsg, "Text Annotation Object")
End With
Next
Loop While objPresStateDS.MoveNextGraphicAnnItem() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS
End If
End Sub


Examining Annotations (2) Example for VB.NET

Private Sub ExamineAnnotations2(ByRef objPresStateDS As LTDICLib.LEADDicomDS)
Dim sRefSOPInstanceUID As String

' Pick one of the images referenced in the "Presentation State Module" and
' get its SOP Instance UID
If objPresStateDS.FindFirstPresStateRefSeriesItem() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
If objPresStateDS.GetPresStateImageRefCount() > 0 Then
sRefSOPInstanceUID = objPresStateDS.GetPresStateImageRefInstanceUID(0)
End If
End If

' Find the SOP Class UID of that image
If objPresStateDS.FindPresStateRefImageItem(sRefSOPInstanceUID) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
If objPresStateDS.MoveChildElement() = 0 Then
If objPresStateDS.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_SOP_CLASS_UID, True) = 0 Then
If objPresStateDS.GetStringValue(0, 1) = 0 Then
MessageBox.Show(objPresStateDS.StringValues(0), "Referenced SOP Class UID")
End If
End If
End If
End If

' Remove the reference to that image from the "Presentation State Module"
objPresStateDS.RemovePresStateImageRef(sRefSOPInstanceUID)

' Pick a Graphic Annotation Item
Dim hGraphicAnnotationItem As Integer
Dim sGraphicLayer As String
If objPresStateDS.FindFirstGraphicAnnItem() = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
hGraphicAnnotationItem = objPresStateDS.CurrentElement.hElement

' Pick an image reference
If objPresStateDS.GetLayerImageRefCount() > 0 Then
sRefSOPInstanceUID = objPresStateDS.GetLayerImageRefInstanceUID(0)
objPresStateDS.FindLayerRefImageItem(sRefSOPInstanceUID)

' Display one of the attributes of the Referenced Image Item
If objPresStateDS.MoveChildElement() = 0 Then
If objPresStateDS.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_SOP_CLASS_UID, True) = 0 Then
If objPresStateDS.GetStringValue(0, 1) = 0 Then
MessageBox.Show("Referenced SOP Class UID: " & objPresStateDS.StringValues(0), "Referenced Image Item")
End If
End If
End If

objPresStateDS.SetCurrentElement(hGraphicAnnotationItem)

' Remove the image reference
objPresStateDS.RemoveLayerImageRef(sRefSOPInstanceUID)

' Remove all references to images that are listed in this Graphic Annotation
' Item (this way, the annotations defined by this Item will be applied to all
' the images listed in the "Presentation State Module")
objPresStateDS.RemoveAllLayerImageRefs()
End If

sGraphicLayer = objPresStateDS.GetLayerName()

' Display some of the layer's attributes
objPresStateDS.GetLayerAttributes(objPresStateDS.GetLayerIndex(sGraphicLayer))
With objPresStateDS.LayerAttributes
MessageBox.Show("Graphic Layer: " & .LayerName & vbNewLine & "Graphic Layer Order: " & .LayerOrder & vbNewLine & "Graphic Layer Description: " & .LayerDescription, "Graphic Layer Attributes")
End With

' Change the layer of this Graphic Annotation Item (the specified new
' layer should already be defined in the "Graphic Layer Module")
objPresStateDS.SetLayerName("ANOTHER_LAYER")

' Pick a graphic annotation object
If objPresStateDS.GetGraphicObjectCount() > 0 Then
objPresStateDS.FindGraphicObjectItem(0)

' Display one of the attributes of this object
If objPresStateDS.MoveChildElement() = 0 Then
' Graphic Type (0070,0023)
If objPresStateDS.FindFirstElement(&H700023, True) = 0 Then
If objPresStateDS.GetStringValue(0, 1) = 0 Then
MessageBox.Show("Graphic Type: " & objPresStateDS.StringValues(0), "Graphic Annotation Object")
End If
End If
End If

objPresStateDS.SetCurrentElement(hGraphicAnnotationItem)

' Remove the object
objPresStateDS.RemoveGraphicObject(0)

' Remove all the graphic annotation objects defined by this Graphic
' Annotation Item
objPresStateDS.RemoveAllGraphicObjects()
' Or:
'objPresStateDS.RemoveLayerGraphicObjects
End If

' Pick a text annotation object
If objPresStateDS.GetTextObjectCount() > 0 Then
objPresStateDS.FindTextObjectItem(0)

' Display one of the attributes of this object
If objPresStateDS.MoveChildElement() = 0 Then
' Unformatted Text Value (0070,0006)
If objPresStateDS.FindFirstElement(&H700006, True) = 0 Then
If objPresStateDS.GetStringValue(0, 1) = 0 Then
MessageBox.Show("Unformatted Text Value: " & objPresStateDS.StringValues(0), "Text Annotation Object")
End If
End If
End If

objPresStateDS.SetCurrentElement(hGraphicAnnotationItem)

' Remove the object
objPresStateDS.RemoveTextObject(0)

' Remove all the text annotation objects defined by this Graphic
' Annotation Item objPresStateDS.RemoveAllTextObjects()
' Or:
'objPresStateDS.RemoveLayerTextObjects
End If
End If

' Remove all references to images that are listed in all the Graphic Annotation
' Items (this way, the annotations defined by all the Items will be applied to all
' the images listed in the "Presentation State Module")
objPresStateDS.RemoveAllLayersImageRefs()

' Remove all references to images from the "Presentation State Module"
objPresStateDS.RemoveAllPresStateImageRefs()

' Pick one of the layers
If objPresStateDS.LayerCount > 0 Then
objPresStateDS.FindLayerItem(0)

' Display one of the attributes of this layer
If objPresStateDS.MoveChildElement() = 0 Then
' Graphic Layer (0070,0002)
If objPresStateDS.FindFirstElement(&H700002, True) = 0 Then
If objPresStateDS.GetStringValue(0, 1) = 0 Then
MessageBox.Show("Graphic Layer: " & objPresStateDS.StringValues(0), "Graphic Layer")
End If
End If
End If

' Remove the layer
objPresStateDS.RemoveLayer(0, True)

      '
 Remove all the layers defined in the "Graphic Layer Module"
objPresStateDS.RemoveAllLayers(True)
End If
End Sub


Extracting a Wave Stream From a Data Set Example for VB.NET

Function GetWaveFileFromDataSet(ByRef objDataSet As LTDICLib.LEADDicomDS, ByRef sResultingWaveFilename As String) As Boolean

GetWaveFileFromDataSet = False

'Do we have any waveforms in the Data Set?
If objDataSet.GetWaveformGroupCount() < 1 Then
Exit Function
End If

Dim objAudioWaveformGroup As New LTDICLib.DicomWaveformGroup
objAudioWaveformGroup.EnableMethodErrors = False

' Extract the first waveform group
If objDataSet.GetWaveformGroup(0, objAudioWaveformGroup) <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Exit Function
End If

' Extract the wave stream from the waveform group and save it to disk
If objAudioWaveformGroup.SaveAudio(sResultingWaveFilename) <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Exit Function
End If

GetWaveFileFromDataSet = True
End Function


FindFirstElement Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestFindFirstElement()
'Find the first image element and display it
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to first element in Data Set
LEADDICOM1.MoveFirstElement(False)

LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
LEADDICOM1.GetBitmapValue (0, 0, LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)

'find each image
While (True)
LEADDICOM1.FindNextElement(False)
LEADDICOM1.GetBitmapValue(0, 0, LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)
End While

MOVEELEMENTERROR:
MessageBox.Show("No More Images")

End Sub


FindIndexModule Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestFindIndexModule()
Dim lCount As Integer
Dim szOut As String
Dim x As Integer

LEADDICOM1.EnableMethodErrors = False
lCount = LEADDICOM1.GetModuleCount
LEADDICOM1.GetInfoDS()
szOut = "Found " & CStr(lCount) & " Modules" & Chr(10) & Chr(13)
For x = 0 To lCount - 1
LEADDICOM1.FindIndexModule(x)
LEADDICOM1.FindModuleIOD(LEADDICOM1.InfoClass,
LEADDICOM1.CurrentModule.Module)
szOut = szOut & "Module " & LEADDICOM1.CurrentIOD.Name & Chr(10) & Chr(13)
Next
MessageBox.Show(szOut)
LEADDICOM1.EnableMethodErrors = True

End Sub


FindLastElement Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestFindLastElement()
'Find the last image element and display it
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to last element in Data Set
LEADDICOM1.MoveLastElement(False)

LEADDICOM1.FindLastElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
LEADDICOM1.GetBitmapValue(0, 0, LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)

'find each image
While (True)
LEADDICOM1.FindPrevElement(False)
LEADDICOM1.GetBitmapValue(0, 0, LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)
End While

MOVEELEMENTERROR:
MessageBox.Show("No More Images")

End Sub


FindModule Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestFindModule ( )
Dim nRet As Short
LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.FindModule(LTDICLib.DicomModuleConstants.DICOM_MODULE_NM_TOMO_ACQUISITION)
If nRet <> 0 Then
MessageBox.Show("Not Found")
Else
LEADDICOM1.GetInfoDS()
LEADDICOM1.FindModuleIOD(LEADDICOM1.InfoClass, LTDICLib.DicomModuleConstants.DICOM_MODULE_NM_TOMO_ACQUISITION)
MessageBox.Show("Found Module " & LEADDICOM1.CurrentIOD.Name)
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


FindModuleIOD Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestFindModuleIOD()
Dim szPrompt As String

LEADDICOM1.EnableMethodErrors = True
On Error GoTo FINDIODERROR
'Find a Module
LEADDICOM1.FindModuleIOD(LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, LTDICLib.DicomModuleConstants.DICOM_MODULE_BIPLANE_IMAGE)
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)

LEADDICOM1.SetIODName("New IOD Name #1")
LEADDICOM1.SetIODDescription("New IOD Description #1")
szPrompt = "Name: " & LEADDICOM1.CurrentIOD.Name & Chr(13)
szPrompt = szPrompt & "Desc: " & LEADDICOM1.CurrentIOD.Description
MessageBox.Show(szPrompt)

'Find a Class
LEADDICOM1.FindClassIOD(LTDICLib.DicomClassConstants.DICOM_CLASS_PRINT_QUEUE)
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)

LEADDICOM1.SetIODName("New IOD Name #2")
LEADDICOM1.SetIODDescription("New IOD Description #2")
szPrompt = "Name: " & LEADDICOM1.CurrentIOD.Name & Chr(13)
szPrompt = szPrompt & "Desc: " & LEADDICOM1.CurrentIOD.Description
MessageBox.Show(szPrompt)

Exit Sub

FINDIODERROR:
MessageBox.Show("Error")

End Sub


FindPresentationAbstract Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestFindPresentationAbstract ( )
Const UID_VERIFICATION_CLASS As String = "1.2.840.10008.1.1" ' Verification SOP Class

Dim nID As Short
Dim hPDU As Integer

'get the associate object for this client computer's connection
hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)

'find the id for UID_VERIFICATION_CLASS within this association
'if it is supported by the association
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, UID_VERIFICATION_CLASS)
If (nID = 0) Then
MessageBox.Show("Not Supported by this association!")
Else
MessageBox.Show("Found: " & CStr(nID))
End If

End Sub


GetAgeValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetAgeValue()
Dim lCount As Integer
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the Age Value
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_AGE, LTDICLib.DicomVRCodeConstants.VR_AS, False, 0)

'insert an Age value into the element
LEADDICOM1.AgeValueCount = 1
LEADDICOM1.AgeValues(0).Number = 21
LEADDICOM1.AgeValues(0).Reference = CShort(Asc("Y"))

'set the age
nRet = LEADDICOM1.SetAgeValue(1)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If

LEADDICOM1.AgeValueCount = 0 'free the value

'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the value
nRet = LEADDICOM1.GetAgeValue(0, lCount)
'display the value
Text1.Text = "Number: " & CStr(LEADDICOM1.AgeValues (0).Number) & "Ref: " & Chr(LEADDICOM1.AgeValues(0).Reference)
LEADDICOM1.EnableMethodErrors = True MessageBox.Show("wait")
End Sub


GetApplication Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetApplication ( )
Dim hPDU As Integer

hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)
'display current Application Context
MessageBox.Show(LEADDICOMNet1.GetApplication(hPDU))
'change it
LEADDICOMNet1.SetApplication(hPDU, "9.9.999.99999.9.9.9.9")
MessageBox.Show(LEADDICOMNet1.GetApplication(hPDU))
End Sub


GetAuthenticationAlgorithmTLS Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetAuthenticationAlgorithmTLS ( )
If LEADDICOMNet1.GetAuthenticationAlgorithmTLS(LEADDICOMNet1.hNet, LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = LTDNCLib.DicomMutualAuthMethod.DICOM_MUTUALAUTH_RSA Then
MessageBox.Show("Mutual authentication in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MUTUALAUTH_RSA")
End If
End Sub


GetBinaryValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetBinaryValue()
Dim lCount As Integer
Dim x As Integer
Dim nRet As Short
Dim nLen As Short
Dim byteVal As Byte
Dim szBytes As String
Dim szByte As String

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()
Text1.Visible = True
Text1.Text = ""

'insert some bytes into the element
szBytes = "This is a Test 1234!"
nLen = Len(szBytes)
LEADDICOM1.BinaryValueCount = nLen
For x = 0 To nLen - 1
szByte = Mid(szBytes, x + 1, 1)
byteVal = CByte(Asc(szByte))
LEADDICOM1.BinaryValues(x) = CShort(byteVal)
Next
'set the bytes
nRet = LEADDICOM1.SetBinaryValue(nLen)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
LEADDICOM1.BinaryValueCount = 0 'free the values

'get the byte count
lCount = LEADDICOM1.CurrentElement.Length
MessageBox.Show("There are " & CStr(lCount) & " bytes!")

'get the bytes
nRet = LEADDICOM1.GetBinaryValue(lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.BinaryValueCount - 1
'display each byte as a char separated by a space
Text1.Text = Text1.Text & " " & Chr(LEADDICOM1.BinaryValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("wait")

End Sub


GetBitmapCount Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestGetBitmapCount()
Dim lCount As Integer

lCount = LEADDICOM1.GetBitmapCount
If (lCount = 1) Then
'get the bitmap
LEADDICOM1.GetBitmapValue(0, 0, LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0 'free the image
ElseIf (lCount > 1) Then
'get the bitmap list
LEADDICOM1.GetBitmapListValue(0, lCount, 0, LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0)
LEADRasterView1.Raster.BitmapList = LEADDICOM1.BitmapList
MessageBox.Show("There are " & CStr(LEADDICOM1.BitmapListCount) & " Images")
LEADDICOM1.BitmapList = 0 'free the image
'play the animation
LEADRasterView1.AnimationLoop = True
LEADRasterView1.AnimationEnable = True
Else
MessageBox.Show("No Image!")
End If
MessageBox.Show("wait")

End Sub


GetCharValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetCharValue()
Dim lCount As Integer
Dim x As Integer
Dim nRet As Short
Dim nLen As Short
Dim szChars As String
Dim szChar As String
Dim byteVal As Byte

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the Char Values
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, LTDICLib.DicomVRCodeConstants.VR_OB, False, 0)

Text1.Visible = True
Text1.Text = ""

'insert some char values into the element
szChars = "This is a Test 1234!"
nLen = Len(szChars)
LEADDICOM1.CharValueCount = nLen
For x = 0 To nLen - 1
szChar = Mid(szChars, x + 1, 1)
byteVal = CByte(Asc(szChar))
LEADDICOM1.CharValues(x) = CShort(byteVal)
Next
'set the chars
nRet = LEADDICOM1.SetCharValue(nLen)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
LEADDICOM1.CharValueCount = 0 'free the values

'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the values
nRet = LEADDICOM1.GetCharValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.CharValueCount - 1
'display each value separated by a '.'
Text1.Text = Text1.Text & "." & Chr(LEADDICOM1.CharValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("wait")
End Sub


GetConvertValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text5" of type "TextBox" from ".NET Framework".
Private Sub TestGetConvertValue()
Dim nRet As Short
Dim lCount As Integer
Dim x As Integer

'add some values to the element
'note, this will only work for elements that have a VR that supports multiple values
LEADDICOM1.EnableMethodErrors = False
LEADDICOM1.StringValueCount = 3
LEADDICOM1.StringValues(0) = CStr(3.45)
LEADDICOM1.StringValues(1) = CStr(9.99)
LEADDICOM1.StringValues(2) = CStr(1.11)

nRet = LEADDICOM1.SetConvertValue 'free the current values
LEADDICOM1.StringValueCount = 0

'now get the values and display them
nRet = LEADDICOM1.GetConvertValue()
If (nRet = 0) Then
lCount = LEADDICOM1.StringValueCount
Text5.Text = ""
For x = 0 To lCount - 1
'display each value on a separate line
Text5.Text = Text5.Text & LEADDICOM1.StringValues(x) & Chr(13) & Chr(10)
Next x
End If
LEADDICOM1.EnableMethodErrors = True

End Sub


GetDateTimeValue Example for VB.NET

Currently no DICOM Tags support the VR that this value requires.


GetDateValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetDateValue()
Dim lCount As Integer
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the Date Value
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, LTDICLib.DicomVRCodeConstants.VR_DA, False, 0)

'insert an Date value into the element
LEADDICOM1.DateValueCount = 1
LEADDICOM1.DateValues(0).Year = 1971
LEADDICOM1.DateValues(0).Month = 12
LEADDICOM1.DateValues(0).Day = 12

'set the date nRet =
LEADDICOM1.SetDateValue(1)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If

LEADDICOM1.DateValueCount = 0 'free the value

Text1.Visible = True
Text1.Text = ""

'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the value
nRet = LEADDICOM1.GetDateValue(0, lCount)
'display the value
Text1.Text = "Year: " & CStr(LEADDICOM1.DateValues(0).Year) & " Month: " & CStr(LEADDICOM1.DateValues(0).Month & " Day: " & CStr(LEADDICOM1.DateValues(0).Day))
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("wait")

End Sub


GetDoubleValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetDoubleValue()
Dim lCount As Integer
Dim x As Integer
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the Double Values
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants4.TAG_REFERENCE_PIXEL_PHYSICAL_VALUE_X, LTDICLib.DicomVRCodeConstants.VR_FD, False, 0)
Text1.Visible = True
Text1.Text = ""

'insert some Double values into the element
LEADDICOM1.DoubleValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.DoubleValues(x) = 10 * x * 199.77
Next
'set the floats
nRet = LEADDICOM1.SetDoubleValue(5)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
LEADDICOM1.DoubleValueCount = 0 'free the values

Text1.Visible = True
Text1.Text = ""
'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the values
nRet = LEADDICOM1.GetDoubleValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.DoubleValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.DoubleValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True

End Sub


GetElementLevel Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestGetElementLevel()
Dim x As Integer
Dim lLevel As Integer

'Navigate the Data Set as a List, not as a Tree
'Move to the 20th element, and then find that element's level in the Tree
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to first element in Data Set
LEADDICOM1.MoveFirstElement(False)

'move to the 20th element
For x = 2 To 20
LEADDICOM1.MoveNextElement(False)
Next

LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
lLevel = LEADDICOM1.GetElementLevel
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name & " at level " & CStr(lLevel))

Exit Sub

MOVEELEMENTERROR:
MessageBox.Show("Error")

End Sub


GetEncryptionAlgorithmTLS Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetEncryptionAlgorithmTLS ( )
If LEADDICOMNet1.GetEncryptionAlgorithmTLS(LEADDICOMNet1.hNet, LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = LTDNCLib.DicomEncryptionMethod.DICOM_CRYPT_3DES Then
MessageBox.Show("Encryption in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_CRYPT_3DES")
End If
End Sub


GetEncryptKeyLengthTLS Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetEncryptKeyLengthTLS ( )
MessageBox.Show("Effective key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is " & LEADDICOMNet1.GetEncryptKeyLengthTLS(LEADDICOMNet1.hNet, LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA))
End Sub


GetExtendedData Example for VB.NET

'This example uses the predefined variable "LEADDICOMNet1" of type "LEADDicomNet" from "LEADTOOLS Toolkit".
Private Sub TestGetExtendedData ( )
Dim x As Integer
Dim n As Integer
Dim szOut As String
Dim ExtData As Object
Dim Data As Object
Dim ttt(4) As Byte

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)

'add some extended data for the first presentation context ttt(0) = 0 ttt(1) = 1 ttt(2) = 1 ttt(3) = 0 ttt(4) = 1

ExtData = ttt LEADDICOMNet1.SetExtendedData(LEADDICOMNet1.hPDU, 1, ExtData, 5)

'now, display the information
n = LEADDICOMNet1.GetExtendedDataLength(LEADDICOMNet1.hPDU, 1)
szOut = "Extended Data" & Chr(13)

Data = LEADDICOMNet1.GetExtendedData(LEADDICOMNet1.hPDU, 1)
For x = 0 To n - 1
szOut = szOut & CStr(x) & " = "
szOut = szOut & CStr(Data(x)) & Chr(13)
Next
MessageBox.Show(szOut)

End Sub


GetFloatValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetFloatValue()
Dim lCount As Integer
Dim x As Integer
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the Float Values
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants4.TAG_TABLE_OF_PARAMETER_VALUES, LTDICLib.DicomVRCodeConstants.VR_FL, False, 0)
Text1.Visible = True
Text1.Text = ""

'insert some float values into the element
LEADDICOM1.FloatValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.FloatValues(x) = x * 1.99
Next
'set the floats
nRet = LEADDICOM1.SetFloatValue(5)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
LEADDICOM1.FloatValueCount = 0 'free the values

Text1.Visible = True
Text1.Text = ""

'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the values
nRet = LEADDICOM1.GetFloatValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.FloatValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.FloatValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("wait")

End Sub


GetImageInformation Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestGetImageInformation()
Dim msg As String
LEADDICOM1.GetImageInformation(0)
msg = "Compression: " & CStr(LEADDICOM1.ImageInfo.Compression) & Chr(13) & Chr(10)
msg = msg & "Photometric: " & CStr(LEADDICOM1.ImageInfo.Photometric) & " - " & LEADDICOM1.ImageInfo.PhotometricString & Chr(13) & Chr(10)
msg = msg & "Rows x Columns: " & CStr(LEADDICOM1.ImageInfo.Rows) & " x " & LEADDICOM1.ImageInfo.Columns & Chr(13) & Chr(10)
msg = msg & "Bits Allocated: " & CStr(LEADDICOM1.ImageInfo.BitsAllocated) & Chr(13) & Chr(10)
msg = msg & "Bits Stored: " & CStr(LEADDICOM1.ImageInfo.BitsStored) & Chr(13) & Chr(10)
msg = msg & "High Bit: " & CStr(LEADDICOM1.ImageInfo.HighBit) & Chr(13) & Chr(10)
msg = msg & "Pixel Representation: " & CStr(LEADDICOM1.ImageInfo.PixelRepresentation) & Chr(13) & Chr(10)
msg = msg & "Planar Configuration: " & CStr(LEADDICOM1.ImageInfo.PlanarConfiguration) & Chr(13) & Chr(10)
msg = msg & "ResolutionX: " & CStr(LEADDICOM1.ImageInfo.ResolutionX) & Chr(13) & Chr(10)
msg = msg & "ResolutionY: " & CStr(LEADDICOM1.ImageInfo.ResolutionY) & Chr(13) & Chr(10)
msg = msg & "SmallestImagePixelValue: " & CStr(LEADDICOM1.ImageInfo.SmallestImagePixelValue) & Chr(13) & Chr(10)
msg = msg & "SmallestImagePixelValueFlag: " & LEADDICOM1.ImageInfo.SmallestImagePixelValueFlag & Chr(13) & Chr(10)
msg = msg & "LargestImagePixelValue: " & CStr(LEADDICOM1.ImageInfo.LargestImagePixelValue) & Chr(13) & Chr(10)
msg = msg & "LargestImagePixelValueFlag: " & LEADDICOM1.ImageInfo.LargestImagePixelValueFlag & Chr(13) & Chr(10)
msg = msg & "RedEntries: " & CStr(LEADDICOM1.ImageInfo.RedEntries) & Chr(13) & Chr(10)
msg = msg & "RedFirst: " & CStr(LEADDICOM1.ImageInfo.RedFirst) & Chr(13) & Chr(10)
msg = msg & "RedBits: " & CStr(LEADDICOM1.ImageInfo.RedBits) & Chr(13) & Chr(10)
msg = msg & "GreenEntries: " & CStr(LEADDICOM1.ImageInfo.GreenEntries) & Chr(13) & Chr(10)
msg = msg & "GreenFirst: " & CStr(LEADDICOM1.ImageInfo.GreenFirst) & Chr(13) & Chr(10)
msg = msg & "GreenBits: " & CStr(LEADDICOM1.ImageInfo.GreenBits) & Chr(13) & Chr(10)
msg = msg & "BlueEntries: " & CStr(LEADDICOM1.ImageInfo.BlueEntries) & Chr(13) & Chr(10)
msg = msg & "BlueFirst: " & CStr(LEADDICOM1.ImageInfo.BlueFirst) & Chr(13) & Chr(10)
msg = msg & "BlueBits: " & CStr(LEADDICOM1.ImageInfo.BlueBits) & Chr(13) & Chr(10)
msg = msg & "PaletteEntries: " & CStr(LEADDICOM1.ImageInfo.PaletteEntries) & Chr(13) & Chr(10)
msg = msg & "PaletteFirst: " & CStr(LEADDICOM1.ImageInfo.PaletteFirst) & Chr(13) & Chr(10)
msg = msg & "BitsPerPixel: " & CStr(LEADDICOM1.ImageInfo.BitsPerPixel) & Chr(13) & Chr(10)
msg = msg & "Gray: " & LEADDICOM1.ImageInfo.Gray & Chr(13) & Chr(10)
msg = msg & "Frames: " & CStr(LEADDICOM1.ImageInfo.Frames) & Chr(13) & Chr(10)

MessageBox.Show(msg)

End Sub


GetInfoDS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestGetInfoDS()
Dim szClass As String
Dim szFlags As String

LEADDICOM1.EnableMethodErrors = True
On Error GoTo INFODSERROR
LEADDICOM1.GetInfoDS()
LEADDICOM1.FindClassIOD(LEADDICOM1.InfoClass)
szClass = LEADDICOM1.CurrentIOD.Name
szFlags = Hex(LEADDICOM1.InfoFlags)
MessageBox.Show("Class: " & szClass & Chr(10) & Chr(13) & "Flags: " & szFlags)
Exit Sub

INFODSERROR:
MessageBox.Show("Error")

End Sub


GetIntegrityAlgorithmTLS Example for VB.NET

'This example uses the predefined variable "LEADDICOMNet1" of type "LEADDicomNet" from "LEADTOOLS Toolkit".
Private Sub TestGetIntegrityAlgorithmTLS ( )
If LEADDICOMNet1.GetIntegrityAlgorithmTLS(LEADDICOMNet1.hNet, LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = LTDNCLib.DicomMACTypeConstants.DICOM_MAC_SHA1 Then
MessageBox.Show("Message authentication code in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1")
End If
End Sub


GetKeyExchangeAlgorithmTLS Example for VB.NET

'This example uses the predefined variable "LEADDICOMNet1" of type "LEADDicomNet" from "LEADTOOLS Toolkit".
Private Sub GetKeyExchangeAlgorithmTLS ( )
If LEADDICOMNet1.GetKeyExchangeAlgorithmTLS(LEADDICOMNet1.hNet, LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) = LTDNCLib.DicomMACTypeConstants.DICOM_MAC_SHA1 Then
MessageBox.Show("Key exchange in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1")
End If
End Sub


GetLongValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetLongValue()
Dim lCount As Integer
Dim x As Integer
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the Long Values
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_OFFSET_FIRST_ROOT_DIRECTORY, LTDICLib.DicomVRCodeConstants.VR_UL, False, 0)
Text1.Visible = True
Text1.Text = ""

'insert some long values into the element
LEADDICOM1.LongValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.LongValues(x) = x * 100000
Next
'set the longs
nRet = LEADDICOM1.SetLongValue(5)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
LEADDICOM1.LongValueCount = 0 'free the values

'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the values
nRet = LEADDICOM1.GetLongValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.LongValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.LongValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("wait")

End Sub


GetModuleCount Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestGetModuleCount ( )
Dim lCount As Integer

lCount = LEADDICOM1.GetModuleCount
MessageBox.Show("Module Count: " & CStr(lCount))
End Sub


GetMutualAuthKeyLengthTLS Example for VB.NET

'This example uses the predefined variable "LEADDICOMNet1" of type "LEADDicomNet" from "LEADTOOLS Toolkit".
Private Sub TestGetMutualAuthKeyLengthTLS ( )
MessageBox.Show("Mutual authentication key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is " & LEADDICOMNet1.GetMutualAuthKeyLengthTLS(LEADDICOMNet1.hNet, LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA))
End Sub


GetPeerAuthDataISCL Example for VB.NET

'This example uses the predefined variable "LEADDICOMNet1" of type "LEADDicomNet" from "LEADTOOLS Toolkit".
Private Sub TestGetPeerAuthDataISCL ( )
Dim buf As Object
Dim nLen As Integer
LEADDICOMNet1.GetPeerAuthDataISCL(LEADDICOMNet1.hNet, buf, nLen)

   MessageBox.Show("1st
 byte of data = " & buf(0) & ", last byte of data = "
 & buf(nLen - 1))
End Sub


GetPeerEncryptionISCL Example for VB.NET

'This example uses the predefined variable "LEADDICOMNet1" of type "LEADDicomNet" from "LEADTOOLS Toolkit".
Private Sub TestGetPeerEncryptionISCL ( )
Dim strEncr As String
strEncr = "Unknown"
If LEADDICOMNet1.GetPeerEncryptionISCL(LEADDICOMNet1.hNet) = LTDNCLib.DicomEncryptionMode.DICOM_ISCL_ENCRYPT_NONE Then
strEncr = "None"
ElseIf LEADDICOMNet1.GetPeerEncryptionISCL(LEADDICOMNet1.hNet) = LTDNCLib.DicomEncryptionMode.DICOM_ISCL_ENCRYPT_DESCBC Then
strEncr = "DES algorithm, cipher block chaining mode"
End If
MessageBox.Show("Sender tried to send a message with encryption algorithm: " & strEncr)
End Sub


GetPeerMACISCL Example for VB.NET

'This example uses the predefined variable "LEADDICOMNet1" of type "LEADDicomNet" from "LEADTOOLS Toolkit".
Private Sub TestGetPeerMACISCL ()
Dim strMAC As String
strMAC = "SHA algorithm"
If LEADDICOMNet1.GetPeerMACISCL(LEADDICOMNet1.hNet) = LTDNCLib.DicomMsgAuthCode.DICOM_ISCL_MAC_NONE Then
strMAC = "no message authentication code"
ElseIf LEADDICOMNet1.GetPeerMACISCL(LEADDICOMNet1.hNet) = LTDNCLib.DicomMsgAuthCode.DICOM_ISCL_MAC_MD5 Then
strMAC = "MD5 algorithm"
End If
MessageBox.Show("Sender tried to send a message with MAC " & strMAC)
End Sub


GetPeerRequestedMessageLengthISCL Example for VB.NET

'This example uses the predefined variable "LEADDICOMNet1" of type "LEADDicomNet" from "LEADTOOLS Toolkit".
Private Sub TestGetPeerRequestedMessageLengthISCL ()
MessageBox.Show("Sender tried to send message with length" & LEADDICOMNet1.GetPeerRequestedMessageLengthISCL(LEADDICOMNet1.hNet))
End Sub


GetPresentationAbstract Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetPresentationAbstract ( )
Const UID_CR_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.1"
' Computed Radiography Image Storage
Dim x As Integer
Dim out As String
Dim result As String
Dim nID As Short

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)

'get abstracts for each Presentation Context out = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
result = LEADDICOMNet1.GetPresentationAbstract(LEADDICOMNet1.hPDU, nID)
out = out & result
out = out & Chr(13)
Next
MessageBox.Show(out)

'change the abstracts
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetPresentationAbstract(LEADDICOMNet1.hPDU, nID, UID_CR_IMAGE_STORAGE)
Next

'redisplay out = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
out = out & LEADDICOMNet1.GetPresentationAbstract(LEADDICOMNet1.hPDU, nID)
out = out & Chr(13)
Next
MessageBox.Show(out)

LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU)
End Sub


GetPresentationCount Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetPresentationCount ( )
Const UID_CT_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.2"
' Computed Tomography Image Storage
Dim x As Integer
Dim id As Short
Dim maxid As Short
Dim out As String

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)

'get current id's and display them
out = ""
maxid = 0
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
id = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
out = out & id
out = out & Chr(13)
'store the highest id
If id > maxid Then
maxid = id
Next
MessageBox.Show(out)

id = maxid + 2 'id must be unique and odd number
'change the some ids and then display them all
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
LEADDICOMNet1.SetPresentationID(LEADDICOMNet1.hPDU, x, id)
id = id + 2 'id must be odd number
Next
out = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
out = out & LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
out = out & Chr(13)
Next
MessageBox.Show(out)

'add a presentation context
out = "" LEADDICOMNet1.AddPresentation(LEADDICOMNet1.hPDU, 1, LTDNCLib.AssociateAcceptConstants.PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE)
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
out = out & LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
out = out & Chr(13)
Next
MessageBox.Show(out)

'delete the one we added
out = "" LEADDICOMNet1.DeletePresentation(LEADDICOMNet1.hPDU, 1)
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
out = out & LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
out = out & Chr(13)
Next
MessageBox.Show(out)

LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU)
End Sub


GetPresentationResult Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetPresentationResult ( )
Dim x As Integer
Dim out As String
Dim result As Short
Dim nID As Short

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)

'get current results for each Presentation Context
out = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
result = LEADDICOMNet1.GetPresentationResult(LEADDICOMNet1.hPDU, nID)
out = out & result
out = out & Chr(13)
Next
MessageBox.Show(out)

'change all results to 1
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetPresentationResult(LEADDICOMNet1.hPDU, nID, 1)
Next

'redisplay
out = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
out = out & LEADDICOMNet1.GetPresentationResult(LEADDICOMNet1.hPDU, nID)
out = out & Chr(13)
Next
MessageBox.Show(out)

LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU)
End Sub


GetSendQueueSize Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetSendQueueSize ( )
'display queue size
MessageBox.Show(CStr(LEADDICOMNet1.GetSendQueueSize(LEADDICOMNet1.hNet)), "SendQueueSize")
End Sub


GetServer Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetReceiveAssociateRequest(ByVal hNet As Integer, ByVal hPDU As Integer) Handles LEADDICOMNet1.NetReceiveAssociateRequest
Dim hServer As Integer
Dim szServer As String
Dim lPort As Integer

hServer = LEADDICOMNet1.GetServer(hNet)
If (hServer <> 0) Then
szServer = LEADDICOMNet1.GetHostAddress(hServer)
lPort = LEADDICOMNet1.GetHostPort(hServer)
MessageBox.Show("Server = " & szServer & " Port = " & CStr(lPort))
End If
End Sub


GetShortValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetShortValue()
Dim lCount As Integer
Dim x As Integer
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the Short Values
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_RECORD_IN_USE_FLAG, LTDICLib.DicomVRCodeConstants.VR_US, False, 0)
Text1.Visible = True
Text1.Text = ""

'insert some short values into the element
LEADDICOM1.ShortValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.ShortValues(x) = x * 100
Next
'set the shorts
nRet = LEADDICOM1.SetShortValue(5)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
LEADDICOM1.ShortValueCount = 0 'free the values

'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the values
nRet = LEADDICOM1.GetShortValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.ShortValueCount - 1
'display each value separated by a " X "
Text1.Text = Text1.Text & " X " & CStr(LEADDICOM1.ShortValues(x))
Next
End If
MessageBox.Show("wait")
LEADDICOM1.EnableMethodErrors = True
End Sub


GetStatusISCL Example for VB.NET

' In this example, assume an error occurs in the NetReceive event. The code to
' determine why this happened should look like this:
'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetReceive(ByVal hNet As Integer, ByVal nStatus As Integer, ByVal nType As Short, ByVal pData As Object, ByVal lSize As Integer) Handles LEADDICOMNet1.NetReceive
Dim nStatusISCL As Integer
nStatusISCL = LEADDICOMNet1.GetStatusISCL(hNet)
If nStatus = LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_ISCL_DECRYPT Then
If nStatusISCL = 24 Then
' error decrypting message data
MessageBox.Show("Error decrypting message")
End If
If nStatusISCL = 25 Then
' error decrypting MAC code
MessageBox.Show("Error decrypting MAC code")
End If
End If
End Sub


GetStringValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text5" of type "TextBox" from ".NET Framework".
Private Sub TestGetStringValue()
Dim lCount As Integer
Dim x As Integer
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the String Values
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_IMAGE_TYPE, LTDICLib.DicomVRCodeConstants.VR_CS, False, 0)

'insert some string values into the element
LEADDICOM1.StringValueCount = 5
For x = 0 To 5 - 1
LEADDICOM1.StringValues(x) = "String #" & CStr(x + 1)
Next
'set the strings
nRet = LEADDICOM1.SetStringValue(5)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If

LEADDICOM1.StringValueCount = 0 'free the values

Text5.Visible = True
Text5.Text = ""
'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the values
nRet = LEADDICOM1.GetStringValue(0, lCount)
If (nRet = 0) Then
For x = 0 To LEADDICOM1.StringValueCount - 1
'display each value separated on a separate line
Text5.Text = Text5.Text & Chr(13) & Chr(10) & CStr(LEADDICOM1.StringValues(x))
Next
End If
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("wait")

End Sub


GetTagCount Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestGetTagCount ()
Dim lCount As Integer
lCount = LEADDICOM1.GetTagCount
MessageBox.Show("There are " & CStr(lCount) & " Tag Items.")
End Sub


GetTimeValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestGetTimeValue()
Dim lCount As Integer
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False

'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()

'insert a new element for the Time Value
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_TIME, LTDICLib.DicomVRCodeConstants.VR_TM, False, 0)

'insert an Time value into the element
LEADDICOM1.TimeValueCount = 1
LEADDICOM1.TimeValues(0).Hours = 12
LEADDICOM1.TimeValues(0).Minutes = 25
LEADDICOM1.TimeValues(0).Seconds = 33
LEADDICOM1.TimeValues(0).Fractions = 50

'set the time
nRet = LEADDICOM1.SetTimeValue(1)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If

LEADDICOM1.TimeValueCount = 0 'free the value

Text1.Visible = True
Text1.Text = ""

'get the value count
lCount = LEADDICOM1.GetValueCount
MessageBox.Show("There are " & CStr(lCount) & " values!")

'get the value
nRet = LEADDICOM1.GetTimeValue(0, lCount)
'display the value
Text1.Text = "Hours: " & CStr(LEADDICOM1.TimeValues(0).Hours) & " Minutes: " & CStr(LEADDICOM1.TimeValues(0).Minutes & " Seconds: " & CStr(LEADDICOM1.TimeValues(0).Seconds) & " Fractions: " & CStr(LEADDICOM1.TimeValues(0).Fractions))
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("wait")

End Sub


Getting an overlay bitmap list Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub GettingOverlayBitmapList()
Dim iRet As Short
Dim OverlayAttributesDS As LTRASTERPROCLib.LEADOverlayAttributes
Dim GroupNumber As Integer
Dim bIsOverlayInDataSet As Boolean
Dim cs As String

iRet = LEADDICOM1.GetOverlayAttributes(0, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
OverlayAttributesDS = LEADDICOM1.OverlayAttributes
cs = LEADDICOM1.OverlayActivationLayer(0)
MessageBox.Show(cs)

iRet = LEADDICOM1.GetOverlayBitmapList(0, 0, OverlayAttributesDS.NumberFramesInOverlay, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
LEADRasterView1.Raster.BitmapList = LEADDICOM1.OverlayBitmapList
End Sub


Getting and setting a non-linear VOI LUT Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub GettingSettingNonlinearVOILUT()
' This example will add a new VOI LUT to the dataset or
' replace the existing one(s)
Dim VOILUTAttributes As LTDICLib.LVOILUTAttributes
Dim iRet As Short
Dim lVOILUTCount As Integer
Dim lLUTIndex As Integer
Dim lNewLUTIndex As Integer
Dim lDataSize As Integer
Dim LUTData As Object
Dim bAddVOILUT As Boolean

bAddVOILUT = True
lVOILUTCount = 0
lNewLUTIndex = 0
' Get the number of VOI LUT(s) in the file
lVOILUTCount = LEADDICOM1.VOILUTCount
If (lVOILUTCount > 0) Then

' Get he attributes of the first VOI LUT
iRet = LEADDICOM1.GetVOILUTAttributes(0, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
VOILUTAttributes = LEADDICOM1.VOILUTAttributes
lDataSize = VOILUTAttributes.LUTDescriptorNumberOfEntries
' Get the LUT data
ReDim LUTData(lDataSize)
iRet = LEADDICOM1.GetVOILUTData(0, LUTData, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' Remap the data
For lLUTIndex = 0 To (lDataSize - 1)
LUTData(lLUTIndex) = LUTData(lLUTIndex) / 2
Next
Else
VOILUTAttributes = LEADDICOM1.VOILUTAttributes
' Define our own
LUT VOILUTAttributes.LUTDescriptorFirstMapped = 0
VOILUTAttributes.LUTDescriptorEntryBits = 16
VOILUTAttributes.LUTDescriptorNumberOfEntries = &H10000
lDataSize = VOILUTAttributes.LUTDescriptorNumberOfEntries
ReDim LUTData(lDataSize)
For lLUTIndex = 0 To (lDataSize - 1)
LUTData(lLUTIndex) = lLUTIndex
Next
End If
lNewLUTIndex = lVOILUTCount
If (bAddVOILUT = False) Then
' Delete existing LUT
iRet = LEADDICOM1.DeleteVOILUT(0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
lNewLUTIndex = 0
End If
' Set the new LUT
iRet = LEADDICOM1.SetVOILUT(lNewLUTIndex, LUTData, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
End Sub


Getting and setting window center and width Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub GettingAndSettingWindowCenterAndWidth()
' This example will add a new "Window Width" and
' "Window Center" to the dataset , or replace ' the existing one(s)

Dim bAddWindow As Boolean
Dim WindowAttributes As LTDICLib.LWindowAttributes
Dim iRet As Short
Dim lWindowCount As Short
Dim lWindowIndex As Short
Dim iBitsStored As Short

lWindowCount = 0
lWindowIndex = 0
bAddWindow = True
iBitsStored = 12

lWindowCount = LEADDICOM1.WindowCount
If (lWindowCount > 0) Then
iRet = LEADDICOM1.GetWindowAttributes(0, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
WindowAttributes = LEADDICOM1.WindowAttributes

' Half the width for the first window
WindowAttributes.WindowWidth = WindowAttributes.WindowWidth / 2
WindowAttributes.WindowCenter = WindowAttributes.WindowCenter / 2
Else
' This represents an identity VOI LUT transformation in the case
' where no Modality LUT is specified and the stored pixel data are
' iBitsStored bit unsigned integers.
WindowAttributes = LEADDICOM1.WindowAttributes
WindowAttributes.WindowWidth = 2 ^ iBitsStored
WindowAttributes.WindowCenter = 2 ^ (iBitsStored - 1)
WindowAttributes.WindowCWExplaination = ""
End If
lWindowIndex = lWindowCount
If (bAddWindow = False) Then

' Delete the existing window(s)
iRet = LEADDICOM1.DeleteWindow(0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
lWindowIndex = 0
End If
' Add the new window
iRet = LEADDICOM1.SetWindowAttributes(lWindowIndex, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
End Sub


Getting modality LUT data and attributes Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub GettingModalityLUTDataAndAttributes()
' This example will retrieve the LUT Data (0028,3006)
' under the Modality LUT Sequence (0028,3000)
Dim Ret As Short
' Object that will hold modality LUT attributes
Dim MLUTAttributes As LTDICLib.LModalityLUTAttributes
' Get modality LUT attributes
Ret = LEADDICOM1.GetModalityLUTAttributes(0)
If (Ret <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
MLUTAttributes = LEADDICOM1.ModalityLUTAttributes
' If there is no modality LUT sequence then there is no data !
If (MLUTAttributes.IsModalityLUTSequence = False) Then
MessageBox.Show("No LUT")
Exit Sub
End If
Dim Data As Object
' Retrieve the LUT Data (0028,3006)
LEADDICOM1.GetModalityLUTData(Data, 0)
' Do something with the data
End Sub


Getting palette color LUT data and attributes Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub GettingPaletteColorLUTDataAndAttributes()
' This example will retrieve the data under
' "Red Palette Color Lookup Table Data"(0028,1201)
' element and if the data is segmented it will get the data under
' "Segmented Red Palette Color Lookup Table Data" (0028,1221) and decode it
Dim LUTData As Object
' Object that will hold Palette Color LUT attributes
Dim PaletteColorLUTAttributes As LTDICLib.LPaletteColorLUTAttributes
Dim iRet As Short

' Get "Palette Color Lookup Table" attributes
iRet = LEADDICOM1.GetPaletteColorLUTAttributes(0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
PaletteColorLUTAttributes = LEADDICOM1.PaletteColorLUTAttributes
' Retrieve "Red Palette Color Lookup Table Data"
' This function will automatically decode the LUT data
' if it was segmented
iRet = LEADDICOM1.GetPaletteColorLUTData(LUTData, LTDICLib.DicomPaletteColorLUTConstants.DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0)
'do something with vData '...
End Sub


Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
'This example uses the predefined variable "LEADRasterView2" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub GettingAttributesAndBitmapsForAllOverlaysInsideDICOMDataset()
' This example will extract the overlays from a
' DICOM dataset and associate them with a bitmap,
' the bitmap is assumed to be extracted from the
' same DICOM dataset.
Dim iRet As Short
Dim lOverlayCount As Integer
Dim lOverlayIndex As Integer
Dim OverlayAttributesDS As LTRASTERPROCLib.LEADOverlayAttributes
Dim OverlayAttributesRaster As LTRASTERPROCLib.LEADOverlayAttributes
Dim RasterProcess As New LTRASTERPROCLib.LEADRasterProcess
Dim GroupNumber As Integer
Dim bIsOverlayInDataSet As Boolean
Dim iLEADOverlayIndex As Short
Dim lFlags As Integer
Dim crColor As Integer
lOverlayCount = 0
lOverlayIndex = 0
GroupNumber = 0
bIsOverlayInDataSet = False
iLEADOverlayIndex = 0
lFlags = 0

LEADDICOM1.GetBitmapValue(0, 0, LTDICLib.DicomColorOrderConstants.ORDER_BGRORGRAY, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap

' Do we have any overlays at all?
lOverlayCount = LEADDICOM1.OverlayCount
If (lOverlayCount = 0) Then
Exit Sub
End If

' Go through the overlays one by one
lOverlayIndex = 0
iLEADOverlayIndex = 0
' Reset the overlay bitmap
If (LEADRasterView2.Raster.Bitmap > 0) Then
LEADRasterView2.Raster.Free()
End If
LEADRasterView2.Raster.CreateBitmap(1, 1, 1)
While (lOverlayIndex < lOverlayCount)
NEXTINDEX:
GroupNumber = 0
bIsOverlayInDataSet = False
lFlags = 0
' Get the attributes of this overlay
iRet = LEADDICOM1.GetOverlayAttributes(lOverlayIndex, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
GroupNumber = LEADDICOM1.OverlayGroupNumber(lOverlayIndex, 0)
bIsOverlayInDataSet = LEADDICOM1.IsOverlayInDataSet(lOverlayIndex, 0)

If (bIsOverlayInDataSet = False) Then
lOverlayIndex = lOverlayIndex + 1
GoTo NEXTINDEX
End If

OverlayAttributesDS = LEADDICOM1.OverlayAttributes
OverlayAttributesRaster = RasterProcess.OverlayAttributes

' Auto paint and process overlays
lFlags = OverlayAttributesDS.Flags
lFlags = lFlags Or LTRASTERPROCLib.OverlayAttributesFlagsConstants.OVERLAY_AUTOPAINT Or LTRASTERPROCLib.OverlayAttributesFlagsConstants.OVERLAY_AUTOPROCESS
OverlayAttributesRaster.Flags = lFlags
OverlayAttributesRaster.OriginX = OverlayAttributesDS.OriginX
OverlayAttributesRaster.OriginY = OverlayAttributesDS.OriginY
crColor = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.White)
OverlayAttributesRaster.Color = System.Convert.ToUInt32(crColor)
OverlayAttributesRaster.BitPosition = OverlayAttributesDS.BitPosition
OverlayAttributesRaster.Rows = OverlayAttributesDS.Rows
OverlayAttributesRaster.Columns = OverlayAttributesDS.Columns
OverlayAttributesRaster.Type = OverlayAttributesDS.Type
OverlayAttributesRaster.BitsAllocated = OverlayAttributesDS.BitsAllocated
OverlayAttributesRaster.Subtype = OverlayAttributesDS.Subtype
OverlayAttributesRaster.Label = OverlayAttributesDS.Label
OverlayAttributesRaster.ROIArea = OverlayAttributesDS.ROIArea
OverlayAttributesRaster.ROIMean = OverlayAttributesDS.ROIMean
OverlayAttributesRaster.ROIStandardDeviation = OverlayAttributesDS.ROIStandardDeviation
OverlayAttributesRaster.NumberFramesInOverlay = OverlayAttributesDS.NumberFramesInOverlay
OverlayAttributesRaster.ImageFrameOrigin = OverlayAttributesDS.ImageFrameOrigin
OverlayAttributesRaster.ActivationLayer = OverlayAttributesDS.ActivationLayer
OverlayAttributesRaster.Description = OverlayAttributesDS.Description

iRet = RasterProcess.SetOverlayAttributes(LEADRasterView1.Raster, iLEADOverlayIndex, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If

' Is the overlay embedded inside the image data ?
lFlags = OverlayAttributesDS.Flags
If (lFlags And LTRASTERPROCLib.OverlayAttributesFlagsConstants.OVERLAY_USEBITPLANE) Then
' Add this overlay to the list of overlays in the bitmap handle
iRet = RasterProcess.SetOverlayAttributes(LEADRasterView1.Raster, iLEADOverlayIndex, LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_FLAGS Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_BITINDEX Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_ORIGIN Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_DICOM Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_COLOR)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If

' Make sure to extract the overlay data from the image data
iRet = RasterProcess.UpdateOverlayBits(LEADRasterView1.Raster, iLEADOverlayIndex, LTRASTERPROCLib.OverlayBitsConstants.SETOVERLAYBITS_FROMBITMAP)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' The overlay is inside overlay data Else
' Add this overlay to the list of overlays in the bitmap handle
iRet = RasterProcess.SetOverlayAttributes(LEADRasterView1.Raster, iLEADOverlayIndex, LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_FLAGS Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_ORIGIN Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_DICOM Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_COLOR)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' Get the overlay bitmap from the overlay data
iRet = LEADDICOM1.GetOverlayBitmap(lOverlayIndex, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' store it temp. in RasterView2
If (LEADRasterView2.Raster.Bitmap > 0) Then
LEADRasterView2.Raster.Free()
End If
LEADRasterView2.Raster.Bitmap = LEADDICOM1.OverlayBitmap
' Set the bitmap for this overlay inside the ' list of overlays we have in the bitmap handle
iRet = RasterProcess.SetOverlayBitmap(LEADRasterView1.Raster, iLEADOverlayIndex, LEADRasterView2.Raster, LTRASTERPROCLib.OverlayConstants.OVERLAY_COPY)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
End If
lOverlayIndex = lOverlayIndex + 1
iLEADOverlayIndex = iLEADOverlayIndex + 1
End While
End Sub


GetTransferCount Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetTransferCount ( )
Const UID_IMPLICIT_VR_LITTLE_ENDIAN As String = "1.2.840.10008.1.2"
' Implicit VR Little Endian
Const UID_EXPLICIT_VR_BIG_ENDIAN As String = "1.2.840.10008.1.2.2"
' Explicit VR Big Endian
Dim x As Integer
Dim out As String
Dim result As String

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)

'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)

'display each Transfer Syntax for the first Presentation Context
out = ""
For x = 0 To LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0)) - 1
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0), x)
out = out & result
out = out & Chr(13)
Next
MessageBox.Show(out)

'add a transfer syntax
LEADDICOMNet1.AddTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0), UID_IMPLICIT_VR_LITTLE_ENDIAN)

'display each Transfer Syntax for the first Presentation Context
out = ""
For x = 0 To LEADDICOMNet1.GetTransferCount (LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0)) - 1
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0), x)
out = out & result
out = out & Chr(13)
Next
MessageBox.Show(out)

'change them
For x = 0 To LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0)) - 1
LEADDICOMNet1.SetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0), x, UID_EXPLICIT_VR_BIG_ENDIAN)
Next

'display each Transfer Syntax for the first Presentation Context
out = ""
For x = 0 To LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0)) - 1
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0), x)
out = out & result
out = out & Chr(13)
Next
MessageBox.Show(out)

'delete the last one
LEADDICOMNet1.DeleteTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0), LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0)) - 1)

'display each Transfer Syntax for the first Presentation Context
out = ""
For x = 0 To LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0)) - 1
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, 0), x)
out = out & result
out = out & Chr(13)
Next
MessageBox.Show(out)

LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU)
End Sub


GetUIDCount Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestGetUIDCount ( )
Dim lCount As Integer
lCount = LEADDICOM1.GetUIDCount
MessageBox.Show("There are " & CStr(lCount) & " UID Items.")
End Sub


GetUserInfoCount Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetUserInfoCount ()
Dim x As Integer
Dim y As Integer
Dim nType As Short
Dim nLen As Short
Dim pData As Object
Dim out As String
Dim test As Object

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)

'get current user info types, lengths, and data then display them
out = ""
If (LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU) > 0) Then
For x = 0 To LEADDICOMNet1.GetUserInfoCount (LEADDICOMNet1.hPDU) - 1
nType = LEADDICOMNet1.GetUserInfoType(LEADDICOMNet1.hPDU, x)
out = out & "Type: " & CStr(nType)
nLen = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x)
out = out & " Length: " & CStr(nLen)
pData = LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU, x)
out = out & " Data: "
For y = 0 To nLen - 1
out = out & Chr(pData(y))
Next
out = out & Chr(13)
Next
Else
out = "None"
End If
MessageBox.Show(out)

'add a user info item item
out = ""
test = "just a test"
nLen = Len(test)
LEADDICOMNet1.AddUserInfo(LEADDICOMNet1.hPDU, 99, test, Len(test))
out = ""
If (LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU) > 0) Then
For x = 0 To LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU) - 1
nType = LEADDICOMNet1.GetUserInfoType(LEADDICOMNet1.hPDU, x)
out = out & "Type: " & CStr(nType)
nLen = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x)
out = out & " Length: " & CStr(nLen)
pData = LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU, x)
out = out & " Data: "
For y = 0 To nLen - 1
out = out & Chr(pData(y))
Next
out = out & Chr(13)
Next
Else
out = "None"
End If
MessageBox.Show(out)

'for each user info item, change the data
test = "a second test"
For x = 0 To LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU) - 1
nType = LEADDICOMNet1.GetUserInfoType(LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetUserInfo(LEADDICOMNet1.hPDU, x, nType, test, Len(test))
Next
out = ""
If (LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU) > 0) Then
For x = 0 To LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU) - 1
nType = LEADDICOMNet1.GetUserInfoType(LEADDICOMNet1.hPDU, x)
out = out & "Type: " & CStr(nType)
nLen = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x)
out = out & " Length: " & CStr(nLen)
pData = LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU, x)
out = out & " Data: "
For y = 0 To nLen - 1
out = out & Chr(pData(y))
Next
out = out & Chr(13)
Next
Else
out = "None"
End If
MessageBox.Show(out)

'delete the one we added
LEADDICOMNet1.DeleteUserInfo(LEADDICOMNet1.hPDU, LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU) - 1)
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU)
End Sub


GetVRCount Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestGetVRCount ( )
Dim lCount As Integer
lCount = LEADDICOM1.GetVRCount
MessageBox.Show("There are " & CStr(lCount) & " VR Items.")
End Sub


IncludeVolatile Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "List1" of type "ListBox" from ".NET Framework".
'This example uses the predefined variable "List2" of type "ListBox" from ".NET Framework".
Private Sub TestIncludeVolatile ( )
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False
'list all elements
LEADDICOM1.IncludeVolatile = True
nRet = LEADDICOM1.MoveFirstElement(False)
While (nRet = 0)
List1.Items.Add(CStr(LEADDICOM1.CurrentElement.Tag))
nRet = LEADDICOM1.MoveNextElement(False)
End While
MessageBox.Show("Element Count = " & CStr(List1.Items.Count))
'list only non-volatile elements
LEADDICOM1.IncludeVolatile = False
nRet = LEADDICOM1.MoveFirstElement(False)
While (nRet = 0)
List2.Items.Add(CStr(LEADDICOM1.CurrentElement.Tag))
nRet = LEADDICOM1.MoveNextElement(False)
End While
MessageBox.Show("Non Volatile Element Count = " & CStr(List2.Items.Count))
End Sub


InitCS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestInitCS ()
Dim out As String

'create a data set as a command set
LEADDICOM1.InitCS(LTDICLib.DicomCommandSetConstants.COMMAND_C_STORE, True)

'gets information about the command set
LEADDICOM1.GetInfoCS()
out = "Command: " & CStr(LEADDICOM1.InfoCommand)
out = out & Chr(13)
out = out & "Request: " & CStr(LEADDICOM1.InfoRequest)
MessageBox.Show(out)
End Sub


InitDS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestInitDS ( )
'init a DS with default options
LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT + LTDICLib.DicomDataSetFlags.DS_BIG_ENDIAN)
End Sub


InsertBitmapListValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestInsertBitmapListValue()
Dim nRet As Short
Dim IO As New LTRASTERIOLib.LEADRasterIO
Dim Process As New LTRASTERPROCLib.LEADRasterProcess

LEADDICOM1.EnableMethodErrors = False

'move to the first image element and delete what's there
nRet = LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement (False, LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, LTDICLib.DicomVRCodeConstants.VR_OB, False, 0)

'load an image
IO.Load(LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1)
MessageBox.Show("Image loaded from File - Wait")

'create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem(0, LEADRasterView1.Raster.Bitmap)
Process.Flip(LEADRasterView1.Raster)
LEADRasterView2.Raster.InsertBitmapListItem(1, LEADRasterView1.Raster.Bitmap)
Process.Reverse(LEADRasterView1.Raster)
LEADRasterView2.Raster.InsertBitmapListItem(2, LEADRasterView1.Raster.Bitmap)

'insert the image list into the element
nRet = LEADDICOM1.InsertBitmapListValue(LEADRasterView2.Raster.BitmapList, 0, LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
MessageBox.Show("ImageList inserted into Data Set - Wait")

End Sub


InsertBitmapValue Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestInsertBitmapValue()
Dim lCount As Integer
Dim nRet As Short
Dim IO As New LTRASTERIOLib.LEADRasterIO
Dim Process As New LTRASTERPROCLib.LEADRasterProcess

LEADDICOM1.EnableMethodErrors = False

'move to the first image element and delete what's there
nRet = LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, LTDICLib.DicomVRCodeConstants.VR_OB, False, 0)

'load an image
IO.Load(LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1)
MessageBox.Show("Image loaded from File - Wait")

lCount = LEADDICOM1.GetBitmapCount

'insert some images
nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap, lCount, LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)

If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
Process.Flip(LEADRasterView1.Raster)
nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap, lCount + 1, LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0) If (nRet <> 0) Then MessageBox.Show("Error") Exit Sub End If Process.Reverse(LEADRasterView1.Raster) nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap, lCount + 2, LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0) If (nRet <> 0) Then MessageBox.Show("Error") Exit Sub End If

MessageBox.Show("Images inserted - Wait")

End Sub


InsertDS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'LEADDICOM2 is a DICOM Dataset defined outside this method
Private Sub TestInsertDS ( )
   'find the first PATIENT KEY, copy it to a new 'DS, and then save it to a file
   LEADDICOM1.FindFirstKey("PATIENT", False)
   LEADDICOM2.ResetDS()
   LEADDICOM2.InsertDS(LEADDICOM1.hDicomDS, LEADDICOM1.CurrentElement.hElement)
   LEADDICOM2.SaveDS("d:\temp\save.dic", 0)
End Sub


InsertElement Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestInsertElement( )
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False
'insert the new element
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants6.TAG_DISCHARGE_DATE)
nRet = LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants6.TAG_DISCHARGE_DATE, LEADDICOM1.CurrentTag.VR, False, LTDICLib.DicomMiscConstants.ELEMENT_INDEX_MAX)
If (nRet <> 0) Then
MessageBox.Show("Error Inserting Element")
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


Inserting a Context Group Example for VB.NET

Private Sub InsertContextGroup(ByRef objDS As LTDICLib.LEADDicomDS)
' Context Group Version
objDS.DateTimeValueCount = 1
With objDS.DateTimeValues(0)
.Year = 2004
.Month = 3
.Day = 22
.Hours = 0
.Minutes = 0
.Seconds = 0
.Fractions = 0
.Offset = 0
End With

' Insert a (testing) Context Group
objDS.InsertContextGroup("CID XXXX", "New Context Group", True)

objDS.DateTimeValueCount = 0

' Fill the Context Group with some (testing) Coded Concepts
objDS.InsertCodedConcept("CSD1", "", "CV1", "CM1")
objDS.InsertCodedConcept("CSD2", "", "CV2", "CM2")
objDS.InsertCodedConcept("CSD3", "", "CV3", "CM3")

' Refer to Enumerating the Coded Concepts of a Context Group Example
' for VB.NET for the procedure EnumCodedConcepts EnumCodedConcepts(objDS)

' Delete the Context Group
objDS.DeleteContextGroup()
End Sub


Inserting a Wave Stream Into a Data Set Example for VB.NET

Function InsertWaveFileIntoDataSet(ByRef objDataSet As LTDICLib.LEADDicomDS, ByRef sInputWaveFilename As String) As Boolean
InsertWaveFileIntoDataSet = False

Dim objAudioWaveformGroup As New LTDICLib.DicomWaveformGroup
objAudioWaveformGroup.EnableMethodErrors = False

' Load the audio file into the waveform group
If objAudioWaveformGroup.LoadAudio(sInputWaveFilename) <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Exit Function
End If

' Insert the audio waveform group into the Data Set
If objDataSet.AddWaveformGroup(objAudioWaveformGroup) <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Exit Function
End If

InsertWaveFileIntoDataSet = True
End Function


Inserting a Waveform Group Into a Data Set Example for VB.NET

'Inserting a Waveform Group Into a Data Set Example

'*****************************************************************'
'* This is a comprehensive sample, which shows how to insert a *'
'* waveform group with one ECG channel into a Data Set. *'
'* The main function is InsertECGWaveform; the rest of the *'
'* functions are helping functions. *'
'*****************************************************************'

' The main function that creates the waveform group and adds to the Data Set
Function InsertECGWaveform(ByRef objDataSet As LTDICLib.LEADDicomDS, ByRef Samples() As Short) As Boolean
InsertECGWaveform = False

' Our new waveform group
Dim objECGWaveformGroup As New LTDICLib.DicomWaveformGroup

objECGWaveformGroup.EnableMethodErrors = False

' Reset the waveform group, we don't really need to call this!
objECGWaveformGroup.Reset()

' Set the Waveform Sample Interpretation
objECGWaveformGroup.SampleInterpretation = LTDICLib.DicomWaveformSampleInterpretation.WAVEFORM_SAMPLE_INTERPRETATION_SS

Dim lNumberOfSamples As Integer lNumberOfSamples = UBound(Samples) - LBound(Samples) + 1

' Set the Number of Waveform Samples. You can obtain this number by accessing
' the NumberOfSamplesPerChannel property.
If objECGWaveformGroup.SetNumberOfSamplesPerChannel(lNumberOfSamples) <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Exit Function
End If

' Set the Sampling Frequency
objECGWaveformGroup.SamplingFrequency = 240.0#

' No Multiplex Group Time Offset. When the value is defined, it can be set using the
' MultiplexGroupTimeOffset property.
objECGWaveformGroup.ValueDefined(LTDICLib.DicomWaveformGroupValues.MULTIPLEX_GROUP_TIME_OFFSET) = False

' No Trigger Time Offset. When the value is defined, it can be set using the
' TriggerTimeOffset property.
objECGWaveformGroup.ValueDefined(LTDICLib.DicomWaveformGroupValues.TRIGGER_TIME_OFFSET) = False

' No Trigger Sample Position. When the value is defined, it can be set using the
' TriggerSamplePosition property.
objECGWaveformGroup.ValueDefined(LTDICLib.DicomWaveformGroupValues.TRIGGER_SAMPLE_POSITION) = False

' Waveform Originality is ORIGINAL
objECGWaveformGroup.WaveformOriginality = LTDICLib.DicomWaveformOriginality.WAVEFORM_ORIGINALITY_ORIGINAL

' Set the Multiplex Group Label
objECGWaveformGroup.ValueDefined(LTDICLib.DicomWaveformGroupValues.MULTIPLEX_GROUP_LABEL) = True
objECGWaveformGroup.MultiplexGroupLabel = "SCPECG Waveform"

' Set the Waveform Padding Value
objECGWaveformGroup.ValueDefined(LTDICLib.DicomWaveformGroupValues.WAVEFORM_PADDING_VALUE) = True
objECGWaveformGroup.WaveformPaddingValue = 32768

If Not InsertECGChannel(objDataSet, objECGWaveformGroup, Samples) Then
Exit Function
End If

' Delete any waveform groups that already exist in the Data Set
Do While objDataSet.GetWaveformGroupCount() > 0
objDataSet.DeleteWaveformGroup(0)
Loop

' Insert the new waveform group into the Data Set
If objDataSet.AddWaveformGroup(objECGWaveformGroup) <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
Exit Function
End If

InsertECGWaveform = True
End Function

' Adds an ECG channel to the group
Function InsertECGChannel(ByRef objDataSet As LTDICLib.LEADDicomDS, ByRef objWaveformGroup As LTDICLib.DicomWaveformGroup, ByRef Samples() As Short) As Boolean
InsertECGChannel = False

Dim objECGWaveformChannel As LTDICLib.DicomWaveformChannel

' Add a channel to the group
On Error Resume Next
objECGWaveformChannel = objWaveformGroup.Channels.Add ()
If Err.Number <> 0 Then
Exit Function
End If
On Error GoTo 0

' Set the samples of the channel
If objECGWaveformChannel.SetChannelSamples(Samples) < 0 Then
Exit Function
End If

' Set the Channel Source and Sensitivity
If Not SetChannelSourceAndSensitivity(objDataSet, objECGWaveformChannel) Then
Exit Function
End If

' Set the Channel Status
objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_STATUS) = True
objECGWaveformChannel.ChannelStatus = LTDICLib.DicomWaveformChannelStatus.CHANNEL_STATUS_OK

' Set the Channel Time Skew
objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_TIME_SKEW) = True
objECGWaveformChannel.ChannelTimeSkew = 0.0#

' Set the Waveform Channel Number
objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.WAVEFORM_CHANNEL_NUMBER) = True
objECGWaveformChannel.WaveformChannelNumber = 0

' Set the Channel Label
objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_LABEL) = True
objECGWaveformChannel.ChannelLabel = "First Channel"

' No Channel Offset. When the value is defined, it can be set using the ChannelOffset
' property objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_OFFSET) = False

' Set the Filter Low Frequency
objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.FILTER_LOW_FREQUENCY) = True
objECGWaveformChannel.FilterLowFrequency = 0.05

' Set Filter High Frequency
objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.FILTER_HIGH_FREQUENCY) = True
objECGWaveformChannel.FilterHighFrequency = 100.0#

' Set the Channel Minimum Value
objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_MINIMUM_VALUE) = True
objECGWaveformChannel.ChannelMinimumValue = -386

' Set the Channel Maximum Value
objECGWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_MAXIMUM_VALUE) = True
objECGWaveformChannel.ChannelMaximumValue = 1264

' When the Notch Filter Frequency and Bandwidth are defined, they can be set using the
' NotchFilterFrequency and NotchFilterBandwidth properties.

' Last, but not least, set the channel annotations!
InsertECGChannel = SetChannelAnnotations(objECGWaveformChannel)
End Function

' Sets the Channel Source and Sensitivity
Function SetChannelSourceAndSensitivity(ByRef objDataSet As LTDICLib.LEADDicomDS, ByRef objWaveformChannel As LTDICLib.DicomWaveformChannel) As Boolean
SetChannelSourceAndSensitivity = False

' We will use the Context Group Table

' -------------------- Channel Source --------------------

Const CID_3001 As String = "CID 3001"

' Load the ECG Leads Context Group
objDataSet.LoadContextGroup(CID_3001)
If Not objDataSet.FindContextGroup(CID_3001) Then
Exit Function
End If

' 5.6.3-9-1 is Lead I (Einthoven)
If Not objDataSet.FindCodedConcept("SCPECG", "5.6.3-9-1") Then
Exit Function
End If

' Set the Channel Source
With objWaveformChannel.ChannelSource
.CodingSchemeDesignator = objDataSet.CurrentCodedConcept.CodingSchemeDesignator
.CodingSchemeVersion = objDataSet.CurrentCodedConcept.CodingSchemeVersion
.CodeValue = objDataSet.CurrentCodedConcept.CodeValue
.CodeMeaning = objDataSet.CurrentCodedConcept.CodeMeaning
End With

' -------------------- Channel Sensitivity --------------------

objWaveformChannel.ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_SENSITIVITY) = True

' The Channel Sensitivity
objWaveformChannel.ChannelSensitivity = 0.00122

Const CID_3082 As String = "CID 3082"

' Load the Cardiology Units of Measurement Context Group
objDataSet.LoadContextGroup(CID_3082)
If Not objDataSet.FindContextGroup(CID_3082) Then
Exit Function
End If

If Not objDataSet.FindCodedConcept("UCUM", "mV") Then
Exit Function
End If

' The Channel Sensitivity Units
With objWaveformChannel.ChannelSensitivityUnits
.CodingSchemeDesignator = objDataSet.CurrentCodedConcept.CodingSchemeDesignator
.CodingSchemeVersion = objDataSet.CurrentCodedConcept.CodingSchemeVersion
.CodeValue = objDataSet.CurrentCodedConcept.CodeValue
.CodeMeaning = objDataSet.CurrentCodedConcept.CodeMeaning
End With

' The Channel Sensitivity Correction Factor
objWaveformChannel.ChannelSensitivityCF = 1.0#

' The Channel Baseline
objWaveformChannel.ChannelBaseline = 0.0#

SetChannelSourceAndSensitivity = True
End Function

Function SetChannelAnnotations(ByRef objWaveformChannel As LTDICLib.DicomWaveformChannel) As Boolean
SetChannelAnnotations = False

' Delete any existing channel annotations
Do While objWaveformChannel.Annotations.Count > 0
objWaveformChannel.Annotations.Remove(0)
Loop

Dim objECGWaveformAnnotation As LTDICLib.DicomWaveformAnnotation

' Add an annotation object

On Error Resume Next

objECGWaveformAnnotation = objWaveformChannel.Annotations.Add()
If Err.Number <> 0 Then
Exit Function
End If

On Error GoTo 0

' Our annotation is defined by a Coded Name/Numeric Measurement pair
objECGWaveformAnnotation.ValueType = LTDICLib.DicomWaveformAnnValueType.TYPE_CODED_NAME_AND_NUMERIC_VALUE

' The Coded Name. Note: Instead of setting these values directly, you can also use
' the Context Group Table; the Context Groups defined by the DICOM Content Mapping
' Resource (DCMR) can be loaded into this table. Take a look at the function
' SetChannelSourceAndSensitivity above for an example.
With objECGWaveformAnnotation.CodedName
.CodingSchemeDesignator = "LN"
.CodingSchemeVersion = "19971101"
.CodeValue = "8867-4"
.CodeMeaning = "Heart rate"
End With

' The Numeric Value

On Error Resume Next

objECGWaveformAnnotation.NumericValueCount = 1
If Err.Number <> 0 Then
Exit Function
End If

On Error GoTo 0

objECGWaveformAnnotation.NumericValue(0) = 69.0#

' The Measurement Units. Refer to the note given when the Coded Name was set.
objECGWaveformAnnotation.ValueDefined(LTDICLib.DicomWaveformAnnValues.MEASUREMENT_UNITS) = True
With objECGWaveformAnnotation.MeasurementUnits
.CodingSchemeDesignator = "UCUM"
.CodingSchemeVersion = "1.4"
.CodeValue = "{H.B.}/min"
.CodeMeaning = "Heart beat per minute"
End With

SetChannelAnnotations = True
End Function


InsertIOD Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestInsertIOD(bChild As Boolean)
Dim bInsert As Boolean
Dim lCode As Integer
Dim nType As Short
Dim hIOD As Integer
Dim hTemp As Integer
Dim nRet As Short

bInsert = False

LEADDICOM1.EnableMethodErrors = True

On Error GoTo INSERTIODERROR

lCode = 1048593
nType = LTDICLib.DicomIODTypeConstants.DICOM_IOD_TYPE_CLASS
'store current IOD
hIOD = LEADDICOM1.CurrentIOD.hIOD

LEADDICOM1.EnableMethodErrors = False

'does an IOD already exist on the target level?
If (bChild = True) Then
'if the current IOD has a child, move to that child's level
nRet = LEADDICOM1.MoveChildIOD
If (nRet <> 0) Then
'no children, so insert is OK
bInsert = True
LEADDICOM1.SetCurrentIOD(hIOD)
Else
'check the child's level to see if target IOD already exists
hTemp = LEADDICOM1.CurrentIOD.hIOD
LEADDICOM1.MoveFirstIOD(True)
nRet = LEADDICOM1.FindIOD(lCode, nType, True)
If (nRet <> 0) Then
bInsert = True
End If
'move back to parent level
LEADDICOM1.SetCurrentIOD(hTemp)
LEADDICOM1.MoveParentIOD()
End If
Else
'check the current IOD's level
LEADDICOM1.MoveFirstIOD(True)
nRet = LEADDICOM1.FindIOD(lCode, nType, True)
If (nRet <> 0) Then
bInsert = True
End If
LEADDICOM1.SetCurrentIOD(hIOD)
End If

LEADDICOM1.EnableMethodErrors = True

'allow user to insert item at the same level as the current or as child
If (bInsert = True) Then
LEADDICOM1.InsertIOD(bChild, nType, lCode, "My Test IOD", 5, "Test Description")
Else
MessageBox.Show("Already exists")
End If
Exit Sub

INSERTIODERROR:
MessageBox.Show("Error")

LEADDICOM1.EnableMethodErrors = True

End Sub


InsertModule Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestInsertModule()
Dim nRet As Short

LEADDICOM1.EnableMethodErrors = False
LEADDICOM1.GetInfoDS()
nRet = LEADDICOM1.InsertModule(LTDICLib.DicomModuleConstants.DICOM_MODULE_LUT_IDENTIFICATION, True)
If (nRet <> 0) Then
MessageBox.Show("Error Inserting Module!")
Else
nRet = LEADDICOM1.FindModuleIOD(LEADDICOM1.InfoClass, LEADDICOM1.CurrentModule.Module)
MessageBox.Show("Inserted Module " & LEADDICOM1.CurrentIOD.Name)
End If

End Sub


InsertTag Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "ListView1" of type "ListView" from ".NET Framework".
Private Sub TestInsertTag()
Dim nRet As Short
Dim ItemX As System.Windows.Forms.ListViewItem
Dim szItem As String
Dim nLen As Short
Dim x As Short
Dim szItemL As String
Dim szItemR As String

On Error GoTo INSERTTAGERROR

LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.FindTag(131079)
If (nRet = 0) Then
MessageBox.Show("Already Exists!")
Exit Sub
End If

nRet = LEADDICOM1.InsertTag(131079, -1, "My Test Tag", LTDICLib.DicomVRCodeConstants.VR_OB, 1, 1, 1)
If (nRet <> 0) Then
MessageBox.Show("Error")
End If

LEADDICOM1.EnableMethodErrors = True
'add item to the ListView control
ItemX = New ListViewItem
ListView1.Items.Add(ItemX)
szItem = Hex(LEADDICOM1.CurrentTag.Code)
nLen = Len(szItem)
szItemR = szItem.Substring(szItem.Length - 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & szItem.Substring(0, nLen - 4)
ItemX.Text = szItemL & ":" & szItemR

szItem = Hex(LEADDICOM1.CurrentTag.Mask)
nLen = Len(szItem)
szItemR = szItem.Substring(szItem.Length - 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & szItem.Substring(0, nLen - 4)
ItemX.SubItems.Add(szItemL & ":" & szItemR)
ItemX.SubItems.Add(LEADDICOM1.CurrentTag.Name)
ItemX.SubItems.Add(CStr(LEADDICOM1.CurrentTag.VR))
ItemX.SubItems.Add(CStr(LEADDICOM1.CurrentTag.MinVM))
ItemX.SubItems.Add(CStr(LEADDICOM1.CurrentTag.MaxVM))
ItemX.SubItems.Add(CStr(LEADDICOM1.CurrentTag.DivideVM))

ItemX.Selected = True

ListView1.Refresh()
ListView1.Focus()

Exit Sub

INSERTTAGERROR:
MessageBox.Show("Error")

End Sub


InsertUID Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "ListView1" of type "ListView" from ".NET Framework".
Private Sub TestInsertUID()
Dim nRet As Short
Dim ItemX As System.Windows.Forms.ListViewItem

LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.FindUID("1.2.840.10008.1.3")
If (nRet = 0) Then
MessageBox.Show("Already Exists!")
Exit Sub
End If

LEADDICOM1.EnableMethodErrors = True

On Error GoTo INSERTUIDERROR

nRet = LEADDICOM1.InsertUID("1.2.840.10008.1.3", "My Test UID", LTDICLib.DicomUIDTypes.DICOM_UID_TYPE_OTHER)
If (nRet <> 0) Then
MessageBox.Show("Error")
End If
'add item to the ListView control
ItemX = New System.Windows.Forms.ListViewItem
ListView1.Items.Add(ItemX)

ItemX.Text = CStr(LEADDICOM1.CurrentUID.Code)
ItemX.SubItems.Add(LEADDICOM1.CurrentUID.Name)

ItemX.Selected = True

ListView1.Refresh()
ListView1.Focus()

LEADDICOM1.EnableMethodErrors = True
Exit Sub

INSERTUIDERROR:
MessageBox.Show("Error")

End Sub


InsertVR Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "ListView1" of type "ListView" from ".NET Framework".
Private Sub TestInsertVR()
Dim nRet As Short
Dim ItemX As Windows.Forms.ListViewItem
Dim nCode As Short
Dim nRestrict As Short

LEADDICOM1.EnableMethodErrors = True

On Error GoTo INSERTVRERROR

LEADDICOM1.EnableMethodErrors = False
nCode = 20322
nRet = LEADDICOM1.FindVR(nCode)
If (nRet = 0) Then
MessageBox.Show("Already Exists!")
Exit Sub
End If

nRestrict = LTDICLib.DicomVRRestrictionConstants.DICOM_VR_FIXED + LTDICLib.DicomVRRestrictionConstants.DICOM_VR_TEXT
nRet = LEADDICOM1.InsertVR(nCode, "My Test VR", 64, nRestrict, 1)
If (nRet <> 0) Then
MessageBox.Show("Error")
End If
'add item to the ListView control
ItemX = ListView1.Items.Add(New Windows.Forms.ListViewItem)
ItemX.Text = CStr(LEADDICOM1.CurrentVR.Code)
ItemX.SubItems.Add(LEADDICOM1.CurrentVR.Name)
ItemX.SubItems.Add(CStr(LEADDICOM1.CurrentVR.Length))
ItemX.SubItems.Add(CStr(LEADDICOM1.CurrentVR.Restrict))
ItemX.SubItems.Add(CStr(LEADDICOM1.CurrentVR.UnitSize))

ItemX.Selected = True
ListView1.Refresh()
ListView1.Focus()

LEADDICOM1.EnableMethodErrors = True
Exit Sub

INSERTVRERROR:
MessageBox.Show("Error")

End Sub


IsActivated Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestIsActivated ( )
Dim out As String
'test the local computer's connection
out = "Activated: " & CStr(LEADDICOMNet1.IsActivated(LEADDICOMNet1.hNet))
out = out & Chr(13)
out = out & "Connected: " & CStr(LEADDICOMNet1.IsConnected (LEADDICOMNet1.hNet))
out = out & Chr(13)
out = out & "Associated: " & CStr(LEADDICOMNet1.IsAssociated(LEADDICOMNet1.hNet))
MessageBox.Show(out)
End Sub


IsAsyncOperations Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestIsAsyncOperations ()
If LEADDICOMNet1.IsAsyncOperations(LEADDICOMNet1.hPDU) = True Then
MessageBox.Show("AsyncOperations enabled")
'get the operations counts
MessageBox.Show("Invoked " & CStr(LEADDICOMNet1.GetInvokedOperationsCount(LEADDICOMNet1.hPDU)))
MessageBox.Show("Performed " & CStr(LEADDICOMNet1.GetPerformedOperationsCount(LEADDICOMNet1.hPDU)))
'now disable it
LEADDICOMNet1.SetAsyncOperations(LEADDICOMNet1.hPDU, False, 0, 0)
Else
MessageBox.Show("AsyncOperations disabled")
'now enable it
LEADDICOMNet1.SetAsyncOperations(LEADDICOMNet1.hPDU, True, 0, 0)
End If
End Sub


ISCLChallengeResponseSuccess example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetExternalAuthenticateISCL(ByVal hNet As Integer, ByRef nChallenge As Object, ByRef nResponse As Object, ByRef nParameter As Object) Handles LEADDICOMNet1.NetExternalAuthenticateISCL
nResponse = nChallenge + nParameter
LEADDICOMNet1.ISCLChallengeResponseSuccess = True
End Sub

Private Function GetRandom() As Decimal
Dim RandVal As Decimal
RandVal = Rnd() * &H10000
RandVal = RandVal * &H10000 + Rnd() * &H10000
RandVal = RandVal * &H10000 + Rnd() * &H10000
RandVal = RandVal * &H10000 + Rnd() * &H10000
End Function

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetGetChallengeISCL(ByVal hNet As Integer, ByRef nChallenge As Object, ByRef nParameter As Object) Handles LEADDICOMNet1.NetGetChallengeISCL
nChallenge = GetRandom() + System.Convert.ToDecimal(nParameter)
LEADDICOMNet1.ISCLChallengeResponseSuccess = True
End Sub

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetInternalAuthenticateISCL(ByVal hNet As Integer, ByRef nChallenge As Object, ByRef nResponse As Object, ByRef nParameter As Object) Handles LEADDICOMNet1.NetInternalAuthenticateISCL
nResponse = nChallenge + nParameter
LEADDICOMNet1.ISCLChallengeResponseSuccess = True
End Sub


IsImplementClass Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestIsImplementClass ( )
Const UID_RT_DOSE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.481.2"

' Radiotherapy Dose Storage
Dim szUID As String

'is max len enabled?
If (LEADDICOMNet1.IsImplementClass(LEADDICOMNet1.hPDU) = True) Then
'disable it 'display old value
szUID = LEADDICOMNet1.GetImplementClass(LEADDICOMNet1.hPDU)
MessageBox.Show(szUID)
LEADDICOMNet1.SetImplementClass(LEADDICOMNet1.hPDU, False, szUID)
Else
'enable it
LEADDICOMNet1.SetImplementClass(LEADDICOMNet1.hPDU, True, UID_RT_DOSE_STORAGE)
szUID = LEADDICOMNet1.GetImplementClass(LEADDICOMNet1.hPDU)
MessageBox.Show(szUID)
End If
End Sub


IsImplementVersion Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestIsImplementVersion ( )
Dim szVersion As String

If (LEADDICOMNet1.IsImplementVersion(LEADDICOMNet1.hPDU) = True) Then
'disable it 'display old value
szVersion = LEADDICOMNet1.GetImplementVersion(LEADDICOMNet1.hPDU)
MessageBox.Show(szVersion)
LEADDICOMNet1.SetImplementVersion(LEADDICOMNet1.hPDU, False, szVersion)
Else
'enable it
LEADDICOMNet1.SetImplementVersion(LEADDICOMNet1.hPDU, True, "v13.0")
szVersion = LEADDICOMNet1.GetImplementVersion(LEADDICOMNet1.hPDU)
MessageBox.Show(szVersion)
End If
End Sub


IsISCLQueueEmpty Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestIsISCLQueueEmpty ( )
If LEADDICOMNet1.IsISCLQueueEmpty(LEADDICOMNet1.hNet) Then
MessageBox.Show("ISCL queue is empty")
Else
MessageBox.Show("ISCL queue is not empty")
End If
End Sub


IsMaxLengthEnabled Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestIsMaxLengthEnabled ( )
Dim lLen As Integer

'is max len enabled?
If (LEADDICOMNet1.IsMaxLengthEnabled(LEADDICOMNet1.hPDU) = True) Then
'disable it 'display old value
lLen = LEADDICOMNet1.GetMaxLength(LEADDICOMNet1.hPDU)
MessageBox.Show(CStr(lLen))
LEADDICOMNet1.SetMaxLength(LEADDICOMNet1.hPDU, False, lLen)
Else
'enable it
LEADDICOMNet1.SetMaxLength(LEADDICOMNet1.hPDU, True, 8)
End If
End Sub


IsRoleSelect Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestIsRoleSelect()
Dim x As Integer
Dim nID As Integer
Dim szOut As String
Dim nUser As Short
Dim nProvider As Short

'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)

'indicate that we wish to serve as user for each SOP associated
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetRoleSelect(LEADDICOMNet1.hPDU, nID, True, LTDNCLib.PDURoleSelectConstants.PDU_ROLE_SUPPORT, LTDNCLib.PDURoleSelectConstants.PDU_ROLE_NON_SUPPORT)
Next

'now, display the information
szOut = "Role Select Info" & Chr(13)
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
szOut = szOut & "ID: " & CStr(nID)
If (LEADDICOMNet1.IsRoleSelect(LEADDICOMNet1.hPDU, nID) = True) Then
nUser = LEADDICOMNet1.GetUserRole(LEADDICOMNet1.hPDU, nID)
nProvider = LEADDICOMNet1.GetProviderRole(LEADDICOMNet1.hPDU, nID)
szOut = szOut & " User: " & CStr(nUser)
szOut = szOut & " Provider: " & CStr(nProvider) & Chr(13)
Else
szOut = szOut & " No Role Select" & Chr(13)
End If
Next
MessageBox.Show(szOut)
End Sub


IsSupportLocked Example for VB.NET

'This example uses the predefined variable "DicomKernel" of type "LEADDicomKernel" from "LEADTOOLS Toolkit".
Private Sub TestIsSupportLocked ( )
If (DicomKernel.IsSupportLocked(LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL)) Then
MessageBox.Show("No Support")
End If
End Sub


J2KCompressionControl example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestJ2KCompressionControl()
LEADRasterView1.Raster.CreateBitmap(100, 100, 24)

LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT + LTDICLib.DicomDataSetFlags.DS_LITTLE_ENDIAN)
'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap

' Use the Q factor for compression control.
LEADDICOM1.J2KOptions.J2KCompressionControl = LTDICLib.DicomJ2KCompressionControl.DICOM_J2K_COMP_QFACTOR

'set the bitmap
LEADDICOM1.SetBitmapValue(LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_J2K_LOSSY, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2, 0, 100, 0)
End Sub


J2KCompressionRatio example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestJ2KCompressionRatio()
LEADRasterView1.Raster.CreateBitmap(100, 100, 24)

LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT + LTDICLib.DicomDataSetFlags.DS_LITTLE_ENDIAN)

'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap

' Use the Compression ratio
LEADDICOM1.J2KOptions.J2KCompressionControl = LTDICLib.DicomJ2KCompressionControl.DICOM_J2K_COMP_RATIO
LEADDICOM1.J2KOptions.J2KCompressionRatio = 50.0#
'set the bitmap
LEADDICOM1.SetBitmapValue(LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_J2K_LOSSY, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2, 0, 0, 0)
End Sub


J2KROIControl example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestJ2KROIControl()
LEADRasterView1.Raster.CreateBitmap(100, 100, 24)

LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT + LTDICLib.DicomDataSetFlags.DS_LITTLE_ENDIAN)
'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap
LEADDICOM1.J2KOptions.J2KSetDefaults()
LEADDICOM1.J2KOptions.J2KCompressionControl = LTDICLib.DicomJ2KCompressionControl.DICOM_J2K_COMP_RATIO
LEADDICOM1.J2KOptions.J2KCompressionRatio = 100.0#
LEADDICOM1.J2KOptions.J2KUseROI = True
LEADDICOM1.J2KOptions.J2KROIControl = LTDICLib.J2KRegionOfInterest.J2K_USEOPTION_RECT
LEADDICOM1.J2KOptions.J2KROILeft = 200
LEADDICOM1.J2KOptions.J2KROITop = 200
LEADDICOM1.J2KOptions.J2KROIWidth = 400
LEADDICOM1.J2KOptions.J2KROIHeight = 400
LEADDICOM1.J2KOptions.J2KXTsiz = 100
LEADDICOM1.J2KOptions.J2KYTsiz = 100
'set the bitmap
LEADDICOM1.SetBitmapValue(LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_J2K_LOSSY, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2, 0, 0, 0)

End Sub


J2KSetDefaults example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestJ2KSetDefaults()
Dim msg As String
' Display all the default JPEG2000 advanced options
LEADDICOM1.J2KOptions.J2KSetDefaults()

msg = msg & "J2KUseColorTransform = " & CStr(LEADDICOM1.J2KOptions.J2KUseColorTransform) & vbCrLf
msg = msg & "J2KDerivedQuantization = " & CStr(LEADDICOM1.J2KOptions.J2KDerivedQuantization) & vbCrLf

msg = msg & "J2KXOsiz = " & CStr(LEADDICOM1.J2KOptions.J2KXOsiz) & vbCrLf
msg = msg & "J2KYOsiz = " & CStr(LEADDICOM1.J2KOptions.J2KXOsiz) & vbCrLf
msg = msg & "J2KXTsiz = " & CStr(LEADDICOM1.J2KOptions.J2KXTsiz) & vbCrLf
msg = msg & "J2KYTsiz = " & CStr(LEADDICOM1.J2KOptions.J2KYTsiz) & vbCrLf
msg = msg & "J2KXTOsiz = " & CStr(LEADDICOM1.J2KOptionss.J2KXTOsiz) & vbCrLf
msg = msg & "J2KYTOsiz = " & CStr(LEADDICOM1.J2KOptions.J2KYTOsiz) & vbCrLf

msg = msg & "J2KDecompLevel = " & CStr(LEADDICOM1.J2KOptions.J2KDecompLevel) & vbCrLf
msg = msg & "J2KProgressOrder = " & CStr(LEADDICOM1.J2KOptions.J2KProgressOrder) & vbCrLf
msg = msg & "J2KCodBlockWidth = " & CStr(LEADDICOM1.J2KOptions.J2KCodBlockWidth) & vbCrLf
msg = msg & "J2KCodBlockHeight = " & CStr(LEADDICOM1.J2KOptions.J2KCodBlockHeight) & vbCrLf

msg = msg & "J2KCBS_SelectiveACBypass = " & CStr(LEADDICOM1.J2KOptions.J2KCBS_SelectiveACBypass) & vbCrLf
msg = msg & "J2KCBS_ResetContextOnBoundaries = " & CStr(LEADDICOM1.J2KOptions.J2KCBS_ResetContextOnBoundaries) & vbCrLf
msg = msg & "J2KCBS_TerminationOnEachPass = " & CStr(LEADDICOM1.J2KOptions.J2KCBS_TerminationOnEachPass) & vbCrLf
msg = msg & "J2KCBS_VerticallyCausalContext = " & CStr(LEADDICOM1.J2KOptions.J2KCBS_VerticallyCausalContext) & vbCrLf
msg = msg & "J2KCBS_PredictableTermination = " & CStr(LEADDICOM1.J2KOptions.J2KCBS_PredictableTermination) & vbCrLf
msg = msg & "J2KCBS_ErrorResilienceSymbol = " & CStr(LEADDICOM1.J2KOptions.J2KCBS_ErrorResilienceSymbol) & vbCrLf

msg = msg & "J2KGuardBits = " & CStr(LEADDICOM1.J2KOptions.J2KGuardBits) & vbCrLf
msg = msg & "J2KDerivedBaseMantissa = " & CStr(LEADDICOM1.J2KOptions.J2KDerivedBaseMantissa) & vbCrLf
msg = msg & "J2KDerivedBaseExponent = " & CStr(LEADDICOM1.J2KOptions.J2KDerivedBaseExponent) & vbCrLf

msg = msg & "J2KUseSOPMarker = " & CStr(LEADDICOM1.J2KOptions.J2KUseSOPMarker) & vbCrLf
msg = msg & "J2KUseEPHMarker = " & CStr(LEADDICOM1.J2KOptions.J2KUseEPHMarker) & vbCrLf

MessageBox.Show(msg)

End Sub


J2KTargetFileSize example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestJ2KTargetFileSize ()
LEADRasterView1.Raster.CreateBitmap(100, 100, 24)

LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT + LTDICLib.DicomDataSetFlags.DS_LITTLE_ENDIAN)
'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap
' Use the Compression ratio
LEADDICOM1.J2KOptions.J2KCompressionControl = LTDICLib.DicomJ2KCompressionControl.DICOM_J2K_COMP_TARGETSIZE
LEADDICOM1.J2KOptions.J2KTargetFileSize = 15 * 1024
'set the bitmap
LEADDICOM1.SetBitmapValue(LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_J2K_LOSSY, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2, 0, 0, 0)

End Sub


KeepPixelDataIntact Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestKeepPixelDataIntact ( )
' Load a Data Set
Dim strMessage As String
If LEADDICOM1.LoadDS("d:\lead14\dist\images\dicom\Image1.dic", 0) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
If LEADDICOM1.KeepPixelDataIntact = False Then
strMessage = "Would you like to keep the pixel data unchanged?" & vbCrLf & "If you choose Yes, then the resulting bitmap data " & "will represent exactly what appears inside the " & "DICOM file, but may not display properly. If you " & "choose No, then the resulting bitmap data may not " & "be identical to what appears inside the DICOM file, " & "but will display properly."
If MessageBox.Show(strMessage, "", MessageBoxButtons.YesNo) = DialogResult.Yes Then
LEADDICOM1.KeepPixelDataIntact = True
End If
End If

If LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
LEADDICOM1.GetBitmapValue(0, 0, LTDICLib.DicomColorOrderConstants.ORDER_BGR, 0)

' ...
End If
End If
End Sub


Listen Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestListen ( )
'Create a server to& accept up to 25 clients
LEADDICOMNet1.Listen("", 104, 25)
End Sub


LoadDS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestLoadDS ( )
Dim nRet As Short
'load a Data Set
LEADDICOM1.EnableMethodErrors = False
nRet = LEADDICOM1.LoadDS("d:\lead14\dist\images\dicom\image2.dic", 0)
If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
MessageBox.Show("Error " & CStr(nRet) & " loading file!")
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


Modifying a Context Group Example for VB.NET

Private Sub ModifyContextGroup(ByRef objDS As LTDICLib.LEADDicomDS)
objDS.ResetContextGroup()
objDS.LoadContextGroup()

' Look for a Context Group
If Not objDS.FindContextGroup("CID 6019") Then
Exit Sub
End If

' Look for a Coded Concept in the current Context Group
If Not objDS.FindCodedConcept("SRT", "F-01781") Then
Exit Sub
End If

' Set the Code Meaning of the current Coded Concept (French translation)
objDS.SetCodedConceptCodeMeaning("Situé à 1 heure")
' Refer to Enumerating the Coded Concepts of a Context Group Example
' for VB.NET for the function DisplayCodedConcept
DisplayCodedConcept(objDS, False)

' Delete the current Coded Concept
objDS.DeleteCodedConcept()

' Add a (testing) Coded Concept to the current Context Group
objDS.InsertCodedConcept("CSD", "", "CV", "CM")
DisplayCodedConcept(objDS, False)

' Restore the current Context Group (discard all the changes ' made to the Group)
objDS.DefaultContextGroup()
' Refer to Enumerating the Coded Concepts of a Context Group Example
' for VB.NET for the procedure EnumCodedConcepts
EnumCodedConcepts(objDS)

' Delete the current Context Group
objDS.DeleteContextGroup()
End Sub


MoveFirstIOD Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestMoveFirstIOD()
Dim hIOD As Integer

LEADDICOM1.EnableMethodErrors = True

On Error GoTo MOVEIODERROR

'Move to the First IOD in the list
LEADDICOM1.MoveFirstIOD(False)
hIOD = LEADDICOM1.CurrentIOD.hIOD
'store it
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)
'Move to the Last IOD at this same level
LEADDICOM1.MoveLastIOD(True)
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)

'Move to the Previous IOD at this same level
LEADDICOM1.MovePrevIOD(True)
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)

'Move back to First IOD
LEADDICOM1.SetCurrentIOD(hIOD)

'Move to the Next IOD at this same level
LEADDICOM1.MoveNextIOD(True)
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)
Exit Sub

MOVEIODERROR:
MessageBox.Show("Error")

End Sub


MoveFirstTag Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestMoveFirstTag()
LEADDICOM1.EnableMethodErrors = True

On Error GoTo MOVETAGERROR

LEADDICOM1.MoveFirstTag() DisplayTagItem() MessageBox.Show("wait")
LEADDICOM1.MoveNextTag() DisplayTagItem() MessageBox.Show("wait")
LEADDICOM1.MoveLastTag() DisplayTagItem() MessageBox.Show("wait")
LEADDICOM1.MovePrevTag() DisplayTagItem() MessageBox.Show("wait")

MOVETAGERROR:
End Sub

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text2" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text3" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text4" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text5" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text6" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text7" of type "TextBox" from ".NET Framework".
Private Sub DisplayTagItem()
Dim szItem As String
Dim szItemL As String
Dim szItemR As String
Dim nLen As Short
Dim x As Short

LEADDICOM1.EnableMethodErrors = True

On Error GoTo DISPLAYERROR

szItem = Hex(LEADDICOM1.CurrentTag.Code)
nLen = Len(szItem)
szItemR = szItem.Substring(szItem.Length - 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & szItem.Substring(0, nLen - 4)
Text1.Text = szItemL & ":" & szItemR

szItem = Hex(LEADDICOM1.CurrentTag.Mask)
nLen = Len(szItem)
szItemR = szItem.Substring(szItem.Length - 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & szItem.Substring(0, nLen - 4)
Text2.Text = szItemL & ":" & szItemR

Text3.Text = LEADDICOM1.CurrentTag.Name

Select Case LEADDICOM1.CurrentTag.VR
Case LTDICLib.DicomVRCodeConstants.VR_AE
Text4.Text = "AE"
Case LTDICLib.DicomVRCodeConstants.VR_AS
Text4.Text = "AS"
Case LTDICLib.DicomVRCodeConstants.VR_AT
Text4.Text = "AT"
Case LTDICLib.DicomVRCodeConstants.VR_CS
Text4.Text = "CS"
Case LTDICLib.DicomVRCodeConstants.VR_DA
Text4.Text = "DA"
Case LTDICLib.DicomVRCodeConstants.VR_DS
Text4.Text = "DS"
Case LTDICLib.DicomVRCodeConstants.VR_DT
Text4.Text = "DT"
Case LTDICLib.DicomVRCodeConstants.VR_FD
Text4.Text = "FD"
Case LTDICLib.DicomVRCodeConstants.VR_FL
Text4.Text = "FL"
Case LTDICLib.DicomVRCodeConstants.VR_IS
Text4.Text = "IS"
Case LTDICLib.DicomVRCodeConstants.VR_LO
Text4.Text = "LO"
Case LTDICLib.DicomVRCodeConstants.VR_LT
Text4.Text = "LT"
Case LTDICLib.DicomVRCodeConstants.VR_OB
Text4.Text = "OB"
Case LTDICLib.DicomVRCodeConstants.VR_OW
Text4.Text = "OW"
Case LTDICLib.DicomVRCodeConstants.VR_PN
Text4.Text = "PN"
Case LTDICLib.DicomVRCodeConstants.VR_SH
Text4.Text = "SH"
Case LTDICLib.DicomVRCodeConstants.VR_SL
Text4.Text = "SL"
Case LTDICLib.DicomVRCodeConstants.VR_SQ
Text4.Text = "SQ"
Case LTDICLib.DicomVRCodeConstants.VR_SS
Text4.Text = "SS"
Case LTDICLib.DicomVRCodeConstants.VR_ST
Text4.Text = "ST"
Case LTDICLib.DicomVRCodeConstants.VR_TM
Text4.Text = "TM"
Case LTDICLib.DicomVRCodeConstants.VR_UI
Text4.Text = "UI"
Case LTDICLib.DicomVRCodeConstants.VR_UL
Text4.Text = "UL"
Case LTDICLib.DicomVRCodeConstants.VR_UN
Text4.Text = "UN"
Case LTDICLib.DicomVRCodeConstants.VR_US
Text4.Text = "US"
Case LTDICLib.DicomVRCodeConstants.VR_UT
Text4.Text = "UT"
Case Else
Text4.Text = CStr(LEADDICOM1.CurrentTag.VR)
End Select

Text5.Text = CStr(LEADDICOM1.CurrentTag.MinVM)
Text6.Text = CStr(LEADDICOM1.CurrentTag.MaxVM)
Text7.Text = CStr(LEADDICOM1.CurrentTag.DivideVM)

DISPLAYERROR:

End Sub


MoveFirstUID Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text2" of type "TextBox" from ".NET Framework".
Private Sub TestMoveFirstUID()
LEADDICOM1.EnableMethodErrors = True

On Error GoTo MOVEUIDERROR

LEADDICOM1.MoveFirstUID()
'display the items information
Text1.Text = LEADDICOM1.CurrentUID.Code
Text2.Text = LEADDICOM1.CurrentUID.Name
MessageBox.Show("wait")

LEADDICOM1.MoveNextUID()
'display the items information
Text1.Text = LEADDICOM1.CurrentUID.Code
Text2.Text = LEADDICOM1.CurrentUID.Name
MessageBox.Show("wait")

LEADDICOM1.MoveLastUID()
'display the items information
Text1.Text = LEADDICOM1.CurrentUID.Code
Text2.Text = LEADDICOM1.CurrentUID.Name
MessageBox.Show("wait")

LEADDICOM1.MovePrevUID()
'display the items information
Text1.Text = LEADDICOM1.CurrentUID.Code
Text2.Text = LEADDICOM1.CurrentUID.Name
MessageBox.Show("wait")

MOVEUIDERROR:

End Sub


MoveFirstVR Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestMoveFirstVR()
LEADDICOM1.EnableMethodErrors = True

On Error GoTo MOVEVRERROR

LEADDICOM1.MoveFirstVR() DisplayVRItem() MessageBox.Show("wait")
LEADDICOM1.MoveNextVR() DisplayVRItem() MessageBox.Show("wait")
LEADDICOM1.MoveLastVR() DisplayVRItem() MessageBox.Show("wait")
LEADDICOM1.MovePrevVR() DisplayVRItem() MessageBox.Show("wait")

MOVEVRERROR:

End Sub

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text2" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text3" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text4" of type "TextBox" from ".NET Framework".
'This example uses the predefined variable "Text5" of type "TextBox" from ".NET Framework".
Private Sub DisplayVRItem()
Dim nRestrict As Short

LEADDICOM1.EnableMethodErrors = True

On Error GoTo DISPLAYERROR

'display the items information
Select Case LEADDICOM1.CurrentVR.Code
Case LTDICLib.DicomVRCodeConstants.VR_AE
Text1.Text = "AE"
Case LTDICLib.DicomVRCodeConstants.VR_AS
Text1.Text = "AS"
Case LTDICLib.DicomVRCodeConstants.VR_AT
Text1.Text = "AT"
Case LTDICLib.DicomVRCodeConstants.VR_CS
Text1.Text = "CS"
Case LTDICLib.DicomVRCodeConstants.VR_DA
Text1.Text = "DA"
Case LTDICLib.DicomVRCodeConstants.VR_DS
Text1.Text = "DS"
Case LTDICLib.DicomVRCodeConstants.VR_DT
Text1.Text = "DT"
Case LTDICLib.DicomVRCodeConstants.VR_FD
Text1.Text = "FD"
Case LTDICLib.DicomVRCodeConstants.VR_FL
Text1.Text = "FL"
Case LTDICLib.DicomVRCodeConstants.VR_IS
Text1.Text = "IS"
Case LTDICLib.DicomVRCodeConstants.VR_LO
Text1.Text = "LO"
Case LTDICLib.DicomVRCodeConstants.VR_LT
Text1.Text = "LT"
Case LTDICLib.DicomVRCodeConstants.VR_OB
Text1.Text = "OB"
Case LTDICLib.DicomVRCodeConstants.VR_OW
Text1.Text = "OW"
Case LTDICLib.DicomVRCodeConstants.VR_PN
Text1.Text = "PN"
Case LTDICLib.DicomVRCodeConstants.VR_SH
Text1.Text = "SH"
Case LTDICLib.DicomVRCodeConstants.VR_SL
Text1.Text = "SL"
Case LTDICLib.DicomVRCodeConstants.VR_SQ
Text1.Text = "SQ"
Case LTDICLib.DicomVRCodeConstants.VR_SS
Text1.Text = "SS"
Case LTDICLib.DicomVRCodeConstants.VR_ST
Text1.Text = "ST"
Case LTDICLib.DicomVRCodeConstants.VR_TM
Text1.Text = "TM"
Case LTDICLib.DicomVRCodeConstants.VR_UI
Text1.Text = "UI"
Case LTDICLib.DicomVRCodeConstants.VR_UL
Text1.Text = "UL"
Case LTDICLib.DicomVRCodeConstants.VR_UN
Text1.Text = "UN"
Case LTDICLib.DicomVRCodeConstants.VR_US
Text1.Text = "US"
Case LTDICLib.DicomVRCodeConstants.VR_UT
Text1.Text = "UT"
Case Else
Text1.Text = CStr(LEADDICOM1.CurrentVR.Code)
End Select

Text2.Text = LEADDICOM1.CurrentVR.Name
Text3.Text = CStr(LEADDICOM1.CurrentVR.Length)

nRestrict = LEADDICOM1.CurrentVR.Restrict
nRestrict = (nRestrict And (Not LTDICLib.DicomVRRestrictionConstants.DICOM_VR_BINARY))
nRestrict = (nRestrict And (Not LTDICLib.DicomVRRestrictionConstants.DICOM_VR_STRING))
nRestrict = (nRestrict And (Not LTDICLib.DicomVRRestrictionConstants.DICOM_VR_TEXT))

Select Case nRestrict
Case LTDICLib.DicomVRRestrictionConstants.DICOM_VR_FIXED
Text4.Text = "Fixed"
Case LTDICLib.DicomVRRestrictionConstants.DICOM_VR_MAXIMUM
Text4.Text = "Maximum"
Case LTDICLib.DicomVRRestrictionConstants.DICOM_VR_MAXIMUM_GROUP
Text4.Text = "Maximum Group"
Case LTDICLib.DicomVRRestrictionConstants.DICOM_VR_ANY
Text4.Text = "Any Length"
Case LTDICLib.DicomVRRestrictionConstants.DICOM_VR_NOT_APPLICABLE
Text4.Text = "Not Applicable"
Case LTDICLib.DicomVRRestrictionConstants.DICOM_VR_MAX
Text4.Text = "Max"
Case Else
Text4.Text = CStr(LEADDICOM1.CurrentVR.Restrict)
End Select

Text5.Text = CStr(LEADDICOM1.CurrentVR.UnitSize)

DISPLAYERROR:
End Sub


MoveRootElement Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestMoveRootElement()
Dim nRet1 As Short
Dim nRet2 As Short

LEADDICOM1.EnableMethodErrors = True

On Error GoTo MOVEELEMENTERROR

'move to first element in Data Set
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)

'move to next element in the same level of the Data Set
LEADDICOM1.MoveNextElement(True)
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)

'move to last element in the same level of the Data Set
LEADDICOM1.MoveLastElement(True)
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)

'move to previous element in the same level of the Data Set
LEADDICOM1.MovePrevElement(True)
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)

'find the first element that has a child
LEADDICOM1.EnableMethodErrors = False
nRet1 = LEADDICOM1.MoveFirstElement(False)
While nRet1 = 0
nRet2 = LEADDICOM1.MoveChildElement
If (nRet2 = 0) Then
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)
nRet1 = 1
'end
loop
End If
If (nRet1 <> 1) Then
'check next element in this same level
nRet1 = LEADDICOM1.MoveNextElement(True)
End If
End While
LEADDICOM1.EnableMethodErrors = True
'move back to the element's parent
If (nRet1 = 1) Then
LEADDICOM1.MoveParentElement()
LEADDICOM1.FindTag(LEADDICOM1.CurrentElement.Tag)
MessageBox.Show("Element: " & LEADDICOM1.CurrentTag.Name)
End If

Exit Sub

MOVEELEMENTERROR:
MessageBox.Show("Error")

End Sub


MoveRootIOD Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestMoveRootIOD()
LEADDICOM1.EnableMethodErrors = True

On Error GoTo MOVEIODERROR

'Move to the Root IOD
LEADDICOM1.MoveRootIOD()
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)

'Move to the first Child IOD
LEADDICOM1.MoveChildIOD()
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)

'Move back to the Parent IOD
LEADDICOM1.MoveParentIOD()
MessageBox.Show(LEADDICOM1.CurrentIOD.Name)

Exit Sub

MOVEIODERROR:
MessageBox.Show("Error")

End Sub


NetClose Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetClose(ByVal hNet As Integer, ByVal nStatus As Integer, ByVal hPeer As Integer) Handles LEADDICOMNet1.NetClose
Dim out As String

'a connection is being closed
'display some information about the connection:
out = "Host: " & LEADDICOMNet1.GetHostAddress(hNet)
out = out & " Port: " & CStr(LEADDICOMNet1.GetHostPort(hNet))
out = out & Chr(13)
out = out & "Peer: " & LEADDICOMNet1.GetPeerAddress(hNet)
out = out & " Port: " & CStr(LEADDICOMNet1.GetPeerPort(hNet))
MessageBox.Show(out, "Connection Closed")
End Sub


NetConnect Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetConnect(ByVal hNet As Integer, ByVal nStatus As Integer) Handles LEADDICOMNet1.NetConnect
Dim strOut As String
Dim strTemp As String
Dim strPeerAddress As String
Dim lPort As Integer

strOut = "*** NetConnect Event *** " & Chr(13) & CStr(hNet) & " Status = " & CStr(nStatus)

strPeerAddress = LEADDICOMNet1.GetPeerAddress(hNet)
lPort = LEADDICOMNet1.GetPeerPort(hNet)

strTemp = "PeerAddress = " & strPeerAddress & Chr(13) & "Port = " & CStr(lPort)
strOut = strOut & Chr(13) & strTemp

'MessageBox.Show ( strOut )
End Sub


NetNonSecureReceivedISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetNonSecureReceivedISCL(ByVal hNet As Integer, ByVal nError As Integer, ByRef vBuffer As Object, ByVal nLength As Integer) Handles LEADDICOMNet1.NetNonSecureReceivedISCL
Dim DataBuffer As Byte() = vBuffer

   If
 nError = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("1st
 byte of data = " & DataBuffer(0) & ", last byte of data
 = " & DataBuffer(nLength - 1))
End If
End Sub


NetNonSecureSendISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetNonSecureSendISCL(ByVal hNet As Integer, ByVal nError As Integer, ByVal nType As Integer, ByVal nLength As Integer) Handles LEADDICOMNet1.NetNonSecureSendISCL
If nError = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("Data was successfully received")
End If
End Sub


NetReceive Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetReceive(ByVal hNet As Integer, ByVal nStatus As Integer, ByVal nType As Short, ByVal pData As Object, ByVal lSize As Integer) Handles LEADDICOMNet1.NetReceive
MessageBox.Show ("data received - " & LEADDICOMNet1.GetPeerAddress(hNet) & " Status=" & CStr(nStatus) & " Type=" & CStr(nType))
End Sub


NetReceiveAbort (Communication Control)Example for VB.NET

NetReceiveAbort Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetReceiveAbort(ByVal hNet As Integer, ByVal nSource As Short, ByVal nReason As Short) Handles LEADDICOMNet1.NetReceiveAbort
MessageBox.Show("Abort Received - " & " Source=" & CStr(nSource) & " Reason=" & CStr(nReason))
End Sub


NetReceiveAssociateAccept (Communication Control)Example for VB.NET

NetReceiveAssociateAccept Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetReceiveAssociateAccept(ByVal hNet As Integer, ByVal hPDU As Integer) Handles LEADDICOMNet1.NetReceiveAssociateAccept
MessageBox.Show("Associate Accept Received - " & CStr(LEADDICOMNet1.IsAssociated(hNet)))
End Sub


NetReceiveAssociateReject (Communication Control)Example for VB.NET

NetReceiveAssociateReject Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetReceiveAssociateReject(ByVal hNet As Integer, ByVal nResult As Short, ByVal nSource As Short, ByVal nReason As Short) Handles LEADDICOMNet1.NetReceiveAssociateReject
MessageBox.Show("Associate Request was rejected: Result= " & CStr(nResult) & " Source=" & CStr(nSource) & " Reason=" & CStr(nReason))
End Sub


NetReceiveAssociateRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object 'This example uses the predefined variable "List2" of type "ListBox" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveAssociateRequest(ByVal hNet As Integer, ByVal hPDU As Integer) Handles LEADDICOMNet1.NetReceiveAssociateRequest

Dim x As Integer
Dim nID As Short
Dim nResult As Short
Dim szAbstract As String
Dim szTransfer As String

'we have received an AssociateRequest
List2.Items.Add("Associate Request was received")

'check the version, if not 1, reject it
If (LEADDICOMNet1.GetVersion(hPDU) <> 1) Then
LEADDICOMNet1.SendAssociateReject(hNet, LTDNCLib.AssociateRejectConstants.PDU_REJECT_RESULT_PERMANENT, LTDNCLib.AssociateRejectConstants.PDU_REJECT_SOURCE_USER, LTDNCLib.AssociateRejectConstants.PDU_REJECT_REASON_UNKNOWN)
Else
'send associate accept class back
LEADDICOMNet1.CreateAssociate(False)
LEADDICOMNet1.ResetAssociate(LEADDICOMNet1.hPDU, False)
'copy all presentation objects from received hPDU
'also, reply that we only support the first Transfer Syntax from the received hPDU
For x = 0 To LEADDICOMNet1.GetPresentationCount(hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(hPDU, x)
szTransfer = LEADDICOMNet1.GetTransferSyntax(hPDU, nID, 0)
nResult = LTDNCLib.AssociateAcceptConstants.PDU_ACCEPT_RESULT_SUCCESS
szAbstract = LEADDICOMNet1.GetPresentationAbstract(hPDU, nID)
LEADDICOMNet1.AddPresentation(LEADDICOMNet1.hPDU, nID, nResult, szAbstract)
LEADDICOMNet1.AddTransferSyntax(LEADDICOMNet1.hPDU, nID, szTransfer)
Next
LEADDICOMNet1.SendAssociateAccept(hNet)
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU)
End If

End Sub


NetReceiveCCancelRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetReceiveCCancelRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short) Handles LEADDICOMNet1.NetReceiveCCancelRequest
'note, this sample AE ignores C-CANCEL-REQUEST commands for simplicity
MessageBox.Show("C-CANCEL-REQUEST was received - " & LEADDICOMNet1.GetPeerAddress(hNet))
End Sub


NetReceiveCEchoResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCEchoResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal nStatus As Integer) Handles LEADDICOMNet1.NetReceiveCEchoResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-ECHO-RESPONSE")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Status: " & CStr(nStatus))

End Sub


NetReceiveCFindResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "nFileCount" of type "Integer"
Private Sub LEADDICOMNet1_NetReceiveCFindResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal nStatus As Integer, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveCFindResponse
Dim strPeerAddress As String
Dim strStatus As String
Dim strMsg As String
Dim strFileName As String

strPeerAddress = LEADDICOMNet1.GetPeerAddress(hNet)

If nStatus = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PENDING Then
strStatus = "COMMAND_STATUS_PENDING"
End If

If nStatus = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS Then
strStatus = "COMMAND_STATUS_SUCCESS"
End If

If nStatus = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_CANCEL Then
strStatus = "COMMAND_STATUS_CANCEL"
End If

strMsg = "*** OnNetReceiveCFindResponse ***" & vbNewLine & "Peer[" & strPeerAddress & "]" & vbNewLine & "nPresentationID[" & Str(nPresentationID) & "]" & vbNewLine & "nMessageID[" & Str(nMessageID) & "]" & vbNewLine & "pszClass[" & pszClass & "]" & vbNewLine & "strStatus[" & strStatus & "]" & vbNewLine

If (hDS <> 0) Then
'nFileCount is used to track the current CFindRequest responses count.
nFileCount = nFileCount + 1
strFileName = "d:\temp\CFind" & Str(nFileCount) & ".dic"
LEADDICOM1.SaveExtDS(hDS, strFileName, 0)
strMsg = strMsg & "Saving[" & strFileName & "]"
End If
MessageBox.Show(strMsg)
End Sub


NetReceiveCGetRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCGetRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal nPriority As Short, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveCGetRequest
Dim nRet As Short
Dim szFile As String
Dim NewNode As System.Windows.Forms.TreeNode
Dim szReply As String
Dim szName As String
Dim szAE As String
Dim hPDU As Integer
Dim szInstance As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-GET-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Priority: " & CStr(nPriority))

'perform the get 'here, the AE should check the data set, and perform
'matching against the files stored on the AE to determine
'what data set(s) should be sent back to the calling AE.
'In our case, we just send back a predetermined file for
'this demo!

'load the sample file
'NOTE: this sample is looking for a particular filename TEST2.DIC
szFile = "e:\images\dicom16.dic"
nRet = LEADDICOM1.LoadDS(szFile, 0)

'now, send a store command for the get sub-operation
hPDU = LEADDICOMNet1.GetAssociate(hNet)
szAE = LEADDICOMNet1.GetCalling(hPDU)

nRet = LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_SOP_INSTANCE_UID, False)
If (nRet = 0) Then
nRet = LEADDICOM1.GetStringValue(0, 1)
If (nRet = 0) Then
szInstance = LEADDICOM1.StringValues(0)
End If
End If

nRet = LEADDICOMNet1.SendCStoreRequest(hNet, nPresentationID, nMessageID + 1, pszClass, szInstance, nPriority, szAE, nMessageID, LEADDICOM1.hDicomDS)
'the above will cause a ReceiveCStoreResponse event on this machine

'we will send a get response after we have received the CStoreResponse from the calling AE
End Sub


NetReceiveCGetResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCGetResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal nStatus As Integer, ByVal nRemaining As Short, ByVal nCompleted As Short, ByVal nFailed As Short, ByVal nWarning As Short, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveCGetResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-GET-RESPONSE")

TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Status: " & CStr(nStatus))
NewNode.Nodes.Add("Remaining Operations: " & CStr(nRemaining))
NewNode.Nodes.Add("Failed Operations: " & CStr(nFailed)) NewNode.Nodes.Add("Warnings: " & CStr(nWarning))
NewNode.Nodes.Add("Status: " & CStr(nStatus))

End Sub


NetReceiveCMoveRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCMoveRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal nPriority As Short, ByVal pszMoveAE As String, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveCMoveRequest
Dim nRet As Short
Dim NewNode As System.Windows.Forms.TreeNode
Dim szReply As String
Dim szName As String
Dim hPDU As Integer
Dim szAbstract As String
Dim szTransfer As String
Dim szInstance As String
Dim szClassUID As String
Dim nID As Short

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-MOVE-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

hPDU = LEADDICOMNet1.GetAssociate(hNet)

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Priority: " & CStr(nPriority))
NewNode.Nodes.Add("Move AE Title: " & pszMoveAE)

'this sample simply returns a fixed dicom data set.
LEADDICOM1.LoadDS("e:\images\dicom16.dic", 0)

LEADDICOM1.MoveFirstElement (False)
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_SOP_INSTANCE_UID, False)
LEADDICOM1.GetStringValue(0, 1)
szInstance = LEADDICOM1.StringValues(0)

LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_SOP_CLASS_UID, False)
LEADDICOM1.GetStringValue(0, 1)
szClassUID = LEADDICOM1.StringValues(0)

nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
'send a response
LEADDICOMNet1.SendCMoveResponse(hNet, nPresentationID, nMessageID, pszClass, LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_NO_SUCH_CLASS, 0, 0, 1, 0, 0)
Exit Sub
End If

'now, send the C-STORE sub operation
LEADDICOMNet1.SendCStoreRequest(hNet, nID, nMessageID + 1, szClassUID, szInstance, nPriority, pszMoveAE, nMessageID, LEADDICOM1.hDicomDS)

'send a response
LEADDICOMNet1.SendCMoveResponse(hNet, nPresentationID, nMessageID, pszClass, LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS, 0, 1, 0, 0, 0)

End Sub


NetReceiveCMoveResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCMoveResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal nStatus As Integer, ByVal nRemaining As Short, ByVal nCompleted As Short, ByVal nFailed As Short, ByVal nWarning As Short, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveCMoveResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-MOVE-RESPONSE")

TreeView1.Nodes.Add(NewNode)

NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))

nRet = LEADDICOM1.FindUID(pszClass)

If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name

NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If

NewNode.Nodes.Add("Status: " & CStr(nStatus))
NewNode.Nodes.Add("Remaining: " & CStr(nRemaining))
NewNode.Nodes.Add("Completed: " & CStr(nCompleted))
NewNode.Nodes.Add("Failed: " & CStr(nFailed))
NewNode.Nodes.Add("Warning: " & CStr(nWarning))

End Sub


NetReceiveCStoreResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCStoreResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer) Handles LEADDICOMNet1.NetReceiveCStoreResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-STORE-RESPONSE")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszClass)
NewNode.Nodes.Add("Status: " & CStr(nStatus))
End Sub


NetReceiveData Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "List2" of type "ListBox" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveData(ByVal hNet As Integer, ByVal nID As Short, ByVal hDicomCS As Integer, ByVal hDicomDS As Integer) Handles LEADDICOMNet1.NetReceiveData
'data was received
List2.Items.Add("Data was received - " & " ID: " & CStr(nID))

If (hDicomDS = 0) Then
List2.Items.Add("Data is a command set only!")
Else
'save the data set to disk
List2.Items.Add("Data includes a data set - saved to disk!")
LEADDICOM1.SaveExtDS(hDicomDS, "c:\temp\test.dic", 0)
End If
End Sub


NetReceiveNActionRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNActionRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nAction As Short, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNActionRequest
Dim nRet As Short
Dim NewNode As System.Windows.Forms.TreeNode
Dim szReply As String
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-ACTION-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Requested SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Requested SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Requested SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Action: " & CStr(nAction))

'this function should perform the action command - this is a function that you have to write
nRet = PerformActionCommand(pszClass, pszInstance, hDS)

If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
nRet = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PROCESSING_FAILURE
End If

'send a response
LEADDICOMNet1.SendNActionResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, nAction, hDS)

End Sub


NetReceiveNActionResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNActionResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer, ByVal nAction As Short, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNActionResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-ACTION-RESPONSE")

TreeView1.Nodes.Add(NewNode)

NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
TreeView1.Nodes.Add("Affected SOP Instance: " & pszInstance)
TreeView1.Nodes.Add("Action: " & CStr(nAction))
TreeView1.Nodes.Add("Status: " & CStr(nStatus))
End Sub


NetReceiveNCreateResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNCreateResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNCreateResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-CREATE-RESPONSE")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Status: " & CStr(nStatus))

End Sub


NetReceiveNDeleteResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNDeleteResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer) Handles LEADDICOMNet1.NetReceiveNDeleteResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-DELETE-RESPONSE")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Status: " & CStr(nStatus))

End Sub


NetReceiveNGetRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'LEADDICOM2 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNGetRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String) Handles LEADDICOMNet1.NetReceiveNGetRequest
Dim nRet As Short
Dim NewNode As System.Windows.Forms.TreeNode
Dim szReply As String
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-GET-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)

'this function will fill the values the data set elements in LEADDICOM2.hDicomDS
nRet = PerformNGETCommand(pszClass, pszInstance)

If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
nRet = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE

'send a response
LEADDICOMNet1.SendNGetResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, LEADDICOM2.hDicomDS)
End Sub

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'LEADDICOM2 is a DICOM Dataset defined outside this method
Private Function PerformNGETCommand(ByRef pszClass As String, ByRef pszInstance As String) As Short
Dim nRet As Short
Dim nTag As Integer
Dim x As Integer
Dim nVR As Short
'this sample simply loads a fixed data set 'here, a server should check the class and instance against
'all SOP classes it manages, and then fill out hDS from the
'correctly matching instance, if one is found
nRet = LEADDICOM1.LoadDS("e:\images\dicom16.dic", 0)
LEADDICOM2.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN, 0)
LEADDICOM2.ResetDS()
If (nRet = 0) Then
LEADDICOM1.MoveFirstElement(False)
Else
PerformNGETCommand = nRet
Exit Function
End If

For x = 0 To LEADDICOMNet1.RequestAttributeCount - 1
'get each element
nTag = LEADDICOMNet1.RequestAttributes(x)
LEADDICOM1.FindTag(nTag)
nVR = LEADDICOM1.CurrentTag.VR
nRet = LEADDICOM1.FindFirstElement(nTag, False)
'in this sample, if we don't find the requested tag, we
'do not return an empty element!
If (nRet = 0) Then
'copy the element value
LEADDICOM1.GetConvertValue()
LEADDICOM2.InsertElement(False, nTag, nVR, False, 0)
LEADDICOM2.StringValueCount = 1
LEADDICOM2.StringValues(0) = LEADDICOM1.StringValues(0)
LEADDICOM2.SetConvertValue()
End If
Next
PerformNGETCommand = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS
End Function


NetReceiveNGetResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
'This example uses the predefined variable "gszGetFile" of type "String"
Private Sub LEADDICOMNet1_NetReceiveNGetResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNGetResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-GET-RESPONSE")

TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Status: " & CStr(nStatus))

If (hDS <> 0) Then
'gszGetFile represent the file path to store the dataset.
nRet = LEADDICOM1.SaveExtDS(hDS, gszGetFile, 0)
TreeView1.Nodes.Add("Data Set - " & gszGetFile)
NewNode.EnsureVisible()
End If
End Sub


NetReceiveNReportRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub LEADDICOMNet1_NetReceiveNReportRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nEvent As Short, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNReportRequest
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-REPORT-REQUEST")

NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Event: " & CStr(nEvent))

'send response
LEADDICOMNet1.SendNReportResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS, nEvent, 0)

End Sub


NetReceiveNReportResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNReportResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer, ByVal nEvent As Short, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNReportResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-REPORT-RESPONSE")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Client: " & LEADDICOMNet1.GetPeerAddress(hNet))

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Status: " & CStr(nStatus))
NewNode.Nodes.Add("Event: " & CStr(nEvent))

End Sub


NetReceiveNSetRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNSetRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNSetRequest
Dim nRet As Short
Dim NewNode As System.Windows.Forms.TreeNode
Dim szReply As String
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-SET-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)

'this function will change the values of the requested SOP Instance
'to the values specefied in the data set elements in hDS
'this function should search all the managed SOP Instances for a
'match, and then change the requested elements.
'This is a function you must write
nRet = PerformNSETCommand(pszClass, pszInstance, hDS)

If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
nRet = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE

'send a response
LEADDICOMNet1.SendNSetResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, 0)

End Sub


NetReceiveNSetResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNSetResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNSetResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String

NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-SET-RESPONSE")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()

NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Status: " & CStr(nStatus))

End Sub


NetReceiveReleaseRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'This example uses the predefined variable "List2" of type "ListBox" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveReleaseRequest(ByVal hNet As Integer) Handles LEADDICOMNet1.NetReceiveReleaseRequest
Dim out As String
'Release Request was received
out = "Release Request was received"
List2.Items.Add(out)
LEADDICOMNet1.SendReleaseResponse(hNet)
End Sub


NetReceiveReleaseResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'This example uses the predefined variable "List2" of type "ListBox" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveReleaseResponse(ByVal hNet As Integer) Handles LEADDICOMNet1.NetReceiveReleaseResponse
Dim out As String
'Release Response was received
out = "Release Response was received"
List2.Items.Add(out)
End Sub


NetReceiveUnknown Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetReceiveUnknown(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal hCS As Integer, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveUnknown
Dim out As String
out = "Unknown Command Set/Data Set was received, and ignored"
out = out & Chr(13)
out = out & "Presentation ID: " & CStr(nPresentationID)
MessageBox.Show(out)

End Sub


NetSecureLinkReady Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetSecureLinkReady(ByVal hNet As Integer, ByVal nError As Integer) Handles LEADDICOMNet1.NetSecureLinkReady
Dim lTest As Integer
If nError <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("Error Code is " & LEADDICOMNet1.GetErrorSecure(hNet))
Exit Sub
End If
lTest = LEADDICOMNet1.GetCiphersuiteTLS(LEADDICOMNet1.hNet)
If lTest = LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA Then
MessageBox.Show("Ciphersuite is DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA")
End Sub


NetSend Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub LEADDICOMNet1_NetSend(ByVal hNet As Integer, ByVal nStatus As Short, ByVal nType As Short, ByVal lBytes As Integer) Handles LEADDICOMNet1.NetSend
'Some data was sent
MessageBox.Show ( "Data Sent to: " & LEADDICOMNet1.GetPeerAddress(hNet) & " Status = " & CStr(nStatus) )
End Sub


Preamble Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestPreamble ()
LEADDICOM1.GetDSPreamble()
MessageBox.Show(LEADDICOM1.Preamble)
End Sub

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Text1" of type "TextBox" from ".NET Framework".
Private Sub TestPreamble2()
LEADDICOM1.Preamble = Text1.Text
LEADDICOM1.SetDSPreamble()
End Sub


ProgressStatus Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "Label1" of type "Label" from ".NET Framework".
'This example uses the predefined variable "bQuit" of type "Boolean"
Private Sub LEADDICOM1_ProgressStatus(ByVal nPercent As Short) Handles LEADDICOM1.ProgressStatus
Label1.Text = "Loading..." & CStr(nPercent) & "%"
'bQuit is used to indicate the user request to abort the current operation.
If (bQuit = True) Then
LEADDICOM1.EnableProgressEvent = False
'stop the load
End If
System.Windows.Forms.Application.DoEvents()
End Sub


ResetDS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestResetDS
'Close the current Data Set
LEADDICOM1.ResetDS()
End Sub


ResetIOD Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestResetIOD ( )
'Clear all IOD items
LEADDICOM1.ResetIOD()
End Sub


ResetTag Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestResetTag ( )
'Clear all Tags
LEADDICOM1.ResetTag()
End Sub


ResetUID Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestResetUID ()
'Clear all UID Items
LEADDICOM1.ResetUID()
End Sub


ResetVR Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestResetVR ()
'Clear all items from the VR Table
LEADDICOM1.ResetVR()
End Sub


SaveDS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "SaveDlg1" of type "SaveFileDialog" from ".NET Framework".
Private Sub TestSaveDS ( )
Dim nRet As Short
'save a Data Set
LEADDICOM1.EnableMethodErrors = False
SaveDialog1.Filter = "DICOM Data Set|*.dic"
SaveDialog1.ShowDialog()
If (SaveDialog1.FileName <> "") Then
nRet = LEADDICOM1.SaveDS(SaveDialog1s.FileName, 0)
If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
MessageBox.Show("Error " & CStr(nRet) & " saveing file!")
End If
End If
LEADDICOM1.EnableMethodErrors = True
End Sub


Searching the Data Set for a Digital Signature Example for VB.NET

Sub FindSignature(ByRef objDS As LTDICLib.LEADDicomDS, ByRef sSignatureUID As String)
' Search the whole Data Set for the Digital Signature with the
' specified Digital Signature UID
If objDS.FindSignature(sSignatureUID) = False Then
MessageBox.Show("The Digital Signature was not found.", "Sample")
Exit Sub
End If
Dim sMsg As String
sMsg = "The Digital Signature was found." & vbNewLine & "Press Yes to examine it or No to delete it."
Select Case MessageBox.Show(sMsg, "Sample", MessageBoxButtons.YesNoCancel)
Case DialogResult.Yes
' Refer to Examining a Digital Signature Example
' for the procedure ExamineSignature
ExamineSignature(objDS, objDS.CurrentElement.hElement)
Case DialogResult.No
' Delete the Digital Signature
objDS.DeleteSignature()
End Select
End Sub


SendAbort Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSendAbort ( )
'Send Abort message
LEADDICOMNet1.SendAbort(LEADDICOMNet1.hNet, LTDNCLib.AbortConstants.PDU_ABORT_SOURCE_USER, 0)
End Sub


SendAssociateRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSendAssociateRequest ( )
'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'use default for association
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)
LEADDICOMNet1.SetCalling(LEADDICOMNet1.hPDU, "MI_CLIENT")
LEADDICOMNet1.SetCalled(LEADDICOMNet1.hPDU, "MI_SERVER")
'this shows a client sending to its server
LEADDICOMNet1.SendAssociateRequest(LEADDICOMNet1.hNet)
'now we can free the class
'LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU
End Sub


SendCCancelRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSendCCancelRequest()
' This example sends a C-Cancel Request to a server

'
'In this example:
'1. A connection exists between client and server
'2. An association exists between the client and server
Dim nPresentationID As Short = 1
'PresentationID of message to cancel
Dim nMessageID As Short = 1
'ID of message to cancel
LEADDICOMNet1.SendCCancelRequest(LEADDICOMNet1.hNet, nPresentationID, nMessageID)
End Sub


SendCEchoRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSendCEchoRequest ( )
Const UID_VERIFICATION_CLASS As String = "1.2.840.10008.1.1"
' Verification SOP Class
Dim szUID As String
Dim nID As Short
Dim nRet As Short
Dim hPDU As Integer
'send an Echo Request Command to the server
szUID = UID_VERIFICATION_CLASS
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szUID & ", Not Supported by Association!")
End If
Exit Sub
End If
'now, use the high-level method to send the command set
LEADDICOMNet1.SendCEchoRequest(LEADDICOMNet1.hNet, nID, 99, szUID)
End Sub


SendCEchoResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCEchoRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String) Handles LEADDICOMNet1.NetReceiveCEchoRequest
Dim nRet As Short
Dim NewNode As System.Windows.Forms.TreeNode
Dim szName As String
NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-ECHO-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()
NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
'use high-level method to send a response
LEADDICOMNet1.SendCEchoResponse(hNet, nPresentationID, nMessageID, pszClass, LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS)
End Sub


SendCFindRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'LEADDICOM2 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "nFileCount" of type "Integer"
Private Sub TestSendCFindRequest ( )
Const UID_STUDY_ROOT_QUERY_FIND As String = "1.2.840.10008.5.1.4.1.2.2.1"
' Study Root Query/Retrieve Information Model - FIND
Dim hPDU As Integer
Dim nID As Integer
Dim b As Boolean
Dim nRet As Short
Dim nVR As Short
Dim szUID As String
Dim x As Integer
'this example sends a command that will find all STUDIES on a called AE that
'supports the Study Root Query/Retrieve Information Model - FIND SOP Class
'send a Find request to the server
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
szUID = UID_STUDY_ROOT_QUERY_FIND
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szUID & ", Not Supported by Association!")
End If
Exit Sub
End If
'create a find attribute data set
LEADDICOM2.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN, 0)
LEADDICOM2.ResetDS()
'add the required fields for this seach
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement (False, LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0)
LEADDICOM2.StringValueCount = 1
LEADDICOM2.StringValues(0) = "STUDY"
'we are searching at the study level
LEADDICOM2.SetStringValue(1)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DATE)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DATE, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_TIME)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_TIME, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_ACCESSION_NUMBER)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_ACCESSION_NUMBER, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants5.TAG_STUDY_ID)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants5.TAG_STUDY_ID, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants5.TAG_STUDY_INSTANCE_UID)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants5.TAG_STUDY_INSTANCE_UID, nVR, False, 0)
'optional tags
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DESCRIPTION)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DESCRIPTION, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_OTHER_PATIENT_IDS)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_OTHER_PATIENT_IDS, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_ADDITIONAL_PATIENT_HISTORY)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_ADDITIONAL_PATIENT_HISTORY, nVR, False, 0)
LEADDICOM2.FindTag(LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_STUDY_RELATED_INSTANCES)
nVR = LEADDICOM2.CurrentTag.VR
LEADDICOM2.InsertElement(False, LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_STUDY_RELATED_INSTANCES, nVR, False, 0)
'now, send the command set and data set
'nFileCount is used to track the current CFindRequest responses count.
nFileCount = 0
LEADDICOMNet1.SendCFindRequest(LEADDICOMNet1.hNet, nID, 1, szUID, LTDICLib.DicomCommandSetMessagePriorities.COMMAND_PRIORITY_MEDIUM, LEADDICOM2.hDicomDS)
End Sub


SendCFindResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCFindRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal nPriority As Short, ByVal hDS As Integer)
Dim x As Integer = 0
Dim hPDU As Integer = 0
Dim szAE As String = Nothing
Dim NewNode As System.Windows.Forms.TreeNode = Nothing
Dim nRet As Short = 0
Dim szName As String = Nothing
Dim szFile As String = Nothing
Dim szReply As String = Nothing
'this sample simple returns all the data sets that it is managing.
'in a real-life scenario, this should perform an actual query based
'on the attribute values supplied in hDS
hPDU = LEADDICOMNet1.GetAssociate(hNet)
szAE = LEADDICOMNet1.GetCalling(hPDU)
NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-FIND-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()
NewNode.Nodes.Add("Presentation ID: " & System.Convert.ToString(nPresentationID))
NewNode.Nodes.Add("Message ID: " & System.Convert.ToString(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If nRet = 0 Then
szName = LEADDICOM1.get_CurrentUID().Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Priority: " & System.Convert.ToString(nPriority))
'load sample file 1
nRet = LEADDICOM1.LoadDS("e:\images\dicom16.dic", 0)
If nRet = 0 Then
LEADDICOMNet1.SendCFindResponse(hNet, nPresentationID, nMessageID, pszClass, CInt(LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PENDING), LEADDICOM1.hDicomDS)
End If
'send a Find Response - PENDING
nRet = LEADDICOM1.LoadDS("e:\images\test.dic", 0)
If nRet = 0 Then
LEADDICOMNet1.SendCFindResponse(hNet, nPresentationID, nMessageID, pszClass, CInt(LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PENDING), LEADDICOM1.hDicomDS)
End If
'now, send a Find Response - SUCCESS
LEADDICOMNet1.SendCFindResponse(hNet, nPresentationID, nMessageID, pszClass, CInt(LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS), 0)
End Sub


SendCGetRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "gszGetFile" of type "String"
Private Sub TestSendCGetRequest ( )
Const UID_SC_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.7"
' Secondary Capture Image Storage
Dim nRet As Short
Dim szClassUID As String
Dim nVR As Short
Dim hPDU As Integer
Dim nID As Short
'send a get request to the server
'gszGetFile will be used when this AE receives the NetReceiveCStoreRequest
'associated with this CGetRequest to save the data set
gszGetFile = InputBox("Select filename for retrieved data set", "Get Request", "d:\temp\get_request.dic")
If (Len(gszGetFile) < 1) Then Exit Sub
szClassUID = InputBox("What class do you wish to get?", "Get Request", UID_SC_IMAGE_STORAGE)
If (Len(szClassUID) < 1) Then Exit Sub
'create the data set that encodes the identifier to be matched
LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN, 0)
'add the required elements
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0)
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues(0) = "PATIENT"
LEADDICOM1.SetStringValue(1)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME)
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME, LEADDICOM1.CurrentTag.VR, False, 0)
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues(0) = "*"
'get all patients
LEADDICOM1.SetStringValue(1)
'add the optional fields that we want returned
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID)
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, LEADDICOM1.CurrentTag.VR, False, 0)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, False, 0)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX, nVR, False, 0)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES, nVR, False, 0)
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
Exit Sub
End If
LEADDICOMNet1.SendCGetRequest(LEADDICOMNet1.hNet, nID, 999, szClassUID, LTDICLib.DicomCommandSetMessagePriorities.COMMAND_PRIORITY_MEDIUM, LEADDICOM1.hDicomDS)
'we now must wait for the response and for the C-STORE sub-operations
End Sub


SendCGetResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCStoreResponse(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer) Handles LEADDICOMNet1.NetReceiveCStoreResponse
Dim NewNode As System.Windows.Forms.TreeNode
Dim nRet As Short
Dim szName As String
NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-STORE-RESPONSE")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()
NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszClass)
NewNode.Nodes.Add("Status: " & CStr(nStatus))
'use high-level method to send a response
LEADDICOMNet1.SendCGetResponse ( hNet, nPresentationID, nMessageID, pszClass, nRet, 0, 1, 0, 0, 0 )
End Sub


SendCMoveRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "gszGetFile" of type "String"
Private Sub TestSendCMoveRequest ( )
Const UID_NM_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.20"
' Nuclear Medicine Image Storage
Dim nRet As Short
Dim szClassUID As String
Dim nVR As Short
Dim hPDU As Integer
Dim nID As Short
'send a Move Request to the server
'gszGetFile is a predefined variable that will be used when we get
'the C-STORE-RQ event to store the file
gszGetFile = InputBox("Select filename for retrieved data set", "Move Request", "d:\temp\move_request.dic")
If (Len(gszGetFile) < 1) Then Exit Sub
szClassUID = InputBox("What class do you wish to move?", "Move Request", UID_NM_IMAGE_STORAGE)
If (Len(szClassUID) < 1) Then Exit Sub
'create the data set that encodes the identifier to be matched
LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN, 0)
'add the required elements
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL, nVR, False, 0)
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues(0) = "PATIENT" LEADDICOM1.SetStringValue(1)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME)
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME, LEADDICOM1.CurrentTag.VR, False, 0)
'add the optional fields that we want returned
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID)
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, LEADDICOM1.CurrentTag.VR, False, 0)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, False, 0)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX, nVR, False, 0)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES, nVR, False, 0)
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
Exit Sub
End If
'we are asking the Called AE to move the SOP Instance to ourselves
LEADDICOMNet1.SendCMoveRequest(LEADDICOMNet1.hNet, nID, 1, szClassUID, LTDICLib.DicomCommandSetMessagePriorities.COMMAND_PRIORITY_MEDIUM, "MI_TEST", LEADDICOM1.hDicomDS)
'we now must wait for the response and for the C-STORE sub-operations
End Sub


SendCStoreRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSendCStoreRequest ( )
Dim nRet As Short
Dim hPDU As Integer
Dim nID As Integer
Dim szClassUID As String
Dim szInstanceUID As String
'send a store request to the server
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
'pick the data set to send
nRet = LEADDICOM1.LoadDS("e:\images\dicom16.dic", 0)
If (nRet <> 0) Then
MsgBox("Error Loading Data Set!", , "Error")
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
Exit Sub
End If
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_SOP_INSTANCE_UID, False)
LEADDICOM1.GetStringValue(0, 1)
szInstanceUID = LEADDICOM1.StringValues(0)
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants1.TAG_SOP_CLASS_UID, False)
LEADDICOM1.GetStringValue(0, 1)
szClassUID = LEADDICOM1.StringValues(0)
'send the command set
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
Exit Sub
End If
LEADDICOMNet1.SendCStoreRequest(LEADDICOMNet1.hNet, nID, 999, szClassUID, szInstanceUID, LTDICLib.DicomCommandSetMessagePriorities.COMMAND_PRIORITY_MEDIUM, "", 0, LEADDICOM1.hDicomDS)
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
End Sub


SendCStoreResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveCStoreRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal nPriority As Short, ByVal pszMoveAE As String, ByVal nMoveMessageID As Short, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveCStoreRequest
Dim nRet As Short
Dim NewNode As System.Windows.Forms.TreeNode
Dim szReply As String
Dim szName As String
NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "C-STORE-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()
NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Priority: " & CStr(nPriority))
NewNode.Nodes.Add("Move AE Title: " & pszMoveAE)
NewNode.Nodes.Add("Move Message ID: " & CStr(nMoveMessageID))
'perform the store - this is a function that you have to write
nRet = PerformStoreCommand(hDS)
'send a response
szReply = "Store Response Command Set Sent - " 'use high-level method to send a response
LEADDICOMNet1.SendCStoreResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet)
MessageBox.Show(szReply & LEADDICOMNet1.GetPeerAddress(hNet))
End Sub


SendData Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'LEADDICOM2 is a DICOM Dataset defined outside this method
Private Sub TestSendData ()
'send a command set, then a data set
LEADDICOM2.InitCS(LTDICLib.DicomCommandSetConstants.COMMAND_C_STORE, True)
LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, 0)
'client is sending data
LEADDICOMNet1.SendData(LEADDICOMNet1.hNet, 1, LEADDICOM2.hDicomDS, LEADDICOM1.hDicomDS)
End Sub


SendNActionRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSendNActionRequest ( )
'this sample shows how to send an N-ACTION-REQUEST
Const UID_BASIC_FILM_BOX_CLASS As String = "1.2.840.10008.5.1.1.2"
' Basic Film Box SOP Class
Dim nRet As Short
Dim szClassUID As String
Dim szInstance As String
Dim nVR As Short
Dim hPDU As Integer
Dim nID As Short
Dim nAction As Short
'send an N-ACTION-REQUEST to the server
nAction = CShort(InputBox("What Action(1..10)?", "Action Request", CStr(1)))
szClassUID = InputBox("What class?", "Action Request", UID_BASIC_FILM_BOX_CLASS)
If (Len(szClassUID) < 1) Then Exit Sub
szInstance = InputBox("What instance?", "Action Request", "1.1.1.1")
If (Len(szInstance) < 1) Then Exit Sub
'here you would create a data set that encodes the Action Arguments 'for this example, we just load a dataset
'...
nRet = LEADDICOM1.LoadDS("e:\images\dicom16.dic", 0)
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
Exit Sub
End If
LEADDICOMNet1.SendNActionRequest(LEADDICOMNet1.hNet, nID, 1, szClassUID, szInstance, nAction, LEADDICOM1.hDicomDS)
End Sub


SendNCreateRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSendNCreateRequest ( )
Const UID_SC_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.7"
' Secondary Capture Image Storage
Dim szClassUID As String
Dim szInstanceUID As String
Dim nID As Short
Dim hPDU As Integer
Dim nRet As Short
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
szClassUID = InputBox("Enter SOP Class to Create:", "Create", UID_SC_IMAGE_STORAGE)
szInstanceUID = InputBox("Enter SOP Instance to Create:", "Create", "1.2.840.113619.2.30.1.1762288927.1489.906240296.255")
'send a Create Request Command to the server
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
Exit Sub
End If
'here, you should construct a Data Set that contains the attributes 'and values for the new SOP Instance.
'In this sample, we simply load a Data Set from a file on disk 'pick the data set to send
nRet = LEADDICOM1.LoadDS("e:\images\dicom16.dic", 0)
'send a Delete Request message
LEADDICOMNet1.SendNCreateRequest(LEADDICOMNet1.hNet, nID, 999, szClassUID, szInstanceUID, LEADDICOM1.hDicomDS)
End Sub


SendNCreateResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNCreateRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNCreateRequest
Dim nRet As Short
Dim NewNode As System.Windows.Forms.TreeNode
Dim szReply As String
Dim szName As String
NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-CREATE-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()
NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
'This is a function that would perform the actual creation of the SOP Instance - this is a function that you have to write
nRet = PerformCreateCommand(pszClass, pszInstance, hDS)
If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then nRet = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PROCESSING_FAILURE
'send a response
szReply = "Create Response Command Set Sent - "
'note, we simply send back the passed hDS in this sample
LEADDICOMNet1.SendNCreateResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet, hDS)
End Sub


SendNDeleteRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSendNDeleteRequest ( )
Const UID_SC_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.7"
' Secondary Capture Image Storage
Dim szClassUID As String
Dim szInstanceUID As String
Dim nID As Short
Dim hPDU As Integer
Dim nRet As Short
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
szClassUID = InputBox("Enter SOP Class to Delete:", "Delete", UID_SC_IMAGE_STORAGE)
szInstanceUID = InputBox("Enter SOP Instance to Delete:", "Delete", "1.2.840.113619.2.30.1.1762288927.1489.906240296.255")
'send a Delete Request Command to the server
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
Exit Sub
End If
LEADDICOMNet1.SendNDeleteRequest(LEADDICOMNet1.hNet, nID, 999, szClassUID, szInstanceUID)
End Sub


SendNDeleteResponse Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type "TreeView" from ".NET Framework".
Private Sub LEADDICOMNet1_NetReceiveNDeleteRequest(ByVal hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short, ByVal pszClass As String, ByVal pszInstance As String) Handles LEADDICOMNet1.NetReceiveNDeleteRequest
Dim nRet As Short
Dim NewNode As System.Windows.Forms.TreeNode
Dim szReply As String
Dim szName As String
NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-DELETE-REQUEST")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()
NewNode.Nodes.Add("Presentation ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected SOP Instance: " & pszInstance)
'this is a function that you have to write
nRet = PerformDeleteCommand(pszClass, pszInstance)
If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
nRet = LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE
'send a response
szReply = "Delete Response Command Set Sent - "
LEADDICOMNet1.SendNDeleteResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, nRet)
MessageBox.Show(szReply & LEADDICOMNet1.GetPeerAddress(hNet))
End Sub


SendNGetRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "gszGetFile" of type "String"
Private Sub TestSendNGetRequest ( )
Const UID_SC_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.7"
' Secondary Capture Image Storage
Dim nRet As Short
Dim szClassUID As String
Dim szInstance As String
Dim nVR As Short
Dim hPDU As Integer
Dim nID As Short
'send an N-GET-REQUEST to the server
'gszGetFile is a predefined variable used in the NetReceiveNGetResponse event
gszGetFile = InputBox("Select filename for retrieved data set", "Get Request", "d:\temp\N_GET_REQ.dic")
If (Len(gszGetFile) < 1) Then Exit Sub
szClassUID = InputBox("What class do you wish to get?", "Get Request", UID_SC_IMAGE_STORAGE)
If (Len(szClassUID) < 1) Then Exit Sub
szInstance = InputBox("What instance do you wish to get?", "Get Request", "1.1.1.1")
If (Len(szInstance) < 1) Then Exit Sub
'here, you must create a list of the identifiers 'that you wish to get from the server
LEADDICOMNet1.RequestAttributeCount = 4
LEADDICOMNet1.RequestAttributes(0) = LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME
LEADDICOMNet1.RequestAttributes(1) = LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID
LEADDICOMNet1.RequestAttributes(2) = LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX
LEADDICOMNet1.RequestAttributes(3) = LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
Exit Sub
End If
LEADDICOMNet1.SendNGetRequest(LEADDICOMNet1.hNet, nID, 1, szClassUID, szInstance)
End Sub


SendNonSecureISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSendNonSecureISCL ( )
' number of bytes is 10 becuase the string has a terminating null character
LEADDICOMNet1.SendNonSecureISCL(LEADDICOMNet1.hNet, "Test ISCL", 10)
End Sub


SendNReportRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSendNReportRequest ( )
Const UID_US_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.6.1"
' Ultrasound Image Storage
Dim x As Integer
Dim hClient As Integer
Dim nVR As Short
Dim szClass As String
Dim szInstance As String
Dim hPDU As Integer
Dim nID As Short
Dim nRet As Short

'send an event report message to all clients 'let them know a new patient was created
'this sample just uses a made up instance
szClass = UID_US_IMAGE_STORAGE
szInstance = "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1"

'create the data set
LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN, 0)
LEADDICOM1.ResetDS()

'add the required elements
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_SPECIFIC_CHARACTER_SET)
nVR = LEADDICOM1.CurrentTag.VR LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_SPECIFIC_CHARACTER_SET, nVR, False, 0)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATION_DATE)
nVR = LEADDICOM1.CurrentTag.VR LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATION_DATE, nVR, False, 0)

LEADDICOM1.DateValueCount = 1
LEADDICOM1.DateValues(0).Day = 31
LEADDICOM1.DateValues(0).Month = 12
LEADDICOM1.DateValues(0).Year = 1999
LEADDICOM1.SetDateValue(1)

LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATION_TIME)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATION_TIME, nVR, False, 0)
LEADDICOM1.TimeValueCount = 1
LEADDICOM1.TimeValues(0).Hours = 12 LEADDICOM1.TimeValues(0).Minutes = 30
LEADDICOM1.SetTimeValue(1)

LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATOR_UID)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATOR_UID, nVR, False, 0)
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues(0) = "9.9.9999.9" 'some unique value
LEADDICOM1.SetStringValue(1)

LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME, nVR, False, 0)
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues(0) = "dummy_patient_name"
LEADDICOM1.SetStringValue(1)

'add the optional fields that we want returned
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, nVR, False, 0)
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues(0) = "dummy_patient_id"
LEADDICOM1.SetStringValue(1)
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, False, 0)
LEADDICOM1.DateValueCount = 1
LEADDICOM1.DateValues(0).Day = 31
LEADDICOM1.DateValues(0).Month = 12
LEADDICOM1.DateValues(0).Year = 1999
LEADDICOM1.SetDateValue(1)

LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX)
nVR = LEADDICOM1.CurrentTag.VR
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX, nVR, False, 0)
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues(0) = "M"
LEADDICOM1.SetConvertValue()

For x = 0 To LEADDICOMNet1.GetClientCount(LEADDICOMNet1.hNet) - 1
hClient = LEADDICOMNet1.GetClient(LEADDICOMNet1.hNet, x)
hPDU = LEADDICOMNet1.GetAssociate(hClient)
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClass)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClass)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClass & ", Not Supported by Association!")
End If
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
End If
'now, send the message
LEADDICOMNet1.SendNReportRequest(hClient, nID, 1, szClass, szInstance, 1, LEADDICOM1.hDicomDS)
Next
End Sub


SendNSetRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSendNSetRequest ( )
Const UID_SC_IMAGE_STORAGE As String = "1.2.840.10008.5.1.4.1.1.7"
' Secondary Capture Image Storage
Dim nRet As Short
Dim szClassUID As String
Dim szInstance As String
Dim hPDU As Integer
Dim nID As Short
Dim szNewID As String
'this sample allows you to change the patient id of an SOP Instance
'send an N-GET-REQUEST to the server
szClassUID = InputBox("What class do you wish to set?", "Set Request", UID_SC_IMAGE_STORAGE)
If (Len(szClassUID) < 1) Then Exit Sub
szInstance = InputBox("What instance do you wish to set?", "Set Request", "1.1.1.1")
If (Len(szInstance) < 1) Then Exit Sub
szNewID = InputBox("Enter New Patient ID?", "Set Request", "123-45-6789")
If (Len(szNewID) < 1) Then Exit Sub
'create the data set that encodes the changed element(s)
LEADDICOM1.InitDS(LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN, 0)
LEADDICOM1.ResetDS()
LEADDICOM1.FindTag(LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID)
LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, LEADDICOM1.CurrentTag.VR, False, 0)
LEADDICOM1.StringValueCount = 1
LEADDICOM1.StringValues(0) = szNewID
LEADDICOM1.SetStringValue(1)
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet)
'now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MessageBox.Show("Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!")
Else
MessageBox.Show("Abstract Syntax, " & szClassUID & ", Not Supported by Association!")
End If
Exit Sub
End If
LEADDICOMNet1.SendNSetRequest(LEADDICOMNet1.hNet, nID, 1, szClassUID, szInstance, LEADDICOM1.hDicomDS)
End Sub


SendReleaseRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSendReleaseRequest
'set called application title
LEADDICOMNet1.SetCalled(LEADDICOMNet1.hPDU, "Called Program")
'set calling application title
LEADDICOMNet1.SetCalling(LEADDICOMNet1.hPDU, "Calling Program")
'display the current values
MessageBox.Show(LEADDICOMNet1.GetCalled(LEADDICOMNet1.hPDU))
MessageBox.Show(LEADDICOMNet1.GetCalling(LEADDICOMNet1.hPDU))
End Sub


SetAuthDataISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetAuthDataISCL ( )
'Example 1
LEADDICOMNet1.SetAuthDataISCL(LEADDICOMNet1.hNet, "Server LEAD ISCL", 16)
'Example 2: Binary Data
Dim DataArray(4) As Byte
DataArray(0) = &H21S
DataArray(1) = &H14S
DataArray(2) = &H0S
DataArray(3) = &H45S
DataArray(4) = &HF4S
LEADDICOMNet1.SetAuthDataISCL(LEADDICOMNet1.hNet, DataArray, 5)
End Sub


SetBitmapListValue example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
'This example uses the predefined variable "LEADRasterView2" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestSetBitmapListValue ()
Dim lCount As Integer
Dim nRet As Short
Dim IO As New LTRASTERIOLib.LEADRasterIO
Dim Process As New LTRASTERPROCLib.LEADRasterProcess
LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement(False) LEADDICOM1.MoveRootElement()
'insert a new element for the BitmapList Value
nRet = LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, LTDICLib.DicomVRCodeConstants.VR_OB, False, 0)
'load an image
IO.Load(LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1)
MessageBox.Show("Image loaded from File - Wait")
'create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem(0, LEADRasterView1.Raster.Bitmap)
Process.Flip(LEADRasterView1.Raster)
LEADRasterView2.Raster.InsertBitmapListItem(1, LEADRasterView1.Raster.Bitmap)
Process.Reverse(LEADRasterView1.Raster)
LEADRasterView2.Raster.InsertBitmapListItem(2, LEADRasterView1.Raster.Bitmap)
'insert the image list into the element
LEADDICOM1.BitmapList = LEADRasterView2.Raster.BitmapList
'set the bitmap list
nRet = LEADDICOM1.SetBitmapListValue(LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)
If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
MessageBox.Show("Image set to Data Set - Wait")
LEADDICOM1.BitmapList = 0
'free the value
MessageBox.Show("ImageList cleared from memory - Wait")
lCount = LEADDICOM1.GetBitmapCount
'get the bitmap list back
If (nRet = 0) Then
LEADDICOM1.GetBitmapListValue(0, lCount, 0, LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0)
LEADRasterView1.Raster.BitmapList = LEADDICOM1.BitmapList
LEADRasterView1.ForceRepaint()
End If
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("ImageList loaded from Data Set - Wait")
End Sub


SetBitmapValue example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestSetBitmapValue()
Dim lCount As Integer
Dim nRet As Short
Dim IO As New LTRASTERIOLib.LEADRasterIO
LEADDICOM1.EnableMethodErrors = False
'move to the root element
LEADDICOM1.MoveFirstElement(False)
LEADDICOM1.MoveRootElement()
'insert a new element for the Bitmap Value
nRet = LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement(False, LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, LTDICLib.DicomVRCodeConstants.VR_OB, False, 0)
'load an image
IO.Load(LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1)
MessageBox.Show("Image loaded from File - Wait")
'insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap
'set the bitmap
nRet = LEADDICOM1.SetBitmapValue(LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)
If (nRet <> 0) Then
MessageBox.Show("Error")
Exit Sub
End If
MessageBox.Show("Image set to Data Set - Wait")
LEADDICOM1.Bitmap = 0
'free the value
MessageBox.Show("Image cleared from memory - Wait")
'get the bitmap back
If (nRet = 0) Then
LEADDICOM1.GetBitmapValue(0, 0, LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0)
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADRasterView1.ForceRepaint()
End If
LEADDICOM1.EnableMethodErrors = True
MessageBox.Show("Image loaded from Data Set - Wait")
End Sub


SetCalled Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetCalled ( )
'set called application title
LEADDICOMNet1.SetCalled(LEADDICOMNet1.hPDU, "Called Program")
'set calling application title
LEADDICOMNet1.SetCalling(LEADDICOMNet1.hPDU, "Calling Program")
'display the current values
MessageBox.Show(LEADDICOMNet1.GetCalled(LEADDICOMNet1.hPDU))
MessageBox.Show(LEADDICOMNet1.GetCalling(LEADDICOMNet1.hPDU))
End Sub


SetCipherToIndexTLS Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetCipherToIndexTLS ( )
LEADDICOMNet1.SetCipherToIndexTLS(LEADDICOMNet1.hNet, 0, LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)
Dim lTest As Integer
lTest = LEADDICOMNet1.GetCipherFromIndexTLS(LEADDICOMNet1.hNet, 0)
If lTest = LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA Then
MessageBox.Show("Cipher DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA")
End If
End Sub


SetClientCertificateTLS Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetClientCertificateTLS()
If LEADDICOMNet1.SetClientCertificateTLS(LEADDICOMNet1.hNet, "c:\cert\client.pem", LTDNCLib.DicomTLSCertType.L_TLS_FILETYPE_PEM, "") = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("Loading client certificate succeeded")
Else
MessageBox.Show("Loading client certificate failed")
End If
End Sub


SetCommandSet (DICOM Control) Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub LEADDICOMNet1_NetReceiveData(ByVal hNet As Integer, ByVal nID As Short, ByVal hDicomCS As Integer, ByVal hDicomDS As Integer) Handles LEADDICOMNet1.NetReceiveData
Dim nRet As Short
'we have received a data message
'copy the Command Set so we can examine its elements
LEADDICOM1.SetCommandSet(hDicomCS)
nRet = LEADDICOM1.FindFirstElement(LTDICLib.DicomCommandSetTagConstants.TAG_COMMAND_FIELD, False)
nRet = LEADDICOM1.GetShortValue(0, 1)
MessageBox.Show("Command Field = 0x" & Hex(LEADDICOM1.ShortValues(0)))
End Sub


SetCurrentElement example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSetCurrentElement( )
Dim lCount As Integer
LEADDICOM1.EnableMethodErrors = False
'get total number of images in this Data Set
LEADDICOM1.SetCurrentElement(0)
lCount = LEADDICOM1.GetBitmapCount
MessageBox.Show("Total: " & CStr(lCount))
'move to last image tag in the Data Set
LEADDICOM1.FindLastElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
'get total number of images in this tag
lCount = LEADDICOM1.GetBitmapCount
MessageBox.Show("This tag: " & CStr(lCount))
End Sub


SetDefaultEncryptionISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetDefaultEncryptionISCL ( )
LEADDICOMNet1.SetDefaultEncryptionISCL(LEADDICOMNet1.hNet, LTDNCLib.DicomEncryptionMode.DICOM_ISCL_ENCRYPT_DESCBC)
End Sub


SetDefaultSigningISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetDefaultSigningISCL ( )
LEADDICOMNet1.SetDefaultSigningISCL(LEADDICOMNet1.hNet, LTDNCLib.DicomMsgAuthCode.DICOM_ISCL_MAC_NONE)
End Sub


SetEncryptKey Example for VB.NET

SetEncryptKeyISCL Example for VB.NET

<StructLayout(LayoutKind.Sequential)> Public Class KeyLoHi
Public LoValue As UInt32
Public HiValue As UInt32
End Class

<StructLayout(LayoutKind.Sequential)> Public Class Key64
Public Value As UInt64
End Class

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetEncryptKeyISCL ()
Dim key As Key64 Dim
compKey As KeyLoHi
Dim UnManagedMemory As IntPtr
key = New Key64
compKey = New KeyLoHi
UnManagedMemory = Marshal.AllocHGlobal(Marshal.SizeOf(compKey))
' use a 64 bit key value of 0123456789ABCDEF hex.
compKey.HiValue = System.Convert.ToUInt32(&H1234567L)
compKey.LoValue = Convert.ToUInt32(&H89ABCDEFL)
key.Value = Convert.ToUInt64(0)
Marshal.StructureToPtr(compKey, UnManagedMemory, True)
Marshal.PtrToStructure(UnManagedMemory, key)
LEADDICOMNet1.SetEncryptKeyISCL(LEADDICOMNet1.hNet,
 1, key.Value)
LEADDICOMNet1.SetIndexForEncryptISCL(LEADDICOMNet1.hNet, 1)
MessageBox.Show("Index value is: " & LEADDICOMNet1.GetIndexForEncryptISCL(LEADDICOMNet1.hNet))
End Sub


SetMaxCommBlockLengthISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetMaxCommBlockLengthISCL ( )
Dim nBlockLen As Integer
LEADDICOMNet1.NetworkSecurityMode = LTDNCLib.DicomSecurityModes.DICOM_SECURE_ISCL
LEADDICOMNet1.StartUp()
LEADDICOMNet1.SetMaxCommBlockLengthISCL(LEADDICOMNet1.hNet, 8160)
' size of the blocks sent to network layer will be 8192 bytes (a 32-byte header is added)
' other initializations...
LEADDICOMNet1.Connect("", 0, "127.0.0.1", 2761)
'connect to a server running on local computer at port 2761
nBlockLen = LEADDICOMNet1.GetCommBlockLengthISCL(LEADDICOMNet1.hNet)
MessageBox.Show("Negotiated communication block size is" & nBlockLen)
End Sub


SetMaxMessageLengthISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetMaxMessageLengthISCL ( )
LEADDICOMNet1.SetMaxMessageLengthISCL(LEADDICOMNet1.hNet, 1048576)
' size of the message accepted is at most 1 MB - or 1048576 bytes
End Sub


SetMutualAuthAlgISCL Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetMutualAuthAlgISCL ( )
LEADDICOMNet1.SetMutualAuthAlgISCL(LEADDICOMNet1.hNet, LTDNCLib.DicomMutualAuthMode.DICOM_ISCL_MUTUAL_AUTH_3P4W)
End Sub


SetMutualAuthKeyISCL Example for VB.NET

<StructLayout(LayoutKind.Sequential)> Public Class KeyLoHi
Public LoValue As UInt32
Public HiValue As UInt32
End Class

<StructLayout(LayoutKind.Sequential)> Public Class Key64
Public Value As UInt64
End Class

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetMutualAuthKeyISCL ()
Dim key As Key64
Dim compKey As KeyLoHi
Dim UnManagedMemory As IntPtr
key = New Key64
compKey = New KeyLoHi
UnManagedMemory = Marshal.AllocHGlobal(Marshal.SizeOf(compKey))
' use a 64 bit key value of 0123456789ABCDEF hex.
compKey.HiValue = System.Convert.ToUInt32(&H1234567L)
compKey.LoValue = Convert.ToUInt32(&H89ABCDEFL)
key.Value = Convert.ToUInt64(0)
Marshal.StructureToPtr(compKey, UnManagedMemory, True)
Marshal.PtrToStructure(UnManagedMemory, key)
LEADDICOMNet1.SetMutualAuthKeyISCL(LEADDICOMNet1.hNet,
 1, key.Value)
LEADDICOMNet1.SetIndexForMutualAuthISCL(LEADDICOMNet1.hNet,
 1)
MessageBox.Show("Index value is: " & LEADDICOMNet1.GetIndexForMutualAuthISCL(LEADDICOMNet1.hNet))
End Sub


SetRequest Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetRequest ( )
'set associate as Accept
If (LEADDICOMNet1.hPDU <> 0) Then
LEADDICOMNet1.SetRequest(LEADDICOMNet1.hPDU, False)
End If
End Sub


SetServerCertificateTLS Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestSetServerCertificateTLS ( )
If LEADDICOMNet1.SetServerCertificateTLS(LEADDICOMNet1.hNet, "c:\cert\Server.pem", LTDNCLib.DicomTLSCertType.L_TLS_FILETYPE_PEM, "") = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
MessageBox.Show("Loading Server certificate succeeded")
Else
MessageBox.Show("Loading Server certificate failed")
End If
End Sub


SetTagName example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSetTagName()
LEADDICOM1.EnableMethodErrors = True
On Error GoTo SETTAGNAMEERROR
'move to the selected Tag
LEADDICOM1.FindIndexTag (13)
'change the name
LEADDICOM1.SetTagName("New Tag Name")
Exit Sub
SETTAGNAMEERROR:
MessageBox.Show("Error")
End Sub


Setting an overlay bitmap list Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestSettingOverlayBitmapList()
LEADDICOM1.OverlayBitmapList = LEADRasterView1.Raster.BitmapList
LEADDICOM1.SetOverlayBitmapList(0, 0)
End Sub


Setting modality LUT data and attributes Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSettingModalityLUTDataAndAttributes()
' This example will set Rescale Intercept (0028,1052)
' element to -128.0 and Rescale Slope (0028,1053)
' element to 1.0
' Object that will hold modality LUT attributes
Dim ModalityLUTAttributes As LTDICLib.LModalityLUTAttributes
Dim iRet As Short
Dim Data As Object
ModalityLUTAttributes = LEADDICOM1.ModalityLUTAttributes
'No Modality LUT Sequence (0028,3000)
ModalityLUTAttributes.IsModalityLUTSequence = False
'Yes there is a rescale slope and intercept
ModalityLUTAttributes.IsRescaleSlopeIntercept = True
ModalityLUTAttributes.RescaleIntercept = -128
ModalityLUTAttributes.RescaleSlope = 1
ModalityLUTAttributes.RescaleType = "UNSPECIFIED"
' Delete the existing modality LUT,
' although we don't have to !
LEADDICOM1.DeleteModalityLUT(0)
'Set rescale slope and intercept
iRet = LEADDICOM1.SetModalityLUT(Data,
 0)
End Sub


Setting palette color LUT data and attributes Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSettingPaletteColorLUTDataAttributes()
'This example will set the attributes and the data for a
'Palette Color Lookup Table
Dim lLUTIndex As Integer
Dim iRet As Short
Dim RedLUTData() As Integer
Dim GreenLUTData() As Integer
Dim BlueLUTData() As Integer
Dim PaletteColorLUTAttributes As LTDICLib.LPaletteColorLUTAttributes
PaletteColorLUTAttributes = LEADDICOM1.PaletteColorLUTAttributes

' Initialize Red Palette Color Lookup Table Descriptor (0028,1101)
PaletteColorLUTAttributes.RedLUTDescriptorFirstMapped = 0
PaletteColorLUTAttributes.RedLUTDescriptorEntryBits = 16
PaletteColorLUTAttributes.RedLUTDescriptorNumberOfEntries = &H10000

' Initialize Green Palette Color Lookup Table Descriptor (0028,1102)
PaletteColorLUTAttributes.GreenLUTDescriptorFirstMapped = 0
PaletteColorLUTAttributes.GreenLUTDescriptorEntryBits = 16
PaletteColorLUTAttributes.GreenLUTDescriptorNumberOfEntries = &H10000

' Initialize Blue Palette Color Lookup Table Descriptor (0028,1103)
PaletteColorLUTAttributes.BlueLUTDescriptorFirstMapped = 0
PaletteColorLUTAttributes.BlueLUTDescriptorEntryBits = 16
PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries = &H10000
ReDim RedLUTData(PaletteColorLUTAttributes.RedLUTDescriptorNumberOfEntries)
ReDim GreenLUTData(PaletteColorLUTAttributes.GreenLUTDescriptorNumberOfEntries)
ReDim BlueLUTData(PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries)

For lLUTIndex = 0 To (PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries - 1)
RedLUTData(lLUTIndex) = lLUTIndex
GreenLUTData(lLUTIndex) = lLUTIndex / 2
BlueLUTData(lLUTIndex) = lLUTIndex / 4
Next
' Delete all the elements that describe the "Palette Color Lookup Table".
iRet = LEADDICOM1.DeletePaletteColorLUT(0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' Set the new "Palette Color Lookup Table" attributes
iRet = LEADDICOM1.SetPaletteColorLUTAttributes(0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' Set Red Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData(RedLUTData, LTDICLib.DicomPaletteColorLUTConstants.DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' Set Green Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData(GreenLUTData, LTDICLib.DicomPaletteColorLUTConstants.DICOM_PALETTE_COLOR_LUT_TYPE_GREEN, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' Set Blue Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData(BlueLUTData, LTDICLib.DicomPaletteColorLUTConstants.DICOM_PALETTE_COLOR_LUT_TYPE_BLUE, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
End Sub


Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
'This example uses the predefined variable "LEADRasterView2" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestSettingTheAttributesAndBitmapsForAllOverlaysInsideDICOMDataset()
' This function will store the overlays associated
' with a bitmap handle inside the DICOM dataset
Dim OverlayAttributesDS As LTRASTERPROCLib.LEADOverlayAttributes
Dim OverlayAttributesRaster As LTRASTERPROCLib.LEADOverlayAttributes
Dim GroupNumber As Integer
Dim IsOverlayInDataset As Boolean
Dim OverlayCount As Integer
Dim OverlayIndex As Integer
Dim iRet As Short
Dim Process As New LTRASTERPROCLib.LEADRasterProcess
IsOverlayInDataset = False
GroupNumber = 0 OverlayIndex = 0
Process.EnableMethodErrors = False
' Do we have any overlays at all?
OverlayCount = Process.GetOverlayCount(LEADRasterView1.Raster, 0)
' If no overlays just exit sub
If (OverlayCount = 0) Then
MessageBox.Show("error")
Exit Sub
End If
' Blow away all the overlays in the file
For OverlayIndex = 0 To OverlayCount - 1
LEADDICOM1.DeleteOverlay(OverlayIndex, 0)
Next
OverlayAttributesDS = LEADDICOM1.OverlayAttributes
' Loop through the overlays and add them into the DICOM file
For OverlayIndex = 0 To OverlayCount - 1
' Get overlay attributes
iRet = Process.GetOverlayAttributes(LEADRasterView1.Raster, OverlayIndex, LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_ORIGIN Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_FLAGS Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_BITINDEX Or LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_DICOM)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
OverlayAttributesRaster = Process.OverlayAttributes
OverlayAttributesDS.OriginX = OverlayAttributesRaster.OriginX
OverlayAttributesDS.OriginY = OverlayAttributesRaster.OriginY
OverlayAttributesDS.Flags = OverlayAttributesRaster.Flags
OverlayAttributesDS.Color = System.Convert.ToUInt32(System.Drawing.ColorTranslator.FromOle(System.Convert.ToInt32(OverlayAttributesRaster.Color)))
OverlayAttributesDS.BitPosition = OverlayAttributesRaster.BitPosition
OverlayAttributesDS.Rows = OverlayAttributesRaster.Rows
OverlayAttributesDS.Columns = OverlayAttributesRaster.Columns
OverlayAttributesDS.Type = OverlayAttributesRaster.Type
OverlayAttributesDS.BitsAllocated = OverlayAttributesRaster.BitsAllocated
OverlayAttributesDS.Subtype = OverlayAttributesRaster.Subtype
OverlayAttributesDS.Label = OverlayAttributesRaster.Label
OverlayAttributesDS.ROIArea = OverlayAttributesRaster.ROIArea
OverlayAttributesDS.ROIMean = OverlayAttributesRaster.ROIMean
OverlayAttributesDS.ROIStandardDeviation = OverlayAttributesRaster.ROIStandardDeviation
OverlayAttributesDS.NumberFramesInOverlay = OverlayAttributesRaster.NumberFramesInOverlay
OverlayAttributesDS.ImageFrameOrigin = OverlayAttributesRaster.ImageFrameOrigin
OverlayAttributesDS.ActivationLayer = OverlayAttributesRaster.ActivationLayer
OverlayAttributesDS.Description = OverlayAttributesRaster.Description
' Set overlay attributes inside DICOM
iRet = LEADDICOM1.SetOverlayAttributes(OverlayIndex, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' burn overlays which need to be part of the image
If (OverlayAttributesRaster.Flags And LTRASTERPROCLib.OverlayAttributesFlagsConstants.OVERLAY_USEBITPLANE)Then
iRet = Process.UpdateOverlayBits(LEADRasterView1.Raster, OverlayIndex, LTRASTERPROCLib.OverlayBitsConstants.SETOVERLAYBITS_FROMOVERLAY)
If (iRet <> 0)Then
MessageBox.Show("error")
Exit Sub
End If
End If
' Get the overlay data (if it's not part of the image)
LEADRasterView2.Raster.Free()
iRet = Process.GetOverlayBitmap(LEADRasterView1.Raster, OverlayIndex, LEADRasterView2.Raster, LTRASTERPROCLib.OverlayConstants.OVERLAY_COPY)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
' Set overlay data into DICOM
LEADDICOM1.OverlayBitmap = LEADRasterView2.Raster.Bitmap
iRet = LEADDICOM1.SetOverlayBitmap(OverlayIndex, 0)
If (iRet <> 0) Then
MessageBox.Show("error")
Exit Sub
End If
Next
End Sub


SetUIDName example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSetUIDName()
LEADDICOM1.EnableMethodErrors = True
On Error GoTo SETNAMEERROR
'move to the selected UID
LEADDICOM1.FindIndexUID(13)
'change the name
LEADDICOM1.SetUIDName("New UID Name")
Exit Sub
SETNAMEERROR:
MessageBox.Show("Error")

End Sub


SetVRName example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestSetVRName()
Dim lIndex As Integer
lIndex = 13
LEADDICOM1.EnableMethodErrors = True
On Error GoTo SETVRNAMEERROR

'move to the selected VR
LEADDICOM1.FindIndexVR(lIndex)

'change the name
LEADDICOM1.SetVRName("New VR Name")
MessageBox.Show("New Name = " & LEADDICOM1.CurrentVR.Name)
Exit Sub

SETVRNAMEERROR:
MessageBox.Show("Error")

End Sub


StartUp Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestStartUp ( )
Dim nRet As Short
'start the network 'set the temporary file path
LEADDICOMNet1.NetworkTempPath = "d:\temp"
LEADDICOMNet1.NetworkSecurityMode = LTDNCLib.DicomSecurityModes.DICOM_SECURE_NONE
nRet = LEADDICOMNet1.StartUp
If (nRet <> 0) Then
MessageBox.Show("Error")
End If
'do some network communication here
'...
'...
'shut down the network
LEADDICOMNet1.ShutDown ( )
End Sub


Version Example for VB.NET

'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestVersion ( )
'check the Associate Class version
MessageBox.Show("Version: " & CStr(LEADDICOMNet1.GetVersion(LEADDICOMNet1.hPDU)))
'set the version
LEADDICOMNet1.SetVersion(LEADDICOMNet1.hPDU, 99)
MessageBox.Show("Version: " & CStr(LEADDICOMNet1.GetVersion(LEADDICOMNet1.hPDU)))
End Sub


Examples for C# Programmers

You can test any of the following example by adding a command button and pasting the sample code in the Click procedure.

Adding a DICOM Data Set to a DICOM Directory for C#

CreateObject Example for C#

Creating a DICOM Directory for C#

Loading a DICOM Directory for C#

Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control for C#

Using the DicomFileInsert Event for C#

Performing Basic Print Management Example for C#

Performing Pull Stored Print Management Example for C#

Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport Example for C#

Getting Printer Information Example for C#

Getting Printer Configuration Information Example for C#

Getting Print Job Information Example for C#

Loading a Data Set

Miscellaneous Examples


Adding a DICOM Data Set to a DICOM Directory for C#

//LEADDicomDS is a DICOM Dataset defined outside this method
private void AddingDICOMDataSetToDICOMDirectory()
{
// The following code snippet demonstrates how to use
 the LEADTOOLS DICOM
// DS COM Object (ILEADDicomDS) to load a Data Set and
 then add it to a
// DICOM Directory
LTDICDIRLib.LEADDicomDir DicomDir = new LTDICDIRLib.LEADDicomDir();
// Set the destination folder DicomDir.ResetDicomDir("C:\\Medical
 Images");
// Load a Data Set and add it to the Directory
if (LEADDicomDS.LoadDS("C:\\Medical
 Images\\Image", 0) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
DicomDir.InsertDicomDS(LEADDicomDS.hDicomDS, "C:\\Medical
 Images\\Image");
// Save the DICOMDIR File DicomDir.SaveDicomDir();
}
}


CreateObject Example for C#

private void TestCreateObject()
{
//CreateObject Example
//this sample will dynamically create a LEAD Dicom Kernel
//object and use it to unlock DICOM support
LTDicomKernelLib.LEADDicomFactory factory = new LTDicomKernelLib.LEADDicomFactory();
LTDicomKernelLib.LEADDicomKernel kernel = null;
string szLic = null;
szLic = "LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies,
 Inc.";
kernel = (LTDicomKernelLib.LEADDicomKernel)factory.CreateObject("LEADDicomKernel.LEADDicomKernel",
 szLic);
kernel.EnableMethodErrors
 = false;
kernel.UnlockSupport((short)LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_DICOM,
 "MyUnlockKey");
if (kernel.IsSupportLocked((short)LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_DICOM))
MessageBox.Show("Unlock Failed!");
}


Creating a DICOM Directory for C#

private void CreateDicomDirectory()
{
string L_KEY_MEDICAL = "" ;
LTDICDIRLib.LEADDicomDir DicomDir = new LTDICDIRLib.LEADDicomDir();
LTDicomKernelLib.LEADDicomFactory DicomFactory = new
 LTDicomKernelLib.LEADDicomFactory();
LTDicomKernelLib.LEADDicomKernel DicomKernel = null;
string strLic = null;
strLic = "LEADTOOLS OCX Copyright (c)" + "
 1991-2004 LEAD Technologies, Inc.";
DicomKernel = (LTDicomKernelLib.LEADDicomKernel)DicomFactory.CreateObject("LEADDicomKernel.LEADDicomKernel",
 strLic);
DicomKernel.UnlockSupport((short)LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL,
 L_KEY_MEDICAL);
if (DicomKernel.IsSupportLocked((short)LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL))
{
MessageBox.Show("Medical Support
 must be unlocked for this demo!", "", MessageBoxButtons.OK,
 MessageBoxIcon.Exclamation);
return;
}
// Set the destination folder
DicomDir.ResetDicomDir("C:\\Medical
 Images\\Patient 1");
// If it is desired to change the Implementation Class
 UID and
// the Implementation Version Name...
DicomDir.ImplementationClassUID
 = "1.2.840.114257.0.1";
DicomDir.ImplementationVersionName
 = "LEADTOOLS 14";
// Set the File-set Identifier
DicomDir.SetFileSetID("SOME
 ID");
// We need icon images to be added
DicomDir.InsertIconImageSequence
 = true;
// Don't allow invalid File
IDs DicomDir.RejectInvalidFileID
 = true;
// Set the File-set descriptor file
DicomDir.SetDescriptorFile("C:\\Medical
 Images\\Patient 1\\ReadMe", "");
// Enable generating runtime exceptions
DicomDir.EnableMethodErrors
 = true;
// Add some DICOM files to the Directory
DicomDir.InsertDicomFile("C:\\Medical
 Images\\Patient 1\\Image1");
DicomDir.InsertDicomFile("C:\\Medical
 Images\\Patient 1\\Image2");
DicomDir.InsertDicomFile("C:\\Medical
 Images\\Patient 1\\Image3");
// Disable generating runtime exceptions
DicomDir.EnableMethodErrors
 = false;
// Save the DICOMDIR File
DicomDir.SaveDicomDir();
}


SSLCreateFlags Example for VB.NET

' This sample creates an ILEADDicomNet object with security
' The ILEADDicomNet object is configured so that if a client connects:
' 1. it requires and verifies the client certificate
' 2. it will support SSL version 3 or TLS Version 1 for the handshake
' 3. it uses trusted certificate authority CA_CERT_NAME to verify the client certificate
' 4. it verifies the client certificate chain to a maximum depth of 2
'
' The ILEADDicomNet object is assigned the certificate SERVER_CERT_NAME,
' which contains a password encrypted private key
' The DicomNet_SSLPrivateKeyPasswordEvent is used
' to supply the encryption password of the private key
Dim DicomKernel As New LTDicomKernelLib.LEADDicomKernel

Public WithEvents LEADDICOMNET1 As LTDNCLib.LEADDicomNet
Const CA_CERT_NAME As String = "e:\certificates\ca.pem"
Const SERVER_CERT_NAME As String = "e:\certificates\server.pem"
Private Sub TestSSLCreateFlags()
Dim szMsg As String
Dim nRet As Short
LEADDICOMNET1.UseSSLOptions = True
LEADDICOMNET1.SSLCreateFlags = LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_CAFILE Or LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_METHOD_TYPE Or LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_OPTIONS Or LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_VERIFY_DEPTH Or LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_VERIFY_MODE
LEADDICOMNET1.SSLCAFile = CA_CERT_NAME
LEADDICOMNET1.SSLVerifyMode = LTDNCLib.DicomSSLVerifyMode.DICOM_SSL_VERIFY_PEER Or LTDNCLib.DicomSSLVerifyMode.DICOM_SSL_VERIFY_FAIL_IF_NO_PEER_CERT
LEADDICOMNET1.SSLVerifyDepth = 2
LEADDICOMNET1.SSLOptions = LTDNCLib.DicomSSLOptions.DICOM_SSL_OP_NO_SSLv2 Or LTDNCLib.DicomSSLOptions.DICOM_SSL_OP_ALL
LEADDICOMNET1.NetworkSecurityMode = LTDNCLib.DicomSecurityModes.DICOM_SECURE_TLS
LEADDICOMNET1.StartUp()
nRet = LEADDICOMNET1.SetServerCertificateTLS(LEADDICOMNET1.hNet, SERVER_CERT_NAME, LTDNCLib.DicomTLSCertType.L_TLS_FILETYPE_PEM, SERVER_CERT_NAME)
If nRet = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
szMsg = SERVER_CERT_NAME & " loaded successfully"
Else
szMsg = SERVER_CERT_NAME & " could not be loaded successfully -- error " & CStr(nRet)
End If
MessageBox.Show(szMsg)
'
' Use the hNet

End Sub


Getting Print Job Information Example for C#

private void GetPrintJobInfo(ref LTDICPRNSCULib.LEADDicomPrintSCU objPrintSCU, ref string sPrintJobInstanceUID)
{
// We need only the Execution Status and Execution Status Info;
objPrintSCU.PrintJob.RequiredInfo = LTDICPRNSCULib.PrintJobInfoAttribEnum.PJ_EXECUTION_STATUS | LTDICPRNSCULib.PrintJobInfoAttribEnum.PJ_EXECUTION_STATUS_INFO;
// Query the Print SCP for the Print Job information
if (objPrintSCU.PrintJob.GetInfo(sPrintJobInstanceUID) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
// Display the retrieved information
MessageBox.Show("Execution Status: " + objPrintSCU.PrintJob.ExecutionStatus + System.Environment.NewLine + "Execution Status Info: " + objPrintSCU.PrintJob.ExecutionStatusInfo, "Print Job Info");
}
}


Getting Printer Configuration Information Example for C#

private void GetPrinterConfigInfo(ref LTDICPRNSCULib.LEADDicomPrintSCU
 objPrintSCU)
{
// Assume that the Association is already established
// Query the Print SCP for the printer configuration information
string sMsg = null;
if (objPrintSCU.PrinterConfiguration.Get() == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
// We will display only the Attributes of the first Printer Configuration
 Item
if (objPrintSCU.PrinterConfiguration.PrinterConfigItems.Count
 > 0)
{
foreach (LTDICPRNSCULib.LAttribute Attrib in objPrintSCU.PrinterConfiguration.PrinterConfigItems.Item(0).Attributes)
{
sMsg = sMsg + Attrib.Name
 + ": " + Attrib.Value
 + System.Environment.NewLine;
}
MessageBox.Show(sMsg, "Printer Config Info");
}
}
}


Getting Printer Information Example for C#

private void GetPrinterInfo(ref LTDICPRNSCULib.LEADDicomPrintSCU
 objPrintSCU)
{
// Assume that the Association is already established
// We need only the Printer Status and Printer Status
 Info;
objPrintSCU.Printer.RequiredInfo
 = LTDICPRNSCULib.PrinterInfoAttribEnum.PRN_PRINTER_STATUS
 | LTDICPRNSCULib.PrinterInfoAttribEnum.PRN_PRINTER_STATUS_INFO;
// Query the Print SCP for the information
if (objPrintSCU.Printer.GetInfo(true, false)
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
// Display the retrieved information
MessageBox.Show("Printer Status: " + objPrintSCU.Printer.PrinterStatus + System.Environment.NewLine
 + "Printer Status Info: " + objPrintSCU.Printer.PrinterStatusInfo,
 "Printer Info");
}
}


Loading a Data Set (C#)

Take the following steps to start a project and to add some code that loads a DICOM Data Set and prints information about the data set:

1. | Start Visual Studio .NET.
2. | Create new Windows Application C# project.
3. | Add the LEAD COM Objects to your project.
 | On the Tools pull-down menu, use the Add/Remove Toolbox Items... option, select the COM Components Tab, then select the LEAD Raster View Control (14.0).
 | On the Project pull-down menu, use the Add Reference... option, select the COM Tab, then select the following: LEAD Raster Object Library (14.0) LEAD Raster Variant Object Library (14.0 LEAD Raster Process Object Library (14.0) LEAD Raster IO Object Library (14.0) LEAD DICOM Kernel COM Object Library (14.0) LEAD DICOM DS COM Object Library (14.0).
4. | Select the LEAD Raster View Control, then add the control to your main form.
5. | Add a button to your form and name it as follows:
 | Name | Text
 | LoadImage | Load Image
6. | Add the following initialization code to the main form's Load event handler. In online help, you can use the Edit pull-down menu to copy the block of code.

//class data-members

private LTDICLib.LEADDicomDS LEADDICOM1 = new LTDICLib.LEADDicomDSClass();
private void Form1_Load(object sender, System.EventArgs e)
{
//Unlock DICOM support.
//Note that this is a sample key, which will not work in your toolkit.
LTDicomKernelLib.LEADDicomFactory Factory = new LTDicomKernelLib.LEADDicomFactory();
LTDicomKernelLib.LEADDicomKernel DicomKernel = null;
string szLic = null;
szLic = "LEADTOOLS OCX Copyright (c) 1991-2005 LEAD
 Technologies, Inc.";
DicomKernel = (LTDicomKernelLib.LEADDicomKernel)Factory.CreateObject("LEADDicomKernel.LEADDicomKernel",
 szLic); LEADDICOM1 = (LTDICLib.LEADDicomDS) Factory.CreateObject("LEADDicomDS.LEADDicomDS",
 szLic);
DicomKernel.UnlockSupport((short)LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL,
 "TestKey");
}

7.

Code the LoadImage button's click procedure as follows:

private void LoadImage_Click(object eventSender, System.EventArgs
 eventArgs)
{
short nRet = 0;
short lCount = 0;
bool result = false;
LEADDICOM1.EnableMethodErrors = false;
nRet = LEADDICOM1.LoadDS("D:\\lead14\\dist\\images\\dicom\\image1.dic",
 0);
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("Error "
 + System.Convert.ToString(nRet) + " loading file!");
lCount = (short)LEADDICOM1.GetModuleCount(); LEADDICOM1.FindIndexModule(0);
result = LEADDICOM1.SetCurrentElement(LEADDICOM1.get_CurrentModule().get_Element(0).hElement);
if (result == true)
MessageBox.Show("There are "
 + System.Convert.ToString(lCount) + " modules in this data set."
 + ('\r') + "The first module has " + System.Convert.ToString(LEADDICOM1.get_CurrentModule().ElementCount)
 + " elements." + ('\r') + "The first element has: "
 + ('\r') + "Tag number:" + System.Convert.ToString(LEADDICOM1.get_CurrentElement().Tag,
 16).ToUpper() + ('\r') + "VR: " + System.Convert.ToString(LEADDICOM1.get_CurrentElement().VR,
 16).ToUpper());
LEADDICOM1.EnableMethodErrors = true;
}

8. | Run your program to test it.
9. | Save the project to use as a starting point for other tasks in this tutorial.


Loading a DICOM Directory for C#

private void TestLoadingDicomDir()
{
LTDICDIRLib.LEADDicomDir DicomDir = new LTDICDIRLib.LEADDicomDir();
// Load a DICOMDIR File. Note: It is necessary to specify
// DS_LOAD_CLOSE so that we can save the Directory later.
DicomDir.LoadDicomDir("C:\\Medical
 Images\\DICOMDIR", (short)LTDICLib.DicomDataSetFlags.DS_LOAD_CLOSE);
// Add some additional DICOM files to the loaded Directory
 DicomDir.InsertDicomFile("C:\\Medical
 Images\\Image");
DicomDir.InsertDicomFile("C:\\Medical Images\\Patient
 2\\Image1");
// Save the DICOMDIR File
DicomDir.SaveDicomDir();
}


Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control for C#

//LEADDicomDS is a DICOM Dataset defined outside this method
public void TestManipulatingDataSetUsingLEADTOOLSDICOMOCXControl()
{
// The following code snippet demonstrates how to use
 the LEADTOOLS DICOM
// DS COM Object (ILEADDicomDS) to get the Value of the
 Implementation Class
// UID element of a DICOM Directory
LTDICDIRLib.LEADDicomDir DicomDir = new LTDICDIRLib.LEADDicomDir();
short nRetValue = 0;
// Load a DICOMDIR File
nRetValue = DicomDir.LoadDicomDir("C:\\Medical
 Images\\DICOMDIR", (short)LTDICLib.DicomDataSetFlags.DS_LOAD_CLOSE);
if (nRetValue == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
LEADDicomDS.hDicomDS
 = DicomDir.hDicomDirDS;
nRetValue = LEADDicomDS.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_IMPLEMENTATION_CLASS_UID,
 false);
if (nRetValue == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
LEADDicomDS.GetConvertValue();
// Display the value
 of the element
MessageBox.Show(LEADDicomDS.get_StringValues(0));
LEADDicomDS.StringValueCount = 0;
}
}
}


Performing Basic Print Management Example for C#

//Performing Basic Print Management Example
private void PerformBasicPM()
{
LTDICPRNSCULib.LEADDicomPrintSCU objPrintSCU = new LTDICPRNSCULib.LEADDicomPrintSCU();
objPrintSCU.Timeout
 = 60; // 60 seconds
objPrintSCU.EnableMethodErrors
 = false;
// Establish the Association short
nRet = 0;
nRet = objPrintSCU.Associate("10.0.2.20",
 7104, "PrintSCP", "PrintSCU", (LTDICPRNSCULib.DicomClassEnum)
 ( (short)LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS
 + (short)LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS
 + (short)LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS
 + (short)LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS
 + (short)LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRESENTATION_LUT_SOP_CLASS
 + (short)LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINT_JOB_SOP_CLASS + (short)LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS));
if (nRet == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED)
{
MessageBox.Show("Source = "
 + objPrintSCU.AssociateRejectSource
 + ", " + "Reason = " + objPrintSCU.AssociateRejectReason,
 "Association Request was Rejected");
return;
}
else
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
MessageBox.Show("Error code: "
 + nRet, "Failed to Establish the Association");
return;
}
// Abort the Association if none of the Basic Print Management
 Meta SOP Classes
// is supported on the Association
if (objPrintSCU.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS)
 == false & objPrintSCU.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS)
 == false)
{
objPrintSCU.AbortAssociation();
return;
}
// Display some printer info
//GetPrinterInfo objPrintSCU
// Display some printer configuration info
//GetPrinterConfigInfo objPrintSCU
// Create a Film Session
objPrintSCU.FilmSession.IncludedParameters
 = 0;
objPrintSCU.FilmSession.Create(false);
MessageBox.Show(objPrintSCU.FilmSession.SOPInstanceUID,
 "Film Session SOP Instance UID");
// Update the Number of Copies and Print Priority of
 the Film Session
objPrintSCU.FilmSession.IncludedParameters
 = (LTDICPRNSCULib.FilmSessionParameterEnum)((short)LTDICPRNSCULib.FilmSessionParameterEnum.FS_NUMBER_OF_COPIES
 + (short)LTDICPRNSCULib.FilmSessionParameterEnum.FS_PRINT_PRIORITY);
objPrintSCU.FilmSession.NumberOfCopies
 = 1;
objPrintSCU.FilmSession.PrintPriority
 = "MED";
objPrintSCU.FilmSession.Update();
objPrintSCU.FilmBox.IncludedParameters
 = 0;
if (objPrintSCU.FilmBox.MainObject.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS))
{
objPrintSCU.FilmBox.IncludedParameters
 = (LTDICPRNSCULib.FilmBoxParameterEnum)((short)objPrintSCU.FilmBox.IncludedParameters
 + (short)LTDICPRNSCULib.FilmBoxParameterEnum.FB_ANNOTATION_DISPLAY_FORMAT_ID);
objPrintSCU.FilmBox.AnnotationDisplayFormatID
 = "SomeID";
}
// Create a Film Box
objPrintSCU.FilmBox.Create("STANDARD\\1,1");
MessageBox.Show(objPrintSCU.FilmBox.SOPInstanceUID,
 "Film Box SOP Instance UID");
string sPresLUTInstanceUID = null;
// Create a Presentation LUT
if (objPrintSCU.PresentationLUT.MainObject.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRESENTATION_LUT_SOP_CLASS))
{
if (objPrintSCU.PresentationLUT.Create("C:\\PresLUT.dic","IDENTITY")
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
sPresLUTInstanceUID
 = objPrintSCU.PresentationLUT.GetSOPInstanceUID();
MessageBox.Show(sPresLUTInstanceUID,
 "Pres LUT SOP Instance UID");
}
}
if (sPresLUTInstanceUID.Length!= 0)
{
// Update the Film Box to reference
 the Presentation LUT we just created
objPrintSCU.FilmBox.IncludedParameters
 = LTDICPRNSCULib.FilmBoxParameterEnum.FB_REF_PRES_LUT_INSTANCE_UID;
objPrintSCU.FilmBox.RefPresLUTInstanceUID
 = sPresLUTInstanceUID;
objPrintSCU.FilmBox.Update();
}
string sOverlayBoxInstanceUID = null;
// Create an Image Overlay Box
if (objPrintSCU.ImageOverlayBox.MainObject.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS))
{
objPrintSCU.ImageOverlayBox.OverlayOriginRow =
 1;
objPrintSCU.ImageOverlayBox.OverlayOriginColumn
 = 1;
objPrintSCU.ImageOverlayBox.IncludedParameters
 = 0;
if (objPrintSCU.ImageOverlayBox.Create("C:\\Overlay.dic")
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
sOverlayBoxInstanceUID
 = objPrintSCU.ImageOverlayBox.GetSOPInstanceUID();
MessageBox.Show(sOverlayBoxInstanceUID,
 "Image Overlay Box SOP Instance UID");
}
}
// Update the Image Box. Since the Image Display Format
 of the Film Box was
// set to "STANDARD\1,1", then we are supposed
 to have one Image Box created
// by the Print SCP.
if (objPrintSCU.ImageBoxes.Count
 != 0)
{
MessageBox.Show(objPrintSCU.ImageBoxes.Item(0).SOPInstanceUID,
 "Image Box SOP Instance UID");
objPrintSCU.ImageBoxes.Item(0).IncludedParameters
 = 0;
if (sOverlayBoxInstanceUID.Length !=
 0)
{
objPrintSCU.ImageBoxes.Item(0).IncludedParameters
 = (LTDICPRNSCULib.ImageBoxParameterEnum)((short)objPrintSCU.ImageBoxes.Item(0).IncludedParameters
 + (short)LTDICPRNSCULib.ImageBoxParameterEnum.IB_REF_IMAGE_OVERLAY_BOX_INSTANCE_UID);
objPrintSCU.ImageBoxes.Item(0).RefImageOverlayBoxInstanceUID
 = sOverlayBoxInstanceUID;
}
objPrintSCU.ImageBoxes.Item(0).Update("C:\\Image.dic");
}
// Update the Annotation Boxes (if there are any)
foreach (LTDICPRNSCULib.LAnnotationBox AnnBox in objPrintSCU.AnnotationBoxes)
{
AnnBox.TextString
 = "Some Text";
AnnBox.Update(true);
}
// Change the Overlay Origin of the Image Overlay Box
 referenced by the
// Image Box
if (sOverlayBoxInstanceUID.Length != 0 )
{
objPrintSCU.ImageOverlayBox.IncludedParameters
 = LTDICPRNSCULib.OverlayBoxParameterEnum.OB_OVERLAY_ORIGIN;
objPrintSCU.ImageOverlayBox.OverlayOriginRow =
 10;
objPrintSCU.ImageOverlayBox.OverlayOriginColumn
 = 10;
objPrintSCU.ImageOverlayBox.Update(sOverlayBoxInstanceUID,
 null);
}
string sPrintJobInstanceUID = null;
// Print the Film Session (or the Film Box; there is
 no difference since we
// have a single Film Box in the Film Session)
if (true)
{
objPrintSCU.FilmSession.PrintSession();
sPrintJobInstanceUID = objPrintSCU.FilmSession.PrintJobSOPInstanceUID;
}
else
{
objPrintSCU.FilmBox.PrintBox();
sPrintJobInstanceUID = objPrintSCU.FilmBox.PrintJobSOPInstanceUID;
}
// Display some info about the Print Job
if (objPrintSCU.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINT_JOB_SOP_CLASS))
{
//GetPrintJobInfo objPrintSCU, sPrintJobInstanceUID
}
// Delete the Film Box (anyway, it would be deleted when
 the Film Session
// is deleted)
objPrintSCU.FilmBox.Delete();
// Delete the Film Session
objPrintSCU.FilmSession.Delete();
// Delete the Presentation LUT
if (sPresLUTInstanceUID.Length != 0 )
objPrintSCU.PresentationLUT.Delete(sPresLUTInstanceUID);
// Delete the Image Overlay Box
if (sOverlayBoxInstanceUID.Length != 0)
objPrintSCU.ImageOverlayBox.Delete(sOverlayBoxInstanceUID);
// Release the Association and close the connection
objPrintSCU.ReleaseAssociation();
}


Performing Pull Stored Print Management Example for C#

//Performing Pull Stored Print Management Example
private void PerformPullStoredPM()
{
LTDICPRNSCULib.LEADDicomPrintSCU objPrintSCU = new LTDICPRNSCULib.LEADDicomPrintSCU();
// Establish the Association
short nRet = 0;
nRet = objPrintSCU.Associate("10.0.2.20",
 7104, "PrintSCP", "PrintSCU", (LTDICPRNSCULib.DicomClassEnum)((int)LTDICPRNSCULib.DicomClassEnum.PRNSCU_PULL_STORED_PM_META_SOP_CLASS
 + (int)LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINT_JOB_SOP_CLASS + (int)LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS));
if (nRet == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED)
{
MessageBox.Show("Source = "
 + objPrintSCU.AssociateRejectSource
 + ", " + "Reason = " + objPrintSCU.AssociateRejectReason,
 "Association Request was Rejected");
return;
}
else   if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
MessageBox.Show("Error
 code: " + nRet, "Failed to Establish the Association");
return;
}
// Display some printer info
//GetPrinterInfo objPrintSCU
// Display some printer configuration
 info
//GetPrinterConfigInfo objPrintSCU
// A referenced Stored Print Storage
 SOP Instance;
objPrintSCU.PullPrintRequest.RemoveAllStoredPrintItems();
objPrintSCU.PullPrintRequest.AddStoredPrintItem("SomeAE",
 "1.2.840.114257.254.7638.6787", "1.2.840.114257.945.5676.5674",
 "1.2.840.114257.23.2343.3489", "SomeID");
// Ask the Print SCP to create a Pull
 Print Request SOP Instance
objPrintSCU.PullPrintRequest.IncludedParameters
 = LTDICPRNSCULib.PullPrintRequestParameterEnum.PPR_NUMBER_OF_COPIES;
objPrintSCU.PullPrintRequest.NumberOfCopies
 = 1;
objPrintSCU.PullPrintRequest.Create();
MessageBox.Show(objPrintSCU.PullPrintRequest.SOPInstanceUID,
 "Pull Print Request SOP Instance UID");
// Print the session
objPrintSCU.PullPrintRequest.PrintSession();
// Display some info about the Print
 Job
if (objPrintSCU.PullPrintRequest.MainObject.IsClassSupported(LTDICPRNSCULib.DicomClassEnum.PRNSCU_PRINT_JOB_SOP_CLASS))
{
//GetPrintJobInfo
 objPrintSCU, .PrintJobSOPInstanceUID
}
// Ask the Print SCP to delete the
 Pull Print Request SOP Instance
objPrintSCU.PullPrintRequest.Delete();
// Release the Association and close
 the connection
objPrintSCU.ReleaseAssociation();
}


Using the DicomFileInsert Event for C#

private LTDICDIRLib.LEADDicomDir DicomDir;
private void DicomDir_DicomFileInsert(string
 bstrFileName, int hDicomDS, short nStatus, ref short pReturnVal)
{
string Buffer = null;
DialogResult Result = 0;
if (nStatus == (short)LTDicomKernelLib.DicomErrorCodes.DICOMDIR_INSERTDICOMFILE_PREADD)
{
Buffer = "About to add the file
 \"" + bstrFileName + "\"." + System.Environment.NewLine
 + System.Environment.NewLine + "Proceed?";
Result = MessageBox.Show(Buffer, "DICOM
 Directory Sample", MessageBoxButtons.YesNoCancel);
if (Result == DialogResult.No)
{
pReturnVal = (short)LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_FORMAT;
// Skip the file
return;
}
else if (Result == DialogResult.Cancel)
{
pReturnVal = (short)LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_END;
// Abort
return;
}
}
else if (nStatus == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
Buffer = "The file \""
 + bstrFileName + "\" has been added successfully." + System.Environment.NewLine
 + System.Environment.NewLine + "Continue?";
Result = MessageBox.Show(Buffer, "DICOM
 Directory Sample",MessageBoxButtons.YesNo);
if (Result == DialogResult.No)
{
pReturnVal = (short)LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_END;
// Abort
return;
}
}
}

private void CreateDicomDir()
{
string L_KEY_MEDICAL = "" ;
DicomDir = new LTDICDIRLib.LEADDicomDir();
LTDicomKernelLib.LEADDicomFactory DicomFactory = new
    LTDicomKernelLib.LEADDicomFactory();
LTDicomKernelLib.LEADDicomKernel DicomKernel = null;
string strLic = null;
strLic = "LEADTOOLS OCX Copyright (c) 1991-2004
 LEAD Technologies, Inc.";
DicomKernel = (LTDicomKernelLib.LEADDicomKernel)DicomFactory.CreateObject("LEADDicomKernel.LEADDicomKernel",
 strLic);
DicomKernel.UnlockSupport((short)LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL,
 L_KEY_MEDICAL);
if (DicomKernel.IsSupportLocked((short)LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL))
{
MessageBox.Show("Medical Support
 must be unlocked for this demo!", "", MessageBoxButtons.OK,
 MessageBoxIcon.Exclamation);
return;
}
// Set the destination folder
DicomDir.ResetDicomDir("C:\\Medical
 Images");
// Files in subfolders should also be included
DicomDir.IncludeSubfolders
 = true;
// Add all the DICOM files to the Directory
DicomDir.InsertDicomFile("");
// Save the DICOMDIR File
DicomDir.SaveDicomDir();
}


Using the Events OnStatus, OnPrinterReport, and OnPrintJobReport Example for C#

private LTDICPRNSCULib.LEADDicomPrintSCU objPrintSCU;
private void objPrintSCU_OnStatus(LTDICPRNSCULib.PrintScuStatusEnum Status, int OperationStatus)
{
string sStatusCodeType = null;
string sOpStatus = null;
switch (Status)
{
case LTDICPRNSCULib.PrintScuStatusEnum.PRNSCU_STATUS_RECEIVE_ABORT:
MessageBox.Show("Source = " + objPrintSCU.AbortSource + ", " + "Reason = " + objPrintSCU.AbortReason, "Print SCP Aborted the Association");
break;
case LTDICPRNSCULib.PrintScuStatusEnum.PRNSCU_STATUS_RECEIVE_PRINT_FILM_SESSION_RSP:
{
if (OperationStatus == (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS)
{
if (objPrintSCU.LastOperationStatus == (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS)
sStatusCodeType = "Success";
else
sStatusCodeType = "Warning";
}
else sStatusCodeType = "Failure";
sOpStatus = System.Convert.ToString(objPrintSCU.LastOperationStatus, 16).ToUpper();
while (sOpStatus.Length < 4)
{
sOpStatus = "0" + sOpStatus;
}
sOpStatus = "0x" + sOpStatus;
MessageBox.Show("Status: " + sOpStatus + " (" + sStatusCodeType + ")", "Received N-ACTION-RSP (Basic Film Session SOP Class)");
}
break;
}
}

private void objPrintSCU_OnPrinterReport(short
 EventTypeID, string PrinterStatusInfo, string FilmDestination, string
 PrinterName)
{
string sEventTypeName = null;
sEventTypeName = "Normal";
switch (EventTypeID)
{
case 2:
sEventTypeName = "Warning";
break;
case 3:
sEventTypeName = "Failure";
break;
}
string sMsg = null;
sMsg = "Event Type Name: " + sEventTypeName;
if (EventTypeID != 1)
sMsg = sMsg + System.Environment.NewLine + "Printer Status Info: "
 + PrinterStatusInfo + System.Environment.NewLine + "Film Destination:
 " + FilmDestination + System.Environment.NewLine + "Printer
 Name: " + PrinterName;
MessageBox.Show(sMsg, "Printer Status Report");
}

private void objPrintSCU_OnPrintJobReport(string PrintJobSOPInstanceUID, short EventTypeID, string ExecutionStatusInfo, string PrintJobID, string FilmSessionLabel, string PrinterName)
{
string sEventTypeName = null;
sEventTypeName = "Pending";
switch (EventTypeID)
{
case 2:
sEventTypeName = "Printing";
break;
case 3:
sEventTypeName = "Done";
break;
case 4:
sEventTypeName = "Failure";
break;
}
MessageBox.Show("Print Job SOP Instance UID: " + PrintJobSOPInstanceUID + System.Environment.NewLine + "Event Type Name: " + sEventTypeName + System.Environment.NewLine + "Execution Status Info: " + ExecutionStatusInfo + System.Environment.NewLine + "Film Session Label: " + FilmSessionLabel + System.Environment.NewLine + "Printer Name: " + PrinterName, "Print Job Status Report");
}


Miscellaneous Examples (C#)

You can test any of the following example by adding a command button and pasting the sample code in the Click procedure.

Accept Example for C#

AnnCount Example for C#

ChangeTransferSyntax Example for C#

CloseForced Example for C#

ConformanceStatus example for C#

Connect Example for C#

Converting DICOM Annotation Objects to LEAD Annotation Objects Example for C#

Converting LEAD Annotation Objects to DICOM Annotation Objects Example for C#

CreateAssociate Example for C#

Creating a Digital Signature Example for C#

Creating DICOM Annotations Example for C#

DefaultIOD example for C#

DefaultTag example for C#

DefaultUID example for C#

DefaultVR example for C#

DeleteBitmapValue Example for C#

DeleteElement Example for C#

DeleteIOD Example for C#

DeleteModule Example for C#

DeleteTag Example for C#

DeleteUID Example for C#

DeleteVR Example for C#

DSTempPath Example for C#

EnableMethodErrors Example for VisualBasic

Enumerating Context Groups Example for C#

Enumerating Digital Signatures Example for C#

Enumerating the Coded Concepts of a Context Group Example for C#

Examining a Digital Signature Example for C#

Examining Annotations (1) Example for C#

Examining Annotations (2) Example for C#

Extracting a Wave Stream From a Data Set Example for C#

FindFirstElement Example for C#

FindIndexModule Example for C#

FindLastElement Example for C#

FindModule Example for C#

FindModuleIOD Example for C#

FindPresentationAbstract Example for C#

GetAgeValue Example for C#

GetApplication Example for C#

GetAuthenticationAlgorithmTLS example for C#

GetBinaryValue Example for C#

GetBitmapCount Example for C#

GetCharValue Example for C#

GetConvertValue example for C#

GetDateTimeValue Example for C#

GetDateValue Example for C#

GetDoubleValue Example for C#

GetElementLevel Example for C#

GetEncryptionAlgorithmTLS Example for C#

GetEncryptKeyLengthTLS Example for C#

GetExtendedData Example for C#

GetFloatValue Example for C#

GetImageInformation Example for C#

GetInfoDS Example for C#

GetIntegrityAlgorithmTLS Example for C#

GetKeyExchangeAlgorithmTLS Example for C#

GetLongValue Example for C#

GetModuleCount Example for C#

GetMutualAuthKeyLengthTLS Example for C#

GetPeerAuthDataISCL Example for C#

GetPeerEncryptionISCL Example for C#

GetPeerMACISCL Example for C#

GetPeerRequestedMessageLengthISCL Example for C#

GetPresentationAbstract Example for C#

GetPresentationCount Example for C#

GetPresentationResult Example for C#

GetSendQueueSize Example for C#

GetServer Example for C#

GetShortValue Example for C#

GetStatusISCL Example for C#

GetStringValue Example for C#

GetTagCount Example for C#

GetTimeValue Example for C#

Getting an overlay bitmap list Example for C#

Getting and setting a non-linear VOI LUT Example for C#

Getting and setting window center and width Example for C#

Getting modality LUT data and attributes Example for C#

Getting palette color LUT data and attributes Example for C#

Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for C#

GetTransferCount Example for C#

GetUIDCount Example for C#

GetUserInfoCount Example for C#

GetVRCount Example for C#

IncludeVolatile Example for C#

InitCS Example for C#

InitDS Example for C#

InsertBitmapListValue Example for C#

InsertBitmapValue Example for C#

InsertDS Example for C#

InsertElement Example for C#

Inserting a Context Group Example for C#

Inserting a Wave Stream Into a Data Set Example for C#

Inserting a Waveform Group Into a Data Set Example for C#

InsertIOD Example for C#

InsertKey Example for C#

InsertModule Example for C#

InsertTag Example for C#

InsertUID Example for C#

InsertVR Example for C#

IsActivated Example for C#

IsAsyncOperations Example for C#

ISCLChallengeResponseSuccess Example for C#

IsImplementClass Example for C#

IsImplementVersion Example for C#

IsISCLQueueEmpty Example for C#

IsMaxLengthEnabled Example for C#

IsRoleSelect Example for C#

IsSupportLocked Example for C#

J2KCompressionControl Example for C#

J2KCompressionRatio Example for C#

J2KROIControl Example for C#

J2KSetDefaults Example for C#

J2KTargetFileSize Example for C#

KeepPixelDataIntact Example for C#

Listen Example for C#

LoadDS Example for C#

Modifying a Context Group Example for C#

MoveFirstIOD Example for C#

MoveFirstTag Example for C#

MoveFirstUID Example for C#

MoveFirstVR Example for C#

MoveRootElement Example for C#

MoveRootIOD Example for C#

NetClose Example for C#

NetConnect Example for C#

NetNonSecureReceivedISCL Example for C#

NetNonSecureSendISCL Example for C#

NetReceive Example for C#

NetReceiveAbort Example for C#

NetReceiveAssociateAccept Example for C#

NetReceiveAssociateReject Example for C#

NetReceiveAssociateRequest Example for C#

NetReceiveCCancelRequest Example for C#

NetReceiveCEchoResponse Example for C#

NetReceiveCFindResponse Example for C#

NetReceiveCGetRequest Example for C#

NetReceiveCGetResponse Example for C#

NetReceiveCMoveRequest Example for C#

NetReceiveCMoveResponse Example for C#

NetReceiveCStoreResponse Example for C#

NetReceiveData Example for C#

NetReceiveNActionRequest Example for C#

NetReceiveNActionResponse Example for C#

NetReceiveNCreateResponse Example for C#

NetReceiveNDeleteResponse Example for C#

NetReceiveNGetRequest Example for C#

NetReceiveNGetResponse Example for C#

NetReceiveNReportRequest Example for C#

NetReceiveNReportResponse Example for C#

NetReceiveNSetRequest Example for C#

NetReceiveNSetResponse Example for C#

NetReceiveReleaseRequest Example for C#

NetReceiveReleaseResponse Example for C#

NetReceiveUnknown Example for C#

NetSecureLinkReady example for C#

NetSend Example for C#

Preamble Example for C#

ProgressStatus Example for C#

ResetDS Example for C#

ResetIOD Example for C#

ResetTag Example for C#

ResetUID Example for C#

ResetVR Example for C#

SaveDS example for C#

Searching the Data Set for a Digital Signature Example for C#

SendAbort Example for C#

SendAssociateRequest Example for C#

SendCCancelRequest Example for C#

SendCEchoRequest Example for C#

SendCEchoResponse Example for C#

SendCFindRequest Example for C#

SendCFindResponse Example for C#

SendCGetRequest Example for C#

SendCGetResponse Example for C#

SendCMoveRequest Example for C#

SendCStoreRequest Example for C#

SendCStoreResponse Example for C#

SendData Example for C#

SendNActionRequest Example for C#

SendNCreateRequest Example for C#

SendNCreateResponse Example for C#

SendNDeleteRequest Example for C#

SendNDeleteResponse Example for C#

SendNGetRequest Example for C#

SendNonSecureISCL Example for C#

SendNReportRequest Example for C#

SendNSetRequest Example for C#

SendReleaseRequest Example for C#

SetAuthDataISCL Example for C#

SetBitmapListValue example for C#

SetBitmapValue example for C#

SetCalled Example for C#

SetCipherToIndexTLS Example for C#

SetClientCertificateTLS Example for C#

SetCommandSet (DICOM Control) Example for C#

SetCurrentElement example for C#

SetDefaultEncryptionISCL Example for C#

SetDefaultSigningISCL Example for C#

SetEncryptKeyISCL Example for C#

SetMaxCommBlockLengthISCL Example for C#

SetMaxMessageLengthISCL Example for C#

SetMutualAuthAlgISCL Example for C#

SetMutualAuthKeyISCL Example for C#

SetRequest Example for C#

SetServerCertificateTLS example for C#

SetTagName example for C#

Setting an overlay bitmap list Example for C#

Setting modality LUT data and attributes Example for C#

Setting palette color LUT data and attributes Example for C#

Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for C#

SetUIDName example for C#

SetVRName example for C#

SSLCreateFlags Example for C#

StartUp Example for C#

Version Example for C#


Accept Example for C#

//This example uses the predefined variable “List2” of type
 “ListBox” from “.NET Framework”.
//This example uses the predefined variable “LEADDICOMNet1” of type “LEADDicomNet”
 from “"LEADTOOLS Toolkit”.

private void LEADDICOMNet1_NetAccept(int
 nStatus)
{
string Out = null;
int hClient = 0;
int lClients = 0;
//accepting the connection attempt
LEADDICOMNet1.Accept();
//get the latest client lClients = LEADDICOMNet1.GetClientCount(LEADDICOMNet1.hNet);
hClient = LEADDICOMNet1.GetClient(LEADDICOMNet1.hNet,
 lClients - 1);
//display some information about the connection: Out
 = "Peer: " + LEADDICOMNet1.GetPeerAddress(hClient);
List2.Items.Add("Connection Accepted - " +
 Out);
//reject the connection if we don't like the address
if (LEADDICOMNet1.GetPeerAddress(hClient)
 == "207.238.49.199")
{
//close the connection
LEADDICOMNet1.Close(hClient);
}
}


AnnCount Example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “"LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestAnnCount()
{
//This example
// 1. Opens a dataset with annotations
// 2. Finds the location of one of the annotation files
// 3. Loads the annotations
// 4. Flips the annotations
// 5. Saves the annotations to index to slots 250 through
 255
// 6. Deletes the annotation files from slot 253

short nRet = 0;
short i = 0;
int hAnnContainer = 0;
string strMsg = null;
string strTmp = null;
short nIndexAnn = 0;
LTRASTERIOLib.LEADRasterIO RasterIO = new LTRASTERIOLib.LEADRasterIO();
LTANNLib.LEADRasterAnnotation RasterAnn = new LTANNLib.LEADRasterAnnotation();
// Open the dataset with annotations
nRet = LEADDICOM1.LoadDS("e:\\images\\DicomAnn.dic",
 0);
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
return;
RasterIO.EnableMethodErrors
 = false;
RasterIO.Load(LEADRasterView1.Raster, "e:\\images\\DicomAnn.dic",
 0, 0, 1);
// Find the location of one of the annotation files
LEADDICOM1.AnnCount();
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
return;
strMsg = "Private Creator Tag: " + System.Convert.ToString(LEADDICOM1.AnnPrivateCreatorTag,
 16).ToUpper() + System.Environment.NewLine;
for (i = 0; i <= 255; i++)
{
if (LEADDICOM1.get_AnnEntries(i)
 == true)
{
nIndexAnn = i;
strTmp = "\t"
 + System.Convert.ToString(i).ToString() + System.Environment.NewLine;
strMsg = strMsg +
 strTmp;
}
}
MessageBox.Show(strMsg);
// Loads the annotations LEADDICOM1.AnnLoad(nIndexAnn,
 1);
// Flip the annotations
RasterAnn.AnnContainer = LEADDICOM1.AnnContainer;
RasterAnn.AnnFlip(true, LEADRasterView1.Raster.BitmapHeight
 / 2, false);
LEADDICOM1.AnnContainer = RasterAnn.AnnContainer;
// Save the annotations to index to slots 250 through
 255
for (i = 250; i <= 255; i++)
{
nRet = LEADDICOM1.AnnSave(i, (short)LTANNLib.AnnFMTConstants.ANN_FMT_NATIVE,
 false, (short)LTDICLib.DicomAnnSaveModifyConstants.SAVE_OVERWRITE, 1);
}
// Delete the annotation files from slot 253 LEADDICOM1.AnnDelete(253, -1);
// Display file info LEADDICOM1.AnnCount();
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
 return;
strMsg = "Private Creator Tag:
 " + System.Convert.ToString(LEADDICOM1.AnnPrivateCreatorTag, 16).ToUpper()
 + System.Environment.NewLine;
for (i = 0; i <= 255; i++)
{
if (LEADDICOM1.get_AnnEntries(i)
 == true)
{
strTmp = "\t"
 + System.Convert.ToString(i).ToString() + System.Environment.NewLine;
 strMsg = strMsg + strTmp;
}
}
MessageBox.Show(strMsg);
// Save the data set LEADDICOM1.SaveDS("e:\\erase\\dicom.dic",
 0);
}


ChangeTransferSyntax Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestChangeTransferSyntax ( )
{
const string UID_EXPLICIT_VR_BIG_ENDIAN = "1.2.840.10008.1.2.2";
// Explicit VR Big Endian
// Load a Data Set
if (LEADDICOM1.LoadDS("d:\\lead14\\dist\\images\\dicom\\image2.dic",
 0) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
// Change the Transfer Syntax to Explicit
 VR Big Endian
LEADDICOM1.ChangeTransferSyntax(UID_EXPLICIT_VR_BIG_ENDIAN,
 0, 0);
// Save the new Data Set
LEADDICOM1.SaveDS("d:\\temp\\Temp.dic",
 0);
}
}


CloseForced Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestCloseForced ()
{
LEADDICOMNet1.NetworkSecurityMode
 = (int)LTDNCLib.DicomSecurityModes.DICOM_SECURE_ISCL;
LEADDICOMNet1.StartUp();
// do some communications
LEADDICOMNet1.CloseForced(LEADDICOMNet1.hNet,
 true);
}


ConformanceStatus example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOM1_ConformanceStatus(short
 nFlags)
{
string msg = null;
short nRet = 0;
string szTag = null;
string szTagL = null;
string szTagR = null;
short nLen = 0;
short x = 0;
//display info about non-standard element
switch (nFlags)
{
case (short) LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_UNKNOWN_CLASS:
msg = "Unknown
 Class" + "\r";
break;
case (short) LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_UNKNOWN_TAG:
msg = "Unknown
 Tag" + "\r";
break;
case (short) LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_UNKNOWN_VR:
msg = "Unknown
 VR" + "\r";
break;
case (short) LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_WRONG_VR:
msg = "Error
 in VR" + "\r";
break;
case (short) LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_MIN_VM:
msg = "Error
 in MinVM" + "\r";
break;
case (short) LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_MAX_VM:
msg = "Error
 in MaxVM" + "\r";
break;
case (short) LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_DIVIDE_VM:
msg = "Error
 in DivideVM" + "\r";
break;
case (short) LTDICLib.DicomConformanceStatusFlags.CALLBACK_ERROR_IMAGE:
msg = "Error
 in Image" + "\r";
break;
default:
return;
}
szTag = System.Convert.ToString(LEADDICOM1.get_CurrentElement().Tag,
 16).ToUpper();
nLen = (short)szTag.Length;
szTagR = szTag.Substring(0, nLen - 4);
szTagL = "";
for (x = nLen; x <= 7; x++)
{
szTagL = szTagL + System.Convert.ToString(0);
}
szTagL = szTagL + szTag.Substring(0, nLen - 4);
szTag = szTagL + ":" + szTagR;
msg = msg + "Tag: " + szTag;
nRet = (short)MessageBox.Show(msg, "Non-Standard
 Element", MessageBoxButtons.OKCancel );
if (nRet == (short)DialogResult.Cancel)
LEADDICOM1.EnableConformanceStatus
 = false;
}


Connect Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestConnect ( )
{
//connect to a server
LEADDICOMNet1.Connect("", 0, "10.1.1.138", 104);
}


Converting DICOM Annotation Objects to LEAD Annotation Objects Example for C#

private void DicomAnnToLEADAnn(ref LTDICLib.LEADDicomDS objPresStateDS)
{
LTANNLib.LEADRasterAnnotation objRasterAnn = new LTANNLib.LEADRasterAnnotation();
// Describe a DICOM graphic annotation object and then
 convert it to
// a LEAD annotation object
objPresStateDS.GraphicObjectAttributes.Type
 = LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE;
objPresStateDS.GraphicObjectAttributes.Filled = false;
objPresStateDS.GraphicObjectAttributes.PointCount = 5;
objPresStateDS.GraphicObjectAttributes.set_PointsX(0, 90.7F);
objPresStateDS.GraphicObjectAttributes.set_PointsY(0, 156.9F);
objPresStateDS.GraphicObjectAttributes.set_PointsX(1, 195.9F);
objPresStateDS.GraphicObjectAttributes.set_PointsY(1, 156.9F);
objPresStateDS.GraphicObjectAttributes.set_PointsX(2, 195.9F);
objPresStateDS.GraphicObjectAttributes.set_PointsY(2, 342.5F);
objPresStateDS.GraphicObjectAttributes.set_PointsX(3, 90.7F);
objPresStateDS.GraphicObjectAttributes.set_PointsY(3, 342.5F);
objPresStateDS.GraphicObjectAttributes.set_PointsX(4, 90.7F);
objPresStateDS.GraphicObjectAttributes.set_PointsY(4, 156.9F);
if (objPresStateDS.ConvertDicomAnnObjToLEADAnnObj(true)
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
MessageBox.Show("The DICOM graphic
 annotation object was converted successfully.");
// The handle to the resulted LEAD
 annotation object is available from the
// LEADAnnObject property. You can
 now use the functionality of a LEAD Raster
// Annotation object to manipulate
 the object.
// Once done from the object, don't
 forget to destroy it
objRasterAnn.AnnDestroy(objPresStateDS.LEADAnnObject,
 0);
}
// Describe a DICOM text annotation object and then convert
 it to a
// LEAD annotation object
objPresStateDS.TextObjectAttributes.BoundingBoxUsed
 = true;
objPresStateDS.TextObjectAttributes.AnchorPointUsed
 = false;
objPresStateDS.TextObjectAttributes.TextValue = "Text
 annotation";
objPresStateDS.TextObjectAttributes.BoundingBoxTLHCornerX
 = 290.5F;
objPresStateDS.TextObjectAttributes.BoundingBoxTLHCornerY
 = 158.1F;
objPresStateDS.TextObjectAttributes.BoundingBoxBRHCornerX
 = 424.1F;
objPresStateDS.TextObjectAttributes.BoundingBoxBRHCornerY
 = 176.1F;
objPresStateDS.TextObjectAttributes.BoundingBoxTextJustification
 = LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_LEFT;
if (objPresStateDS.ConvertDicomAnnObjToLEADAnnObj(false)
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
MessageBox.Show("The DICOM text
 annotation object was converted successfully.");
// The handle to the resulted LEAD
 annotation object is available from the
// LEADAnnObject property. You can
 now use the functionality of a LEAD Raster
// Annotation object to manipulate
 the object.
// Once done from the object, don't
 forget to destroy it
objRasterAnn.AnnDestroy(objPresStateDS.LEADAnnObject,
 0);
}
}


Converting LEAD Annotation Objects to DICOM Annotation Objects Example for C#

//This example uses the predefined variable “objPresState” of type “LEADDicomDS” from “"LEADTOOLS Toolkit”.
private void objPresState_OnConvertLEADAnnObjToDicomAnnObj(bool bGraphicObject)
{
string sMsg = null;

// Display the attributes of the resulted DICOM annotation object int lCount = 0;
int I = 0;
if (bGraphicObject) // The resulted DICOM annotation object is a graphic object
{
sMsg = "Graphic Annotation Units: ";
switch ( objPresState.GraphicObjectAttributes.Units )
{
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL:
sMsg = sMsg + "PIXEL" + System.Environment.NewLine;
break;
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY:
sMsg = sMsg + "DISPLAY" + System.Environment.NewLine;
break;
}
sMsg = sMsg + "Graphic Type: ";
switch ( objPresState.GraphicObjectAttributes.Type )
{
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POINT:
sMsg = sMsg + "POINT" + System.Environment.NewLine;
break;
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE:
sMsg = sMsg + "POLYLINE" + System.Environment.NewLine;
break;
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED:
sMsg = sMsg + "INTERPOLATED" + System.Environment.NewLine;
break;
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE:
sMsg = sMsg + "CIRCLE" + System.Environment.NewLine;
break;
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE:
sMsg = sMsg + "ELLIPSE" + System.Environment.NewLine;
break;
}

sMsg = sMsg + "Graphic Filled: ";
if (objPresState.GraphicObjectAttributes.Filled)
sMsg = sMsg + "Y" + System.Environment.NewLine;
else
sMsg = sMsg + "N" + System.Environment.NewLine;
lCount = objPresState.GraphicObjectAttributes.PointCount;
sMsg = sMsg + "Number of Graphic Points: " + lCount + System.Environment.NewLine;
if (lCount < 10)
{
sMsg = sMsg + "Graphic Data: " + System.Environment.NewLine;
for (I = 0; I < lCount; I++)
{
sMsg = sMsg + " " + "X" + I + 1 + ", Y" + I + 1 + " = " + objPresState.GraphicObjectAttributes.get_PointsX(I) + ", " + objPresState.GraphicObjectAttributes.get_PointsY(I) + System.Environment.NewLine;
}
}
MessageBox.Show(sMsg, "Graphic Annotation Object");
}
else
// The resulted DICOM annotation object is a text object
{
if (objPresState.TextObjectAttributes.BoundingBoxUsed)
{
sMsg = "Unformatted Text Value: " + objPresState.TextObjectAttributes.TextValue + System.Environment.NewLine;
sMsg = sMsg + "Bounding Box Annotation Units: ";
switch ( objPresState.TextObjectAttributes.BoundingBoxUnits )
{
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL:
sMsg = sMsg + "PIXEL" + System.Environment.NewLine;
break;
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY:
sMsg = sMsg + "DISPLAY" + System.Environment.NewLine;
break;
}
sMsg = sMsg + "Bounding Box Top Left Hand Corner: " + objPresState.TextObjectAttributes.BoundingBoxTLHCornerX + ", " + objPresState.TextObjectAttributes.BoundingBoxTLHCornerY + System.Environment.NewLine;
sMsg = sMsg + "Bounding Box Bottom Right Hand Corner: " + objPresState.TextObjectAttributes.BoundingBoxBRHCornerX + ", " + objPresState.TextObjectAttributes.BoundingBoxBRHCornerY + System.Environment.NewLine;
sMsg = sMsg + "Bounding Box Text Horizontal Justification: ";
switch ( objPresState.TextObjectAttributes.BoundingBoxTextJustification )
{
case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_LEFT:
sMsg = sMsg + "LEFT" + System.Environment.NewLine;
break;
case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_RIGHT:
sMsg = sMsg + "RIGHT" + System.Environment.NewLine;
break;
case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_CENTER:
sMsg = sMsg + "CENTER" + System.Environment.NewLine;
break;
}
}
else
{
sMsg = "Unformatted Text Value: " + objPresState.TextObjectAttributes.TextValue + System.Environment.NewLine;
sMsg = sMsg + "Anchor Point Annotation Units: ";
switch ( objPresState.TextObjectAttributes.AnchorPointUnits )
{
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL:
sMsg = sMsg + "PIXEL" + System.Environment.NewLine;
break;
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY:
sMsg = sMsg + "DISPLAY" + System.Environment.NewLine;
break;
}
sMsg = sMsg + "Anchor Point: " + objPresState.TextObjectAttributes.AnchorPointX + ", " + objPresState.TextObjectAttributes.AnchorPointY + System.Environment.NewLine; sMsg = sMsg + "Anchor Point Visibility: ";
if (objPresState.TextObjectAttributes.AnchorPointVisible)
sMsg = sMsg + "Y";
else
sMsg = sMsg + "N";
}
MessageBox.Show(sMsg, "Text Annotation Object");
}
// If it is desired to stop the conversion process...
//objPresState.EndConversion (DICOM_ERROR_ANN )
// Any error code, but not 0
}
private void LEADAnnToDicomAnn(ref LTDICLib.LEADDicomDS objPresStateDS)
{
// Update the CurrentElement property with a Graphic Annotation Item so
// that the resulted DICOM annotation objects are added to the Data Set
if (objPresStateDS.FindFirstGraphicAnnItem() != 0)
{
// (Make sure that the specified layer is already defined in the
// "Graphic Layer Module") objPresStateDS.CreateGraphicAnnItem(0, "LAYER_0");
objPresStateDS.FindFirstGraphicAnnItem();
}
LTANNLib.LEADRasterAnnotation objRasterAnn = new LTANNLib.LEADRasterAnnotation();
// Let's create a LEAD rectangle annotation object objRasterAnn.AnnCreate((short)LTANNLib.AnnObjectType.ANN_OBJECT_RECT, false, false);
objRasterAnn.set_AnnRectLeft(objRasterAnn.AnnObject, 150);
objRasterAnn.set_AnnRectTop(objRasterAnn.AnnObject, 175);
objRasterAnn.set_AnnRectWidth(objRasterAnn.AnnObject, 200);
objRasterAnn.set_AnnRectHeight(objRasterAnn.AnnObject, 100);
objRasterAnn.AnnSetFillMode(objRasterAnn.AnnObject, (short)LTANNLib.AnnFillModeConstants.ANN_FILLMODE_TRANSPARENT, false);
// Convert the LEAD annotation object. Now, for each resulted DICOM annotation
// object, the OnConvertLEADAnnObjToDicomAnnObj event gets fired. By handling
// the event, you can inspect the resulted object.
if (objPresStateDS.ConvertLEADAnnObjToDicomAnnObjs(objRasterAnn.AnnObject, 0) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("The LEAD annotation object was converted successfully.");
// Destroy the LEAD annotation object objRasterAnn.AnnDestroy(objRasterAnn.AnnObject, 0);
}


CreateAssociate Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestCreateAssociate ( )
{
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(true);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
MessageBox.Show("Associate Request? " + System.Convert.ToString(LEADDICOMNet1.IsRequest(LEADDICOMNet1.hPDU)));
//reset the Associate class to Accept
LEADDICOMNet1.ResetAssociate(LEADDICOMNet1.hPDU,
 false);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
MessageBox.Show("Associate Request? " + System.Convert.ToString(LEADDICOMNet1.IsRequest(LEADDICOMNet1.hPDU)));
//free the Associate class
//LEADDICOMNet1.FreeAssociate
 ( LEADDICOMNet1.hPDU )
}


Creating a Digital Signature Example for C#

public void CreateSignature(ref LTDICLib.LEADDicomDS objDS)
{
short nRet = 0;
// Create a Digital Signature in the main Data Set
objDS.SetCurrentElement(0);
nRet = objDS.CreateSignature("C:\\PrivateKey",
 "C:\\Certificate.cer", "", "", LTDICLib.DicomMacAlgorithm.DICOM_MAC_ALGORITHM_RIPEMD160,
 false, LTDICLib.DicomSecurityProfile.DICOM_SECURITY_PROFILE_NONE, 0);
if (nRet == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("The Digital Signature was created successfully.",
 "Sample");
else
{
MessageBox.Show("An error occurred [Error: " + nRet + "].",
 "Sample");
return;
}
// Save the signed Data Set
objDS.SaveDS("C:\\Signed.dic",
 0);
// Examine the Digital Signature we just created
// Refer to Examining a Digital Signature Example
// for the procedure ExamineSignature
ExamineSignature(objDS, objDS.get_CurrentElement().hElement);
}


Creating DICOM Annotations Example for C#

private void CreateAnnotations(ref LTDICLib.LEADDicomDS objPresStateDS)
{
// Set the attributes that describe the "Presentation
 State Module"
objPresStateDS.PresStateAttributes.InstanceNumber
 = 1;
objPresStateDS.PresStateAttributes.PresLabel
 = "SOME_LABEL";
objPresStateDS.PresStateAttributes.PresDescription
 = "Description of the presentation";
objPresStateDS.PresStateAttributes.PresCreationDate.Year
 = (short)System.DateTime.Today.Year;
objPresStateDS.PresStateAttributes.PresCreationDate.Month
 = (short)System.DateTime.Today.Month;
objPresStateDS.PresStateAttributes.PresCreationDate.Day
 = (short)System.DateTime.Today.Day;
objPresStateDS.PresStateAttributes.PresCreationTime.Hours
 = (short)System.DateTime.Today.Hour;
objPresStateDS.PresStateAttributes.PresCreationTime.Minutes
 = (short)System.DateTime.Today.Minute;
objPresStateDS.PresStateAttributes.PresCreationTime.Seconds
 = (short)System.DateTime.Today.Second;
objPresStateDS.PresStateAttributes.PresCreationTime.Fractions
 = 0;
objPresStateDS.PresStateAttributes.PresCreatorName
 = "SomeOne";
if (objPresStateDS.SetPresStateAttributes()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("Presentation
 State attributes were set successfully.");

// Add references to some images (under the "Presentation
 State Module")
objPresStateDS.AddPresStateImageRef ("C:\\Image1.dic",
 null);
objPresStateDS.AddPresStateImageRef ("C:\\Image2.dic",
 null);
objPresStateDS.AddPresStateImageRef ("C:\\Image3.dic",
 null);
string sLayerName=
 null;

// Create a layer
objPresStateDS.LayerAttributes.LayerName = "LAYER_0";

// "Graphic Layer"
objPresStateDS.LayerAttributes.LayerOrder = 1;
objPresStateDS.LayerAttributes.DisplayGrayscaleValue
 = -1;
objPresStateDS.LayerAttributes.DisplayRedValue
 = -1;
objPresStateDS.LayerAttributes.DisplayGreenValue
 = -1;
objPresStateDS.LayerAttributes.DisplayRedValue
 = -1;
objPresStateDS.LayerAttributes.LayerDescription
 = "Description of the layer";
if (objPresStateDS.CreateLayer()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
sLayerName=
 objPresStateDS.LayerAttributes.LayerName;
MessageBox.Show("Layer '"
 + sLayerName+ "'
 was created successfully.");
// Change one of the attributes and
 update the layer
objPresStateDS.LayerAttributes.LayerOrder = 0;
objPresStateDS.SetLayerAttributes(objPresStateDS.NewLayerIndex);
}
int hGraphicAnnItem = 0;
// Create a Graphic Annotation Item
if (objPresStateDS.CreateGraphicAnnItem(0,
 sLayerName) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
MessageBox.Show("A Graphic Annotation
 Item was created successfully.");
objPresStateDS.FindFirstGraphicAnnItem();
hGraphicAnnItem = objPresStateDS.get_CurrentElement().hElement;
}
string sSOPInstanceUID = null;
// The annotations defined in the Item hGraphicAnnItem
 will be applied
// only to one of the images listed in the Presentation
 State Module
if (objPresStateDS.FindFirstPresStateRefSeriesItem()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
if (objPresStateDS.GetPresStateImageRefCount()
 > 0)
sSOPInstanceUID
 = objPresStateDS.GetPresStateImageRefInstanceUID(0);
}
objPresStateDS.SetCurrentElement(hGraphicAnnItem);
objPresStateDS.AddLayerImageRef(sSOPInstanceUID);
// Let's create a graphic annotation object
objPresStateDS.GraphicObjectAttributes.LayerName= sLayerName;
objPresStateDS.GraphicObjectAttributes.Units = LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL;
objPresStateDS.GraphicObjectAttributes.Type
 = LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE;
objPresStateDS.GraphicObjectAttributes.Filled = true;
objPresStateDS.GraphicObjectAttributes.PointCount = 2;
// "Number of Graphic Points"
// "Graphic Data":
objPresStateDS.GraphicObjectAttributes.set_PointsX(0, 252.5F);
objPresStateDS.GraphicObjectAttributes.set_PointsY(0, 252.5F);
objPresStateDS.GraphicObjectAttributes.set_PointsX(1, 209.2F);
objPresStateDS.GraphicObjectAttributes.set_PointsY(1, 199.6F);
if (objPresStateDS.CreateGraphicObject(true) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
MessageBox.Show("A graphic annotation
 object was created successfully.");
// Change one of the attributes and
 update the object
objPresStateDS.GraphicObjectAttributes.Filled = false;
objPresStateDS.SetGraphicObjectAttributes(0);
}

// Let's now create a text annotation object
objPresStateDS.TextObjectAttributes.LayerName= sLayerName;
objPresStateDS.TextObjectAttributes.BoundingBoxUsed
 = true;
objPresStateDS.TextObjectAttributes.AnchorPointUsed
 = false;
objPresStateDS.TextObjectAttributes.BoundingBoxUnits
 = LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL;
objPresStateDS.TextObjectAttributes.TextValue = "Text
 annotation (using a bounding box)";
objPresStateDS.TextObjectAttributes.BoundingBoxTLHCornerX
 = 176.7F;
objPresStateDS.TextObjectAttributes.BoundingBoxTLHCornerY
 = 117.7F;
objPresStateDS.TextObjectAttributes.BoundingBoxBRHCornerX
 = 320.3F;
objPresStateDS.TextObjectAttributes.BoundingBoxBRHCornerY
 = 136.1F;
objPresStateDS.TextObjectAttributes.BoundingBoxTextJustification
 = LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_RIGHT;
if (objPresStateDS.CreateTextObject(true) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
MessageBox.Show("A text annotation
 object was created successfully.");
// Change one of the attributes and
 update the object
objPresStateDS.TextObjectAttributes.BoundingBoxTextJustification
 = LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_LEFT;
objPresStateDS.SetTextObjectAttributes(0);
}
// And another text annotation object
objPresStateDS.TextObjectAttributes.LayerName= sLayerName;
objPresStateDS.TextObjectAttributes.AnchorPointUsed
 = true;
objPresStateDS.TextObjectAttributes.BoundingBoxUsed
 = false;
objPresStateDS.TextObjectAttributes.AnchorPointUnits
 = LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL;
objPresStateDS.TextObjectAttributes.TextValue = "Text
 annotation (using an anchor point)";
objPresStateDS.TextObjectAttributes.AnchorPointX = 277.9F;
objPresStateDS.TextObjectAttributes.AnchorPointY = 382.7F;
objPresStateDS.TextObjectAttributes.AnchorPointVisible
 = true;
if (objPresStateDS.CreateTextObject(true) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("Another text
 annotation object was created successfully.");
}


DefaultIOD example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDefaultIOD ( )
{
//Restore Default IOD table
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
LEADDICOM1.DefaultIOD();
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}


DefaultTag example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDefaultTag ( )
{
//Restore default Tag values
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
LEADDICOM1.DefaultTag();
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}


DefaultUID example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDefaultUID ( )
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
//Restore to default values
LEADDICOM1.DefaultUID();
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}


DefaultVR example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDefaultVR ( )
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
LEADDICOM1.DefaultVR();
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}


DeleteBitmapValue Example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “"LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteBitmapValue()
{
short nRet = 0;
LTRASTERPROCLib.LEADRasterProcess Process = new LTRASTERPROCLib.LEADRasterProcess();
LEADDICOM1.EnableMethodErrors
 = false;
//move to the first image element
nRet = LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false);
//get the first image
nRet = LEADDICOM1.GetBitmapValue(0,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_BGR, 0);
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap;
//flip the image
Process.Flip(LEADRasterView1.Raster);
//delete the first image from the dataset
nRet = LEADDICOM1.DeleteBitmapValue(0, 1);
//now update the list with the flipped image
nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap,
 0, (int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB,
 0, 0, 0);
}


DeleteElement Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteElement( )
{
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DATE,
 false);
nRet = LEADDICOM1.DeleteElement();
LEADDICOM1.EnableMethodErrors
 = true;
if (nRet != 0)
MessageBox.Show("Error Deleting Element!");
}


DeleteIOD Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteIOD()
{
try
{
LEADDICOM1.EnableMethodErrors
 = true;
LEADDICOM1.MoveFirstIOD(false);
LEADDICOM1.DeleteIOD();
return;
}
catch
{
MessageBox.Show("Error");
}
}


DeleteModule Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteModule()
{
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the first module in the DataSet and delete
 it
LEADDICOM1.FindIndexModule(0);
nRet = LEADDICOM1.DeleteModule(LEADDICOM1.get_CurrentModule().Module);
if (nRet != 0)
MessageBox.Show("Error Deleting
 Module!");
LEADDICOM1.EnableMethodErrors
 = true;
}


DeleteTag Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteTag()
{
try
{
int lCode = 0;
lCode = 131073;
//move to the selected Tag
LEADDICOM1.FindTag(lCode);
//delete it
LEADDICOM1.DeleteTag();
return;
}
catch
{
MessageBox.Show("Error");
}
}


DeleteUID Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteUID()
{
try
{
string pszCode = null;
short nIndex = 0;
LEADDICOM1.EnableMethodErrors
 = true;
pszCode = "1.2.840.10008.1.2";
//move to the selected UID
LEADDICOM1.FindUID(pszCode);
//delete it
LEADDICOM1.DeleteUID();
return;
}
catch
{
MessageBox.Show("Error");
}
}


DeleteVR Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteVR()
{
try
{
short nCode = 0;
int lIndex = 0;
LEADDICOM1.EnableMethodErrors
 = true;
nCode = 18771;
//move to the selected VR
LEADDICOM1.FindVR(nCode);
//delete it
LEADDICOM1.DeleteVR();
return;
}
catch
{
MessageBox.Show("Error");
}
}


DSTempPath Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDSTempPath ( )
{
LEADDICOM1.DSTempPath = "d:\\temp";
}


EnableMethodErrors Example for C#

EnableMethodErrors (ILEADDicomNet) Example for C#

//This example uses the predefined variable “DicomDir” of type “LEADDicomDir” from “"LEADTOOLS Toolkit”.
private void TestEnableMethodErrors ( )
{
DicomDir.EnableMethodErrors = false;
}


Enumerating Context Groups Example for C#

private DialogResult DisplayContextGroup(ref LTDICLib.LEADDicomDS
 objDS)
{
LTDICLib.DicomContextGroup objGroup = null;
objGroup = objDS.CurrentContextGroup;
string sMsg = null;
// Context ID and name
sMsg = objGroup.ContextIdentifier
 + System.Environment.NewLine + objGroup.Name
 + System.Environment.NewLine;
// Extensibility
if (objGroup.Extensible)
sMsg = sMsg + "Extensible"
 + System.Environment.NewLine;
else
sMsg = sMsg + "Non-extensible"
 + System.Environment.NewLine;
// Context Group Version
string sMonth = null;
string sYear = null;
string sDay = null;
sYear = System.Convert.ToString(objGroup.ContextGroupVersion.Year);
while (sYear.Length < 4)
{
sYear = "0" + sYear;
}
sMonth = System.Convert.ToString(objGroup.ContextGroupVersion.Month);
if (sMonth.Length < 2)
sMonth = "0" + sMonth;
sDay = System.Convert.ToString(objGroup.ContextGroupVersion.Day);
if (sDay.Length < 2)
sDay = "0" + sDay;
sMsg = sMsg + sYear + sMonth + sDay + System.Environment.NewLine;
sMsg = sMsg + System.Environment.NewLine + "Enumerate
 Coded Concepts?";
return
MessageBox.Show(sMsg, "Context Group", MessageBoxButtons.YesNoCancel);
}

private void EnumContextGroups(ref LTDICLib.LEADDicomDS objDS)
{
bool bRet = false;
string sMsg = null;
objDS.ResetContextGroup();
// Load all the Context Groups
objDS.LoadContextGroup("");
// Enumerate them (3 possible ways)
if (true)
{
// One possible way to enumerate the
 Context Groups
bRet = objDS.MoveFirstContextGroup();
while (bRet)
{
switch (DisplayContextGroup(ref
 objDS))
{
case
 DialogResult.Yes:
//
 Refer to Enumerating the Coded Concepts of a Context Group
//
 Example for the procedure EnumCodedConcepts
EnumCodedConcepts(ref
 objDS);
break;
case
 DialogResult.Cancel:
goto
 ExitWhile1;
}
bRet = objDS.MoveNextContextGroup();
}
ExitWhile1: ;
}
else  if (false)
{
// Another way to enumerate the Context
 Groups
for (int I = 0;I < objDS.GetContextGroupCount();I++)
{
objDS.FindIndexContextGroup(I);
switch (DisplayContextGroup(ref
 objDS))
{
case
 DialogResult.Yes:
EnumCodedConcepts(ref
 objDS);
break;
case
 DialogResult.Cancel:
goto
 ExitWhile2;
}
}
ExitWhile2: ;
}
else if (false)
{
// A third way to enumerate the Context
 Groups
bRet = objDS.MoveLastContextGroup();
while (bRet)
{
switch (DisplayContextGroup(ref
 objDS))
{
case
 DialogResult.Yes:
EnumCodedConcepts(ref
 objDS);
break;
case
 DialogResult.Cancel:
goto
 ExitWhile3;
}
bRet = objDS.MovePrevContextGroup();
}
ExitWhile3: ;
}
}


Enumerating Digital Signatures Example for C#

public void EnumerateSignatures(ref LTDICLib.LEADDicomDS
 objDS)
{
// We will enumerate the Digital Signatures in the main
 Data Set
int lSignaturesCount = 0;
objDS.SetCurrentElement(0);
lSignaturesCount = objDS.GetSignaturesCount();
if (lSignaturesCount == 0)
{
MessageBox.Show("No Digital Signatures
 in the main Data Set.", "Sample");
return;
}
string sMsg = null;
if (lSignaturesCount == 1)
sMsg = "There is 1 Digital Signature
 in the main Data Set. " + "Do you want to examine it?";
else
sMsg = "There are " + lSignaturesCount
 + " Digital Signatures in the main Data Set. " + "Do you
 want to examine them?";
if (MessageBox.Show(sMsg, "Sample", MessageBoxButtons.YesNo)
 != DialogResult.Yes)
return;
for (int I = 0; I < lSignaturesCount; I++)
{
objDS.MoveSignature(I);
// Refer to Examining a Digital Signature
 Example
// for the procedure ExamineSignature
ExamineSignature(objDS, objDS.get_CurrentElement().hElement);
objDS.SetCurrentElement(0);
}
}


Enumerating the Coded Concepts of a Context Group Example for C#

private bool DisplayCodedConcept(ref LTDICLib.LEADDicomDS
 objDS, ref bool bYesNo)
{
bool tempDisplayCodedConcept = false;
string sTitle = null;
objDS.MoveCodedConceptGroup();
sTitle = "Coded Concept (" + objDS.CurrentContextGroup.ContextIdentifier
 + ")";
string sMsg = null;
string sYear = null;
string sMonth = null;
string sDay = null;
// Coding Scheme Designator;
sMsg = objDS.CurrentCodedConcept.CodingSchemeDesignator
 + System.Environment.NewLine;
// Coding Scheme Version
if (objDS.CurrentCodedConcept.CodingSchemeVersion.Length>0)
sMsg = sMsg + objDS.CurrentCodedConcept.CodingSchemeVersion
 + System.Environment.NewLine;
// Code Value and Code Meaning
sMsg = sMsg + objDS.CurrentCodedConcept.CodeValue + System.Environment.NewLine
 + objDS.CurrentCodedConcept.CodeMeaning + System.Environment.NewLine;
// Context Group Local Version
if (objDS.CurrentCodedConcept.IsContextGroupLocalVersion)
{
sYear = System.Convert.ToString(objDS.CurrentCodedConcept.ContextGroupLocalVersion.Year);
while (sYear.Length < 4)
{
sYear = "0"
 + sYear;
}
sMonth = System.Convert.ToString(objDS.CurrentCodedConcept.ContextGroupLocalVersion.Month);
if (sMonth.Length < 2)
sMonth = "0"
 + sMonth;
sDay = System.Convert.ToString(objDS.CurrentCodedConcept.ContextGroupLocalVersion.Day);
if (sDay.Length < 2)
sDay = "0"
 + sDay;
sMsg = sMsg + sYear + sMonth + sDay
 + System.Environment.NewLine;
}
// Context Group Extension Creator UID
if (objDS.CurrentCodedConcept.ContextGroupExtensionCreatorUID.Length>0)
sMsg = sMsg + objDS.CurrentCodedConcept.ContextGroupExtensionCreatorUID
 + System.Environment.NewLine;
if (bYesNo)
{
sMsg = sMsg + System.Environment.NewLine
 + "Continue?";
tempDisplayCodedConcept = MessageBox.Show(sMsg,
 sTitle, MessageBoxButtons.YesNo) == DialogResult.Yes;
}
else
{
MessageBox.Show(sMsg, sTitle, MessageBoxButtons.OK);
tempDisplayCodedConcept = true;
}
return tempDisplayCodedConcept;
}

private void EnumCodedConcepts(ref LTDICLib.LEADDicomDS objDS)
{
bool bRet = false;
// Enumerate the Coded Concepts in the current Context
 Group (3 possible ways)
int I = 0;
if (true)
{
// One possible way to enumerate the
 Coded Concepts
bRet = objDS.MoveFirstCodedConcept();
while (bRet)
{
bool tempbYesNo1
 = true;
if (! (DisplayCodedConcept(ref
 objDS, ref tempbYesNo1)))
break;
bRet = objDS.MoveNextCodedConcept();
}
}
else if (false)
{
// Another way to enumerate the Coded
 Concepts
for (I = 0; I < objDS.GetCodedConceptCount();
 I++)
{
objDS.FindIndexCodedConcept(I);
bool tempbYesNo3
 = true;
if (! (DisplayCodedConcept(ref
 objDS, ref tempbYesNo3)))
break;
}
}
else if (false)
{
// A third way to enumerate the Coded
 Concepts
bRet = objDS.MoveLastCodedConcept();
while (bRet)
{
bool tempbYesNo4
 = true;
if (! (DisplayCodedConcept(ref
 objDS, ref tempbYesNo4)))
break;
bRet = objDS.MovePrevCodedConcept();
}
}
}


Examining a Digital Signature Example for C#

public string GetFormatted(string sValue, short nWidth)
{
string tempGetFormatted = null;
tempGetFormatted = sValue;
while (tempGetFormatted.Length < nWidth)
{
tempGetFormatted = "0" +
 tempGetFormatted;
}
return tempGetFormatted;
}

public void ExamineSignature(LTDICLib.LEADDicomDS objDS,
 int hSignatureItem)
{
short nRet = 0;
objDS.SetCurrentElement(hSignatureItem);
// Verify the Digital Signature; if hSignatureItem is
 0, the method will
// verify all the Digital Signatures that exist in the
 Data Set
nRet = objDS.VerifySignature(0);
switch ( nRet )
{
case (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS:
{
if (hSignatureItem
 != 0)
MessageBox.Show("The
 Digital Signature was verified.", "Sample");
else
{
MessageBox.Show("All
 Digital Signatures were verified (if there are any).", "Sample");
return;
}
break;
}
case (short)LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_INVALID_SIGNATURE:
{
if (hSignatureItem
 != 0)
MessageBox.Show("The
 Digital Signature is invalid.", "Sample");
else
MessageBox.Show("At
 least one Digital Signature is invalid.", "Sample");
return;
}
default:
{
MessageBox.Show("An
 error occurred [Error: " + nRet + "].", "Sample");
return;
}
}
string sMsg = null;
// The Digital Signature UID
if (objDS.GetSignatureUID()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
if (objDS.StringValueCount
 > 0)
sMsg = "Digital
 Signature UID: " + objDS.get_StringValues(0)
 + System.Environment.NewLine;
}
// The Digital Signature DateTime string sSign = null;
if (objDS.GetSignatureDateTime()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
if (objDS.DateTimeValueCount > 0)
{
if (objDS.get_DateTimeValues(0).Offset
 >= 0)
sSign = "+";
else
sSign = "-";
short tempnWidth1
 = 2;
short tempnWidth2
 = 2;
short tempnWidth3
 = 4;
short tempnWidth4
 = 2;
short tempnWidth5
 = 2;
short tempnWidth6
 = 2;
short tempnWidth7
 = 6;
short tempnWidth8
 = 4;
sMsg = sMsg + "Digital
 Signature DateTime: " + GetFormatted(System.Convert.ToString(objDS.get_DateTimeValues(0).Month),
 tempnWidth1) + "/" + GetFormatted(System.Convert.ToString(objDS.get_DateTimeValues(0).Day),
 tempnWidth2) + "/" + GetFormatted(System.Convert.ToString(objDS.get_DateTimeValues(0).Year),
 tempnWidth3) + " " + GetFormatted(System.Convert.ToString(objDS.get_DateTimeValues(0).Hours),
 tempnWidth4) + ":" + GetFormatted(System.Convert.ToString(objDS.get_DateTimeValues(0).Minutes),
 tempnWidth5) + ":" + GetFormatted(System.Convert.ToString(objDS.get_DateTimeValues(0).Seconds),
 tempnWidth6) + "." + GetFormatted(System.Convert.ToString(objDS.get_DateTimeValues(0).Fractions),
 tempnWidth7) + " " + sSign + GetFormatted(System.Convert.ToString(objDS.get_DateTimeValues(0).Offset),
 tempnWidth8) + System.Environment.NewLine;
}
}
// The MAC Calculation Transfer Syntax UID
if (objDS.GetMacTransferSyntax()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
if (objDS.StringValueCount
 > 0)
sMsg = sMsg + "MAC
 Calculation Transfer Syntax UID: " + objDS.get_StringValues(0)
 + System.Environment.NewLine;
}
// The MAC Algorithm
if (objDS.GetMacAlgorithm()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
if (objDS.StringValueCount
 > 0)
sMsg = sMsg + "MAC
 Algorithm: " + objDS.get_StringValues(0)
 + System.Environment.NewLine;
}
// The Data Elements Signed string
sGroup = null;
string sTag = null;
string sElement = null;
if (objDS.GetSignedElementsCount()
 > 0)
{
sMsg = sMsg + "Data Elements Signed:
 ";
// We will display only one
if (objDS.MoveSignedElement(0)
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
sTag = System.Convert.ToString(objDS.get_CurrentElement().Tag,
 16).ToUpper();
sElement = sTag.Substring(sTag.Length
 - 4);
sGroup = sTag.Substring(0,
 sTag.Length - 4);
short tempnWidth9
 = 4;
sMsg = sMsg + "("
 + GetFormatted(sGroup, tempnWidth9) + "," + sElement + "),
 ...";
objDS.SetCurrentElement(hSignatureItem);
}
sMsg = sMsg + System.Environment.NewLine;
}
sMsg = sMsg + System.Environment.NewLine + "Do you
 want to save the Certificate of Signer?";
// Display the information we have about the Digital
 Signature
if (MessageBox.Show(sMsg, "Sample", MessageBoxButtons.YesNo)
 == DialogResult.Yes)
{
// Save the Certificate of Signer
objDS.SaveCertificate("C:\\CertOfSigner.cer",
 LTDICLib.DicomCertificateFormat.DICOM_CERTIFICATE_FORMAT_PEM);
}
}


Examining Annotations (1) Example for C#

private void ExamineAnnotations1(ref LTDICLib.LEADDicomDS objPresStateDS)
{
string sMsg = null;
// Get the attributes that describe the "Presentation State Module"
if (objPresStateDS.GetPresStateAttributes(0) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
// Display some
sMsg = "Instance Number: " + objPresStateDS.PresStateAttributes.InstanceNumber + System.Environment.NewLine + "Presentation Label: " + objPresStateDS.PresStateAttributes.PresLabel + System.Environment.NewLine + "Presentation Description: " + objPresStateDS.PresStateAttributes.PresDescription + System.Environment.NewLine + "Presentation Creator’s Name: " + objPresStateDS.PresStateAttributes.PresCreatorName;
MessageBox.Show(sMsg, "Presentation State Attributes");
}
int I = 0;
int lCount = 0;
int J = 0;
// Display the SOP Instance UIDs of all the images referenced in the
// "Presentation State Module"
if (objPresStateDS.FindFirstPresStateRefSeriesItem() == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
sMsg = "";
do
{
lCount = objPresStateDS.GetPresStateImageRefCount();
for (I = 0; I < lCount; I++)
{
sMsg = sMsg + objPresStateDS.GetPresStateImageRefInstanceUID(I) + System.Environment.NewLine;
}
sMsg = sMsg + System.Environment.NewLine;
} while (objPresStateDS.MoveNextPresStateRefSeriesItem() == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS);
MessageBox.Show(sMsg, "Referenced SOP Instance UID(s)");
}
// Enumerate all the layers defined
lCount = objPresStateDS.LayerCount;
MessageBox.Show("Layer Count: " + lCount);
for (I = 0; I < lCount; I++)
{
// Display some of the attributes
if (objPresStateDS.GetLayerAttributes(I) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
sMsg = "Graphic Layer: " + objPresStateDS.LayerAttributes.LayerName + System.Environment.NewLine + "Graphic Layer Order: " + objPresStateDS.LayerAttributes.LayerOrder + System.Environment.NewLine + "Graphic Layer Description: " + objPresStateDS.LayerAttributes.LayerDescription;
MessageBox.Show(sMsg, "Graphic Layer Attributes");
}
}
int lGraphicObjectCount = 0;
int lTextObjectCount = 0;
// Enumerate all the Graphic Annotation Items
if (objPresStateDS.FindFirstGraphicAnnItem() == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
do
{
lGraphicObjectCount = objPresStateDS.GetGraphicObjectCount();
// Or:
//lGraphicObjectCount = objPresStateDS.GetLayerGraphicObjectCount ()
lTextObjectCount = objPresStateDS.GetTextObjectCount();
// Or:
//lTextObjectCount = objPresStateDS.GetLayerTextObjectCount()
sMsg = "Graphic Layer: " + objPresStateDS.GetLayerName() + System.Environment.NewLine + "Graphic object count: " + lGraphicObjectCount + System.Environment.NewLine + "Text object count: " + lTextObjectCount + System.Environment.NewLine + System.Environment.NewLine;
lCount = objPresStateDS.GetLayerImageRefCount();
if (lCount == 0)
sMsg = sMsg + "The annotations defined in this Item apply to all the " + "images listed in the \"Presentation State Module\".";
else
{
sMsg = sMsg + "Referenced SOP Instance UID(s):" + System.Environment.NewLine;
for (I = 0; I < lCount; I++)
{
sMsg = sMsg + " " + objPresStateDS.GetLayerImageRefInstanceUID(I) + System.Environment.NewLine;
}
}
MessageBox.Show(sMsg, "Graphic Annotation Item");
// Enumerate all the graphic objects in the current Item
for (I = 0; I < lGraphicObjectCount; I++)
{
objPresStateDS.GetGraphicObjectAttributes(I);
sMsg = "Graphic Annotation Units: ";
switch ( objPresStateDS.GraphicObjectAttributes.Units )
{
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL:
sMsg = sMsg + "PIXEL" + System.Environment.NewLine;
break;
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY:
sMsg = sMsg + "DISPLAY" + System.Environment.NewLine;
break;
}
sMsg = sMsg + "Graphic Type: ";
switch ( objPresStateDS.GraphicObjectAttributes.Type )
{
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POINT:
sMsg = sMsg + "POINT" + System.Environment.NewLine;
break;
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE:
sMsg = sMsg + "POLYLINE" + System.Environment.NewLine;
break;
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED:
sMsg = sMsg + "INTERPOLATED" + System.Environment.NewLine;
break;
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE:
sMsg = sMsg + "CIRCLE" + System.Environment.NewLine;
break;
case LTDICLib.DicomGraphicObjectTypes.DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE:
sMsg = sMsg + "ELLIPSE" + System.Environment.NewLine;
break;
}
if (objPresStateDS.GraphicObjectAttributes.Filled)
sMsg = sMsg + "Graphic Filled: Y" + System.Environment.NewLine;
else
sMsg = sMsg + "Graphic Filled: N" + System.Environment.NewLine;
lCount = objPresStateDS.GraphicObjectAttributes.PointCount;
sMsg = sMsg + "Number of Graphic Points: " + lCount + System.Environment.NewLine;
if (lCount < 10)
{
sMsg = sMsg + "Graphic Data: " + System.Environment.NewLine;
for (J = 0; J < lCount; J++)
{
sMsg = sMsg + " " + "X" + J + 1 + ", Y" + J + 1 + " = " + objPresStateDS.GraphicObjectAttributes.get_PointsX(J) + ", " + objPresStateDS.GraphicObjectAttributes.get_PointsY(J) + System.Environment.NewLine;
}
}
MessageBox.Show(sMsg, "Graphic Annotation Object");
}
// Enumerate all the text objects in the current Item
for (I = 0; I < lTextObjectCount; I++)
{
objPresStateDS.GetTextObjectAttributes(I);
if (objPresStateDS.TextObjectAttributes.BoundingBoxUsed)
{
sMsg = "Unformatted Text Value: " + objPresStateDS.TextObjectAttributes.TextValue + System.Environment.NewLine;
sMsg = sMsg + "Bounding Box Annotation Units: ";
switch ( objPresStateDS.TextObjectAttributes.BoundingBoxUnits )
{
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL:
sMsg = sMsg + "PIXEL" + System.Environment.NewLine;
break;
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY:
sMsg = sMsg + "DISPLAY" + System.Environment.NewLine;
break;
}
sMsg = sMsg + "Bounding Box Top Left Hand Corner: " + objPresStateDS.TextObjectAttributes.BoundingBoxTLHCornerX + ", " + objPresStateDS.TextObjectAttributes.BoundingBoxTLHCornerY + System.Environment.NewLine;
sMsg = sMsg + "Bounding Box Bottom Right Hand Corner: " + objPresStateDS.TextObjectAttributes.BoundingBoxBRHCornerX + ", " + objPresStateDS.TextObjectAttributes.BoundingBoxBRHCornerY + System.Environment.NewLine;
sMsg = sMsg + "Bounding Box Text Horizontal Justification: ";
switch (objPresStateDS.TextObjectAttributes.BoundingBoxTextJustification)
{
case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_LEFT:
sMsg = sMsg + "LEFT" + System.Environment.NewLine;
break;
case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_RIGHT:
sMsg = sMsg + "RIGHT" + System.Environment.NewLine;
break;
case LTDICLib.DicomTextJustificationTypes.DICOM_TEXT_JUSTIFICATION_CENTER:
sMsg = sMsg + "CENTER" + System.Environment.NewLine;
break;
}
}
else
{
sMsg = "Unformatted Text Value: " + objPresStateDS.TextObjectAttributes.TextValue + System.Environment.NewLine;
sMsg = sMsg + "Anchor Point Annotation Units: ";
switch (objPresStateDS.TextObjectAttributes.AnchorPointUnits)
{
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_PIXEL:
sMsg = sMsg + "PIXEL" + System.Environment.NewLine;
break;
case LTDICLib.DicomMeasureUnits.DICOM_UNIT_DISPLAY:
sMsg = sMsg + "DISPLAY" + System.Environment.NewLine;
break;
}
sMsg = sMsg + "Anchor Point: " + objPresStateDS.TextObjectAttributes.AnchorPointX + ", " + objPresStateDS.TextObjectAttributes.AnchorPointY + System.Environment.NewLine;
if (objPresStateDS.TextObjectAttributes.AnchorPointVisible)
sMsg = sMsg + "Anchor Point Visibility: Y";
else
sMsg = sMsg + "Anchor Point Visibility: N";
}
MessageBox.Show(sMsg, "Text Annotation Object");
}
} while (objPresStateDS.MoveNextGraphicAnnItem() == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS);
}
}


Examining Annotations (2) Example for C#

private void ExamineAnnotations2(ref LTDICLib.LEADDicomDS
 objPresStateDS)
{
string sRefSOPInstanceUID = null;
// Pick one of the images referenced in the "Presentation
 State Module" and
// get its SOP Instance UID
if (objPresStateDS.FindFirstPresStateRefSeriesItem()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
if (objPresStateDS.GetPresStateImageRefCount()
 > 0)
sRefSOPInstanceUID
 = objPresStateDS.GetPresStateImageRefInstanceUID(0);
}
// Find the SOP Class UID of that image
if (objPresStateDS.FindPresStateRefImageItem(sRefSOPInstanceUID)
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
if (objPresStateDS.MoveChildElement()
 == 0)
{
if (objPresStateDS.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_SOP_CLASS_UID,
 true) == 0)
{
if
 (objPresStateDS.GetStringValue(0,
 1) == 0)
MessageBox.Show(objPresStateDS.get_StringValues(0),
 "Referenced SOP Class UID");
}
}
}
// Remove the reference to that image from the "Presentation
 State Module"
objPresStateDS.RemovePresStateImageRef(sRefSOPInstanceUID);
// Pick a Graphic Annotation Item int hGraphicAnnotationItem
 = 0;
string sGraphicLayer = null;
if (objPresStateDS.FindFirstGraphicAnnItem()
 == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
hGraphicAnnotationItem = objPresStateDS.get_CurrentElement().hElement;
// Pick an image reference
if (objPresStateDS.GetLayerImageRefCount()
 > 0)
{
sRefSOPInstanceUID
 = objPresStateDS.GetLayerImageRefInstanceUID(0);
objPresStateDS.FindLayerRefImageItem(sRefSOPInstanceUID);
// Display one of
 the attributes of the Referenced Image Item
if (objPresStateDS.MoveChildElement()
 == 0)
{
if
 (objPresStateDS.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_SOP_CLASS_UID,
 true) == 0)
{
if
 (objPresStateDS.GetStringValue(0,
 1) == 0)
MessageBox.Show("Referenced
 SOP Class UID: " + objPresStateDS.get_StringValues(0), "Referenced
 Image Item");
}
}
objPresStateDS.SetCurrentElement(hGraphicAnnotationItem);
// Remove the image
 reference
objPresStateDS.RemoveLayerImageRef(sRefSOPInstanceUID);
// Remove all references
 to images that are listed in this Graphic Annotation
// Item (this way,
 the annotations defined by this Item will be applied to all
// the images listed
 in the "Presentation State Module")
objPresStateDS.RemoveAllLayerImageRefs();
}
sGraphicLayer = objPresStateDS.GetLayerName();
// Display some of the layer's attributes
 objPresStateDS.GetLayerAttributes(objPresStateDS.GetLayerIndex(sGraphicLayer));
MessageBox.Show("Graphic Layer:
 " + objPresStateDS.LayerAttributes.LayerName + System.Environment.NewLine
 + "Graphic Layer Order: " + objPresStateDS.LayerAttributes.LayerOrder + System.Environment.NewLine
 + "Graphic Layer Description: " + objPresStateDS.LayerAttributes.LayerDescription,
 "Graphic Layer Attributes");
// Change the layer of this Graphic
 Annotation Item (the specified new
// layer should already be defined
 in the "Graphic Layer Module")
objPresStateDS.SetLayerName("ANOTHER_LAYER");
// Pick a graphic annotation object
if (objPresStateDS.GetGraphicObjectCount()
 > 0)
{
objPresStateDS.FindGraphicObjectItem(0);
// Display one of
 the attributes of this object
if (objPresStateDS.MoveChildElement()
 == 0)
{
//
 Graphic Type (0070,0023)
if
 (objPresStateDS.FindFirstElement(0X700023,
 true) == 0)
{
if
 (objPresStateDS.GetStringValue(0,
 1) == 0)
MessageBox.Show("Graphic
 Type: " + objPresStateDS.get_StringValues(0), "Graphic Annotation
 Object");
}
}
objPresStateDS.SetCurrentElement(hGraphicAnnotationItem);
// Remove the object
 objPresStateDS.RemoveGraphicObject(0);
// Remove all the
 graphic annotation objects defined by this Graphic
// Annotation Item
objPresStateDS.RemoveAllGraphicObjects();
// Or:
//objPresStateDS.RemoveLayerGraphicObjects
}
// Pick a text annotation object
if (objPresStateDS.GetTextObjectCount()
 > 0)
{
objPresStateDS.FindTextObjectItem(0);
// Display one of
 the attributes of this object
if (objPresStateDS.MoveChildElement()
 == 0)
{
//
 Unformatted Text Value (0070,0006)
if
 (objPresStateDS.FindFirstElement(0X700006,
 true) == 0)
{
if
 (objPresStateDS.GetStringValue(0,
 1) == 0)
MessageBox.Show("Unformatted
 Text Value: " + objPresStateDS.get_StringValues(0), "Text Annotation
 Object");
}
}
objPresStateDS.SetCurrentElement(hGraphicAnnotationItem);
// Remove the object
objPresStateDS.RemoveTextObject(0);
// Remove all the
 text annotation objects defined by this Graphic
// Annotation Item
objPresStateDS.RemoveAllTextObjects();
// Or:
//objPresStateDS.RemoveLayerTextObjects

}
}
// Remove all references to images that are listed in
 all the Graphic Annotation
// Items (this way, the annotations defined by all the
 Items will be applied to all
// the images listed in the "Presentation State
 Module")
objPresStateDS.RemoveAllLayersImageRefs();
// Remove all references to images from the "Presentation
 State Module"
objPresStateDS.RemoveAllPresStateImageRefs();
// Pick one of the layers
if (objPresStateDS.LayerCount
 > 0)
{
objPresStateDS.FindLayerItem(0);
// Display one of the attributes of
 this layer
if (objPresStateDS.MoveChildElement()
 == 0)
{
// Graphic Layer
 (0070,0002)
if (objPresStateDS.FindFirstElement(0X700002,
 true) == 0)
{
if
 (objPresStateDS.GetStringValue(0,
 1) == 0)
MessageBox.Show("Graphic
 Layer: " + objPresStateDS.get_StringValues(0), "Graphic Layer");
}
}
// Remove the layer
objPresStateDS.RemoveLayer(0, true);
// Remove all the layers defined in
 the "Graphic Layer Module"
objPresStateDS.RemoveAllLayers(true);
}
}


Extracting a Wave Stream From a Data Set Example for C#

public bool GetWaveFileFromDataSet(ref LTDICLib.LEADDicomDS
 objDataSet, ref string sResultingWaveFilename)
{
bool tempGetWaveFileFromDataSet = false;
tempGetWaveFileFromDataSet = false;
// Do we have any waveforms in the Data Set?
if (objDataSet.GetWaveformGroupCount()
 < 1)
return tempGetWaveFileFromDataSet;
LTDICLib.DicomWaveformGroup
 objAudioWaveformGroup
 = new LTDICLib.DicomWaveformGroup(); objAudioWaveformGroup.EnableMethodErrors
 = false;
// Extract the first waveform group
if (objDataSet.GetWaveformGroup(0,
 objAudioWaveformGroup) != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
return tempGetWaveFileFromDataSet;
// Extract the wave stream from the waveform group and
 save it to disk
if (objAudioWaveformGroup.SaveAudio(sResultingWaveFilename,
 0) != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
return tempGetWaveFileFromDataSet;
return true;
}


FindFirstElement Example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “"LEADTOOLS Toolkit”. //LEADDICOM1
 is a DICOM Dataset defined outside this method
private void TestFindFirstElement(object eventSender, System.EventArgs
 eventArgs)
{
try
{
//Find the first image element and
 display it
LEADDICOM1.EnableMethodErrors
 = true;
//move to first element in Data Set
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false);
LEADDICOM1.GetBitmapValue(0,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap;
LEADDICOM1.Bitmap = 0;
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element: "
 + LEADDICOM1.get_CurrentTag().Name);
//find each image
while (true)
{
LEADDICOM1.FindNextElement(false);
LEADDICOM1.GetBitmapValue(0,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap
 = LEADDICOM1.Bitmap;
LEADDICOM1.Bitmap
 = 0;
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element:
 " + LEADDICOM1.get_CurrentTag().Name);
}
}
catch
{
MessageBox.Show("No More Images");
}
}


FindIndexModule Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestFindIndexModule()
{
int lCount = 0;
string szOut = null;
int x = 0;
LEADDICOM1.EnableMethodErrors
 = false;
lCount = LEADDICOM1.GetModuleCount();
LEADDICOM1.GetInfoDS();
szOut = "Found " + System.Convert.ToString(lCount)
 + " Modules" + "\n" + "\r";
for (x = 0; x < lCount; x++)
{
LEADDICOM1.FindIndexModule(x);
LEADDICOM1.FindModuleIOD(LEADDICOM1.InfoClass, LEADDICOM1.get_CurrentModule().Module);
szOut = szOut + "Module "
 + LEADDICOM1.get_CurrentIOD().Name
 + "\n" + "\r";
}
MessageBox.Show(szOut);
LEADDICOM1.EnableMethodErrors
 = true;
}


FindLastElement Example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “"LEADTOOLS Toolkit”. //LEADDICOM1
 is a DICOM Dataset defined outside this method
private void TestFindLastElement()
{
try
{
//Find the last image element and display it
LEADDICOM1.EnableMethodErrors
 = true;
//move to last element in Data Set
LEADDICOM1.MoveLastElement(false);
LEADDICOM1.FindLastElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false);
LEADDICOM1.GetBitmapValue(0,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap;
LEADDICOM1.Bitmap = 0;
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element: " + LEADDICOM1.get_CurrentTag().Name);
//find each image
while (true)
{
LEADDICOM1.FindPrevElement(false);
LEADDICOM1.GetBitmapValue(0,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap;
LEADDICOM1.Bitmap = 0;
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element: " + LEADDICOM1.get_CurrentTag().Name);
}
}
catch
{
MessageBox.Show("No More Images");
}
}


FindModule Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestFindModule ( )
{
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
nRet = LEADDICOM1.FindModule((int)LTDICLib.DicomModuleConstants.DICOM_MODULE_NM_TOMO_ACQUISITION);
if (nRet != 0)
MessageBox.Show("Not Found");
else
{
LEADDICOM1.GetInfoDS();
LEADDICOM1.FindModuleIOD (LEADDICOM1.InfoClass, (int)LTDICLib.DicomModuleConstants.DICOM_MODULE_NM_TOMO_ACQUISITION);
MessageBox.Show("Found Module
 " + LEADDICOM1.get_CurrentIOD().Name);
}
LEADDICOM1.EnableMethodErrors
 = true;
}


FindModuleIOD Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestFindModuleIOD(object eventSender, System.EventArgs eventArgs)
{
try
{
string szPrompt = null;
LEADDICOM1.EnableMethodErrors
 = true;
//Find a Module
LEADDICOM1.FindModuleIOD((int)LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE,
 (int)LTDICLib.DicomModuleConstants.DICOM_MODULE_BIPLANE_IMAGE);
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
LEADDICOM1.SetIODName("New
 IOD Name #1");
LEADDICOM1.SetIODDescription("New
 IOD Description #1");
szPrompt = "Name: " + LEADDICOM1.get_CurrentIOD().Name + "\r";
szPrompt = szPrompt + "Desc: "
 + LEADDICOM1.get_CurrentIOD().Description;
MessageBox.Show(szPrompt);
//Find a Class LEADDICOM1.FindClassIOD((int)LTDICLib.DicomClassConstants.DICOM_CLASS_PRINT_QUEUE);
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
LEADDICOM1.SetIODName("New
 IOD Name #2");
LEADDICOM1.SetIODDescription("New
 IOD Description #2");
szPrompt = "Name: " + LEADDICOM1.get_CurrentIOD().Name + "\r";
szPrompt = szPrompt + "Desc: "
 + LEADDICOM1.get_CurrentIOD().Description;
MessageBox.Show(szPrompt);
return;
}
catch
{
MessageBox.Show("Error");
}
}


FindPresentationAbstract Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestFindPresentationAbstract ( )
{
const string UID_VERIFICATION_CLASS = "1.2.840.10008.1.1"; //
 Verification SOP Class
short nID = 0;
int hPDU = 0;
//get the associate object for this client computer's connection
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
//find the id for UID_VERIFICATION_CLASS within this association
//if it is supported by the association
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 UID_VERIFICATION_CLASS);
if (nID == 0)
MessageBox.Show("Not Supported by this association!");
else
MessageBox.Show("Found: " + System.Convert.ToString(nID));
}


GetAgeValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetAgeValue()
{
int lCount = 0;
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the Age Value
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_AGE, (short)LTDICLib.DicomVRCodeConstants.VR_AS,
 false, 0);
//insert an Age value into the element
LEADDICOM1.AgeValueCount
 = 1;
LEADDICOM1.get_AgeValues(0).Number
 = 21;
LEADDICOM1.get_AgeValues(0).Reference
 = System.Convert.ToInt16(System.Convert.ToInt32('Y'));
//set the age
nRet = LEADDICOM1.SetAgeValue(1);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.AgeValueCount
 = 0; //free the value
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the value
nRet = LEADDICOM1.GetAgeValue(0,
 lCount);
//display the value
Text1.Text = "Number: " + System.Convert.ToString(LEADDICOM1.get_AgeValues(0).Number) +
 "Ref: " + (char)(LEADDICOM1.get_AgeValues(0).Reference);
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("wait");
}


GetApplication Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetApplication ( )
{
int hPDU = 0;
hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);
//display current Application Context
MessageBox.Show(LEADDICOMNet1.GetApplication(hPDU));
//change it
LEADDICOMNet1.SetApplication(hPDU,
 "9.9.999.99999.9.9.9.9");
MessageBox.Show(LEADDICOMNet1.GetApplication(hPDU));
}


GetAuthenticationAlgorithmTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetAuthenticationAlgorithmTLS ( )
{
if (LEADDICOMNet1.GetAuthenticationAlgorithmTLS(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) == (int)LTDNCLib.DicomMutualAuthMethod.DICOM_MUTUALAUTH_RSA)
MessageBox.Show("Mutual authentication in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MUTUALAUTH_RSA");
}


GetBinaryValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetBinaryValue()
{
int lCount = 0;
int x = 0;
short nRet = 0;
int nLen = 0;
byte byteVal = 0;
string szBytes = null;
string szByte = null;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
Text1.Visible = true;
Text1.Text = "";
//insert some bytes into the element
szBytes = "This is a Test 1234!";
nLen = szBytes.Length;
LEADDICOM1.BinaryValueCount
 = nLen;
for (x = 0; x < nLen; x++)
{
szByte = szBytes.Substring(x, 1);
byteVal = System.Convert.ToByte(System.Convert.ToInt32(szByte[0]));
LEADDICOM1.set_BinaryValues(x,
 System.Convert.ToInt16(byteVal)) ;
}
//set the bytes
nRet = LEADDICOM1.SetBinaryValue(nLen);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.BinaryValueCount
 = 0;
//free the values
//get the byte count
lCount = LEADDICOM1.get_CurrentElement().Length;
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " bytes!");
//get the bytes
nRet = LEADDICOM1.GetBinaryValue(lCount);
if (nRet == 0)
{
for (x = 0; x < LEADDICOM1.BinaryValueCount;
 x++)
{
//display each byte
 as a char separated by a space
Text1.Text = Text1.Text
 + " " + (char)(LEADDICOM1.get_BinaryValues(x));
}
}
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("wait");
}


GetBitmapCount Example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “"LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetBitmapCount()
{
int lCount = 0;
lCount = LEADDICOM1.GetBitmapCount();
if (lCount == 1)
{
//get the bitmap
LEADDICOM1.GetBitmapValue(0,
 0, (short) LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap;
LEADDICOM1.Bitmap = 0;
//free the image
}
else
if (lCount > 1)
{
//get the bitmap
 list
LEADDICOM1.GetBitmapListValue(0,
 lCount, 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0);
LEADRasterView1.Raster.BitmapList = LEADDICOM1.BitmapList;
MessageBox.Show("There
 are " + System.Convert.ToString(LEADDICOM1.BitmapListCount)
 + " Images");
LEADDICOM1.BitmapList
 = 0;
//free the image
//play the animation
LEADRasterView1.AnimationLoop
 = true;
LEADRasterView1.AnimationEnable
 = true;
}
else
MessageBox.Show("No Image!");
MessageBox.Show("wait");
}


GetCharValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetCharValue ()
{
int lCount = 0;
int x = 0;
short nRet = 0;
int nLen = 0;
string szChars = null;
string szChar = null;
byte byteVal = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the Char Values
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, (short)LTDICLib.DicomVRCodeConstants.VR_OB,
 false, 0);
Text1.Visible = true;
Text1.Text = "";
//insert some char values into the element
szChars = "This is a Test 1234!";
nLen = szChars.Length;
LEADDICOM1.CharValueCount
 = nLen;
for (x = 0; x < nLen; x++)
{
szChar = szChars.Substring(x, 1);
byteVal = System.Convert.ToByte(System.Convert.ToInt32(szChar[0]));
LEADDICOM1.set_CharValues(x,
 System.Convert.ToInt16(byteVal));
}
//set the chars
nRet = LEADDICOM1.SetCharValue(nLen);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.CharValueCount
 = 0;
//free the values
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the values
nRet = LEADDICOM1.GetCharValue(0,
 lCount);
if (nRet == 0)
{
for (x = 0; x < LEADDICOM1.CharValueCount;
 x++)
{
//display each value
 separated by a '.'
Text1.Text = Text1.Text
 + "." + (char)(LEADDICOM1.get_CharValues(x));
}
}
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("wait");
}


GetConvertValue Example for C#

//This example uses the predefined variable “Text5” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetConvertValue()
{
short nRet = 0;
int lCount = 0;
int x = 0;
//add some values to the element
//note, this will only work for elements that have a VR that supports multiple
 values
LEADDICOM1.EnableMethodErrors
 = false;
LEADDICOM1.StringValueCount
 = 3;
LEADDICOM1.set_StringValues(0,
 System.Convert.ToString(3.45));
LEADDICOM1.set_StringValues(1,
 System.Convert.ToString(9.99));
LEADDICOM1.set_StringValues(2,
 System.Convert.ToString(1.11));
nRet = LEADDICOM1.SetConvertValue();
//free the current values
LEADDICOM1.StringValueCount
 = 0;
//now get the values and display them
nRet = LEADDICOM1.GetConvertValue();
if (nRet == 0)
{
lCount = LEADDICOM1.StringValueCount;
Text5.Text = "";
for (x = 0; x < lCount; x++)
{
//display each value on a separate line
Text5.Text = Text5.Text + LEADDICOM1.get_StringValues(x)
 + '\r' + '\n';
}
}
LEADDICOM1.EnableMethodErrors
 = true;
}


GetDateTimeValue Example for C#

Currently no DICOM Tags support the VR that this value requires.


GetDateValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetDateValue()
{
int lCount = 0;
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the Date Value
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, (short)LTDICLib.DicomVRCodeConstants.VR_DA,
 false, 0);
//insert an Date value into the element
LEADDICOM1.DateValueCount
 = 1;
LEADDICOM1.get_DateValues(0).Year
 = 1971;
LEADDICOM1.get_DateValues(0).Month
 = 12;
LEADDICOM1.get_DateValues(0).Day
 = 12;
//set the date
nRet = LEADDICOM1.SetDateValue(1);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.DateValueCount
 = 0;
//free the value
Text1.Visible = true;
Text1.Text = "";
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the value
nRet = LEADDICOM1.GetDateValue(0,
 lCount);
//display the value
Text1.Text = "Year: " + System.Convert.ToString(LEADDICOM1.get_DateValues(0).Year) +
 " Month: " + System.Convert.ToString(LEADDICOM1.get_DateValues(0).Month
 + " Day: " + System.Convert.ToString(LEADDICOM1.get_DateValues(0).Day));
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("wait");
}


GetDoubleValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetDoubleValue()
{
int lCount = 0;
int x = 0;
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the Double Values
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants4.TAG_REFERENCE_PIXEL_PHYSICAL_VALUE_X,
 (short)LTDICLib.DicomVRCodeConstants.VR_FD, false, 0);
Text1.Visible = true;
Text1.Text = "";
//insert some Double values into the element
LEADDICOM1.DoubleValueCount
 = 5;
for (x = 0; x < 5; x++)
{
LEADDICOM1.set_DoubleValues(x,
 10 * x * 199.77);
}
//set the floats
nRet = LEADDICOM1.SetDoubleValue(5);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.DoubleValueCount
 = 0;
//free the values
Text1.Visible = true;
Text1.Text = "";
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the values
nRet = LEADDICOM1.GetDoubleValue(0,
 lCount);
if (nRet == 0)
{
for (x = 0; x < LEADDICOM1.DoubleValueCount;
 x++)
{
//display each value separated by a " X "
Text1.Text = Text1.Text + " X " + System.Convert.ToString(LEADDICOM1.get_DoubleValues(x));
}
}
LEADDICOM1.EnableMethodErrors
 = true;
}


GetElementLevel Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetElementLevel()
{
try
{
int x = 0;
int lLevel = 0;
//Navigate the Data Set as a List, not as a Tree
//Move to the 20th element, and then find that element's level in the Tree
LEADDICOM1.EnableMethodErrors
 = true;
//move to first element in Data Set
LEADDICOM1.MoveFirstElement(false);
//move to the 20th element
for (x = 2; x <= 20; x++)
{
LEADDICOM1.MoveNextElement(false);
}
LEADDICOM1.FindTag((int)LEADDICOM1.get_CurrentElement().Tag);
lLevel = LEADDICOM1.GetElementLevel
 ( ) ;
MessageBox.Show("Element: " + LEADDICOM1.get_CurrentTag().Name
 + " at level " + System.Convert.ToString(lLevel));
return;
}
catch
{
MessageBox.Show("Error");
}
}


GetEncryptionAlgorithmTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetEncryptionAlgorithmTLS ( )
{
if (LEADDICOMNet1.GetEncryptionAlgorithmTLS(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) == (int)LTDNCLib.DicomEncryptionMethod.DICOM_CRYPT_3DES)
MessageBox.Show("Encryption in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_CRYPT_3DES");
}


GetEncryptKeyLengthTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetEncryptKeyLengthTLS ( )
{
MessageBox.Show("Effective key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is " + LEADDICOMNet1.GetEncryptKeyLengthTLS(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA));
}


GetExtendedData Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetExtendedData ( )
{
int x = 0;
int n = 0;
string szOut = null;
object ExtData = null;
object Data = null;
byte[] ttt = new byte[5];
//create the Associate Class as Request LEADDICOMNet1.CreateAssociate(true);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
//add some extended data for the first presentation context
 ttt[0] = 0;
ttt[1] = 1;
ttt[2] = 1;
ttt[3] = 0;
ttt[4] = 1;
ExtData = ttt;
LEADDICOMNet1.SetExtendedData(LEADDICOMNet1.hPDU, 1,
 ref ExtData, 5);
//now, display the information
n = LEADDICOMNet1.GetExtendedDataLength(LEADDICOMNet1.hPDU,
 1);
szOut = "Extended Data" + "\r";
Data = LEADDICOMNet1.GetExtendedData(LEADDICOMNet1.hPDU,
 1);
for (x = 0; x < n; x++)
{
szOut = szOut + System.Convert.ToString(x)
 + " = ";
szOut = szOut + System.Convert.ToString(((byte[])Data)[x])
 + "\r";
}
MessageBox.Show(szOut);
}


GetFloatValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetFloatValue()
{
int lCount = 0;
int x = 0;
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the Float Values
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants4.TAG_TABLE_OF_PARAMETER_VALUES,
 (short)LTDICLib.DicomVRCodeConstants.VR_FL, false, 0);
Text1.Visible = true;
Text1.Text = "";
//insert some float values into the element
LEADDICOM1.FloatValueCount
 = 5;
for (x = 0; x < 5; x++)
{
LEADDICOM1.set_FloatValues(x,
 (float)(x * 1.99));
}
//set the floats
nRet = LEADDICOM1.SetFloatValue(5);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.FloatValueCount
 = 0;
//free the values
Text1.Visible = true;
Text1.Text = "";
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the values
nRet = LEADDICOM1.GetFloatValue(0,
 lCount);
if (nRet == 0)
{
for (x = 0; x < LEADDICOM1.FloatValueCount;
 x++)
{
//display each value separated by a " X "
Text1.Text = Text1.Text + " X " + System.Convert.ToString(LEADDICOM1.get_FloatValues(x));
}
}
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("wait");
}


GetImageInformation Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetImageInformation()
{
string msg = null;
LEADDICOM1.GetImageInformation(0);
msg = "Compression: " + System.Convert.ToString(LEADDICOM1.ImageInfo.Compression) +
 "\r" + "\n";
msg = msg + "Photometric: " + System.Convert.ToString(LEADDICOM1.ImageInfo.Photometric) +
 " - " + LEADDICOM1.ImageInfo.PhotometricString
 + "\r" + "\n";
msg = msg + "Rows x Columns: " + System.Convert.ToString(LEADDICOM1.ImageInfo.Rows) + "
 x " + LEADDICOM1.ImageInfo.Columns
 + "\r" + "\n";
msg = msg + "Bits Allocated: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BitsAllocated)
 + "\r" + "\n";
msg = msg + "Bits Stored: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BitsStored) + "\r"
 + "\n";
msg = msg + "High Bit: " + System.Convert.ToString(LEADDICOM1.ImageInfo.HighBit) + "\r"
 + "\n";
msg = msg + "Pixel Representation: " + System.Convert.ToString(LEADDICOM1.ImageInfo.PixelRepresentation)
 + "\r" + "\n";
msg = msg + "Planar Configuration: " + System.Convert.ToString(LEADDICOM1.ImageInfo.PlanarConfiguration)
 + "\r" + "\n";
msg = msg + "ResolutionX: " + System.Convert.ToString(LEADDICOM1.ImageInfo.ResolutionX) +
 "\r" + "\n";
msg = msg + "ResolutionY: " + System.Convert.ToString(LEADDICOM1.ImageInfo.ResolutionY) +
 "\r" + "\n";
msg = msg + "SmallestImagePixelValue: " + System.Convert.ToString(LEADDICOM1.ImageInfo.SmallestImagePixelValue)
 + "\r" + "\n";
msg = msg + "SmallestImagePixelValueFlag: "
 + LEADDICOM1.ImageInfo.SmallestImagePixelValueFlag
 + "\r" + "\n";
msg = msg + "LargestImagePixelValue: " + System.Convert.ToString(LEADDICOM1.ImageInfo.LargestImagePixelValue)
 + "\r" + "\n";
msg = msg + "LargestImagePixelValueFlag: "
 + LEADDICOM1.ImageInfo.LargestImagePixelValueFlag
 + "\r" + "\n";
msg = msg + "RedEntries: " + System.Convert.ToString(LEADDICOM1.ImageInfo.RedEntries) + "\r"
 + "\n";
msg = msg + "RedFirst: " + System.Convert.ToString(LEADDICOM1.ImageInfo.RedFirst) + "\r"
 + "\n";
msg = msg + "RedBits: " + System.Convert.ToString(LEADDICOM1.ImageInfo.RedBits) + "\r"
 + "\n";
msg = msg + "GreenEntries: " + System.Convert.ToString(LEADDICOM1.ImageInfo.GreenEntries) +
 "\r" + "\n";
msg = msg + "GreenFirst: " + System.Convert.ToString(LEADDICOM1.ImageInfo.GreenFirst) + "\r"
 + "\n";
msg = msg + "GreenBits: " + System.Convert.ToString(LEADDICOM1.ImageInfo.GreenBits) + "\r"
 + "\n";
msg = msg + "BlueEntries: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BlueEntries) +
 "\r" + "\n";
msg = msg + "BlueFirst: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BlueFirst) + "\r"
 + "\n";
msg = msg + "BlueBits: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BlueBits) + "\r"
 + "\n";
msg = msg + "PaletteEntries: " + System.Convert.ToString(LEADDICOM1.ImageInfo.PaletteEntries)
 + "\r" + "\n";
msg = msg + "PaletteFirst: " + System.Convert.ToString(LEADDICOM1.ImageInfo.PaletteFirst) +
 "\r" + "\n";
msg = msg + "BitsPerPixel: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BitsPerPixel) +
 "\r" + "\n";
msg = msg + "Gray: " + LEADDICOM1.ImageInfo.Gray
 + "\r" + "\n";
msg = msg + "Frames: " + System.Convert.ToString(LEADDICOM1.ImageInfo.Frames) + "\r"
 + "\n";
MessageBox.Show(msg);
}


GetInfoDS Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetInfoDS()
{
try
{
string szClass = null;
string szFlags = null;
LEADDICOM1.EnableMethodErrors
 = true;
LEADDICOM1.GetInfoDS();
LEADDICOM1.FindClassIOD(LEADDICOM1.InfoClass);
szClass = LEADDICOM1.get_CurrentIOD().Name;
szFlags = System.Convert.ToString(LEADDICOM1.InfoFlags,
 16).ToUpper();
MessageBox.Show("Class: " + szClass + '\n' + '\r' + "Flags:
 " + szFlags);
return;
}
catch
{
MessageBox.Show("Error");
}
}


GetIntegrityAlgorithmTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetIntegrityAlgorithmTLS ( )
{
if (LEADDICOMNet1.GetIntegrityAlgorithmTLS(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) == (int)LTDNCLib.DicomMACTypeConstants.DICOM_MAC_SHA1)
MessageBox.Show("Message authentication code in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1");
}


GetKeyExchangeAlgorithmTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetKeyExchangeAlgorithmTLS ( )
{
if (LEADDICOMNet1.GetKeyExchangeAlgorithmTLS(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) == (int)LTDNCLib.DicomMACTypeConstants.DICOM_MAC_SHA1)
MessageBox.Show("Key exchange in DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is DICOM_MAC_SHA1");
}


GetLongValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetLongValue()
{
int lCount = 0;
int x = 0;
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the Long Values
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_OFFSET_FIRST_ROOT_DIRECTORY,
 (short)LTDICLib.DicomVRCodeConstants.VR_UL, false, 0);
Text1.Visible = true;
Text1.Text = "";
//insert some long values into the element
LEADDICOM1.LongValueCount
 = 5;
for (x = 0; x < 5; x++)
{
LEADDICOM1.set_LongValues(x,
 (int)(x * 100000));
}
//set the longs
nRet = LEADDICOM1.SetLongValue(5);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.LongValueCount
 = 0;   //free the values
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the values
nRet = LEADDICOM1.GetLongValue(0,
 lCount);
if (nRet == 0)
{
for (x = 0; x < LEADDICOM1.LongValueCount;
 x++)
{
//display each value
 separated by a " X "
Text1.Text = Text1.Text
 + " X " + System.Convert.ToString(LEADDICOM1.get_LongValues(x));
}
}
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("wait");
}


GetModuleCount Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetModuleCount ( )
{
int lCount = 0;
lCount = LEADDICOM1.GetModuleCount();
MessageBox.Show("Module Count: " + System.Convert.ToString(lCount));
}


GetMutualAuthKeyLengthTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetMutualAuthKeyLengthTLS ( )
{
MessageBox.Show("Mutual authentication key length for DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA is " + LEADDICOMNet1.GetMutualAuthKeyLengthTLS(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA));
}


GetPeerAuthDataISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetPeerAuthDataISCL ( )
{
object buf = null;
int nLen = 0;
LEADDICOMNet1.GetPeerAuthDataISCL(LEADDICOMNet1.hNet,
 ref buf, ref nLen);
MessageBox.Show("1st byte of data = " + ((byte[])buf)[0] + ",
 last byte of data = " + ((byte[])buf)[nLen - 1]);
}


GetPeerEncryptionISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetPeerEncryptionISCL ( )
{
string strEncr = null;
strEncr = "Unknown";
if (LEADDICOMNet1.GetPeerEncryptionISCL(LEADDICOMNet1.hNet)
 == (int)
LTDNCLib.DicomEncryptionMode.DICOM_ISCL_ENCRYPT_NONE)
 strEncr = "None";
else if (LEADDICOMNet1.GetPeerEncryptionISCL(LEADDICOMNet1.hNet)
 == (int)
LTDNCLib.DicomEncryptionMode.DICOM_ISCL_ENCRYPT_DESCBC)
 strEncr = "DES algorithm, cipher block chaining mode";
MessageBox.Show("Sender tried to send a message
 with encryption algorithm: " + strEncr);
}


GetPeerMACISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetPeerMACISCL ( )
{
string strMAC = null;
strMAC = "SHA algorithm";
if (LEADDICOMNet1.GetPeerMACISCL(LEADDICOMNet1.hNet)
 == (int)
LTDNCLib.DicomMsgAuthCode.DICOM_ISCL_MAC_NONE) strMAC = "no message
 authentication code";
else if (LEADDICOMNet1.GetPeerMACISCL(LEADDICOMNet1.hNet)
 == (int)
LTDNCLib.DicomMsgAuthCode.DICOM_ISCL_MAC_MD5) strMAC = "MD5 algorithm";
MessageBox.Show("Sender tried to send a message with MAC " +
 strMAC);
}


GetPeerRequestedMessageLengthISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetPeerRequestedMessageLengthISCL ( )
{
MessageBox.Show("Sender tried to send message with length" + LEADDICOMNet1.GetPeerRequestedMessageLengthISCL(LEADDICOMNet1.hNet));
}


GetPresentationAbstract Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetPresentationAbstract ()
{
const string UID_CR_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.1";
// Computed Radiography Image Storage
int x = 0;
string Out = null;
string result = null;
short nID = 0;
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(true);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
//get abstracts for each Presentation Context
Out = "";
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
result = LEADDICOMNet1.GetPresentationAbstract(LEADDICOMNet1.hPDU,
 nID);
Out = Out + result;
Out = Out + "\r";
}
MessageBox.Show(Out);
//change the abstracts
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
LEADDICOMNet1.SetPresentationAbstract(LEADDICOMNet1.hPDU,
 nID, UID_CR_IMAGE_STORAGE);
}
//redisplay
Out = "";
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
Out = Out + LEADDICOMNet1.GetPresentationAbstract(LEADDICOMNet1.hPDU,
 nID);
Out = Out + "\r";
}
MessageBox.Show(Out);
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU);
}


GetPresentationCount Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetPresentationCount ( )
{
const string UID_CT_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.2";
// Computed Tomography Image Storage
int x = 0 ;
int id = 0;
int maxid = 0;
string Out = null;
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(true);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
//get current id's and display them
Out = "";
maxid = 0;
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
id = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
Out = Out + id;
Out = Out + "\r";
//store the highest id
if (id > maxid)
maxid = id;
}
MessageBox.Show(Out);
id = maxid + 2;
//id must be unique and odd number
//change the some ids and then display them all
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
LEADDICOMNet1.SetPresentationID(LEADDICOMNet1.hPDU,
 x, (short)id);
id = id + 2;      //id
 must be odd number
}
Out = "";
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
Out = Out + LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
Out = Out + "\r";
}
MessageBox.Show(Out);
//add a presentation context
Out = "";
LEADDICOMNet1.AddPresentation(LEADDICOMNet1.hPDU,
 1, (short)LTDNCLib.AssociateAcceptConstants.PDU_ACCEPT_RESULT_SUCCESS,
 UID_CT_IMAGE_STORAGE);
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
Out = Out + LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
Out = Out + "\r";
}
MessageBox.Show(Out);
//delete the one we added
Out = "";
LEADDICOMNet1.DeletePresentation(LEADDICOMNet1.hPDU,
 1);
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
Out = Out + LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
Out = Out + "\r";
}
MessageBox.Show(Out);
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU);
}


GetPresentationResult Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetPresentationResult ()
{
int x = 0;
string Out = null;
short result = 0;
short nID = 0;
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(true);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
//get current results for each Presentation Context
Out = "";
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
result = LEADDICOMNet1.GetPresentationResult(LEADDICOMNet1.hPDU,
 nID);
Out = Out + result;
Out = Out + "\r";
}
MessageBox.Show(Out);
//change all results to 1
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
LEADDICOMNet1.SetPresentationResult(LEADDICOMNet1.hPDU,
 nID, 1);
}
//redisplay
Out = "";
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
Out = Out + LEADDICOMNet1.GetPresentationResult(LEADDICOMNet1.hPDU,
 nID);
Out = Out + "\r";
}
MessageBox.Show(Out);
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU);
}


GetSendQueueSize Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetSendQueueSize ( )
{
//display queue size
MessageBox.Show(System.Convert.ToString(LEADDICOMNet1.GetSendQueueSize(LEADDICOMNet1.hNet)),
 "SendQueueSize");
}


GetServer Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetReceiveAssociateRequest_XXX(int
 hNet, int hPDU)
{
int hServer = 0;
string szServer = null;
int lPort = 0;
hServer = LEADDICOMNet1.GetServer(hNet);
if (hServer != 0)
{
szServer = LEADDICOMNet1.GetHostAddress(hServer);
lPort = LEADDICOMNet1.GetHostPort(hServer);
MessageBox.Show("Server = " + szServer + " Port = "
 + System.Convert.ToString(lPort));
}
}


GetShortValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetShortValue()
{
int lCount = 0;
int x = 0;
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the Short Values
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_RECORD_IN_USE_FLAG, (short)LTDICLib.DicomVRCodeConstants.VR_US,
 false, 0);
Text1.Visible = true;
Text1.Text = "";
//insert some short values into the element
LEADDICOM1.ShortValueCount
 = 5;
for (x = 0; x < 5; x++)
{
LEADDICOM1.set_ShortValues(x,
 (short) (x * 100));
}
//set the shorts
nRet = LEADDICOM1.SetShortValue(5);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.ShortValueCount
 = 0;
//free the values
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the values
nRet = LEADDICOM1.GetShortValue(0,
 lCount);
if (nRet == 0)
{
for (x = 0; x < LEADDICOM1.ShortValueCount;
 x++)
{
//display each value separated by a " X "
Text1.Text = Text1.Text + " X " + System.Convert.ToString(LEADDICOM1.get_ShortValues(x));
}
}
MessageBox.Show("wait");
LEADDICOM1.EnableMethodErrors
 = true;
}


GetStatusISCL Example for C#

// In this example, assume an error occurs in the NetReceive
 event. The code to
// determine why this happened should look like this:
//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetReceive(int hNet, int nStatus, short nType,
 object pData, int lSize)
{
int nStatusISCL = 0;
nStatusISCL = LEADDICOMNet1.GetStatusISCL(hNet);
if (nStatus == (int)LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_ISCL_DECRYPT)
{
if (nStatusISCL == 24)
{
// error decrypting message data
MessageBox.Show("Error decrypting message");
}
if (nStatusISCL == 25)
{
// error decrypting MAC code
MessageBox.Show("Error decrypting MAC code");
}
}
}


GetStringValue Example for C#

//This example uses the predefined variable “Text5” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetStringValue()
{
int lCount = 0;
int x = 0;
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the String Values
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_IMAGE_TYPE, (short)LTDICLib.DicomVRCodeConstants.VR_CS,
 false, 0);
//insert some string values into the element
LEADDICOM1.StringValueCount
 = 5;
for (x = 0; x < 5; x++)
{
LEADDICOM1.set_StringValues(x,
 "String #" + System.Convert.ToString(x + 1));
}
//set the strings
nRet = LEADDICOM1.SetStringValue(5);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.StringValueCount
 = 0; //free the values
Text5.Visible = true;
Text5.Text = "";
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the values
nRet = LEADDICOM1.GetStringValue(0, lCount);
if (nRet == 0)
{
for (x = 0; x < LEADDICOM1.StringValueCount;
 x++)
{
//display each value separated on a separate line
Text5.Text = Text5.Text + '\r' + '\n' + System.Convert.ToString(LEADDICOM1.get_StringValues(x));
}
}
LEADDICOM1.EnableMethodErrors
 = true; MessageBox.Show("wait");
}


GetTagCount Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetTagCount ()
{
int lCount = 0;
lCount = LEADDICOM1.GetTagCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " Tag Items.");
}


GetTimeValue Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetTimeValue()
{
int lCount = 0;
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();
//insert a new element for the Time Value
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_TIME, (short)LTDICLib.DicomVRCodeConstants.VR_TM,
 false, 0);
//insert an Time value into the element
LEADDICOM1.TimeValueCount
 = 1;
LEADDICOM1.get_TimeValues(0).Hours
 = 12;
LEADDICOM1.get_TimeValues(0).Minutes
 = 25;
LEADDICOM1.get_TimeValues(0).Seconds
 = 33;
LEADDICOM1.get_TimeValues(0).Fractions
 = 50;
//set the time
nRet = LEADDICOM1.SetTimeValue(1);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
LEADDICOM1.TimeValueCount
 = 0; //free the value
Text1.Visible = true;
Text1.Text = "";
//get the value count
lCount = LEADDICOM1.GetValueCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " values!");
//get the value
nRet = LEADDICOM1.GetTimeValue(0,
 lCount);
//display the value Text1.Text = "Hours: " + System.Convert.ToString(LEADDICOM1.get_TimeValues(0).Hours)
 + " Minutes: " + System.Convert.ToString(LEADDICOM1.get_TimeValues(0).Minutes
 + " Seconds: " + System.Convert.ToString(LEADDICOM1.get_TimeValues(0).Seconds)
 + " Fractions: " + System.Convert.ToString(LEADDICOM1.get_TimeValues(0).Fractions));
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("wait");
}


Getting an overlay bitmap list Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable “LEADRasterView1” of type “AxLEADRasterView”
 from “"LEADTOOLS Toolkit”.
private void GettingOverlayBitmapList()
{
short iRet = 0;
LTRASTERPROCLib.LEADOverlayAttributes OverlayAttributesDS = null;
int GroupNumber = 0;
bool bIsOverlayInDataSet = false;
string cs = null;
iRet = LEADDICOM1.GetOverlayAttributes(0,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
OverlayAttributesDS = LEADDICOM1.OverlayAttributes;
cs = LEADDICOM1.get_OverlayActivationLayer(0);
MessageBox.Show(cs);
iRet = LEADDICOM1.GetOverlayBitmapList(0,
 0, OverlayAttributesDS.NumberFramesInOverlay, 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
LEADRasterView1.Raster.BitmapList
 = LEADDICOM1.OverlayBitmapList;
}


Getting and setting a non-linear VOI LUT Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void GettingSettingNonlinearVOILUT()
{
// This example will add a new VOI LUT to the dataset
 or
// replace the existing one(s)
LTDICLib.LVOILUTAttributes VOILUTAttributes = null;
short iRet = 0;
int lVOILUTCount = 0;
int lLUTIndex = 0;
int lNewLUTIndex = 0;
int lDataSize = 0;
byte[] LUTData = null ;
bool bAddVOILUT = false;
bAddVOILUT = true;
lVOILUTCount = 0;
lNewLUTIndex = 0;
// Get the number of VOI LUT(s) in the file
lVOILUTCount = LEADDICOM1.VOILUTCount;
if (lVOILUTCount > 0)
{
object objLUTData = null ;
// Get he attributes of the first VOI
 LUT
iRet = LEADDICOM1.GetVOILUTAttributes(0,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
VOILUTAttributes = LEADDICOM1.VOILUTAttributes;
lDataSize = VOILUTAttributes.LUTDescriptorNumberOfEntries;
// Get the LUT data
LUTData = new byte [lDataSize];
objLUTData = LUTData ;
iRet = LEADDICOM1.GetVOILUTData(0,
 ref objLUTData, 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Remap the data
for (lLUTIndex = 0; lLUTIndex <
 lDataSize; lLUTIndex++)
{
LUTData[lLUTIndex]
 = (byte)(LUTData[lLUTIndex] / 2);
}
}
else
{
VOILUTAttributes = LEADDICOM1.VOILUTAttributes;
// Define our own LUT
VOILUTAttributes.LUTDescriptorFirstMapped
 = 0;
VOILUTAttributes.LUTDescriptorEntryBits
 = 16;
VOILUTAttributes.LUTDescriptorNumberOfEntries
 = 0X10000;
lDataSize = VOILUTAttributes.LUTDescriptorNumberOfEntries;
LUTData = new byte [lDataSize];
for (lLUTIndex = 0; lLUTIndex <
 lDataSize; lLUTIndex++)
{
LUTData[lLUTIndex]
 = (byte)lLUTIndex;
}
}
lNewLUTIndex = lVOILUTCount;
if (bAddVOILUT == false)
{
// Delete existing LUT
iRet = LEADDICOM1.DeleteVOILUT(0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
lNewLUTIndex = 0;
}
// Set the new LUT
iRet = LEADDICOM1.SetVOILUT(lNewLUTIndex,
 LUTData, 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
}


Getting and setting window center and width Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void GettingAndSettingWindowCenterAndWidth()
{
// This example will add a new "Window Width" and
// "Window Center" to the dataset , or replace
// the existing one(s)
bool bAddWindow = false;
LTDICLib.LWindowAttributes WindowAttributes = null;
short iRet = 0;
int lWindowCount = 0;
int lWindowIndex = 0;
short iBitsStored = 0;
lWindowCount = 0;
lWindowIndex = 0;
bAddWindow = true;
iBitsStored = 12;
lWindowCount = LEADDICOM1.WindowCount;
if (lWindowCount > 0)
{
iRet = LEADDICOM1.GetWindowAttributes(0, 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
WindowAttributes = LEADDICOM1.WindowAttributes;
// Half the width for the first window
WindowAttributes.WindowWidth = WindowAttributes.WindowWidth / 2;
WindowAttributes.WindowCenter = WindowAttributes.WindowCenter / 2;
}
else
{
// This represents an identity VOI LUT transformation in the case
// where no Modality LUT is specified and the stored pixel data are
// iBitsStored bit unsigned integers.
WindowAttributes = LEADDICOM1.WindowAttributes;
WindowAttributes.WindowWidth = (System.Math.Pow(2, iBitsStored));
WindowAttributes.WindowCenter = (System.Math.Pow(2, (iBitsStored - 1)));
WindowAttributes.WindowCWExplaination = "";
}
lWindowIndex = lWindowCount;
if (bAddWindow == false)
{
// Delete the existing window(s)
iRet = LEADDICOM1.DeleteWindow(0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
lWindowIndex = 0;
}
// Add the new window
iRet = LEADDICOM1.SetWindowAttributes(lWindowIndex,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
}


Getting modality LUT data and attributes Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void GettingModalityLUTDataAndAttributes()
{
// This example will retrieve the LUT Data (0028,3006)
// under the Modality LUT Sequence (0028,3000)
short Ret = 0;
// Object that will hold modality LUT attributes
LTDICLib.LModalityLUTAttributes MLUTAttributes = null;
// Get modality LUT attributes
Ret = LEADDICOM1.GetModalityLUTAttributes(0);
if (Ret != 0)
{
MessageBox.Show("error");
return;
}
MLUTAttributes = LEADDICOM1.ModalityLUTAttributes;
// If there is no modality LUT sequence then there is no data !
if (MLUTAttributes.IsModalityLUTSequence == false)
{
MessageBox.Show("No LUT");
return;
}
object Data = null;    //
Retrieve the LUT Data (0028,3006) LEADDICOM1.
// Retrieve the
LUT Data (0028,3006) LEADDICOM1.GetModalityLUTData(ref
 Data, 0);
// Do something with the data
}


Getting palette color LUT data and attributes Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void GettingPaletteColorLUTDataAndAttributes()
{
// This example will retrieve the data under
// "Red Palette Color Lookup Table Data"(0028,1201)
// element and if the data is segmented it will get the
 data under
// "Segmented Red Palette Color Lookup Table Data"
 (0028,1221) and decode it
object LUTData = null;
// Object that will hold Palette Color LUT attributes
LTDICLib.LPaletteColorLUTAttributes PaletteColorLUTAttributes
 = null;
short iRet = 0;

// Get "Palette Color Lookup Table" attributes
iRet = LEADDICOM1.GetPaletteColorLUTAttributes(0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
PaletteColorLUTAttributes = LEADDICOM1.PaletteColorLUTAttributes;
// Retrieve "Red Palette Color Lookup Table Data"
// This function will automatically decode the LUT data
// if it was segmented
iRet = LEADDICOM1.GetPaletteColorLUTData(ref
 LUTData, LTDICLib.DicomPaletteColorLUTConstants.DICOM_PALETTE_COLOR_LUT_TYPE_RED,
 0);
//do something with vData
//...
}


Getting the attributes and bitmaps for all overlays inside a DICOM dataset Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable “LEADRasterView1” of type “AxLEADRasterView”
 from “LEADTOOLS Toolkit”.
//This example uses the predefined variable “LEADRasterView2” of type “AxLEADRasterView”
 from “LEADTOOLS Toolkit”.
private void GettingAttributesAndBitmapsForAllOverlaysInsideDICOMDataset()
{
// This example will extract the overlays from a
// DICOM dataset and associate them with a bitmap,
// the bitmap is assumed to be extracted from the
// same DICOM dataset.
short iRet = 0;
int lOverlayCount = 0;
int lOverlayIndex = 0;
LTRASTERPROCLib.LEADOverlayAttributes OverlayAttributesDS
 = null;
LTRASTERPROCLib.LEADOverlayAttributes OverlayAttributesRaster
 = null;
LTRASTERPROCLib.LEADRasterProcess RasterProcess = new
 LTRASTERPROCLib.LEADRasterProcess();
int GroupNumber = 0;
bool bIsOverlayInDataSet = false;
short iLEADOverlayIndex = 0;
int lFlags = 0;
int crColor = 0;
lOverlayCount = 0;
lOverlayIndex = 0;
GroupNumber = 0;
bIsOverlayInDataSet = false;
iLEADOverlayIndex = 0;
lFlags = 0;
LEADDICOM1.GetBitmapValue(0,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_BGRORGRAY, 0);
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap;
// Do we have any overlays at all?
lOverlayCount = LEADDICOM1.OverlayCount;
if (lOverlayCount == 0)
return;
// Go through the overlays one by one
lOverlayIndex = 0;
iLEADOverlayIndex = 0;
// Reset the overlay bitmap
if (LEADRasterView2.Raster.Bitmap > 0)
LEADRasterView2.Raster.Free();
LEADRasterView2.Raster.CreateBitmap(1, 1, 1);
while (lOverlayIndex < lOverlayCount)
{
NEXTINDEX: GroupNumber = 0;
bIsOverlayInDataSet = false;
lFlags = 0;
// Get the attributes of this overlay
iRet = LEADDICOM1.GetOverlayAttributes(lOverlayIndex,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
GroupNumber = LEADDICOM1.get_OverlayGroupNumber(lOverlayIndex,
 0);
bIsOverlayInDataSet = LEADDICOM1.IsOverlayInDataSet(lOverlayIndex,
 0);
if (bIsOverlayInDataSet == false)
{
lOverlayIndex = lOverlayIndex
 + 1;
goto NEXTINDEX;
}
OverlayAttributesDS = LEADDICOM1.OverlayAttributes;
OverlayAttributesRaster = RasterProcess.OverlayAttributes;
// Auto paint and process overlays
lFlags = OverlayAttributesDS.Flags;
lFlags = lFlags | (int)LTRASTERPROCLib.OverlayAttributesFlagsConstants.OVERLAY_AUTOPAINT
 | (int)LTRASTERPROCLib.OverlayAttributesFlagsConstants.OVERLAY_AUTOPROCESS;
OverlayAttributesRaster.Flags = lFlags;
OverlayAttributesRaster.OriginX = OverlayAttributesDS.OriginX;
OverlayAttributesRaster.OriginY = OverlayAttributesDS.OriginY;
crColor = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.White);
OverlayAttributesRaster.Color = System.Convert.ToUInt32(crColor);
OverlayAttributesRaster.BitPosition
 = OverlayAttributesDS.BitPosition;
OverlayAttributesRaster.Rows = OverlayAttributesDS.Rows;
OverlayAttributesRaster.Columns = OverlayAttributesDS.Columns;
OverlayAttributesRaster.Type = OverlayAttributesDS.Type;
OverlayAttributesRaster.BitsAllocated
 = OverlayAttributesDS.BitsAllocated;
OverlayAttributesRaster.Subtype = OverlayAttributesDS.Subtype;
OverlayAttributesRaster.Label = OverlayAttributesDS.Label;
OverlayAttributesRaster.ROIArea = OverlayAttributesDS.ROIArea;
OverlayAttributesRaster.ROIMean = OverlayAttributesDS.ROIMean;
OverlayAttributesRaster.ROIStandardDeviation
 = OverlayAttributesDS.ROIStandardDeviation;
OverlayAttributesRaster.NumberFramesInOverlay
 = OverlayAttributesDS.NumberFramesInOverlay;
OverlayAttributesRaster.ImageFrameOrigin
 = OverlayAttributesDS.ImageFrameOrigin;
OverlayAttributesRaster.ActivationLayer
 = OverlayAttributesDS.ActivationLayer;
OverlayAttributesRaster.Description
 = OverlayAttributesDS.Description;
iRet = RasterProcess.SetOverlayAttributes(LEADRasterView1.Raster,
iLEADOverlayIndex, 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Is the overlay embedded inside the
 image data ?
lFlags = OverlayAttributesDS.Flags;
if ((lFlags & (int)LTRASTERPROCLib.OverlayAttributesFlagsConstants.OVERLAY_USEBITPLANE)
 != 0)
{
// Add this overlay
 to the list of overlays in the bitmap handle
iRet = RasterProcess.SetOverlayAttributes(LEADRasterView1.Raster,
 iLEADOverlayIndex, (int)(LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_FLAGS
 | LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_BITINDEX
 | LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_ORIGIN
 | LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_DICOM |
 LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_COLOR));
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Make sure to extract
 the overlay data from the image data
iRet = RasterProcess.UpdateOverlayBits(LEADRasterView1.Raster,
 iLEADOverlayIndex, (int)LTRASTERPROCLib.OverlayBitsConstants.SETOVERLAYBITS_FROMBITMAP);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// The overlay is
 inside overlay data
}
else
{
// Add this overlay
 to the list of overlays in the bitmap handle
iRet = RasterProcess.SetOverlayAttributes(LEADRasterView1.Raster,
 iLEADOverlayIndex, (int)(LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_FLAGS
 | LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_ORIGIN
 | LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_DICOM |
 LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_COLOR));
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Get the overlay
 bitmap from the overlay data
iRet = LEADDICOM1.GetOverlayBitmap(lOverlayIndex,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// store it temp.
 in RasterView2
if (LEADRasterView2.Raster.Bitmap
 > 0)
LEADRasterView2.Raster.Free();
LEADRasterView2.Raster.Bitmap
 = LEADDICOM1.OverlayBitmap;
// Set the bitmap
 for this overlay inside the
// list of overlays
 we have in the bitmap handle
iRet = RasterProcess.SetOverlayBitmap(LEADRasterView1.Raster,
 iLEADOverlayIndex, LEADRasterView2.Raster, (int)LTRASTERPROCLib.OverlayConstants.OVERLAY_COPY);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
}
lOverlayIndex = lOverlayIndex + 1;
iLEADOverlayIndex = (short)(iLEADOverlayIndex
 + 1);
}
}


GetTransferCount Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetTransferCount ()
{
const string UID_IMPLICIT_VR_LITTLE_ENDIAN = "1.2.840.10008.1.2";   //
 Implicit VR Little Endian
const string UID_EXPLICIT_VR_BIG_ENDIAN = "1.2.840.10008.1.2.2";   //
 Explicit VR Big Endian int x = 0;
string Out = null;
string result = null;
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(true);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
//display each Transfer Syntax for the first Presentation
 Context
Out = "";
for (x = 0; x < LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0)); x++)
{
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0), x);
Out = Out + result;
Out = Out + "\r";
}
MessageBox.Show(Out);
//add a transfer syntax
LEADDICOMNet1.AddTransferSyntax(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0), UID_IMPLICIT_VR_LITTLE_ENDIAN);
//display each Transfer Syntax for the first Presentation
 Context
Out = "";
for (x = 0; x < LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0)); x++)
{
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0), x);
Out = Out + result;
Out = Out + "\r";
}
MessageBox.Show(Out);
//change them
for (x = 0; x < LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0)); x++)
{
LEADDICOMNet1.SetTransferSyntax(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0), x, UID_EXPLICIT_VR_BIG_ENDIAN);
}
//display each Transfer Syntax for the first Presentation
Context Out = "";
for (x = 0; x < LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0)); x++)
{
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0), x);
Out = Out + result;
Out = Out + "\r";
}
MessageBox.Show(Out);
//delete the last one
LEADDICOMNet1.DeleteTransferSyntax(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0), LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0)) - 1);
//display each Transfer Syntax for the first Presentation
 Context Out = "";
for (x = 0; x < LEADDICOMNet1.GetTransferCount(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0)); x++)
{
result = LEADDICOMNet1.GetTransferSyntax(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 0), x);
Out = Out + result;
Out = Out + "\r";
}
MessageBox.Show(Out);
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU);
}


GetUIDCount Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetUIDCount ( )
{
int lCount = 0;
lCount = LEADDICOM1.GetUIDCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " UID Items.");
}


GetUserInfoCount Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestGetUserInfoCount ()
{
int x = 0;
int y = 0;
short nType = 0;
int nLen = 0;
object pData = null;
string Out = null;
object test = null ;
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(true);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
//get current user info types, lengths, and data then
 display them
Out = "";
if (LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU)
 > 0)
{
for (x = 0; x < LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU);
 x++)
{
nType = LEADDICOMNet1.GetUserInfoType(LEADDICOMNet1.hPDU,
 x);
Out = Out + "Type:
 " + System.Convert.ToString(nType);
nLen = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU,
 x);
Out = Out + "
 Length: " + System.Convert.ToString(nLen);
pData = LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU,
 x);
Out = Out + "
 Data: ";
for (y = 0; y <
 nLen; y++)
{
Out
 = Out + (char)(((byte[])pData)[y]);
}
Out = Out + "\r";
}
}
else
Out = "None";
MessageBox.Show(Out);
//add a user info item item
Out = "";
test = "just a test";
nLen = ((string)test).Length;
LEADDICOMNet1.AddUserInfo(LEADDICOMNet1.hPDU,
 99, ref test, (short)((string)test).Length);
Out = "";
if (LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU)
 > 0)
{
for
 (x = 0; x < LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU);
 x++)
{
nType
 = LEADDICOMNet1.GetUserInfoType(LEADDICOMNet1.hPDU,
 x);
Out
 = Out + "Type: " + System.Convert.ToString(nType);
nLen
 = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x);
Out
 = Out + " Length: " + System.Convert.ToString(nLen);
pData
 = LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU,
 x);
Out
 = Out + " Data: ";
for
 (y = 0; y < nLen; y++)
{
Out
 = Out + (char)(((byte[])pData)[y]);
}
Out
 = Out + "\r";
}
}
else
Out
 = "None";
MessageBox.Show(Out);
//for each user info
 item, change the data
test = "a second
 test";
for (x = 0; x <
 LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU);
 x++)
{
nType
 = LEADDICOMNet1.GetUserInfoType(LEADDICOMNet1.hPDU,
 x);
LEADDICOMNet1.SetUserInfo(LEADDICOMNet1.hPDU,
 x, nType, ref test, (short)((string)test).Length);
}
Out = "";
if (LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU)
 > 0)
{
for
 (x = 0; x < LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU);
 x++)
{
nType
 = LEADDICOMNet1.GetUserInfoType(LEADDICOMNet1.hPDU,
 x);
Out
 = Out + "Type: " + System.Convert.ToString(nType);
nLen
 = LEADDICOMNet1.GetUserInfoLength(LEADDICOMNet1.hPDU, x);
Out
 = Out + " Length: " + System.Convert.ToString(nLen);
pData
 = LEADDICOMNet1.GetUserInfoData(LEADDICOMNet1.hPDU,
 x);
Out
 = Out + " Data: ";
for
 (y = 0; y < nLen; y++)
{
Out
 = Out + (char)(((byte[])pData)[y]);
}
Out
 = Out + "\r";
}
}
else
Out
 = "None";
MessageBox.Show(Out);
//delete
 the one we added
LEADDICOMNet1.DeleteUserInfo(LEADDICOMNet1.hPDU,
 LEADDICOMNet1.GetUserInfoCount(LEADDICOMNet1.hPDU)
 - 1);
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU);
}


GetVRCount Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetVRCount ( )
{
int lCount = 0;
lCount = LEADDICOM1.GetVRCount();
MessageBox.Show("There are " + System.Convert.ToString(lCount)
 + " VR Items.");
}


IncludeVolatile Example for C#

//This example uses the predefined variable “List1” of type
 “ListBox” from “.NET Framework”.
//This example uses the predefined variable “List2” of type “ListBox” from
 “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestIncludeVolatile ( )
{
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//list all elements
LEADDICOM1.IncludeVolatile
 = true;
nRet = LEADDICOM1.MoveFirstElement(false);
while (nRet == 0)
{
List1.Items.Add(System.Convert.ToString(LEADDICOM1.get_CurrentElement().Tag));
nRet = LEADDICOM1.MoveNextElement(false);
}
MessageBox.Show("Element Count = " + System.Convert.ToString(List1.Items.Count));
//list only non-volatile elements
LEADDICOM1.IncludeVolatile
 = false;
nRet = LEADDICOM1.MoveFirstElement(false);
while (nRet == 0)
{
List2.Items.Add(System.Convert.ToString(LEADDICOM1.get_CurrentElement().Tag));
nRet = LEADDICOM1.MoveNextElement(false);
}
MessageBox.Show("Non Volatile Element Count = " + System.Convert.ToString(List2.Items.Count));
}


InitCS Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInitCS ( )
{
string Out = null;
//create a data set as a command set
LEADDICOM1.InitCS((short)LTDICLib.DicomCommandSetConstants.COMMAND_C_STORE,
 true);
//gets information about the command set
LEADDICOM1.GetInfoCS();
Out = "Command: " + System.Convert.ToString(LEADDICOM1.InfoCommand);
Out = Out + "\r";
Out = Out + "Request: " + System.Convert.ToString(LEADDICOM1.InfoRequest);
MessageBox.Show(Out);
}


InitDS Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInitDS ( )
{
//init a DS with default options
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, (short)LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + (short)LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT + (short)LTDICLib.DicomDataSetFlags.DS_BIG_ENDIAN);
}


InsertBitmapListValue Example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//This example uses the predefined variable “LEADRasterView2” of type “AxLEADRasterView”
 from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertBitmapListValue()
{
short nRet = 0;
LTRASTERIOLib.LEADRasterIO IO = new LTRASTERIOLib.LEADRasterIO();
LTRASTERPROCLib.LEADRasterProcess Process = new LTRASTERPROCLib.LEADRasterProcess();
LEADDICOM1.EnableMethodErrors
 = false;
//move to the first image element and delete what's there
nRet = LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false);
nRet = LEADDICOM1.DeleteElement();
nRet = LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, (short)LTDICLib.DicomVRCodeConstants.VR_OB,
 false, 0);
//load an image
IO.Load(LEADRasterView1.Raster, "d:\\lead14\\dist\\images\\image1.cmp",
 0, 1, 1);
MessageBox.Show("Image loaded from File - Wait");
//create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem(0,    LEADRasterView1.Raster.Bitmap);
Process.Flip(LEADRasterView1.Raster);
LEADRasterView2.Raster.InsertBitmapListItem(1, LEADRasterView1.Raster.Bitmap);
Process.Reverse(LEADRasterView1.Raster);
LEADRasterView2.Raster.InsertBitmapListItem(2, LEADRasterView1.Raster.Bitmap);
//insert the image list into the element
nRet = LEADDICOM1.InsertBitmapListValue(LEADRasterView2.Raster.BitmapList,
 0, (int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB,
 0, 0, 0);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
MessageBox.Show("ImageList inserted into Data Set - Wait");
}


InsertBitmapValue Example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertBitmapValue ( )
{
int lCount = 0;
short nRet = 0;
LTRASTERIOLib.LEADRasterIO IO = new LTRASTERIOLib.LEADRasterIO();
LTRASTERPROCLib.LEADRasterProcess Process = new LTRASTERPROCLib.LEADRasterProcess();
LEADDICOM1.EnableMethodErrors
 = false;
//move to the first image element and delete what's there
nRet = LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false);
nRet = LEADDICOM1.DeleteElement();
nRet = LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, (short)LTDICLib.DicomVRCodeConstants.VR_OB,
 false, 0);
//load an image
IO.Load(LEADRasterView1.Raster, "d:\\lead14\\dist\\images\\image1.cmp",
 0, 1, 1);
MessageBox.Show("Image loaded from File - Wait");
lCount = LEADDICOM1.GetBitmapCount();
//insert some images
nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap,
 lCount, (int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB,
 0, 0, 0);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
Process.Flip(LEADRasterView1.Raster);
nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap,
 lCount + 1, (int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB,
 0, 0, 0);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
Process.Reverse(LEADRasterView1.Raster);
nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap,
 lCount + 2, (int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB,
 0, 0, 0);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
MessageBox.Show("Images inserted - Wait");
}


InsertDS Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
//LEADDICOM2 is a DICOM Dataset defined outside this method
private void TestInsertDS ( )
{
//find the first PATIENT KEY, copy it to a new
//DS, and then save it to a file
LEADDICOM1.FindFirstKey("PATIENT",
 false);
LEADDICOM2.ResetDS();
LEADDICOM2.InsertDS(LEADDICOM1.hDicomDS, LEADDICOM1.get_CurrentElement().hElement);
LEADDICOM2.SaveDS("d:\\temp\\save.dic",
 0);
}


InsertElement Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertElement()
{
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
//insert the new element
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants6.TAG_DISCHARGE_DATE);
nRet = LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants6.TAG_DISCHARGE_DATE, LEADDICOM1.get_CurrentTag().VR,
 false, (int)LTDICLib.DicomMiscConstants.ELEMENT_INDEX_MAX);
if (nRet != 0)
MessageBox.Show("Error Inserting Element");
LEADDICOM1.EnableMethodErrors
 = true;
}


Inserting a Context Group Example for C#

private void InsertContextGroup(ref LTDICLib.LEADDicomDS
 objDS)
{
// Context Group Version
objDS.DateTimeValueCount = 1;
objDS.get_DateTimeValues(0).Year = 2004;
objDS.get_DateTimeValues(0).Month = 3;
objDS.get_DateTimeValues(0).Day = 22;
objDS.get_DateTimeValues(0).Hours = 0;
objDS.get_DateTimeValues(0).Minutes = 0;
objDS.get_DateTimeValues(0).Seconds = 0;
objDS.get_DateTimeValues(0).Fractions = 0;
objDS.get_DateTimeValues(0).Offset = 0;
// Insert a (testing) Context Group
objDS.InsertContextGroup("CID
 XXXX", "New Context Group", true, 0);
objDS.DateTimeValueCount = 0;
// Fill the Context Group with some (testing) Coded Concepts
objDS.InsertCodedConcept("CSD1",
 "", "CV1", "CM1", false, "", 0);
objDS.InsertCodedConcept("CSD2",
 "", "CV2", "CM2", false, "", 0);
objDS.InsertCodedConcept("CSD3",
 "", "CV3", "CM3", false, "", 0);
// Refer to Enumerating the Coded Concepts of a Context Group Example
// for C# for the procedure EnumCodedConcepts
EnumCodedConcepts(ref objDS);
// Delete the Context Group
objDS.DeleteContextGroup();
}


Inserting a Wave Stream Into a Data Set Example for C#

public bool InsertWaveFileIntoDataSet(ref LTDICLib.LEADDicomDS
 objDataSet, ref string sInputWaveFilename)
{
bool tempInsertWaveFileIntoDataSet = false;
tempInsertWaveFileIntoDataSet = false;
LTDICLib.DicomWaveformGroup objAudioWaveformGroup = new LTDICLib.DicomWaveformGroup();
 objAudioWaveformGroup.EnableMethodErrors
 = false;
// Load the audio file into the waveform group
if (objAudioWaveformGroup.LoadAudio(sInputWaveFilename,
 0) != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
return tempInsertWaveFileIntoDataSet;
// Insert the audio waveform group into the Data Set
if (objDataSet.AddWaveformGroup(objAudioWaveformGroup,
 0, -1) != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
return tempInsertWaveFileIntoDataSet;
return true;
}


Inserting a Waveform Group Into a Data Set Example for C#

//*****************************************************************//
//*  This is a comprehensive sample, which shows how to insert a  *//
//*  waveform group with one ECG channel into a Data Set.         *//
//*  The main function is InsertECGWaveform; the rest of the      *//
//*  functions are helping functions.                             *//
//*****************************************************************//

// The main function that creates the waveform group and adds to the Data Set
public bool InsertECGWaveform(ref LTDICLib.LEADDicomDS objDataSet, ref
 short[] Samples)
{
bool tempInsertECGWaveform = false;
tempInsertECGWaveform = false;
// Our new waveform group
LTDICLib.DicomWaveformGroup objECGWaveformGroup
 = new LTDICLib.DicomWaveformGroup();
objECGWaveformGroup.EnableMethodErrors
 = false;
// Reset the waveform group, we don't really need to
 call this!
objECGWaveformGroup.Reset();
// Set the Waveform Sample Interpretation
objECGWaveformGroup.SampleInterpretation
 = LTDICLib.DicomWaveformSampleInterpretation.WAVEFORM_SAMPLE_INTERPRETATION_SS;
int lNumberOfSamples
 = 0;
lNumberOfSamples = Samples.GetUpperBound(0) - Samples.GetLowerBound(0)
 + 1;
// Set the Number of Waveform Samples. You can obtain
 this number by accessing
// the NumberOfSamplesPerChannel
 property.
if (objECGWaveformGroup.SetNumberOfSamplesPerChannel(lNumberOfSamples)
 != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
return tempInsertECGWaveform;
// Set the Sampling Frequency
objECGWaveformGroup.SamplingFrequency
 = 240.0;
// No Multiplex Group Time Offset. When the value is
 defined, it can be set using the
// MultiplexGroupTimeOffset property.
objECGWaveformGroup.set_ValueDefined(LTDICLib.DicomWaveformGroupValues.MULTIPLEX_GROUP_TIME_OFFSET,
 false);
// No Trigger Time Offset. When the value is defined,
 it can be set using the
// TriggerTimeOffset property.
objECGWaveformGroup.set_ValueDefined(LTDICLib.DicomWaveformGroupValues.TRIGGER_TIME_OFFSET,
 false);
// No Trigger Sample Position. When the value is defined,
 it can be set using the
// TriggerSamplePosition property.
objECGWaveformGroup.set_ValueDefined(LTDICLib.DicomWaveformGroupValues.TRIGGER_SAMPLE_POSITION,
 false);
// Waveform Originality is ORIGINAL
objECGWaveformGroup.WaveformOriginality
 = LTDICLib.DicomWaveformOriginality.WAVEFORM_ORIGINALITY_ORIGINAL;
// Set the Multiplex Group Label
objECGWaveformGroup.set_ValueDefined(LTDICLib.DicomWaveformGroupValues.MULTIPLEX_GROUP_LABEL,
 true);
objECGWaveformGroup.MultiplexGroupLabel
 = "SCPECG Waveform";
// Set the Waveform Padding Value
objECGWaveformGroup.set_ValueDefined(LTDICLib.DicomWaveformGroupValues.WAVEFORM_PADDING_VALUE,
 true);
objECGWaveformGroup.WaveformPaddingValue = 32768;
if (! (InsertECGChannel(ref objDataSet, ref objECGWaveformGroup,
 ref Samples)))
return tempInsertECGWaveform;
// Delete any waveform groups that already exist in the
 Data Set
while (objDataSet.GetWaveformGroupCount()
 > 0)
{
objDataSet.DeleteWaveformGroup(0,
 0);
}
// Insert the new waveform group into the Data Set
if (objDataSet.AddWaveformGroup(objECGWaveformGroup,
 0, -1) != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
return tempInsertECGWaveform;
return true;
}

public bool InsertECGChannel(ref LTDICLib.LEADDicomDS objDataSet,
 ref LTDICLib.DicomWaveformGroup objWaveformGroup, ref short[] Samples)
{
bool bInsertECGChannel = false;
bInsertECGChannel = false;
LTDICLib.DicomWaveformChannel objECGWaveformChannel =
 null;
// Add a channel to the group
try
{
objECGWaveformChannel = objWaveformGroup.Channels.Add();
}
catch
{
return bInsertECGChannel;
}
// Set the samples of the channel
if (objECGWaveformChannel.SetChannelSamples(Samples)
 < 0)
return bInsertECGChannel;
// Set the Channel Source and Sensitivity
if (! (SetChannelSourceAndSensitivity(ref objDataSet,
 ref objECGWaveformChannel)))
return bInsertECGChannel;
// Set the Channel Status
objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_STATUS,
 true);
objECGWaveformChannel.ChannelStatus
 = LTDICLib.DicomWaveformChannelStatus.CHANNEL_STATUS_OK;
// Set the Channel Time Skew
objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_TIME_SKEW,
 true);
objECGWaveformChannel.ChannelTimeSkew
 = 0.0;
// Set the Waveform Channel Number
objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.WAVEFORM_CHANNEL_NUMBER,
 true);
objECGWaveformChannel.WaveformChannelNumber
 = 0;
// Set the Channel Label objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_LABEL,
 true);
objECGWaveformChannel.ChannelLabel
 = "First Channel";
// No Channel Offset. When the value is defined, it can
 be set using the ChannelOffset
// property
objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_OFFSET,
 false);
// Set the Filter Low Frequency
objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.FILTER_LOW_FREQUENCY,
 true);
objECGWaveformChannel.FilterLowFrequency
 = 0.05;
// Set Filter High Frequency
objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.FILTER_HIGH_FREQUENCY,
 true);
objECGWaveformChannel.FilterHighFrequency
 = 100.0;
// Set the Channel Minimum Value
objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_MINIMUM_VALUE,
 true);
objECGWaveformChannel.ChannelMinimumValue
 = -386;
// Set the Channel Maximum Value
objECGWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_MAXIMUM_VALUE,
 true);
objECGWaveformChannel.ChannelMaximumValue
 = 1264;
// When the Notch Filter Frequency and Bandwidth are
 defined, they can be set using the
// NotchFilterFrequency
 and NotchFilterBandwidth
 properties.
// Last, but not least, set the channel annotations!
return SetChannelAnnotations(ref objECGWaveformChannel);
}
// Sets the Channel Source and Sensitivity

public bool SetChannelSourceAndSensitivity(ref LTDICLib.LEADDicomDS
 objDataSet, ref LTDICLib.DicomWaveformChannel objWaveformChannel)
{
bool tempSetChannelSourceAndSensitivity = false;
tempSetChannelSourceAndSensitivity = false;
// We will use the Context Group Table
// -------------------- Channel Source --------------------
const string CID_3001 = "CID 3001";
// Load the ECG Leads Context Group objDataSet.LoadContextGroup(CID_3001);
if (! (objDataSet.FindContextGroup(CID_3001)))
return tempSetChannelSourceAndSensitivity;
// 5.6.3-9-1 is Lead I (Einthoven)
if (! (objDataSet.FindCodedConcept("SCPECG",
 "5.6.3-9-1")))
return tempSetChannelSourceAndSensitivity;
// Set the Channel Source
objWaveformChannel.ChannelSource.CodingSchemeDesignator
 = objDataSet.CurrentCodedConcept.CodingSchemeDesignator;
objWaveformChannel.ChannelSource.CodingSchemeVersion
 = objDataSet.CurrentCodedConcept.CodingSchemeVersion;
objWaveformChannel.ChannelSource.CodeValue
 = objDataSet.CurrentCodedConcept.CodeValue;
objWaveformChannel.ChannelSource.CodeMeaning
 = objDataSet.CurrentCodedConcept.CodeMeaning;
// -------------------- Channel Sensitivity --------------------
objWaveformChannel.set_ValueDefined(LTDICLib.DicomWaveformChannelValues.CHANNEL_SENSITIVITY,
 true);
// The Channel Sensitivity
objWaveformChannel.ChannelSensitivity
 = 0.00122;
const string CID_3082 = "CID 3082";
// Load the Cardiology Units of Measurement Context Group
 objDataSet.LoadContextGroup(CID_3082);
if (! (objDataSet.FindContextGroup(CID_3082)))
return tempSetChannelSourceAndSensitivity;
if (! (objDataSet.FindCodedConcept("UCUM",
 "mV")))
return tempSetChannelSourceAndSensitivity;
// The Channel Sensitivity Units
objWaveformChannel.ChannelSensitivityUnits.CodingSchemeDesignator
 = objDataSet.CurrentCodedConcept.CodingSchemeDesignator;
objWaveformChannel.ChannelSensitivityUnits.CodingSchemeVersion
 = objDataSet.CurrentCodedConcept.CodingSchemeVersion;
objWaveformChannel.ChannelSensitivityUnits.CodeValue
 = objDataSet.CurrentCodedConcept.CodeValue;
objWaveformChannel.ChannelSensitivityUnits.CodeMeaning
 = objDataSet.CurrentCodedConcept.CodeMeaning;
// The Channel Sensitivity Correction Factor
objWaveformChannel.ChannelSensitivityCF
 = 1.0;
// The Channel Baseline
objWaveformChannel.ChannelBaseline
 = 0.0;
return true;
}
// Adds annotations for the channel
public bool SetChannelAnnotations(ref LTDICLib.DicomWaveformChannel objWaveformChannel)
{
bool bSetChannelAnnotations = false;
string ActiveErrorHandler = null;
bSetChannelAnnotations = false;
// Delete any existing channel annotations
while (objWaveformChannel.Annotations.Count
 > 0)
{
objWaveformChannel.Annotations.Remove(0);
}
LTDICLib.DicomWaveformAnnotation objECGWaveformAnnotation
 = null;
// Add an annotation object
try
{
objECGWaveformAnnotation = objWaveformChannel.Annotations.Add();
}
catch
{
return bSetChannelAnnotations;
}
ActiveErrorHandler = "";
// Our annotation is defined by a Coded Name/Numeric
 Measurement pair
objECGWaveformAnnotation.ValueType
 = LTDICLib.DicomWaveformAnnValueType.TYPE_CODED_NAME_AND_NUMERIC_VALUE;
// The Coded Name. Note: Instead of setting these values
 directly, you can also use
// the Context Group Table; the Context Groups defined
 by the DICOM Content Mapping
// Resource (DCMR) can be loaded into this table. Take
 a look at the function
// SetChannelSourceAndSensitivity above for an example.
objECGWaveformAnnotation.CodedName.CodingSchemeDesignator
 = "LN";
objECGWaveformAnnotation.CodedName.CodingSchemeVersion
 = "19971101";
objECGWaveformAnnotation.CodedName.CodeValue
 = "8867-4";
objECGWaveformAnnotation.CodedName.CodeMeaning
 = "Heart rate";
// The Numeric Value
try
{
objECGWaveformAnnotation.NumericValueCount
 = 1;
}
catch
{
return bSetChannelAnnotations;
}
ActiveErrorHandler = "";
objECGWaveformAnnotation.set_NumericValue(0, 69.0);
// The Measurement Units. Refer to the note given when
 the Coded Name was set.
objECGWaveformAnnotation.set_ValueDefined(LTDICLib.DicomWaveformAnnValues.MEASUREMENT_UNITS,
 true);
objECGWaveformAnnotation.MeasurementUnits.CodingSchemeDesignator
 = "UCUM";
objECGWaveformAnnotation.MeasurementUnits.CodingSchemeVersion
 = "1.4";
objECGWaveformAnnotation.MeasurementUnits.CodeValue
 = "{H.B.}/min";
objECGWaveformAnnotation.MeasurementUnits.CodeMeaning
 = "Heart beat per minute";
return true;
}


InsertIOD Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertIOD( bool bChild )
{
try
{
bool bInsert = false;
int lCode = 0;
short nType = 0;
int hIOD = 0;
int hTemp = 0;
short nRet = 0;
bInsert = false;
LEADDICOM1.EnableMethodErrors
 = true;
lCode = 1048593;
nType = (short)LTDICLib.DicomIODTypeConstants.DICOM_IOD_TYPE_CLASS;
//store current
IOD hIOD = LEADDICOM1.get_CurrentIOD().hIOD;
LEADDICOM1.EnableMethodErrors
 = false;
//does an IOD already exist on the
 target level?
if (bChild == true)
{
//if the current
 IOD has a child, move to that child's level
nRet = LEADDICOM1.MoveChildIOD();
if (nRet != 0)         //no
 children, so insert is OK
{
bInsert
 = true;
LEADDICOM1.SetCurrentIOD(hIOD);
}
else         //check
 the child's level to see if target IOD already exists
{
hTemp
 = LEADDICOM1.get_CurrentIOD().hIOD;
LEADDICOM1.MoveFirstIOD(true);
nRet
 = LEADDICOM1.FindIOD(lCode,
 nType, true);
if
 (nRet != 0)
bInsert = true;
//move
 back to parent level
LEADDICOM1.SetCurrentIOD(hTemp);
LEADDICOM1.MoveParentIOD();
}
}
else
{
//check the current
 IOD's level LEADDICOM1.MoveFirstIOD(true);
nRet = LEADDICOM1.FindIOD(lCode, nType, true);
if (nRet != 0) bInsert
 = true;
LEADDICOM1.SetCurrentIOD(hIOD);
}
LEADDICOM1.EnableMethodErrors
 = true;
//allow user to insert item at the
 same level as the current or as child
if (bInsert == true)
LEADDICOM1.InsertIOD(bChild,
 nType, lCode, "My Test IOD", 5, "Test Description");
else
MessageBox.Show("Already
 exists");
return;
}
catch
{
MessageBox.Show("Error");
LEADDICOM1.EnableMethodErrors
 = true;
}
}


InsertKey Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertKey ( )
{
short x = 0;
LEADDICOM1.ResetDS();
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN,
 0);   //insert some keys
LEADDICOM1.InsertKey("PATIENT",
 true);   //insert PATIENT level key
LEADDICOM1.InsertKey("STUDY",
 true);    //insert STUDY level key
//insert 5 SERIES level keys and some data
for (x = 1; x <= 5; x++)
{
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.InsertKey("SERIES",
 true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.set_StringValues(0,System.Convert.ToString(x));
LEADDICOM1.SetStringValue(1);
LEADDICOM1.MoveParentElement();
LEADDICOM1.MoveParentKey();
    //move back up one level
}
//move to root key
LEADDICOM1.MoveRootKey();   //PATIENT
 level
MessageBox.Show(LEADDICOM1.GetKeyValue());   //move
 to SERIES level
LEADDICOM1.MoveChildKey();
//STUDY LEADDICOM1.MoveChildKey();
 //SERIES

//find first SERIES
LEADDICOM1.FindFirstKey("SERIES",
 true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.GetStringValue(0,
 1);
MessageBox.Show(LEADDICOM1.get_StringValues(0));

//find next series
LEADDICOM1.FindNextKey(true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.GetStringValue(0,
 1);
MessageBox.Show(LEADDICOM1.get_StringValues(0));

//find last SERIES
LEADDICOM1.FindLastKey("SERIES",
 true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.GetStringValue(0,
 1);
MessageBox.Show(LEADDICOM1.get_StringValues(0));

//find previous SERIES
LEADDICOM1.FindPrevKey(true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.GetStringValue(0,
 1);
MessageBox.Show(LEADDICOM1.get_StringValues(0));

//find last SERIES and delete it
LEADDICOM1.FindLastKey("SERIES",
 true);
LEADDICOM1.DeleteKey();

//move to root key
LEADDICOM1.MoveFirstKey(false);
MessageBox.Show(LEADDICOM1.GetKeyValue());

//move to SERIES level
LEADDICOM1.MoveChildKey();
    //STUDY
LEADDICOM1.MoveChildKey();   //SERIES

//move to first SERIES
LEADDICOM1.MoveFirstKey(true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.GetStringValue(0,
 1);
MessageBox.Show(LEADDICOM1.get_StringValues(0));

//move to next series
LEADDICOM1.MoveNextKey(true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.GetStringValue(0,
 1);
MessageBox.Show(LEADDICOM1.get_StringValues(0));

//move to last SERIES
LEADDICOM1.MoveLastKey(true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.GetStringValue(0,
 1);
MessageBox.Show(LEADDICOM1.get_StringValues(0));

//move to previous SERIES
LEADDICOM1.MovePrevKey(true);
LEADDICOM1.MoveChildElement();
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_REFERENCED_FILE_ID,
 true);
LEADDICOM1.GetStringValue(0,
 1);
MessageBox.Show(LEADDICOM1.get_StringValues(0));
}


InsertModule Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertModule ( )
{
short nRet = 0;
LEADDICOM1.EnableMethodErrors
 = false;
LEADDICOM1.GetInfoDS();
nRet = LEADDICOM1.InsertModule((int)LTDICLib.DicomModuleConstants.DICOM_MODULE_LUT_IDENTIFICATION,
 true);
if (nRet != 0)
MessageBox.Show("Error Inserting Module!");
else
{
nRet = LEADDICOM1.FindModuleIOD(LEADDICOM1.InfoClass, LEADDICOM1.get_CurrentModule().Module);
MessageBox.Show("Inserted Module " + LEADDICOM1.get_CurrentIOD().Name);
}
}


InsertTag Example for C#

//This example uses the predefined variable “ListView1” of
 type “ListView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertTag ( )
{
try
{
short nRet = 0;
ListViewItem ItemX = null;
string szItem = null;
int nLen = 0;
int x = 0;
string szItemL = null;
string szItemR = null;
LEADDICOM1.EnableMethodErrors
 = false;
nRet = LEADDICOM1.FindTag(131079);
if (nRet == 0)
{
MessageBox.Show("Already Exists!");
return;
}
nRet = LEADDICOM1.InsertTag(131079,
 -1, "My Test Tag", (short)LTDICLib.DicomVRCodeConstants.VR_OB,
 1, 1, 1);
if (nRet != 0)
MessageBox.Show("Error");
LEADDICOM1.EnableMethodErrors
 = true;
//add item to the ListView control
ItemX = new ListViewItem();
ListView1.Items.Add(ItemX);
szItem = System.Convert.ToString(LEADDICOM1.get_CurrentTag().Code,
 16).ToUpper();
nLen = szItem.Length;
szItemR = szItem.Substring(szItem.Length - 4);
szItemL = "";
for (x = nLen; x <= 7; x++)
{
szItemL = szItemL + System.Convert.ToString(0);
}
szItemL = szItemL + szItem.Substring(0, nLen - 4);
ItemX.Text = szItemL + ":" + szItemR;
szItem = System.Convert.ToString(LEADDICOM1.get_CurrentTag().Mask,
 16).ToUpper();
nLen = szItem.Length;
szItemR = szItem.Substring(szItem.Length - 4);
szItemL = "";
for (x = nLen; x <= 7; x++)
{
szItemL = szItemL + System.Convert.ToString(0);
}
szItemL = szItemL + szItem.Substring(0, nLen - 4);
ItemX.SubItems.Add(szItemL + ":" + szItemR);
ItemX.SubItems.Add(LEADDICOM1.get_CurrentTag().Name);
ItemX.SubItems.Add(System.Convert.ToString(LEADDICOM1.get_CurrentTag().VR));
ItemX.SubItems.Add(System.Convert.ToString(LEADDICOM1.get_CurrentTag().MinVM));
ItemX.SubItems.Add(System.Convert.ToString(LEADDICOM1.get_CurrentTag().MaxVM));
ItemX.SubItems.Add(System.Convert.ToString(LEADDICOM1.get_CurrentTag().DivideVM));
ItemX.Selected = true;
ListView1.Refresh();
ListView1.Focus();
return;
}
catch
{
MessageBox.Show("Error");
}
}


InsertUID Example for C#

//This example uses the predefined variable “ListView1” of
 type “ListView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertUID()
{
try
{
short nRet = 0;
ListViewItem ItemX = null;
LEADDICOM1.EnableMethodErrors
 = false;
nRet = LEADDICOM1.FindUID("1.2.840.10008.1.3");
if (nRet == 0)
{
MessageBox.Show("Already Exists!");
return;
}
LEADDICOM1.EnableMethodErrors
 = true;
nRet = LEADDICOM1.InsertUID("1.2.840.10008.1.3",
 "My Test UID", (int)LTDICLib.DicomUIDTypes.DICOM_UID_TYPE_OTHER);
if (nRet != 0)
MessageBox.Show("Error");
//add item to the ListView control
ItemX = new ListViewItem();
ListView1.Items.Add(ItemX);
ItemX.Text = System.Convert.ToString(LEADDICOM1.get_CurrentUID().Code);
ItemX.SubItems.Add(LEADDICOM1.get_CurrentUID().Name);
ItemX.Selected = true;
ListView1.Refresh();
ListView1.Focus();
LEADDICOM1.EnableMethodErrors
 = true;
return;
}
catch
{
MessageBox.Show("Error");
}
}


InsertVR Example for C#

//This example uses the predefined variable “ListView1” of
 type “ListView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestInsertVR()
{
short nRet = 0;
ListViewItem ItemX = null;
short nCode = 0;
short nRestrict = 0;
LEADDICOM1.EnableMethodErrors
 = true;
try
{
LEADDICOM1.EnableMethodErrors
 = false;
nCode = 20322;
nRet = LEADDICOM1.FindVR(nCode);
if (nRet == 0)
{
MessageBox.Show("Already Exists!");
return;
}
nRestrict = (short)LTDICLib.DicomVRRestrictionConstants.DICOM_VR_FIXED
 + (short)LTDICLib.DicomVRRestrictionConstants.DICOM_VR_TEXT;
nRet = LEADDICOM1.InsertVR(nCode,
 "My Test VR", 64, nRestrict, 1);
if (nRet != 0)
MessageBox.Show("Error");
//add item to the ListView control
ItemX = ListView1.Items.Add(new ListViewItem());
ItemX.Text = System.Convert.ToString(LEADDICOM1.get_CurrentVR().Code);
ItemX.SubItems.Add(LEADDICOM1.get_CurrentVR().Name);
ItemX.SubItems.Add(System.Convert.ToString(LEADDICOM1.get_CurrentVR().Length));
ItemX.SubItems.Add(System.Convert.ToString(LEADDICOM1.get_CurrentVR().Restrict));
ItemX.SubItems.Add(System.Convert.ToString(LEADDICOM1.get_CurrentVR().UnitSize));
ItemX.Selected = true;
ListView1.Refresh();
ListView1.Focus();
LEADDICOM1.EnableMethodErrors
 = true;
}
catch
{
MessageBox.Show("Error");
}
}


IsActivated Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestIsActivated ( )
{
string Out = null;
//test the local computer's connection
Out = "Activated: " + System.Convert.ToString(LEADDICOMNet1.IsActivated(LEADDICOMNet1.hNet));
Out = Out + "\r"; Out = Out + "Connected: " + System.Convert.ToString(LEADDICOMNet1.IsConnected(LEADDICOMNet1.hNet));
Out = Out + "\r"; Out = Out + "Associated: " + System.Convert.ToString(LEADDICOMNet1.IsAssociated(LEADDICOMNet1.hNet));
MessageBox.Show(Out);
}


IsAsyncOperations Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestIsAsyncOperations ( )
{
if (LEADDICOMNet1.IsAsyncOperations(LEADDICOMNet1.hPDU)
 == true)
{
MessageBox.Show("AsyncOperations enabled");
//get the operations counts
MessageBox.Show("Invoked " + System.Convert.ToString(LEADDICOMNet1.GetInvokedOperationsCount(LEADDICOMNet1.hPDU)));
MessageBox.Show("Performed " + System.Convert.ToString(LEADDICOMNet1.GetPerformedOperationsCount(LEADDICOMNet1.hPDU)));
//now disable it
LEADDICOMNet1.SetAsyncOperations(LEADDICOMNet1.hPDU, false, 0, 0);
}
else
{
MessageBox.Show("AsyncOperations disabled");
//now enable it
LEADDICOMNet1.SetAsyncOperations(LEADDICOMNet1.hPDU, true, 0, 0);
}
}


ISCLChallengeResponseSuccess example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetExternalAuthenticateISCL(int hNet, ref object nChallenge, ref object nResponse, ref object nParameter)
{
nResponse = Convert.ToInt64(nChallenge) + Convert.ToInt64(nParameter);
LEADDICOMNet1.ISCLChallengeResponseSuccess = true;
}

 private
 decimal GetRandom()
{
decimal RandVal = 0M;
Random RandomGenerator = new Random () ;
RandVal = (decimal)RandomGenerator.NextDouble() * 0X10000;
RandVal = (decimal)RandVal * 0X10000 + (decimal)RandomGenerator.NextDouble()
 * 0X10000;
RandVal = (decimal)RandVal * 0X10000 + (decimal)RandomGenerator.NextDouble()
 * 0X10000;
RandVal = (decimal)RandVal * 0X10000 + (decimal)RandomGenerator.NextDouble()
 * 0X10000;
return RandVal;
}
//LEADDICOMNet1 is a predefined LEADDicomNet object

private void LEADDICOMNet1_NetGetChallengeISCL(int hNet, ref object nChallenge, ref object nParameter)
{
nChallenge = GetRandom() + System.Convert.ToDecimal(nParameter);
LEADDICOMNet1.ISCLChallengeResponseSuccess = true;
}
//LEADDICOMNet1 is a predefined LEADDicomNet object

private void LEADDICOMNet1_NetInternalAuthenticateISCL(int hNet, ref object nChallenge, ref object nResponse, ref object nParameter)
{
nResponse = Convert.ToInt64(nChallenge) + Convert.ToInt64(nParameter);
LEADDICOMNet1.ISCLChallengeResponseSuccess = true;
}


IsImplementClass Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestIsImplementClass ( )
{
const string UID_RT_DOSE_STORAGE = "1.2.840.10008.5.1.4.1.1.481.2";
// Radiotherapy Dose Storage string
szUID = null;
//is max len enabled?
if (LEADDICOMNet1.IsImplementClass(LEADDICOMNet1.hPDU)
 == true)
{
//disable it
//display old value
szUID = LEADDICOMNet1.GetImplementClass(LEADDICOMNet1.hPDU);
MessageBox.Show(szUID);
LEADDICOMNet1.SetImplementClass(LEADDICOMNet1.hPDU, false, szUID);
}
else
{
//enable it
LEADDICOMNet1.SetImplementClass(LEADDICOMNet1.hPDU, true, UID_RT_DOSE_STORAGE);
szUID = LEADDICOMNet1.GetImplementClass(LEADDICOMNet1.hPDU);
MessageBox.Show(szUID);
}
}


IsImplementVersion Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestIsImplementVersion ( )
{
string szVersion = null;
if (LEADDICOMNet1.IsImplementVersion(LEADDICOMNet1.hPDU)
 == true)
{
//disable it
//display old value
szVersion = LEADDICOMNet1.GetImplementVersion(LEADDICOMNet1.hPDU);
MessageBox.Show(szVersion);
LEADDICOMNet1.SetImplementVersion(LEADDICOMNet1.hPDU,
 false, szVersion);
}
else
{
//enable it
LEADDICOMNet1.SetImplementVersion(LEADDICOMNet1.hPDU,
 true, "v13.0");
szVersion = LEADDICOMNet1.GetImplementVersion(LEADDICOMNet1.hPDU);
MessageBox.Show(szVersion);
}
}


IsISCLQueueEmpty Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestIsISCLQueueEmpty ( )
{
if (LEADDICOMNet1.IsISCLQueueEmpty(LEADDICOMNet1.hNet))
MessageBox.Show("ISCL queue is empty");
else
MessageBox.Show("ISCL queue is not empty");
}


IsMaxLengthEnabled Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestIsMaxLengthEnabled ( )
{
int lLen = 0;
//is max len enabled?
if (LEADDICOMNet1.IsMaxLengthEnabled(LEADDICOMNet1.hPDU)
 == true)
{
//disable it
//display old value
lLen = LEADDICOMNet1.GetMaxLength(LEADDICOMNet1.hPDU);
MessageBox.Show(System.Convert.ToString(lLen));
LEADDICOMNet1.SetMaxLength(LEADDICOMNet1.hPDU,
 false, lLen);
}
else
{
//enable it
LEADDICOMNet1.SetMaxLength(LEADDICOMNet1.hPDU,
 true, 8);
}
}


IsRoleSelect Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestIsRoleSelect()
{
int x = 0;
int nID = 0;
string szOut = null;
short nUser = 0;
short nProvider = 0;
//create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(true);
//set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
//indicate that we wish to serve as user for each SOP
 associated
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
LEADDICOMNet1.SetRoleSelect(LEADDICOMNet1.hPDU,
 (short)nID, true, (short)LTDNCLib.PDURoleSelectConstants.PDU_ROLE_SUPPORT,
 (short)LTDNCLib.PDURoleSelectConstants.PDU_ROLE_NON_SUPPORT);
}
//now, display the information
szOut = "Role Select Info" + "\r";
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU,
 x);
szOut = szOut + "ID: " +
 System.Convert.ToString(nID);
if (LEADDICOMNet1.IsRoleSelect(LEADDICOMNet1.hPDU,
 (short)nID) == true)
{
nUser = LEADDICOMNet1.GetUserRole(LEADDICOMNet1.hPDU,
 (short)nID);
nProvider = LEADDICOMNet1.GetProviderRole(LEADDICOMNet1.hPDU,
 (short)nID);
szOut = szOut + "
 User: " + System.Convert.ToString(nUser);
szOut = szOut + "
 Provider: " + System.Convert.ToString(nProvider) + "\r";
}
else
szOut = szOut + "
 No Role Select" + "\r";
}
MessageBox.Show(szOut);
}


IsSupportLocked Example for C#

//This example uses the predefined variable “DicomKernel”
 of type “LEADDicomKernel” from “LEADTOOLS Toolkit”.
private void TestIsSupportLocked ( )
{
if (DicomKernel.IsSupportLocked((short)LTDicomKernelLib.DicomSupportLockConstants.L_SUPPORT_MEDICAL))
MessageBox.Show("No Support");
}


J2KCompressionControl example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestJ2KCompressionControl()
{
LEADRasterView1.Raster.CreateBitmap(100, 100, 24);
LEADDICOM1.InitDS((int)   LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE,
 (short)LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + (short)LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT
 + (short)LTDICLib.DicomDataSetFlags.DS_LITTLE_ENDIAN);
//insert the image into the element LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap;
// Use the Q factor for compression control.
LEADDICOM1.J2KOptions().J2KCompressionControl
 = LTDICLib.DicomJ2KCompressionControl.DICOM_J2K_COMP_QFACTOR;
//set the bitmap
LEADDICOM1.SetBitmapValue((int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
 0, 100, 0);
}


J2KCompressionRatio example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestJ2KCompressionRatio()
{
LEADRasterView1.Raster.CreateBitmap(100, 100, 24);
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE,
 (short)LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + (short)LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT
 + (short)LTDICLib.DicomDataSetFlags.DS_LITTLE_ENDIAN);
//insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap;
// Use the Compression ratio
LEADDICOM1.J2KOptions().J2KCompressionControl
 = LTDICLib.DicomJ2KCompressionControl.DICOM_J2K_COMP_RATIO;
LEADDICOM1.J2KOptions().J2KCompressionRatio
 = 50.0F;
//set the bitmap
LEADDICOM1.SetBitmapValue((int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
 0, 0, 0);
}


J2KROIControl example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestJ2KROIControl()
{
LEADRasterView1.Raster.CreateBitmap(100, 100, 24);
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE,
 (short)LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + (short)LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT
 + (short)LTDICLib.DicomDataSetFlags.DS_LITTLE_ENDIAN);
//insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap;
LEADDICOM1.J2KOptions().J2KSetDefaults();
LEADDICOM1.J2KOptions().J2KCompressionControl
 = LTDICLib.DicomJ2KCompressionControl.DICOM_J2K_COMP_RATIO;
LEADDICOM1.J2KOptions().J2KCompressionRatio
 = 100.0F;
LEADDICOM1.J2KOptions().J2KUseROI = true;
LEADDICOM1.J2KOptions().J2KROIControl =    LTDICLib.J2KRegionOfInterest.J2K_USEOPTION_RECT;
LEADDICOM1.J2KOptions().J2KROILeft = 200;
LEADDICOM1.J2KOptions().J2KROITop = 200;
LEADDICOM1.J2KOptions().J2KROIWidth = 400;
LEADDICOM1.J2KOptions().J2KROIHeight = 400;
LEADDICOM1.J2KOptions().J2KXTsiz = 100;
LEADDICOM1.J2KOptions().J2KYTsiz = 100;
//set the bitmap
LEADDICOM1.SetBitmapValue((int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
 0, 0, 0);
}


J2KSetDefaults example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestJ2KSetDefaults()
{
string msg = null;
// Display all the default JPEG2000 advanced options
LEADDICOM1.J2KOptions().J2KSetDefaults();
msg = msg + "J2KUseColorTransform = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KUseColorTransform)
 + System.Environment.NewLine;
msg = msg + "J2KDerivedQuantization = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KDerivedQuantization)
 + System.Environment.NewLine;
msg = msg + "J2KXOsiz = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KXOsiz)
 + System.Environment.NewLine;
msg = msg + "J2KYOsiz = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KYOsiz)
 + System.Environment.NewLine;
msg = msg + "J2KXTsiz = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KXTsiz)
 + System.Environment.NewLine;
msg = msg + "J2KYTsiz = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KYTsiz)
 + System.Environment.NewLine;
msg = msg + "J2KXTOsiz = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KXTOsiz)
 + System.Environment.NewLine;
msg = msg + "J2KYTOsiz = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KYTOsiz)
 + System.Environment.NewLine;
msg = msg + "J2KDecompLevel = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KDecompLevel)
 + System.Environment.NewLine;
msg = msg + "J2KProgressOrder = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KProgressOrder)
 + System.Environment.NewLine;
msg = msg + "J2KCodBlockWidth = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KCodBlockWidth)
 + System.Environment.NewLine;
msg = msg + "J2KCodBlockHeight = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KCodBlockHeight)
 + System.Environment.NewLine;
msg = msg + "J2KCBS_SelectiveACBypass = " +
 System.Convert.ToString(LEADDICOM1.J2KOptions().J2KCBS_SelectiveACBypass)
 + System.Environment.NewLine;
msg = msg + "J2KCBS_ResetContextOnBoundaries = "
 + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KCBS_ResetContextOnBoundaries)
 + System.Environment.NewLine;
msg = msg + "J2KCBS_TerminationOnEachPass = "
 + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KCBS_TerminationOnEachPass)
 + System.Environment.NewLine;
msg = msg + "J2KCBS_VerticallyCausalContext = "
 + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KCBS_VerticallyCausalContext)
 + System.Environment.NewLine;
msg = msg + "J2KCBS_PredictableTermination = "
 + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KCBS_PredictableTermination)
 + System.Environment.NewLine;
msg = msg + "J2KCBS_ErrorResilienceSymbol = "
 + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KCBS_ErrorResilienceSymbol)
 + System.Environment.NewLine;
msg = msg + "J2KGuardBits = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KGuardBits)
 + System.Environment.NewLine;
msg = msg + "J2KDerivedBaseMantissa = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KDerivedBaseMantissa)
 + System.Environment.NewLine;
msg = msg + "J2KDerivedBaseExponent = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KDerivedBaseExponent)
 + System.Environment.NewLine;
msg = msg + "J2KUseSOPMarker = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KUseSOPMarker)
 + System.Environment.NewLine;
msg = msg + "J2KUseEPHMarker = " + System.Convert.ToString(LEADDICOM1.J2KOptions().J2KUseEPHMarker)
 + System.Environment.NewLine;
MessageBox.Show(msg);
}


J2KTargetFileSize example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestJ2KTargetFileSize ( )
{
LEADRasterView1.Raster.CreateBitmap(100, 100, 24);
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE,
 (short)LTDICLib.DicomDataSetFlags.DS_EXPLICIT_VR + (short)LTDICLib.DicomDataSetFlags.DS_METAHEADER_ABSENT
 + (short)LTDICLib.DicomDataSetFlags.DS_LITTLE_ENDIAN);
//insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap;
// Use the Compression ratio
LEADDICOM1.J2KOptions().J2KCompressionControl
 = LTDICLib.DicomJ2KCompressionControl.DICOM_J2K_COMP_TARGETSIZE;
LEADDICOM1.J2KOptions().J2KTargetFileSize
 = 15 * 1024;
//set the bitmap
LEADDICOM1.SetBitmapValue((int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
 0, 0, 0);
}


KeepPixelDataIntact Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestKeepPixelDataIntact ()
{
// Load a Data Set string
strMessage = null;
if (LEADDICOM1.LoadDS("d:\\lead14\\dist\\images\\dicom\\Image1.dic",
 0) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
if (LEADDICOM1.KeepPixelDataIntact
 == false)
{
strMessage = "Would
 you like to keep the pixel data unchanged?" + System.Environment.NewLine
 + "   If you choose Yes, then the resulting bitmap
 data " + "will represent exactly what appears inside the "
 + "DICOM file, but may not display properly. If you " + "choose
 No, then the resulting bitmap data may not " + "be identical
 to what appears inside the DICOM file, " + "but will display
 properly.";
if (MessageBox.Show(strMessage,
 string.Empty, MessageBoxButtons.YesNo) == DialogResult.Yes)
LEADDICOM1.KeepPixelDataIntact
 = true;
}
if (LEADDICOM1.FindFirstElement GetBitmapValue((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
LEADDICOM1.GetBitmapValue(0,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_BGR, 0);
// ...
}
}
}


Listen Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestListen ( )
{
//create a server to accept up to 25 clients
LEADDICOMNet1.Listen("", 104, 25);
}


LoadDS Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestLoadDS ( )
{
short nRet = 0;
//load a Data Set
LEADDICOM1.EnableMethodErrors
 = false;
nRet = LEADDICOM1.LoadDS("d:\\lead14\\dist\\images\\dicom\\image2.dic",
 0);
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("Error " + System.Convert.ToString(nRet) + "
 loading file!");
LEADDICOM1.EnableMethodErrors
 = true;
}


Modifying a Context Group Example for C#

private void ModifyContextGroup(ref LTDICLib.LEADDicomDS
 objDS)
{
objDS.ResetContextGroup();
objDS.LoadContextGroup("");
// Look for a Context Group
if (! (objDS.FindContextGroup("CID
 6019")))
return;
// Look for a Coded Concept in the current Context Group
if (! (objDS.FindCodedConcept("SRT",
 "F-01781")))
return;
// Set the Code Meaning of the current Coded Concept (French translation)
objDS.SetCodedConceptCodeMeaning("Situé
 à 1 heure");
// Refer to Enumerating the Coded Concepts of a Context Group Example
// for C# for the function DisplayCodedConcept
DisplayCodedConcept(objDS, false);
// Delete the current Coded Concept
objDS.DeleteCodedConcept();
// Add a (testing) Coded Concept to the current Context Group
objDS.InsertCodedConcept("CSD",
 "", "CV", "CM", false, "", 0);
DisplayCodedConcept(objDS, false);
// Restore the current Context Group (discard all the changes
// made to the Group)
objDS.DefaultContextGroup(false);
// Refer to Enumerating the Coded Concepts of a Context Group Example
// for C# for the procedure EnumCodedConcepts
EnumCodedConcepts(ref objDS);
// Delete the current Context Group
objDS.DeleteContextGroup();
}


MoveFirstIOD Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestMoveFirstIOD()
{
try
{
int hIOD = 0;
LEADDICOM1.EnableMethodErrors
 = true;
//Move to the First IOD in the list
LEADDICOM1.MoveFirstIOD(false);
hIOD = LEADDICOM1.get_CurrentIOD().hIOD;      //store
 it
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
//Move to the Last IOD at this same
 level
LEADDICOM1.MoveLastIOD(true);
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
//Move to the Previous IOD at this
 same level
LEADDICOM1.MovePrevIOD(true);
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
//Move back to First IOD
LEADDICOM1.SetCurrentIOD(hIOD);
//Move to the Next IOD at this same
 level
LEADDICOM1.MoveNextIOD(true);
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
return;
}
catch
{
MessageBox.Show("Error");
}
}


MoveFirstTag Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestMoveFirstTag()
{
try
{
LEADDICOM1.EnableMethodErrors = true;
LEADDICOM1.MoveFirstTag();
DisplayTagItem();
MessageBox.Show("wait");
LEADDICOM1.MoveNextTag();
DisplayTagItem();
MessageBox.Show("wait");
LEADDICOM1.MoveLastTag();
DisplayTagItem();
MessageBox.Show("wait");
LEADDICOM1.MovePrevTag();
DisplayTagItem();
MessageBox.Show("wait");
}
catch
{ }
}
//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable “Text1” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text2” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text3” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text5” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text6” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text7” of type “TextBox” from “.NET Framework”.
private void DisplayTagItem()
{
try
{
string szItem = null;
string szItemL = null;
string szItemR = null;
int nLen = 0;
int x = 0;
LEADDICOM1.EnableMethodErrors = true;
szItem = System.Convert.ToString(LEADDICOM1.get_CurrentTag().Code, 16).ToUpper();
nLen = szItem.Length;
szItemR = szItem.Substring(szItem.Length - 4);
szItemL = "";
for (x = nLen; x <= 7; x++)
{
szItemL = szItemL + System.Convert.ToString(0);
}
szItemL = szItemL + szItem.Substring(0, nLen - 4);
Text1.Text = szItemL + ":" + szItemR;
szItem = System.Convert.ToString(LEADDICOM1.get_CurrentTag().Mask, 16).ToUpper();
nLen = szItem.Length;
szItemR = szItem.Substring(szItem.Length - 4);
szItemL = "";
for (x = nLen; x <= 7; x++)
{
szItemL = szItemL + System.Convert.ToString(0);
}
szItemL = szItemL + szItem.Substring(0, nLen - 4);
Text2.Text = szItemL + ":" + szItemR;
Text3.Text = LEADDICOM1.get_CurrentTag().Name;
switch ( LEADDICOM1.get_CurrentTag().VR )
{
case (short)LTDICLib.DicomVRCodeConstants.VR_AE:
Text4.Text = "AE";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_AS:
Text4.Text = "AS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_AT:
Text4.Text = "AT";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_CS:
Text4.Text = "CS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_DA:
Text4.Text = "DA";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_DS:
Text4.Text = "DS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_DT:
Text4.Text = "DT";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_FD:
Text4.Text = "FD";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_FL:
Text4.Text = "FL";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_IS:
Text4.Text = "IS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_LO:
Text4.Text = "LO";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_LT:
Text4.Text = "LT";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_OB:
Text4.Text = "OB";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_OW:
Text4.Text = "OW";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_PN:
Text4.Text = "PN";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_SH:
Text4.Text = "SH";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_SL:
Text4.Text = "SL";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_SQ:
Text4.Text = "SQ";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_SS:
Text4.Text = "SS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_ST:
Text4.Text = "ST";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_TM:
Text4.Text = "TM";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_UI:
Text4.Text = "UI";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_UL:
Text4.Text = "UL";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_UN:
Text4.Text = "UN";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_US:
Text4.Text = "US";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_UT:
Text4.Text = "UT";
break;
default:
Text4.Text = System.Convert.ToString(LEADDICOM1.get_CurrentTag().VR);
break;
}
Text5.Text = System.Convert.ToString(LEADDICOM1.get_CurrentTag().MinVM);
Text6.Text = System.Convert.ToString(LEADDICOM1.get_CurrentTag().MaxVM);
Text7.Text = System.Convert.ToString(LEADDICOM1.get_CurrentTag().DivideVM);
}
catch
{ }
}


MoveFirstUID Example for C#

//This example uses the predefined variable “Text1” of type
 “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text2” of type “TextBox” from
 “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestMoveFirstUID()
{
try
{
LEADDICOM1.EnableMethodErrors
 = true;
LEADDICOM1.MoveFirstUID();

//display the items information
Text1.Text = LEADDICOM1.get_CurrentUID().Code;
Text2.Text = LEADDICOM1.get_CurrentUID().Name;
MessageBox.Show("wait");
LEADDICOM1.MoveNextUID();

//display the items information
Text1.Text = LEADDICOM1.get_CurrentUID().Code;
Text2.Text = LEADDICOM1.get_CurrentUID().Name;
MessageBox.Show("wait");
LEADDICOM1.MoveLastUID();

//display the items information
Text1.Text = LEADDICOM1.get_CurrentUID().Code;
Text2.Text = LEADDICOM1.get_CurrentUID().Name;
MessageBox.Show("wait");
LEADDICOM1.MovePrevUID();

//display the items information
Text1.Text = LEADDICOM1.get_CurrentUID().Code;
Text2.Text = LEADDICOM1.get_CurrentUID().Name;
MessageBox.Show("wait");
}
catch { }
}


MoveFirstVR Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestMoveFirstVR()
{
try
{
LEADDICOM1.EnableMethodErrors
 = true;
LEADDICOM1.MoveFirstVR();
DisplayVRItem();
MessageBox.Show("wait");
LEADDICOM1.MoveNextVR();
DisplayVRItem();
MessageBox.Show("wait");
LEADDICOM1.MoveLastVR();
DisplayVRItem();
MessageBox.Show("wait");
LEADDICOM1.MovePrevVR();
DisplayVRItem();
MessageBox.Show("wait");
}
catch { }
}

//This example uses the predefined variable “Text1” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text2” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text3” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text4” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text5” of type “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void DisplayVRItem()
{
try
{
short nRestrict = 0;
LEADDICOM1.EnableMethodErrors = true;
//display the items information
switch (LEADDICOM1.get_CurrentVR().Code)
{
case (short)LTDICLib.DicomVRCodeConstants.VR_AE:
Text1.Text = "AE";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_AS:
Text1.Text = "AS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_AT:
Text1.Text = "AT";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_CS:
Text1.Text = "CS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_DA:
Text1.Text = "DA";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_DS:
Text1.Text = "DS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_DT:
Text1.Text = "DT";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_FD:
Text1.Text = "FD";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_FL:
Text1.Text = "FL";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_IS:
Text1.Text = "IS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_LO:
Text1.Text = "LO";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_LT:
Text1.Text = "LT";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_OB:
Text1.Text = "OB";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_OW:
Text1.Text = "OW";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_PN:
Text1.Text = "PN";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_SH:
Text1.Text = "SH";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_SL:
Text1.Text = "SL";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_SQ:
Text1.Text = "SQ";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_SS:
Text1.Text = "SS";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_ST:
Text1.Text = "ST";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_TM:
Text1.Text = "TM";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_UI:
Text1.Text = "UI";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_UL:
Text1.Text = "UL";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_UN:
Text1.Text = "UN";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_US:
Text1.Text = "US";
break;
case (short)LTDICLib.DicomVRCodeConstants.VR_UT:
Text1.Text = "UT";
break;
default:
Text1.Text = System.Convert.ToString(LEADDICOM1.get_CurrentVR().Code);
break;
}
Text2.Text = LEADDICOM1.get_CurrentVR().Name;
Text3.Text = System.Convert.ToString(LEADDICOM1.get_CurrentVR().Length);
nRestrict = LEADDICOM1.get_CurrentVR().Restrict;
nRestrict = (short)(nRestrict & (short)~LTDICLib.DicomVRRestrictionConstants.DICOM_VR_BINARY);
nRestrict = (short)(nRestrict & (short)~LTDICLib.DicomVRRestrictionConstants.DICOM_VR_STRING);
nRestrict = (short)(nRestrict & (short)~LTDICLib.DicomVRRestrictionConstants.DICOM_VR_TEXT);
switch ( nRestrict )
{
case (short)LTDICLib.DicomVRRestrictionConstants.DICOM_VR_FIXED:
Text4.Text = "Fixed";
break;
case (short)LTDICLib.DicomVRRestrictionConstants.DICOM_VR_MAXIMUM:
Text4.Text = "Maximum";
break;
case (short)LTDICLib.DicomVRRestrictionConstants.DICOM_VR_MAXIMUM_GROUP:
Text4.Text = "Maximum Group";
break;
case (short)LTDICLib.DicomVRRestrictionConstants.DICOM_VR_ANY:
Text4.Text = "Any Length";
break;
case (short)LTDICLib.DicomVRRestrictionConstants.DICOM_VR_NOT_APPLICABLE:
Text4.Text = "Not Applicable";
break;
case (short)LTDICLib.DicomVRRestrictionConstants.DICOM_VR_MAX:
Text4.Text = "Max";
break;
default:
Text4.Text = System.Convert.ToString(LEADDICOM1.get_CurrentVR().Restrict);
break;
}
Text5.Text = System.Convert.ToString(LEADDICOM1.get_CurrentVR().UnitSize);
}
catch { }
}


MoveRootElement Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestMoveRootElement ( )
{
try
{
short nRet1 = 0;
short nRet2 = 0;
LEADDICOM1.EnableMethodErrors
 = true;

//move to first element in Data Set
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element: "
 + LEADDICOM1.get_CurrentTag().Name);

//move to next element in the same
 level of the Data Set
LEADDICOM1.MoveNextElement(true);
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element: "
 + LEADDICOM1.get_CurrentTag().Name);

//move to last element in the same
 level of the Data Set
LEADDICOM1.MoveLastElement(true);
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element: "
 + LEADDICOM1.get_CurrentTag().Name);

//move to previous element in the same
 level of the Data Set
LEADDICOM1.MovePrevElement(true);
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element: "
 + LEADDICOM1.get_CurrentTag().Name);

//find the first element that has a
 child
LEADDICOM1.EnableMethodErrors
 = false;
nRet1 = LEADDICOM1.MoveFirstElement(false);
while (nRet1 == 0)
{
nRet2 = LEADDICOM1.MoveChildElement();
if (nRet2 == 0)
{
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element:
 " + LEADDICOM1.get_CurrentTag().Name);
nRet1
 = 1; //end loop
}
if (nRet1 != 1)
{
//check
 next element in this same level
nRet1
 = LEADDICOM1.MoveNextElement(true);
}
}
LEADDICOM1.EnableMethodErrors
 = true;
//move back to the element's parent
if (nRet1 == 1)
{
LEADDICOM1.MoveParentElement();
LEADDICOM1.FindTag(LEADDICOM1.get_CurrentElement().Tag);
MessageBox.Show("Element:
 " + LEADDICOM1.get_CurrentTag().Name);
}
return;
}
catch
{
MessageBox.Show("Error");
}
}


MoveRootIOD Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestMoveRootIOD ( )
{
try
{
LEADDICOM1.EnableMethodErrors
 = true;
//Move to the Root IOD
LEADDICOM1.MoveRootIOD();
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
//Move to the first Child IOD
LEADDICOM1.MoveChildIOD();
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
//Move back to the Parent IOD
LEADDICOM1.MoveParentIOD();
MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
return;
}
catch
{
MessageBox.Show("Error");
}
}


NetClose Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetClose(int hNet, int nStatus, int hPeer)
{
string Out = null;
//a connection is being closed
//display some information about the connection:
Out = "Host: " + LEADDICOMNet1.GetHostAddress(hNet);
Out = Out + " Port: " + System.Convert.ToString(LEADDICOMNet1.GetHostPort(hNet));
Out = Out + "\r";
Out = Out + "Peer: " + LEADDICOMNet1.GetPeerAddress(hNet);
Out = Out + " Port: " + System.Convert.ToString(LEADDICOMNet1.GetPeerPort(hNet));
MessageBox.Show(Out, "Connection Closed");
}


NetConnect Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetConnect(int
 hNet, int nStatus)
{
string strOut = null;
string strTemp = null;
string strPeerAddress = null;
int lPort = 0;
strOut = "*** NetConnect Event *** " + "\r" + System.Convert.ToString(hNet)
 + " Status = " + System.Convert.ToString(nStatus);
strPeerAddress = LEADDICOMNet1.GetPeerAddress(hNet);
lPort = LEADDICOMNet1.GetPeerPort(hNet);
strTemp = "PeerAddress = " + strPeerAddress + "\r"
 + "Port = " + System.Convert.ToString(lPort);
strOut = strOut + "\r" + strTemp;
//MessageBox.Show ( strOut ) ;
}


NetNonSecureReceivedISCL Example for C#

private void LEADDICOMNet1_NetNonSecureReceivedISCL(int
 hNet, int nError, ref object vBuffer, int nLength)
{
byte[] DataBuffer = (byte[])vBuffer;
if (nError == (int)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("1st byte of data
 = " + DataBuffer[0] + ", last byte of data = " + DataBuffer[nLength
 - 1]);
}


NetNonSecureSendISCL Example for C#

private void LEADDICOMNet1_NetNonSecureSendISCL(int hNet, int nError, int nType, int nLength)
{
if (nError == (int)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("Data was successfully received");
}


NetReceive Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetReceive(int hNet, int nStatus, short nType,
 object pData, int lSize)
{
MessageBox.Show ( "data received - " + LEADDICOMNet1.GetPeerAddress(hNet)
 + " Status=" + nStatus.ToString() + " Type=" + nType.ToString()
 ) ;
}


NetReceiveAbort (Communication Control)Example for C#

NetReceiveAbort Example for C#

private void LEADDICOMNet1_NetReceiveAbort(int
 hNet, short nSource, short nReason)
{
string strMsg;
strMsg= string.Format("*** NetReceiveAbort Event
 ***\nSource{0}\nReason{1}", nSource, nReason);
MessageBox.Show(strMsg);
}


NetReceiveAssociateAccept (Communication Control)Example for C#

NetReceiveAssociateAccept Example for C#

//This example uses the predefined variable “LEADDICOMNet1” of type “LEADDicomNet” from “LEADTOOLS Toolkit”.
private void LEADDICOMNet1_NetReceiveAssociateAccept(int hNet, int hPDU)
{
MessageBox.Show("Associate Accept Received - " + System.Convert.ToString(LEADDICOMNet1.IsAssociated(hNet)));
}


NetReceiveAssociateReject (Communication Control)Example for C#

NetReceiveAssociateReject Example for C#

private void LEADDICOMNet1_NetReceiveAssociateReject(int hNet, short nResult, short nSource, short nReason)
{
MessageBox.Show("Associate Request was rejected: Result= " + System.Convert.ToString(nResult) + " Source=" + System.Convert.ToString(nSource) + " Reason=" + System.Convert.ToString(nReason));
}


NetReceiveAssociateRequest Example for C#

//This example uses the predefined variable “List2” of type
 “ListBox” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetReceiveAssociateRequest(int
 hNet, int hPDU)
{
int x = 0;
short nID = 0;
short nResult = 0;
string szAbstract = null;
string szTransfer = null;
//we have received an AssociateRequest
List2.Items.Add("Associate Request was received");
//check the version, if not 1, reject it
if (LEADDICOMNet1.GetVersion(hPDU)
 != 1)
LEADDICOMNet1.SendAssociateReject(hNet,
 (short)LTDNCLib.AssociateRejectConstants.PDU_REJECT_RESULT_PERMANENT,
 (short)LTDNCLib.AssociateRejectConstants.PDU_REJECT_SOURCE_USER, (short)LTDNCLib.AssociateRejectConstants.PDU_REJECT_REASON_UNKNOWN);
else
{
//send associate accept class back
LEADDICOMNet1.CreateAssociate(false);
LEADDICOMNet1.ResetAssociate(LEADDICOMNet1.hPDU,
 false);
//copy all presentation objects from received hPDU
//also, reply that we only support the first Transfer Syntax from the received
 hPDU
for (x = 0; x < LEADDICOMNet1.GetPresentationCount(hPDU);
 x++)
{
nID = LEADDICOMNet1.GetPresentationID(hPDU,
 x);
szTransfer = LEADDICOMNet1.GetTransferSyntax(hPDU, nID, 0);
nResult = (short)LTDNCLib.AssociateAcceptConstants.PDU_ACCEPT_RESULT_SUCCESS;
szAbstract = LEADDICOMNet1.GetPresentationAbstract(hPDU,
 nID);
LEADDICOMNet1.AddPresentation(LEADDICOMNet1.hPDU,
 nID, nResult, szAbstract);
LEADDICOMNet1.AddTransferSyntax(LEADDICOMNet1.hPDU,
 nID, szTransfer);
}
LEADDICOMNet1.SendAssociateAccept(hNet);
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU);
}
}


NetReceiveCCancelRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetReceiveCCancelRequest(int
 hNet, short nPresentationID, short nMessageID)
{
//note, this sample AE ignores C-CANCEL-REQUEST commands for simplicity
MessageBox.Show("C-CANCEL-REQUEST was received - " + LEADDICOMNet1.GetPeerAddress(hNet));
}


NetReceiveCEchoResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCEchoResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, int nStatus)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command
 Set - " + "C-ECHO-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP
 Class: " + szName + " - " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP
 Class: " + pszClass);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
}


NetReceiveCFindResponse Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable "nFileCount" of type
 "int"
private void LEADDICOMNet1_NetReceiveCFindResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, int nStatus,
 int hDS)
{
string strPeerAddress = null;
string strStatus = null;
string strMsg = null;
string strFileName = null;
strPeerAddress = LEADDICOMNet1.GetPeerAddress(hNet);
if (nStatus == (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PENDING)
strStatus = "COMMAND_STATUS_PENDING";
if (nStatus == (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS)
strStatus = "COMMAND_STATUS_SUCCESS";
if (nStatus == (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_CANCEL)
strStatus = "COMMAND_STATUS_CANCEL";
strMsg = "*** OnNetReceiveCFindResponse ***" + System.Environment.NewLine
 + "Peer[" + strPeerAddress + "]" + System.Environment.NewLine
 + "nPresentationID[" + System.Convert.ToString(nPresentationID).ToString()
 + "]" + System.Environment.NewLine + "nMessageID["
 + System.Convert.ToString(nMessageID).ToString() + "]" + System.Environment.NewLine
 + "pszClass[" + pszClass + "]" + System.Environment.NewLine
 + "strStatus[" + strStatus + "]" + System.Environment.NewLine;
if (hDS != 0)
{
//nFileCount is used to track the current CFindRequest responses count.
nFileCount = nFileCount + 1;
strFileName = "d:\\temp\\CFind" + nFileCount.ToString() + ".dic";
LEADDICOM1.SaveExtDS(hDS, strFileName, 0);
strMsg = strMsg + "Saving[" + strFileName + "]";
}
MessageBox.Show(strMsg);
}


NetReceiveCGetRequest Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCGetRequest(int
 hNet, short nPresentationID, short nMessageID, string pszClass, short
 nPriority, int hDS)
{
short nRet = 0;
string szFile = null;
System.Windows.Forms.TreeNode NewNode = null;
string szReply = null;
string szName = null;
string szAE = null;
int hPDU = 0;
string szInstance = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-GET-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Priority: " + System.Convert.ToString(nPriority));
//perform the get
//here, the AE should check the data set, and perform
//matching against the files stored on the AE to determine
//what data set(s) should be sent back to the calling AE.
//In our case, we just send back a predetermined file for
//this demo!
//load the sample file
//NOTE: this sample is looking for a particular filename
TEST2.DIC szFile = "e:\\images\\dicom16.dic";
nRet = LEADDICOM1.LoadDS(szFile,
 0);
//now, send a store command for the get sub-operation
hPDU = LEADDICOMNet1.GetAssociate(hNet);
szAE = LEADDICOMNet1.GetCalling(hPDU);
nRet = LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_SOP_INSTANCE_UID,
 false);
if (nRet == 0)
{
nRet = LEADDICOM1.GetStringValue(0,
 1);
if (nRet == 0)
szInstance = LEADDICOM1.get_StringValues(0);
}
nRet = LEADDICOMNet1.SendCStoreRequest(hNet,
 nPresentationID, (short)(nMessageID + 1), pszClass, szInstance, nPriority,
 szAE, nMessageID, LEADDICOM1.hDicomDS);
//the above will cause a ReceiveCStoreResponse event on this machine
//we will send a get response after we have received the CStoreResponse
 from the calling AE
}


NetReceiveCGetResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCGetResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, int nStatus,
 short nRemaining, short nCompleted, short nFailed, short nWarning, int
 hDS)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-GET-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
NewNode.Nodes.Add("Remaining Operations: " + System.Convert.ToString(nRemaining));
NewNode.Nodes.Add("Failed Operations: " + System.Convert.ToString(nFailed));
NewNode.Nodes.Add("Warnings: " + System.Convert.ToString(nWarning));
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
}


NetReceiveCMoveRequest Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCMoveRequest(int
 hNet, short nPresentationID, short nMessageID, string pszClass, short
 nPriority, string pszMoveAE, int hDS)
{
short nRet = 0;
System.Windows.Forms.TreeNode NewNode = null;
string szReply = null;
string szName = null;
int hPDU = 0;
string szAbstract = null;
string szTransfer = null;
string szInstance = null;
string szClassUID = null;
short nID = 0;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-MOVE-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
hPDU = LEADDICOMNet1.   GetAssociate(hNet);
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Priority: " + System.Convert.ToString(nPriority));
NewNode.Nodes.Add("Move AE Title: " + pszMoveAE);
//this sample simply returns a fixed dicom data set.
LEADDICOM1.LoadDS("e:\\images\\dicom16.dic",
 0);
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_SOP_INSTANCE_UID,
 false);
LEADDICOM1.GetStringValue(0,
 1);
szInstance = LEADDICOM1.get_StringValues(0);
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_SOP_CLASS_UID,
 false);
LEADDICOM1.GetStringValue(0,
 1);
szClassUID = LEADDICOM1.get_StringValues(0);
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
 Supported by Association!");
//send a response
LEADDICOMNet1.SendCMoveResponse(hNet, nPresentationID, nMessageID, pszClass,
 (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_NO_SUCH_CLASS,
 0, 0, 1, 0, 0);
return;
}
//now, send the C-STORE sub operation
LEADDICOMNet1.SendCStoreRequest(hNet,
 nID, (short)(nMessageID + 1), szClassUID, szInstance, nPriority, pszMoveAE,
 nMessageID, LEADDICOM1.hDicomDS);
//send a response
LEADDICOMNet1.SendCMoveResponse(hNet, nPresentationID, nMessageID, pszClass,
 (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS, 0, 1,
 0, 0, 0);
}


NetReceiveCMoveResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCMoveResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, int nStatus,
 short nRemaining, short nCompleted, short nFailed, short nWarning, int
 hDS)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-MOVE-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
NewNode.Nodes.Add("Remaining: " + System.Convert.ToString(nRemaining));
NewNode.Nodes.Add("Completed: " + System.Convert.ToString(nCompleted));
NewNode.Nodes.Add("Failed: " + System.Convert.ToString(nFailed));
NewNode.Nodes.Add("Warning: " + System.Convert.ToString(nWarning));
}


NetReceiveCStoreResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCStoreResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, int nStatus)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-STORE-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszClass);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
}


NetReceiveData Example for C#

//This example uses the predefined variable “List2” of type
 “ListBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveData(int hNet, short nID, int hDicomCS,
 int hDicomDS)
{
//data was received
List2.Items.Add("Data was received - " + " ID: " +
 System.Convert.ToString(nID));
if (hDicomDS == 0)
List2.Items.Add("Data is a command set only!");
else
{
//save the data set to disk
List2.Items.Add("Data includes a data set - saved to disk!");
LEADDICOM1.SaveExtDS(hDicomDS, "c:\\temp\\test.dic", 0);
}
}


NetReceiveNActionRequest Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNActionRequest(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, short nAction, int hDS)
{
short nRet = 0;
System.Windows.Forms.TreeNode NewNode = null;
string szReply = null;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-ACTION-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Requested SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Requested SOP Class: " + pszClass);
NewNode.Nodes.Add("Requested SOP Instance: " + pszInstance);
NewNode.Nodes.Add("Action: " + System.Convert.ToString(nAction));
//this function should perform the action command - this is a function
 that you have to write
nRet = PerformActionCommand(pszClass, pszInstance, hDS);
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
nRet = (short)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PROCESSING_FAILURE;
//send a response
LEADDICOMNet1.SendNActionResponse(hNet, nPresentationID, nMessageID, pszClass,
 pszInstance, nRet, nAction, hDS);
}


NetReceiveNActionResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNActionResponse(int hNet, short nPresentationID,
 short nMessageID, string pszClass, string pszInstance, int nStatus, short
 nAction, int hDS)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-ACTION-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
TreeView1.Nodes.Add("Affected SOP Instance: " + pszInstance);
TreeView1.Nodes.Add("Action: " + System.Convert.ToString(nAction));
TreeView1.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
}


NetReceiveNCreateResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNCreateResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, int nStatus, int hDS)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-CREATE-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
}


NetReceiveNDeleteResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNDeleteResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, int nStatus)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-DELETE-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
}


NetReceiveNGetRequest Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
//LEADDICOM2 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNGetRequest(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance)
{
short nRet = 0;
System.Windows.Forms.TreeNode NewNode = null;
string szReply = null;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-GET-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
//this function will fill the values the data set elements in
LEADDICOM2.hDicomDS nRet = PerformNGETCommand(pszClass, pszInstance);
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
nRet = (short)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE;
//send a response
LEADDICOMNet1.SendNGetResponse(hNet, nPresentationID, nMessageID, pszClass,
 pszInstance, nRet, LEADDICOM2.hDicomDS);
}

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
//LEADDICOM2 is a DICOM Dataset defined outside this method
private short PerformNGETCommand(string pszClass, string pszInstance)
{
short nRet = 0;
int nTag = 0;
int x = 0;
short nVR = 0;
//this sample simply loads a fixed data set
//here, a server should check the class and instance against
//all SOP classes it manages, and then fill out hDS from the
//correctly matching instance, if one is found
nRet = LEADDICOM1.LoadDS("e:\\images\\dicom16.dic",
 0);
LEADDICOM2.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN,
 0);
LEADDICOM2.ResetDS();
if (nRet == 0)
LEADDICOM1.MoveFirstElement(false);
else return nRet;
for (x = 0; x < LEADDICOMNet1.RequestAttributeCount; x++)
{
//get each element
nTag = LEADDICOMNet1.get_RequestAttributes(x);
LEADDICOM1.FindTag(nTag);
nVR = LEADDICOM1.get_CurrentTag().VR;
nRet = LEADDICOM1.FindFirstElement(nTag,
 false);
//in this sample, if we don't find the requested tag, we
//do not return an empty element!
if (nRet == 0)
{
//copy the element value LEADDICOM1.GetConvertValue InsertElement();
LEADDICOM2.InsertElement(false,
 nTag, nVR, false, 0);
LEADDICOM2.StringValueCount
 = 1;
LEADDICOM2.set_StringValues(0,
 LEADDICOM1.get_StringValues(0));
LEADDICOM2.SetConvertValue();
}
}
return (short) LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS;
}


NetReceiveNGetResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable "gszGetFile" of type
 "string"
private void LEADDICOMNet1_NetReceiveNGetResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, int nStatus, int hDS)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-GET-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
if (hDS != 0)
{
//gszGetFile represent the file path to store the dataset.
nRet = LEADDICOM1.SaveExtDS(hDS, gszGetFile, 0);
TreeView1.Nodes.Add("Data Set - " + gszGetFile);
NewNode.EnsureVisible();
}
}


NetReceiveNReportRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNReportRequest(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, short nEvent, int hDS)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command
 Set - " + "N-REPORT-REQUEST");
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
NewNode.Nodes.Add("Event: " + System.Convert.ToString(nEvent));
//send response
LEADDICOMNet1.SendNReportResponse(hNet, nPresentationID, nMessageID, pszClass,
 pszInstance, (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS,
 nEvent, 0);
}


NetReceiveNReportResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNReportResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, int nStatus, short nEvent, int hDS)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-REPORT-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Client: " + LEADDICOMNet1.GetPeerAddress(hNet));
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
NewNode.Nodes.Add("Event: " + System.Convert.ToString(nEvent));
}


NetReceiveNSetRequest Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNSetRequest(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, int hDS)
{
short nRet = 0;
System.Windows.Forms.TreeNode NewNode = null;
string szReply = null;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-SET-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
//this function will change the values of the requested SOP Instance
//to the values specefied in the data set elements in hDS
//this function should search all the managed SOP Instances for a
//match, and then change the requested elements.
//This is a function you must write
//nRet = PerformNSETCommand(pszClass, pszInstance, hDS)
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
nRet = (short)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE;
//send a response
LEADDICOMNet1.SendNSetResponse(hNet, nPresentationID, nMessageID, pszClass,
 pszInstance, nRet, 0);
}


NetReceiveNSetResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNSetResponse(int
 hNet, short nPresentationID, short nMessageID, string pszClass, string
 pszInstance, int nStatus, int hDS)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-SET-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
}


NetReceiveReleaseRequest Example for C#

//This example uses the predefined variable “List2” of type
 “ListBox” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetReceiveReleaseRequest(int
 hNet)
{
string Out = null;
//Release Request was received
Out = "Release Request was received";
List2.Items.Add(Out);
LEADDICOMNet1.SendReleaseResponse(hNet);
}


NetReceiveReleaseResponse Example for C#

//This example uses the predefined variable “List2” of type
 “ListBox” from “.NET Framework”.
private void LEADDICOMNet1_NetReceiveReleaseResponse(int
 hNet)
{
string Out = null;
//Release Response was received
Out = "Release Response was received";
List2.Items.Add(Out);
}


NetReceiveUnknown Example for C#

private void LEADDICOMNet1_NetReceiveUnknown(int
 hNet, short nPresentationID, int hCS, int hDS)
{
string Out = null;
Out = "Unknown Command Set/Data Set was received, and ignored";
Out = Out + "\r";
Out = Out + "Presentation ID: " + System.Convert.ToString(nPresentationID);
MessageBox.Show(Out);
}


NetSecureLinkReady Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetSecureLinkReady(int
 hNet, int nError)
{
int lTest = 0;
if (nError != (int)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
MessageBox.Show("Error Code is
 " + LEADDICOMNet1.GetErrorSecure(hNet));
return;
}
lTest = LEADDICOMNet1.GetCiphersuiteTLS(LEADDICOMNet1.hNet);
if (lTest == (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)
MessageBox.Show("Ciphersuite is
 DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA");
}


NetSend Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetSend(int hNet, short nStatus, short nType, int lBytes)
{
//Some data was sent
MessageBox.Show ( "Data Sent to: " + LEADDICOMNet1.GetPeerAddress(hNet) + " Status = " + nStatus.ToString() ) ;
}


Preamble Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestPreamble ( )
{
LEADDICOM1.GetDSPreamble();
MessageBox.Show(LEADDICOM1.Preamble);
}

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestPreamble2()
{
LEADDICOM1.Preamble = Text1.Text;
LEADDICOM1.SetDSPreamble();
}


ProgressStatus Example for C#

//This example uses the predefined variable “Label1” of type
 “Label” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable "bQuit" of type "bool"
private void LEADDICOM1_ProgressStatus(short nPercent)
{
Label1.Text = "Loading..." + System.Convert.ToString(nPercent)
 + "%";
if (bQuit == true)
//bQuit is used to indicate the user request to abort
 the current operation. LEADDICOM1.EnableProgressEvent = false;
//stop the load System.Windows.Forms.Application.DoEvents();
}


ResetDS Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestResetDS ( )
{
//close the current Data Set
LEADDICOM1.ResetDS();
}


ResetIOD Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestResetIOD ()
{
//clear all IOD items LEADDICOM1.ResetIOD();
}


ResetTag Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestResetTag ( )
{
//Clear all Tags
LEADDICOM1.ResetTag();
}


ResetUID Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestResetUID ()
{
//Clear all UID Items
LEADDICOM1.ResetUID();
}


ResetVR Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestResetVR ()
{
//Clear all items from the VR Table
LEADDICOM1.ResetVR();
}


SaveDS Example for C#

//This example uses the predefined variable “SaveDlg1” of
 type “SaveFileDialog” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSaveDS ( )
{
short nRet = 0;
//save a Data Set
LEADDICOM1.EnableMethodErrors
 = false;
SaveDlg1.Filter = "DICOM Data Set|*.dic";
SaveDlg1.ShowDialog();
if (SaveDlg1.FileName != "")
{
nRet = LEADDICOM1.SaveDS(SaveDlg1.FileName,
 0);
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("Error
 " + System.Convert.ToString(nRet) + " saveing file!");
}
LEADDICOM1.EnableMethodErrors
 = true;
}


Searching the Data Set for a Digital Signature Example for C#

public void FindSignature(ref LTDICLib.LEADDicomDS objDS,
 ref string sSignatureUID)
{
// Search the whole Data Set for the Digital Signature with the
// specified Digital Signature UID
if (objDS.FindSignature(sSignatureUID)
 == false)
{
MessageBox.Show("The Digital Signature was not found.", "Sample");
return;
}
string sMsg = null;
sMsg = "The Digital Signature was found." + System.Environment.NewLine
 + "Press Yes to examine it or No to delete it.";
switch (MessageBox.Show(sMsg, "Sample", MessageBoxButtons.YesNoCancel))
{
case DialogResult.Yes:
// Refer to Examining a Digital Signature Example
// for the procedure ExamineSignature
ExamineSignature(objDS, objDS.get_CurrentElement().hElement);
break;
case DialogResult.No:
// Delete the Digital Signature
objDS.DeleteSignature();
break;
}
}


SendAbort Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSendAbort ( )
{
//send Abort message
LEADDICOMNet1.SendAbort(LEADDICOMNet1.hNet, (short)LTDNCLib.AbortConstants.PDU_ABORT_SOURCE_USER, 0);
}


SendAssociateRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSendAssociateRequest ( )
{
//create the Associate Class as Request LEADDICOMNet1.CreateAssociate(true);
//use default for association LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU);
LEADDICOMNet1.SetCalling(LEADDICOMNet1.hPDU,
 "MI_CLIENT");
LEADDICOMNet1.SetCalled(LEADDICOMNet1.hPDU, "MI_SERVER");
//this shows a client sending to its server
LEADDICOMNet1.SendAssociateRequest(LEADDICOMNet1.hNet);
//now we can free the class
LEADDICOMNet1.FreeAssociate
 ( LEADDICOMNet1.hPDU ) ;
}


SendCCancelRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSendCCancelRequest ( )
{
//This example sends a C-Cancel Request to a server
//
//In this example:
//1. A connection exists between client and server
//2. An association exists between the client and server
short nPresentationID = 1;   //PresentationID
 of message to cancel
short nMessageID = 1;   //ID of message
 to cancel
LEADDICOMNet1.SendCCancelRequest(LEADDICOMNet1.hNet,
 nPresentationID, nMessageID);
}


SendCEchoRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSendCEchoRequest ( )
{
const string UID_VERIFICATION_CLASS = "1.2.840.10008.1.1";
// Verification SOP Class
string szUID = null;
short nID = 0;
short nRet = 0;
int hPDU = 0;
//send an Echo Request Command to the server
szUID = UID_VERIFICATION_CLASS;
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szUID + ", Not Supported
 by Association!");
return;
}
//now, use the high-level method to send the command set
LEADDICOMNet1.SendCEchoRequest(LEADDICOMNet1.hNet,
 nID, 99, szUID);
}


SendCEchoResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCEchoRequest(int
 hNet, short nPresentationID, short nMessageID, string pszClass)
{
short nRet = 0;
System.Windows.Forms.TreeNode NewNode = null;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-ECHO-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
//use high-level method to send a response
LEADDICOMNet1.SendCEchoResponse(hNet,
 nPresentationID, nMessageID, pszClass, (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS);
}


SendCFindRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
//LEADDICOM2 is a DICOM Dataset defined outside this method
//This example uses the predefined variable “nFileCount” of type “int”
private void TestSendCFindRequest ( )
{
const string UID_STUDY_ROOT_QUERY_FIND = "1.2.840.10008.5.1.4.1.2.2.1";   //
 Study Root Query/Retrieve Information Model - FIND
int hPDU = 0;
int nID = 0;
bool b = false;
short nRet = 0;
short nVR = 0;
string szUID = null;
int x = 0;

//this example sends a command that will find all STUDIES
 on a called AE that
//supports the Study Root Query/Retrieve Information
 Model - FIND SOP Class

//send a Find request to the server
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
szUID = UID_STUDY_ROOT_QUERY_FIND;
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szUID);
if (nRet == 0)
MessageBox.Show("Abstract
 Syntax, " + LEADDICOM1.get_CurrentUID().Name + ", Not Supported
 by Association!");
else
MessageBox.Show("Abstract
 Syntax, " + szUID + ", Not Supported by Association!");
return;
}

//create a find attribute data set
LEADDICOM2.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN,
 0);
LEADDICOM2.ResetDS();

//add the required fields for this seach
LEADDICOM2.FindTag((int)   LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL, nVR,
 false, 0);
LEADDICOM2.StringValueCount
 = 1;
LEADDICOM2.set_StringValues(0,"STUDY");   //we
 are searching at the study level
LEADDICOM2.SetStringValue(1);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DATE);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DATE, nVR, false, 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_TIME);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_TIME, nVR, false, 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_ACCESSION_NUMBER);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_ACCESSION_NUMBER, nVR, false,
 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME, nVR, false,
 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, nVR, false, 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants5.TAG_STUDY_ID);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants5.TAG_STUDY_ID, nVR, false, 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants5.TAG_STUDY_INSTANCE_UID);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants5.TAG_STUDY_INSTANCE_UID, nVR, false,
 0);
//optional tags LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DESCRIPTION);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DESCRIPTION, nVR, false,
 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, false,
 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX, nVR, false, 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_OTHER_PATIENT_IDS);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_OTHER_PATIENT_IDS, nVR, false,
 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_ADDITIONAL_PATIENT_HISTORY);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_ADDITIONAL_PATIENT_HISTORY,
 nVR, false, 0);
LEADDICOM2.FindTag((int)LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_STUDY_RELATED_INSTANCES);
nVR = LEADDICOM2.get_CurrentTag().VR;
LEADDICOM2.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_STUDY_RELATED_INSTANCES,
 nVR, false, 0);
//now, send the command set and data set
//nFileCount is used to track the current CFindRequest
 responses count.
nFileCount = 0;
LEADDICOMNet1.SendCFindRequest(LEADDICOMNet1.hNet,
 (short)nID, 1, szUID, (short)LTDICLib.DicomCommandSetMessagePriorities.COMMAND_PRIORITY_MEDIUM,
 LEADDICOM2.hDicomDS);
}


SendCFindResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCFindRequest(int hNet, short nPresentationID,
 short nMessageID, string pszClass, short nPriority, int hDS)
{
int x = 0;
int hPDU = 0;
string szAE = null;
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
string szFile = null;
string szReply = null;
//this sample simple returns all the data sets that it is managing.
//in a real-life scenario, this should perform an actual query based
//on the attribute values supplied in hDS
hPDU = LEADDICOMNet1.GetAssociate(hNet);
szAE = LEADDICOMNet1.GetCalling(hPDU);
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-FIND-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Priority: " + System.Convert.ToString(nPriority));
//load sample file 1
nRet = LEADDICOM1.LoadDS("e:\\images\\dicom16.dic",
 0);
if (nRet == 0)
{
LEADDICOMNet1.SendCFindResponse(hNet,
 nPresentationID, nMessageID, pszClass, (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PENDING,
 LEADDICOM1.hDicomDS);
}
//send a Find Response - PENDING
nRet = LEADDICOM1.LoadDS("e:\\images\\test.dic", 0);
if (nRet == 0)
{
LEADDICOMNet1.SendCFindResponse(hNet,
 nPresentationID, nMessageID, pszClass, (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PENDING,
 LEADDICOM1.hDicomDS);
}
//now, send a Find Response - SUCCESS
LEADDICOMNet1.SendCFindResponse(hNet,
 nPresentationID, nMessageID, pszClass, (int)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_SUCCESS,
 0);
}


SendCGetRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable “gszGetFile” of type “string”
private void TestSendCGetRequest ( )
{
const string UID_SC_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.7";
// Secondary Capture Image Storage
short nRet = 0;
string szClassUID = null;
short nVR = 0;
int hPDU = 0;
short nID = 0;
//send a get request to the server
//gszGetFile will be used when this AE receives the NetReceiveCStoreRequest
//associated with this CGetRequest to save the data set
gszGetFile = "d:\\temp\\get_request.dic" ;
szClassUID = UID_SC_IMAGE_STORAGE ;
//create the data set that encodes the identifier to be matched
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN,
 0);
//add the required elements
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL, nVR,
 false, 0);
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.set_StringValues(0,
 "PATIENT");
LEADDICOM1.SetStringValue(1);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME);
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME, LEADDICOM1.get_CurrentTag().VR,
 false, 0);
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.set_StringValues(0,
 "*");
//get all patients LEADDICOM1.SetStringValue(1);
//add the optional fields that we want returned
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID);
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, LEADDICOM1.get_CurrentTag().VR,
 false, 0);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, false,
 0);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX, nVR, false, 0);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES,
 nVR, false, 0);
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
//now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
 Supported by Association!");
return;
}
LEADDICOMNet1.SendCGetRequest(LEADDICOMNet1.hNet,
 nID, 999, szClassUID, (short)LTDICLib.DicomCommandSetMessagePriorities.COMMAND_PRIORITY_MEDIUM,
 LEADDICOM1.hDicomDS);
//we now must wait for the response and for the C-STORE sub-operations
}


SendCGetResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCStoreResponse(int hNet, short nPresentationID,
 short nMessageID, string pszClass, string pszInstance, int nStatus)
{
System.Windows.Forms.TreeNode NewNode = null;
short nRet = 0;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-STORE-RESPONSE");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszClass);
NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
//use high-level method to send a response
LEADDICOMNet1.SendCGetResponse
 ( hNet, nPresentationID, nMessageID, pszClass, nRet, 0, 1, 0, 0, 0 );
}


SendCMoveRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable "gszGetFile" of type
 "string"
private void TestSendCMoveRequest ( )
{
const string UID_NM_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.20";
// Nuclear Medicine Image Storage
short nRet = 0;
string szClassUID = null;
short nVR = 0;
int hPDU = 0;
short nID = 0;
//send a Move Request to the server
//gszGetFile is a global variable that will be used when
 we get
//the C-STORE-RQ event to store the file
gszGetFile = "d:\\temp\\move_request.dic" ;
szClassUID = UID_NM_IMAGE_STORAGE ;
//create the data set that encodes the identifier to
 be matched
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN,
 0);
//add the required elements
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_QUERY_RETRIEVE_LEVEL, nVR,
 false, 0);
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.set_StringValues(0,
 "PATIENT");
LEADDICOM1.SetStringValue(1);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME);
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME, LEADDICOM1.get_CurrentTag().VR,
 false, 0);
//add the optional fields that we want returned
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID);
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, LEADDICOM1.get_CurrentTag().VR,
 false, 0);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, false,
 0);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX, nVR, false, 0);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES,
 nVR, false, 0);
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
//now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract
 Syntax, " + LEADDICOM1.get_CurrentUID().Name + ", Not Supported
 by Association!");
else
MessageBox.Show("Abstract
 Syntax, " + szClassUID + ", Not Supported by Association!");
return;
}
//we are asking the Called AE to move the SOP Instance
 to ourselves
LEADDICOMNet1.SendCMoveRequest(LEADDICOMNet1.hNet,
 nID, 1, szClassUID, (short)LTDICLib.DicomCommandSetMessagePriorities.COMMAND_PRIORITY_MEDIUM,
 "MI_TEST", LEADDICOM1.hDicomDS);
//we now must wait for the response and for the C-STORE
 sub-operations
}


SendCStoreRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSendCStoreRequest ( )
{
short nRet = 0;
int hPDU = 0;
int nID = 0;
string szClassUID = null;
string szInstanceUID = null;
//send a store request to the server
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
//pick the data set to send
nRet = LEADDICOM1.LoadDS("e:\\images\\dicom16.dic",
 0);
if (nRet != 0)
{
MessageBox.Show("Error Loading
 Data Set!", "Error");
System.Windows.Forms.Cursor.Current
 = System.Windows.Forms.Cursors.Default;
return;
}
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_SOP_INSTANCE_UID,
 false);
LEADDICOM1.GetStringValue(0,
 1);
szInstanceUID = LEADDICOM1.get_StringValues(0);
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_SOP_CLASS_UID,
 false);
LEADDICOM1.GetStringValue(0,
 1);
szClassUID = LEADDICOM1.get_StringValues(0);
//send the command set
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
 Supported by Association!");
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
return;
}
LEADDICOMNet1.SendCStoreRequest(LEADDICOMNet1.hNet,
 (short)nID, 999, szClassUID, szInstanceUID, (short)LTDICLib.DicomCommandSetMessagePriorities.COMMAND_PRIORITY_MEDIUM,
 "", 0, LEADDICOM1.hDicomDS);
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}


SendCStoreResponse Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCStoreRequest(int hNet, short nPresentationID,
 short nMessageID, string pszClass, string pszInstance, short nPriority,
 string pszMoveAE, short nMoveMessageID, int hDS)
{
short nRet = 0;
System.Windows.Forms.TreeNode NewNode = null;
string szReply = null;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "C-STORE-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
NewNode.Nodes.Add("Priority: " + System.Convert.ToString(nPriority));
NewNode.Nodes.Add("Move AE Title: " + pszMoveAE);
NewNode.Nodes.Add("Move Message ID: " + System.Convert.ToString(nMoveMessageID));
//perform the store - this is a function that you have to write
nRet = PerformStoreCommand(hDS);
//send a response
szReply = "Store Response Command Set Sent - ";
//use high-level method to send a response
LEADDICOMNet1.SendCStoreResponse(hNet,
 nPresentationID, nMessageID, pszClass, pszInstance, nRet);
MessageBox.Show(szReply + LEADDICOMNet1.GetPeerAddress(hNet));
}


SendData Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
//LEADDICOM2 is a DICOM Dataset defined outside this method
private void TestSendData ()
{
//send a command set, then a data set
LEADDICOM2.InitCS((short)   LTDICLib.DicomCommandSetConstants.COMMAND_C_STORE,
 true);
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE,
 0);
//client is sending data LEADDICOMNet1.SendData(LEADDICOMNet1.hNet, 1,
 LEADDICOM2.hDicomDS, LEADDICOM1.hDicomDS);
}


SendNActionRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSendNActionRequest ( )
{
//this sample shows how to send an N-ACTION-REQUEST
const string UID_BASIC_FILM_BOX_CLASS = "1.2.840.10008.5.1.1.2";
// Basic Film Box SOP Class
short nRet = 0;
string szClassUID = null;
string szInstance = null;
int hPDU = 0;
short nID = 0;
short nAction = 0;
//send an N-ACTION-REQUEST to the server
nAction = 1 ;
szClassUID = UID_BASIC_FILM_BOX_CLASS ;
szInstance = "1.1.1.1" ;
//here you would create a data set that encodes the Action Arguments
//for this example, we just load a dataset
//... nRet = LEADDICOM1.LoadDS("e:\\images\\dicom16.dic",
 0);
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
//now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
 Supported by Association!");
return;
}
LEADDICOMNet1.SendNActionRequest(LEADDICOMNet1.hNet,
 nID, 1, szClassUID, szInstance, nAction, LEADDICOM1.hDicomDS);
}


SendNCreateRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSendNCreateRequest ( )
{
const string UID_SC_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.7";
// Secondary Capture Image Storage
string szClassUID = null;
string szInstanceUID = null;
short nID = 0;
int hPDU = 0;
short nRet = 0;
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
szClassUID = UID_SC_IMAGE_STORAGE ;
szInstanceUID = "1.2.840.113619.2.30.1.1762288927.1489.906240296.255"
 ;
//send a Create Request Command to the server
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
 Supported by Association!");
return;
}
//here, you should construct a Data Set that contains the attributes
//and values for the new SOP Instance.
//In this sample, we simply load a Data Set from a file on disk
//pick the data set to send
nRet = LEADDICOM1.LoadDS("e:\\images\\dicom16.dic",
 0);
//send a Delete Request message
LEADDICOMNet1.SendNCreateRequest(LEADDICOMNet1.hNet,
 nID, 999, szClassUID, szInstanceUID, LEADDICOM1.hDicomDS);
}


SendNCreateResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNCreateRequest(int hNet, short nPresentationID,
 short nMessageID, string pszClass, string pszInstance, int hDS)
{
short nRet = 0;
System.Windows.Forms.TreeNode NewNode = null;
string szReply = null;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-CREATE-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
//This is a function that would perform the actual creation of the SOP
 Instance - this is a function that you have to write
nRet = PerformCreateCommand(pszClass, pszInstance, hDS);
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
nRet = (short)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_PROCESSING_FAILURE;
//send a response
szReply = "Create Response Command Set Sent - ";
//note, we simply send back the passed hDS in this sample
LEADDICOMNet1.SendNCreateResponse(hNet, nPresentationID, nMessageID, pszClass,
 pszInstance, nRet, hDS);
}


SendNDeleteRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSendNDeleteRequest ( )
{
const string UID_SC_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.7";
// Secondary Capture Image Storage
string szClassUID = null;
string szInstanceUID = null;
short nID = 0;
int hPDU = 0;
short nRet = 0;
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
szClassUID = UID_SC_IMAGE_STORAGE ;
szInstanceUID = "1.2.840.113619.2.30.1.1762288927.1489.906240296.255";
//send a Delete Request Command to the server
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
 Supported by Association!");
return;
}
LEADDICOMNet1.SendNDeleteRequest(LEADDICOMNet1.hNet,
 nID, 999, szClassUID, szInstanceUID);
}


SendNDeleteResponse Example for C#

//This example uses the predefined variable “TreeView1” of
 type “TreeView” from “.NET Framework”.
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveNDeleteRequest(int hNet, short nPresentationID,
 short nMessageID, string pszClass, string pszInstance)
{
short nRet = 0;
System.Windows.Forms.TreeNode NewNode = null;
string szReply = null;
string szName = null;
NewNode = new System.Windows.Forms.TreeNode("Command Set - "
 + "N-DELETE-REQUEST");
TreeView1.Nodes.Add(NewNode);
NewNode.EnsureVisible();
NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
nRet = LEADDICOM1.FindUID(pszClass);
if (nRet == 0)
{
szName = LEADDICOM1.get_CurrentUID().Name;
NewNode.Nodes.Add("Affected SOP Class: " + szName + " -
 " + pszClass);
}
else
NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
NewNode.Nodes.Add("Affected SOP Instance: " + pszInstance);
//this is a function that you have to write
nRet = PerformDeleteCommand(pszClass, pszInstance);
if (nRet != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
nRet = (short)LTDNCLib.DicomCommandStatusConstants.COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE;
//send a response
szReply = "Delete Response Command Set Sent - ";
LEADDICOMNet1.SendNDeleteResponse(hNet,
 nPresentationID, nMessageID, pszClass, pszInstance, nRet);
MessageBox.Show(szReply + LEADDICOMNet1.GetPeerAddress(hNet));
}


SendNGetRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable "gszGetFile" of type
 "string"
private void TestSendNGetRequest ( )
{
const string UID_SC_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.7";
// Secondary Capture Image Storage
short nRet = 0;
string szClassUID = null;
string szInstance = null;
int hPDU = 0;
short nID = 0;
//send an N-GET-REQUEST to the server
//gszGetFile is a predefined variable used in the NetReceiveNGetResponse
 event
gszGetFile = "d:\\temp\\N_GET_REQ.dic" ;
szClassUID = UID_SC_IMAGE_STORAGE ;
szInstance = "1.1.1.1" ;
//here, you must create a list of the identifiers
//that you wish to get from the server
LEADDICOMNet1.RequestAttributeCount = 4;
LEADDICOMNet1.set_RequestAttributes(0, (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME);
LEADDICOMNet1.set_RequestAttributes(1, (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID);
LEADDICOMNet1.set_RequestAttributes(2, (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX);
LEADDICOMNet1.set_RequestAttributes(3, (int)LTDICLib.DicomDataSetTagConstants5.TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
//now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
 Supported by Association!");
return;
}
LEADDICOMNet1.SendNGetRequest(LEADDICOMNet1.hNet,
 nID, 1, szClassUID, szInstance);
}


SendNonSecureISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSendNonSecureISCL ( )
{
// number of bytes is 10 because the string has a terminating null character
object buffer = "Test ISCL" ;
LEADDICOMNet1.SendNonSecureISCL(LEADDICOMNet1.hNet,
 ref buffer, 10);
}


SendNReportRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSendNReportRequest ( )
{
const string UID_US_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.6.1";
// Ultrasound Image Storage
int x = 0;
int hClient = 0;
short nVR = 0;
string szClass = null;
string szInstance = null;
int hPDU = 0;
short nID = 0;
short nRet = 0;
//send an event report message to all clients
//let them know a new patient was created
//this sample just uses a made up instance
szClass = UID_US_IMAGE_STORAGE;
szInstance = "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1";
//create the data set
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN,
 0);
LEADDICOM1.ResetDS();

//add the required elements
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_SPECIFIC_CHARACTER_SET);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_SPECIFIC_CHARACTER_SET, nVR,
 false, 0);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATION_DATE);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATION_DATE, nVR,
 false, 0);
LEADDICOM1.DateValueCount
 = 1;
LEADDICOM1.get_DateValues(0).Day
 = 31;
LEADDICOM1.get_DateValues(0).Month
 = 12;
LEADDICOM1.get_DateValues(0).Year
 = 1999;
LEADDICOM1.SetDateValue(1);
LEADDICOM1.FindTag((int)   LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATION_TIME);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false, (int)LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATION_TIME,
 nVR, false, 0);
LEADDICOM1.TimeValueCount = 1;
LEADDICOM1.get_TimeValues(0).Hours = 12;
LEADDICOM1.get_TimeValues(0).Minutes = 30;
LEADDICOM1.SetTimeValue(1);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATOR_UID);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants1.TAG_INSTANCE_CREATOR_UID, nVR,
 false, 0);
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.set_StringValues(0,"9.9.9999.9");
//some unique value

LEADDICOM1.SetStringValue(1);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME);
nVR = LEADDICOM1.get_CurrentTag().VR;
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_NAME, nVR, false,
 0);
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.set_StringValues(0,
 "dummy_patient_name");
LEADDICOM1.SetStringValue(1);

//add the optional fields that we want returned
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID);
nVR = LEADDICOM1.get_CurrentTag().VR;

LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, nVR, false, 0);
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.set_StringValues(0,"dummy_patient_id");
LEADDICOM1.SetStringValue(1);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE);
nVR = LEADDICOM1.get_CurrentTag().VR;

LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_BIRTH_DATE, nVR, false,
 0);
LEADDICOM1.DateValueCount
 = 1;
LEADDICOM1.get_DateValues(0).Day
 = 31;
LEADDICOM1.get_DateValues(0).Month
 = 12;
LEADDICOM1.get_DateValues(0).Year
 = 1999;
LEADDICOM1.SetDateValue(1);
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX);
nVR = LEADDICOM1.get_CurrentTag().VR;

LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_SEX, nVR, false, 0);
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.set_StringValues(0,"M");
LEADDICOM1.SetConvertValue();
for (x = 0; x < LEADDICOMNet1.GetClientCount(LEADDICOMNet1.hNet);
 x++)
{
hClient = LEADDICOMNet1.GetClient(LEADDICOMNet1.hNet,
 x);
hPDU = LEADDICOMNet1.GetAssociate(hClient);
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClass);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClass);
if (nRet == 0)
MessageBox.Show("Abstract
 Syntax, " + LEADDICOM1.get_CurrentUID().Name + ", Not Supported
 by Association!");
else
MessageBox.Show("Abstract
 Syntax, " + szClass + ", Not Supported by Association!");
System.Windows.Forms.Cursor.Current
 = System.Windows.Forms.Cursors.Default;
}
//now, send the message
LEADDICOMNet1.SendNReportRequest(hClient,
 nID, 1, szClass, szInstance, 1, LEADDICOM1.hDicomDS);
}
}


SendNSetRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSendNSetRequest ( )
{
const string UID_SC_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.7";
// Secondary Capture Image Storage
short nRet = 0;
string szClassUID = null;
string szInstance = null;
int hPDU = 0;
short nID = 0;
string szNewID = null;
//this sample allows you to change the patient id of an SOP Instance
//send an N-GET-REQUEST to the server
szClassUID = UID_SC_IMAGE_STORAGE ;
szInstance = "1.1.1.1";
szNewID = "123-45-6789";
//create the data set that encodes the changed element(s)
LEADDICOM1.InitDS((int)LTDICLib.DicomClassConstants.DICOM_CLASS_UNKNOWN,
 0);
LEADDICOM1.ResetDS();
LEADDICOM1.FindTag((int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID);
LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants2.TAG_PATIENT_ID, LEADDICOM1.get_CurrentTag().VR,
 false, 0);
LEADDICOM1.StringValueCount
 = 1;
LEADDICOM1.set_StringValues(0,
 szNewID);
LEADDICOM1.SetStringValue(1);
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
//now, send a request
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
 szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
 + ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
 Supported by Association!");
return;
}
LEADDICOMNet1.SendNSetRequest(LEADDICOMNet1.hNet,
 nID, 1, szClassUID, szInstance, LEADDICOM1.hDicomDS);
}


SendReleaseRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSendReleaseRequest ( )
{
//set called application title
LEADDICOMNet1.SetCalled(LEADDICOMNet1.hPDU, "Called Program");
//set calling application title
LEADDICOMNet1.SetCalling(LEADDICOMNet1.hPDU, "Calling Program");
//display the current values
MessageBox.Show(LEADDICOMNet1.GetCalled(LEADDICOMNet1.hPDU));
MessageBox.Show(LEADDICOMNet1.GetCalling(LEADDICOMNet1.hPDU));
}


SetAuthDataISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetAuthDataISCL ( )
{
//Example 1
object AuthDataISCLMessage = "Server LEAD ISCL" ;
LEADDICOMNet1.SetAuthDataISCL(LEADDICOMNet1.hNet,
 ref AuthDataISCLMessage, 16);
//Example 2: Binary Data
byte[] DataArray = new byte[5];
object objDataArray = DataArray;
DataArray[0] = 0X21;
DataArray[1] = 0X14;
DataArray[2] = 0X0;
DataArray[3] = 0X45;
DataArray[4] = 0XF4;
LEADDICOMNet1.SetAuthDataISCL(LEADDICOMNet1.hNet,
 ref objDataArray, 5);
}


SetBitmapListValue example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//This example uses the predefined variable “LEADRasterView2” of type “AxLEADRasterView”
 from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSetBitmapListValue()
{
int lCount = 0;
short nRet = 0;
LTRASTERIOLib.LEADRasterIO IO = new LTRASTERIOLib.LEADRasterIO();
LTRASTERPROCLib.LEADRasterProcess Process = new LTRASTERPROCLib.LEADRasterProcess();
LEADDICOM1.EnableMethodErrors
 = false;

//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();

//insert a new element for the BitmapList Value
nRet = LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false);
nRet = LEADDICOM1.DeleteElement();
nRet = LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, (short)LTDICLib.DicomVRCodeConstants.VR_OB,
 false, 0);

//load an image
IO.Load(LEADRasterView1.Raster, "d:\\lead14\\dist\\images\\image1.cmp", 0, 1, 1);
MessageBox.Show("Image loaded from File - Wait");

//create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem(0, LEADRasterView1.Raster.Bitmap);
Process.Flip(LEADRasterView1.Raster);
LEADRasterView2.Raster.InsertBitmapListItem(1, LEADRasterView1.Raster.Bitmap);
Process.Reverse(LEADRasterView1.Raster);
LEADRasterView2.Raster.InsertBitmapListItem(2, LEADRasterView1.Raster.Bitmap);

//insert the image list into the element
LEADDICOM1.BitmapList
 = LEADRasterView2.Raster.BitmapList;
//set the bitmap list
nRet = LEADDICOM1.SetBitmapListValue((int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB,
 0, 0, 0);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
MessageBox.Show("Image set to Data Set - Wait");
LEADDICOM1.BitmapList
 = 0;
//free the value
MessageBox.Show("ImageList cleared from memory -
 Wait");
lCount = LEADDICOM1.GetBitmapCount();
//get the bitmap list back
if (nRet == 0)
{
LEADDICOM1.GetBitmapListValue(0, lCount,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0);
LEADRasterView1.Raster.BitmapList
 = LEADDICOM1.BitmapList;
LEADRasterView1.ForceRepaint();
}
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("ImageList loaded from Data Set
 - Wait");
}


SetBitmapValue example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSetBitmapValue()
{
int lCount = 0;
short nRet = 0;
LTRASTERIOLib.LEADRasterIO IO = new LTRASTERIOLib.LEADRasterIO();
LEADDICOM1.EnableMethodErrors
 = false;

//move to the root element
LEADDICOM1.MoveFirstElement(false);
LEADDICOM1.MoveRootElement();

//insert a new element for the Bitmap Value
nRet = LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false);
nRet = LEADDICOM1.DeleteElement();
nRet = LEADDICOM1.InsertElement(false,
 (int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, (short)LTDICLib.DicomVRCodeConstants.VR_OB,
 false, 0);

//load an image
IO.Load(LEADRasterView1.Raster, "d:\\lead14\\dist\\images\\image1.cmp",
 0, 1, 1);
MessageBox.Show("Image loaded from File - Wait");

//insert the image into the element
LEADDICOM1.Bitmap = LEADRasterView1.Raster.Bitmap;

//set the bitmap
nRet = LEADDICOM1.SetBitmapValue((int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE,
 (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB,
 0, 0, 0);
if (nRet != 0)
{
MessageBox.Show("Error");
return;
}
MessageBox.Show("Image set to Data Set - Wait");
LEADDICOM1.Bitmap = 0;

//free the value
MessageBox.Show("Image cleared from memory - Wait");

//get the bitmap back
if (nRet == 0)
{
LEADDICOM1.GetBitmapValue(0,
 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap;
LEADRasterView1.ForceRepaint();
}
LEADDICOM1.EnableMethodErrors
 = true;
MessageBox.Show("Image loaded from Data Set - Wait");
}


SetCalled Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetCalled ( )
{
//set called application title
LEADDICOMNet1.SetCalled(LEADDICOMNet1.hPDU, "Called
 Program");

//set calling application title
LEADDICOMNet1.SetCalling(LEADDICOMNet1.hPDU,
 "Calling Program");

//display the current values
MessageBox.Show(LEADDICOMNet1.GetCalled(LEADDICOMNet1.hPDU));
MessageBox.Show(LEADDICOMNet1.GetCalling(LEADDICOMNet1.hPDU));
}


SetCipherToIndexTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetCipherToIndexTLS ( )
{
LEADDICOMNet1.SetCipherToIndexTLS(LEADDICOMNet1.hNet,
 0, (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA);
int lTest = 0;
lTest = LEADDICOMNet1.GetCipherFromIndexTLS(LEADDICOMNet1.hNet,
 0);
if (lTest == (int)LTDNCLib.DicomCiphersuiteConstants.DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA)
MessageBox.Show("Cipher DICOM_TLS_DHE_RSA_WITH_DES_CBC_SHA");
}


SetClientCertificateTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetClientCertificateTLS()
{
if (LEADDICOMNet1.SetClientCertificateTLS(LEADDICOMNet1.hNet,
 "c:\\cert\\client.pem", (int)LTDNCLib.DicomTLSCertType.L_TLS_FILETYPE_PEM,
 "") == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("Loading client certificate succeeded");
else
{
MessageBox.Show("Loading client certificate failed") ;
}
}


SetCommandSet (DICOM Control) Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveData(int hNet, short nID, int hDicomCS,
 int hDicomDS)
{
short nRet = 0;
//we have received a data message
//copy the Command Set so we can examine its elements
LEADDICOM1.SetCommandSet(hDicomCS);
nRet = LEADDICOM1.FindFirstElement((int)LTDICLib.DicomCommandSetTagConstants.TAG_COMMAND_FIELD,
 false);
nRet = LEADDICOM1.GetShortValue(0,
 1);
MessageBox.Show("Command Field = 0x" + System.Convert.ToString(LEADDICOM1.get_ShortValues(0),
 16).ToUpper());
}


SetCurrentElement example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSetCurrentElement( )
{
int lCount = 0;
LEADDICOM1.EnableMethodErrors
 = false;

//get total number of images in this Data Set
LEADDICOM1.SetCurrentElement(0);
lCount = LEADDICOM1.GetBitmapCount();
MessageBox.Show("Total: " + System.Convert.ToString(lCount));

//move to last image tag in the Data Set
LEADDICOM1.FindLastElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA,
 false);

//get total number of images in this tag
lCount = LEADDICOM1.GetBitmapCount();
MessageBox.Show("This tag: " + System.Convert.ToString(lCount));
}


SetDefaultEncryptionISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetDefaultEncryptionISCL ( )
{
LEADDICOMNet1.SetDefaultEncryptionISCL(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomEncryptionMode.DICOM_ISCL_ENCRYPT_DESCBC);
}


SetDefaultSigningISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetDefaultSigningISCL ( )
{
LEADDICOMNet1.SetDefaultSigningISCL(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomMsgAuthCode.DICOM_ISCL_MAC_NONE);
}


SetEncryptKey Example for C#

SetEncryptKeyISCL Example for C#

[StructLayout(LayoutKind.Sequential)]
public class KeyLoHi
{
public UInt32 LoValue;
public UInt32 HiValue;
}

[StructLayout(LayoutKind.Sequential)]
public class Key64
{
public UInt64 Value;
}

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetEncryptKeyISCL()
{
Key64 key = null;
KeyLoHi compKey = null;
IntPtr UnManagedMemory ;
key = new Key64();
compKey = new KeyLoHi();
UnManagedMemory = Marshal.AllocHGlobal(Marshal.SizeOf(compKey));

// use a 64 bit key value of 0123456789ABCDEF hex.
compKey.HiValue = System.Convert.ToUInt32(0X1234567L);
compKey.LoValue = Convert.ToUInt32(0X89ABCDEFL);
key.Value = Convert.ToUInt64(0);
Marshal.StructureToPtr(compKey, UnManagedMemory, true);
Marshal.PtrToStructure(UnManagedMemory, key);
LEADDICOMNet1.SetEncryptKeyISCL(LEADDICOMNet1.hNet,
 1, key.Value);
LEADDICOMNet1.SetIndexForEncryptISCL(LEADDICOMNet1.hNet,
 1);
MessageBox.Show("Index value is: " + LEADDICOMNet1.GetIndexForEncryptISCL(LEADDICOMNet1.hNet));
}


SetMaxCommBlockLengthISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetMaxCommBlockLengthISCL ( )
{
int nBlockLen = 0;
LEADDICOMNet1.NetworkSecurityMode
 = (int)LTDNCLib.DicomSecurityModes.DICOM_SECURE_ISCL;
LEADDICOMNet1.StartUp();
LEADDICOMNet1.SetMaxCommBlockLengthISCL(LEADDICOMNet1.hNet,
 8160);
// size of the blocks sent to network layer will be 8192 bytes (a 32-byte
 header is added)
// other initializations...
LEADDICOMNet1.Connect("",
 0, "127.0.0.1", 2761);
//connect to a server running on local computer at port 2761
nBlockLen = LEADDICOMNet1.GetCommBlockLengthISCL(LEADDICOMNet1.hNet);
MessageBox.Show("Negotiated communication block size is" + nBlockLen);
}


SetMaxMessageLengthISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetMaxMessageLengthISCL ( )
{
LEADDICOMNet1.SetMaxMessageLengthISCL(LEADDICOMNet1.hNet,
 1048576);
//size of the message accepted is at most 1 MB - or 1048576 bytes
}


SetMutualAuthAlgISCL Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetMutualAuthAlgISCL ( )
{
LEADDICOMNet1.SetMutualAuthAlgISCL(LEADDICOMNet1.hNet, (int)LTDNCLib.DicomMutualAuthMode.DICOM_ISCL_MUTUAL_AUTH_3P4W);
}


SetMutualAuthKeyISCL Example for C#

[StructLayout(LayoutKind.Sequential)]
public class KeyLoHi
{
public UInt32 LoValue;
public UInt32 HiValue;
}

[StructLayout(LayoutKind.Sequential)]
public class Key64
{
public UInt64 Value;
}

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetMutualAuthKeyISCL ()
{
Key64 key = null;
KeyLoHi compKey = null;
IntPtr UnManagedMemory ;
key = new Key64();
compKey = new KeyLoHi();
UnManagedMemory = Marshal.AllocHGlobal(Marshal.SizeOf(compKey));
// use a 64 bit key value of 0123456789ABCDEF hex.
compKey.HiValue = System.Convert.ToUInt32(0X1234567L);
compKey.LoValue = Convert.ToUInt32(0X89ABCDEFL);
key.Value = Convert.ToUInt64(0);
Marshal.StructureToPtr(compKey, UnManagedMemory, true);
Marshal.PtrToStructure(UnManagedMemory, key);
LEADDICOMNet1.SetMutualAuthKeyISCL(LEADDICOMNet1.hNet, 1, key.Value);
LEADDICOMNet1.SetIndexForMutualAuthISCL(LEADDICOMNet1.hNet, 1);
MessageBox.Show("Index value is: " + LEADDICOMNet1.GetIndexForMutualAuthISCL(LEADDICOMNet1.hNet));
}


SetRequest Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetRequest ( )
{
//set associate as Accept
if (LEADDICOMNet1.hPDU != 0)
LEADDICOMNet1.SetRequest(LEADDICOMNet1.hPDU,
 false);
}


SetServerCertificateTLS Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestSetServerCertificateTLS ( )
{
if (LEADDICOMNet1.SetServerCertificateTLS(LEADDICOMNet1.hNet, "c:\\cert\\Server.pem", (int)LTDNCLib.DicomTLSCertType.L_TLS_FILETYPE_PEM, "") == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
MessageBox.Show("Loading Server certificate succeeded");
else
MessageBox.Show("Loading Server certificate failed");
}


SetTagName example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSetTagName()
{
try
{
LEADDICOM1.EnableMethodErrors
 = true;

//move to the selected Tag
LEADDICOM1.FindIndexTag(13);

//change the name
LEADDICOM1.SetTagName("New
 Tag Name");
return;
}
catch
{
MessageBox.Show("Error");
}
}


Setting an overlay bitmap list Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
public void TestSettingOverlayBitmapList()
{
LEADDICOM1.OverlayBitmapList
 = LEADRasterView1.Raster.BitmapList;
LEADDICOM1.SetOverlayBitmapList(0,
 0);
}


Setting modality LUT data and attributes Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
public void TestSettingModalityLUTDataAndAttributes()
{
// This example will set Rescale Intercept (0028,1052)
// element to -128.0 and Rescale Slope (0028,1053)
// element to 1.0
// Object that will hold modality LUT attributes
LTDICLib.LModalityLUTAttributes ModalityLUTAttributes = null;
short iRet = 0;
object Data = null;
ModalityLUTAttributes = LEADDICOM1.ModalityLUTAttributes;
//No Modality LUT Sequence (0028,3000)
ModalityLUTAttributes.IsModalityLUTSequence = false;
//Yes there is a rescale slope and intercept
ModalityLUTAttributes.IsRescaleSlopeIntercept = true;
ModalityLUTAttributes.RescaleIntercept = -128;
ModalityLUTAttributes.RescaleSlope = 1;
ModalityLUTAttributes.RescaleType = "UNSPECIFIED";
// Delete the existing modality LUT,
// although we don't have to !
LEADDICOM1.DeleteModalityLUT(0);
//Set rescale slope and intercept
iRet = LEADDICOM1.SetModalityLUT(Data,
 0);
}


Setting palette color LUT data and attributes Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
public void TestSettingPaletteColorLUTDataAttributes()
{
//This example will set the attributes and the data for
 a
//Palette Color Lookup Table
int lLUTIndex = 0;
short iRet = 0;
int[] RedLUTData = null;
int[] GreenLUTData = null;
int[] BlueLUTData = null;
LTDICLib.LPaletteColorLUTAttributes PaletteColorLUTAttributes
 = null;
PaletteColorLUTAttributes = LEADDICOM1.PaletteColorLUTAttributes
;
// Initialize Red Palette Color Lookup Table Descriptor
 (0028,1101)
PaletteColorLUTAttributes.RedLUTDescriptorFirstMapped
 = 0;
PaletteColorLUTAttributes.RedLUTDescriptorEntryBits
 = 16;
PaletteColorLUTAttributes.RedLUTDescriptorNumberOfEntries
 = 0X10000;

// Initialize Green Palette Color Lookup Table Descriptor
 (0028,1102)
PaletteColorLUTAttributes.GreenLUTDescriptorFirstMapped
 = 0;
PaletteColorLUTAttributes.GreenLUTDescriptorEntryBits
 = 16;
PaletteColorLUTAttributes.GreenLUTDescriptorNumberOfEntries
 = 0X10000;

// Initialize Blue Palette Color Lookup Table Descriptor
 (0028,1103)
PaletteColorLUTAttributes.BlueLUTDescriptorFirstMapped
 = 0;
PaletteColorLUTAttributes.BlueLUTDescriptorEntryBits
 = 16;
PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries
 = 0X10000;

RedLUTData = new int[PaletteColorLUTAttributes.RedLUTDescriptorNumberOfEntries
 + 1];
GreenLUTData = new int[PaletteColorLUTAttributes.GreenLUTDescriptorNumberOfEntries
 + 1];
BlueLUTData = new int[PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries
 + 1];

for (lLUTIndex = 0; lLUTIndex < PaletteColorLUTAttributes.BlueLUTDescriptorNumberOfEntries;
 lLUTIndex++)
{
RedLUTData[lLUTIndex] = lLUTIndex;
 GreenLUTData[lLUTIndex] = lLUTIndex / 2;
BlueLUTData[lLUTIndex] = lLUTIndex
 / 4;
}
// Delete all the elements that describe the "Palette
 Color Lookup Table".
iRet = LEADDICOM1.DeletePaletteColorLUT(0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Set the new "Palette Color Lookup Table"
 attributes
iRet = LEADDICOM1.SetPaletteColorLUTAttributes(0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Set Red Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData(RedLUTData,
 LTDICLib.DicomPaletteColorLUTConstants.DICOM_PALETTE_COLOR_LUT_TYPE_RED,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Set Green Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData(GreenLUTData,
 LTDICLib.DicomPaletteColorLUTConstants.DICOM_PALETTE_COLOR_LUT_TYPE_GREEN,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Set Blue Palette Color Lookup Table Data
iRet = LEADDICOM1.SetPaletteColorLUTData(BlueLUTData,
 LTDICLib.DicomPaletteColorLUTConstants.DICOM_PALETTE_COLOR_LUT_TYPE_BLUE,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
}


Setting the attributes and bitmaps for all overlays inside a DICOM dataset Example for C#

//This example uses the predefined variable “LEADRasterView1”
 of type “AxLEADRasterView” from “LEADTOOLS Toolkit”.
//This example uses the predefined variable “LEADRasterView2” of type “AxLEADRasterView”
 from “LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
public void TestSettingTheAttributesAndBitmapsForAllOverlaysInsideDICOMDataset()
{
// This function will store the overlays associated
// with a bitmap handle inside the DICOM dataset
LTRASTERPROCLib.LEADOverlayAttributes OverlayAttributesDS
 = null;
LTRASTERPROCLib.LEADOverlayAttributes OverlayAttributesRaster
 = null;
int GroupNumber = 0;
bool IsOverlayInDataset = false;
int OverlayCount = 0;
int OverlayIndex = 0;
short iRet = 0;
LTRASTERPROCLib.LEADRasterProcess Process = new LTRASTERPROCLib.LEADRasterProcess();
IsOverlayInDataset = false;
GroupNumber = 0;
OverlayIndex = 0;
Process.EnableMethodErrors
 = false;
// Do we have any overlays at all?
OverlayCount = Process.GetOverlayCount(LEADRasterView1.Raster,
 0);
// If no overlays just exit sub
if (OverlayCount == 0)
{
MessageBox.Show("error");
return;
}
// Blow away all the overlays in the file
for (OverlayIndex = 0; OverlayIndex < OverlayCount;
 OverlayIndex++)
{
LEADDICOM1.DeleteOverlay(OverlayIndex,
 0);
}
OverlayAttributesDS = LEADDICOM1.OverlayAttributes;
// Loop through the overlays and add them into the DICOM
 file
for (OverlayIndex = 0; OverlayIndex < OverlayCount;
 OverlayIndex++)
{
// Get overlay attributes
iRet = Process.GetOverlayAttributes(LEADRasterView1.Raster,
 (short)OverlayIndex, (int)(LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_ORIGIN
 | LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_FLAGS |
 LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_BITINDEX
 | LTRASTERPROCLib.OverlayAttributesConstants.OVERLAYATTRIBUTES_DICOM));
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
OverlayAttributesRaster = Process.OverlayAttributes;
 OverlayAttributesDS.OriginX = OverlayAttributesRaster.OriginX;
OverlayAttributesDS.OriginY = OverlayAttributesRaster.OriginY;
OverlayAttributesDS.Flags = OverlayAttributesRaster.Flags;
OverlayAttributesDS.Color = System.Convert.ToUInt32(System.Drawing.ColorTranslator.FromOle(System.Convert.ToInt32(OverlayAttributesRaster.Color)));
OverlayAttributesDS.BitPosition = OverlayAttributesRaster.BitPosition;
OverlayAttributesDS.Rows = OverlayAttributesRaster.Rows;
OverlayAttributesDS.Columns = OverlayAttributesRaster.Columns;
OverlayAttributesDS.Type = OverlayAttributesRaster.Type;
OverlayAttributesDS.BitsAllocated =
 OverlayAttributesRaster.BitsAllocated;
OverlayAttributesDS.Subtype = OverlayAttributesRaster.Subtype;
OverlayAttributesDS.Label = OverlayAttributesRaster.Label;
OverlayAttributesDS.ROIArea = OverlayAttributesRaster.ROIArea;
OverlayAttributesDS.ROIMean = OverlayAttributesRaster.ROIMean;
OverlayAttributesDS.ROIStandardDeviation
 = OverlayAttributesRaster.ROIStandardDeviation;
OverlayAttributesDS.NumberFramesInOverlay
 =    OverlayAttributesRaster.NumberFramesInOverlay;
OverlayAttributesDS.ImageFrameOrigin
 = OverlayAttributesRaster.ImageFrameOrigin;
OverlayAttributesDS.ActivationLayer
 =    OverlayAttributesRaster.ActivationLayer;
OverlayAttributesDS.Description = OverlayAttributesRaster.Description;
// Set overlay attributes inside DICOM
iRet = LEADDICOM1.SetOverlayAttributes(OverlayIndex,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// burn overlays which need to be part
 of the image
if (((int)OverlayAttributesRaster.Flags
 & (int)LTRASTERPROCLib.OverlayAttributesFlagsConstants.OVERLAY_USEBITPLANE)
 != 0)
{
iRet = Process.UpdateOverlayBits(LEADRasterView1.Raster,
 (short)OverlayIndex, (int)LTRASTERPROCLib.OverlayBitsConstants.SETOVERLAYBITS_FROMOVERLAY);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
}
// Get the overlay data (if it's not
 part of the image)
LEADRasterView2.Raster.Free();
iRet = Process.GetOverlayBitmap(LEADRasterView1.Raster,
 (short)OverlayIndex, LEADRasterView2.Raster, (int)LTRASTERPROCLib.OverlayConstants.OVERLAY_COPY);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
// Set overlay data into
DICOM LEADDICOM1.OverlayBitmap = LEADRasterView2.Raster.Bitmap;
iRet = LEADDICOM1.SetOverlayBitmap(OverlayIndex,
 0);
if (iRet != 0)
{
MessageBox.Show("error");
return;
}
}
}


SetUIDName example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSetUIDName()
{
try
{
LEADDICOM1.EnableMethodErrors
 = true;

//move to the selected UID
LEADDICOM1.FindIndexUID(13);

//change the name
LEADDICOM1.SetUIDName("New
 UID Name");
return;
}
catch
{
MessageBox.Show("Error");
}
}


SetVRName example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSetVRName ( )
{
try
{
int lIndex = 0;
lIndex = 13;
LEADDICOM1.EnableMethodErrors
 = true;

//move to the selected VR
LEADDICOM1.FindIndexVR(lIndex);

//change the name
LEADDICOM1.SetVRName("New
 VR Name");
MessageBox.Show("New Name = "
 + LEADDICOM1.get_CurrentVR().Name);
return;
}
catch
{
MessageBox.Show("Error");
}
}


SSLCreateFlags Example for C#

// This sample creates an ILEADDicomNet object with security
// The ILEADDicomNet object is configured so that if a client connects:
// 1. it requires and verifies the client certificate
// 2. it will support SSL version 3 or TLS Version 1 for the handshake
// 3. it uses trusted certificate authority CA_CERT_NAME to verify the
 client certificate
// 4. it verifies the client certificate chain to a maximum depth of 2
//
// The ILEADDicomNet object is assigned the certificate SERVER_CERT_NAME,
// which contains a password encrypted private key
// The DicomNet_SSLPrivateKeyPasswordEvent
 is used
// to supply the encryption password of the private key
private LTDicomKernelLib.LEADDicomKernel DicomKernel = new LTDicomKernelLib.LEADDicomKernel();

public LTDNCLib.LEADDicomNet LEADDICOMNet1 = null ;

private const string CA_CERT_NAME = "e:\\certificates\\ca.pem";
private const string SERVER_CERT_NAME = "e:\\certificates\\server.pem";

private void TestSSLCreateFlags()
{
string szMsg = null;
short nRet = 0;
LEADDICOMNet1.UseSSLOptions
 = true;
LEADDICOMNet1.SSLCreateFlags
 = LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_CAFILE | LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_METHOD_TYPE
 | LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_OPTIONS | LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_VERIFY_DEPTH
 | LTDNCLib.DicomSSLCreateFlags.DICOM_SSL_CTX_CREATE_VERIFY_MODE;
LEADDICOMNet1.SSLCAFile
 = CA_CERT_NAME;
LEADDICOMNet1.SSLVerifyMode
 = LTDNCLib.DicomSSLVerifyMode.DICOM_SSL_VERIFY_PEER | LTDNCLib.DicomSSLVerifyMode.DICOM_SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
LEADDICOMNet1.SSLVerifyDepth = 2;
LEADDICOMNet1.SSLOptions
 = LTDNCLib.DicomSSLOptions.DICOM_SSL_OP_NO_SSLv2 | LTDNCLib.DicomSSLOptions.DICOM_SSL_OP_ALL;
LEADDICOMNet1.NetworkSecurityMode
 = (int)LTDNCLib.DicomSecurityModes.DICOM_SECURE_TLS;
LEADDICOMNet1.StartUp();
nRet = LEADDICOMNet1.SetServerCertificateTLS(LEADDICOMNet1.hNet,
 SERVER_CERT_NAME, (int)LTDNCLib.DicomTLSCertType.L_TLS_FILETYPE_PEM, SERVER_CERT_NAME);
if (nRet == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
szMsg = SERVER_CERT_NAME + " loaded
 successfully";
else
szMsg = SERVER_CERT_NAME + " could
 not be loaded successfully -- error " + System.Convert.ToString(nRet);
MessageBox.Show(szMsg);
//
// Use the hNet
//
}


StartUp Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void TestStartUp ( )
{
short nRet = 0;
//start the network
//set the temporary file path
LEADDICOMNet1.NetworkTempPath
 = "d:\\temp";
LEADDICOMNet1.NetworkSecurityMode
 = (int)LTDNCLib.DicomSecurityModes.DICOM_SECURE_NONE;
nRet = LEADDICOMNet1.StartUp();
if (nRet != 0)
MessageBox.Show("Error");
//do some network communication here
//...
//...

//shut down the network
//LEADDICOMNet1.ShutDown()
}


Version Example for C#

//This example uses the predefined variable “LEADDICOMNet1”
 of type “LEADDicomNet” from “LEADTOOLS Toolkit”.
private void TestVersion ( )
{
//check the Associate Class version
MessageBox.Show("Version: " + System.Convert.ToString(LEADDICOMNet1.GetVersion(LEADDICOMNet1.hPDU)));
//set the version
LEADDICOMNet1.SetVersion(LEADDICOMNet1.hPDU,
 99);
MessageBox.Show("Version: " + System.Convert.ToString(LEADDICOMNet1.GetVersion(LEADDICOMNet1.hPDU)));
}


Technical Support

As a registered user, free technical support is available. You must register your software to receive any technical support. Technical support is available 9 a.m. through 6 p.m. Eastern Standard Time. If you are calling by phone, please be at your computer. You can also contact us through the following methods:

Phone: | (704) 372-9681
E-mail: | support@leadtools.com
FAX: | (704) 372-8161
Online Support / FAQs | http://www.leadtools.com (click on Customers Only)
Home page: | http://www.leadtools.com
FTP: | ftp.leadtools.com

You can also contact LEAD by mail at:

LEAD Technologies, Inc.
Attn: Technical Support
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

Before calling technical support, please look in the online documentation and the example programs for an answer to your question.


Properties, Methods, and Events

DICOM Directories

General Support

Licensed COM Objects

Data Sets

Information Object Definitions

Data Element Tags

Unique Identifiers

Value Representations

Key Elements

DICOM Network Connections

DICOM Associate Connections

DICOM Security

DICOM Print Management SCU

Lookup Tables

Overlays

Dicom Annotations

DICOM Context Groups

DICOM Waveform Channels

DICOM Waveform Groups


DICOM Directories

DicomFileInsert event

EnableMethodErrors property (ILEADDicomDir Interface)

EnableMethodErrors property (ILEADDicomKernel Interface)

hDicomDirDS property (ILEADDicomDir Interface)

ImplementationClassUID property

ImplementationVersionName property

IncludeSubfolders property

InsertDicomDS method

InsertIconImageSequence property

InsertDicomFile method

LoadDicomDir method

RejectInvalidFileID property

ResetDicomDir method

SaveDicomDir method

SetDescriptorFile method

SetFileSetID method


DICOM Elements: General Support

General Support

EnableMethodErrors property (ILEADDicomKernel)

EnableMethodErrors property (ILEADDicomPrintSCU)

EnableMethodErrors property (ILEADDicomNet)

EnableMethodErrors property (ILEADDicomDS)

IsSupportLocked method

UnlockSupport method


DICOM Elements: Licensed COM Objects

Licensed COM Objects

CreateObject2 method

CreateObject method


Data Sets

Annotation Files

Command Sets

Compressing Pixel Data Elements

Converting Values

Creating, Initializing, Loading, and Saving Data Sets

Digital Signatures

Getting and Setting Data Element Values

Getting and Setting Data Set Information

Inserting and Deleting Data Set Members

Maneuvering Through a Data Set

Searching a Data Set


Data Sets: Annotation Files

Data Sets:
Annotation Files

AnnContainer property (DICOM Control)

AnnCount method (DICOM Control)

AnnDelete method (DICOM Control)

AnnEntries property (DICOM Control)

AnnLoad method (DICOM Control)

AnnPrivateCreatorTag property (DICOM Control)

AnnSave method (DICOM Control)


Data Sets: Command Sets

Data Sets:
Command Sets

GetInfoCS method

InfoCommand property

InfoRequest property

InitCS method


Data Sets: Compressing Pixel Data Elements

Data Sets:
Compressing Pixel Data Elements:

J2KCBS_ErrorResilienceSymbol property

J2KCBS_PredictableTermination property

J2KCBS_ResetContextOnBoundaries property

J2KCBS_SelectiveACBypass property

J2KCBS_TerminationOnEachPass property

J2KCBS_VerticallyCausalContext property

J2KCodBlockHeight property

J2KCodBlockWidth property

J2KCompressionControl property

J2KCompressionRatio property

J2KDecompLevel property

J2KDerivedBaseExponent property

J2KDerivedBaseMantissa property

J2KDerivedQuantization property

J2KGuardBits property

J2KOptions property

J2KProgressOrder property

J2KROIControl property

J2KROIHeight property

J2KROILeft property

J2KROITop property

J2KROIWidth property

J2KSetDefaults method

J2KTargetFileSize property

J2KUseColorTransform property

J2KUseEPHMarker property

J2KUseROI property

J2KUseSOPMarker property

J2KXOsiz property

J2KXTOsiz property

J2KXTsiz property

J2KYOsiz property

J2KYTOsiz property

J2KYTsiz property


Data Sets: Converting Values

Data Sets:
Converting Values

GetConvertValue method

SetConvertValue method


Data Sets: Creating, Initializing, Loading, and Saving Data Sets

Data Sets:
Creating, Initializing, Loading, and Saving Data Sets

DSTempPath property

InitDS method

LoadDS method

LoadDSArray method

SaveDS method


Data Sets: Digital Signatures

Data Sets:
Digital Signatures

CreateSignature method (ILEADDicomDS Interface)

DeleteSignature method (ILEADDicomDS Interface)

FindSignature method (ILEADDicomDS Interface)

GetMacAlgorithm method (ILEADDicomDS Interface)

GetMacTransferSyntax method (ILEADDicomDS Interface)

GetSignatureDateTime method (ILEADDicomDS Interface)

GetSignaturesCount method (ILEADDicomDS Interface)

GetSignatureUID method (ILEADDicomDS Interface)

GetSignedElementsCount method (ILEADDicomDS Interface)

MoveSignature method (ILEADDicomDS Interface)

MoveSignedElement method (ILEADDicomDS Interface)

SaveCertificate method (ILEADDicomDS Interface)

VerifySignature method (ILEADDicomDS Interface)


Data Sets: Getting and Setting Data Element Values

Data Sets:
Getting and Setting Data Element Values

Getting Data Element Values

GetAgeValue method

GetBinaryValue method

GetBitmapListValue method

GetBitmapValue method

GetCharValue method

GetDateTimeValue method

GetDateValue method

GetDoubleValue method

GetFloatValue method

GetLongValue method

GetShortValue method

GetStringValue method

GetTimeValue method

GetValueCount method

Setting Data Element Values

SetAgeValue method

SetBinaryValue method

SetBitmapListValue method

SetBitmapValue method

SetCharValue method

SetDateTimeValue method

SetDateValue method

SetDoubleValue method

SetFloatValue method

SetLongValue method

SetShortValue method

SetStringValue method

SetTimeValue method

Associated properties

AgeValueCount property

AgeValues property

BinaryValueCount property

BinaryValues property

BinaryValues2 property

Bitmap property

BitmapList property

BitmapListCount property

CharValueCount property

CharValues property

CurrentElement property

DateTimeValueCount property

DateTimeValues property

DateValueCount property

DateValues property

DoubleValueCount property

DoubleValues property

FloatValueCount property

FloatValues property

LongValueCount property

LongValues property

ShortValueCount property

ShortValues property

StringValueCount property

StringValues property

TimeValueCount property

TimeValues property

Miscellaneous

InsertBitmapListValue method

InsertBitmapValue method

DeleteBitmapValue method


Data Sets: Getting and Setting Data Set Information

Data Sets:
Getting and Setting Data Set Information

Getting information:

ConformanceStatus event

ConformanceTestDS method

EnableConformanceStatus property

EnableProgressEvent property (ILEADDicomDS)

GetBitmapCount method

GetDSPreamble method

GetElementLevel method

GetImageInformation method

GetInfoDS method

GetModuleCount method

InfoClass property

InfoFlags property

KeepPixelDataIntact property

Preamble property

ProgressStatus event (ILEADDicomDS)

Setting information:

ChangeTransferSyntax method

KeepPixelDataIntact property

Preamble property

SetDSPreamble method


Data Sets: Inserting and Deleting Data Set Members

Data Sets:
Inserting and Deleting Data Set Members

Inserting Data Set Members:

CurrentElement property

InsertDS method

InsertElement method

InsertModule method

Deleting Data Set Members:

CurrentElement property

DeleteElement method

DeleteModule method

ResetDS method.


Data Sets: Maneuvering Through a Data Set

Data Sets:
Maneuvering Through a Data Set

CurrentElement property

ImageInfo property

IncludeVolatile property

MoveRootElement method

MoveParentElement method

MoveChildElement method

MoveFirstElement method

MoveLastElement method

MovePrevElement method

MoveNextElement method


Data Sets: Searching a Data Set

Data Sets:
Searching a Data Set

CurrentElement property

CurrentModule property

FindModule method

FindIndexModule method

FindFirstElement method

FindLastElement method

FindPrevElement method

FindNextElement method


Information Object Definitions

Maneuvering Through the IOD Table

Searching the IOD Table

Inserting and Deleting IODs

Modifying an Existing IOD

Setting the Default IOD Table


Information Object Definitions: Inserting and Deleting IODs

Information Object Definitions:
Inserting and Deleting IODs

Inserting IODs:

InsertIOD method

CurrentIOD property

Deleting IODs:

DeleteIOD method

ResetIOD method

CurrentIOD property


Information Object Definitions: Maneuvering Through the IOD Table

Information Object Definitions:
Maneuvering Through the IOD Table

MoveRootIOD method

MoveParentIOD method

MoveChildIOD method

MoveFirstIOD method

MoveLastIOD method

MovePrevIOD method

MoveNextIOD method

CurrentIOD property


Information Object Definitions: Modifying an Existing IOD

Information Object Definitions:
Modifying an Existing IOD

SetIODName method

SetIODDescription method

CurrentIOD property


Information Object Definitions: Searching the IOD Table

Information Object Definitions:
Searching the IOD Table

FindClassIOD method

FindModuleIOD method

FindIOD method

CurrentIOD property


Information Object Definitions: Setting the Default IOD Table

Information Object Definitions:
Setting the Default IOD Table

DefaultIOD method


Data Element Tags

Maneuvering Through the Data Element Tag Table

Searching the Data Element Tag Table

Inserting and Deleting Tags

Modifying an Existing Tag

Setting the Default Data Element Tag Table


Data Element Tags: Inserting and Deleting Data Element Tags

Data Element Tags:
Inserting and Deleting Data Element Tags

Inserting Data Element Tags:

InsertTag method

CurrentTag property

Deleting Data Element Tags:

DeleteTag method

ResetTag method

CurrentTag property


Data Element Tags: Maneuvering Through the Data Element Tag Table

Data Element Tags:
Maneuvering Through the Data Element Tag Table

MoveFirstTag method

MoveLastTag method

MovePrevTag method

MoveNextTag method

GetTagCount method

CurrentTag property


Data Element Tags: Modifying an Existing Data Element Tag

Data Element Tags:
Modifying an Existing Data Element Tag

SetTagName method

CurrentTag property


Data Element Tags: Searching the Data Element Tag Table

Data Element Tags:
Searching the Data Element Tag Table

FindTag method

FindIndexTag method

CurrentTag property


Data Element Tags: Setting the Default Data Element Tag Table

Data Element Tags:
Setting the Default Data Element Tag Table

DefaultTag method


Unique Identifiers

Maneuvering Through the UID Table

Searching the UID Table

Inserting and Deleting UIDs

Modifying an Existing UID

Setting the DefaultUID Table


Unique Identifiers: Inserting and Deleting UIDs

Unique Identifiers:
Inserting and Deleting UIDs

Inserting UIDs:

InsertUID method

CurrentUID property

Deleting UIDs:

DeleteUID method

ResetUID method

CurrentUID property


Unique Identifiers: Maneuvering Through the UID Table

Unique Identifiers:
Maneuvering Through the UID Table

MoveFirstUID method

MoveLastUID method

MovePrevUID method

MoveNextUID method

GetUIDCount method

CurrentUID property


Unique Identifiers: Modifying an Existing UID

Unique Identifiers:
Modifying an Existing UID

SetUIDName method

CurrentUID property


Unique Identifiers: Searching the UID Table

Unique Identifiers:
Searching the UID Table

FindUID method

FindIndexUID method

CurrentUID property


Unique Identifiers: Setting the Default UID Table

Unique Identifiers:
Setting the Default UID Table

DefaultUID method


Value Representations

Maneuvering Through the VR Table

Searching the VR Table

Inserting and Deleting VRs

Modifying an Existing VR

Setting the Default VR Table


Value Representations: Inserting and Deleting Value Representations

Value Representations:
Inserting and Deleting Value Representations

Inserting Value Representations:

InsertVR method

CurrentVR property

Deleting Value Representations:

DeleteVR method

ResetVR method

CurrentVR property


Value Representations: Maneuvering Through the Value Representation Table

Value Representations:
Maneuvering Through the Value Representation Table

MoveFirstVR method

MoveLastVR method

MovePrevVR method

MoveNextVR method

GetVRCount method

CurrentVR property


Value Representations: Modifying an Existing Value Representation

Value Representations:
Modifying an Existing Value Representation

SetVRName method

CurrentVR property


Value Representations: Searching the Value Representation Table

Value Representations:
Searching the Value Representation Table

FindVR method

FindIndexVR method

CurrentVR property


Value Representations: Setting the Default Value Representation Table

Value Representations:
Setting the Default Value Representation Table

DefaultVR method


Key Elements

Maneuvering Through the DICOM Dir Data Set

Searching the DICOM Dir Data Set

Inserting and Deleting Key Elements

Getting the Type of an Existing Key Element


Key Elements: Getting the Type of an Existing Key Element

Key Elements:
Getting the Type of an Existing Key Element

GetKeyValue method


Key Elements: Inserting and Deleting Key Elements

Key Elements:
Inserting and Deleting Key Elements

Inserting Key Elements:

InsertKey method

Deleting Key Elements:

DeleteKey method


Key Elements: Maneuvering Through the DICOM Dir Data Set

Key Elements:
Maneuvering Through the DICOM Dir Data Set

MoveRootKey method

MoveParentKey method

MoveChildKey method

MoveFirstKey method

MoveLastKey method

MovePrevKey method

MoveNextKey method


Key Elements: Searching the DICOM Dir Data Set

Key Elements:
Searching the DICOM Dir Data Set

FindFirstKey method

FindLastKey method

FindPrevKey method

FindNextKey method


Lookup Tables

Modality LUTS

DeleteModalityLUT method (ILEADDicomDS)

GetModalityLUTAttributes method (ILEADDicomDS)

GetModalityLUTData method (ILEADDicomDS)

IsModalityLUTSequence property (ILModalityLUTAttributes)

IsRescaleSlopeIntercept property (ILModalityLUTAttributes)

LUTDescriptorEntryBits property (ILModalityLUTAttributes)

LUTDescriptorFirstMapped property (ILModalityLUTAttributes)

LUTDescriptorNumberOfEntries property (ILModalityLUTAttributes)

LUTExplanation property (ILModalityLUTAttributes)

ModalityLUTAttributes property (ILEADDicomDS)

ModalityLUTType property (ILModalityLUTAttributes)

RescaleIntercept property (ILModalityLUTAttributes)

RescaleSlope property (ILModalityLUTAttributes)

RescaleType property (ILModalityLUTAttributes)

SetModalityLUT method (ILEADDicomDS)

WindowCount property (ILEADDicomDS)

Palette Color LUTS

BlueLUTDescriptorEntryBits property

BlueLUTDescriptorFirstMapped property

BlueLUTDescriptorNumberOfEntries property

DeletePaletteColorLUT method (ILEADDicomDS)

GetPaletteColorLUTAttributes method (ILEADDicomDS)

GetPaletteColorLUTData method (ILEADDicomDS)

GreenLUTDescriptorEntryBits property

GreenLUTDescriptorFirstMapped property

GreenLUTDescriptorNumberOfEntries property

IsSegmented property

PaletteColorLUTAttributes property (ILEADDicomDS)

RedLUTDescriptorEntryBits property

RedLUTDescriptorFirstMapped property

RedLUTDescriptorNumberOfEntries property

SetPaletteColorLUTAttributes method (ILEADDicomDS Interface)

SetPaletteColorLUTData method (ILEADDicomDS)

UID property

VOI LUTS

DeleteVOILUT method (ILEADDicomDS)

DeleteWindow method (ILEADDicomDS)

GetVOILUTData method (ILEADDicomDS)

GetVOILUTAttributes method (ILEADDicomDS)

GetWindowAttributes method (ILEADDicomDS)

LUTDescriptorEntryBits property (ILVOILUTAttributes)

LUTDescriptorFirstMapped property (ILVOILUTAttributes)

LUTDescriptorNumberOfEntries property (ILVOILUTAttributes)

LUTExplanation property (ILVOILUTAttributes)

SetVOILUT method (ILEADDicomDS)

SetWindowAttributes method (ILEADDicomDS)

VOILUTCount property (ILEADDicomDS)

VOILUTAttributes property (ILEADDicomDS)

WindowAttributes property (ILEADDicomDS)

WindowCenter property (ILWindowAttributes)

WindowCWExplanation property (ILWindowAttributes)

WindowWidth property (ILWindowAttributes)


Overlays

DeleteOverlay method (ILEADDicomDS)

GetOverlayAttributes method (ILEADDicomDS)

GetOverlayBitmap method (ILEADDicomDS)

GetOverlayBitmapList method (ILEADDicomDS)

IsOverlayInDataSet method (ILEADDicomDS)

OverlayActivationLayer property (ILEADDicomDS)

OverlayAttributes property

OverlayBitmap property (ILEADDicomDS)

OverlayBitmapList property (ILEADDicomDS)

OverlayCount property (ILEADDicomDS)

OverlayGroupNumber property (ILEADDicomDS)

SetOverlayAttributes method (ILEADDicomDS)

SetOverlayBitmap method (ILEADDicomDS)

SetOverlayBitmapList method (ILEADDicomDS)


DICOM Network Connections

Creating a Network Connection

Closing a Network Connection

DICOM Associate Connection Messages

Sending Data Messages

Getting Information About a Network Connection


DICOM Network Connection: Closing a Network Connection

DICOM Network Connection:
Closing a Network Connection

Close method

FreeAssociate method

NetClose event

ShutDown method


DICOM Network Connection: Creating a Network Connection

DICOM Network Connection:
Creating a Network Connection

StartUp method

Connect method

Listen method

Accept method

NetAccept event

NetConnect event

NetworkSecurityMode property

NetworkTempPath property

UseSSLOptions property

SSLCreateFlags property

SSLMethodType property

SSLVerifyMode property

SSLCAFile property

SSLVerifyDepth property

SSLSuccess property

SSLOptions property

SSLPrivateKeyPassword property

SSLPrivateKeyPasswordEvent event

SetClientCertificateTLS method

SetServerCertificateTLS method


DICOM Network Connection: DICOM Associate Connection Messages

DICOM Network Connection:
DICOM Associate Connection Messages

GetAssociate method

SendAssociateRequest method

SendAssociateAccept method

SendAssociateReject method

SendData method

SendReleaseRequest method

SendReleaseResponse method

SendAbort method

NetReceiveAssociateRequest event

NetReceiveAssociateAccept event

NetReceiveAssociateReject event

NetReceiveReleaseRequest event

NetReceiveReleaseResponse event

NetReceiveAbort event

NetSend event


DICOM Network Connection: Getting Information About a Network Connection

DICOM Network Connection:
Getting Information About a Network Connection

IsActivated method

IsAssociated method

IsConnected method

GetSendQueueSize method

GetServer method

GetClient method

GetClientCount method

GetHostAddress method

GetHostPort method

GetPeerAddress method

GetPeerPort method

GetAssociate method

hNet property


DICOM Network Connection: Sending Data Messages

DICOM Network Connection:
Sending Data Messages

SendCStoreRequest method

SendCStoreResponse method

SendCFindRequest method

SendCFindResponse method

SendCGetRequest method

SendCGetResponse method

SendCMoveRequest method

SendCMoveResponse method

SendCCancelRequest method

SendCEchoRequest method

SendCEchoResponse method

SendNReportRequest method

SendNReportResponse method

SendNGetRequest method

SendNGetResponse method

SendNSetRequest method

SendNSetResponse method

SendNActionRequest method

SendNActionResponse method

SendNCreateRequest method

SendNCreateResponse method

SendNDeleteRequest method

SendNDeleteResponse method

NetReceiveCStoreRequest event

NetReceiveCStoreResponse event

NetReceiveCFindRequest event

NetReceiveCFindResponse event

NetReceiveCGetRequest event

NetReceiveCGetResponse event

NetReceiveCMoveRequest event

NetReceiveCMoveResponse event

NetReceiveCCancelRequest event

NetReceiveCEchoRequest event

NetReceiveCEchoResponse event

NetReceiveNReportRequest event

NetReceiveNReportResponse event

NetReceiveNGetRequest event

NetReceiveNGetResponse event

NetReceiveNSetRequest event

NetReceiveNSetResponse event

NetReceiveNActionRequest event

NetReceiveNActionResponse event

NetReceiveNCreateRequest event

NetReceiveNCreateResponse event

NetReceiveNDeleteRequest event

NetReceiveNDeleteResponse event

NetReceiveUnknown event

RequestAttributeCount property

RequestAttributes property


DICOM Associate Connections

Creating an Associate Connection

Modifying a DICOM Associate Handle

Getting Information About a DICOM Associate Handle


DICOM Associate Connection: Creating an Associate Connection

DICOM Associate Connection:
Creating an Associate Connection

CreateAssociate method

DefaultAssociate method


DICOM Associate Connection: Getting Information About a DICOM Associate Handle

DICOM Associate Connection:
Getting Information About a DICOM Associate Handle

IsRequest method

GetVersion method

GetCalled method

GetCalling method

GetApplication method

GetPresentationCount method

GetPresentationID method

GetPresentationResult method

GetPresentationAbstract method

FindPresentationAbstract method

GetTransferCount method

GetTransferSyntax method

IsMaxLengthEnabled method

GetMaxLength method

IsImplementClass method

GetImplementClass method

GetInvokedOperationsCount method

GetPerformedOperationsCount method

GetUserRole method

GetProviderRole method

IsRoleSelect method

IsImplementVersion method

GetImplementVersion method

GetUserInfoCount method

GetUserInfoType method

GetUserInfoLength method

GetUserInfoData method

GetExtendedDataLength method

GetExtendedData method

hPDU property


DICOM Associate Connection: Modifying a DICOM Associate Handle

DICOM Associate Connection:
Modifying a DICOM Associate Handle

ResetAssociate method

SetRequest method

SetVersion method

SetCalled method

SetCalling method

SetApplication method

SetPresentationAbstract method

SetPresentationID method

SetPresentationResult method

AddPresentation method

DeletePresentation method

SetTransferSyntax method

AddTransferSyntax method

DeleteTransferSyntax method

SetMaxLength method

SetImplementClass method

SetAsyncOperations method

SetRoleSelect method

SetImplementVersion method

SetUserInfo method

AddUserInfo method

DeleteUserInfo method

SetExtendedData method


DICOM Security

DICOM Security: Working with ISCL

DICOM Security: Working with TLS


DICOM Security: Working with ISCL

Closing ISCL Connection

CloseForced method

IsISCLQueueEmpty method

ISCL Status

GetStatusISCL method

GetErrorSecure method

Encryption Mode

GetIndexForEncryptISCL method

GetPeerEncryptionISCL method

SetDefaultEncryptionISCL method

SetEncryptKeyISCL method

SetIndexForEncryptISCL method

Communication Block

GetCommBlockLengthISCL method

SetMaxCommBlockLengthISCL method

Messages

SetMaxMessageLengthISCL method

Security

NetNonSecureReceivedISCL event

NetNonSecureSendISCL event

NetSecureLinkReady event

SendNonSecureISCL method

Peer Compuetr

GetPeerAuthDataISCL method

GetPeerRequestedMessageLengthISCL method

MAC Type

GetPeerMACISCL method

Authentication Mode

GetIndexForMutualAuthISCL method

NetInternalAuthenticateISCL event

SetAuthDataISCL method

SetDefaultSigningISCL method

SetIndexForMutualAuthISCL method

SetMutualAuthAlgISCL method

SetMutualAuthKeyISCL method

Challenge Code

ISCLChallengeResponseSuccess property

NetExternalAuthenticateISCL event

NetGetChallengeISCL event

NetInternalAuthenticateISCL event


DICOM Security: Working with TLS

Configuring Security

NetworkSecurityMode property

UseSSLOptions property

SSLCreateFlags property

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

SSLSuccess property

SSLPrivateKeyPassword property

SSLPrivateKeyPasswordEvent event

Working with Cipher

GetCipherFromIndexTLS method

GetCiphersuiteTLS method

SetCipherToIndexTLS method

Encryption Mode

GetEncryptionAlgorithmTLS method

GetEncryptKeyLengthTLS method

SetDefaultEncryptionISCL method

TLS Status

GetErrorSecure method

Key Exchange Algorithm

GetKeyExchangeAlgorithmTLS method

Certificate For A client

SetClientCertificateTLS method

SSLPrivateKeyPassword property

SSLPrivateKeyPasswordEvent event

Certificate For the Server

SetServerCertificateTLS method

SSLPrivateKeyPassword property

SSLPrivateKeyPasswordEvent event

Authentication

GetAuthenticationAlgorithmTLS method

GetIntegrityAlgorithmTLS method

GetMutualAuthKeyLengthTLS method


DICOM Print Management SCU

DICOM Print Management SCU: Association

DICOM Print Management SCU: Basic Print Management

DICOM Print Management SCU: Pull Stored Print Management

DICOM Print Management SCU: Printer

DICOM Print Management SCU: Print Jobs

DICOM Print Management SCU: Miscellaneous


DICOM Print Management SCU: Association

AbortAssociation method

AbortReason property

AbortSource property

Associate method

Associated property

AssociateRejectReason property

AssociateRejectResult property

AssociateRejectSource property

IsClassSupported method

ReleaseAssociation method


DICOM Print Management SCU: Basic Print Management

Film Sessions

Create method (ILFilmSession)

Delete method (ILFilmSession)

FilmDestination property (ILFilmSession)

FilmSession property

FilmSessionLabel property (ILFilmSession)

IncludedParameters property (ILFilmSession)

MediumType property (ILFilmSession)

MemoryAllocation property (ILFilmSession)

NumberOfCopies property (ILFilmSession)

OwnerID property (ILFilmSession)

PrintPriority property (ILFilmSession)

PrintSession method (ILFilmSession)

SOPInstanceUID property (ILFilmSession)

Update method (ILFilmSession)

Film Boxes

AnnotationDisplayFormatID property

BorderDensity property

ConfigurationInformation property (ILFilmBox)

Create method (ILFilmBox)

Delete method (ILFilmBox)

EmptyImageDensity property

FilmBox property

FilmOrientation property

FilmSizeID property

Illumination property (ILFilmBox)

IncludedParameters property (ILFilmBox)

MagnificationType property (ILFilmBox)

MaxDensity property (ILFilmBox)

MinDensity property (ILFilmBox)

PrintBox method

ReflectedAmbientLight property (ILFilmBox)

RefPresLUTInstanceUID property (ILFilmBox)

RequestedResolutionID property

SmoothingType property (ILFilmBox)

SOPInstanceUID property (ILFilmBox)

Trim property

Update method (ILFilmBox)

Image Boxes

_NewEnum property (ILImageBoxes)

ConfigurationInformation property (ILImageBox)

Count property (ILImageBoxes)

ImageBoxes property

ImageFilename property

ImagePosition property

IncludedParameters property

Item method (ILImageBoxes)

MagnificationType property (ILImageBox)

MaxDensity property (ILImageBox)

MinDensity property (ILImageBox)

Polarity property

RefImageOverlayBoxInstanceUID property

RefPresLUTInstanceUID property (ILImageBox)

RequestedDecimateCropBehavior property

RequestedImageSize property

SmoothingType property (ILImageBox)

SOPInstanceUID property (ILImageBox)

Update method (ILImageBox)

Annotation Boxes

_NewEnum property (ILAnnotationBoxes)

AnnotationBoxes property

AnnotationPosition property

Count property (ILAnnotationBoxes)

Item method (ILAnnotationBoxes)

MainObject property (ILAnnotationBox Interface)

SOPInstanceUID property (ILAnnotationBox)

TextString property

Update method (ILAnnotationBox)

Presentation LUTs

Create method (ILPresentationLUT)

Delete method (ILPresentationLUT)

GetSOPInstanceUID method (ILPresentationLUT)

MainObject property (ILPresentationLUT Interface)

PresentationLUT property

Image Overlay Boxes

Create method (ILImageOverlayBox)

Delete method (ILImageOverlayBox)

GetSOPInstanceUID method (ILImageOverlayBox)

ImageOverlayBox property

IncludedParameters property (ILImageOverlayBox)

MagnifyToNumberOfColumns property

OverlayBackgroundDensity property

OverlayFilename property

OverlayForegroundDensity property

OverlayMagnificationType property

OverlayOriginColumn property

OverlayOriginRow property

OverlayOrImageMagnification property

OverlaySmoothingType property

Update method (ILImageOverlayBox)


DICOM Print Management SCU: Printer

DICOM Print Management SCU:
Printer

Printer Information

DateOfLastCalibration property

DeviceSerialNumber property

GetInfo method (ILPrinter)

Manufacturer property

ManufacturerModelName property

Printer property

PrinterName property (ILPrinter)

PrinterStatus property

PrinterStatusInfo property

RequiredInfo property (ILPrinter)

TimeOfLastCalibration property

SoftwareVersions property

Printer Configuration Information

_NewEnum property (ILPrinterConfigurationItems)

_NewEnum property (ILSequenceItems)

_NewEnum property (ILSequences)

Attributes property (ILSequenceItem)

Attributes property (ILPrinterConfigurationItem)

Count property (ILAttributes)

Count property (ILPrinterConfigurationItems)

Count property (ILSequenceItem)

Count property (ILSequences)

Get method

Item method (ILPrinterConfigurationItems)

Items property (ILSequence)

Item method (ILSequenceItems)

Item method (ILSequences)

Name property (ILAttribute)

Name property (ILSequence)

PrinterConfigItems property

PrinterConfiguration property

Sequences property (ILPrinterConfigurationItem)

Value property (ILAttribute)

Printer Status Reports

OnPrinterReport event


DICOM Print Management SCU: PrintJobs

DICOM Print Management SCU:
Print Jobs

CreationDate property

CreationTime property

ExecutionStatus property

ExecutionStatusInfo property

GetInfo method (ILPrintJob)

OnPrintJobReport event

Originator property

PrinterName property (ILPrintJob)

PrintJob property

PrintJobSOPInstanceUID property (ILFilmBox)

PrintJobSOPInstanceUID property (ILFilmSession)

PrintJobSOPInstanceUID property (ILPullPrintRequest)

PrintPriority property (ILPrintJob)

RequiredInfo property (ILPrintJob)


DICOM Print Management SCU: Pull Stored Print Management

DICOM Print Management SCU:
Pull Stored Print Management

AddStoredPrintItem method

AnnotationFlag property

CollationFlag property

ColorImagePrintingFlag property

ConfigurationInformation property (ILPullPrintRequest)

Create method (ILPullPrintRequest)

Delete method (ILPullPrintRequest)

FilmDestination property (ILPullPrintRequest)

FilmSessionLabel property (ILPullPrintRequest)

Illumination property (ILPullPrintRequest)

ImageBoxPresentationLUTFlag property

ImageOverlayFlag property

IncludedParameters property (ILPullPrintRequest)

MediumType property (ILPullPrintRequest)

MemoryAllocation property (ILPullPrintRequest)

NumberOfCopies property (ILPullPrintRequest)

OwnerID property (ILPullPrintRequest)

PresentationLUTFlag property

PrintPriority property (ILPullPrintRequest)

PrintSession method (ILPullPrintRequest)

PullPrintRequest property

ReflectedAmbientLight property (ILPullPrintRequest)

RemoveAllStoredPrintItems method

SOPInstanceUID property (ILPullPrintRequest)


DICOM Print Management SCU: Miscellaneous

DICOM Print Management SCU:
Miscellaneous

EnableMethodErrors property

LastOperationStatus property

MainObject property (ILFilmSession)

MainObject property (ILFilmBox)

MainObject property (ILImageBox)

MainObject property (ILAnnotationBox)

MainObject property (ILImageOverlayBox)

MainObject property (ILPrinter)

MainObject property (ILPresentationLUT)

MainObject property (ILPullPrintRequest)

MainObject property (ILPrintJob)

MainObject property (ILPrinterConfiguration)

OnStatus event

Timeout property


Dicom Annotations

Presentation State Module

Layers

Graphic Objects

Text Objects

Converting Between LEADTOOLS Annotations and DICOM Annotations


Dicom Annotations: Converting Between LEADTOOLS Annotations and DICOM Annotations

Dicom Annotations:
Converting Between LEADTOOLS Annotations and DICOM Annotations

ConvertDicomAnnObjToLEADAnnObj method

ConvertLEADAnnObjToDicomAnnObjs method

EndConversion method

LEADAnnObject property

OnConvertLEADAnnObjToDicomAnnObj event


Dicom Annotations: Graphic Objects

Dicom Annotations:
Graphic Objects

CreateGraphicAnnItem method

CreateGraphicObject method

FindFirstGraphicAnnItem method

FindGraphicObjectItem method

GetGraphicObjectAttributes method

GetGraphicObjectCount method

GetLayerGraphicObjectCount method

GetLayerName method

GetLayerTextObjectCount method

GraphicObjectAttributes property

MoveNextGraphicAnnItem method

RemoveAllGraphicObjects method

RemoveGraphicObject method

RemoveLayerGraphicObjects method

RemoveLayerTextObjects method

SetGraphicObjectAttributes method

SetLayerName method


Dicom Annotations: Layers

Dicom Annotations:
Layers

AddLayerImageRef method

CreateLayer method

FindLayerItem method

FindLayerRefImageItem method

GetLayerAttributes method

GetLayerImageRefCount method

GetLayerImageRefInstanceUID method

GetLayerIndex method

LayerAttributes property

LayerCount property

NewLayerIndex property

RemoveAllLayerImageRefs method

RemoveAllLayers method

RemoveAllLayersImageRefs method

RemoveLayer method

RemoveLayerImageRef method

SetLayerAttributes method


Dicom Annotations: Presentation State Module

Dicom Annotations:
Presentation State Module

AddPresStateImageRef method

FindFirstPresStateRefSeriesItem method

FindPresStateRefImageItem method

GetPresStateAttributes method

GetPresStateImageRefCount method

GetPresStateImageRefInstanceUID method

InstanceNumber property

MoveNextPresStateRefSeriesItem method

PresCreationDate property

PresCreationTime property

PresCreatorName property

PresDescription property

PresLabel property

PresStateAttributes property

RemoveAllPresStateImageRefs method

RemovePresStateImageRef method

SetPresStateAttributes method


Dicom Annotations: Text Objects

Dicom Annotations:
Text Objects

CreateTextObject method

FindTextObjectItem method

GetTextObjectAttributes method

GetTextObjectCount method

RemoveAllTextObjects method

RemoveTextObject method

SetTextObjectAttributes method

TextObjectAttributes property


DICOM Context Groups

Context Groups

CurrentContextGroup property (ILEADDicomDS Interface)

DefaultContextGroup method (ILEADDicomDS Interface)

DeleteContextGroup method (ILEADDicomDS Interface)

FindContextGroup method (ILEADDicomDS Interface)

FindIndexContextGroup method (ILEADDicomDS Interface)

GetContextGroupCount method (ILEADDicomDS Interface)

InsertContextGroup method (ILEADDicomDS Interface)

LoadContextGroup method (ILEADDicomDS Interface)

MoveFirstContextGroup method (ILEADDicomDS Interface)

MoveLastContextGroup method (ILEADDicomDS Interface)

MoveNextContextGroup method (ILEADDicomDS Interface)

MovePrevContextGroup method (ILEADDicomDS Interface)

ResetContextGroup method (ILEADDicomDS Interface)

ContextGroupVersion property (IDicomContextGroup Interface)

ContextIdentifier property (IDicomContextGroup Interface)

Extensible property (IDicomContextGroup Interface)

Name property (IDicomContextGroup Interface)

Coded Concepts

CurrentCodedConcept property (ILEADDicomDS Interface)

DeleteCodedConcept method (ILEADDicomDS Interface)

FindCodedConcept method (ILEADDicomDS Interface)

FindIndexCodedConcept method (ILEADDicomDS Interface)

GetCodedConceptCount method (ILEADDicomDS Interface)

InsertCodedConcept method (ILEADDicomDS Interface)

MoveCodedConceptGroup method (ILEADDicomDS Interface)

MoveFirstCodedConcept method (ILEADDicomDS Interface)

MoveLastCodedConcept method (ILEADDicomDS Interface)

MoveNextCodedConcept method (ILEADDicomDS Interface)

MovePrevCodedConcept method (ILEADDicomDS Interface)

SetCodedConceptCodeMeaning method (ILEADDicomDS Interface)

CodeMeaning property (IDicomCodedConcept Interface)

CodeValue property (IDicomCodedConcept Interface)

CodingSchemeDesignator property (IDicomCodedConcept Interface)

CodingSchemeVersion property (IDicomCodedConcept Interface) (IDicomCodedConcept Interface)

ContextGroupExtensionCreatorUID property (IDicomCodedConcept Interface)

ContextGroupLocalVersion property (IDicomCodedConcept Interface)

IsContextGroupLocalVersion property (IDicomCodedConcept Interface)


DICOM Waveform Channels

DICOM Waveform Channels: Adding/Managing Waveform Annotations

DICOM Waveform Channels: Manipulating a Collection of Channels

DICOM Waveform Channels: Setting/Getting Channel Samples

DICOM Waveform Channels: Setting/Getting Channel Sensitivity

DICOM Waveform Channels: Setting/Getting Channel Source

DICOM Waveform Channels: Setting/Getting Other Channel Attributes

DICOM Waveform Channels: Using Code Sequence Items


DICOM Waveform Channels: Adding/Managing Waveform Annotations

DICOM Waveform Channels:
Adding/Managing Waveform Annotations

Add method

AnnotationGroupNumber property

CodedName property

CodedValue property

Count property

MeasurementUnits property

_NewEnum property

NumericValue property

NumericValueCount property

Item method

RefDateTime property

RefSamplePositions property

RefTimeOffsets property

Remove method

TemporalPointCount property

TemporalPointsType property

TemporalRangeType property

UnformattedTextValue property

ValueDefined property

ValueType property


DICOM Waveform Channels: Manipulating a Collection of Channels

DICOM Waveform Channels:
Manipulating a Collection of Channels

Add method

Count property

Item method

_NewEnum property

Remove method


DICOM Waveform Channels: Setting/Getting Channel Samples

DICOM Waveform Channels:
Setting/Getting Channel Samples

ChannelSamples property

NumberOfSamples property

SampleInterpretation property

SetChannelSamples method


DICOM Waveform Channels: Setting/Getting Channel Sensitivity

DICOM Waveform Channels:
Setting/Getting Channel Sensitivity

ChannelSensitivity property

ChannelSensitivityUnits property

ChannelSensitivityCF property

ChannelBaseline property


DICOM Waveform Channels: Setting/Getting Channel Source

DICOM Waveform Channels:
Setting/Getting Channel Source

ChannelSource property


DICOM Waveform Channels: Setting/Getting Other Channel Attributes

DICOM Waveform Channels:
Setting/Getting Other Channel Attributes

Annotations property

ChannelLabel property

ChannelMaximumValue property

ChannelMinimumValue property

ChannelOffset property

ChannelSampleSkew property

ChannelStatus property

ChannelTimeSkew property

FilterHighFrequency property

FilterLowFrequency property

Index property

NotchFilterBandwidth property

NotchFilterFrequency property

WaveformChannelNumber property

WaveformGroup property


DICOM Waveform Channels: Using Code Sequence Items

DICOM Waveform Channels:
Using Code Sequence Items

CodeMeaning property

CodeValue property

CodingSchemeDesignator property

CodingSchemeVersion property

ContextGroupExtensionCreatorUID property

ContextGroupLocalVersion property

ContextGroupVersion property

ContextIdentifier property

IsContextGroupLocalVersion property

IsContextGroupVersion property

MappingResource property


DICOM Waveform Groups

DICOM Waveform Groups: Constructing, Destructing and Resetting

DICOM Waveform Groups: Manipulating Channels

DICOM Waveform Groups: Setting/Getting Attributes

DICOM Waveform Groups: Supporting Audio

DICOM Waveform Groups: Using Waveform Groups


DICOM Waveform Groups: Constructing, Destructing and Resetting

DICOM Waveform Groups:
Constructing, Destructing and Resetting

EnableMethodErrors property (IDicomWaveformGroup Interface)

ValueDefined property (IDicomWaveformGroup Interface)


DICOM Waveform Groups: Manipulating Channels

DICOM Waveform Groups:
Manipulating Channels

Channels property

NumberOfSamplesPerChannel property

Reset method

SetNumberOfSamplesPerChannel method


DICOM Waveform Groups: Setting/Getting Attributes

DICOM Waveform Groups:
Setting/Getting Attributes

MultiplexGroupLabel property

MultiplexGroupTimeOffset property

SampleInterpretation property

SamplingFrequency property

TriggerSamplePosition property

TriggerTimeOffset property

ValueDefined property

WaveformOriginality property

WaveformPaddingValue property


DICOM Waveform Groups: Supporting Audio

DICOM Waveform Groups:
Supporting Audio

LoadAudio method

SaveAudio method


DICOM Waveform Groups: Using Waveform Groups

DICOM Waveform Groups:
Using Waveform Groups

AddWaveformGroup method

DeleteWaveformGroup method

GetWaveformGroup method

GetWaveformGroupCount method


_ILEADDicomPrintSCUEvents Dispinterface

The _ILEADDicomPrintSCUEvents dispinterface defines the events fired by a LEADDicomPrintSCU object.

Events

OnStatus event

OnPrinterReport event

OnPrintJobReport event


IDicomContextGroup Interface

The IDicomContextGroup dual interface defines properties to specify a Context Group. This interface is implemented by the DicomContextGroup non-creatable COM class.

Properties

ContextIdentifier property

Name property

Extensible property

ContextGroupVersion property


IDicomCodedConcept Interface

The IDicomCodedConcept dual interface defines properties to specify a Coded Concept. This interface is implemented by the DicomCodedConcept non-creatable COM class.

Properties

CodingSchemeDesignator property

CodingSchemeVersion property

CodeValue property

CodeMeaning property

IsContextGroupLocalVersion property

ContextGroupLocalVersion property

ContextGroupExtensionCreatorUID property


IDicomCodeSequenceItem Interface

The IDicomCodeSequenceItem dual interface defines properties to specify an Item in a Code Sequence. This interface is implemented by the DicomCodeSequenceItem non-creatable COM class.

Properties

CodeMeaning property

CodeValue property

CodingSchemeDesignator property

CodingSchemeVersion property

ContextGroupExtensionCreatorUID property

ContextGroupLocalVersion property

ContextGroupVersion property

ContextIdentifier property

IsContextGroupLocalVersion property

IsContextGroupVersion property

MappingResource property


IDicomGraphicObjectAttributes Interface

The IDicomGraphicObjectAttributes dual interface defines properties for the attributes that describe a graphic annotation object. This interface is implemented by the DicomGraphicObjectAttributes non-creatable COM class.

Properties

LayerName property

Type property

Units property

Filled property

PointCount property

PointsX property

PointsY property


IDicomLayerAttributes Interface

The IDicomLayerAttributes dual interface defines properties for the attributes that describe a DICOM graphic layer. This interface is implemented by the DicomLayerAttributes non-creatable COM class.

Properties

LayerName property

LayerOrder property

DisplayGrayscaleValue property

DisplayRedValue property

DisplayGreenValue property

DisplayBlueValue property

LayerDescription property


IDicomPresStateAttributes Interface

The IDicomPresStateAttributes dual interface defines properties for the attributes that describe the "Presentation State Module". This interface is implemented by the DicomPresStateAttributes non-creatable COM class.

Properties

InstanceNumber property

PresLabel property

PresDescription property

PresCreationDate property

PresCreationTime property

PresCreatorName property


IDicomTextObjectAttributes Interface

The IDicomTextObjectAttributes dual interface defines properties for the attributes that describe a text annotation object. This interface is implemented by the DicomTextObjectAttributes non-creatable COM Class.

Properties

LayerName property

TextValue property

BoundingBoxUsed property

AnchorPointUsed property

BoundingBoxUnits property

AnchorPointUnits property

BoundingBoxTLHCornerX property

BoundingBoxTLHCornerY property

BoundingBoxBRHCornerX property

BoundingBoxBRHCornerY property

BoundingBoxTextJustification property

AnchorPointX property

AnchorPointY property

AnchorPointVisible property


IDicomWaveformAnnotation Interface

The IDicomWaveformAnnotation dual interface defines properties to handle an annotation applied to a waveform channel. This interface is implemented by the DicomWaveformAnnotation non-creatable COM class.

Properties

AnnotationGroupNumber property

CodedName property

CodedValue property

MeasurementUnits property

NumericValue property

NumericValueCount property

RefDatetime property

RefSamplePositions property

RefTimeOffsets property

TemporalPointCount property

TemporalPointsType property

TemporalRangeType property

UnformattedTextValue property

ValueDefined property

ValueType property


IDicomWaveformAnnotations Interface

The IDicomWaveformAnnotations dual interface defines properties and methods to manage a collection of DicomWaveformAnnotation objects. This interface is implemented by the DicomWaveformAnnotations non-creatable COM class.

Properties

Count property

_NewEnum property

Methods

Item method

Add method

Remove method


IDicomWaveformChannel Interface

The IDicomWaveformChannel dual interface defines members to handle a waveform channel in a waveform multiplex group. This interface is implemented by the DicomWaveformChannel non-creatable COM class.

A waveform in DICOM consists of one or more multiplex groups, each encoded into an Item in the Waveform Sequence (5400,0100). All channels within a multiplex group are synchronously digitized at a common sampling frequency.

Properties

Annotations property

ChannelBaseline property

ChannelLabel property

ChannelMaximumValue property

ChannelMinimumValue property

ChannelOffset property

ChannelSamples property

ChannelSampleSkew property

ChannelSensitivity property

ChannelSensitivityCF property

ChannelSensitivityUnits property

ChannelSource property

ChannelStatus property

ChannelTimeSkew property

FilterHighFrequency property

FilterLowFrequency property

Index property

NotchFilterBandwidth property

NotchFilterFrequency property

NumberOfSamples property

ValueDefined property

WaveformChannelNumber property

WaveformGroup property

Methods

SetChannelSamples method


IDicomWaveformChannels Interface

The IDicomWaveformChannels dual interface defines properties and methods to manage a collection of DicomWaveformChannel objects. This interface is implemented by the DicomWaveformChannels non-creatable COM class.

A waveform in DICOM consists of one or more multiplex groups, each encoded into an Item in the Waveform Sequence (5400,0100). All channels within a multiplex group are synchronously digitized at a common sampling frequency.

Properties

Count property

_NewEnum property

Methods

Add method

Item method

Remove method


IDicomWaveformGroup Interface

The IDicomWaveformGroup dual interface defines properties and methods to handle a waveform multiplex group. This interface is implemented by the DicomWaveformGroup COM class.

A waveform in DICOM consists of one or more multiplex groups, each encoded into an Item in the Waveform Sequence (5400,0100). All channels within a multiplex group are synchronously digitized at a common sampling frequency.

Properties

Channels property

EnableMethodErrors property

MultiplexGroupLabel property

MultiplexGroupTimeOffset property

NumberOfSamplesPerChannel property

SampleInterpretation property

SamplingFrequency property

TriggerSamplePosition property

TriggerTimeOffset property

ValueDefined property

WaveformOriginality property

WaveformPaddingValue property

Methods

LoadAudio method

Reset method

SaveAudio method

SetNumberOfSamplesPerChannel method


ILAnnotationBox Interface

The ILAnnotationBox dual interface defines Properties and Methods to handle Annotation Boxes. This interface is implemented by the LAnnotationBox non-creatable COM class.

Properties

MainObject property

SOPInstanceUID property

AnnotationPosition property

TextString property

Methods

Update method


ILAnnotationBoxes Interface

The ILAnnotationBoxes dual interface defines Properties and Methods to manage a collection of LAnnotationBox objects. This interface is implemented by the LAnnotationBoxes non-creatable COM class.

Properties

Count property

_NewEnum property

Methods

Item method


ILAttribute Interface

The ILAttribute dual interface defines Properties to examine an Attribute. This interface is implemented by the LAttribute non-creatable COM class.

Properties

Name property

Value property


ILAttributes Interface

The ILAttributes dual interface defines Properties and Methods to manage a collection of LAttribute objects. This interface is implemented by the LAttributes non-creatable COM class.

Properties

Count property

_NewEnum property

Methods

Item method


ILEADDicomDir Interface

The ILEADDicomDir dual interface defines Methods, Properties, and events used to create DICOM Directories for DICOM File-sets. This interface is implemented by the LEADDicomDir COM class.

Properties

IncludeSubfolders property

RejectInvalidFileID property

hDicomDirDS property

EnableMethodErrors property

InsertIconImageSequence property

ImplementationClassUID property

ImplementationVersionName property

Methods

ResetDicomDir method

SetFileSetID Method

SetDescriptorFile Method

InsertDicomFile method

InsertDicomDS method

SaveDicomDir Method

LoadDicomDir method

Events

DicomFileInsert event


ILEADDicomDirEvents Interface

The ILEADDicomDirEvents interface defines an event used to create DICOM Directories for DICOM File-sets. This interface is implemented by the LEADDicomDirEvents COM class.

Events

DicomFileInsert event


ILEADDicomDS Interface

The ILEADDicomDS interface defines methods, properties, and an event used to retrieve and update the values of the elements that describe the "Presentation State Module", manipulate the "Graphic Layer Module", create and manipulate text and graphic objects, define the set of Image SOP Instances to which a group of graphic and text annotations applies, work with a Context Group table, and implement functionality to convert DICOM annotations into LEADTOOLS annotations and vice versa. This interface is implemented by the LEADDicomDS COM class.

Properties

CurrentCodedConcept property

CurrentContextGroup property

PresStateAttributes property

LayerAttributes property

NewLayerIndex property

LayerCount property

GraphicObjectAttributes property

TextObjectAttributes property

LEADAnnObject property

Methods

DefaultContextGroup method

DeleteCodedConcept method

DeleteContextGroup method

FindCodedConcept method

FindContextGroup method

FindIndexCodedConcept method

FindIndexContextGroup method

GetCodedConceptCount method

GetContextGroupCount method

InsertCodedConcept method

InsertContextGroup method

LoadContextGroup method

MoveCodedConceptGroup method

MoveFirstCodedConcept method

MoveFirstContextGroup method

MoveLastCodedConcept method

MoveLastContextGroup method

MoveNextCodedConcept method

MoveNextContextGroup method

MovePrevCodedConcept method

MovePrevContextGroup method

ResetContextGroup method

SetCodedConceptCodeMeaning method

GetPresStateAttributes method

SetPresStateAttributes method

AddPresStateImageRef method

RemovePresStateImageRef method

RemoveAllPresStateImageRefs method

GetPresStateImageRefInstanceUID method

GetPresStateImageRefCount method

FindFirstPresStateRefSeriesItem method

MoveNextPresStateRefSeriesItem method

FindPresStateRefImageItem method

CreateLayer method

GetLayerAttributes method

SetLayerAttributes method

RemoveLayer method

RemoveAllLayers method

GetLayerIndex method

FindLayerItem method

FindFirstGraphicAnnItem method

MoveNextGraphicAnnItem method

GetLayerName method

SetLayerName method

CreateGraphicAnnItem method

GetLayerGraphicObjectCount method

RemoveLayerGraphicObjects method

GetLayerTextObjectCount method

RemoveLayerTextObjects method

CreateGraphicObject method

GetGraphicObjectAttributes method

SetGraphicObjectAttributes method

RemoveGraphicObject method

GetGraphicObjectCount method

RemoveAllGraphicObjects method

FindGraphicObjectItem method

CreateTextObject method

GetTextObjectAttributes method

SetTextObjectAttributes method

RemoveTextObject method

GetTextObjectCount method

RemoveAllTextObjects method

FindTextObjectItem method

AddLayerImageRef method

GetLayerImageRefCount method

RemoveLayerImageRef method

RemoveAllLayerImageRefs method

RemoveAllLayersImageRefs method

FindLayerRefImageItem method

ConvertLEADAnnObjToDicomAnnObjs method

EndConversion method

ConvertDicomAnnObjToLEADAnnObj method

Events

OnConvertLEADAnnObjToDicomAnnObj event


ILEADDicomFactory Interface

The ILEADDicomFactory interface defines Methods used to create instances of licensed COM objects, such as the LEAD Raster COM Object, LEAD RasterView Control, and LEAD Dicom Kernel COM Object. This interface is implemented by the LEADDicomFactory COM class.

Methods

CreateObject method

CreateObject2 method


ILEADDicomKernel Interface

The ILEADDicomKernel interface defines Methods and Properties used to unlock support for LEADTOOLS features and generate runtime exceptions. This interface is implemented by the LEADDicomKernel COM class.

Properties

EnableMethodErrors property

Methods

IsSupportLocked method

UnlockSupport method


ILEADDicomPrintSCU Interface

The ILEADDicomPrintSCU dual interface defines Methods and Properties to implement a Print Management Service Class User. This interface is implemented by the LEADDicomPrintSCU COM class.

Properties

AbortReason property

AbortSource property

AnnotationBoxes property

Associated property

AssociateRejectReason property

AssociateRejectResult property

AssociateRejectSource property

EnableMethodErrors property

FilmBox property

FilmSession property

ImageBoxes property

ImageOverlayBox property

LastOperationStatus property

PresentationLUT property

Printer property

PrinterConfiguration property

PrintJob property

PullPrintRequest property

Timeout property

Methods

Associate method

IsClassSupported method

ReleaseAssociation method

AbortAssociation method


ILFilmBox Interface

The ILFilmBox dual interface defines Methods and Properties to handle Film Boxes. This interface is implemented by the LFilmBox non-creatable COM class.

Properties

AnnotationDisplayFormatID property

BorderDensity property

ConfigurationInformation property

EmptyImageDensity property

FilmOrientation property

FilmSizeID property

Illumination property

IncludedParameters property

MagnificationType property

MainObject property

MaxDensity property

MinDensity property

PrintJobSOPInstanceUID property

ReflectedAmbientLight property

RefPresLUTInstanceUID property

RequestedResolutionID property

SmoothingType property

SOPInstanceUID property

Trim property

Methods

Create method

Update method

PrintBox method

Delete method


ILFilmSession Interface

The ILFilmSession dual interface defines Methods and Properties to handle Film Sessions. This interface is implemented by the LFilmSession non-creatable COM class.

Properties

MainObject property

SOPInstanceUID property

PrintJobSOPInstanceUID property

IncludedParameters property

NumberOfCopies property

PrintPriority property

MediumType property

FilmDestination property

FilmSessionLabel property

MemoryAllocation property

OwnerID property

Methods

Create method

Update method

PrintSession method

Delete method


ILImageBox Interface

The ILImageBox dual interface defines Properties and Methods to handle Image Boxes. This interface is implemented by the LImageBox non-creatable COM class.

Properties

MainObject property

SOPInstanceUID property

IncludedParameters property

ImagePosition property

ImageFilename property

Polarity property

MagnificationType property

SmoothingType property

MinDensity property

MaxDensity property

ConfigurationInformation property

RequestedImageSize property

RequestedDecimateCropBehavior property

RefImageOverlayBoxInstanceUID property

RefPresLUTInstanceUID property

Methods

Update method


ILImageBoxes Interface

The ILImageBoxes dual interface defines Properties and Methods to manage a collection of LImageBox objects. This interface is implemented by the LImageBoxes non-creatable COM class.

Properties

Count property

_NewEnum property

Methods

Item method


ILImageOverlayBox Interface

The ILImageOverlayBox dual interface defines Methods and Properties to handle Image Overlay Boxes. This interface is implemented by the LImageOverlayBox non-creatable COM class.

Properties

MainObject property

IncludedParameters property

OverlayFilename property

OverlayOriginRow property

OverlayOriginColumn property

OverlayOrImageMagnification property

MagnifyToNumberOfColumns property

OverlayMagnificationType property

OverlayForegroundDensity property

OverlayBackgroundDensity property

OverlaySmoothingType property

Methods

Create method

GetSOPInstanceUID method

Update method

Delete method


ILModalityLUTAttributes Interface

The ILModalityLUTAttributes dual interface defines properties for the attributes of Modality LUTs. This interface is implemented by the LModalityLUTAttributes non-creatable COM class.

Properties

IsModalityLUTSequence property

LUTDescriptorNumberOfEntries property

LUTDescriptorFirstMapped property

LUTDescriptorEntryBits property

LUTExplanation property

ModalityLUTType property

IsRescaleSlopeIntercept property

RescaleIntercept property

RescaleSlope property

RescaleType property


ILPaletteColorLUTAttributes Interface

The ILPaletteColorLUTAttributes dual interface defines properties for the attributes of Palette Color LUTs. This interface is implemented by the LPaletteColorLUTAttributes non-creatable COM class.

Properties

RedLUTDescriptorNumberOfEntries property

RedLUTDescriptorFirstMapped property

RedLUTDescriptorEntryBits property

GreenLUTDescriptorNumberOfEntries property

GreenLUTDescriptorFirstMapped property

GreenLUTDescriptorEntryBits property

BlueLUTDescriptorNumberOfEntries property

BlueLUTDescriptorFirstMapped property

BlueLUTDescriptorEntryBits property

UID property

IsSegmented property


ILPresentationLUT Interface

The ILPresentationLUT dual interface defines Methods to handle Presentation LUTs. This interface is implemented by the LPresentationLUT non-creatable COM class.

Properties

MainObject property

Methods

Create method

GetSOPInstanceUID method

Delete method


ILPrinter Interface

The ILPrinter dual interface defines Properties and Methods to query the Print SCP for printer information. This interface is implemented by the LPrinter non-creatable COM class.

Properties

DateOfLastCalibration property

DeviceSerialNumber property

MainObject property

Manufacturer property

ManufacturerModelName property

PrinterName property

PrinterStatus property

PrinterStatusInfo property

RequiredInfo property

SoftwareVersions property

TimeOfLastCalibration property

Methods

GetInfo method


ILPrinterConfiguration Interface

The ILPrinterConfiguration dual interface defines Properties and Methods to query the Print SCP for printer configuration information. This interface is implemented by the LPrinterConfiguration non-creatable COM class.

Properties

MainObject property

PrinterConfigItems property

Methods

Get method


ILPrinterConfigurationItem Interface

The ILPrinterConfigurationItem dual interface defines Properties to examine a Printer Configuration Item. This interface is implemented by the LPrinterConfigurationItem non-creatable COM class.

Properties

Attributes property

Sequences property


ILPrinterConfigurationItems Interface

The ILPrinterConfigurationItems dual interface defines Properties and Methods to manage a collection of LPrinterConfigurationItem objects. This interface is implemented by the LPrinterConfigurationItems non-creatable COM class.

Properties

Count property

_NewEnum property

Methods

Item method


ILPrintJob Interface

The ILPrintJob dual interface defines Properties and Methods to query the Print SCP for Print Job information. This interface is implemented by the LPrintJob non-creatable COM class.

Properties

CreationDate property

CreationTime property

ExecutionStatus property

ExecutionStatusInfo property

MainObject property

Originator property

PrinterName property

PrintPriority property

RequiredInfo property

Methods

GetInfo method


ILPullPrintRequest Interface

The ILPullPrintRequest dual interface defines Methods and Properties to handle Pull Print Request SOP Instances. This interface is implemented by the LPullPrintRequest non-creatable COM class.

Properties

AnnotationFlag property

CollationFlag property

ColorImagePrintingFlag property

ConfigurationInformation property

FilmDestination property

FilmSessionLabel property

Illumination property

ImageBoxPresentationLUTFlag property

ImageOverlayFlag property

IncludedParameters property

MainObject property

MediumType property

MemoryAllocation property

NumberOfCopies property

OwnerID property

PresentationLUTFlag property

PrintJobSOPInstanceUID property

PrintPriority property

ReflectedAmbientLight property

SOPInstanceUID property

Methods

AddStoredPrintItem method

Create method

Delete method

PrintSession method

RemoveAllStoredPrintItems method


ILSequence Interface

The ILSequence dual interface defines Properties to examine a Sequence of Items. This interface is implemented by the LSequence non-creatable COM class.

Properties

Name property

Items property


ILSequenceItem Interface

The ILSequenceItem dual interface defines the following properties to examine the Attributes of a Sequence Item. This interface is implemented by the LSequenceItem non-creatable COM class.

Properties

Attributes property

Count Property


ILSequenceItems Interface

The ILSequenceItems dual interface defines Properties and Methods to manage a collection of LSequenceItem objects. This interface is implemented by the LSequenceItems non-creatable COM class.

Properties

_NewEnum property

Methods

Item method


ILSequences Interface

The ILSequences dual interface defines Properties and Methods to manage a collection of LSequence objects. This interface is implemented by the LSequences non-creatable COM class.

Properties

Count property

_NewEnum property

Methods

Item method


ILVOILUTAttributes Interface

The ILVOILUTAttributes dual interface defines properties for the attributes of VOI LUTs. This interface is implemented by the LVOILUTAttributes non-creatable COM class.

Properties

LUTDescriptorNumberOfEntries property

LUTDescriptorFirstMapped property

LUTDescriptorEntryBits property

LUTExplanation property


ILWindowAttributes Interface

The ILWindowAttributes dual interface defines properties for the attributes of windows. This interface is implemented by the LWindowAttributes non-creatable COM class.

Properties

WindowCenter property

WindowWidth property

WindowCWExplanation property


Data Element Tag Constants

The following is a list of the default Data Element Tags that are standard for the DICOM file format.

Code constant | Code value
TAG_FILE_META_INFORMATION_VERSION | 0x00020001
TAG_MEDIA_STORAGE_SOP_CLASS_UID | 0x00020002
TAG_MEDIA_STORAGE_SOP_INSTANCE_UID | 0x00020003
TAG_TRANSFER_SYNTAX_UID | 0x00020010
TAG_IMPLEMENTATION_CLASS_UID | 0x00020012
TAG_IMPLEMENTATION_VERSION_NAME | 0x00020013
TAG_SOURCE_APPLICATION_ENTITY_TITLE | 0x00020016
TAG_PRIVATE_INFORMATION_CREATOR_UID | 0x00020100
TAG_PRIVATE_INFORMATION | 0x00020102
TAG_FILE_SET_ID | 0x00041130
TAG_FILE_SET_DESCRIPTOR_FILE_ID | 0x00041141
TAG_SPECIFIC_CHARACTER_SET_OF_FILE | 0x00041142
TAG_OFFSET_FIRST_ROOT_DIRECTORY | 0x00041200
TAG_OFFSET_LAST_ROOT_DIRECTORY | 0x00041202
TAG_FILE_SET_CONSISTENCY_FLAG | 0x00041212
TAG_DIRECTORY_RECORD_SEQUENCE | 0x00041220
TAG_OFFSET_NEXT_DIRECTORY | 0x00041400
TAG_RECORD_IN_USE_FLAG | 0x00041410
TAG_OFFSET_CHILD_DIRECTORY | 0x00041420
TAG_DIRECTORY_RECORD_TYPE | 0x00041430
TAG_PRIVATE_RECORD_UID | 0x00041432
TAG_REFERENCED_FILE_ID | 0x00041500
TAG_OFFSET_MRDR_DIRECTORY | 0x00041504
TAG_REFERENCED_SOP_CLASS_UID_IN_FILE | 0x00041510
TAG_REFERENCED_SOP_INSTANCE_UID_IN_FILE | 0x00041511
TAG_REFERENCED_TRANSFER_SYNTAX_UID_IN_FILE | 0x00041512
TAG_NUMBER_OF_REFERENCES | 0x00041600
TAG_SPECIFIC_CHARACTER_SET | 0x00080005
TAG_IMAGE_TYPE | 0x00080008
TAG_INSTANCE_CREATION_DATE | 0x00080012
TAG_INSTANCE_CREATION_TIME | 0x00080013
TAG_INSTANCE_CREATOR_UID | 0x00080014
TAG_SOP_CLASS_UID | 0x00080016
TAG_SOP_INSTANCE_UID | 0x00080018
TAG_STUDY_DATE | 0x00080020
TAG_SERIES_DATE | 0x00080021
TAG_ACQUISITION_DATE | 0x00080022
TAG_IMAGE_DATE | 0x00080023
TAG_OVERLAY_DATE | 0x00080024
TAG_CURVE_DATE | 0x00080025
TAG_STUDY_TIME | 0x00080030
TAG_SERIES_TIME | 0x00080031
TAG_ACQUISITION_TIME | 0x00080032
TAG_IMAGE_TIME | 0x00080033
TAG_OVERLAY_TIME | 0x00080034
TAG_CURVE_TIME | 0x00080035
TAG_NUCLEAR_MEDICINE_SERIES_TYPE_RETIRED | 0x00080042
TAG_ACCESSION_NUMBER | 0x00080050
TAG_QUERY_RETRIEVE_LEVEL | 0x00080052
TAG_RETRIEVE_AE_TITLE | 0x00080054
TAG_FAILED_SOP_INSTANCE_UID_LIST | 0x00080058
TAG_MODALITY | 0x00080060
TAG_MODALITIES_IN_STUDY | 0x00080061
TAG_CONVERSION_TYPE | 0x00080064
TAG_PRESENTATION_INTENT_TYPE | 0x00080068
TAG_MANUFACTURER | 0x00080070
TAG_INSTITUTION_NAME | 0x00080080
TAG_INSTITUTION_ADDRESS | 0x00080081
TAG_INSTITUTION_CODE_SEQUENCE | 0x00080082
TAG_REFERRING_PHYSICIAN_NAME | 0x00080090
TAG_REFERRING_PHYSICIAN_ADDRESS | 0x00080092
TAG_REFERRING_PHYSICIAN_TELEPHONE_NUMBERS | 0x00080094
TAG_REFERRING_PHYSICIAN_IDENTIFICATION_SEQUENCE | 0x00080096
TAG_CODE_VALUE | 0x00080100
TAG_CODING_SCHEME_DESIGNATOR | 0x00080102
TAG_CODE_MEANING | 0x00080104
TAG_CONTEXT_GROUP_LOCAL_VERSION | 0x00080107
TAG_CONTEXT_GROUP_EXTENSION_FLAG | 0x0008010B
TAG_CODING_SCHEME_UID | 0x0008010C
TAG_CONTEXT_GROUP_EXTENSION_CREATOR_UID | 0x0008010D
TAG_CODING_SCHEME_IDENTIFICATION_SEQUENCE | 0x00080110
TAG_CODING SCHEME REGISTRY | 0x00080112
TAG_CODING_SCHEME_EXTERNAL_ID | 0x00080114
TAG_CODING_SCHEME_NAME | 0x00080115
TAG_RESPONSIBLE_ORGANIZATION | 0x00080116
TAG_STATION_NAME | 0x00081010
TAG_STUDY_DESCRIPTION | 0x00081030
TAG_PROCEDURE_CODE_SEQUENCE | 0x00081032
TAG_SERIES_DESCRIPTION | 0x0008103E
TAG_INSTITUTIONAL_DEPARTMENT_NAME | 0x00081040
TAG_PHYSICIAN_OF_RECORD | 0x00081048
TAG_PHYSICIAN_OF_RECORD_IDENTIFICATION_SEQUENCE | 0x00081049
TAG_PERFORMING_PHYSICIAN_NAME | 0x00081050
TAG_PERFORMING_PHYSICIAN_IDENTIFICATION_SEQUENCE | 0x00081052
TAG_NAME_OF_PHYSICIAN_READING_STUDY | 0x00081060
TAG_PHYSICIAN_READING_STUDY_IDENTIFICATION_SEQUENCE | 0x00081062
TAG_OPERATORS_NAME | 0x00081070
TAG_OPERATOR_IDENTIFICATION_SEQUENCE | 0x00081072
TAG_ADMITTING_DIAGNOSES_DESCRIPTION | 0x00081080
TAG_ADMITTING_DIAGNOSIS_CODE_SEQUENCE | 0x00081084
TAG_MANUFACTURER_MODEL_NAME | 0x00081090
TAG_REFERENCED_RESULTS_SEQUENCE | 0x00081100
TAG_REFERENCED_STUDY_SEQUENCE | 0x00081110
TAG_REFERENCED_STUDY_COMPONENT_SEQUENCE | 0x00081111
TAG_REFERENCED_SERIES_SEQUENCE | 0x00081115
TAG_REFERENCED_PATIENT_SEQUENCE | 0x00081120
TAG_REFERENCED_VISIT_SEQUENCE | 0x00081125
TAG_REFERENCED_OVERLAY_SEQUENCE_0008 | 0x00081130
TAG_REFERENCED_WAVEFORM_SEQUENCE | 0x0008113A
TAG_REFERENCED_IMAGE_SEQUENCE | 0x00081140
TAG_REFERENCED_INSTANCE_SEQUENCE | 0x0008114A
TAG_REFERENCED_CURVE_SEQUENCE | 0x00081145
TAG_REFERENCED_SOP_CLASS_UID | 0x00081150
TAG_REFERENCED_SOP_INSTANCE_UID | 0x00081155
TAG_SOP_CLASSES_SUPPORTED | 0x0008115A
TAG_REFERENCED_FRAME_NUMBER | 0x00081160
TAG_TRANSACTION_UID | 0x00081195
TAG_FAILURE_REASON | 0x00081197
TAG_FAILED_SOP_SEQUENCE | 0x00081198
TAG_REFERENCED_SOP_SEQUENCE | 0x00081199
TAG_STUDIES_CONTAINING_OTHER_REFERENCED_INSTANCES_SEQUENCE | 0x00081200
TAG_LOSSY_IMAGE_COMPRESSION_RETIRED | 0x00082110
TAG_DERIVATION_DESCRIPTION | 0x00082111
TAG_SOURCE_IMAGE_SEQUENCE | 0x00082112
TAG_STAGE_NAME | 0x00082120
TAG_STAGE_NUMBER | 0x00082122
TAG_NUMBER_OF_STAGES | 0x00082124
TAG_VIEW_NAME | 0x00082127
TAG_VIEW_NUMBER | 0x00082128
TAG_NUMBER_OF_EVENT_TIMERS | 0x00082129
TAG_NUMBER_OF_VIEWS_IN_STAGE | 0x0008212A
TAG_EVENT_ELAPSED_TIME | 0x00082130
TAG_EVENT_TIMER_NAME | 0x00082132
TAG_START_TRIM | 0x00082142
TAG_STOP_TRIM | 0x00082143
TAG_RECOMMENDED_DISPLAY_FRAME_RATE | 0x00082144
TAG_TRANSDUCER_POSITION_RETIRED | 0x00082200
TAG_TRANSDUCER_ORIENTATION_RETIRED | 0x00082204
TAG_ANATOMIC_STRUCTURE_RETIRED | 0x00082208
TAG_ANATOMIC_REGION_SEQUENCE | 0x00082218
TAG_ANATOMIC_REGION_MODIFIER_SEQUENCE | 0x00082220
TAG_PRIMARY_ANATOMIC_STRUCTURE_SEQUENCE | 0x00082228
TAG_ANATOMIC_STRUCTURE_SPACE_OR_REGION_SEQUENCE | 0x00082229
TAG_PRIMARY_ANATOMIC_STRUCTURE_MODIFIER_SEQUENCE | 0x00082230
TAG_TRANSDUCER_POSITION_SEQUENCE | 0x00082240
TAG_TRANSDUCER_POSITION_MODIFIER_SEQUENCE | 0x00082242
TAG_TRANSDUCER_ORIENTATION_SEQUENCE | 0x00082244
TAG_TRANSDUCER_ORIENTATION_MODIFIER_SEQUENCE | 0x00082246
TAG_FRAME_TYPE | 0x00089007
TAG_REFERENCED_IMAGE_EVIDENCE_SEQUENCE | 0x00089092
TAG_REFERENCED_RAW_DATA_SEQUENCE | 0x00089121
TAG_CREATOR_VERSION_UID | 0x00089123
TAG_DERIVATION_IMAGE_SEQUENCE | 0x00089124
TAG_SOURCE_IMAGE_EVIDENCE_SEQUENCE | 0x00089154
TAG_PIXEL_PRESENTATION | 0x00089205
TAG_VOLUMETRIC_PROPERTIES | 0x00089206
TAG_VOLUME_BASED_CALCULATION_TECHNIQUE | 0x00089207
TAG_COMPLEX_IMAGE_COMPONENT | 0x00089208
TAG_ACQUISITION_CONTRAST | 0x00089209
TAG_DERIVATION_CODE_SEQUENCE | 0x00089215
TAG_REFERENCED_GRAYSCALE_PRESENTATION_STATE_SEQUENCE | 0x00089237
TAG_PATIENT_NAME | 0x00100010
TAG_PATIENT_ID | 0x00100020
TAG_ISSUER_OF_PATIENT_ID | 0x00100021
TAG_PATIENT_BIRTH_DATE | 0x00100030
TAG_PATIENT_BIRTH_TIME | 0x00100032
TAG_PATIENT_SEX | 0x00100040
TAG_PATIENT_INSURANCE_PLAN_CODE_SEQUENCE | 0x00100050
TAG_PATIENT_PRIMARY_LANGUAGE_CODE_SEQUENCE | 0x00100101
TAG_PATIENT_PRIMARY_LANGUAGE_CODE_MODIFIER_SEQUENCE | 0x00100102
TAG_OTHER_PATIENT_IDS | 0x00101000
TAG_OTHER_PATIENT_NAMES | 0x00101001
TAG_PATIENT_BIRTH_NAME | 0x00101005
TAG_PATIENT_AGE | 0x00101010
TAG_PATIENT_SIZE | 0x00101020
TAG_PATIENT_WEIGHT | 0x00101030
TAG_PATIENT_ADDRESS | 0x00101040
TAG_PATIENT_MOTHER_BIRTH_NAME | 0x00101060
TAG_MILITARY_RANK | 0x00101080
TAG_BRANCH_OF_SERVICE | 0x00101081
TAG_MEDICAL_RECORD_LOCATOR | 0x00101090
TAG_MEDICAL_ALERTS | 0x00102000
TAG_CONTRAST_ALLERGIES | 0x00102110
TAG_COUNTRY_OF_RESIDENCE | 0x00102150
TAG_REGION_OF_RESIDENCE | 0x00102152
TAG_PATIENT_TELEPHONE_NUMBERS | 0x00102154
TAG_ETHNIC_GROUP | 0x00102160
TAG_OCCUPATION | 0x00102180
TAG_SMOKING_STATUS | 0x001021A0
TAG_ADDITIONAL_PATIENT_HISTORY | 0x001021B0
TAG_PREGNANCY_STATUS | 0x001021C0
TAG_LAST_MENSTRUAL_DATE | 0x001021D0
TAG_PATIENT_RELIGIOUS_PREFERENCE | 0x001021F0
TAG_PATIENT_COMMENTS | 0x00104000
TAG_CLINICAL_TRIAL_SPONSOR_NAME | 0x00120010
TAG_CLINICAL_TRIAL_PROTOCOL_ID | 0x00120020
TAG_CLINICAL_TRIAL_PROTOCOL_NAME | 0x00120021
TAG_CLINICAL_TRIAL_SITE_ID | 0x00120030
TAG_CLINICAL_TRIAL_SITE_NAME | 0x00120031
TAG_CLINICAL_TRIAL_SUBJECT_ID | 0x00120040
TAG_CLINICAL_TRIAL_SUBJECT_READING_ID | 0x00120042
TAG_CLINICAL_TRIAL_TIME_POINT_ID | 0x00120050
TAG_CLINICAL_TRIAL_TIME_POINT_DESCRIPTION | 0x00120051
TAG_CLINICAL_TRIAL_COORDINATING_CENTER_NAME | 0x00120060
TAG_CONTRAST_BOLUS_AGENT | 0x00180010
TAG_CONTRAST_BOLUS_AGENT_SEQUENCE | 0x00180012
TAG_CONTRAST_BOLUS_ADMINISTRATION_ROUTE_SEQUENCE | 0x00180014
TAG_BODY_PART_EXAMINED | 0x00180015
TAG_SCANNING_SEQUENCE | 0x00180020
TAG_SEQUENCE_VARIANT | 0x00180021
TAG_SCAN_OPTIONS | 0x00180022
TAG_MR_ACQUISITION_TYPE | 0x00180023
TAG_SEQUENCE_NAME | 0x00180024
TAG_ANGIO_FLAG | 0x00180025
TAG_INTERVENTION_DRUG_INFORMATION_SEQUENCE | 0x00180026
TAG_INTERVENTION_DRUG_STOP_TIME | 0x00180027
TAG_INTERVENTION_DRUG_DOSE | 0x00180028
TAG_INTERVENTION_DRUG_CODE_SEQUENCE | 0x00180029
TAG_ADDITIONAL_DRUG_SEQUENCE | 0x0018002A
TAG_RADIONUCLIDE_RETIRED | 0x00180030
TAG_RADIOPHARMACEUTICAL | 0x00180031
TAG_ENERGY_WINDOW_CENTERLINE_RETIRED | 0x00180032
TAG_ENERGY_WINDOW_TOTAL_WIDTH_RETIRED | 0x00180033
TAG_INTERVENTION_DRUG_NAME | 0x00180034
TAG_INTERVENTION_DRUG_START_TIME | 0x00180035
TAG_INTERVENTIONAL_THERAPY_SEQUENCE | 0x00180036
TAG_THERAPY_TYPE | 0x00180037
TAG_INTERVENTIONAL_STATUS | 0x00180038
TAG_THERAPY_DESCRIPTION | 0x00180039
TAG_CINE_RATE | 0x00180040
TAG_SLICE_THICKNESS | 0x00180050
TAG_KVP | 0x00180060
TAG_COUNTS_ACCUMULATED | 0x00180070
TAG_ACQUISITION_TERMINATION_CONDITION | 0x00180071
TAG_EFFECTIVE_SERIES_DURATION | 0x00180072
TAG_ACQUISITION_START_CONDITION | 0x00180073
TAG_ACQUISITION_START_CONDITION_DATA | 0x00180074
TAG_ACQUISITION_TERMINATION_CONDITION_DATA | 0x00180075
TAG_REPETITION_TIME | 0x00180080
TAG_ECHO_TIME | 0x00180081
TAG_INVERSION_TIME | 0x00180082
TAG_NUMBER_OF_AVERAGES | 0x00180083
TAG_IMAGING_FREQUENCY | 0x00180084
TAG_IMAGED_NUCLEUS | 0x00180085
TAG_ECHO_NUMBER | 0x00180086
TAG_MAGNETIC_FIELD_STRENGTH | 0x00180087
TAG_SPACING_BETWEEN_SLICES | 0x00180088
TAG_NUMBER_OF_PHASE_ENCODING_STEPS | 0x00180089
TAG_DATA_COLLECTION_DIAMETER | 0x00180090
TAG_ECHO_TRAIN_LENGTH | 0x00180091
TAG_PERCENT_SAMPLING | 0x00180093
TAG_PERCENT_PHASE_FIELD_OF_VIEW | 0x00180094
TAG_PIXEL_BANDWIDTH | 0x00180095
TAG_DEVICE_SERIAL_NUMBER | 0x00181000
TAG_PLATE_ID | 0x00181004
TAG_SECONDARY_CAPTURE_DEVICE_ID | 0x00181010
TAG_HARDCOPY_CREATION_DEVICE_ID | 0x00181011
TAG_DATE_OF_SECONDARY_CAPTURE | 0x00181012
TAG_TIME_OF_SECONDARY_CAPTURE | 0x00181014
TAG_SECONDARY_CAPTURE_DEVICE_MANUFACTURER | 0x00181016
TAG_HARDCOPY_DEVICE_MANUFACTURER | 0x00181017
TAG_SECONDARY_CAPTURE_DEVICE_MANUFACTURER_MODEL_NAME | 0x00181018
TAG_SECONDARY_CAPTURE_DEVICE_SOFTWARE_VERSION | 0x00181019
TAG_HARDCOPY_DEVICE_SOFTWARE_VERSION | 0x0018101A
TAG_HARDCOPY_DEVICE_MANFUACTURER_MODEL_NAME | 0x0018101B
TAG_SOFTWARE_VERSION | 0x00181020
TAG_VIDEO_IMAGE_FORMAT_ACQUIRED | 0x00181022
TAG_DIGITAL_IMAGE_FORMAT_ACQUIRED | 0x00181023
TAG_PROTOCOL_NAME | 0x00181030
TAG_CONTRAST_BOLUS_ROUTE | 0x00181040
TAG_CONTRAST_BOLUS_VOLUME | 0x00181041
TAG_CONTRAST_BOLUS_START_TIME | 0x00181042
TAG_CONTRAST_BOLUS_STOP_TIME | 0x00181043
TAG_CONTRAST_BOLUS_TOTAL_DOSE | 0x00181044
TAG_SYRINGE_COUNTS | 0x00181045
TAG_CONTRAST_FLOW_RATE | 0x00181046
TAG_CONTRAST_FLOW_DURATION | 0x00181047
TAG_CONTRAST_BOLUS_INGREDIENT | 0x00181048
TAG_CONTRAST_BOLUS_INGREDIENT_CONCENTRATION | 0x00181049
TAG_SPATIAL_RESOLUTION | 0x00181050
TAG_TRIGGER_TIME | 0x00181060
TAG_TRIGGER_SOURCE_OR_TYPE | 0x00181061
TAG_NOMINAL_INTERVAL | 0x00181062
TAG_FRAME_TIME | 0x00181063
TAG_FRAMING_TYPE | 0x00181064
TAG_FRAME_TIME_VECTOR | 0x00181065
TAG_FRAME_DELAY | 0x00181066
TAG_RADIOPHARMACEUTICAL_ROUTE | 0x00181070
TAG_RADIOPHARMACEUTICAL_VOLUME | 0x00181071
TAG_RADIOPHARMACEUTICAL_START_TIME | 0x00181072
TAG_RADIOPHARMACEUTICAL_STOP_TIME | 0x00181073
TAG_RADIONUCLIDE_TOTAL_DOSE | 0x00181074
TAG_RADIONUCLIDE_HALF_LIFE | 0x00181075
TAG_RADIONUCLIDE_POSITRON_FRACTION | 0x00181076
TAG_RADIOPHARMACEUTICAL_SPECIFIC_ACTIVITY | 0x00181077
TAG_BEAT_REJECTION_FLAG | 0x00181080
TAG_LOW_R_R_VALUE | 0x00181081
TAG_HIGH_R_R_VALUE | 0x00181082
TAG_INTERVALS_ACQUIRED | 0x00181083
TAG_INTERVALS_REJECTED | 0x00181084
TAG_PVC_REJECTION | 0x00181085
TAG_SKIP_BEATS | 0x00181086
TAG_HEART_RATE | 0x00181088
TAG_CARDIAC_NUMBER_OF_IMAGES | 0x00181090
TAG_TRIGGER_WINDOW | 0x00181094
TAG_RECONSTRUCTION_DIAMETER | 0x00181100
TAG_DISTANCE_SOURCE_TO_DETECTOR | 0x00181110
TAG_DISTANCE_SOURCE_TO_PATIENT | 0x00181111
TAG_ESTIMATED_RADIOGRAPHIC_MAGNIFICATION_FACTOR | 0x00181114
TAG_GANTRY_DETECTOR_TILT | 0x00181120
TAG_GANTRY_DETECTOR_SLEW | 0x00181121
TAG_TABLE_HEIGHT | 0x00181130
TAG_TABLE_TRAVERSE | 0x00181131
TAG_TABLE_MOTION | 0x00181134
TAG_TABLE_VERTICAL_INCREMENT | 0x00181135
TAG_TABLE_LATERAL_INCREMENT | 0x00181136
TAG_TABLE_LONGITUDINAL_INCREMENT | 0x00181137
TAG_TABLE_ANGLE | 0x00181138
TAG_ROTATION_DIRECTION | 0x00181140
TAG_ANGULAR_POSITION | 0x00181141
TAG_RADIAL_POSITION | 0x00181142
TAG_SCAN_ARC | 0x00181143
TAG_ANGULAR_STEP | 0x00181144
TAG_CENTER_OF_ROTATION_OFFSET | 0x00181145
TAG_ROTATION_OFFSET_RETIRED | 0x00181146
TAG_FIELD_OF_VIEW_SHAPE | 0x00181147
TAG_FIELD_OF_VIEW_DIMENSION | 0x00181149
TAG_EXPOSURE_TIME | 0x00181150
TAG_X_RAY_TUBE_CURRENT | 0x00181151
TAG_EXPOSURE | 0x00181152
TAG_EXPOSURE_IN_UAS | 0x00181153
TAG_AVERAGE_PULSE_WIDTH | 0x00181154
TAG_RADIATION_SETTING | 0x00181155
TAG_RADIATION_MODE | 0x0018115A
TAG_IMAGE_AREA_DOSE_PRODUCT | 0x0018115E
TAG_FILTER_TYPE | 0x00181160
TAG_TYPE_OF_FILTERS | 0x00181161
TAG_INTENSIFIER_SIZE | 0x00181162
TAG_IMAGER_PIXEL_SPACING | 0x00181164
TAG_GRID | 0x00181166
TAG_GENERATOR_POWER | 0x00181170
TAG_COLLIMATOR_GRID_NAME | 0x00181180
TAG_COLLIMATOR_TYPE | 0x00181181
TAG_FOCAL_DISTANCE | 0x00181182
TAG_X_FOCUS_CENTER | 0x00181183
TAG_Y_FOCUS_CENTER | 0x00181184
TAG_FOCAL_SPOT | 0x00181190
TAG_DATE_OF_LAST_CALIBRATION | 0x00181200
TAG_TIME_OF_LAST_CALIBRATION | 0x00181201
TAG_CONVOLUTION_KERNEL | 0x00181210
TAG_ACTUAL_FRAME_DURATION | 0x00181242
TAG_COUNT_RATE | 0x00181243
TAG_PREFERRED_PLAYBACK_SEQUENCING | 0x00181244
TAG_RECEIVING_COIL | 0x00181250
TAG_TRANSMITTING_COIL | 0x00181251
TAG_PLATE_TYPE | 0x00181260
TAG_PHOSPHOR_TYPE | 0x00181261
TAG_SCAN_VELOCITY | 0x00181300
TAG_WHOLE_BODY_TECHNIQUE | 0x00181301
TAG_SCAN_LENGTH | 0x00181302
TAG_ACQUISITION_MATRIX | 0x00181310
TAG_PHASE_ENCODING_DIRECTION | 0x00181312
TAG_FLIP_ANGLE | 0x00181314
TAG_VARIABLE_FLIP_ANGLE_FLAG | 0x00181315
TAG_SAR | 0x00181316
TAG_DB_DT | 0x00181318
TAG_ACQUISITION_DEVICE_PROCESSING_DESCRIPTION | 0x00181400
TAG_ACQUISITION_DEVICE_PROCESSING_CODE | 0x00181401
TAG_CASSETTE_ORIENTATION | 0x00181402
TAG_CASSETTE_SIZE | 0x00181403
TAG_EXPOSURES_ON_PLATE | 0x00181404
TAG_RELATIVE_X_RAY_EXPOSURE | 0x00181405
TAG_COLUMN_ANGULATION | 0x00181450
TAG_TOMO_LAYER_HEIGHT | 0x00181460
TAG_TOMO_ANGLE | 0x00181470
TAG_TOMO_TIME | 0x00181480
TAG_POSITIONER_MOTION | 0x00181500
TAG_POSITIONER_PRIMARY_ANGLE | 0x00181510
TAG_POSITIONER_SECONDARY_ANGLE | 0x00181511
TAG_POSITIONER_PRIMARY_ANGLE_INCREMENT | 0x00181520
TAG_POSITIONER_SECONDARY_ANGLE_INCREMENT | 0x00181521
TAG_DETECTOR_PRIMARY_ANGLE | 0x00181530
TAG_DETECTOR_SECONDARY_ANGLE | 0x00181531
TAG_SHUTTER_SHAPE | 0x00181600
TAG_SHUTTER_LEFT_VERTICAL_EDGE | 0x00181602
TAG_SHUTTER_RIGHT_VERTICAL_EDGE | 0x00181604
TAG_SHUTTER_UPPER_HORIZONTAL_EDGE | 0x00181606
TAG_SHUTTER_LOWER_HORIZONTAL_EDGE | 0x00181608
TAG_CENTER_OF_CIRCULAR_SHUTTER | 0x00181610
TAG_RADIUS_OF_CIRCULAR_SHUTTER | 0x00181612
TAG_VERTICES_OF_THE_POLYGONAL_SHUTTER | 0x00181620
TAG_COLLIMATOR_SHAPE | 0x00181700
TAG_COLLIMATOR_LEFT_VERTICAL_EDGE | 0x00181702
TAG_COLLIMATOR_RIGHT_VERTICAL_EDGE | 0x00181704
TAG_COLLIMATOR_UPPER_HORIZONTAL_EDGE | 0x00181706
TAG_COLLIMATOR_LOWER_HORIZONTAL_EDGE | 0x00181708
TAG_CENTER_OF_CIRCULAR_COLLIMATOR | 0x00181710
TAG_RADIUS_OF_CIRCULAR_COLLIMATOR | 0x00181712
TAG_VERTICES_OF_THE_POLYGONAL_COLLIMATOR | 0x00181720
TAG_PAGE_NUMBER_VECTOR | 0x00182001
TAG_FRAME_LABEL_VECTOR | 0x00182002
TAG_FRAME_PRIMARY_ANGLE_VECTOR | 0x00182003
TAG_FRAME_SECONDARY_ANGLE_VECTOR | 0x00182004
TAG_SLICE_LOCATION_VECTOR | 0x00182005
TAG_DISPLAY_WINDOW_LABEL_VECTOR | 0x00182006
TAG_NOMINAL_SCANNED_PIXEL_SPACING | 0x00182010
TAG_DIGITIZING_DEVICE_TRANSPORT_DIRECTION | 0x00182020
TAG_ROTATION_OF_SCANNED_FILM | 0x00182030
TAG_IVUS_ACQUISITION | 0x00183100
TAG_IVUS_PULLBACK_RATE | 0x00183101
TAG_IVUS_GATED_RATE | 0x00183102
TAG_IVUS_PULLBACK_START_FRAME_NUMBER | 0x00183103
TAG_IVUS_PULLBACK_STOP_FRAME_NUMBER | 0x00183104
TAG_LESION_NUMBER | 0x00183105
TAG_OUTPUT_POWER | 0x00185000
TAG_TRANSDUCER_DATA | 0x00185010
TAG_FOCUS_DEPTH | 0x00185012
TAG_PROCESSING_FUNCTION | 0x00185020
TAG_POSTPROCESSING_FUNCTION | 0x00185021
TAG_MECHANICAL_INDEX | 0x00185022
TAG_THERMAL_INDEX | 0x00185024
TAG_CRANIAL_THERMAL_INDEX | 0x00185026
TAG_SOFT_TISSUE_THERMAL_INDEX | 0x00185027
TAG_SOFT_TISSUE_FOCUS_THERMAL_INDEX | 0x00185028
TAG_SOFT_TISSUE_SURFACE_THERMAL_INDEX | 0x00185029
TAG_DEPTH_OF_SCAN_FIELD | 0x00185050
TAG_PATIENT_POSITION | 0x00185100
TAG_VIEW_POSITION | 0x00185101
TAG_IMAGE_TRANSFORMATION_MATRIX | 0x00185210
TAG_IMAGE_TRANSLATION_VECTOR | 0x00185212
TAG_SENSITIVITY | 0x00186000
TAG_SEQUENCE_OF_ULTRASOUND_REGIONS | 0x00186011
TAG_REGION_SPATIAL_FORMAT | 0x00186012
TAG_REGION_DATA_TYPE | 0x00186014
TAG_REGION_FLAGS | 0x00186016
TAG_REGION_LOCATION_MIN_X_0 | 0x00186018
TAG_REGION_LOCATION_MIN_Y_0 | 0x0018601A
TAG_REGION_LOCATION_MAX_X_1 | 0x0018601C
TAG_REGION_LOCATION_MAX_Y_1 | 0x0018601E
TAG_REFERENCE_PIXEL_X_0 | 0x00186020
TAG_REFERENCE_PIXEL_Y_0 | 0x00186022
TAG_PHYSICAL_UNITS_X_DIRECTION | 0x00186024
TAG_PHYSICAL_UNITS_Y_DIRECTION | 0x00186026
TAG_REFERENCE_PIXEL_PHYSICAL_VALUE_X | 0x00186028
TAG_REFERENCE_PIXEL_PHYSICAL_VALUE_Y | 0x0018602A
TAG_PHYSICAL_DELTA_X | 0x0018602C
TAG_PHYSICAL_DELTA_Y | 0x0018602E
TAG_TRANSDUCER_FREQUENCY | 0x00186030
TAG_TRANSDUCER_TYPE | 0x00186031
TAG_PULSE_REPETITION_FREQUENCY | 0x00186032
TAG_DOPPLER_CORRECTION_ANGLE | 0x00186034
TAG_STEERING_ANGLE | 0x00186036
TAG_DOPPLER_SAMPLE_VOLUME_X_POSITION | 0x00186039
TAG_DOPPLER_SAMPLE_VOLUME_Y_POSITION | 0x0018603B
TAG_TM_LINE_POSITION_X_0 | 0x0018603C
TAG_TM_LINE_POSITION_X0 | 0x0018603D
TAG_TM_LINE_POSITION_Y_0 | 0x0018603F
TAG_TM_LINE_POSITION_X_1 | 0x00186041
TAG_TM_LINE_POSITION_Y_1 | 0x00186043
TAG_PIXEL_COMPONENT_ORGANIZATION | 0x00186044
TAG_PIXEL_COMPONENT_MASK | 0x00186046
TAG_PIXEL_COMPONENT_RANGE_START | 0x00186048
TAG_PIXEL_COMPONENT_RANGE_STOP | 0x0018604A
TAG_PIXEL_COMPONENT_PHYSICAL_UNITS | 0x0018604C
TAG_PIXEL_COMPONENT_DATA_TYPE | 0x0018604E
TAG_NUMBER_OF_TABLE_BREAK_POINTS | 0x00186050
TAG_TABLE_OF_X_BREAK_POINTS | 0x00186052
TAG_TABLE_OF_Y_BREAK_POINTS | 0x00186054
TAG_NUMBER_OF_TABLE_ENTRIES | 0x00186056
TAG_TABLE_OF_PIXEL_VALUES | 0x00186058
TAG_TABLE_OF_PARAMETER_VALUES | 0x0018605A
TAG_CONTENT_QUALIFICATION | 0x00189004
TAG_MR_IMAGING_MODIFIER_SEQUENCE | 0x00189006
TAG_ECHO_PULSE_SEQUENCE | 0x00189008
TAG_INVERSION_RECOVERY | 0x00189009
TAG_FLOW_COMPENSATION | 0x00189010
TAG_MULTIPLE_SPIN_ECHO | 0x00189011
TAG_MULTI_PLANAR_EXCITATION | 0x00189012
TAG_PHASE_CONTRAST | 0x00189014
TAG_TIME_OF_FLIGHT_CONTRAST | 0x00189015
TAG_SPOILING | 0x00189016
TAG_STEADY_STATE_PULSE_SEQUENCE | 0x00189017
TAG_ECHO_PLANAR_PULSE_SEQUENCE | 0x00189018
TAG_TAG_ANGLE_FIRST_AXIS | 0x00189019
TAG_MAGNETIZATION_TRANSFER | 0x00189020
TAG_T2_PREPARATION | 0x00189021
TAG_BLOOD_SIGNAL_NULLING | 0x00189022
TAG_SATURATION_RECOVERY | 0x00189024
TAG_SPECTRALLY_SELECTED_SUPPRESSION | 0x00189025
TAG_SPECTRALLY_SELECTED_EXCITATION | 0x00189026
TAG_SPATIAL_PRE_SATURATION | 0x00189027
TAG_TAGGING | 0x00189028
TAG_OVERSAMPLING_PHASE | 0x00189029
TAG_BLOOD_SIGNAL_NULLING | 0x00189022
TAG_TAG_SPACING_FIRST_DIMENSION | 0x00189030
TAG_GEOMETRY_OF_K_SPACE_TRAVERSAL | 0x00189032
TAG_SEGMENTED_K_SPACE_TRAVERSAL | 0x00189033
TAG_RECTILINEAR_PHASE_ENCODE_REORDERING | 0x00189034
TAG_TAG_THICKNESS | 0x00189035
TAG_PARTIAL_FOURIER_DIRECTION | 0x00189036
TAG_CARDIAC_SYNCHRONIZATION_TECHNIQUE | 0x00189037
TAG_RECEIVE_COIL_MANUFACTURER_NAME | 0x00189041
TAG_MR_RECEIVE_COIL_SEQUENCE | 0x00189042
TAG_RECEIVE_COIL_TYPE | 0x00189043
TAG_QUADRATURE_RECEIVE_COIL | 0x00189044
TAG_MULTI_COIL_DEFINITION_SEQUENCE | 0x00189045
TAG_MULTI_COIL_CONFIGURATION | 0x00189046
TAG_MULTI_COIL_ELEMENT_NAME | 0x00189047
TAG_MULTI_COIL_ELEMENT_USED | 0x00189048
TAG_MR_TRANSMIT_COIL_SEQUENCE | 0x00189049
TAG_TRANSMIT_COIL_MANUFACTURER_NAME | 0x00189050
TAG_TRANSMIT_COIL_TYPE | 0x00189051
TAG_SPECTRAL_WIDTH | 0x00189052
TAG_CHEMICAL_SHIFT_REFERENCE | 0x00189053
TAG_VOLUME_LOCALIZATION_TECHNIQUE | 0x00189054
TAG_MR_ACQUISITION_FREQUENCY_ENCODING_STEPS | 0x00189058
TAG_DE_COUPLING | 0x00189059
TAG_DE_COUPLED_NUCLEUS | 0x00189060
TAG_DE_COUPLING_FREQUENCY | 0x00189061
TAG_DE_COUPLING_METHOD | 0x00189062
TAG_DE_COUPLING_CHEMICAL_SHIFT_REFERENCE | 0x00189063
TAG_K_SPACE_FILTERING | 0x00189064
TAG_TIME_DOMAIN_FILTERING | 0x00189065
TAG_NUMBER_OF_ZERO_FILLS | 0x00189066
TAG_BASELINE_CORRECTION | 0x00189067
TAG_PARALLEL_REDUCTION_FACTOR_IN_PLANE | 0x00189069
TAG_CARDIAC_R_R_INTERVAL_SPECIFIED | 0x00189070
TAG_ACQUISITION_DURATION | 0x00189073
TAG_FRAME_ACQUISITION_DATETIME | 0x00189074
TAG_DIFFUSION_GRADIENT_DIRECTION_SEQUENCE | 0x00189076
TAG_PARALLEL_ACQUISITION | 0x00189077
TAG_PARALLEL_ACQUISITION_TECHNIQUE | 0x00189078
TAG_INVERSION_TIMES | 0x00189079
TAG_METABOLITE_MAP_DESCRIPTION | 0x00189080
TAG_PARTIAL_FOURIER | 0x00189081
TAG_EFFECTIVE_ECHO_TIME | 0x00189082
TAG_SPECTRAL_WIDTH | 0x00189052
TAG_CHEMICAL_SHIFT_SEQUENCE | 0x00189084
TAG_CARDIAC_SIGNAL_SOURCE | 0x00189085
TAG_DIFFUSION_B_VALUE | 0x00189087
TAG_DIFFUSION_GRADIENT_ORIENTATION | 0x00189089
TAG_VELOCITY_ENCODING_DIRECTION | 0x00189090
TAG_VELOCITY_ENCODING_MINIMUM_VALUE | 0x00189091
TAG_NUMBER_OF_K_SPACE_TRAJECTORIES | 0x00189093
TAG_COVERAGE_OF_K_SPACE | 0x00189094
TAG_SPECTROSCOPY_ACQUISITION_PHASE_ROWS | 0x00189095
TAG_TRANSMITTER_FREQUENCY | 0x00189098
TAG_RESONANT_NUCLEUS | 0x00189100
TAG_FREQUENCY_CORRECTION | 0x00189101
TAG_MR_SPECTROSCOPY_FOV_GEOMETRY_SEQUENCE | 0x00189103
TAG_SLAB_THICKNESS | 0x00189104
TAG_SLAB_ORIENTATION | 0x00189105
TAG_MID_SLAB_POSITION | 0x00189106
TAG_MR_SPATIAL_SATURATION_SEQUENCE | 0x00189107
TAG_MR_TIMING_AND_RELATED_PARAMETERS_SEQUENCE | 0x00189112
TAG_MR_ECHO_SEQUENCE | 0x00189114
TAG_MR_MODIFIER_SEQUENCE | 0x00189115
TAG_MR_DIFFUSION_SEQUENCE | 0x00189117
TAG_CARDIAC_TRIGGER_SEQUENCE | 0x00189118
TAG_MR_AVERAGES_SEQUENCE | 0x00189119
TAG_MR_FOV_GEOMETRY_SEQUENCE | 0x00189125
TAG_VOLUME_LOCALIZATION_SEQUENCE | 0x00189126
TAG_SPECTROSCOPY_ACQUISITION_DATA_COLUMNS | 0x00189127
TAG_DIFFUSION_ANISOTROPY_TYPE | 0x00189147
TAG_FRAME_REFERENCE_DATETIME | 0x00189151
TAG_MR_METABOLITE_MAP_SEQUENCE | 0x00189152
TAG_PARALLEL_REDUCTION_FACTOR_OUT_OF_PLANE | 0x00189155
TAG_SPECTROSCOPY_ACQUISITION_OUT_OF_PLANE_PHASE_STEPS | 0x00189159
TAG_BULK_MOTION_STATUS | 0x00189166
TAG_PARALLEL_REDUCTION_FACTOR_SECOND_IN_PLANE | 0x00189168
TAG_CARDIAC_BEAT_REJECTION_TECHNIQUE | 0x00189169
TAG_RESPIRATORY_MOTION_COMPENSATION_TECHNIQUE | 0x00189170
TAG_RESPIRATORY_SIGNAL_SOURCE | 0x00189171
TAG_BULK_MOTION_COMPENSATION_TECHNIQUE | 0x00189172
TAG_BULK_MOTION_SIGNAL_SOURCE | 0x00189173
TAG_APPLICABLE_SAFETY_STANDARD_AGENCY | 0x00189174
TAG_APPLICABLE_SAFETY_STANDARD_DESCRIPTION | 0x00189175
TAG_OPERATING_MODE_SEQUENCE | 0x00189176
TAG_OPERATING_MODE_TYPE | 0x00189177
TAG_OPERATING_MODE | 0x00189178
TAG_SPECIFIC_ABSORPTION_RATE_DEFINITION | 0x00189179
TAG_GRADIENT_OUTPUT_TYPE | 0x00189180
TAG_SPECIFIC_ABSORPTION_RATE_VALUE | 0x00189181
TAG_GRADIENT_OUTPUT | 0x00189182
TAG_FLOW_COMPENSATION_DIRECTION | 0x00189183
TAG_TAGGING_DELAY | 0x00189184
TAG_CHEMICAL_SHIFTS_MINIMUM_INTEGRATION_LIMIT | 0x00189195
TAG_CHEMICAL_SHIFTS_MAXIMUM_INTEGRATION_LIMIT | 0x00189196
TAG_MR_VELOCITY_ENCODING_SEQUENCE | 0x00189197
TAG_FIRST_ORDER_PHASE_CORRECTION | 0x00189198
TAG_WATER_REFERENCED_PHASE_CORRECTION | 0x00189199
TAG_MR_SPECTROSCOPY_ACQUISITION_TYPE | 0x00189200
TAG_RESPIRATORY_CYCLE_POSITION | 0x00189214
TAG_VELOCITY_ENCODING_MAXIMUM_VALUE | 0x00189217
TAG_TAG_SPACING_SECOND_DIMENSION | 0x00189218
TAG_TAG_ANGLE_SECOND_AXIS | 0x00189219
TAG_FRAME_ACQUISITION_DURATION | 0x00189220
TAG_MR_IMAGE_FRAME_TYPE_SEQUENCE | 0x00189226
TAG_MR_SPECTROSCOPY_FRAME_TYPE_SEQUENCE | 0x00189227
TAG_MR_ACQUISITION_PHASE_ENCODING_STEPS_IN_PLANE | 0x00189231
TAG_MR_ACQUISITION_PHASE_ENCODING_STEPS_OUT_OF_PLANE | 0x00189232
TAG_SPECTROSCOPY_ACQUISITION_PHASE_COLUMNS | 0x00189234
TAG_CARDIAC_CYCLE_POSITION | 0x00189236
TAG_SPECIFIC_ABSORPTION_RATE_SEQUENCE | 0x00189239
TAG_CONTRAST_BOLUS_AGENT_NUMBER | 0x00189337
TAG_CONTRAST_BOLUS_INGREDIENT_CODE_SEQUENCE | 0x00189338
TAG_CONTRAST_ADMINISTRATION_PROFILE_SEQUENCE | 0x00189340
TAG_CONTRAST_BOLUS_USAGE_SEQUENCE | 0x00189341
TAG_CONTRAST_BOLUS_AGENT_ADMINISTERED | 0x00189342
TAG_CONTRAST_BOLUS_AGENT_DETECTED | 0x00189343
TAG_CONTRAST_BOLUS_AGENT_PHASE | 0x00189344
TAG_CTDIVOL | 0x00189345
TAG_CONTRIBUTING_EQUIPMENT_SEQUENCE | 0x0018A001
TAG_CONTRIBUTION_DATETIME | 0x0018A002
TAG_CONTRIBUTION_DESCRIPTION | 0x0018A003
TAG_STUDY_INSTANCE_UID | 0x0020000D
TAG_SERIES_INSTANCE_UID | 0x0020000E
TAG_STUDY_ID | 0x00200010
TAG_SERIES_NUMBER | 0x00200011
TAG_ACQUISITION_NUMBER | 0x00200012
TAG_INSTANCE_NUMBER | 0x00200013
TAG_ISOTOPE_NUMBER_RETIRED | 0x00200014
TAG_PHASE_NUMBER_RETIRED | 0x00200015
TAG_INTERVAL_NUMBER_RETIRED | 0x00200016
TAG_TIME_SLOT_NUMBER_RETIRED | 0x00200017
TAG_ANGLE_NUMBER_RETIRED | 0x00200018
TAG_ITEM_NUMBER | 0x00200019
TAG_PATIENT_ORIENTATION | 0x00200020
TAG_OVERLAY_NUMBER | 0x00200022
TAG_CURVE_NUMBER | 0x00200024
TAG_LOOKUP_TABLE_NUMBER | 0x00200026
TAG_IMAGE_POSITION_PATIENT | 0x00200032
TAG_IMAGE_ORIENTATION_PATIENT | 0x00200037
TAG_FRAME_OF_REFERENCE_UID | 0x00200052
TAG_LATERALITY | 0x00200060
TAG_TEMPORAL_POSITION_IDENTIFIER | 0x00200100
TAG_NUMBER_OF_TEMPORAL_POSITIONS | 0x00200105
TAG_TEMPORAL_RESOLUTION | 0x00200110
TAG_SERIES_IN_STUDY | 0x00201000
TAG_IMAGES_IN_ACQUISITION | 0x00201002
TAG_ACQUISITIONS_IN_STUDY | 0x00201004
TAG_POSITION_REFERENCE_INDICATOR | 0x00201040
TAG_SLICE_LOCATION | 0x00201041
TAG_OTHER_STUDY_NUMBERS | 0x00201070
TAG_NUMBER_OF_PATIENT_RELATED_STUDIES | 0x00201200
TAG_NUMBER_OF_PATIENT_RELATED_SERIES | 0x00201202
TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES | 0x00201204
TAG_NUMBER_OF_STUDY_RELATED_SERIES | 0x00201206
TAG_NUMBER_OF_STUDY_RELATED_INSTANCES | 0x00201208
TAG_NUMBER_OF_SERIES_RELATED_INSTANCES | 0x00201209
TAG_IMAGE_COMMENTS | 0x00204000
TAG_STACK_ID | 0x00209056
TAG_IN_STACK_POSITION_NUMBER | 0x00209057
TAG_FRAME_ANATOMY_SEQUENCE | 0x00209071
TAG_FRAME_LATERALITY | 0x00209072
TAG_FRAME_CONTENT_SEQUENCE | 0x00209111
TAG_PLANE_POSITION_SEQUENCE | 0x00209113
TAG_PLANE_ORIENTATION_SEQUENCE | 0x00209116
TAG_TEMPORAL_POSITION_INDEX | 0x00209128
TAG_TRIGGER_DELAY_TIME | 0x00209153
TAG_FRAME_ACQUISITION_NUMBER | 0x00209156
TAG_DIMENSION_INDEX_VALUES | 0x00209157
TAG_FRAME_COMMENTS | 0x00209158
TAG_CONCATENATION_UID | 0x00209161
TAG_IN_CONCATENATION_NUMBER | 0x00209162
TAG_IN_CONCATENATION_TOTAL_NUMBER | 0x00209163
TAG_DIMENSION_ORGANIZATION_UID | 0x00209164
TAG_DIMENSION_INDEX_POINTER | 0x00209165
TAG_FUNCTIONAL_GROUP_POINTER | 0x00209167
TAG_DIMENSION_INDEX_PRIVATE_CREATOR | 0x00209213
TAG_DIMENSION_ORGANIZATION_SEQUENCE | 0x00209221
TAG_DIMENSION_INDEX_SEQUENCE | 0x00209222
TAG_CONCATENATION_FRAME_OFFSET_NUMBER | 0x00209228
TAG_FUNCTIONAL_GROUP_PRIVATE_CREATOR | 0x00209238
TAG_LIGHT_PATH_FILTER_PASS_THROUGH_WAVELENGTH | 0x00220001
TAG_LIGHT_PATH_FILTER_PASS_BAND | 0x00220002
TAG_IMAGE_PATH_FILTER_PASS_THROUGH_WAVELENGTH | 0x00220003
TAG_IMAGE_PATH_FILTER_PASS_BAND | 0x00220004
TAG_PATIENT_EYE_MOVEMENT_COMMANDED | 0x00220005
TAG_PATIENT_EYE_MOVEMENT_COMMAND_CODE_SEQUENCE | 0x00220006
TAG_SPHERICAL_LENS_POWER | 0x00220007
TAG_CYLINDER_LENS_POWER | 0x00220008
TAG_CYLINDER_AXIS | 0x00220009
TAG_EMMETROPIC_MAGNIFICATION | 0x0022000A
TAG_INTRA_OCULAR_PRESSURE | 0x0022000B
TAG_HORIZONTAL_FIELD_OF_VIEW | 0x0022000C
TAG_PUPIL_DILATED | 0x0022000D
TAG_DEGREE_OF_DILATION | 0x0022000E
TAG_STEREO_BASELINE_ANGLE | 0x00220010
TAG_STEREO_BASELINE_DISPLACEMENT | 0x00220011
TAG_STEREO_HORIZONTAL_PIXEL_OFFSET | 0x00220012
TAG_STEREO_VERTICAL_PIXEL_OFFSET | 0x00220013
TAG_STEREO_ROTATION | 0x00220014
TAG_ACQUISITION_DEVICE_TYPE_CODE_SEQUENCE | 0x00220015
TAG_ILLUMINATION_TYPE_CODE_SEQUENCE | 0x00220016
TAG_LIGHT_PATH_FILTER_TYPE_STACK_CODE_SEQUENCE | 0x00220017
TAG_IMAGE_PATH_FILTER_TYPE_STACK_CODE_SEQUENCE | 0x00220018
TAG_LENSES_CODE_SEQUENCE | 0x00220019
TAG_CHANNEL_DESCRIPTION_CODE_SEQUENCE | 0x0022001A
TAG_REFRACTIVE_STATE_SEQUENCE | 0x0022001B
TAG_MYDRIATIC_AGENT_CODE_SEQUENCE | 0x0022001C
TAG_RELATIVE_IMAGE_POSITION_CODE_SEQUENCE | 0x0022001D
TAG_STEREO_PAIRS_SEQUENCE | 0x00220020
TAG_LEFT_IMAGE_SEQUENCE | 0x00220021
TAG_RIGHT_IMAGE_SEQUENCE | 0x00220022
TAG_SAMPLES_PER_PIXEL | 0x00280002
TAG_SAMPLES_PER_PIXEL_USED | 0x00280003
TAG_PHOTOMETRIC_INTERPRETATION | 0x00280004
TAG_PLANAR_CONFIGURATION | 0x00280006
TAG_NUMBER_OF_FRAMES | 0x00280008
TAG_FRAME_INCREMENT_POINTER | 0x00280009
TAG_ROWS | 0x00280010
TAG_COLUMNS | 0x00280011
TAG_PLANES | 0x00280012
TAG_ULTRASOUND_COLOR_DATA_PRESENT | 0x00280014
TAG_PIXEL_SPACING | 0x00280030
TAG_ZOOM_FACTOR | 0x00280031
TAG_ZOOM_CENTER | 0x00280032
TAG_PIXEL_ASPECT_RATIO | 0x00280034
TAG_CORRECTED_IMAGE | 0x00280051
TAG_BITS_ALLOCATED | 0x00280100
TAG_BITS_STORED | 0x00280101
TAG_HIGH_BIT | 0x00280102
TAG_PIXEL_REPRESENTATION | 0x00280103
TAG_SMALLEST_IMAGE_PIXEL_VALUE | 0x00280106
TAG_LARGEST_IMAGE_PIXEL_VALUE | 0x00280107
TAG_SMALLEST_PIXEL_VALUE_IN_SERIES | 0x00280108
TAG_LARGEST_PIXEL_VALUE_IN_SERIES | 0x00280109
TAG_SMALLEST_IMAGE_PIXEL_VALUE_IN_PLANE | 0x00280110
TAG_LARGEST_IMAGE_PIXEL_VALUE_IN_PLANE | 0x00280111
TAG_PIXEL_PADDING_VALUE | 0x00280120
TAG_PIXEL_INTENSITY_RELATIONSHIP | 0x00281040
TAG_WINDOW_CENTER | 0x00281050
TAG_WINDOW_WIDTH | 0x00281051
TAG_RESCALE_INTERCEPT | 0x00281052
TAG_RESCALE_SLOPE | 0x00281053
TAG_RESCALE_TYPE | 0x00281054
TAG_WINDOW_CENTER_WIDTH_EXPLANATION | 0x00281055
TAG_RECOMMENDED_VIEWING_MODE | 0x00281090
TAG_RED_PALETTE_COLOR_LOOKUP_TABLE_DESCRIPTOR | 0x00281101
TAG_GREEN_PALETTE_COLOR_LOOKUP_TABLE_DESCRIPTOR | 0x00281102
TAG_BLUE_PALETTE_COLOR_LOOKUP_TABLE_DESCRIPTOR | 0x00281103
TAG_PALETTE_COLOR_LOOKUP_TABLE_UID | 0x00281199
TAG_RED_PALETTE_COLOR_LOOKUP_TABLE_DATA | 0x00281201
TAG_GREEN_PALETTE_COLOR_LOOKUP_TABLE_DATA | 0x00281202
TAG_BLUE_PALETTE_COLOR_LOOKUP_TABLE_DATA | 0x00281203
TAG_SEGMENTED_RED_PALETTE_COLOR_LOOKUP_TABLE_DATA | 0x00281221
TAG_SEGMENTED_GREEN_PALETTE_COLOR_LOOKUP_TABLE_DATA | 0x00281222
TAG_SEGMENTED_BLUE_PALETTE_COLOR_LOOKUP_TABLE_DATA | 0x00281223
TAG_LOSSY_IMAGE_COMPRESSION | 0x00282110
TAG_LOSSY_IMAGE_COMPRESSION_RATIO | 0x00282112
TAG_LOSSY_IMAGE_COMPRESSION_METHOD | 0x00282114
TAG_MODALITY_LUT_SEQUENCE | 0x00283000
TAG_LUT_DESCRIPTOR | 0x00283002
TAG_LUT_EXPLANATION | 0x00283003
TAG_MODALITY_LUT_TYPE | 0x00283004
TAG_LUT_DATA | 0x00283006
TAG_VOI_LUT_SEQUENCE | 0x00283010
TAG_BIPLANE_ACQUISITION_SEQUENCE | 0x00285000
TAG_REPRESENTATIVE_FRAME_NUMBER | 0x00286010
TAG_FRAME_NUMBERS_OF_INTEREST_FOI | 0x00286020
TAG_FRAME_OF_INTEREST_DESCRIPTION | 0x00286022
TAG_MASK_POINTER | 0x00286030
TAG_R_WAVE_POINTER | 0x00286040
TAG_MASK_SUBTRACTION_SEQUENCE | 0x00286100
TAG_MASK_OPERATION | 0x00286101
TAG_APPLICABLE_FRAME_RANGE | 0x00286102
TAG_MASK_FRAME_NUMBERS | 0x00286110
TAG_CONTRAST_FRAME_AVERAGING | 0x00286112
TAG_MASK_SUB_PIXEL_SHIFT | 0x00286114
TAG_TID_OFFSET | 0x00286120
TAG_MASK_OPERATION_EXPLANATION | 0x00286190
TAG_DATA_POINT_ROWS | 0x00289001
TAG_DATA_POINT_COLUMNS | 0x00289002
TAG_SIGNAL_DOMAIN_COLUMNS | 0x00289003
TAG_LARGEST_MONOCHROME_PIXEL_VALUE | 0x00289099
TAG_DATA_REPRESENTATION | 0x00289108
TAG_PIXEL_MEASURES_SEQUENCE | 0x00289110
TAG_FRAME_VOI_LUT_SEQUENCE | 0x00289132
TAG_PIXEL_VALUE_TRANSFORMATION_SEQUENCE | 0x00289145
TAG_SIGNAL_DOMAIN_ROWS | 0x00289235
TAG_STUDY_STATUS_ID | 0x0032000A
TAG_STUDY_PRIORITY_ID | 0x0032000C
TAG_STUDY_ID_ISSUER | 0x00320012
TAG_STUDY_VERIFIED_DATE | 0x00320032
TAG_STUDY_VERIFIED_TIME | 0x00320033
TAG_STUDY_READ_DATE | 0x00320034
TAG_STUDY_READ_TIME | 0x00320035
TAG_SCHEDULED_STUDY_START_DATE | 0x00321000
TAG_SCHEDULED_STUDY_START_TIME | 0x00321001
TAG_SCHEDULED_STUDY_STOP_DATE | 0x00321010
TAG_SCHEDULED_STUDY_STOP_TIME | 0x00321011
TAG_SCHEDULED_STUDY_LOCATION | 0x00321020
TAG_SCHEDULED_STUDY_LOCATION_AE_TITLE | 0x00321021
TAG_REASON_FOR_STUDY | 0x00321030
TAG_REQUESTING_PHYSICIAN_IDENTIFICATION_SEQUENCE | 0x00321031
TAG_REQUESTING_PHYSICIAN | 0x00321032
TAG_REQUESTING_SERVICE | 0x00321033
TAG_STUDY_ARRIVAL_DATE | 0x00321040
TAG_STUDY_ARRIVAL_TIME | 0x00321041
TAG_STUDY_COMPLETION_DATE | 0x00321050
TAG_STUDY_COMPLETION_TIME | 0x00321051
TAG_STUDY_COMPONENT_STATUS_ID | 0x00321055
TAG_REQUESTED_PROCEDURE_DESCRIPTION | 0x00321060
TAG_REQUESTED_PROCEDURE_CODE_SEQUENCE | 0x00321064
TAG_REQUESTED_CONTRAST_AGENT | 0x00321070
TAG_STUDY_COMMENTS | 0x00324000
TAG_REFERENCED_PATIENT_ALIAS_SEQUENCE | 0x00380004
TAG_VISIT_STATUS_ID | 0x00380008
TAG_ADMISSION_ID | 0x00380010
TAG_ISSUER_OF_ADMISSION_ID | 0x00380011
TAG_ROUTE_OF_ADMISSIONS | 0x00380016
TAG_SCHEDULED_ADMISSION_DATE | 0x0038001A
TAG_SCHEDULED_ADMISSION_TIME | 0x0038001B
TAG_SCHEDULED_DISCHARGE_DATE | 0x0038001C
TAG_SCHEDULED_DISCHARGE_TIME | 0x0038001D
TAG_SCHEDULED_PATIENT_INSTITUTION_RESIDENCE | 0x0038001E
TAG_ADMITTING_DATE | 0x00380020
TAG_ADMITTING_TIME | 0x00380021
TAG_DISCHARGE_DATE | 0x00380030
TAG_DISCHARGE_TIME | 0x00380032
TAG_DISCHARGE_DIAGNOSIS_DESCRIPTION | 0x00380040
TAG_DISCHARGE_DIAGNOSIS_CODE_SEQUENCE | 0x00380044
TAG_SPECIAL_NEEDS | 0x00380050
TAG_CURRENT_PATIENT_LOCATION | 0x00380300
TAG_PATIENT_INSTITUTION_RESIDENCE | 0x00380400
TAG_PATIENT_STATE | 0x00380500
TAG_VISIT_COMMENTS | 0x00384000
TAG_SCHEDULED_STATION_AE_TITLE | 0x00400001
TAG_SCHEDULED_PROCEDURE_STEP_START_DATE | 0x00400002
TAG_SCHEDULED_PROCEDURE_STEP_START_TIME | 0x00400003
TAG_SCHEDULED_PROCEDURE_STEP_END_DATE | 0x00400004
TAG_SCHEDULED_PROCEDURE_STEP_END_TIME | 0x00400005
TAG_SCHEDULED_PERFORMING_PHYSICIAN_NAME | 0x00400006
TAG_SCHEDULED_PROCEDURE_STEP_DESCRIPTION | 0x00400007
TAG_SCHEDULED_ACTION_ITEM_CODE_SEQUENCE | 0x00400008
TAG_SCHEDULED_PROCEDURE_STEP_ID | 0x00400009
TAG_STAGE_CODE_SEQUENCE | 0x0040000A
TAG_SCHEDULED_PERFORMING_PHYSICIAN_IDENTIFICATION_SEQUENCE | 0x0040000B
TAG_SCHEDULED_STATION_NAME | 0x00400010
TAG_SCHEDULED_PROCEDURE_STEP_LOCATION | 0x00400011
TAG_PRE_MEDICATION | 0x00400012
TAG_SCHEDULED_PROCEDURE_STEP_STATUS | 0x00400020
TAG_SCHEDULED_PROCEDURE_STEP_SEQUENCE | 0x00400100
TAG_REFERENCED_STANDALONE_SOP_INSTANCE_SEQUENCE | 0x00400220
TAG_PERFORMED_STATION_AE_TITLE | 0x00400241
TAG_PERFORMED_STATION_NAME | 0x00400242
TAG_PERFORMED_LOCATION | 0x00400243
TAG_PERFORMED_PROCEDURE_STEP_START_DATE | 0x00400244
TAG_PERFORMED_PROCEDURE_STEP_START_TIME | 0x00400245
TAG_PERFORMED_PROCEDURE_STEP_END_DATE | 0x00400250
TAG_PERFORMED_PROCEDURE_STEP_END_TIME | 0x00400251
TAG_PERFORMED_PROCEDURE_STEP_STATUS | 0x00400252
TAG_PERFORMED_PROCEDURE_STEP_ID | 0x00400253
TAG_PERFORMED_PROCEDURE_STEP_DESCRIPTION | 0x00400254
TAG_PERFORMED_PROCEDURE_TYPE_DESCRIPTION | 0x00400255
TAG_PERFORMED_ACTION_ITEM_SEQUENCE | 0x00400260
TAG_SCHEDULED_STEP_ATTRIBUTES_SEQUENCE | 0x00400270
TAG_REQUEST_ATTRIBUTES_SEQUENCE | 0x00400275
TAG_COMMENTS_ON_THE_PERFORMED_PROCEDURE_STEPS | 0x00400280
TAG_PERFORMED_PROCEDURE_STEP_DISCONTINUATION_REASON_CODE_SEQUENCE | 0x00400281
TAG_QUANTITY_SEQUENCE | 0x00400293
TAG_QUANTITY | 0x00400294
TAG_MEASURING_UNITS_SEQUENCE | 0x00400295
TAG_BILLING_ITEM_SEQUENCE | 0x00400296
TAG_TOTAL_TIME_OF_FLUOROSCOPY | 0x00400300
TAG_TOTAL_NUMBER_OF_EXPOSURES | 0x00400301
TAG_ENTRANCE_DOSE | 0x00400302
TAG_EXPOSED_AREA | 0x00400303
TAG_DISTANCE_SOURCE_TO_ENTRANCE | 0x00400306
TAG_EXPOSURE_DOSE_SEQUENCE | 0x0040030E
TAG_COMMENTS_ON_RADIATION_DOSE | 0x00400310
TAG_BILLING_PROCEDURE_STEP_SEQUENCE | 0x00400320
TAG_FILM_CONSUMPTION_SEQUENCE | 0x00400321
TAG_BILLING_SUPPLIES_AND_DEVICES_SEQUENCE | 0x00400324
TAG_REFERENCED_PROCEDURE_STEP_SEQUENCE | 0x00400330
TAG_PERFORMED_SERIES_SEQUENCE | 0x00400340
TAG_COMMENTS_ON_THE_SCHEDULED_PROCEDURE_STEP | 0x00400400
TAG_REQUESTED_PROCEDURE_ID | 0x00401001
TAG_REASON_FOR_THE_REQUESTED_PROCEDURE | 0x00401002
TAG_REQUESTED_PROCEDURE_PRIORITY | 0x00401003
TAG_PATIENT_TRANSPORT_ARRANGEMENTS | 0x00401004
TAG_REQUESTED_PROCEDURE_LOCATION | 0x00401005
TAG_PLACER_ORDER_NUMBER_PROCEDURE_RETIRED | 0x00401006
TAG_FILLER_ORDER_NUMBER_PROCEDURE_RETIRED | 0x00401007
TAG_CONFIDENTIALITY_CODE | 0x00401008
TAG_REPORTING_PRIORITY | 0x00401009
TAG_NAMES_OF_INTENDED_RECIPIENTS_OF_RESULTS | 0x00401010
TAG_INTENDED_RECIPIENTS_OF_RESULTS_IDENTIFICATION_SEQUENCE | 0x00401011
TAG_PERSON_IDENTIFICATION_CODE_SEQUENCE | 0x00401101
TAG_PERSONS_ADDRESS | 0x00401102
TAG_PERSONS_TELEPHONE_NUMBERS | 0x00401103
TAG_REQUESTED_PROCEDURE_COMMENTS | 0x00401400
TAG_REASON_FOR_THE_IMAGING_SERVICE_REQUEST | 0x00402001
TAG_ISSUE_DATE_OF_IMAGING_SERVICE_REQUEST | 0x00402004
TAG_ISSUE_TIME_OF_IMAGING_SERVICE_REQUEST | 0x00402005
TAG_PLACER_ORDER_NUMBER_IMAGING_SERVICE_REQUEST_RETIRED | 0x00402006
TAG_FILLER_ORDER_NUMBER_IMAGING_SERVICE_REQUEST_RETIRED | 0x00402007
TAG_ORDER_ENTERED_BY | 0x00402008
TAG_ORDER_ENTERER_LOCATION | 0x00402009
TAG_ORDER_CALLBACK_PHONE_NUMBER | 0x00402010
TAG_PLACER_ORDER_NUMBER_IMAGING_SERVICE_REQUEST | 0x00402016
TAG_FILLER_ORDER_NUMBER_IMAGING_SERVICE_REQUEST | 0x00402017
TAG_IMAGING_SERVICE_REQUEST_COMMENTS | 0x00402400
TAG_CONFIDENTIALITY_CONSTRAINT_ON_PATIENT_DATA_DESCRIPTION | 0x00403001
TAG_GENERAL_PURPOSE_SCHEDULED_PROCEDURE_STEP_STATUS | 0x00404001
TAG_GENERAL_PURPOSE_PERFORMED_PROCEDURE_STEP_STATUS | 0x00404002
TAG_GENERAL_PURPOSE_SCHEDULED_PROCEDURE_STEP_PRIORITY | 0x00404003
TAG_SCHEDULED_PROCESSING_APPLICATIONS_CODE_SEQUENCE | 0x00404004
TAG_SCHEDULED_PROCEDURE_STEP_START_DATE_AND_TIME | 0x00404005
TAG_MULTIPLE_COPIES_FLAG | 0x00404006
TAG_PERFORMED_PROCESSING_APPLICATIONS_CODE_SEQUENCE | 0x00404007
TAG_HUMAN_PERFORMER_CODE_SEQUENCE | 0x00404009
TAG_EXPECTED_COMPLETION_DATE_AND_TIME | 0x00404011
TAG_RESULTING_GENERAL_PURPOSE_PERFORMED_PROCEDURE_STEPS_SEQUENCE | 0x00404015
TAG_REFERENCED_GENERAL_PURPOSE_SCHEDULED_PROCEDURE_STEP_SEQUENCE | 0x00404016
TAG_SCHEDULED_WORKITEM_CODE_SEQUENCE | 0x00404018
TAG_PERFORMED_WORKITEM_CODE_SEQUENCE | 0x00404019
TAG_INPUT_AVAILABILITY_FLAG | 0x00404020
TAG_INPUT_INFORMATIONSEQUENCE | 0x00404021
TAG_RELEVANT_INFORMATION_SEQUENCE | 0x00404022
TAG_REFERENCED_GENERAL_PURPOSE_SCHEDULED_PROCEDURE_STEP_TRANSACTION_UID | 0x00404023
TAG_SCHEDULED_STATION_NAME_CODE_SEQUENCE | 0x00404025
TAG_SCHEDULED_STATION_CLASS_CODE_SEQUENCE | 0x00404026
TAG_SCHEDULED_STATION_GEOGRAPHIC_LOCATION_CODE_SEQUENCE | 0x00404027
TAG_PERFORMED_STATION_NAME_CODE_SEQUENCE | 0x00404028
TAG_PERFORMED_STATION_CLASS_CODE_SEQUENCE | 0x00404029
TAG_PERFORMED_STATION_GEOGRAPHIC_LOCATION_CODE_SEQUENCE | 0x00404030
TAG_REQUESTED_SUBSEQUENT_WORKITEM_CODE_SEQUENCE | 0x00404031
TAG_NON_DICOM_OUTPUT_CODE_SEQUENCE | 0x00404032
TAG_OUTPUT_INFORMATION_SEQUENCE | 0x00404033
TAG_SCHEDULED_HUMAN_PERFORMERS_SEQUENCE | 0x00404034
TAG_ACTUAL_HUMAN_PERFORMERS_SEQUENCE | 0x00404035
TAG_HUMAN_PERFORMER_ORGANIZATION | 0x00404036
TAG_HUMAN_PERFORMER_NAME | 0x00404037
TAG_REAL_WORLD_VALUE_MAPPING_SEQUENCE | 0x00409096
TAG_LUT_LABEL | 0x00409210
TAG_REAL_WORLD_VALUE_LAST_VALUE_MAPPED | 0x00409211
TAG_REAL_WORLD_VALUE_LUT_DATA | 0x00409212
TAG_REAL_WORLD_VALUE_FIRST_VALUE_MAPPED | 0x00409216
TAG_REAL_WORLD_VALUE_INTERCEPT | 0x00409224
TAG_REAL_WORLD_VALUE_SLOPE | 0x00409225
TAG_PURPOSE_OF_REFERENCE_CODE_SEQUENCE | 0x0040A170
TAG_NUMERIC_VALUE_QUALIFIER_CODE_SEQUENCE | 0x0040A301
TAG_CALIBRATION_IMAGE | 0x00500004
TAG_DEVICE_SEQUENCE | 0x00500010
TAG_DEVICE_LENGTH | 0x00500014
TAG_DEVICE_DIAMETER | 0x00500016
TAG_DEVICE_DIAMETER_UNITS | 0x00500017
TAG_DEVICE_VOLUME | 0x00500018
TAG_INTER_MARKER_DISTANCE | 0x00500019
TAG_DEVICE_DESCRIPTION | 0x00500020
TAG_ENERGY_WINDOW_VECTOR | 0x00540010
TAG_NUMBER_OF_ENERGY_WINDOWS | 0x00540011
TAG_ENERGY_WINDOW_INFORMATION_SEQUENCE | 0x00540012
TAG_ENERGY_WINDOW_RANGE_SEQUENCE | 0x00540013
TAG_ENERGY_WINDOW_LOWER_LIMIT | 0x00540014
TAG_ENERGY_WINDOW_UPPER_LIMIT | 0x00540015
TAG_RADIOPHARMACEUTICAL_INFORMATION_SEQUENCE | 0x00540016
TAG_RESIDUAL_SYRINGE_COUNTS | 0x00540017
TAG_ENERGY_WINDOW_NAME | 0x00540018
TAG_DETECTOR_VECTOR | 0x00540020
TAG_NUMBER_OF_DETECTORS | 0x00540021
TAG_DETECTOR_INFORMATION_SEQUENCE | 0x00540022
TAG_PHASE_VECTOR | 0x00540030
TAG_NUMBER_OF_PHASES | 0x00540031
TAG_PHASE_INFORMATION_SEQUENCE | 0x00540032
TAG_NUMBER_OF_FRAMES_IN_PHASE | 0x00540033
TAG_PHASE_DELAY | 0x00540036
TAG_PAUSE_BETWEEN_FRAMES | 0x00540038
TAG_ROTATION_VECTOR | 0x00540050
TAG_NUMBER_OF_ROTATIONS | 0x00540051
TAG_ROTATION_INFORMATION_SEQUENCE | 0x00540052
TAG_NUMBER_OF_FRAMES_IN_ROTATION | 0x00540053
TAG_R_R_INTERVAL_VECTOR | 0x00540060
TAG_NUMBER_OF_R_R_INTERVALS | 0x00540061
TAG_GATED_INFORMATION_SEQUENCE | 0x00540062
TAG_DATA_INFORMATION_SEQUENCE | 0x00540063
TAG_TIME_SLOT_VECTOR | 0x00540070
TAG_NUMBER_OF_TIME_SLOTS | 0x00540071
TAG_TIME_SLOT_INFORMATION_SEQUENCE | 0x00540072
TAG_TIME_SLOT_TIME | 0x00540073
TAG_SLICE_VECTOR | 0x00540080
TAG_NUMBER_OF_SLICES | 0x00540081
TAG_ANGULAR_VIEW_VECTOR | 0x00540090
TAG_TIME_SLICE_VECTOR | 0x00540100
TAG_NUMBER_OF_TIME_SLICES | 0x00540101
TAG_START_ANGLE | 0x00540200
TAG_TYPE_OF_DETECTOR_MOTION | 0x00540202
TAG_TRIGGER_VECTOR | 0x00540210
TAG_NUMBER_OF_TRIGGERS_IN_PHASE | 0x00540211
TAG_VIEW_CODE_SEQUENCE | 0x00540220
TAG_VIEW_MODIFIER_CODE_SEQUENCE | 0x00540222
TAG_RADIONUCLIDE_CODE_SEQUENCE | 0x00540300
TAG_ADMINISTRATION_ROUTE_CODE_SEQUENCE | 0x00540302
TAG_RADIOPHARMACEUTICAL_CODE_SEQUENCE | 0x00540304
TAG_CALIBRATION_DATA_SEQUENCE | 0x00540306
TAG_ENERGY_WINDOW_NUMBER | 0x00540308
TAG_IMAGE_ID | 0x00540400
TAG_PATIENT_ORIENTATION_CODE_SEQUENCE | 0x00540410
TAG_PATIENT_ORIENTATION_MODIFIER_CODE_SEQUENCE | 0x00540412
TAG_PATIENT_GANTRY_RELATIONSHIP_CODE_SEQUENCE | 0x00540414
TAG_SERIES_TYPE | 0x00541000
TAG_UNITS | 0x00541001
TAG_COUNTS_SOURCE | 0x00541002
TAG_REPROJECTION_METHOD | 0x00541004
TAG_RANDOMS_CORRECTION_METHOD | 0x00541100
TAG_ATTENUATION_CORRECTION_METHOD | 0x00541101
TAG_DECAY_CORRECTION | 0x00541102
TAG_RECONSTRUCTION_METHOD | 0x00541103
TAG_DETECTOR_LINES_OF_RESPONSE_USED | 0x00541104
TAG_SCATTER_CORRECTION_METHOD | 0x00541105
TAG_AXIAL_ACCEPTANCE | 0x00541200
TAG_AXIAL_MASH | 0x00541201
TAG_TRANSVERSE_MASH | 0x00541202
TAG_DETECTOR_ELEMENT_SIZE | 0x00541203
TAG_COINCIDENCE_WINDOW_WIDTH | 0x00541210
TAG_SECONDARY_COUNTS_TYPE | 0x00541220
TAG_FRAME_REFERENCE_TIME | 0x00541300
TAG_PRIMARY_PROMPTS_COUNTS_ACCUMULATED | 0x00541310
TAG_SECONDARY_COUNTS_ACCUMULATED | 0x00541311
TAG_SLICE_SENSITIVITY_FACTOR | 0x00541320
TAG_DECAY_FACTOR | 0x00541321
TAG_DOSE_CALIBRATION_FACTOR | 0x00541322
TAG_SCATTER_FRACTION_FACTOR | 0x00541323
TAG_DEAD_TIME_FACTOR | 0x00541324
TAG_IMAGE_INDEX | 0x00541330
TAG_COUNTS_INCLUDED | 0x00541400
TAG_DEAD_TIME_CORRECTION_FLAG | 0x00541401
TAG_HISTOGRAM_SEQUENCE | 0x00603000
TAG_HISTOGRAM_NUMBER_OF_BINS | 0x00603002
TAG_HISTOGRAM_FIRST_BIN_VALUE | 0x00603004
TAG_HISTOGRAM_LAST_BIN_VALUE | 0x00603006
TAG_HISTOGRAM_BIN_WIDTH | 0x00603008
TAG_HISTOGRAM_EXPLANATION | 0x00603010
TAG_HISTOGRAM_DATA | 0x00603020
TAG_GRAPHIC_ANNOTATION_SEQUENCE | 0x00700001
TAG_GRAPHIC_LAYER | 0x00700002
TAG_BOUNDING_BOX_ANNOTATION_UNITS | 0x00700003
TAG_ANCHOR_POINT_ANNOTATION_UNITS | 0x00700004
TAG_GRAPHIC_ANNOTATION_UNITS | 0x00700005
TAG_UNFORMATTED_TEXT_VALUE | 0x00700006
TAG_TEXT_OBJECT_SEQUENCE | 0x00700008
TAG_GRAPHIC_OBJECT_SEQUENCE | 0x00700009
TAG_BOUNDING_BOX_TOP_LEFT_HAND_CORNER | 0x00700010
TAG_BOUNDING_BOX_BOTTOM_RIGHT_HAND_CORNER | 0x00700011
TAG_BOUNDING_BOX_TEXT_HORIZONTAL_JUSTIFICATION | 0x00700012
TAG_ANCHOR_POINT | 0x00700014
TAG_ANCHOR_POINT_VISIBILITY | 0x00700015
TAG_GRAPHIC_DIMENSIONS | 0x00700020
TAG_NUMBER_OF_GRAPHIC_POINTS | 0x00700021
TAG_GRAPHIC_DATA | 0x00700022
TAG_GRAPHIC_TYPE | 0x00700023
TAG_GRAPHIC_FILLED | 0x00700024
TAG_DISPLAYED_AREA_TOP_LEFT_HAND_CORNER | 0x00700052
TAG_DISPLAYED_AREA_BOTTOM_RIGHT_HAND_CORNER | 0x00700053
TAG_DISPLAYED_AREA_SELECTION_SEQUENCE | 0x0070005A
TAG_GRAPHIC_LAYER_SEQUENCE | 0x00700060
TAG_GRAPHIC_LAYER_ORDER | 0x00700062
TAG_GRAPHIC_LAYER_RECOMMENDED_DISPLAY_GRAYSCALE_VALUE | 0x00700066
TAG_GRAPHIC_LAYER_RECOMMENDED_DISPLAY_RGB_VALUE | 0x00700067
TAG_GRAPHIC_LAYER_DESCRIPTION | 0x00700068
TAG_PRESENTATION_LABEL | 0x00700080
TAG_PRESENTATION_DESCRIPTION | 0x00700081
TAG_PRESENTATION_CREATTION_DATE | 0x00700082
TAG_PRESENTATION_CREATTION_TIME | 0x00700083
TAG_PRESENTATION_CREATOR_NAME | 0x00700084
TAG_PRESENTATION_SIZE_MODE | 0x00700100
TAG_PRESENTATION_PIXEL_SPACING | 0x00700101
TAG_PRESENTATION_PIXEL_ASPECT_RATIO | 0x00700102
TAG_PRESENTATION_PIXEL_MAGNIFICATION_RATIO | 0x00700103
TAG_STORAGE_MEDIA_FILE_SET_ID | 0x00880130
TAG_STORAGE_MEDIA_FILE_SET_UID | 0x00880140
TAG_ICON_IMAGE_SEQUENCE | 0x00880200
TAG_TOPIC_TITLE | 0x00880904
TAG_TOPIC_SUBJECT | 0x00880906
TAG_TOPIC_AUTHOR | 0x00880910
TAG_TOPIC_KEY_WORDS | 0x00880912
TAG_MAC_ID_NUMBER | 0x04000005
TAG_MAC_CALCULATION_TRANSFER_SYNTAX_UID | 0x04000010
TAG_MAC_ALGORITHM | 0x04000015
TAG_DATA_ELEMENTS_SIGNED | 0x04000020
TAG_DIGITAL_SIGNATURE_UID | 0x04000100
TAG_DIGITAL_SIGNATURE_DATETIME | 0x04000105
TAG_CERTIFICATE_TYPE | 0x04000110
TAG_CERTIFICATE_OF_SIGNER | 0x04000115
TAG_SIGNATURE | 0x04000120
TAG_CERTIFIED_TIMESTAMP_TYPE | 0x04000305
TAG_CERTIFIED_TIMESTAMP | 0x04000310
TAG_ENCRYPTED_ATTRIBUTES_SEQUENCE | 0x04000500
TAG_ENCRYPTED_CONTENT_TRANSFER_SYNTAX_UID | 0x04000510
TAG_ENCRYPTED_CONTENT | 0x04000520
TAG_MODIFIED_ATTRIBUTES_SEQUENCE | 0x04000550
TAG_NUMBER_OF_COPIES | 0x20000010
TAG_PRINTER_CONFIGURATION_SEQUENCE | 0x2000001E
TAG_PRINT_PRIORITY | 0x20000020
TAG_MEDIUM_TYPE | 0x20000030
TAG_FILM_DESTINATION | 0x20000040
TAG_FILM_SESSION_LABEL | 0x20000050
TAG_MEMORY_ALLOCATION | 0x20000060
TAG_MAXIMUM_MEMORY_ALLOCATION | 0x20000061
TAG_COLOR_IMAGE_PRINTING_FLAG | 0x20000062
TAG_COLLATION_FLAG | 0x20000063
TAG_ANNOTATION_FLAG | 0x20000065
TAG_IMAGE_OVERLAY_FLAG | 0x20000067
TAG_PRESENTATION_LUT_FLAG | 0x20000069
TAG_IMAGE_BOX_PRESENTATION_LUT_FLAG | 0x2000006A
TAG_MEMORY_BIT_DEPTH | 0x200000A0
TAG_PRINTING_BIT_DEPTH | 0x200000A1
TAG_MEDIA_INSTALLED_SEQUENCE | 0x200000A2
TAG_OTHER_MEDIA_AVAILABLE_SEQUENCE | 0x200000A4
TAG_SUPPORTED_IMAGE_DISPLAY_FORMATS_SEQUENCE | 0x200000A8
TAG_REFERENCED_FILM_BOX_SEQUENCE | 0x20000500
TAG_REFERENCED_STORED_PRINT_SEQUENCE | 0x20000510
TAG_IMAGE_DISPLAY_FORMAT | 0x20100010
TAG_ANNOTATION_DISPLAY_FORMAT_ID | 0x20100030
TAG_FILM_ORIENTATION | 0x20100040
TAG_FILM_SIZE_ID | 0x20100050
TAG_PRINTER_RESOLUTION_ID | 0x20100052
TAG_DEFAULT_PRINTER_RESOLUTION_ID | 0x20100054
TAG_MAGNIFICATION_TYPE | 0x20100060
TAG_SMOOTHING_TYPE | 0x20100080
TAG_DEFAULT_MAGNIFICATION_TYPE | 0x201000A6
TAG_OTHER_MAGNIFICATION_TYPES_AVAILABLE | 0x201000A7
TAG_DEFAULT_SMOOTHING_TYPE | 0x201000A8
TAG_OTHER_SMOOTHING_TYPES_AVAILABLE | 0x201000A9
TAG_BORDER_DENSITY | 0x20100100
TAG_EMPTY_IMAGE_DENSITY | 0x20100110
TAG_MIN_DENSITY | 0x20100120
TAG_MAX_DENSITY | 0x20100130
TAG_TRIM | 0x20100140
TAG_CONFIGURATION_INFORMATION | 0x20100150
TAG_CONFIGURATION_INFORMATION_DESCRIPTION | 0x20100152
TAG_MAXIMUM_COLLATED_FILMS | 0x20100154
TAG_ILLUMINATION | 0x2010015E
TAG_REFLECTED_AMBIENT_LIGHT | 0x20100160
TAG_PRINTER_PIXEL_SPACING | 0x20100376
TAG_REFERENCED_FILM_SESSION_SEQUENCE | 0x20100500
TAG_REFERENCED_IMAGE_BOX_SEQUENCE | 0x20100510
TAG_REFERENCED_BASIC_ANNOTATION_BOX_SEQUENCE | 0x20100520
TAG_IMAGE_POSITION | 0x20200010
TAG_POLARITY | 0x20200020
TAG_REQUESTED_IMAGE_SIZE | 0x20200030
TAG_REQUESTED_DECIMATE_CROP_BEHAVIOR | 0x20200040
TAG_REQUESTED_RESOLUTION_ID | 0x20200050
TAG_REQUESTED_IMAGE_SIZE_FLAG | 0x202000A0
TAG_DECIMATE_CROP_RESULT | 0x202000A2
TAG_BASIC_GRAYSCALE_IMAGE_SEQUENCE | 0x20200110
TAG_BASIC_COLOR_IMAGE_SEQUENCE | 0x20200111
TAG_REFERENCED_IMAGE_OVERLAY_BOX_SEQUENCE_RETIRED | 0x20200130
TAG_REFERENCED_VOI_LUT_BOX_SEQUENCE_RETIRED | 0x20200140
TAG_ANNOTATION_POSITION | 0x20300010
TAG_TEXT_STRING | 0x20300020
TAG_REFERENCED_OVERLAY_PLANE_SEQUENCE | 0x20400010
TAG_REFERENCED_OVERLAY_PLANE_GROUPS | 0x20400011
TAG_OVERLAY_PIXEL_DATA_SEQUENCE | 0x20400020
TAG_OVERLAY_MAGNIFICATION_TYPE | 0x20400060
TAG_OVERLAY_SMOOTHING_TYPE | 0x20400070
TAG_OVERLAY_OR_IMAGE_MAGNIFICATION | 0x20400072
TAG_MAGNIFY_TO_NUMBER_OF_COLUMNS | 0x20400074
TAG_OVERLAY_FOREGROUND_DENSITY | 0x20400080
TAG_OVERLAY_BACKGROUND_DENSITY | 0x20400082
TAG_OVERLAY_MODE_RETIRED | 0x20400090
TAG_THRESHOLD_DENSITY_RETIRED | 0x20400100
TAG_REFERENCED_IMAGE_BOX_SEQUENCE_RETIRED | 0x20400500
TAG_PRESENTATION_LUT_SEQUENCE | 0x20500010
TAG_PRESENTATION_LUT_SHAPE | 0x20500020
TAG_REFERENCED_PRESENTATION_LUT_SEQUENCE | 0x20500500
TAG_PRINT_JOB_ID | 0x21000010
TAG_EXECUTION_STATUS | 0x21000020
TAG_EXECUTION_STATUS_INFO | 0x21000030
TAG_CREATION_DATE | 0x21000040
TAG_CREATION_TIME | 0x21000050
TAG_ORIGINATOR | 0x21000070
TAG_DESTINATION_AE | 0x21000140
TAG_OWNER_ID | 0x21000160
TAG_NUMBER_OF_FILMS | 0x21000170
TAG_REFERENCED_PRINT_JOB_SEQUENCE_2100 | 0x21000500
TAG_PRINTER_STATUS | 0x21100010
TAG_PRINTER_STATUS_INFO | 0x21100020
TAG_PRINTER_NAME | 0x21100030
TAG_PRINT_QUEUE_ID | 0x21100099
TAG_QUEUE_STATUS | 0x21200010
TAG_PRINT_JOB_DESCRIPTION_SEQUENCE | 0x21200050
TAG_REFERENCED_PRINT_JOB_SEQUENCE_2120 | 0x21200070
TAG_PRINT_MANAGEMENT_CAPABILITIES_SEQUENCE | 0x21300010
TAG_PRINTER_CHARACTERISTICS_SEQUENCE | 0x21300015
TAG_FILM_BOX_CONTENT_SEQUENCE | 0x21300030
TAG_IMAGE_BOX_CONTENT_SEQUENCE | 0x21300040
TAG_ANNOTATION_CONTENT_SEQUENCE | 0x21300050
TAG_IMAGE_OVERLAY_BOX_CONTENT_SEQUENCE | 0x21300060
TAG_PRESENTATION_LUT_CONTENT_SEQUENCE | 0x21300080
TAG_PROPOSED_STUDY_SEQUENCE | 0x213000A0
TAG_ORIGINAL_IMAGE_SEQUENCE | 0x213000C0
TAG_RT_IMAGE_LABEL | 0x30020002
TAG_RT_IMAGE_NAME | 0x30020003
TAG_RT_IMAGE_DESCRIPTION | 0x30020004
TAG_REPORTED_VALUES_ORIGIN | 0x3002000A
TAG_RT_IMAGE_PLANE | 0x3002000C
TAG_X_RAY_IMAGE_RECEPTOR_ANGLE | 0x3002000E
TAG_RT_IMAGE_ORIENTATION | 0x30020010
TAG_IMAGE_PLANE_PIXEL_SPACING | 0x30020011
TAG_RT_IMAGE_POSITION | 0x30020012
TAG_RADIATION_MACHINE_NAME | 0x30020020
TAG_RADIATION_MACHINE_SAD | 0x30020022
TAG_RADIATION_MACHINE_SSD | 0x30020024
TAG_RT_IMAGE_SID | 0x30020026
TAG_SOURCE_TO_REFERENCE_OBJECT_DISTANCE | 0x30020028
TAG_FRACTION_NUMBER | 0x30020029
TAG_EXPOSURE_SEQUENCE | 0x30020030
TAG_METERSET_EXPOSURE | 0x30020032
TAG_DIAPHRAGM_POSITION | 0x30020034
TAG_DVH_TYPE | 0x30040001
TAG_DOSE_UNITS | 0x30040002
TAG_DOSE_TYPE | 0x30040004
TAG_DOSE_COMMENT | 0x30040006
TAG_NORMALIZATION_POINT | 0x30040008
TAG_DOSE_SUMMATION_TYPE | 0x3004000A
TAG_GRID_FRAME_OFFSET_VECTOR | 0x3004000C
TAG_DOSE_GRID_SCALING | 0x3004000E
TAG_RT_DOSE_ROI_SEQUENCE | 0x30040010
TAG_DOSE_VALUE | 0x30040012
TAG_DVH_NORMALIZATION_POINT | 0x30040040
TAG_DVH_NORMALIZATION_DOSE_VALUE | 0x30040042
TAG_DVH_SEQUENCE | 0x30040050
TAG_DVH_DOSE_SCALING | 0x30040052
TAG_DVH_VOLUME_UNITS | 0x30040054
TAG_DVH_NUMBER_OF_BINS | 0x30040056
TAG_DVH_DATA | 0x30040058
TAG_DVH_REFERENCED_ROI_SEQUENCE | 0x30040060
TAG_DVH_ROI_CONTRIBUTION_TYPE | 0x30040062
TAG_DVH_MINIMUM_DOSE | 0x30040070
TAG_DVH_MAXIMUM_DOSE | 0x30040072
TAG_DVH_MEAN_DOSE | 0x30040074
TAG_STRUCTURE_SET_LABEL | 0x30060002
TAG_STRUCTURE_SET_NAME | 0x30060004
TAG_STRUCTURE_SET_DESCRIPTION | 0x30060006
TAG_STRUCTURE_SET_DATE | 0x30060008
TAG_STRUCTURE_SET_TIME | 0x30060009
TAG_REFERENCED_FRAME_OF_REFERENCE_SEQUENCE | 0x30060010
TAG_RT_REFERENCED_STUDY_SEQUENCE | 0x30060012
TAG_RT_REFERENCED_SERIES_SEQUENCE | 0x30060014
TAG_CONTOUR_IMAGE_SEQUENCE | 0x30060016
TAG_STRUCTURE_SET_ROI_SEQUENCE | 0x30060020
TAG_ROI_NUMBER | 0x30060022
TAG_REFERENCED_FRAME_OF_REFERENCE_UID | 0x30060024
TAG_ROI_NAME | 0x30060026
TAG_ROI_DESCRIPTION | 0x30060028
TAG_ROI_DISPLAY_COLOR | 0x3006002A
TAG_ROI_VOLUME | 0x3006002C
TAG_RT_RELATED_ROI_SEQUENCE | 0x30060030
TAG_RT_ROI_RELATIONSHIP | 0x30060033
TAG_ROI_GENERATION_ALGORITHM | 0x30060036
TAG_ROI_GENERATION_DESCRIPTION | 0x30060038
TAG_ROI_CONTOUR_SEQUENCE | 0x30060039
TAG_CONTOUR_SEQUENCE | 0x30060040
TAG_CONTOUR_GEOMETRIC_TYPE | 0x30060042
TAG_CONTOUR_SLAB_THICKNESS | 0x30060044
TAG_CONTOUR_OFFSET_VECTOR | 0x30060045
TAG_NUMBER_OF_CONTOUR_POINTS | 0x30060046
TAG_CONTOUR_DATA | 0x30060050
TAG_RT_ROI_OBSERVATIONS_SEQUENCE | 0x30060080
TAG_OBSERVATION_NUMBER | 0x30060082
TAG_REFERENCED_ROI_NUMBER | 0x30060084
TAG_ROI_OBSERVATION_LABEL | 0x30060085
TAG_RT_ROI_IDENTIFICATION_CODE_SEQUENCE | 0x30060086
TAG_ROI_OBSERVATION_DESCRIPTION | 0x30060088
TAG_RELATED_RT_ROI_OBSERVATIONS_SEQUENCE | 0x300600A0
TAG_RT_ROI_INTERPRETED_TYPE | 0x300600A4
TAG_ROI_INTERPRETER | 0x300600A6
TAG_ROI_PHYSICAL_PROPERTIES_SEQUENCE | 0x300600B0
TAG_ROI_PHYSICAL_PROPERTY | 0x300600B2
TAG_ROI_PHYSICAL_PROPERTY_VALUE | 0x300600B4
TAG_FRAME_OF_REFERENCE_RELATIONSHIP_SEQUENCE | 0x300600C0
TAG_RELATED_FRAME_OF_REFERENCE_UID | 0x300600C2
TAG_FRAME_OF_REFERENCE_TRANSFORMATION_TYPE | 0x300600C4
TAG_FRAME_OF_REFERENCE_TRANSFORMATION_MATRIX | 0x300600C6
TAG_FRAME_OF_REFERENCE_TRANSFORMATION_COMMENT | 0x300600C8
TAG_MEASURED_DOSE_REFERENCE_SEQUENCE | 0x30080010
TAG_MEASURED_DOSE_DESCRIPTION | 0x30080012
TAG_MEASURED_DOSE_TYPE | 0x30080014
TAG_MEASURED_DOSE_VALUE | 0x30080016
TAG_TREATMENT_SESSION_BEAM_SEQUENCE | 0x30080020
TAG_CURRENT_FRACTION_NUMBER | 0x30080022
TAG_TREATMENT_CONTROL_POINT_DATE | 0x30080024
TAG_TREATMENT_CONTROL_POINT_TIME | 0x30080025
TAG_TREATMENT_TERMINATION_STATUS | 0x3008002A
TAG_TREATMENT_TERMINATION_CODE | 0x3008002B
TAG_TREATMENT_VERIFICATION_STATUS | 0x3008002C
TAG_REFERENCED_TREATMENT_RECORD_SEQUENCE | 0x30080030
TAG_SPECIFIED_PRIMARY_METERSET | 0x30080032
TAG_SPECIFIED_SECONDARY_METERSET | 0x30080033
TAG_DELIVERED_PRIMARY_METERSET | 0x30080036
TAG_DELIVERED_SECONDARY_METERSET | 0x30080037
TAG_SPECIFIED_TREATMENT_TIME | 0x3008003A
TAG_DELIVERED_TREATMENT_TIME | 0x3008003B
TAG_CONTROL_POINT_DELIVERY_SEQUENCE | 0x30080040
TAG_SPECIFIED_METERSET | 0x30080042
TAG_DELIVERED_METERSET | 0x30080044
TAG_DOSE_RATE_DELIVERED | 0x30080048
TAG_TREATMENT_SUMMARY_CALCULATED_DOSE_REFERENCE_SEQUENCE | 0x30080050
TAG_CUMULATIVE_DOSE_TO_DOSE_REFERENCE | 0x30080052
TAG_FIRST_TREATMENT_DATE | 0x30080054
TAG_MOST_RECENT_TREATMENT_DATE | 0x30080056
TAG_NUMBER_OF_FRACTIONS_DELIVERED | 0x3008005A
TAG_OVERRIDE_SEQUENCE | 0x30080060
TAG_OVERRIDE_PARAMETER_POINTER | 0x30080062
TAG_MEASURED_DOSE_REFERENCE_NUMBER | 0x30080064
TAG_OVERRIDE_REASON | 0x30080066
TAG_CALCULATED_DOSE_REFERENCE_SEQUENCE | 0x30080070
TAG_CALCULATED_DOSE_REFERENCE_NUMBER | 0x30080072
TAG_CALCULATED_DOSE_REFERENCE_DESCRIPTION | 0x30080074
TAG_CALCULATED_DOSE_REFERENCE_DOSE_VALUE | 0x30080076
TAG_START_METERSET | 0x30080078
TAG_END_METERSET | 0x3008007A
TAG_REFERENCED_MEASURED_DOSE_REFERENCE_SEQUENCE | 0x30080080
TAG_REFERENCED_MEASURED_DOSE_REFERENCE_NUMBER | 0x30080082
TAG_REFERENCED_CALCULATED_DOSE_REFERENCE_SEQUENCE | 0x30080090
TAG_REFERENCED_CALCULATED_DOSE_REFERENCE_NUMBER | 0x30080092
TAG_BEAM_LIMITING_DEVICE_LEAF_PAIRS_SEQUENCE | 0x300800A0
TAG_RECORDED_WEDGE_SEQUENCE | 0x300800B0
TAG_RECORDED_COMPENSATOR_SEQUENCE | 0x300800C0
TAG_RECORDED_BLOCK_SEQUENCE | 0x300800D0
TAG_TREATMENT_SUMMARY_MEASURED_DOSE_REFERENCE_SEQUENCE | 0x300800E0
TAG_RECORDED_SOURCE_SEQUENCE | 0x30080100
TAG_SOURCE_SERIAL_NUMBER | 0x30080105
TAG_TREATMENT_SESSION_APPLICATION_SETUP_SEQUENCE | 0x30080110
TAG_APPLICATION_SETUP_CHECK | 0x30080116
TAG_RECORDED_BRACHY_ACCESSORY_DEVICE_SEQUENCE | 0x30080120
TAG_REFERENCED_BRACHY_ACCESSORY_DEVICE_NUMBER | 0x30080122
TAG_RECORDED_CHANNEL_SEQUENCE | 0x30080130
TAG_SPECIFIED_CHANNEL_TOTAL_TIME | 0x30080132
TAG_DELIVERED_CHANNEL_TOTAL_TIME | 0x30080134
TAG_SPECIFIED_NUMBER_OF_PULSES | 0x30080136
TAG_DELIVERED_NUMBER_OF_PULSES | 0x30080138
TAG_SPECIFIED_PULSE_REPETITION_INTERVAL | 0x3008013A
TAG_DELIVERED_PULSE_REPETITION_INTERVAL | 0x3008013C
TAG_RECORDED_SOURCE_APPLICATOR_SEQUENCE | 0x30080140
TAG_REFERENCED_SOURCE_APPLICATOR_NUMBER | 0x30080142
TAG_RECORDED_CHANNEL_SHIELD_SEQUENCE | 0x30080150
TAG_REFERENCED_CHANNEL_SHIELD_NUMBER | 0x30080152
TAG_BRACHY_CONTROL_POINT_DELIVERED_SEQUENCE | 0x30080160
TAG_SAFE_POSITION_EXIT_DATE | 0x30080162
TAG_SAFE_POSITION_EXIT_TIME | 0x30080164
TAG_SAFE_POSITION_RETURN_DATE | 0x30080166
TAG_SAFE_POSITION_RETURN_TIME | 0x30080168
TAG_CURRENT_TREATMENT_STATUS | 0x30080200
TAG_TREATMENT_STATUS_COMMENT | 0x30080202
TAG_FRACTION_GROUP_SUMMARY_SEQUENCE | 0x30080220
TAG_REFERENCED_FRACTION_NUMBER | 0x30080223
TAG_FRACTION_GROUP_TYPE | 0x30080224
TAG_BEAM_STOPPER_POSITION | 0x30080230
TAG_FRACTION_STATUS_SUMMARY_SEQUENCE | 0x30080240
TAG_TREATMENT_DATE | 0x30080250
TAG_TREATMENT_TIME | 0x30080251
TAG_RT_PLAN_LABEL | 0x300A0002
TAG_RT_PLAN_NAME | 0x300A0003
TAG_RT_PLAN_DESCRIPTION | 0x300A0004
TAG_RT_PLAN_DATE | 0x300A0006
TAG_RT_PLAN_TIME | 0x300A0007
TAG_TREATMENT_PROTOCOLS | 0x300A0009
TAG_TREATMENT_INTENT | 0x300A000A
TAG_TREATMENT_SITES | 0x300A000B
TAG_RT_PLAN_GEOMETRY | 0x300A000C
TAG_PRESCRIPTION_DESCRIPTION | 0x300A000E
TAG_DOSE_REFERENCE_SEQUENCE | 0x300A0010
TAG_DOSE_REFERENCE_NUMBER | 0x300A0012
TAG_DOSE_REFERENCE_STRUCTURE_TYPE | 0x300A0014
TAG_NOMINAL_BEAM_ENERGY_UNIT | 0x300A0015
TAG_DOSE_REFERENCE_DESCRIPTION | 0x300A0016
TAG_DOSE_REFERENCE_POINT_COORDINATES | 0x300A0018
TAG_NOMINAL_PRIOR_DOSE | 0x300A001A
TAG_DOSE_REFERENCE_TYPE | 0x300A0020
TAG_CONSTRAINT_WEIGHT | 0x300A0021
TAG_DELIVERY_WARNING_DOSE | 0x300A0022
TAG_DELIVERY_MAXIMUM_DOSE | 0x300A0023
TAG_TARGET_MINIMUM_DOSE | 0x300A0025
TAG_TARGET_PRESCRIPTION_DOSE | 0x300A0026
TAG_TARGET_MAXIMUM_DOSE | 0x300A0027
TAG_TARGET_UNDERDOSE_VOLUME_FRACTION | 0x300A0028
TAG_ORGAN_AT_RISK_FULL_VOLUME_DOSE | 0x300A002A
TAG_ORGAN_AT_RISK_LIMIT_DOSE | 0x300A002B
TAG_ORGAN_AT_RISK_MAXIMUM_DOSE | 0x300A002C
TAG_ORGAN_AT_RISK_OVERDOSE_VOLUME_FRACTION | 0x300A002D
TAG_TOLERANCE_TABLE_SEQUENCE | 0x300A0040
TAG_TOLERANCE_TABLE_NUMBER | 0x300A0042
TAG_TOLERANCE_TABLE_LABEL | 0x300A0043
TAG_GANTRY_ANGLE_TOLERANCE | 0x300A0044
TAG_BEAM_LIMITING_DEVICE_ANGLE_TOLERANCE | 0x300A0046
TAG_BEAM_LIMITING_DEVICE_TOLERANCE_SEQUENCE | 0x300A0048
TAG_BEAM_LIMITING_DEVICE_POSITION_TOLERANCE | 0x300A004A
TAG_PATIENT_SUPPORT_ANGLE_TOLERANCE | 0x300A004C
TAG_TABLE_TOP_ECCENTRIC_ANGLE_TOLERANCE | 0x300A004E
TAG_TABLE_TOP_VERTICAL_POSITION_TOLERANCE | 0x300A0051
TAG_TABLE_TOP_LONGITUDINAL_POSITION_TOLERANCE | 0x300A0052
TAG_TABLE_TOP_LATERAL_POSITION_TOLERANCE | 0x300A0053
TAG_RT_PLAN_RELATIONSHIP | 0x300A0055
TAG_FRACTION_GROUP_SEQUENCE | 0x300A0070
TAG_FRACTION_GROUP_NUMBER | 0x300A0071
TAG_NUMBER_OF_FRACTIONS_PLANNED | 0x300A0078
TAG_NUMBER_OF_FRACTIONS_PER_DAY | 0x300A0079
TAG_REPEAT_FRACTION_CYCLE_LENGTH | 0x300A007A
TAG_FRACTION_PATTERN | 0x300A007B
TAG_NUMBER_OF_BEAMS | 0x300A0080
TAG_BEAM_DOSE_SPECIFICATION_POINT | 0x300A0082
TAG_BEAM_DOSE | 0x300A0084
TAG_BEAM_METERSET | 0x300A0086
TAG_NUMBER_OF_BRACHY_APPLICATION_SETUPS | 0x300A00A0
TAG_BRACHY_APPLICATION_SETUP_DOSE_SPECIFICATION_POINT | 0x300A00A2
TAG_BRACHY_APPLICATION_SETUP_DOSE | 0x300A00A4
TAG_BEAM_SEQUENCE | 0x300A00B0
TAG_TREATMENT_MACHINE_NAME | 0x300A00B2
TAG_PRIMARY_DOSIMETER_UNIT | 0x300A00B3
TAG_SOURCE_AXIS_DISTANCE | 0x300A00B4
TAG_BEAM_LIMITING_DEVICE_SEQUENCE | 0x300A00B6
TAG_RT_BEAM_LIMITING_DEVICE_TYPE | 0x300A00B8
TAG_SOURCE_TO_BEAM_LIMITING_DEVICE_DISTANCE | 0x300A00BA
TAG_NUMBER_OF_LEAF_JAW_PAIRS | 0x300A00BC
TAG_LEAF_POSITION_BOUNDARIES | 0x300A00BE
TAG_BEAM_NUMBER | 0x300A00C0
TAG_BEAM_NAME | 0x300A00C2
TAG_BEAM_DESCRIPTION | 0x300A00C3
TAG_BEAM_TYPE | 0x300A00C4
TAG_RADIATION_TYPE | 0x300A00C6
TAG_HIGHDOSE_TECHNIQUE_TYPE | 0x300A00C7
TAG_REFERENCE_IMAGE_NUMBER | 0x300A00C8
TAG_PLANNED_VERIFICATION_IMAGE_SEQUENCE | 0x300A00CA
TAG_IMAGING_DEVICE_SPECIFIC_ACQUISITION_PARAMETERS | 0x300A00CC
TAG_TREATMENT_DELIVERY_TYPE | 0x300A00CE
TAG_NUMBER_OF_WEDGES | 0x300A00D0
TAG_WEDGE_SEQUENCE | 0x300A00D1
TAG_WEDGE_NUMBER | 0x300A00D2
TAG_WEDGE_TYPE | 0x300A00D3
TAG_WEDGE_ID | 0x300A00D4
TAG_WEDGE_ANGLE | 0x300A00D5
TAG_WEDGE_FACTOR | 0x300A00D6
TAG_WEDGE_ORIENTATION | 0x300A00D8
TAG_SOURCE_TO_WEDGE_TRAY_DISTANCE | 0x300A00DA
TAG_NUMBER_OF_COMPENSATORS | 0x300A00E0
TAG_MATERIAL_ID | 0x300A00E1
TAG_TOTAL_COMPENSATOR_TRAY_FACTOR | 0x300A00E2
TAG_COMPENSATOR_SEQUENCE | 0x300A00E3
TAG_COMPENSATOR_NUMBER | 0x300A00E4
TAG_COMPENSATOR_ID | 0x300A00E5
TAG_SOURCE_TO_COMPENSATOR_TRAY_DISTANCE | 0x300A00E6
TAG_COMPENSATOR_ROWS | 0x300A00E7
TAG_COMPENSATOR_COLUMNS | 0x300A00E8
TAG_COMPENSATOR_PIXEL_SPACING | 0x300A00E9
TAG_COMPENSATOR_POSITION | 0x300A00EA
TAG_COMPENSATOR_TRANSMISSION_DATA | 0x300A00EB
TAG_COMPENSATOR_THICKNESS_DATA | 0x300A00EC
TAG_NUMBER_OF_BOLI | 0x300A00ED
TAG_COMPENSATOR_TYPE | 0x300A00EE
TAG_NUMBER_OF_BLOCKS | 0x300A00F0
TAG_TOTAL_BLOCK_TRAY_FACTOR | 0x300A00F2
TAG_BLOCK_SEQUENCE | 0x300A00F4
TAG_BLOCK_TRAY_ID | 0x300A00F5
TAG_SOURCE_TO_BLOCK_TRAY_DISTANCE | 0x300A00F6
TAG_BLOCK_TYPE | 0x300A00F8
TAG_BLOCK_DIVERGENCE | 0x300A00FA
TAG_BLOCK_MOUNTING_POSITION | 0x300A00FB
TAG_BLOCK_NUMBER | 0x300A00FC
TAG_BLOCK_NAME | 0x300A00FE
TAG_BLOCK_THICKNESS | 0x300A0100
TAG_BLOCK_TRANSMISSION | 0x300A0102
TAG_BLOCK_NUMBER_OF_POINTS | 0x300A0104
TAG_BLOCK_DATA | 0x300A0106
TAG_APPLICATOR_SEQUENCE | 0x300A0107
TAG_APPLICATOR_ID | 0x300A0108
TAG_APPLICATOR_TYPE | 0x300A0109
TAG_APPLICATOR_DESCRIPTION | 0x300A010A
TAG_CUMULATIVE_DOSE_REFERENCE_COEFFICIENT | 0x300A010C
TAG_FINAL_CUMULATIVE_METERSET_WEIGHT | 0x300A010E
TAG_NUMBER_OF_CONTROL_POINTS | 0x300A0110
TAG_CONTROL_POINT_SEQUENCE | 0x300A0111
TAG_CONTROL_POINT_INDEX | 0x300A0112
TAG_NOMINAL_BEAM_ENERGY | 0x300A0114
TAG_DOSE_RATE_SET | 0x300A0115
TAG_WEDGE_POSITION_SEQUENCE | 0x300A0116
TAG_WEDGE_POSITION | 0x300A0118
TAG_BEAM_LIMITING_DEVICE_POSITION_SEQUENCE | 0x300A011A
TAG_LEAF_JAW_POSITIONS | 0x300A011C
TAG_GANTRY_ANGLE | 0x300A011E
TAG_GANTRY_ROTATION_DIRECTION | 0x300A011F
TAG_BEAM_LIMITING_DEVICE_ANGLE | 0x300A0120
TAG_BEAM_LIMITING_DEVICE_ROTATION_DIRECTION | 0x300A0121
TAG_PATIENT_SUPPORT_ANGLE | 0x300A0122
TAG_PATIENT_SUPPORT_ROTATION_DIRECTION | 0x300A0123
TAG_TABLE_TOP_ECCENTRIC_AXIS_DISTANCE | 0x300A0124
TAG_TABLE_TOP_ECCENTRIC_ANGLE | 0x300A0125
TAG_TABLE_TOP_ECCENTRIC_ROTATION_DIRECTION | 0x300A0126
TAG_TABLE_TOP_VERTICAL_POSITION | 0x300A0128
TAG_TABLE_TOP_LONGITUDINAL_POSITION | 0x300A0129
TAG_TABLE_TOP_LATERAL_POSITION | 0x300A012A
TAG_ISOCENTER_POSITION | 0x300A012C
TAG_SURFACE_ENTRY_POINT | 0x300A012E
TAG_SOURCE_TO_SURFACE_DISTANCE | 0x300A0130
TAG_CUMULATIVE_METERSET_WEIGHT | 0x300A0134
TAG_PATIENT_SETUP_SEQUENCE | 0x300A0180
TAG_PATIENT_SETUP_NUMBER | 0x300A0182
TAG_PATIENT_ADDITIONAL_POSITION | 0x300A0184
TAG_FIXATION_DEVICE_SEQUENCE | 0x300A0190
TAG_FIXATION_DEVICE_TYPE | 0x300A0192
TAG_FIXATION_DEVICE_LABEL | 0x300A0194
TAG_FIXATION_DEVICE_DESCRIPTION | 0x300A0196
TAG_FIXATION_DEVICE_POSITION | 0x300A0198
TAG_SHIELDING_DEVICE_SEQUENCE | 0x300A01A0
TAG_SHIELDING_DEVICE_TYPE | 0x300A01A2
TAG_SHIELDING_DEVICE_LABEL | 0x300A01A4
TAG_SHIELDING_DEVICE_DESCRIPTION | 0x300A01A6
TAG_SHIELDING_DEVICE_POSITION | 0x300A01A8
TAG_SETUP_TECHNIQUE | 0x300A01B0
TAG_SETUP_TECHNIQUE_DESCRIPTION | 0x300A01B2
TAG_SETUP_DEVICE_SEQUENCE | 0x300A01B4
TAG_SETUP_DEVICE_TYPE | 0x300A01B6
TAG_SETUP_DEVICE_LABEL | 0x300A01B8
TAG_SETUP_DEVICE_DESCRIPTION | 0x300A01BA
TAG_SETUP_DEVICE_PARAMETER | 0x300A01BC
TAG_SETUP_REFERENCE_DESCRIPTION | 0x300A01D0
TAG_TABLE_TOP_VERTICAL_SETUP_DISPLACEMENT | 0x300A01D2
TAG_TABLE_TOP_LONGITUDINAL_SETUP_DISPLACEMENT | 0x300A01D4
TAG_TABLE_TOP_LATERAL_SETUP_DISPLACEMENT | 0x300A01D6
TAG_BRACHY_TREATMENT_TECHNIQUE | 0x300A0200
TAG_BRACHY_TREATMENT_TYPE | 0x300A0202
TAG_TREATMENT_MACHINE_SEQUENCE | 0x300A0206
TAG_SOURCE_SEQUENCE | 0x300A0210
TAG_SOURCE_NUMBER | 0x300A0212
TAG_SOURCE_TYPE | 0x300A0214
TAG_SOURCE_MANUFACTURER | 0x300A0216
TAG_ACTIVE_SOURCE_DIAMETER | 0x300A0218
TAG_ACTIVE_SOURCE_LENGTH | 0x300A021A
TAG_SOURCE_ENCAPSULATION_NOMINAL_THICKNESS | 0x300A0222
TAG_SOURCE_ENCAPSULATION_NOMINAL_TRANSMISSION | 0x300A0224
TAG_SOURCE_ISOTOPE_NAME | 0x300A0226
TAG_SOURCE_ISOTOPE_HALF_LIFE | 0x300A0228
TAG_REFERENCE_AIR_KERMA_RATE | 0x300A022A
TAG_AIR_KERMA_RATE_REFERENCE_DATE | 0x300A022C
TAG_AIR_KERMA_RATE_REFERENCE_TIME | 0x300A022E
TAG_APPLICATION_SETUP_SEQUENCE | 0x300A0230
TAG_APPLICATION_SETUP_TYPE | 0x300A0232
TAG_APPLICATION_SETUP_NUMBER | 0x300A0234
TAG_APPLICATION_SETUP_NAME | 0x300A0236
TAG_APPLICATION_SETUP_MANUFACTURER | 0x300A0238
TAG_TEMPLATE_NUMBER | 0x300A0240
TAG_TEMPLATE_TYPE | 0x300A0242
TAG_TEMPLATE_NAME | 0x300A0244
TAG_TOTAL_REFERENCE_AIR_KERMA | 0x300A0250
TAG_BRACHY_ACCESSORY_DEVICE_SEQUENCE | 0x300A0260
TAG_BRACHY_ACCESSORY_DEVICE_NUMBER | 0x300A0262
TAG_BRACHY_ACCESSORY_DEVICE_ID | 0x300A0263
TAG_BRACHY_ACCESSORY_DEVICE_TYPE | 0x300A0264
TAG_BRACHY_ACCESSORY_DEVICE_NAME | 0x300A0266
TAG_BRACHY_ACCESSORY_DEVICE_NOMINAL_THICKNESS | 0x300A026A
TAG_BRACHY_ACCESSORY_DEVICE_NOMINAL_TRANSMISSION | 0x300A026C
TAG_CHANNEL_SEQUENCE | 0x300A0280
TAG_CHANNEL_NUMBER | 0x300A0282
TAG_CHANNEL_LENGTH | 0x300A0284
TAG_CHANNEL_TOTAL_TIME | 0x300A0286
TAG_SOURCE_MOVEMENT_TYPE | 0x300A0288
TAG_NUMBER_OF_PULSES | 0x300A028A
TAG_PULSE_REPETITION_INTERVAL | 0x300A028C
TAG_SOURCE_APPLICATOR_NUMBER | 0x300A0290
TAG_SOURCE_APPLICATOR_ID | 0x300A0291
TAG_SOURCE_APPLICATOR_TYPE | 0x300A0292
TAG_SOURCE_APPLICATOR_NAME | 0x300A0294
TAG_SOURCE_APPLICATOR_LENGTH | 0x300A0296
TAG_SOURCE_APPLICATOR_MANUFACTURER | 0x300A0298
TAG_SOURCE_APPLICATOR_WALL_NOMINAL_THICKNESS | 0x300A029C
TAG_SOURCE_APPLICATOR_WALL_NOMINAL_TRANSMISSION | 0x300A029E
TAG_SOURCE_APPLICATOR_STEP_SIZE | 0x300A02A0
TAG_TRANSFER_TUBE_NUMBER | 0x300A02A2
TAG_TRANSFER_TUBE_LENGTH | 0x300A02A4
TAG_CHANNEL_SHIELD_SEQUENCE | 0x300A02B0
TAG_CHANNEL_SHIELD_NUMBER | 0x300A02B2
TAG_CHANNEL_SHIELD_ID | 0x300A02B3
TAG_CHANNEL_SHIELD_NAME | 0x300A02B4
TAG_CHANNEL_SHIELD_NOMINAL_THICKNESS | 0x300A02B8
TAG_CHANNEL_SHIELD_NOMINAL_TRANSMISSION | 0x300A02BA
TAG_FINAL_CUMULATIVE_TIME_WEIGHT | 0x300A02C8
TAG_BRACHY_CONTROL_POINT_SEQUENCE | 0x300A02D0
TAG_CONTROL_POINT_RELATIVE_POSITION | 0x300A02D2
TAG_CONTROL_POINT_3D_POSITION | 0x300A02D4
TAG_CUMULATIVE_TIME_WEIGHT | 0x300A02D6
TAG_COMPENSATOR_DIVERGENCE | 0x300A02E0
TAG_COMPENSATOR_MOUNTING_POSITION | 0x300A02E1
TAG_SOURCE_TO_COMPENSATOR_DISTANCE | 0x300A02E2
TAG_REFERENCED_RT_PLAN_SEQUENCE | 0x300C0002
TAG_REFERENCED_BEAM_SEQUENCE | 0x300C0004
TAG_REFERENCED_BEAM_NUMBER | 0x300C0006
TAG_REFERENCED_REFERENCE_IMAGE_NUMBER | 0x300C0007
TAG_START_CUMULATIVE_METERSET_WEIGHT | 0x300C0008
TAG_END_CUMULATIVE_METERSET_WEIGHT | 0x300C0009
TAG_REFERENCED_BRACHY_APPLICATION_SETUP_SEQUENCE | 0x300C000A
TAG_REFERENCED_BRACHY_APPLICATION_SETUP_NUMBER | 0x300C000C
TAG_REFERENCED_SOURCE_NUMBER | 0x300C000E
TAG_REFERENCED_FRACTION_GROUP_SEQUENCE | 0x300C0020
TAG_REFERENCED_FRACTION_GROUP_NUMBER | 0x300C0022
TAG_REFERENCED_VERIFICATION_IMAGE_SEQUENCE | 0x300C0040
TAG_REFERENCED_REFERENCE_IMAGE_SEQUENCE | 0x300C0042
TAG_REFERENCED_DOSE_REFERENCE_SEQUENCE | 0x300C0050
TAG_REFERENCED_DOSE_REFERENCE_NUMBER | 0x300C0051
TAG_BRACHY_REFERENCED_DOSE_REFERENCE_SEQUENCE | 0x300C0055
TAG_REFERENCED_STRUCTURE_SET_SEQUENCE | 0x300C0060
TAG_REFERENCED_PATIENT_SETUP_NUMBER | 0x300C006A
TAG_REFERENCED_DOSE_SEQUENCE | 0x300C0080
TAG_REFERENCED_TOLERANCE_TABLE_NUMBER | 0x300C00A0
TAG_REFERENCED_BOLUS_SEQUENCE | 0x300C00B0
TAG_REFERENCED_WEDGE_NUMBER | 0x300C00C0
TAG_REFERENCED_COMPENSATOR_NUMBER | 0x300C00D0
TAG_REFERENCED_BLOCK_NUMBER | 0x300C00E0
TAG_REFERENCED_CONTROL_POINT_INDEX | 0x300C00F0
TAG_APPROVAL_STATUS | 0x300E0002
TAG_REVIEW_DATE | 0x300E0004
TAG_REVIEW_TIME | 0x300E0005
TAG_REVIEWER_NAME | 0x300E0008
TAG_RESULTS_ID | 0x40080040
TAG_RESULTS_ID_ISSUER | 0x40080042
TAG_REFERENCED_INTERPRETATION_SEQUENCE | 0x40080050
TAG_INTERPRETATION_RECORDED_DATE | 0x40080100
TAG_INTERPRETATION_RECORDED_TIME | 0x40080101
TAG_INTERPRETATION_RECORDER | 0x40080102
TAG_REFERENCE_TO_RECORDED_SOUND | 0x40080103
TAG_INTERPRETATION_TRANSCRIPTION_DATE | 0x40080108
TAG_INTERPRETATION_TRANSCRIPTION_TIME | 0x40080109
TAG_INTERPRETATION_TRANSCRIBER | 0x4008010A
TAG_INTERPRETATION_TEXT | 0x4008010B
TAG_INTERPRETATION_AUTHOR | 0x4008010C
TAG_INTERPRETATION_APPROVER_SEQUENCE | 0x40080111
TAG_INTERPRETATION_APPROVAL_DATE | 0x40080112
TAG_INTERPRETATION_APPROVAL_TIME | 0x40080113
TAG_PHYSICIAN_APPROVING_INTERPRETATION | 0x40080114
TAG_INTERPRETATION_DIAGNOSIS_DESCRIPTION | 0x40080115
TAG_INTERPRETATION_DIAGNOSIS_CODE_SEQUENCE | 0x40080117
TAG_RESULTS_DISTRIBUTION_LIST_SEQUENCE | 0x40080118
TAG_DISTRIBUTION_NAME | 0x40080119
TAG_DISTRIBUTION_ADDRESS | 0x4008011A
TAG_INTERPRETATION_ID | 0x40080200
TAG_INTERPRETATION_ID_ISSUER | 0x40080202
TAG_INTERPRETATION_TYPE_ID | 0x40080210
TAG_INTERPRETATION_STATUS_ID | 0x40080212
TAG_IMPRESSIONS | 0x40080300
TAG_RESULTS_COMMENTS | 0x40084000
TAG_MAC_PARAMETERS_SEQUENCE | 0x4FFE0001
TAG_CURVE_DIMENSIONS | 0x50000005
TAG_NUMBER_OF_POINTS | 0x50000010
TAG_TYPE_OF_DATA | 0x50000020
TAG_CURVE_DESCRIPTION | 0x50000022
TAG_AXIS_UNITS | 0x50000030
TAG_AXIS_LABELS | 0x50000040
TAG_DATA_VALUE_REPRESENTATION | 0x50000103
TAG_MINIMUM_COORDINATE_VALUE | 0x50000104
TAG_MAXIMUM_COORDINATE_VALUE | 0x50000105
TAG_CURVE_RANGE | 0x50000106
TAG_CURVE_DATA_DESCRIPTOR | 0x50000110
TAG_COORDINATE_START_VALUE | 0x50000112
TAG_COORDINATE_STEP_VALUE | 0x50000114
TAG_AUDIO_TYPE | 0x50002000
TAG_AUDIO_SAMPLE_FORMAT | 0x50002002
TAG_NUMBER_OF_CHANNELS | 0x50002004
TAG_NUMBER_OF_SAMPLES | 0x50002006
TAG_SAMPLE_RATE | 0x50002008
TAG_TOTAL_TIME | 0x5000200A
TAG_AUDIO_SAMPLE_DATA | 0x5000200C
TAG_AUDIO_COMMENTS | 0x5000200E
TAG_CURVE_LABEL | 0x50002500
TAG_REFERENCED_OVERLAY_SEQUENCE_50XX | 0x50002600
TAG_REFERENCED_OVERLAY_GROUP | 0x50002610
TAG_CURVE_DATA | 0x50003000
TAG_OVERLAY_ROWS | 0x60000010
TAG_OVERLAY_COLUMNS | 0x60000011
TAG_OVERLAY_PLANES | 0x60000012
TAG_NUMBER_OF_FRAMES_IN_OVERLAY | 0x60000015
TAG_OVERLAY_DESCRIPTION | 0x60000022
TAG_OVERLAY_TYPE | 0x60000040
TAG_OVERLAY_SUBTYPE | 0x60000045
TAG_OVERLAY_ORIGIN | 0x60000050
TAG_IMAGE_FRAME_ORIGIN | 0x60000051
TAG_OVERLAY_PLANE_ORIGIN | 0x60000052
TAG_OVERLAY_BITS_ALLOCATED | 0x60000100
TAG_OVERLAY_BIT_POSITION | 0x60000102
TAG_OVERLAY_DESCRIPTOR_GRAY_RETIRED | 0x60001100
TAG_OVERLAY_DESCRIPTOR_RED_RETIRED | 0x60001101
TAG_OVERLAY_DESCRIPTOR_GREEN_RETIRED | 0x60001102
TAG_OVERLAY_DESCRIPTOR_BLUE_RETIRED | 0x60001103
TAG_OVERLAYS_GRAY_RETIRED | 0x60001200
TAG_OVERLAYS_RED_RETIRED | 0x60001201
TAG_OVERLAYS_GREEN_RETIRED | 0x60001202
TAG_OVERLAYS_BLUE_RETIRED | 0x60001203
TAG_ROI_AREA | 0x60001301
TAG_ROI_MEAN | 0x60001302
TAG_ROI_STANDARD_DEVIATION | 0x60001303
TAG_OVERLAY_LABEL | 0x60001500
TAG_OVERLAY_DATA | 0x60003000
TAG_PIXEL_DATA | 0x7FE00010
TAG_LEAD_BITMAP | 0x7FE00010
TAG_DIGITAL_SIGNATURES_SEQUENCE | 0xFFFAFFFA
TAG_DATA_SET_TRAILING_PADDING | 0xFFFCFFFC
TAG_ITEM | 0xFFFEE000
TAG_ITEM_DELIMITATION_ITEM | 0xFFFEE00D
TAG_SEQUENCE_DELIMITATION_ITEM | 0xFFFEE0DD


IOD Class Constants

The following constants are used to indicate the Class Information Object Definitions.

Code constant | Code value and meaning
DICOM_CLASS_12_LEAD_ECG | 12-Lead ECG
DICOM_CLASS_AMBULATORY_ECG | Ambulatory ECG
DICOM_CLASS_BASIC_ANNOTATION | Basic Annotation
DICOM_CLASS_BASIC_CARDIAC_EP | Basic Cardiac EP
DICOM_CLASS_BASIC_COLOR_IMAGE_BOX | Basic Color Image Box
DICOM_CLASS_BASIC_COLOR_PRINT_META | Basic Print Meta
DICOM_CLASS_BASIC_DIRECTORY | Basic Directory
DICOM_CLASS_BASIC_FILM_BOX | Basic Film Box
DICOM_CLASS_BASIC_FILM_SESSION | Basic Film Session
DICOM_CLASS_BASIC_GRAYSCALE_IMAGE_BOX | Basic Grayscale Image Box
DICOM_CLASS_BASIC_GRAYSCALE_PRINT_META | Basic Print Meta
DICOM_CLASS_BASIC_IMAGE_BOX | Basic Image Box
DICOM_CLASS_BASIC_PRINT_IMAGE_OVERLAY_BOX | Basic print image overlay box.
DICOM_CLASS_BASIC_STUDY_DESCRIPTOR | Basic Study Descriptor
DICOM_CLASS_BASIC_TEXT_SR | Basic Text Structured Reporting
DICOM_CLASS_BASIC_VOICE_AUDIO | Basic Voice Audio
DICOM_CLASS_CHEST_CAD_SR | Chest CAD SR
DICOM_CLASS_COMPREHENSIVE_SR | Comprehensive Structured Reporting
DICOM_CLASS_CR_IMAGE_STORAGE | Computed Radiography Image
DICOM_CLASS_CT_IMAGE_STORAGE | Computed Tomography Image
DICOM_CLASS_DX_IMAGE_STORAGE_PRESENTATION | Digital X-ray image presentation.
DICOM_CLASS_DX_IMAGE_STORAGE_PROCESSING | Digital X-ray image processing.
DICOM_CLASS_DX_INTRAORAL_IMAGE_STORAGE_PRESENTATION | Digital X-ray Intraoral image presentation.
DICOM_CLASS_DX_INTRAORAL_IMAGE_STORAGE_PROCESSING | Digital X-ray Intraoral image processing.
DICOM_CLASS_DX_MAMMOGRAPHY_IMAGE_STORAGE_PRESENTATION | Digital X-ray Mammography image presentation.
DICOM_CLASS_DX_MAMMOGRAPHY_IMAGE_STORAGE_PROCESSING | Digital X-ray Mammography image processing.
DICOM_CLASS_ENHANCED_MR_IMAGE_STORAGE | Enhanced MR Image Storage
DICOM_CLASS_ENHANCED_SR | Enhanced Structured Reporting
DICOM_CLASS_GENERAL_ECG | General ECG
DICOM_CLASS_GENERAL_PURPOSE_PERFORMED_PROCEDURE_STEP | General Purpose Performed Procedure Step
DICOM_CLASS_GENERAL_PURPOSE_SCHEDULED_PROCEDURE_STEP | General Purpose Scheduled Procedure Step
DICOM_CLASS_GENERAL_PURPOSE_WORKLIST | General Purpose Worklist
DICOM_CLASS_GENERAL_PURPOSE_WORKLIST_MANAGEMENT_META | General Purpose Worklist Management Meta
DICOM_CLASS_GRAYSCALE_SOFTCOPY_PRESENTATION_STATE | Grayscale Softcopy Presentation State
DICOM_CLASS_HC_COLOR_IMAGE_STORAGE | Hardcopy Color Image
DICOM_CLASS_HC_GRAYSCALE_IMAGE_STORAGE | Hardcopy Grayscale Image
DICOM_CLASS_HEMODYNAMIC | Hemodynamic
DICOM_CLASS_IMAGE_OVERLAY_BOX_RETIRED | Image Overlay Box (Retired)
DICOM_CLASS_INTERPRETATION | Interpretation
DICOM_CLASS_KEY_OBJECT_SELECTION_DOCUMENT | Key Object Selection Document
DICOM_CLASS_MAMMOGRAPHY_CAD_SR | Mammography CAD SR
DICOM_CLASS_MAX | Maximum number of classes.
DICOM_CLASS_MODALITY_PERFORMED_PROCEDURE_STEP | Modality Performed Procedure Step
DICOM_CLASS_MODALITY_WORKLIST | Modality Worklist
DICOM_CLASS_MR_IMAGE_STORAGE | Magnetic Resonance Image
DICOM_CLASS_MR_SPECTROSCOPY_STORAGE | MR Spectroscopy Storage
DICOM_CLASS_NM_IMAGE_STORAGE | Nuclear Medicine Image
DICOM_CLASS_NM_IMAGE_STORAGE_RETIRED | Nuclear Medicine Image (Retired)
DICOM_CLASS_OPHTHALMIC_8_BIT_PHOTOGRAPHY_IMAGE_STORAGE | Ophthalmic Photography 8 Bit Image Storage
DICOM_CLASS_OPHTHALMIC_16_BIT_PHOTOGRAPHY_IMAGE_STORAGE | Ophthalmic Photography 16 Bit Image Storage
DICOM_CLASS_PATIENT | Patient
DICOM_CLASS_PATIENT_META | Patient Meta
DICOM_CLASS_PATIENT_ROOT_QUERY_IMAGE | Patient root query image.
DICOM_CLASS_PATIENT_ROOT_QUERY_PATIENT | Patient root query patient.
DICOM_CLASS_PATIENT_ROOT_QUERY_SERIES | Patient root query series.
DICOM_CLASS_PATIENT_ROOT_QUERY_STUDY | Patient root query study.
DICOM_CLASS_PATIENT_STUDY_QUERY_PATIENT | Patient study query patient.
DICOM_CLASS_PATIENT_STUDY_QUERY_STUDY | Patient study query study.
DICOM_CLASS_PET_IMAGE_STORAGE | Positron Emission Tomography Image
DICOM_CLASS_PRESENTATION_LUT | Presentation LUT
DICOM_CLASS_PRINT_JOB | Print Job
DICOM_CLASS_PRINT_QUEUE | Print Queue
DICOM_CLASS_PRINTER | Printer
DICOM_CLASS_PRINTER_CONFIGURATION | Printer configuration.
DICOM_CLASS_PULL_PRINT_REQUEST | Pull Print Request
DICOM_CLASS_PULL_STORED_PRINT_META | Pull Stored Print Meta
DICOM_CLASS_RAW_DATA_STORAGE | Raw Data Storage
DICOM_CLASS_REFERENCED_COLOR_PRINT_META_RETIRED | Referenced Print Meta (Retired)
DICOM_CLASS_REFERENCED_GRAYSCALE_PRINT_META_RETIRED | Referenced Print Meta (Retired)
DICOM_CLASS_RESULTS | Results
DICOM_CLASS_RESULTS_META | Results Meta
DICOM_CLASS_RT_BEAMS_TREATMENT_RECORD_STORAGE | Radiotherapy Beams Treatment Record.
DICOM_CLASS_RT_BRACHY_TREATMENT_RECORD_STORAGE | Radiotherapy Brachy Treatment Record.
DICOM_CLASS_RT_DOSE_STORAGE | Radiotherapy Dose
DICOM_CLASS_RT_IMAGE_STORAGE | Radiotherapy Image
DICOM_CLASS_RT_PLAN_STORAGE | Radiotherapy Plan
DICOM_CLASS_RT_STRUCTURE_SET_STORAGE | Radiotherapy Structure Set
DICOM_CLASS_RT_TREATMENT_SUMMARY_RECORD_STORAGE | Radiotherapy Treatment Summary Record.
DICOM_CLASS_SC_IMAGE_STORAGE | Secondary Capture Image
DICOM_CLASS_SC_MULTI_FRAME_GRAYSCALE_BYTE_IMAGE_STORAGE | Secondary Capture Multi-frame Grayscale Byte Image Storage
DICOM_CLASS_SC_MULTI_FRAME_GRAYSCALE_WORD_IMAGE_STORAGE | Secondary Capture Multi-frame Grayscale Word Image Storage
DICOM_CLASS_SC_MULTI_FRAME_SINGLE_BIT_IMAGE_STORAGE | Secondary Capture Multi-frame Single Bit Image Storage
DICOM_CLASS_SC_MULTI_FRAME_TRUE_COLOR_IMAGE_STORAGE | Secondary Capture Multi-Frame True Color Image Storage
DICOM_CLASS_STANDALONE_CURVE_STORAGE | Standalone Curve
DICOM_CLASS_STANDALONE_MODALITY_LUT_STORAGE | Standalone Modality LUT
DICOM_CLASS_STANDALONE_OVERLAY_STORAGE | Standalone Overlay
DICOM_CLASS_STANDALONE_PET_CURVE_STORAGE | Standalone Positron Emission Tomography Curve
DICOM_CLASS_STANDALONE_VOI_LUT_STORAGE | Standalone VOI LUT
DICOM_CLASS_STEREOMETRIC_RELATIONSHIP_STORAGE | Stereometric Relationship Storage
DICOM_CLASS_STORAGE_COMMITMENT_PULL_MODEL | Storage Commitment
DICOM_CLASS_STORAGE_COMMITMENT_PUSH_MODEL | Storage Commitment
DICOM_CLASS_STORED_PRINT_STORAGE | Stored Print
DICOM_CLASS_STUDY | Study
DICOM_CLASS_STUDY_COMPONENT | Study Component
DICOM_CLASS_STUDY_META | Study Meta
DICOM_CLASS_STUDY_ROOT_QUERY_IMAGE | Study root query image.
DICOM_CLASS_STUDY_ROOT_QUERY_SERIES | Study root query series.
DICOM_CLASS_STUDY_ROOT_QUERY_STUDY | Study root query study.
DICOM_CLASS_UNKNOWN | Unknown
DICOM_CLASS_US_IMAGE_STORAGE | Ultrasound Image
DICOM_CLASS_US_IMAGE_STORAGE_RETIRED | Ultrasound Image (Retired)
DICOM_CLASS_US_MULTI_FRAME_IMAGE_STORAGE | Ultrasound Multi-frame Image
DICOM_CLASS_US_MULTI_FRAME_IMAGE_STORAGE_RETIRED | Ultrasound Multi-frame Image (Retired)
DICOM_CLASS_VISIT | Visit
DICOM_CLASS_VL_ENDOSCOPIC_IMAGE_STORAGE | Visible Light Endoscopic image.
DICOM_CLASS_VL_MICROSCOPIC_IMAGE_STORAGE | Visible Light Microscopic image.
DICOM_CLASS_VL_PHOTOGRAPHIC_IMAGE_STORAGE | Visible Light Photographic image.
DICOM_CLASS_VL_SLIDE_COORDINATES_MICROSCOPIC_IMAGE_STORAGE | Visible Light slide coordinates for a Microscopic image.
DICOM_CLASS_VOI_LUT_BOX_RETIRED | VOI LUT Box (Retired)
DICOM_CLASS_XA_BIPLANE_IMAGE_STORAGE_RETIRED | X-Ray Angiographic Bi-Plane Image (Retired)
DICOM_CLASS_XA_IMAGE_STORAGE | X-Ray Angiographic Image
DICOM_CLASS_XRF_IMAGE_STORAGE | X-Ray Radiofluoroscopic Image


IOD Module Constants

The following constants are used to indicate the Module Information Object Definitions.

Code constant | Code value and meaning
DICOM_MODULE_ACQUISITION_CONTEXT | Acquisition Context Module
DICOM_MODULE_ANNOTATION_LIST | Annotation List module
DICOM_MODULE_APPROVAL | Approval module
DICOM_MODULE_AUDIO | Audio module
DICOM_MODULE_BASIC_ANNOTATION_PRESENTATION | Basic Annotation Presentation module
DICOM_MODULE_BASIC_FILM_BOX_KEY | Basic Film Box Key
DICOM_MODULE_BASIC_FILM_BOX_PRESENTATION | Basic Film Box Presentation module
DICOM_MODULE_BASIC_FILM_BOX_RELATIONSHIP | Basic Film Box Relationship module
DICOM_MODULE_BASIC_FILM_SESSION_PRESENTATION | Basic Film Session Presentation module
DICOM_MODULE_BASIC_FILM_SESSION_RELATIONSHIP | Basic Film Session Relationship module
DICOM_MODULE_BASIC_IMAGE_BOX_KEY | Basic Image Box Key
DICOM_MODULE_BASIC_PRINT_IMAGE_OVERLAY_BOX | Basic Print Image Overlay Box Module
DICOM_MODULE_BILLING_AND_MATERIAL_MANAGEMENT_CODES | Billing and Material Management Codes module
DICOM_MODULE_BIPLANE_IMAGE | Biplane Image module
DICOM_MODULE_BIPLANE_OVERLAY | Biplane Overlay module
DICOM_MODULE_BIPLANE_SEQUENCE | Biplane Sequence module
DICOM_MODULE_BITMAP_DISPLAY_SHUTTER | Bitmap display shutter
DICOM_MODULE_BULK_MOTION_SYNCHRONIZATION | Bulk Motion Synchronization
DICOM_MODULE_CALCULATED_DOSE_REFERENCE_RECORD | Calculated Dose Reference Record Module
DICOM_MODULE_CARDIAC_SYNCHRONIZATION | Cardiac Synchronization
DICOM_MODULE_CINE | Cine module
DICOM_MODULE_CLINICAL_TRIAL_SERIES | Clinical Trial Series
DICOM_MODULE_CLINICAL_TRIAL_STUDY | Clinical Trial Study
DICOM_MODULE_CLINICAL_TRIAL_SUBJECT | Clinical Trial Subject
DICOM_MODULE_COMMON_INSTANCE_REFERENCE | Common Instance Reference
DICOM_MODULE_CONTRAST_BOLUS | Contrast Bolus module
DICOM_MODULE_CR_IMAGE | Computed Radiography Image module
DICOM_MODULE_CR_SERIES | Computed Radiography Series module
DICOM_MODULE_CT_IMAGE | Computed Tomography Image module
DICOM_MODULE_CURVE | Curve module
DICOM_MODULE_CURVE_IDENTIFICATION | Curve Identification module
DICOM_MODULE_CURVE_KEY | Curve Key
DICOM_MODULE_DEVICE | Device module
DICOM_MODULE_DIRECTORY_INFORMATION | Directory information
DICOM_MODULE_DISPLAY_SHUTTER | Display Shutter module
DICOM_MODULE_DISPLAYED_AREA | Displayed area
DICOM_MODULE_DX_ANATOMY_IMAGED | Digital X-ray anatomy imaged Module
DICOM_MODULE_DX_DETECTOR | Digital X-ray Detector Module
DICOM_MODULE_DX_IMAGE | Digital X-ray image Module
DICOM_MODULE_DX_POSITIONING | Digital X-ray Positioning Module
DICOM_MODULE_DX_SERIES | Digital X-ray series Module
DICOM_MODULE_ENHANCED_CONTRAST_BOLUS | Enhanced Contrast/Bolus
DICOM_MODULE_ENHANCED_MR_IMAGE | Enhanced MR Image
DICOM_MODULE_FILESET_IDENTIFICATION | Fileset identification
DICOM_MODULE_FILM_BOX | Film Box module
DICOM_MODULE_FILM_SESSION_KEY | Film Session Key
DICOM_MODULE_FRAME_OF_REFERENCE | Frame of Reference module
DICOM_MODULE_FRAME_POINTERS | Frame Pointers module
DICOM_MODULE_GENERAL_EQUIPMENT | General Equipment module
DICOM_MODULE_GENERAL_IMAGE | General Image module
DICOM_MODULE_GENERAL_PURPOSE_PERFORMED_PROCEDURE_STEP_INFORMATION | General Purpose Performed Procedure Step Information
DICOM_MODULE_GENERAL_PURPOSE_PERFORMED_PROCEDURE_STEP_RELATIONSHIP | General Purpose Performed Procedure Step Relationship
DICOM_MODULE_GENERAL_PURPOSE_RESULTS | General Purpose Results
DICOM_MODULE_GENERAL_PURPOSE_SCHEDULED_PROCEDURE_STEP_INFORMATION | General Purpose Scheduled Procedure Step Information
DICOM_MODULE_GENERAL_PURPOSE_SCHEDULED_PROCEDURE_STEP_RELATIONSHIP | General Purpose Scheduled Procedure Step Relationship
DICOM_MODULE_GENERAL_QUEUE | General Queue module
DICOM_MODULE_GENERAL_SERIES | General Series module
DICOM_MODULE_GENERAL_STUDY | General Study module
DICOM_MODULE_GRAPHIC_ANNOTATION | Graphic annotation
DICOM_MODULE_GRAPHIC_LAYER | Graphic layer
DICOM_MODULE_HC_COLOR_IMAGE | Hard Copy Color Image module
DICOM_MODULE_HC_EQUIPMENT | Hard Copy Equipment module
DICOM_MODULE_HC_GRAYSCALE_IMAGE | Hard Copy Grayscale Image module
DICOM_MODULE_IMAGE_ACQUISITION_RESULTS | Image Acquisition Results module
DICOM_MODULE_IMAGE_BOX_LIST | Image Box List module
DICOM_MODULE_IMAGE_BOX_PRESENTATION | Image Box Presentation module
DICOM_MODULE_IMAGE_BOX_RELATIONSHIP | Image Box Relationship module
DICOM_MODULE_IMAGE_HISTOGRAM | Image Histogram Module
DICOM_MODULE_IMAGE_KEY | Image Key
DICOM_MODULE_IMAGE_OVERLAY_BOX_LIST | Image Overlay Box List module
DICOM_MODULE_IMAGE_OVERLAY_BOX_PRESENTATION | Image Overlay Box Presentation module
DICOM_MODULE_IMAGE_OVERLAY_BOX_RELATIONSHIP | Image Overlay Box Relationship module
DICOM_MODULE_IMAGE_PIXEL | Image Pixel module
DICOM_MODULE_IMAGE_PLANE | Image Plane module
DICOM_MODULE_INTERPRETATION_APPROVAL | Interpretation Approval module
DICOM_MODULE_INTERPRETATION_IDENTIFICATION | Interpretation Identification module
DICOM_MODULE_INTERPRETATION_KEY | Interpretation Key
DICOM_MODULE_INTERPRETATION_RECORDING | Interpretation Recording module
DICOM_MODULE_INTERPRETATION_RELATIONSHIP | Interpretation Relationship module
DICOM_MODULE_INTERPRETATION_STATE | Interpretation State module
DICOM_MODULE_INTERPRETATION_TRANSCRIPTION | Interpretation Transcription module
DICOM_MODULE_INTRAORAL_IMAGE | Intra-oral Image Module
DICOM_MODULE_INTRAORAL_SERIES | Intra-oral Series Module
DICOM_MODULE_KEY_OBJECT_DOCUMENT | Key Object Document
DICOM_MODULE_KEY_OBJECT_DOCUMENT_KEY | Key Object Doc
DICOM_MODULE_KEY_OBJECT_DOCUMENT_SERIES | Key Object Document Series
DICOM_MODULE_LUT_IDENTIFICATION | LUT Identification module
DICOM_MODULE_MAMMOGRAPHY_IMAGE | Mammography Image Module
DICOM_MODULE_MAMMOGRAPHY_SERIES | Mammography Series Module
DICOM_MODULE_MASK | Mask module
DICOM_MODULE_MAX | Maximum number of modules
DICOM_MODULE_MEASURED_DOSE_REFERENCE_RECORD | Measured Dose Reference Record Module
DICOM_MODULE_MODALITY_LUT | Modality LUT module
DICOM_MODULE_MODALITY_LUT_KEY | Modality LUT Key
DICOM_MODULE_MR_IMAGE | Magnetic Resonance Image module
DICOM_MODULE_MR_PULSE_SEQUENCE | MR Pulse Sequence
DICOM_MODULE_MR_SPECTROSCOPY | MR Spectroscopy
DICOM_MODULE_MR_SPECTROSCOPY_DATA | MR Spectroscopy Data
DICOM_MODULE_MR_SPECTROSCOPY_PULSE_SEQUENCE | MR Spectroscopy Pulse Sequence
DICOM_MODULE_MULTI_FRAME | Multi-Frame module
DICOM_MODULE_MULTI_FRAME_DIMENSION | Multi-frame Dimension
DICOM_MODULE_MULTI_FRAME_FUNCTIONAL_GROUPS | Multi-frame Functional Groups
DICOM_MODULE_MULTI_FRAME_OVERLAY | Multi-Frame Overlay module
DICOM_MODULE_MULTIREFERENCED_FILE_KEY | Multi-referenced File Key
DICOM_MODULE_NM_DETECTOR | Nuclear Medicine Detector module
DICOM_MODULE_NM_EQUIPMENT_RETIRED | Nuclear Medicine Equipment (Retired)
DICOM_MODULE_NM_IMAGE | Nuclear Medicine Image module
DICOM_MODULE_NM_IMAGE_PIXEL | Nuclear Medicine Image Pixel module
DICOM_MODULE_NM_IMAGE_RETIRED | Nuclear Medicine Image (Retired)
DICOM_MODULE_NM_ISOTOPE | Nuclear Medicine Isotope module
DICOM_MODULE_NM_MULTI_FRAME | Nuclear Medicine Multi-Frame module
DICOM_MODULE_NM_MULTI_GATED_ACQUISITION | Nuclear Medicine Multi-Gated Acquisition module
DICOM_MODULE_NM_MULTI_GATED_ACQUISITION_IMAGE_RETIRED | Nuclear Medicine Multi-Gated Acquisition Image (Retired)
DICOM_MODULE_NM_PET_PATIENT_ORIENTATION | Nuclear Medicine Positron Emission Tomography Patient Orientation module
DICOM_MODULE_NM_PHASE | Nuclear Medicine Phase module
DICOM_MODULE_NM_RECONSTRUCTION | Nuclear Medicine Reconstruction module
DICOM_MODULE_NM_SERIES_RETIRED | Nuclear Medicine Series (Retired)
DICOM_MODULE_NM_SPECT_ACQUISITION_IMAGE_RETIRED | Nuclear Medicine Spect Acquisition Image (Retired)
DICOM_MODULE_NM_TOMO_ACQUISITION | Nuclear Medicine Tomography Acquisition module
DICOM_MODULE_OCULAR_REGION_IMAGED | Ocular Region Imaged
DICOM_MODULE_OPHTHALMIC_PHOTOGRAPHY_SERIES | Ophthalmic Photography Series
DICOM_MODULE_OPHTHALMIC_PHOTOGRAPHY_IMAGE | Ophthalmic Photography Image
DICOM_MODULE_OPHTHALMIC_PHOTOGRAPHIC_PARAMETERS | Ophthalmic Photographic Parameters
DICOM_MODULE_OPHTHALMIC_PHOTOGRAPHY_ACQUISITION_PARAMETERS | Ophthalmic Photography Acquisition Parameters
DICOM_MODULE_OVERLAY_CURVE_ACTIVATION | Overlay curve activation
DICOM_MODULE_OVERLAY_IDENTIFICATION | Overlay Identification module
DICOM_MODULE_OVERLAY_KEY | Overlay Key
DICOM_MODULE_OVERLAY_PLANE | Overlay Plane module
DICOM_MODULE_PALETTE_COLOR_LOOCKUP_TABLE | Palette Color LookUp Table module
DICOM_MODULE_PATIENT | Patient module
DICOM_MODULE_PATIENT_DEMOGRAPHIC | Patient Demographic module
DICOM_MODULE_PATIENT_IDENTIFICATION | Patient Identification module
DICOM_MODULE_PATIENT_KEY | Patient Key
DICOM_MODULE_PATIENT_MEDICAL | Patient Medical module
DICOM_MODULE_PATIENT_RELATIONSHIP | Patient Relationship module
DICOM_MODULE_PATIENT_STUDY | Patient Study module
DICOM_MODULE_PATIENT_SUMMARY | Patient Summary module
DICOM_MODULE_PERFORMED_PROCEDURE_STEP_INFORMATION | Performed Procedure Step Information module
DICOM_MODULE_PERFORMED_PROCEDURE_STEP_RELATIONSHIP | Performed Procedure Step Relationship module
DICOM_MODULE_PET_CURVE | Positron Emission Tomography Curve module
DICOM_MODULE_PET_IMAGE | Positron Emission Tomography Image module
DICOM_MODULE_PET_ISOTOPE | Positron Emission Tomography Isotope module
DICOM_MODULE_PET_MULTIGATED_ACQUISITION | Positron Emission Tomography Multi-gated Acquisition module
DICOM_MODULE_PET_SERIES | Positron Emission Tomography Series module
DICOM_MODULE_PRESENTATION_LUT | Presentation LUT module
DICOM_MODULE_PRESENTATION_LUT_LIST | Presentation LUT List module
DICOM_MODULE_PRESENTATION_SERIES | Presentation Series
DICOM_MODULE_PRESENTATION_STATE | Presentation state
DICOM_MODULE_PRINT_JOB | Print Job module
DICOM_MODULE_PRINT_QUEUE | Print Queue module
DICOM_MODULE_PRINT_QUEUE_KEY | Print Queue Key
DICOM_MODULE_PRINT_REQUEST | Print Request module
DICOM_MODULE_PRINTER | Printer module
DICOM_MODULE_PRINTER_CHARACTERISTICS | Printer Characteristics module
DICOM_MODULE_PRINTER_CONFIGURATION | Printer Configuration Module
DICOM_MODULE_PRIVATE_KEY | Private Key
DICOM_MODULE_RADIATION_DOSE | Radiation Dose module
DICOM_MODULE_RAW_DATA | Raw Data
DICOM_MODULE_RECORD_SELECTION_KEY | Record Selection Key
DICOM_MODULE_RESPIRATORY_SYNCHRONIZATION | Respiratory Synchronization
DICOM_MODULE_RESULT_KEY | Result Key
DICOM_MODULE_RESULTS_IDENTIFICATION | Results Identification module
DICOM_MODULE_RESULTS_IMPRESSIONS | Results Impressions module
DICOM_MODULE_RESULTS_RELATIONSHIP | Results Relationship module
DICOM_MODULE_ROI_CONTOUR | Region Of Interest Contour module
DICOM_MODULE_RT_BEAMS | Radiotherapy Beams module
DICOM_MODULE_RT_BEAMS_SESSION_RECORD | Radiotherapy Beams Session Record Module
DICOM_MODULE_RT_BRACHY_APPLICATION_SETUPS | Radiotherapy Brachy Application Setups module
DICOM_MODULE_RT_BRACHY_SESSION_RECORD | Radiotherapy Brachy Session Record Module
DICOM_MODULE_RT_DOSE | Radiotherapy Dose module
DICOM_MODULE_RT_DOSE_KEY | Radiotherapy Dose Key
DICOM_MODULE_RT_DOSE_ROI | Radiotherapy Dose Region Of Interest module.
DICOM_MODULE_RT_DVH | Radiotherapy Dose Volume Histograms module
DICOM_MODULE_RT_FRACTION_SCHEME | Radiotherapy Fraction Scheme module
DICOM_MODULE_RT_GENERAL_PLAN | Radiotherapy General Plan module
DICOM_MODULE_RT_GENERAL_TREATMENT_RECORD | Radiotherapy General Treatment Record Module
DICOM_MODULE_RT_IMAGE | Radiotherapy Image module
DICOM_MODULE_RT_OBSERVATIONS | Radiotherapy Observations module
DICOM_MODULE_RT_PATIENT_SETUP | Radiotherapy Patient Setup module
DICOM_MODULE_RT_PLAN_KEY | Radiotherapy Plan Key
DICOM_MODULE_RT_PRESCRIPTION | Radiotherapy Prescription module
DICOM_MODULE_RT_SERIES | Radiotherapy Series module
DICOM_MODULE_RT_STRUCTURE_SET_KEY | Radiotherapy Structure Set Key
DICOM_MODULE_RT_TOLERANCE_TABLES | Radiotherapy Tolerance Tables module
DICOM_MODULE_RT_TREATMENT_MACHINE_RECORD | Radiotherapy Treatment Machine Record Module
DICOM_MODULE_RT_TREATMENT_RECORD_KEY | Radiotherapy Treatment Record Key
DICOM_MODULE_RT_TREATMENT_SUMMARY_RECORD | Radiotherapy Treatment Summary Record Module
DICOM_MODULE_SC_EQUIPMENT | Secondary Capture Equipment module
DICOM_MODULE_SC_IMAGE | Secondary Capture Image module
DICOM_MODULE_SC_MULTI_FRAME_IMAGE | SC Multi-frame Image
DICOM_MODULE_SC_MULTI_FRAME_VECTOR | SC Multi-frame Vector
DICOM_MODULE_SERIES_KEY | Series Key
DICOM_MODULE_SLIDE_COORDINATES | Slide Coordinates Module
DICOM_MODULE_SOFTCOPY_PRESENTATION_LUT | Softcopy presentation LUT
DICOM_MODULE_SOFTCOPY_VOI_LUT | Softcopy VOI LUT
DICOM_MODULE_SOP_COMMON | SOP Common module
DICOM_MODULE_SPATIAL_TRANSFORMATION | Spatial transformation
DICOM_MODULE_SPECIMEN_IDENTIFICATION | Specimen identification Module
DICOM_MODULE_SR_DOCUMENT_CONTENT | Structured Reporting Document Content
DICOM_MODULE_SR_DOCUMENT_GENERAL | Structured Reporting Document General
DICOM_MODULE_SR_DOCUMENT_KEY | Structured Reporting Document Content
DICOM_MODULE_SR_DOCUMENT_SERIES | Structured Reporting Document Series
DICOM_MODULE_STEREOMETRIC_SERIES | Stereometric Series
DICOM_MODULE_STEREOMETRIC_RELATIONSHIP | Stereometric Relationship
DICOM_MODULE_STORAGE_COMMITMENT | Storage Commitment module
DICOM_MODULE_STORED_PRINT_KEY | Stored Print Key
DICOM_MODULE_STRUCTURE_SET | Structure Set module
DICOM_MODULE_STUDY_ACQUISITION | Study Acquisition module
DICOM_MODULE_STUDY_CLASSIFICATION | Study Classification module
DICOM_MODULE_STUDY_COMPONENT | Study Component module
DICOM_MODULE_STUDY_COMPONENT_ACQUISITION | Study Component Acquisition module
DICOM_MODULE_STUDY_COMPONENT_KEY | Study Component Key
DICOM_MODULE_STUDY_COMPONENT_RELATIONSHIP | Study Component Relationship module
DICOM_MODULE_STUDY_CONTENT | Study Content module
DICOM_MODULE_STUDY_IDENTIFICATION | Study Identification module
DICOM_MODULE_STUDY_KEY | Study Key
DICOM_MODULE_STUDY_READ | Study Read module
DICOM_MODULE_STUDY_RELATIONSHIP | Study Relationship module
DICOM_MODULE_STUDY_SCHEDULING | Study Scheduling module
DICOM_MODULE_SUPPLEMENTAL_PALETTE_COLOR_LOOKUP_TABLE | Supplemental Palette Color Lookup Table
DICOM_MODULE_SYNCHRONIZATION | Synchronization
DICOM_MODULE_THERAPY | Therapy module
DICOM_MODULE_TOPIC_KEY | Topic Key
DICOM_MODULE_US_FRAME_OF_REFERENCE | Ultrasound Frame of Reference module
DICOM_MODULE_US_FRAME_OF_REFERENCE_RETIRED | Ultrasound Frame of Reference (Retired)
DICOM_MODULE_US_IMAGE | Ultrasound Image module
DICOM_MODULE_US_IMAGE_RETIRED | Ultrasound Image (Retired)
DICOM_MODULE_US_REGION_CALIBRATION | Ultrasound Region Calibration module
DICOM_MODULE_US_REGION_CALIBRATION_RETIRED | Ultrasound Region of Calibration (Retired)
DICOM_MODULE_VISIT_ADMISSION | Visit Admission module
DICOM_MODULE_VISIT_DISCHARGE | Visit Discharge module
DICOM_MODULE_VISIT_IDENTIFICATION | Visit Identification module
DICOM_MODULE_VISIT_KEY | Visit Key
DICOM_MODULE_VISIT_RELATIONSHIP | Visit Relationship module
DICOM_MODULE_VISIT_SCHEDULING | Visit Scheduling module
DICOM_MODULE_VISIT_STAY | Visit Stay module
DICOM_MODULE_VL_IMAGE | Visible Light Image Module
DICOM_MODULE_VOI_LUT | VOI LUT module
DICOM_MODULE_VOI_LUT_KEY | VOI LUT Key
DICOM_MODULE_WAVEFORM | Waveform
DICOM_MODULE_WAVEFORM_ANNOTATION | Waveform annotation
DICOM_MODULE_WAVEFORM_IDENTIFICATION | Waveform identification
DICOM_MODULE_XA_ACQUISITION | X-Ray Angiographic Acquisition module
DICOM_MODULE_XA_ACQUISITION_DOSE | X-Ray Angiographic Acquisition Dose Module
DICOM_MODULE_XA_COLLIMATOR | X-Ray Angiographic Collimator module
DICOM_MODULE_XA_FILTRATION | X-Ray Angiographic Filtration Module
DICOM_MODULE_XA_GENERATION | X-Ray Angiographic Generation Module
DICOM_MODULE_XA_GRID | X-Ray Angiographic Grid Module
DICOM_MODULE_XA_IMAGE | X-Ray Angiographic Image module
DICOM_MODULE_XA_POSITIONER | X-Ray Angiographic Positioner module
DICOM_MODULE_XA_TABLE | X-Ray Angiographic Table module
DICOM_MODULE_XRF_POSITIONER | X-Ray Radiofluoroscopic Positioner module
DICOM_MODULE_XRF_TOMO_ACQUISITION | X-Ray Radiofluoroscopic Tomography Acquisition module


IOD Usage Constants

The following constants are used to indicate the usage of Information Object Definitions.

Code constant | Code value and meaning
DICOM_IOD_USAGE_M | [0x00] Mandatory IOD
DICOM_IOD_USAGE_C | [0x01] Conditional IOD
DICOM_IOD_USAGE_U | [0x02] Optional IOD
DICOM_IOD_USAGE_1 | [0x03] Mandatory IOD - type 1
DICOM_IOD_USAGE_1C | [0x04] Conditional IOD - type 1
DICOM_IOD_USAGE_2 | [0x05] Mandatory IOD - type 2
DICOM_IOD_USAGE_2C | [0x06] Conditional IOD - type 2
DICOM_IOD_USAGE_3 | [0x07] Optional IOD - type 3


Value Representation Constants

The following constants are used to indicate the Value Representation.

Value | Meaning
VR_AE | [0x4145U] Application Entity
VR_AS | [0x4153U] Age String
VR_AT | [0x4154U] Attribute Tag
VR_CS | [0x4353U] Code String
VR_DA | [0x4441U] Date
VR_DS | [0x4453U] Decimal String
VR_DT | [0x4454U] Date Time
VR_FD | [0x4644U] Floating Point Double
VR_FL | [0x464CU] Floating Point Single
VR_IS | [0x4953U] Integer String
VR_LO | [0x4C4FU] Long String
VR_LT | [0x4C54U] Long Text
VR_OB | [0x4F42U] Other Byte String
VR_OF | [0x4F46U] Other Float String
VR_OW | [0x4F57U] Other Word String
VR_PN | [0x504EU] Person Name
VR_SH | [0x5348U] Short String
VR_SL | [0x534CU] Signed Long
VR_SQ | [0x5351U] Sequence of Items
VR_SS | [0x5353U] Signed Short
VR_ST | [0x5354U] Short Text
VR_TM | [0x544DU] Time
VR_UI | [0x5549U] Unique Identifier
VR_UL | [0x554CU] Unsigned Long
VR_UN | [0x554EU] Unknown
VR_US | [0x5553U] Unsigned Short
VR_UT | [0x5554U] Unlimited Text


Error Codes

The following table contains the DICOM error codes. Test for errors with an On Error statement.

For a list of the other LEADTOOLS errors, refer to Error Codes in the Main COM help file in the HELP directory.

0 | DICOM_SUCCESS
20001 | DICOM_ERROR_LOCKED - Dicom support is locked. You must unlock the Medical Support.
20002 | DICOM_ERROR_MEMORY - Insufficient memory.
20003 | DICOM_ERROR_OPEN - Error opening the file.
20004 | DICOM_ERROR_READ - Error reading the file.
20005 | DICOM_ERROR_WRITE - Error writing to a file.
20006 | DICOM_ERROR_SEEK - Error during search.
20007 | DICOM_ERROR_END - Error - end of file.
20008 | DICOM_ERROR_FORMAT - Improper file format.
20009 | DICOM_ERROR_PARAMETER - Incorrect parameter.
20010 | DICOM_ERROR_IMAGE - Improper image.
20011 | DICOM_ERROR_COMPRESSION - Improper compression.
20012 | DICOM_ERROR_PHOTOMETRIC - Improper photometric type.
20013 | DICOM_ERROR_CONVERSION - Error converting the file.
20014 | DICOM_ERROR_RANGE - Out of range.
20015 | DICOM_ERROR_BITSPERPIXEL - Improper bits per pixel.
20016 | DICOM_ERROR_QFACTOR - Improper quality factor.
20017 | DICOM_ERROR_PDU_TYPE - Improper PDU type.
20018 | DICOM_ERROR_PDU_LENGTH - Improper PDU length.
20019 | DICOM_ERROR_PDU_ID - Improper PDU ID.
20029 | DICOM_ERROR_NET_FAILURE - Network failure.
20030 | DICOM_ERROR_NET_ACCESS - The address is a broadcast address
20031 | DICOM_ERROR_NET_ADDRESS_IN_USE - The address is already in use
20032 | DICOM_ERROR_NET_ADDRESS_NOT_AVAILABLE - The address is not available from the local computer
20033 | DICOM_ERROR_NET_ADDRESS_NOT_SUPPORTED - The address family is not supported
20034 | DICOM_ERROR_NET_CONNECTION_ABORTED - The virtual circuit was aborted
20035 | DICOM_ERROR_NET_CONNECTION_REFUSED - The attempt to connect was forcefully rejected
20036 | DICOM_ERROR_NET_CONNECTION_RESET - The virtual circuit was reset by the remote side
20037 | DICOM_ERROR_NET_DESTINATION_REQUIRED - A destination address is required
20038 | DICOM_ERROR_NET_ARGUMENT_INCORRECT - The namelen argument is incorrect
20039 | DICOM_ERROR_NET_IN_PROGRESS - A blocking operation is in progress
20040 | DICOM_ERROR_NET_BLOCKING_CANCELED - The blocking call was canceled
20041 | DICOM_ERROR_NET_INVALID - The socket has not been bound with bind
20042 | DICOM_ERROR_NET_IS_CONNECTED - The socket is already connected
20043 | DICOM_ERROR_NET_NO_MORE_FILE - No more file descriptors are available
20044 | DICOM_ERROR_NET_MESSAGE_SIZE - The datagram is larger than the maximum supported
20045 | DICOM_ERROR_NET_DOWN - The network subsystem has failed
20046 | DICOM_ERROR_NET_RESET - The connection must be reset
20047 | DICOM_ERROR_NET_UN_REACH - The network can't be reached from this host at this time
20048 | DICOM_ERROR_NET_NO_BUFFERS - No buffer space is available
20049 | DICOM_ERROR_NET_NOT_CONNECTED - The socket is not connected
20050 | DICOM_ERROR_NET_NOT_SOCKET - The descriptor is not a socket
20051 | DICOM_ERROR_NET_OPERATION_NOT_SUPPORTED - The type does not support connection-oriented service
20052 | DICOM_ERROR_NET_PROTOCOL_NOT_SUPPORTED - The specified protocol is not supported
20053 | DICOM_ERROR_NET_PROTOCOL_TYPE - The specified protocol is the wrong type
20054 | DICOM_ERROR_NET_SHUTDOWN - The socket has been shut down
20055 | DICOM_ERROR_NET_SOCKET_NOT_SUPPORTED - The type is not supported in this address family
20056 | DICOM_ERROR_NET_TIME_OUT - Attempt to connect timed out without establishing a connection
20057 | DICOM_ERROR_NET_WOULD_BLOCK - The socket is marked as nonblocking and the requested operation would block
20058 | DICOM_ERROR_NET_HOST_NOT_FOUND - Authoritative Answer Host not found
20059 | DICOM_ERROR_NET_NO_DATA - Valid name, no data record of requested type
20060 | DICOM_ERROR_NET_NO_RECOVERY - Nonrecoverable errors
20061 | DICOM_ERROR_NET_NOT_INITIALISED - The system was not initialized
20062 | DICOM_ERROR_NET_SYSTEM_NOT_READY - Not ready for network communication
20063 | DICOM_ERROR_NET_TRY_AGAIN - Non-Authoritative Host not found, or server failed
20064 | DICOM_ERROR_NET_VERSION_NOT_SUPPORTED - The version requested is not provided by this implementation
20065 | DICOM_ERROR_NET_SECURITY_BREACH - There is a cryptographic error.
20066 | DICOM_ERROR_TLS - TLS internal error
20067 | DICOM_ERROR_SECURITY_LOCKED - DICOM Security Features are locked
20068 | DICOM_ERROR_TLS_DLL_NOT_LOADED - TLS and/or CRY DLL not loaded
20069 | DICOM_ERROR_BAD_SECURE_MODE - ISCL operation attempted on TLS object
20070 | DICOM_ERROR_ANN - Annotation error
20071 | DICOM_ERROR_ANN_LOCKED - Annotation support is locked
20072 | DICOM_ERROR_ANN_MISSING - Annotation dll is missing
20073 | DICOM_ERROR_TAG_ALREADY_EXISTS - LEAD private creator element already exists
20074 | DICOM_ERROR_ANN_NO_EXIST - Requested annotation file or page does not exist
20100 | DICOM_ERROR_ISCL_BAD_OPTION - Bad option
20101 | DICOM_ERROR_ISCL_BAD_LENGTH - Bad length
20102 | DICOM_ERROR_ISCL_LOCAL_ICCARD - Error in the local IC card
20103 | DICOM_ERROR_ISCL_REMOTE_ICCARD - Error in the remote IC card
20104 | DICOM_ERROR_ISCL_BAD_MSGID - Bad message ID
20105 | DICOM_ERROR_ISCL_BAD_VERSION - Bad version number
20106 | DICOM_ERROR_ISCL_BAD_MUTUAL_AUTH_METHOD - Bad mutual authentication mode
20107 | DICOM_ERROR_ISCL_BAD_COMMBLOCK_LENGTH - Bad communication block length
20108 | DICOM_ERROR_ISCL_RECEIVED_NAK - Received a 'Not Acknowledged' message
20109 | DICOM_ERROR_ISCL_MSG_TRANSMISSION - Error in the message transmission
20110 | DICOM_ERROR_ISCL_PEER_SMALL_LENGTH - Peer small length
20111 | DICOM_ERROR_ISCL_LOCAL_SMALL_LENGTH - Local small length
20112 | DICOM_ERROR_ISCL_DECRYPT - Decryption error
20113 | DICOM_ERROR_ISCL_BAD_MAC - Bad message authentication code
20114 | DICOM_ERROR_ISCL_RND_NO_FOR_SESSION_KEY_EXPECTED - Round number for session key expected.
20115 | DICOM_ERROR_ISCL_PEER_REFUSE_CLOSE - Peer refused close request
20128 | DICOM_ERROR_TLS_CLOSE_NOTIFY - Error in close notification
20129 | DICOM_ERROR_TLS_UNEXPECTED_MESSAGE - Unexpected message
20130 | DICOM_ERROR_TLS_BAD_RECORD_MAC - Bad record message authentication code
20131 | DICOM_ERROR_TLS_DECRYPT_FAILED - Decryption failed
20132 | DICOM_ERROR_TLS_RECORD_OVERFLOW - Record overflow
20133 | DICOM_ERROR_TLS_DECOMPRESSION_FAILURE - Decompression failed
20134 | DICOM_ERROR_TLS_HANDSHAKE_FAILURE - Handshake failed
20135 | DICOM_ERROR_TLS_BAD_CERTIFICATE - Bad certificate
20136 | DICOM_ERROR_TLS_UNSUPPORTED_CERTIFICATE - Unsupported certificate
20137 | DICOM_ERROR_TLS_CERTIFICATE_REVOKED - Certificate revoked
20138 | DICOM_ERROR_TLS_CERTIFICATE_EXPIRED - Certificate Expired
20139 | DICOM_ERROR_TLS_CERTIFICATE_UNKNOWN - Certificate unknown
20140 | DICOM_ERROR_TLS_ILLEGAL_PARAMETER - Illegal parameter
20141 | DICOM_ERROR_TLS_UNKNOWN_CA - Unknown certificate authenticator
20142 | DICOM_ERROR_TLS_ACCESS_DENIED - Access denied
20143 | DICOM_ERROR_TLS_DECODE_ERROR - Error decoding
20144 | DICOM_ERROR_TLS_DECRYPT_ERROR - Decryption error
20145 | DICOM_ERROR_TLS_EXPORT_RESTRICTION - Export restriction
20146 | DICOM_ERROR_TLS_PROTOCOL_VERSION - Wrong protocol version
20147 | DICOM_ERROR_TLS_INSUFFICIENT_SECURITY - Insufficient security
20148 | DICOM_ERROR_TLS_INTERNAL_ERROR - Internal error Call LEAD
20149 | DICOM_ERROR_TLS_USER_CANCELED - User cancelled
20150 | DICOM_ERROR_TLS_NO_RENEGOTIATION - No renegotiation
20151 | DICOM_ERROR_TLS_NO_KEEPALIVE - "Windows Sockets provider" does not support the use of keep-alives.
20152 | DICOM_ERROR_TLS_CLOSED_CONTROLLED - An error occurred and the connection was closed gracefully.
20160 | DICOM_ERROR_TLS_UNABLE_TO_GET_ISSUER_CERT - "Unable to get issuer certificate"
20161 | DICOM_ERROR_TLS_UNABLE_TO_GET_CRL - "Unable to get CRL"
20162 | DICOM_ERROR_TLS_UNABLE_TO_DECRYPT_CERT_SIGNATURE - "Unable to decrypt certificate signature"
20163 | DICOM_ERROR_TLS_UNABLE_TO_DECRYPT_CRL_SIGNATURE - "unable to decrypt CRL signature"
20164 | DICOM_ERROR_TLS_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY - "unable to decode issuer public key"
20165 | DICOM_ERROR_TLS_CERT_SIGNATURE_FAILURE - "Certificate signature failure"
20166 | DICOM_ERROR_TLS_CRL_SIGNATURE_FAILURE - "Error TLS CRL Signature Failure"
20167 | DICOM_ERROR_TLS_CERT_NOT_YET_VALID - "Error TLS Certificate Not Yet Valid"
20168 | DICOM_ERROR_TLS_CERT_HAS_EXPIRED - "Error TLS Certificate Has Expired"
20169 | DICOM_ERROR_TLS_CRL_NOT_YET_VALID - "Error TLS CRL Not Yet Valid"
20170 | DICOM_ERROR_TLS_CRL_HAS_EXPIRED - "Error TLS CRL Has Expired"
20171 | DICOM_ERROR_TLS_ERROR_IN_CERT_NOT_BEFORE_FIELD - "Error TLS Error In Certificate Not Before Field"
20172 | DICOM_ERROR_TLS_ERROR_IN_CERT_NOT_AFTER_FIELD - "Error TLS Error In Certificate Not After Field"
20173 | DICOM_ERROR_TLS_ERROR_IN_CRL_LAST_UPDATE_FIELD - "Error TLS Error In CRL Last Update Field"
20174 | DICOM_ERROR_TLS_ERROR_IN_CRL_NEXT_UPDATE_FIELD - "Error TLS Error In CRL Next Update Field"
20175 | DICOM_ERROR_TLS_OUT_OF_MEM - "Error TLS Out Of Memory"
20176 | DICOM_ERROR_TLS_DEPTH_ZERO_SELF_SIGNED_CERT - "Error TLS Depth Zero Self Signed Certificate"
20177 | DICOM_ERROR_TLS_SELF_SIGNED_CERT_IN_CHAIN - "Error TLS Self Signed Certificate In Chain"
20178 | DICOM_ERROR_TLS_UNABLE_TO_GET_ISSUER_CERT_LOCALLY - "Error TLS Unable To Get Issuer Certificate Locally"
20179 | DICOM_ERROR_TLS_UNABLE_TO_VERIFY_LEAF_SIGNATURE - "Error TLS Unable To Verify Leaf Signature"
20180 | DICOM_ERROR_TLS_CERT_CHAIN_TOO_LONG - "Error TLS Certificate Chain Too Long"
20181 | DICOM_ERROR_TLS_CERT_REVOKED - "Error TLS Certificate Revoked"
20182 | DICOM_ERROR_TLS_INVALID_CA - "Error TLS Invalid CA"
20183 | DICOM_ERROR_TLS_PATH_LENGTH_EXCEEDED - "Error TLS Path Length Exceeded"
20184 | DICOM_ERROR_TLS_INVALID_PURPOSE - "Error TLS Invalid Purpose"
20185 | DICOM_ERROR_TLS_CERT_UNTRUSTED - "Error TLS Certificate Untrusted"
20186 | DICOM_ERROR_TLS_CERT_REJECTED - "Error TLS Certificate Rejected"
20187 | DICOM_ERROR_TLS_SUBJECT_ISSUER_MISMATCH - "Error TLS Subject Issuer Mismatch"
20188 | DICOM_ERROR_TLS_AKID_SKID_MISMATCH - "Error TLS AKID SKID Mismatch"
20189 | DICOM_ERROR_TLS_AKID_ISSUER_SERIAL_MISMATCH - "Error TLS AKID Issuer Serial Mismatch"
20190 | DICOM_ERROR_TLS_KEYUSAGE_NO_CERTSIGN - "Error TLS Keyusage No Certsign"
20191 | DICOM_ERROR_TLS_APPLICATION_VERIFICATION - "Error TLS Application Verification"
20192 | DICOM_ERROR_TLS_INVALID_CTX - "Error TLS Invalid SSL Context"
20193 | DICOM_ERROR_TLS_INVALID_CTX_VERIFY_DEPTH - "Error TLS Invalid SSL Context Verify Depth"
20194 | DICOM_ERROR_TLS_INVALID_CTX_VERIFY_MODE - "Error TLS Invalid SSL Context Verify Mode"
20195 | DICOM_ERROR_TLS_INVALID_CTX_CAFILE - "Error TLS Invalid SSL Context CA File"
20196 | DICOM_ERROR_TLS_INVALID_CTX_OPTIONS - "Error TLS Invalid SSL Context Options"
20200 | DICOM_ERROR_DICOMDIR_FOLDER - The destination folder of the DICOMDIR File is not specified, or the specified folder doesn’t exist.
20201 | DICOM_ERROR_FILE - The file doesn’t reside in the destination folder of the DICOMDIR File or in a subfolder of it, or the file doesn’t exist.
20202 | DICOM_ERROR_FILEID - The File ID of the specified file is invalid. Refer to the RejectInvalidFileID property for more information.
20203 | DICOM_ERROR_J2K_LOCKED - J2K support is locked.
20204 | DICOM_ERROR_LUT_DESCRIPTOR_MISSING – LUT descriptor is missing.
20205 | DICOM_ERROR_MODALITY_LUT_MISSING – Modality LUT is missing.
20206 | DICOM_ERROR_BAD_PIXEL_REPRESENTATION – Bad pixel representation.
20207 | DICOM_ERROR_PALETTECOLORLUTDATAMISSING – Palette color LUT is missing.
20208 | DICOM_ERROR_FEATURE_NOT_SUPPORTED – Feature not supported.
20209 | DICOM_ERROR_VOI_LUT_MISSING – VOI LUT is missing.
20210 | DICOM_ERROR_OVERLAY_ATTRIBUTES_MISSING – Overlay attributes are missing.
20211 | DICOM_ERROR_OVERLAY_ACTIVATIONLAYER_MISSING – Overlay activation layer element is missing.
20212 | DICOM_ERROR_OVERLAY_DATA_MISSING – Overlay data element is missing.
20213 | DICOM_ERROR_INVALID_STRUCT_SIZE – Invalid structure size.
20214 | DICOM_ERROR_NULL_PTR – NULL pointer.
20215 | DICOM_ERROR_LTIMG_MISSING – LTIMG DLL is missing.
20216 | DICOM_ERROR_CRYPTO_LIB_LOAD_FAILED - Failed to load the underlying cryptographic library
20217 | DICOM_ERROR_INVALID_MAC_TRANSFER_SYNTAX -Unable to change to the MAC Calculation Transfer Syntax
20218 | DICOM_ERROR_PRIVATE_KEY_LOAD_FAILED - Failed to load the private key from the specified file
20219 | DICOM_ERROR_CERTIFICATE_LOAD_FAILED - Failed to load the digital certificate from the specified file
20220 | DICOM_ERROR_CERTIFICATE_READ_FAILED - Failed to read the digital certificate from the Data Set
20221 | DICOM_ERROR_KEYS_MISMATCH - The specified private key doesn’t match the public key in the specified digital certificate
20222 | DICOM_ERROR_INVALID_MAC_ALGORITHM - The specified Digital Signature Security Profile doesn’t allow the use of the specified MAC Algorithm
20223 | DICOM_ERROR_INVALID_ENCRYPTION_ALGORITHM - The specified Digital Signature Security Profile doesn’t allow the use of the encryption algorithm implied by the specified keys
20224 | DICOM_ERROR_MAC_ID_NUMBER_ALLOCATE_FAILED - All possible values for the MAC ID Number are already used in the associated MAC Parameters Sequence
20225 | DICOM_ERROR_CRYPTO_LIB_FAILURE - The underlying cryptographic library failed
20226 | DICOM_ERROR_MAC_PARAMETER_MISSING - Failed to verify the Digital Signature because one or more of the MAC Parameters are missing
20227 | DICOM_ERROR_MAC_ID_NUMBER_MISSING - Failed to verify the Digital Signature because no MAC Parameters Sequence Item is referenced
20228 | DICOM_ERROR_UNKNOWN_MAC_ALGORITHM - Failed to verify the Digital Signature because the specified MAC Algorithm is unknown
20229 | DICOM_ERROR_SIGNATURE_MISSING - Failed to verify the Digital Signature because the Signature is missing
20230 | DICOM_ERROR_INVALID_SIGNATURE - The Digital Signature is invalid or at least one of the Digital Signatures in the Data Set is invalid
20301 | DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED - The required SOP/Meta SOP Class is not supported on the Association (refer to the method itself)
20302 | DICOM_ERROR_PRINTSCU_TIME_OUT - Timed out (refer to the Timeout property)
20303 | DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED - The Association request was rejected by the Print SCP (refer to the Associate method)
20304 | DICOM_ERROR_PRINTSCU_FAILURE_STATUS - The response of the Print SCP specifies a Failure status code (the operation was not performed)


CodeMeaning property (IDicomCodedConcept Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CodeMeaning
Overview | Refer to Working with the DicomCodedConcept Object

Remarks

(Read-only) The CodeMeaning property specifies the Code Meaning (0008,0104) of the Coded Concept.

See Also

Elements: | CurrentCodedConcept property, CodingSchemeDesignator property, CodingSchemeVersion property, CodeValue property, IsContextGroupLocalVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with Context Groups, Context Identifiers


CodeValue property (IDicomCodedConcept Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CodeValue
Overview | Refer to Working with the DicomCodedConcept Object

Remarks

(Read-only) The CodeValue property specifies the Code Value (0008,0100) of the Coded Concept.

See Also

Elements: | CurrentCodedConcept property, CodingSchemeDesignator property, CodingSchemeVersion property, CodeMeaning property, IsContextGroupLocalVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with Context Groups, Context Identifiers


CodingSchemeDesignator property (IDicomCodedConcept Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CodingSchemeDesignator
Overview | Refer to Working with the DicomCodedConcept Object

Remarks

(Read-only) The CodingSchemeDesignator property specifies the Coding Scheme Designator (0008,0102) of the Coded Concept.

See Also

Elements: | CurrentCodedConcept property, CodingSchemeVersion property, CodeValue property, CodeMeaning property, IsContextGroupLocalVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with Context Groups, Context Identifiers


CodingSchemeVersion property (IDicomCodedConcept Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CodingSchemeVersion
Overview | Refer to Working with the DicomCodedConcept Object

Remarks

(Read-only) The CodingSchemeVersion property specifies the Coding Scheme Version (0008,0103) of the Coded Concept.

The property specifies an empty string if no Coding Scheme Version is defined for the Coded Concept.

See Also

Elements: | CurrentCodedConcept property, CodingSchemeDesignator property, CodeValue property, CodeMeaning property, IsContextGroupLocalVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with Context Groups, Context Identifiers


ContextGroupExtensionCreatorUID property (IDicomCodedConcept Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ContextGroupExtensionCreatorUID
Overview | Refer to Working with the DicomCodedConcept Object

Remarks

(Read-only) The ContextGroupExtensionCreatorUID property specifies the Context Group Extension Creator UID (0008,010D) of the Coded Concept.

The property specifies an empty string if no Context Group Extension Creator UID is defined for the Coded Concept. This is the case for all the Coded Concepts that are maintained internally.

See Also

Elements: | CurrentCodedConcept property, CodingSchemeDesignator property, CodingSchemeVersion property, CodeValue property, CodeMeaning property, IsContextGroupLocalVersion property, ContextGroupLocalVersion property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with Context Groups, Context Identifiers


ContextGroupLocalVersion property (IDicomCodedConcept Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDATETIMEVALUEItem* ContextGroupLocalVersion
Overview | Refer to Working with the DicomCodedConcept Object.

Remarks

(Read-only) The ContextGroupLocalVersion property specifies the Context Group Local Version (0008,0107) of the Coded Concept. This property should be ignored if the IsContextGroupLocalVersion property is set to VARIANT_FALSE.

Refer to the DateTimeValues property for the properties specified by a DATETIMEVALUEItem object.

See Also

Elements: | CurrentCodedConcept property, CodingSchemeDesignator property, CodingSchemeVersion property, CodeValue property, CodeMeaning property, IsContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, DateTimeValues property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with Context Groups, Context Identifiers


IsContextGroupLocalVersion property (IDicomCodedConcept Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsContextGroupLocalVersion
Overview | Refer to Working with the DicomCodedConcept Object

Remarks

(Read-only) The IsContextGroupLocalVersion property specifies whether a Context Group Local Version (0008,0107) is defined for the Coded Concept. Possible values are:

Value | Meaning
VARIANT_TRUE | The Context Group Local Version of the Coded Concept is specified by the ContextGroupLocalVersion property.
VARIANT_FALSE | No Context Group Local Version is defined for the Coded Concept.

For the Coded Concepts that are maintained internally, the IsContextGroupLocalVersion property is always set to VARIANT_FALSE and therefore the ContextGroupLocalVersion property should always be ignored.

See Also

Elements: | CurrentCodedConcept property, CodingSchemeDesignator property, CodingSchemeVersion property, CodeValue property, CodeMeaning property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with Context Groups, Context Identifiers


CodeMeaning property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CodeMeaning
Overview | Refer to Working with DICOM Waveforms.

Remarks

The CodeMeaning property specifies the Code Meaning (0008,0104) in the Code Sequence Item.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), ContextIdentifier property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


CodeValue property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CodeValue
Overview | Refer to Working with DICOM Waveforms.

Remarks

The CodeValue property specifies the Code Value (0008,0100) in the Code Sequence Item.

See Also

Elements: | CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, ContextIdentifier property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


CodingSchemeDesignator property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CodingSchemeDesignator
Overview | Refer to Working with DICOM Waveforms.

Remarks

The CodingSchemeDesignator property specifies the Coding Scheme Designator (0008,0102) in the Code Sequence Item.

See Also

Elements: | CodeValue property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, ContextIdentifier property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


CodingSchemeVersion property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CodingSchemeVersion
Overview | Refer to Working with DICOM Waveforms.

Remarks

The CodingSchemeVersion property specifies the Coding Scheme Version (0008,0103) in the Code Sequence Item.

An empty string indicates that no Coding Scheme Version is defined.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodeMeaning property, ContextIdentifier property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


ContextGroupExtensionCreatorUID property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ContextGroupExtensionCreatorUID
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ContextGroupExtensionCreatorUID property specifies the Context Group Extension Creator UID (0008,010D) in the Code Sequence Item.

An empty string indicates that no Context Group Extension Creator UID is specified.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, ContextIdentifier property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


ContextGroupLocalVersion property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDATETIMEVALUEItem* ContextGroupLocalVersion
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The ContextGroupLocalVersion property specifies the Context Group Local Version (0008,0107) in the Code Sequence Item.

This property value is valid only if the IsContextGroupLocalVersion property is set to VARIANT_TRUE.

For more information on the DATETIMEVALUEItem object, refer to the DateTimeValues property.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, ContextIdentifier property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


ContextGroupVersion property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDATETIMEVALUEItem* ContextGroupVersion
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The ContextGroupVersion property specifies the Context Group Version (0008,0106) in the Code Sequence Item.

This property value is valid only if the IsContextGroupVersion property is set to VARIANT_TRUE.

For more information on the DATETIMEVALUEItem object, refer to the DateTimeValues property.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, ContextIdentifier property, MappingResource property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


ContextIdentifier property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ContextIdentifier
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ContextIdentifier property specifies the Context Identifier (0008,010F) in the Code Sequence Item.

An empty string indicates that no Context Identifier is specified.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


IsContextGroupLocalVersion property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsContextGroupLocalVersion
Overview | Refer to Working with DICOM Waveforms.

Remarks

The IsContextGroupLocalVersion property specifies whether a Context Group Local Version (0008,0107) is specified in the Code Sequence Item. Possible values are:

Value | Meaning
VARIANT_TRUE | The Context Group Local Version is specified by the ContextGroupLocalVersion property.
VARIANT_FALSE | No Context Group Local Version is specified in the Code Sequence Item.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, ContextIdentifier property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


IsContextGroupVersion property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsContextGroupVersion
Overview | Refer to Working with DICOM Waveforms.

Remarks

The IsContextGroupVersion property specifies whether a Context Group Version (0008,0106) is specified in the Code Sequence Item or not. Possible values are:

Value | Meaning
VARIANT_TRUE | The Context Group Version is specified by the ContextGroupVersion property.
VARIANT_FALSE | No Context Group Version is specified in the Code Sequence Item.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, ContextIdentifier property, MappingResource property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


MappingResource property (IDicomCodeSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR MappingResource
Overview | Refer to Working with DICOM Waveforms.

Remarks

The MappingResource property specifies the Mapping Resource (0008,0105) in the Code Sequence Item.

An empty string indicates that no Mapping Resource is specified.

See Also

Elements: | CodeValue property, CodingSchemeDesignator property, CodingSchemeVersion property (IDicomCodeSequenceItem), CodeMeaning property, ContextIdentifier property, ContextGroupVersion property, ContextGroupLocalVersion property, ContextGroupExtensionCreatorUID property, IsContextGroupVersion property, IsContextGroupLocalVersion property
Topics: | DICOM Waveform Channels: Using Code Sequence Items


ContextGroupVersion property (IDicomContextGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDATETIMEVALUEItem* ContextGroupVersion
Overview | Refer to Working with the DicomContextGroup Object.

Remarks

(Read-only) The ContextGroupVersion property specifies the Context Group Version (0008,0106) of the Context Group.

Refer to the DateTimeValues property for the properties specified by a DATETIMEVALUEItem object.

See Also

Elements: | CurrentContextGroup property, ContextIdentifier property, Name property, Extensible property, DateTimeValues property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomCodedConcept Object, Working with Context Groups, Context Identifiers


ContextIdentifier property (IDicomContextGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ContextIdentifier
Overview | Refer to Working with the DicomContextGroup Object

Remarks

(Read-only) The ContextIdentifier property specifies the Context Identifier (0008,010F) of the Context Group (for example, "CID 2", "CID 82", "CID 3001", etc.).

A Context Group is identified by its Context ID (CID). For a list of the Context IDs of the Context Groups maintained internally, refer to Context Identifiers.

See Also

Elements: | CurrentContextGroup property, Name property, Extensible property, ContextGroupVersion property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomCodedConcept Object, Working with Context Groups, Context Identifiers


Extensible property (IDicomContextGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL Extensible
Overview | Refer to Working with the DicomContextGroup Object

Remarks

(Read-only) The Extensible property specifies whether the Context Group is Extensible. Possible values are:

Value | Meaning
VARIANT_TRUE | The Context Group is Extensible.
VARIANT_FALSE | The Context Group is Non-extensible.

See Also

Elements: | CurrentContextGroup property, ContextIdentifier property, Name property, ContextGroupVersion property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomCodedConcept Object, Working with Context Groups, Context Identifiers


Name property (IDicomContextGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Name
Overview | Refer to Working with the DicomContextGroup Object

Remarks

(Read-only) The Name property specifies the name of the Context Group (for example, "Anatomic Modifier", "Units of Measurement", "ECG Leads", etc.).

See Also

Elements: | CurrentContextGroup property, ContextIdentifier property, Extensible property, ContextGroupVersion property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomCodedConcept Object, Working with Context Groups


Filled property (IDicomGraphicObjectAttributes)

Filled property (IDicomGraphicObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | VARIANT_BOOL Filled
Overview | Refer to Working with DICOM Annotations

Remarks

The Filled property specifies the value of the "Graphic Filled" (0070,0024) element. Possible values are:

Value | Meaning
VARIANT_TRUE | "Y" = yes.
VARIANT_FALSE | "N" = no.

See Also

Elements: | GraphicObjectAttributes property, CreateGraphicObject method, GetGraphicObjectAttributes method, SetGraphicObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface


LayerName property (IDicomGraphicObjectAttributes)

LayerName property (IDicomGraphicObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR LayerName
Overview | Refer to Working with DICOM Annotations

Remarks

The LayerName property specifies the value of the "Graphic Layer" (0070,0002) element.

This property is ignored when updating a graphic annotation object using the SetGraphicObjectAttributes method. It is also ignored when creating a new graphic annotation object using the CreateGraphicObject method unless the bCheckLayer parameter of the method is set (in this case, the property will be used only to verify the existence of the layer). Finally, when retrieving the attributes of a graphic annotation object using the GetGraphicObjectAttributes method, the property is always updated with the name of the layer where the object resides.

See Also

Elements: | GraphicObjectAttributes property, CreateGraphicObject method, GetGraphicObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface


PointCount property (IDicomGraphicObjectAttributes)

PointCount property (IDicomGraphicObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long PointCount
Overview | Refer to Working with DICOM Annotations

Remarks

The PointCount property specifies the value of the "Number of Graphic Points" (0070,0021) element.

Set this property to allocate storage for the arrays specified by the PointsX property and the PointsY property. The arrays can then be filled with the desired values. If the PointCount property is set to 0, the memory used for the arrays will be freed.

Before using the CreateGraphicObject method to create a new object or the SetGraphicObjectAttributes method to update an existing one, set this property to the desired number of points and fill the arrays. These methods will ignore the PointCount property, the PointsX property, and the PointsY property if the PointCount property is set to a value less than or equal to 0.

When retrieving the attributes of an object using the GetGraphicObjectAttributes method, the PointCount property will be updated with the number of points and storage will be allocated for the arrays (specified by the PointsX property and the PointsY property), which will be filled with the retrieved values.

See Also

Elements: | PointsX property, PointsY property, GraphicObjectAttributes property, CreateGraphicObject method, GetGraphicObjectAttributes method, SetGraphicObjectAttributes method.
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface


PointsX property (IDicomGraphicObjectAttributes)

PointsX property (IDicomGraphicObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | float PointsX(long lIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The PointsX property is an array of the x-coordinates of the points specified by the "Graphic Data" (0070,0022) element. Refer to the PointCount property for more information.

As an example, the values PointsX(0) and PointsY(0) are the x-coordinate and the y-coordinate of the first point.

See Also

Elements:

PointCount property, PointsY property, GraphicObjectAttributes property, CreateGraphicObject method . GetGraphicObjectAttributes method, SetGraphicObjectAttributes method


PointsY property (IDicomGraphicObjectAttributes)

PointsY property (IDicomGraphicObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | float PointsY(long lIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The PointsY property is an array of the y-coordinates of the points specified by the "Graphic Data" (0070,0022) element. Refer to the PointCount property for more information.

As an example, the values PointsX(0) and PointsY(0) are the x-coordinate and the y-coordinate of the first point.

See Also

Elements: | PointCount property, PointsX property, GraphicObjectAttributes property, CreateGraphicObject method, GetGraphicObjectAttributes method, SetGraphicObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface


Type property (IDicomGraphicObjectAttributes)

Type property (IDicomGraphicObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | DicomGraphicObjectTypes Type
Overview | Refer to Working with DICOM Annotations

Remarks

The Type property specifies the value of the "Graphic Type" (0070,0023) element. Possible values are:

Value | Meaning
DICOM_GRAPHIC_OBJECT_TYPE_POINT | [1] "POINT".
DICOM_GRAPHIC_OBJECT_TYPE_POLYLINE | [2] "POLYLINE".
DICOM_GRAPHIC_OBJECT_TYPE_INTERPOLATED | [3] "INTERPOLATED".
DICOM_GRAPHIC_OBJECT_TYPE_CIRCLE | [4] "CIRCLE".
DICOM_GRAPHIC_OBJECT_TYPE_ELLIPSE | [5] "ELLIPSE".

See Also

Elements: | GraphicObjectAttributes, CreateGraphicObject, GetGraphicObjectAttributes, SetGraphicObjectAttributes
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface


Units property (IDicomGraphicObjectAttributes)

Units property (IDicomGraphicObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | DicomMeasureUnits Units
Overview | Refer to Working with DICOM Annotations

Remarks

The Units property specifies the value of the "Graphic Annotation Units" (0070,0005) element. Possible values are:

Value | Meaning
DICOM_UNIT_PIXEL | [1] "PIXEL".
DICOM_UNIT_DISPLAY | [2] "DISPLAY".

See Also

Elements:

GraphicObjectAttributes property, CreateGraphicObject method, GetGraphicObjectAttributes method, SetGraphicObjectAttributes method


J2KCBS_ErrorResilienceSymbol property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KCBS_ErrorResilienceSymbol
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether a 4 symbol marker is included for each bit-plane, following the normalization pass. Possible values are:

Value | Meaning
TRUE | A 4 symbol marker is included for each bit-plane, following the normalization pass.
FALSE | A 4 symbol marker is not included for each bit-plane, following the normalization pass.

See Also

Elements: | J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCBS_PredictableTermination property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KCBS_PredictableTermination
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the encoder has a predictable termination policy and identifies that the policy was used in the code-stream COD/COC markers. This can be used to implement error detection and concealment. Possible values are:

Value | Meaning
TRUE | The encoder has a predictable termination policy and identifies that the policy was used in the COD/COC markers.
FALSE | The encoder does not have a predictable termination policy.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCBS_ResetContextOnBoundaries property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | VARIANT_BOOL J2KCBS_ResetContextOnBoundaries
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the arithmetic coder's probability models are reset between coding passes. This controls where the end of encoded data is and limits the amount of potentially lost data in the event of a transmission error. Possible values are:

Value | Meaning
TRUE | The arithmetic coder's probability models are reset between coding passes.
FALSE | The arithmetic coder's probability models are not reset between coding passes.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCBS_SelectiveACBypass property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KCBS_SelectiveACBypass
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the "lazy coding mode" is adopted. If the lazy coding mode is adopted, trailing bit-planes bypass the arithmetic coder except in the normalization pass. Possible value are:

Value | Meaning
TRUE | The "lazy-coding mode" is adopted. Trailing bit-planes bypass the arithmetic coder except in the normalization pass.
FALSE | The arithmetic encoder will be used on all passes.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCBS_TerminationOnEachPass property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KCBS_TerminationOnEachPass
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the arithmetic code-word generation process stops on a byte boundary at the end of each coding pass. Possible values are:

Value | Meaning
TRUE | The arithmetic code-word generation process stops on a byte boundary at the end of each coding pass.
FALSE | The arithmetic code-word generation process does not stop on a byte boundary at the end of each coding pass.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCBS_VerticallyCausalContext property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KCBS_VerticallyCausalContext
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the context models are restricted to being vertically causal within each sub-block. Possible values are:

Value | Meaning
TRUE | The context models are restricted to being vertically causal within each sub-block.
FALSE | The context models are not restricted to being vertically causal within each sub-block.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCodBlockHeight property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long J2KCodBlockHeight
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Height of the code block, following wavelet transformation. The value must be a power of 2. It must be at least 4 and less than or equal to 1024.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCodBlockWidth property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KCodBlockWidth
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Width of the code block, following wavelet transformation. The value must be a power of 2. It must be at least 4 and less than or equal to 1024.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCompressionControl property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | DicomJ2KCompressionControl J2KCompressionControl
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates how to determine the resulting compression. The value of this property determines which property should be used for determining the compression. Possible values are:

Value | Meaning
DICOM_J2K_COMPRESSION_RATIO | Compress the image based on the value of the J2KCompressionRatio property.
DICOM_J2K_COMPRESSION_TARGETSIZE | Compress the image based on the target stream size in the J2KTargetFileSize property.
DICOM_J2K_COMPRESSION_QFACTOR | Compress the image based on the quality factor passed to any of the functions which can be used to replace or insert image(s) in the Pixel Data Element, such as SetBitmapValue or InsertBitmapValue.

Remarks

This property is only effective when using the Lossy JPEG 2000 compression. Otherwise it gets ignored.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KCompressionRatio property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | float J2KCompressionRatio
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates the compression ratio to use. This value is used only if the J2KCompressionControl property is set to DICOM_J2K_COMPRESSION_RATIO.

This property is only effective when using the Lossy JPEG 2000 compression. Otherwise it gets ignored.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KDecompLevel property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KDecompLevel
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Number of resolution levels in the compressed stream. The maximum number of levels depends on the size of the image. Passing values that are too large will cause the compression operation to fail. Each resolution level is one-half the size of the previous resolution, starting with the full image resolution. The default value is 5.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KDerivedBaseExponent property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KDerivedBaseExponent
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

The base exponent used for derived quantization.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KDerivedBaseMantissa property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KDerivedBaseMantissa
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

The base mantissa used for derived quantization.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KDerivedQuantization property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KDerivedQuantization
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether to use derived quantization or expounded quantization. Possible values are:

Value | Meaning
TRUE | Use derived quantization.
FALSE | Use expounded quantization.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KGuardBits property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KGuardBits
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Number of extra bits to consider when encoding an image. This prevents coding overflow. Possible values are 0 - 7. The default is 2.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KOptions property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | IDICOMJ2KOptions J2KOptions
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

This property can be used to access the different J2K compression options, which are available when compressing the Pixel Data Element using the JPEG 2000 compression.

The J2KOptions object has the following properties (attributes):

J2KCBS_ErrorResilienceSymbol property

J2KCBS_PredictableTermination property

J2KCBS_ResetContextOnBoundaries property

J2KCBS_SelectiveACBypass property

J2KCBS_TerminationOnEachPass property

J2KCBS_VerticallyCausalContext property

J2KCodBlockHeight property

J2KCodBlockWidth property

J2KCompressionControl property

J2KCompressionRatio property

J2KDecompLevel property

J2KDerivedBaseExponent property

J2KDerivedBaseMantissa property

J2KDerivedQuantization property

J2KGuardBits property

J2KProgressOrder property

J2KROIControl property

J2KROIHeight property

J2KROILeft property

J2KROITop property

J2KROIWidth property

J2KTargetFileSize property

J2KUseColorTransform property

J2KUseEPHMarker property

J2KUseROI property

J2KUseSOPMarker property

J2KXOsiz property

J2KXTOsiz property

J2KXTsiz property

J2KYOsiz property

J2KYTOsiz property

J2KYTsiz property

J2KUseROI property

J2KROIControl property

J2KROILeft property

J2KROITop property

J2KROIHeight property

J2KROIWidth property

The J2KSetDefaults method can be used to reset all the above properties to their default values.

See Also

Elements: | SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KProgressOrder property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | J2KProgressionFlags J2KProgressOrder
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates the order of progression. Possible values are:

Value | Description
J2K_LAYER_RESOLUTION_COMPONENT_POSITION | [0] Quality–axis order.
J2K_RESOLUTION_LAYER_COMPONENT_POSITION | [1] Resolution-axis order.
J2K_RESOLUTION_POSITION_COMPONENT_LAYER | [2] Resolution-axis order.
J2K_POSITION_COMPONENT_RESOLUTION_LAYER | [3] Position–axis order.
J2K_COMPONENT_POSITION_RESOLUTION_LAYER | [4] Color-axis order.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KROIControl property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | J2KRegionOfInterest J2KROIControl
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Flag that indicates how to define the region of interest. Possible values are:

Value | Description
J2K_USEOPTION_RECT | [0] J2KROILeft, J2KROITop, J2KROIWidth and J2KROIHeight will be used to define the region of interest rectangle.
J2K_USELEAD_REGION | [1] The LEAD bitmap region will be used to define the region of interest rectangle.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KUseROI property, J2KROILeft property, J2KROITop property, J2KROIWidth property, J2KROIHeight property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KROIHeight property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KROIHeight
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Gets or sets the height of a rectangle that defines the region of interest within the image.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KROIControl property, J2KUseROI property, J2KROILeft property, J2KROITop property, J2KROIWidth property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KROILeft property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KROILeft
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Gets or sets the left coordinate of a rectangle that defines the region of interest within the image.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KROIControl property, J2KUseROI property, J2KROITop property, J2KROIWidth property, J2KROIHeight property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KROITop property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KROITop
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Gets or sets the top coordinate of a rectangle that defines the region of interest within the image.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KROIControl property, J2KUseROI property, J2KROILeft property, J2KROIWidth property, J2KROIHeight property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KROIWidth property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KROIWidth
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Gets or sets the width of a rectangle that defines the region of interest within the image.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KROIControl property, J2KUseROI property, J2KROILeft property, J2KROITop property, J2KROIHeight property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KTargetFileSize property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KTargetFileSize
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates the size of the target JPEG 2000 stream, in bytes. This value is used only if the J2KCompressionControl property is set to DICOM_J2K_COMPRESSION_TARGETSIZE.

This property is only effective when using the Lossy JPEG 2000 compression. Otherwise it gets ignored.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KUseColorTransform property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KUseColorTransform
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates whether to convert an RGB image to YUV space before compressing. (YUV space provides greater compression with higher image quality.) Possible values are:

Value | Meaning
TRUE | Convert to YUV space before compressing. (Default)
FALSE | Do not convert to YUV space before compressing.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KUseEPHMarker property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KUseEPHMarker
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether to use the EPH marker. Possible values are:

Value | Meaning
TRUE | Use the EPH marker.
FALSE | Do not use the EPH marker. (Default)

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KUseROI property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | BOOL J2KUseROI
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates whether to use a region of interest. Possible values are:

Setting | Description
TRUE | Use a region of interest as specified in the J2KROIControl property.
FALSE | Do not use a region of interest. If you do not want to use a region of interest, set this property to FALSE. Otherwise, there may be a significant compression and speed performance loss.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KROIControl property, J2KROILeft property, J2KROITop property, J2KROIWidth property, J2KROIHeight property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KUseSOPMarker property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | VARIANT_BOOL J2KUseSOPMarker
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether to use the SOP marker. Possible values are:

Value | Meaning
TRUE | Use the SOP marker.
FALSE | Do not use the SOP marker. (Default)

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KXOsiz property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KXOsiz
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Horizontal offset from the origin of the reference grid to the left side of the image area.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KXTOsiz property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KXTOsiz
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Horizontal offset from the origin of the reference grid to the left side of the first tile.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KXTsiz property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KXTsiz
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Width of one reference tile, with respect to the reference grid.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KYOsiz property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KYOsiz
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Vertical offset from the origin of the reference grid to the top of the image area.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KYTOsiz property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KYTOsiz
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Vertical offset from the origin of the reference grid to the top of the first tile.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KYTsiz property (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | long J2KYTsiz
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Height of one reference tile, with respect to the reference grid.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


J2KSetDefaults method (IDICOMJ2KOptions)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example
Syntax | short J2KSetDefaults ();
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Updates the J2K properties with the default values. To change the options used with the JPEG 2000 compression, set the following properties:

J2KCBS_ErrorResilienceSymbol property

J2KCBS_PredictableTermination property

J2KCBS_ResetContextOnBoundaries property

J2KCBS_SelectiveACBypass property

J2KCBS_TerminationOnEachPass property

J2KCBS_VerticallyCausalContext property

J2KCodBlockHeight property

J2KCodBlockWidth property

J2KCompressionControl property

J2KCompressionRatio property

J2KDecompLevel property

J2KDerivedBaseExponent property

J2KDerivedBaseMantissa property

J2KDerivedQuantization property

J2KGuardBits property

J2KProgressOrder property

J2KSetDefaults method

J2KTargetFileSize property

J2KUseColorTransform property

J2KUseEPHMarker property

J2KUseSOPMarker property

J2KXOsiz property

J2KXTOsiz property

J2KXTsiz property

J2KYOsiz property

J2KYTOsiz property

J2KYTsiz property

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KOptions property, SetBitmapValue method, SetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method
Topics: | Data Sets: Compressing Pixel Data Elements


DisplayBlueValue property (IDicomLayerAttributes)

DisplayBlueValue property (IDicomLayerAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long DisplayBlueValue
Overview | Refer to Working with DICOM Annotations

Remarks

The DisplayBlueValue property specifies the blue value in the "Graphic Layer Recommended Display RGB Value" (0070,0067) element.

When creating a new layer using the CreateLayer method and when updating an existing layer using the SetLayerAttributes method, the DisplayRedValue property, the DisplayGreenValue property, and the DisplayBlueValue property will all be ignored if any of them is set to a negative value. When retrieving the attributes of a layer using the GetLayerAttributes method, these properties will be set to negative values if the corresponding element doesn’t exist.

See Also

Elements: | DisplayRedValue property, DisplayGreenValue property, LayerAttributes property, CreateLayer method, GetLayerAttributes method, SetLayerAttributes method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface


DisplayGrayscaleValue property (IDicomLayerAttributes)

DisplayGrayscaleValue property (IDicomLayerAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long DisplayGrayscaleValue
Overview | Refer to Working with DICOM Annotations

Remarks

The DisplayGrayscaleValue property specifies the value of the "Graphic Layer Recommended Display Grayscale Value" (0070,0066) element.

When creating a new layer using the CreateLayer method and when updating an existing layer using the SetLayerAttributes method, this property will be ignored if it is set to a negative value. When retrieving the attributes of a layer using the GetLayerAttributes method, this property will be set to a negative value if the corresponding element doesn’t exist.

See Also

Elements: | LayerAttributes property, CreateLayer method, GetLayerAttributes method, SetLayerAttributes method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface


DisplayGreenValue property (IDicomLayerAttributes)

DisplayGreenValue property (IDicomLayerAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long DisplayGreenValue
Overview | Refer to Working with DICOM Annotations

Remarks

The DisplayGreenValue property specifies the green value in the "Graphic Layer Recommended Display RGB Value" (0070,0067) element.

When creating a new layer using the CreateLayer method and when updating an existing layer using the SetLayerAttributes method, the DisplayRedValue property, the DisplayGreenValue property, and the DisplayBlueValue property will all be ignored if any of them is set to a negative value. When retrieving the attributes of a layer using the GetLayerAttributes method, these properties will be set to negative values if the corresponding element doesn’t exist.

See Also

Elements: | DisplayRedValue property, DisplayBlueValue property, LayerAttributes property, CreateLayer method, GetLayerAttributes method, SetLayerAttributes method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface


DisplayRedValue property (IDicomLayerAttributes)

DisplayRedValue property (IDicomLayerAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long DisplayRedValue
Overview | Refer to Working with DICOM Annotations

Remarks

The DisplayRedValue property specifies the red value in the "Graphic Layer Recommended Display RGB Value" (0070,0067) element.

When creating a new layer using the CreateLayer method and when updating an existing layer using the SetLayerAttributes method, the DisplayRedValue property, the DisplayGreenValue property, and the DisplayBlueValue property will all be ignored if any of them is set to a negative value. When retrieving the attributes of a layer using the GetLayerAttributes method, these properties will be set to negative values if the corresponding element doesn’t exist.

See Also

Elements: | DisplayGreenValue property, DisplayBlueValue property, LayerAttributes property, CreateLayer method, GetLayerAttributes method, SetLayerAttributes method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface


LayerDescription property (IDicomLayerAttributes)

LayerDescription property (IDicomLayerAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR LayerDescription
Overview | Refer to Working with DICOM Annotations

Remarks

The LayerDescription property specifies the value of the "Graphic Layer Description" (0070,0068) element.

When creating a new layer using the CreateLayer method, this property will be ignored if it specifies an empty string. When updating an existing layer using the SetLayerAttributes method, the corresponding element will always be updated by the value of the property. Finally, when retrieving the attributes of a layer using the GetLayerAttributes method, the property will be set to an empty string if the element doesn’t exist.

See Also

Elements: | LayerAttributes property, CreateLayer method, GetLayerAttributes method, SetLayerAttributes method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface


LayerName property (IDicomLayerAttributes)

LayerName property (IDicomLayerAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR LayerName
Overview | Refer to Working with DICOM Annotations

Remarks

The LayerName property specifies the value of the "Graphic Layer" (0070,0002) element.

See Also

Elements: | LayerAttributes property, CreateLayer method, GetLayerAttributes method, SetLayerAttributes mthod
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface


LayerOrder property (IDicomLayerAttributes)

LayerOrder property (IDicomLayerAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long LayerOrder
Overview | Refer to Working with DICOM Annotations

Remarks

The LayerOrder property specifies the value of the "Graphic Layer Order" (0070,0062) element.

See Also

Elements: | LayerAttributes property, CreateLayer method, GetLayerAttributes method, SetLayerAttributes method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface


InstanceNumber property (IDicomPresStateAttributes)

InstanceNumber property (IDicomPresStateAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long InstanceNumber
Overview | Refer to Working with DICOM Annotations

Remarks

The InstanceNumber property specifies the value of the "Instance Number" (0020,0013) element.

See Also

Elements: | PresStateAttributes property, GetPresStateAttributes method, SetPresStateAttributes method.
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


PresCreationDate property(IDicomPresStateAttributes)

PresCreationDate property (IDicomPresStateAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | IDATEVALUEItem* PresCreationDate
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The PresCreationDate property specifies the value of the "Presentation Creation Date" (0070,0082) element.

See Also

Elements: | PresStateAttributes property, GetPresStateAttributes method, SetPresStateAttributes method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


PresCreationTime property (IDicomPresStateAttributes)

PresCreationTime property (IDicomPresStateAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | ITIMEVALUEItem* PresCreationTime
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The PresCreationTime property specifies the value of the "Presentation Creation Time" (0070,0083) element.

See Also

Elements: | PresStateAttributes property, GetPresStateAttributes method, SetPresStateAttributes method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


PresCreatorName property (IDicomPresStateAttributes)

PresCreatorName property (IDicomPresStateAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR PresCreatorName
Overview | Refer to Working with DICOM Annotations

Remarks

The PresCreatorName property specifies the value of the "Presentation Creator’s Name" (0070,0084) element.

See Also

Elements: | PresStateAttributes property, GetPresStateAttributes method, SetPresStateAttributes method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


PresDescription property(IDicomPresStateAttributes)

PresDescription property (IDicomPresStateAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR PresDescription
Overview | Refer to Working with DICOM Annotations

Remarks

The PresDescription property specifies the value of the "Presentation Description" (0070,0081) element.

See Also

Elements: | PresStateAttributes property, GetPresStateAttributes method, SetPresStateAttributes method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


PresLabel property (IDicomPresStateAttributes)

PresLabel property (IDicomPresStateAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR PresLabel
Overview | Refer to Working with DICOM Annotations

Remarks

The PresLabel property specifies the value of the "Presentation Label" (0070,0080) element.

See Also

Elements: | PresStateAttributes property, GetPresStateAttributes method, SetPresStateAttributes method.
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


AnchorPointUnits property (IDicomTextObjectAttributes)

AnchorPointUnits property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | DicomMeasureUnits AnchorPointUnits
Overview | Refer to Working with DICOM Annotations

Remarks

The AnchorPointUnits property specifies the value of the "Anchor Point Annotation Units" (0070,0004) element. Possible values are:

Value | Meaning
DICOM_UNIT_PIXEL | [1] "PIXEL".
DICOM_UNIT_DISPLAY | [2] "DISPLAY".

See Also

Elements: | AnchorPointUsed property, AnchorPointX property, AnchorPointY property, AnchorPointVisible property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


AnchorPointUsed property (IDicomTextObjectAttributes)

AnchorPointUsed property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | VARIANT_BOOL AnchorPointUsed
Overview | Refer to Working with DICOM Annotations

Remarks

The AnchorPointUsed property indicates whether the values specified by the following properties are valid:

AnchorPointX property

AnchorPointY property

When creating a new text annotation object using the CreateTextObject method and when updating an exiting object using the SetTextObjectAttributes method, the properties listed above will be ignored unless the AnchorPointUsed property is set to VARIANT_TRUE. The two methods will return an error if both the AnchorPointUsed property and the BoundingBoxUsed property are set to VARIANT_FALSE.

When retrieving the attributes of a text annotation object using the GetTextObjectAttributes method, the values specified by the properties listed above are not valid unless the AnchorPointUsed property is updated with VARIANT_TRUE.

See Also

Elements: | BoundingBoxUsed property, AnchorPointUnits property, AnchorPointX property, AnchorPointY property, AnchorPointVisible property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


AnchorPointVisible property (IDicomTextObjectAttributes)

AnchorPointVisible property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | VARIANT_BOOL AnchorPointVisible
Overview | Refer to Working with DICOM Annotations

Remarks

The AnchorPointVisible property specifies the value of the "Anchor Point Visibility" (0070,0015) element. Possible values are:

Value | Meaning
VARIANT_TRUE | "Y" = yes.
VARIANT_FALSE | "N" = no.

See Also

Elements: | AnchorPointUsed property, BoundingBoxUnits property, AnchorPointX property, AnchorPointY property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


AnchorPointX property (IDicomTextObjectAttributes)

AnchorPointX property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | float AnchorPointX
Overview | Refer to Working with DICOM Annotations

Remarks

The AnchorPointX property is the x-coordinate (horizontal offset) specified by the "Anchor Point" (0070,0014) element. Refer to the AnchorPointUsed property for more information.

See Also

Elements: | AnchorPointUsed property, BoundingBoxUnits property, AnchorPointY property, AnchorPointVisible property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


AnchorPointY property (IDicomTextObjectAttributes)

AnchorPointY property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | float AnchorPointY
Overview | Refer to Working with DICOM Annotations

Remarks

The AnchorPointY property is the y-coordinate (vertical offset) specified by the "Anchor Point" (0070,0014) element. Refer to the AnchorPointUsed property for more information.

See Also

Elements: | AnchorPointUsed property, BoundingBoxUnits property, AnchorPointX property, AnchorPointVisible property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method . SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


BoundingBoxBRHCornerX property (IDicomTextObjectAttributes)

BoundingBoxBRHCornerX property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | float BoundingBoxBRHCornerX
Overview | Refer to Working with DICOM Annotations

Remarks

The BoundingBoxBRHCornerX property is the x-coordinate (horizontal offset) specified by the "Bounding Box Bottom Right Hand Corner" (0070,0011) element. Refer to the BoundingBoxUsed property for more information.

See Also

Elements: | BoundingBoxUsed property, BoundingBoxUnits property, BoundingBoxTLHCornerX property, BoundingBoxTLHCornerY property, BoundingBoxBRHCornerY property, BoundingBoxTextJustification property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


BoundingBoxBRHCornerY property (IDicomTextObjectAttributes)

BoundingBoxBRHCornerY property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | float BoundingBoxBRHCornerY
Overview | Refer to Working with DICOM Annotations

Remarks

The BoundingBoxBRHCornerY property is the y-coordinate (vertical offset) specified by the "Bounding Box Bottom Right Hand Corner" (0070,0011) element. Refer to the BoundingBoxUsed property for more information.

See Also

Elements: | BoundingBoxUsed property, BoundingBoxUnits property, BoundingBoxTLHCornerX property, BoundingBoxTLHCornerY property, BoundingBoxBRHCornerX property, BoundingBoxTextJustification property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


BoundingBoxTextJustification property (IDicomTextObjectAttributes)

BoundingBoxTextJustification property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | DicomTextJustificationTypes BoundingBoxTextJustification
Overview | Refer to Working with DICOM Annotations

Remarks

The BoundingBoxTextJustification property specifies the value of the "Bounding Box Text Horizontal Justification" (0070,0012) element. Possible values are:

Value | Meaning
DICOM_TEXT_JUSTIFICATION_LEFT | [0] "LEFT".
DICOM_TEXT_JUSTIFICATION_RIGHT | [1] "RIGHT".
DICOM_TEXT_JUSTIFICATION_CENTER | [2] "CENTER".

See Also

Elements: | BoundingBoxUsed property, BoundingBoxUnits property, BoundingBoxTLHCornerX property, BoundingBoxTLHCornerY property, BoundingBoxBRHCornerX property, BoundingBoxBRHCornerY property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


BoundingBoxTLHCornerX property (IDicomTextObjectAttributes)

BoundingBoxTLHCornerX property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | float BoundingBoxTLHCornerX
Overview | Refer to Working with DICOM Annotations

Remarks

The BoundingBoxTLHCornerX property is the x-coordinate (horizontal offset) specified by the "Bounding Box Top Left Hand Corner" (0070,0010) element. Refer to the BoundingBoxUsed property for more information.

See Also

Elements: | BoundingBoxUsed property, BoundingBoxUnits property, BoundingBoxTLHCornerY property, BoundingBoxBRHCornerX property, BoundingBoxBRHCornerY property, BoundingBoxTextJustification property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


BoundingBoxTLHCornerY property (IDicomTextObjectAttributes)

BoundingBoxTLHCornerY property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | float BoundingBoxTLHCornerY
Overview | Refer to Working with DICOM Annotations

Remarks

The BoundingBoxTLHCornerY property is the y-coordinate (vertical offset) specified by the "Bounding Box Top Left Hand Corner" (0070,0010) element. Refer to the BoundingBoxUsed property for more information.

See Also

Elements: | BoundingBoxUsed property, BoundingBoxUnits property, BoundingBoxTLHCornerX property, BoundingBoxBRHCornerX property, BoundingBoxBRHCornerY property, BoundingBoxTextJustification property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


BoundingBoxUnits property (IDicomTextObjectAttributes)

BoundingBoxUnits property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | DicomMeasureUnits BoundingBoxUnits
Overview | Refer to Working with DICOM Annotations

Remarks

The BoundingBoxUnits property specifies the value of the "Bounding Box Annotation Units" (0070,0003) element. Possible values are:

Value | Meaning
DICOM_UNIT_PIXEL | [1] "PIXEL".
DICOM_UNIT_DISPLAY | [2] "DISPLAY".

See Also

Elements: | BoundingBoxUsed property, BoundingBoxTLHCornerX property, BoundingBoxTLHCornerY property, BoundingBoxBRHCornerX property, BoundingBoxBRHCornerY property, BoundingBoxTextJustification property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


BoundingBoxUsed property (IDicomTextObjectAttributes)

BoundingBoxUsed property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | VARIANT_BOOL BoundingBoxUsed
Overview | Refer to Working with DICOM Annotations

Remarks

The BoundingBoxUsed property indicates whether the values specified by the following properties are valid:

BoundingBoxTLHCornerX property, BoundingBoxTLHCornerY property, BoundingBoxBRHCornerX property, BoundingBoxBRHCornerY property

When creating a new text annotation object using the CreateTextObject method and when updating an exiting object using the SetTextObjectAttributes method, the properties listed above will be ignored unless the BoundingBoxUsed property is set to VARIANT_TRUE. The two methods will return an error if both the BoundingBoxUsed property and the AnchorPointUsed property are set to VARIANT_FALSE.

When retrieving the attributes of a text annotation object using the GetTextObjectAttributes method, the values specified by the properties listed above are not valid unless the BoundingBoxUsed property is updated with VARIANT_TRUE.

See Also

Elements: | AnchorPointUsed property, BoundingBoxUnits property, BoundingBoxTLHCornerX property, BoundingBoxTLHCornerY property, BoundingBoxBRHCornerX property, BoundingBoxBRHCornerY property, BoundingBoxTextJustification property, TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


LayerName property (IDicomTextObjectAttributes)

LayerName property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR LayerName
Overview | Refer to Working with DICOM Annotations

Remarks

The LayerName property specifies the value of the "Graphic Layer" (0070,0002) element.

This property is ignored when updating a text annotation object using the SetTextObjectAttributes method. It is also ignored when creating a new text annotation object using the CreateTextObject method unless the bCheckLayer parameter of the method is set (in this case, the property will be used only to verify the existence of the layer). Finally, when retrieving the attributes of a text annotation object using the GetTextObjectAttributes method, the property is always updated with the name of the layer where the object resides.

See Also

Elements: | TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


TextValue property (IDicomTextObjectAttributes)

TextValue property (IDicomTextObjectAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR TextValue
Overview | Refer to Working with DICOM Annotations

Remarks

The TextValue property specifies the value of the "Unformatted Text Value" (0070,0006) element.

See Also

Elements: | TextObjectAttributes property, CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface


AnnotationGroupNumber property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long AnnotationGroupNumber
Overview | Refer to Working with DICOM Waveforms.

Remarks

The AnnotationGroupNumber property specifies the Annotation Group Number (0040,A180).

This property is valid only if the ValueDefined property(ANNOTATION_GROUP_NUMBER) is set to VARIANT_TRUE.

See Also

Elements: | CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


CodedName property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomCodeSequenceItem* CodedName
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The CodedName property specifies the Coded Name of the annotation. It corresponds to the Concept Name Code Sequence (0040,A043) Item.

This property is valid only if the ValueType property is set to any one of the following values:

TYPE_CODED_NAME

TYPE_CODED_NAME_AND_CODED_VALUE

TYPE_CODED_NAME_AND_NUMERIC_VALUE

See Also

Elements: | AnnotationGroupNumber property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


CodedValue property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomCodeSequenceItem* CodedValue
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The CodedValue property specifies the Coded Value of the annotation. It corresponds to the Concept Code Sequence (0040,A168) Item.

This property is valid only if the ValueType property is set to TYPE_CODED_NAME_AND_CODED_VALUE.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


MeasurementUnits property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomCodeSequenceItem* MeasurementUnits
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The MeasurementUnits property specifies the Measurement Units of the annotation. It corresponds to the Measurement Units Code Sequence (0040,08EA) Item.

This property is valid only if the ValueDefined property (MEASUREMENT_UNITS) is set to VARIANT_TRUE.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


NumericValue property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double NumericValue(long lIndex)
Overview | Refer to Working with DICOM Waveforms.

Remarks

The NumericValue property specifies the array of numeric values that correspond to the Numeric Value (0040,A30A).

This property is valid only if the ValueType property is set to TYPE_CODED_NAME_AND_NUMERIC_VALUE.

Before filling the array with numeric values, storage must be first allocated by setting the NumericValueCount property to the required number of values.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


NumericValueCount property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long NumericValueCount
Overview | Refer to Working with DICOM Waveforms.

Remarks

The NumericValueCount property specifies the number of numeric values contained in the NumericValue property.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


RefDatetime property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDATETIMEVALUEItem* RefDatetime(long lIndex)
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The RefDatetime property specifies an array that contains the date-time values that represent the temporal points defined for the annotation. It corresponds to the Referenced Datetime (0040,A13A). If the TemporalPointsType property is set to TYPE_DATETIME, the number of date-time values contained in the array is given by the TemporalPointCount property; otherwise, the array is empty and shouldn’t be used.

Before filling the array with date-time values, the TemporalPointsType property must be set to TYPE_DATETIME and storage must be allocated by setting the TemporalPointCount property to the required number of date-time values.

For more information on the DATETIMEVALUEItem object, refer to the DateTimeValues property.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


RefSamplePositions property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long RefSamplePositions(long lIndex)
Overview | Refer to Working with DICOM Waveforms.

Remarks

The RefSamplePositions property specifies an array that contains the sample positions that represent the temporal points defined for the annotation. It corresponds to the Referenced Sample Positions (0040,A132). If the TemporalPointsType property is set to TYPE_SAMPLE_POSITIONS, the number of sample positions contained in the array is given by the TemporalPointCount property; otherwise, the array is empty and shouldn’t be accessed.

Notice that in the array specified by the RefSamplePositions property, the index of the sample within the RefSamplePositions array corresponds to the position of the sample within the waveform channel.

Before filling the array with sample positions, the TemporalPointsType property must be set to TYPE_SAMPLE_POSITIONS and storage must be allocated by setting the TemporalPointCount property to the required number of sample positions.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


RefTimeOffsets property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double RefTimeOffsets(long lIndex)
Overview | Refer to Working with DICOM Waveforms.

Remarks

The RefTimeOffsets property specifies an array that contains the time offsets that represent the temporal points defined for the annotation. It corresponds to the Referenced Time Offsets (0040,A138). If the TemporalPointsType property is set to TYPE_TIME_OFFSETS, the number of time offsets contained in the array is given by the TemporalPointCount property; otherwise, the array is empty and shouldn’t be accessed.

Before filling the array with time offsets, the TemporalPointsType property must be set to TYPE_TIME_OFFSETS and storage must be allocated by setting the TemporalPointCount property to the required number of time offsets.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


TemporalPointCount property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long TemporalPointCount
Overview | Refer to Working with DICOM Waveforms.

Remarks

The TemporalPointCount property specifies the number of temporal points defined for the annotation. If the TemporalPointsType property is set to TYPE_SAMPLE_POSITIONS, then this property contains the number of sample positions contained in the array specified by the RefSamplePositions property. If the TemporalPointsType property is set to TYPE_TIME_OFFSETS, then this property contains the number of time offsets contained in the array specified by the RefTimeOffsets property. Finally, if the TemporalPointsType property is set to TYPE_DATETIME, then this property contains the number of date-time values contained in the array specified by the RefDatetime property.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


TemporalPointsType property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomWaveformAnnTemporalPointsType TemporalPointsType
Overview | Refer to Working with DICOM Waveforms.

Remarks

The TemporalPointsType property specifies whether temporal points are defined for the annotation and if so, how they are defined. Possible values are:

Value | Meaning
TYPE_NO_TEMPORAL_POINTS | [1] No temporal points are defined; the annotation applies to the entire waveform channel.
TYPE_SAMPLE_POSITIONS | [2] The temporal points are defined by the sample positions given by the RefSamplePositions property.
TYPE_TIME_OFFSETS | [3] The temporal points are defined by the time offsets given by the RefTimeOffsets property.
TYPE_DATETIME | [4] The temporal points are defined by the absolute time values given by the RefDatetime property.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


TemporalRangeType property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomWaveformAnnTemporalRangeType TemporalRangeType
Overview | Refer to Working with DICOM Waveforms.

Remarks

The TemporalRangeType property specifies the temporal range type of the annotated. It corresponds to the Temporal Range Type (0040,A130). Possible values are:

Value | Meaning
TEMPORAL_RANGE_TYPE_POINT | [1] A single temporal point.
TEMPORAL_RANGE_TYPE_MULTIPOINT | [2] Multiple temporal points.
TEMPORAL_RANGE_TYPE_SEGMENT | [3] A range between two temporal points.
TEMPORAL_RANGE_TYPE_MULTISEGMENT | [4] Multiple segments, each denoted by two temporal points.
TEMPORAL_RANGE_TYPE_BEGIN | [5] A range beginning at one temporal point, and extending beyond the end of the acquired data.
TEMPORAL_RANGE_TYPE_END | [6] A range beginning before the start of the acquired data, and extending to (and including) the identified temporal point.

This property is valid only if the TemporalPointsType property is set to any of the following values:

TYPE_SAMPLE_POSITIONS

TYPE_TIME_OFFSETS

TYPE_DATETIME

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


UnformattedTextValue property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR UnformattedTextValue
Overview | Refer to Working with DICOM Waveforms.

Remarks

The UnformattedTextValue property specifies the Unformatted Text Value (0070,0006) of the annotation.

This property is valid only if the ValueType property is set to TYPE_UNFORMATTED_TEXT_VALUE.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, ValueDefined property (IDicomWaveformAnnotation), ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


ValueDefined property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL ValueDefined(DicomWaveformAnnValues Value)
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ValueDefined property is an array of Boolean values used to indicate which properties contain valid data for this annotation object. Possible values are:

Value | Meaning
VARIANT_TRUE | The specified annotation value is defined and is contained in the corresponding property.
VARIANT_FALSE | The specified annotation value is not defined for the annotation.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueType property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Groups: Setting/Getting Attributes


ValueType property (IDicomWaveformAnnotation Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomWaveformAnnValueType ValueType
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ValueType property specifies which properties that define the annotation. Possible values are:

Value | Meaning
TYPE_UNFORMATTED_TEXT_VALUE | [1] The annotation is defined by the UnformattedTextValue property.
TYPE_CODED_NAME | [2] The annotation is defined by the CodedName property.
TYPE_CODED_NAME_AND_CODED_VALUE | [3] The annotation is defined by the CodedName property and the CodedValue property.
TYPE_CODED_NAME_AND_NUMERIC_VALUE | [4] The annotation is defined by the CodedName property and the NumericValue property.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property (IDicomWaveformAnnotation)
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


_NewEnum property (IDicomWaveformAnnotations Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IUnknown* _NewEnum
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The _NewEnum property gets an IEnumVARIANT interface on an enumeration object for the collection.

This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property, ValueType property, Count property, Item method, Add method, Remove method
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


Count property (IDicomWaveformAnnotations Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Count
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The Count property contains the number of DicomWaveformAnnotation objects in the collection.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property, ValueType property, Count property (lDicomWaveformAnnotations), _NewEnum property, Item method (lDicomWaveformAnnotations), Add method, Remove method
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


Add method (IDicomWaveformAnnotations Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IdicomWaveformAnnotation * Add();
Overview | Refer to Working with DICOM Waveforms.

Remarks

The Add method adds a new DicomWaveformAnnotation object to the collection.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property, ValueType property, Count property, _NewEnum property, Item method, Remove method
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


Item method (IDicomWaveformAnnotations Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomWaveformAnnotation* Item(long lIndex);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The Item method returns a DicomWaveformAnnotation object from the collection. This is the default member of the IDicomWaveformAnnotations interface.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property, ValueType property, Count property, _NewEnum property, Add method, Remove method
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


Remove method (IDicomWaveformAnnotations Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void Remove(long lIndex);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The Remove method removes the specified DicomWaveformAnnotation object from the collection.

See Also

Elements: | AnnotationGroupNumber property, CodedName property, CodedValue property, MeasurementUnits property, NumericValue property, NumericValueCount property, RefDatetime property, RefSamplePositions property, RefTimeOffsets property, TemporalPointCount property, TemporalPointsType property, TemporalRangeType property, UnformattedTextValue property, ValueDefined property, ValueType property, Count property, _NewEnum property, Item method, Add method
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


Annotations property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomWaveformAnnotations* Annotations
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The Annotations property contains the collection of the annotations applied to the waveform channel.

For more information on the collection of annotations, refer to lDicomWaveformAnnotations. For more information on the individual annotations within a collection, refer to lDicomWaveformAnnotation.

See Also

Elements: | ChannelMaximumValue property, ChannelSensitivityCF property, WaveformChannelNumber property, NotchFilterBandwidth property, ChannelMaximumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterLowFrequency property, ChannelOffset property, Index property, WaveformGroup property, NotchFilterFrequency property, FilterHighFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


ChannelBaseline property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double ChannelBaseline
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelBaseline property specifies the Channel Baseline (003A,0213).

This property value is valid only if ValueDefined [CHANNEL_SENSITIVITY] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Channel Sensitivity


ChannelLabel property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ChannelLabel
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelLabel property specifies the Channel Label (003A,0203).

This property value is valid only if ValueDefined [CHANNEL_LABEL] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, WaveformChannelNumber property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


ChannelMaximumValue property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long ChannelMaximumValue
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelMaximumValue property specifies the Channel Maximum Value (5400,0112).

This property value is valid only if ValueDefined (CHANNEL_MAXIMUM_VALUE) is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, WaveformChannelNumber property, NotchFilterBandwidth property, ChannelMaximumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterLowFrequency property, ChannelOffset property, Index property, WaveformGroup property, NotchFilterFrequency property, FilterHighFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


ChannelMinimumValue property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long ChannelMinimumValue
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelMinimumValue property specifies the Channel Minimum Value (5400,0110).

This property value is valid only if ValueDefined (CHANNEL_MINIMUM_VALUE) is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, WaveformChannelNumber property, NotchFilterBandwidth property, ChannelMinimumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterLowFrequency property, ChannelOffset property, Index property, WaveformGroup property, NotchFilterFrequency property, FilterHighFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


ChannelOffset property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double ChannelOffset
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelOffset property specifies the Channel Offset (003A,0218).

This property value is valid only if ValueDefined [CHANNEL_OFFSET] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, WaveformChannelNumber property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


ChannelSamples property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long ChannelSamples(long lIndex)
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The ChannelSamples property is an array that is updated with the samples (data) for this waveform channel object.

Please note that the data is always encapsulated as 32-bit regardless of the bits allocated for the channel (8- or 16-bit). You can tell if the data for the channel is 8- or 16-bit from the waveform sample interpretation. For 8-bit channels the "Waveform Sample Interpretation" (5400,1006) can either be signed 8-bit linear (DICOM_SAMPLE_INTERPRETATION_SB), unsigned 8-bit linear (DICOM_SAMPLE_INTERPRETATION_UB), 8-bit mu-law (DICOM_SAMPLE_INTERPRETATION_MB) or 8-bit A-law(DICOM_SAMPLE_INTERPRETATION_AB). For 16-bit channels the "Waveform Sample Interpretation" can either be signed 16-bit linear (DICOM_SAMPLE_INTERPRETATION_SS) or unsigned 16-bit linear (DICOM_SAMPLE_INTERPRETATION_US). The SampleInterpretation property contains the waveform sample interpretation.

The property cannot be used to set or modify the values of the samples. To set the sample values, call the SetChannelSamples method.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ChannelSensitivity property, ChannelSensitivityCF property, ChannelSensitivityUnits property, ChannelSource property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, NumberOfSamples property, ValueDefined property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Channel Samples


ChannelSampleSkew property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double ChannelSampleSkew
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelSampleSkew property specifies the Channel Sample Skew (003A,0215).

This property value is valid only if ValueDefined [CHANNEL_SAMPLE_SKEW] is VARIANT_TRUE.

When the ValueDefined property[CHANNEL_SAMPLE_SKEW] is VARIANT_TRUE, the ValueDefined property[CHANNEL_TIME_SKEW] is automatically set to VARIANT_FALSE, and vice versa.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


ChannelSensitivity property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double ChannelSensitivity
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelSensitivity property specifies the Channel Sensitivity (003A,0210).

This property value is valid only if ValueDefined [CHANNEL_SENSITIVITY] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ValueDefined property, ChannelSensitivityCF property, ChannelSensitivityUnits property, NumberOfSamples property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Channel Sensitivity


ChannelSensitivityCF property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double ChannelSensitivityCF
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelSensitivityCF property specifies the Channel Sensitivity Correction Factor (003A,0212).

This property value is valid only if ValueDefined [CHANNEL_SENSITIVITY] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Channel Sensitivity


ChannelSensitivityUnits property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomCodeSequenceItem* ChannelSensitivityUnits
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The ChannelSensitivityUnits property is updated with the units of measure for the Channel Sensitivity. It corresponds to the Channel Sensitivity Units Sequence (003A,0211) Item.

This property value is valid only if ValueDefined [CHANNEL_SENSITIVITY] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ValueDefined property, ChannelSensitivityCF property, ChannelSensitivity property, NumberOfSamples property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Channel Sensitivity


ChannelSource property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomCodeSequenceItem* ChannelSource
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The ChannelSource property is updated with the channel source. It corresponds to the Channel Source Sequence (003A,0208) Item.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ChannelSensitivity property, ChannelSensitivityCF property, ChannelSensitivityUnits property, NumberOfSamples property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ValueDefined property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Channel Source


ChannelStatus property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomWaveformChannelStatus ChannelStatus
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelStatus property specifies the Channel Status (003A,0205).

This property value is valid only if ValueDefined [CHANNEL_STATUS] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


ChannelTimeSkew property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double ChannelTimeSkew
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ChannelTimeSkew property specifies the Channel Time Skew (003A,0214).

This property value is valid only if ValueDefined [CHANNEL_TIME_SKEW] is VARIANT_TRUE.

When the ValueDefined property[CHANNEL_TIME_SKEW] is VARIANT_TRUE, the ValueDefined property[CHANNEL_SAMPLE_SKEW] is automatically set to VARIANT_FALSE, and vice versa.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


FilterHighFrequency property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double FilterHighFrequency
Overview | Refer to Working with DICOM Waveforms.

Remarks

The FilterHighFrequency property specifies the Filter High Frequency (003A,0221).

This property value is valid only if ValueDefined [FILTER_HIGH_FREQUENCY] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, WaveformChannelNumber property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterLowFrequency property, ChannelOffset property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


FilterLowFrequency property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double FilterLowFrequency
Overview | Refer to Working with DICOM Waveforms.

Remarks

The FilterLowFrequency property specifies the Filter Low Frequency (003A,0220).

This property value is valid only if ValueDefined [FILTER_LOW_FREQUENCY] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, WaveformChannelNumber property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterHighFrequency property, ChannelOffset property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


Index property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Index
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The Index property is updated with the zero-based index of this waveform channel object within the waveform group to which it belongs.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSamples property, ChannelSampleSkew property, ChannelSensitivity property, ChannelSensitivityCF property, ChannelSensitivityUnits property, ChannelSource property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, NumberOfSamples property, ValueDefined property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


NotchFilterBandwidth property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double NotchFilterBandwidth
Overview | Refer to Working with DICOM Waveforms.

Remarks

The NotchFilterBandwidth property specifies the Notch Filter Bandwidth (003A,0223).

This property value is valid only if ValueDefined (NOTCH_FILTER_BANDWIDTH) is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, WaveformChannelNumber property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterLowFrequency property, ChannelOffset property, Index property, WaveformGroup property, NotchFilterFrequency property, FilterHighFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


NotchFilterFrequency property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double NotchFilterFrequency
Overview | Refer to Working with DICOM Waveforms.

Remarks

The NotchFilterFrequency property specifies the Notch Filter Frequency (003A,0222).

This property value is valid only if ValueDefined [NOTCH_FILTER_FREQUENCY] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, WaveformChannelNumber property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterLowFrequency property, ChannelOffset property, Index property, WaveformGroup property, NotchFilterBandwidth property, FilterHighFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


NumberOfSamples property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long NumberOfSamples
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The NumberOfSamples property is updated with the number of channel samples in the ChannelSamples property.

The property cannot be used to set or modify the number of the samples. To set the number of samples, call the SetNumberOfSamplesPerChannel method for the waveform group object to which the channel belongs.

This property and the NumberOfSamplesPerChannel property specify the same number.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ChannelSensitivity property, ChannelSensitivityCF property, ChannelSensitivityUnits property, ChannelSource property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ValueDefined property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Channel Samples


ValueDefined property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL ValueDefined(DicomWaveformChannelValues Value)
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ValueDefined property is an array of Boolean values used to indicate which properties contain valid data for this waveform channel object. Possible values are:

Value | Meaning
VARIANT_TRUE | The specified channel value is defined and is contained in the corresponding property or properties.
VARIANT_FALSE | The specified channel value is not defined for the channel.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSampleSkew property, ChannelSensitivity property, ChannelSensitivityCF property, ChannelSensitivityUnits property, NumberOfSamples property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Adding/Managing Waveform Annotations


WaveformChannelNumber property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long WaveformChannelNumber
Overview | Refer to Working with DICOM Waveforms.

Remarks

The WaveformChannelNumber property specifies the Waveform Channel Number (003A,0202).

This property value is valid only if ValueDefined [WAVEFORM_CHANNEL_NUMBER] is VARIANT_TRUE.

See Also

Elements: | Annotations property, ChannelSensitivityCF property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterHighFrequency property, FilterLowFrequency property, Index property, WaveformGroup property, NotchFilterBandwidth property, NotchFilterFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


WaveformGroup property (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomWaveformGroup* WaveformGroup
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The WaveformGroup property contains a reference to the DicomWaveformGroup object that contains the waveform channel.

See Also

Elements: | Annotations property, ChannelBaseline property, ChannelLabel property, ChannelMaximumValue property, ChannelMinimumValue property, ChannelOffset property, ChannelSamples property, ChannelSampleSkew property, ChannelSensitivity property, ChannelSensitivityCF property, ChannelSensitivityUnits property, ChannelSource property, ChannelStatus property, ChannelTimeSkew property, FilterHighFrequency property, FilterLowFrequency property, Index property, NotchFilterBandwidth property, NotchFilterFrequency property, NumberOfSamples property, ValueDefined property, WaveformChannelNumber property
Topics: | DICOM Waveform Channels: Setting/Getting Other Channel Attributes


SetChannelSamples method (IDicomWaveformChannel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long SetChannelSamples(VARIANT Samples);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The SetChannelSamples method sets the new samples for a channel. The ChannelSamples property contains the array of samples.

Before calling the SetChannelSamples method, storage must be allocated for the array by calling the SetNumberOfSamplesPerChannel method (lDicomWaveformGroup) for the waveform group object to which the channel belongs. In addition, the SampleInterpretation property must be set to the required Waveform Sample Interpretation before setting the samples.

The number of samples set will be the minimum of the size of the specified safearray and the number specified by the NumberOfSamples property.

See Also

Elements: | Annotations property, ChannelMaximumValue property, ChannelSensitivityCF property, WaveformChannelNumber property, NotchFilterBandwidth property, ChannelMaximumValue property, ChannelLabel property, ChannelTimeSkew property, ValueDefined property, ChannelSensitivityUnits property, ChannelSensitivity property, NumberOfSamples property, ChannelBaseline property, ChannelStatus property, FilterLowFrequency property, ChannelOffset property, Index property, WaveformGroup property, NotchFilterFrequency property, FilterHighFrequency property, ChannelSamples property, ChannelSource property, ChannelSampleSkew property
Topics: | DICOM Waveform Channels: Setting/Getting Channel Samples


_NewEnum property (IDicomWaveformChannels Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IUnknown* _NewEnum
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The _NewEnum property gets an IEnumVARIANT interface to an enumeration object for the collection.

This is a standard property that allows the collection to be iterated through using the For…Each syntax of Visual Basic and VBScript.

See Also

Elements: | Channels property, Count property, Item method, Add method, Remove method
Topics: | DICOM Waveform Channels: Manipulating a Collection of Channels


Count property (IDicomWaveformChannels Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Count
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The Count property is updated with the number of DicomWaveformChannel objects in the collection.

See Also

Elements:

Channels property, _NewEnum property, Item method, Add method, Remove method


Add method (IDicomWaveformChannels Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomWaveformChannel * Add();
Overview | Refer to Working with DICOM Waveforms.

Remarks

The Add method adds a new DicomWaveformChannel object to the collection.

See Also

Elements: | Channels property, Count property, _NewEnum property, Item method, Remove method
Topics: | DICOM Waveform Channels: Manipulating a Collection of Channels


Item method (IDicomWaveformChannels Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomWaveformChannel* Item(long lIndex);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The Item method returns a pointer to the DicomWaveformChannel object located at the specified index in the collection. This is the default member of the IDicomWaveformChannels interface.

See Also

Elements:

Channels property, Count property, _NewEnum property, Add method, Remove method


Remove method (IDicomWaveformChannels Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void Remove(long lIndex);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The Remove method removes the specified DicomWaveformChannel object from the collection.

See Also

Elements: | Channels property, Count property, _NewEnum property, Item method, Add method
Topics: | DICOM Waveform Channels: Manipulating a Collection of Channels


Channels property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomWaveformChannels* Channels
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The Channels property contains the collection of waveform channels that belong to the waveform multiplex group.

See Also

Elements: | EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Manipulating Channels


EnableMethodErrors property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL EnableMethodErrors
Overview | Refer to Working with DICOM Waveforms.

Remarks

The EnableMethodErrors property specifies whether LEADTOOLS generates runtime exceptions (in addition to error return codes). Possible values are:

Value | Meaning
VARIANT_TRUE | Generate runtime exceptions.
VARIANT_FALSE | Do not generate runtime exceptions.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Constructing, Destructing and Resetting


MultiplexGroupLabel property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR MultiplexGroupLabel
Overview | Refer to Working with DICOM Waveforms.

Remarks

The MultiplexGroupLabel property specifies the Multiplex Group Label (003A,0020).

This property value is valid only if ValueDefined[MULTIPLEX_GROUP_LABEL] is VARIANT_TRUE.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformPaddingValue property, WaveformOriginality property
Topics: | DICOM Waveform Groups: Setting/Getting Attributes


MultiplexGroupTimeOffset property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double MultiplexGroupTimeOffset
Overview | Refer to Working with DICOM Waveforms.

Remarks

The MultiplexGroupTimeOffset property specifies the Multiplex Group Time Offset (0018,1068).

This property value is valid only if ValueDefined [MULTIPLEX_GROUP_TIME_OFFSET] is VARIANT_TRUE.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformPaddingValue property, WaveformOriginality property
Topics: | DICOM Waveform Groups: Setting/Getting Attributes


NumberOfSamplesPerChannel property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long NumberOfSamplesPerChannel
Overview | Refer to Working with DICOM Waveforms.

Remarks

(Read only) The NumberOfSamplesPerChannel property is updated with the Number of Waveform Samples (003A,0010).

Use the SetNumberOfSamplesPerChannel method to set the number of samples per channel.

This property and the NumberOfSamples property (lDicomWaveformChannel) for any channel object that belongs to the waveform group specify the same number.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Manipulating Channels


SampleInterpretation property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomWaveformSampleInterpretation SampleInterpretation
Overview | Refer to Working with DICOM Waveforms.

Remarks

The SampleInterpretation property specifies the Waveform Sample Interpretation (5400,1006). Possible values are:

Value | Meaning
WAVEFORM_SAMPLE_INTERPRETATION_SS | [0] Signed 16-bit linear.
WAVEFORM_SAMPLE_INTERPRETATION_US | [1] Unsigned 16-bit linear.
WAVEFORM_SAMPLE_INTERPRETATION_SB | [2] Signed 8-bit linear.
WAVEFORM_SAMPLE_INTERPRETATION_UB | [3] Unsigned 8-bit linear.
WAVEFORM_SAMPLE_INTERPRETATION_MB | [4] 8-bit mu-law.
WAVEFORM_SAMPLE_INTERPRETATION_AB | [5] 8-bit A-law.

All channels within a multiplex group have the same sample interpretation.

This property must be set before calling the SetChannelSamples method to set the samples of a channel. If this property is set after setting the samples, the values of the samples will be converted to match the new sample interpretation.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Setting/Getting Attributes
 | DICOM Waveform Channels: Setting/Getting Channel Samples


SamplingFrequency property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double SamplingFrequency
Overview | Refer to Working with DICOM Waveforms.

Remarks

The SamplingFrequency property specifies the Sampling Frequency (003A,001A).

The frequency is measured in Hz.

All channels within a multiplex group are synchronously digitized at a common sampling frequency.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Setting/Getting Attributes


TriggerSamplePosition property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long TriggerSamplePosition
Overview | Refer to Working with DICOM Waveforms.

Remarks

The TriggerSamplePosition property specifies the Trigger Sample Position (0018,106E).

This property value is valid only if ValueDefined[TRIGGER_SAMPLE_POSITION] is VARIANT_TRUE.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerTimeOffset property, ValueDefined property, WaveformPaddingValue property, WaveformOriginality property
Topics: | DICOM Waveform Groups: Setting/Getting Attributes


TriggerTimeOffset property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double TriggerTimeOffset
Overview | Refer to Working with DICOM Waveforms.

Remarks

The TriggerTimeOffset property specifies the Trigger Time Offset (0018,1069).

This property value is valid only if ValueDefined[TRIGGER_TIME_OFFSET] is VARIANT_TRUE.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, ValueDefined property, WaveformPaddingValue property, WaveformOriginality property
Topics: | DICOM Waveform Groups: Setting/Getting Attributes


ValueDefined property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL ValueDefined(DicomWaveformGroupValues Value)
Overview | Refer to Working with DICOM Waveforms.

Remarks

The ValueDefined property is an array of Boolean values used to indicate which properties contain valid data for this waveform group. Possible values are:

Value | Meaning
VARIANT_TRUE | The specified waveform group value is defined and is contained in the corresponding property.
VARIANT_FALSE | The specified waveform group value is not defined for the group.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Constructing, Destructing and Resetting
 | DICOM Waveform Groups: Setting/Getting Attributes


WaveformOriginality property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomWaveformOriginality WaveformOriginality
Overview | Refer to Working with DICOM Waveforms.

Remarks

The WaveformOriginality property specifies the Waveform Originality (003A,0004). Possible values are:

Value | Meaning
WAVEFORM_ORIGINALITY_ORIGINAL | [0] "ORIGINAL".
WAVEFORM_ORIGINALITY_DERIVED | [1] "DERIVED".

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Setting/Getting Attributes


WaveformPaddingValue property (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long WaveformPaddingValue
Overview | Refer to Working with DICOM Waveforms.

Remarks

The WaveformPaddingValue property specifies the Waveform Padding Value (5400,100A).

This property value is valid only if ValueDefined[WAVEFORM_PADDING_VALUE] is VARIANT_TRUE.

See Also

Elements: | Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property
Topics: | DICOM Waveform Groups: Setting/Getting Attributes


LoadAudio method (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short LoadAudio(BSTR bstrFilename, short nFlags);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The LoadAudio method inserts an audio (wave) file into the waveform group.

This method is intended for use with 8-bit (mono and stereo) PCM, mu-law and A-law wave files. It can also be used with 16-bit (mono and stereo) PCM wave files, but in this case it will automatically convert them to 8-bit. Please note that this is a limitation in the DICOM standard and not in the method itself.

The method fails and returns DICOM_ERROR_FORMAT if the format of the input wave file is not PCM, mu-law or A-law.

This method is very useful when creating DICOM objects of type "Basic Voice Audio" (1.2.840.10008.5.1.4.1.1.9.4.1), which is typically used for report dictation. Two of the main constraints of this IOD are the sampling frequency, which should be 8000, and sample interpretation, which should be unsigned 8-bit linear, 8-bit mu-law or 8-bit A-law. For more information about this object, refer to the "Basic Voice Audio Information Object Definition" and the "Basic Voice Audio IOD Content Constraints" in the DICOM standard.

See Also

Elements: | SetNumberOfSamplesPerChannel method, Reset method, SaveAudio method, Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Supporting Audio


Reset method (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void Reset();
Overview | Refer to Working with DICOM Waveforms.

Remarks

The Reset method resets the properties of the waveform group to their default values.

See Also

Elements: | SetNumberOfSamplesPerChannel method, LoadAudio method, SaveAudio method, Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Manipulating Channels


SaveAudio method (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SaveAudio(BSTR bstrFilename, short nFlags);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The SaveAudio method creates an audio (wave) file from the channels in the waveform group.

This method is very useful for extracting audio (wave) data from a DICOM object of type "Basic Voice Audio" (1.2.840.10008.5.1.4.1.1.9.4.1), which is typically used for report dictation.

The resulting wave file has the following characteristics:

Number of channels: This will be either 1 or 2, depending on the number of channels in the waveform group. The Count property (IDicomWaveformChannels), accessed through the Channels property (lDicomWaveformGroup) contains the number of channels in the waveform group.

Bits per sample (sample size) will always be 8.

Samples per second (sampling rate): This will be the same as the sampling frequency for the waveform group, which is specified by the SamplingFrequency property.

Format category: PCM, mu-law or A-law, based on the value of the waveform sample interpretation, which is specified by the SampleInterpretation property.

See Also

Elements: | SetNumberOfSamplesPerChannel method, Reset method, LoadAudio method, Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Supporting Audio


SetNumberOfSamplesPerChannel method (IDicomWaveformGroup Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetNumberOfSamplesPerChannel(long lNumberOfSamples);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The SetNumberOfSamplesPerChannel method allocates space for the samples of each channel in the waveform group. The number of samples per channel can be obtained from the NumberOfSamplesPerChannel property or from the NumberOfSamples property (lDicomWaveformChannel).

All channels within a multiplex group have the same number of samples.

Call this method, to allocate the necessary space for the samples of each channel, before calling the SetChannelSamples method to set the values of the samples.

If this method is called after setting the samples for one or more channels in the waveform group, then the method will expand or shrink the arrays that hold the samples for each of the channels accordingly. For example, if this method is called with lNumberOfSamples set to 150 and then the SetChannelSamples method is called with 150 samples for a channel and then SetNumberOfSamplesPerChannel is called again with lNumberOfSamples set to 125, then the SetNumberOfSamplesPerChannel method will shrink the array that holds the samples for the channel to be 125 samples long and will discard all the samples that no longer fit in the array.

See Also

Elements: | Reset method, LoadAudio method, SaveAudio method, Channels property, EnableMethodErrors property, MultiplexGroupLabel property, MultiplexGroupTimeOffset property, NumberOfSamplesPerChannel property, SampleInterpretation property, SamplingFrequency property, TriggerSamplePosition property, TriggerTimeOffset property, ValueDefined property, WaveformOriginality property, WaveformPaddingValue property
Topics: | DICOM Waveform Groups: Manipulating Channels


AnnotationPosition property (ILAnnotationBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long AnnotationPosition
Overview | Refer to Print Management SCU.

Remarks

The AnnotationPosition property specifies the Annotation Position (2030,0010). Refer to the DICOM standard for the description.

When the collection of Annotation Boxes is filled with the LAnnotationBox objects as a result of creating a Film Box, this property will be set to 1 for the first object in the collection, 2 for the second object, and so on.

See Also

Elements: | Update method
Topics: | DICOM Print Management SCU: Basic Print Management


MainObject property (ILAnnotationBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the LEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


SOPInstanceUID property (ILAnnotationBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SOPInstanceUID
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The SOPInstanceUID property specifies the SOP Instance UID of the Annotation Box.

See Also

Topics:

DICOM Print Management SCU: Basic Print Management


TextString property (ILAnnotationBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR TextString
Overview | Refer to Print Management SCU.

Remarks

The TextString property specifies the Text String (2030,0020). Refer to the DICOM standard for the description.

See Also

Elements: | Update method
Topics: | DICOM Print Management SCU: Basic Print Management


Update method (ILAnnotationBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Update(VARIANT_BOOL bUpdateTextString);
Overview | Refer to Print Management SCU.

Remarks

The Update method requests the Print SCP to update the Annotation Box.

When the Print SCP is requested to create a Film Box, and if an Annotation Display Format ID is specified, the Print SCP will also create one or more Basic Annotation Box SOP Instances, based on the Value of the Annotation Display Format ID. This is true given that the Basic Annotation Box SOP Class is supported on the Association. For each Instance created, an LAnnotationBox object is added to the collection of Annotation Boxes specified by the AnnotationBoxes property. This method updates the Annotation Box.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Annotation Box was updated successfully, with either a Success or Warning status code in the response of the Print SCP.

Before calling the method, the Annotation Position and Text String of the Annotation Box can be specified using the AnnotationPosition property and TextString property, respectively.

See Also

Elements: | Create method (ILFilmBox interface), AnnotationBoxes property, SOPInstanceUID property, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


_NewEnum property (ILAnnotationBoxes Interface)

Syntax | IUnknown* _NewEnum
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The _NewEnum property returns an IEnumVARIANT interface on an enumeration object for the collection.

This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

See Also

Topics:

DICOM Print Management SCU: Basic Print Management


Count property (ILAnnotationBoxes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Count
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Count property specifies the number of LAnnotationBox objects in the collection.

See Also

Topics:

DICOM Print Management SCU: Basic Print Management


Item method (ILAnnotationBoxes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILAnnotationBox* Item(long Index);
Overview | Refer to Print Management SCU.

Remarks

The Item method returns a ILAnnotationBox object from the collection. This is the default member of the ILAnnotationBoxes interface.

See Also

Topics:

DICOM Print Management SCU: Basic Print Management


Name property (ILAttribute Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Name
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Name property specifies the Name of the Attribute.

See Also

Elements: | Value property, PrinterConfigItems property, Attributes property (ILPrinterConfigurationItem interface), Attributes property (ILSequenceItem interface)
Topics: | DICOM Print Management SCU: Printer


Value property (ILAttribute Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Value
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Value property specifies the Value of the Attribute.

See Also

Elements: | Name property, PrinterConfigItems property, Attributes property (ILPrinterConfigurationItem interface), Attributes property (ILSequenceItem interface)
Topics: | DICOM Print Management SCU: Printer


_NewEnum property (ILAttributes Interface)

Syntax | IUnknown* _NewEnum
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The _NewEnum property returns an IEnumVARIANT interface on an enumeration object for the collection.

This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.


Count property (ILAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Count
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Count property specifies the number of LAttribute objects in the collection.

See Also

Topics:

DICOM Print Management SCU: Printer


Item method (ILAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILAttribute* Item(long Index);
Overview | Refer to Print Management SCU.

Remarks

The Item method returns an LAttribute object from the collection. This is the default member of the ILAttributes interface.


EnableMethodErrors property (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL EnableMethodErrors
Overview | Refer to Creating DICOM Directories.

Remarks

Specifies whether LEADTOOLS generates system error events, in addition to error return codes. Possible values are:

Value | Meaning
VARIANT_TRUE | LEADTOOLS will generate system error events (runtime exceptions) in addition to the error return codes.
VARIANT_FALSE | (Default) LEADTOOLS will not generate system error events (runtime exceptions) in addition to the error return codes.

See Also

Topics:

DICOM Elements: DICOM Directories


hDicomDirDS property (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long hDicomDirDS
Overview | Refer to Creating DICOM Directories.

Remarks

This is the handle to the Data Set of the DICOM Directory. The hDicomDS property of the LEADTOOLS DICOM OCX object can be set to this property for further manipulation of the Directory Data Set.

When this property is set to the handle of a Data Set, the Data Set of the Dicom Directory managed by the COM object will be reset and a copy of the source Data Set will be made. Notice that if additional DICOM files or Data Sets are to be added to the Dicom Directory, the ResetDicomDir method should be called before assigning to this property, in order to specify the destination folder.

See Also

Topics:

DICOM Elements: DICOM Directories


ImplementationClassUID property (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ImplementationClassUID
Overview | Refer to Creating DICOM Directories.

Remarks

The ImplementationClassUID property specifies the value of the Implementation Class UID (0002,0012) element, which uniquely identifies the implementation that writes the DICOMDIR File and its content. The ImplementationVersionName property can be used to specify a version for the implementation.

The default value of this property is "1.2.840.114257.0.1".

See Also

Elements: | ImplementationVersionName property
Topics: | DICOM Elements: DICOM Directories


ImplementationVersionName property (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ImplementationVersionName
Overview | Refer to Creating DICOM Directories.

Remarks

The ImplementationVersionName property specifies the value of the Implementation Version Name (0002,0013) element, which identifies a version for the implementation that is uniquely identified by the Implementation Class UID (0002,0012). The value of the latter element can be specified using the ImplementationClassUID property.

The default value of this property is "LEADTOOLS 14".

See Also

Elements: | ImplementationClassUID property
Topics: | DICOM Elements: DICOM Directories


IncludeSubfolders property (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IncludeSubfolders
Overview | Refer to Creating DICOM Directories.

Remarks

Specifies whether the InsertDicomFile method should add the DICOM files in the subfolders of the destination folder when the InsertDicomFile method is passed NULL. Possible values are:

Value | Meaning
VARIANT_TRUE | (Default) Add the files in the subfolders of the destination folder to the DICOM directory referenced by this directory interface. This DICOM directory will be saved to the DICOMDIR file.
VARIANT_FALSE | Add only the files in the root of the destination folder to the DICOM directory referenced by this interface. This DICOM directory will be saved to the DICOMDIR file.

See Also

Elements: | InsertDicomFile method
Topics: | DICOM Elements: DICOM Directories


InsertIconImageSequence property (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL InsertIconImageSequence
Overview | Refer to Creating DICOM Directories.

Remarks

Specifies whether an Icon Image Sequence key (0088,0200) will be added to the Image Directory Record when adding a DICOM file or Data Set to the Directory. Possible values are:

Value | Meaning
VARIANT_TRUE | Icon Image Sequence key (0088,0200) will be added to the Image Directory Record when adding a DICOM file or Data Set to the Directory.
VARIANT_FALSE | (Default) Icon Image Sequence key (0088,0200) will not be added to the Image Directory Record when adding a DICOM file or Data Set to the Directory.

The icon image used is representative of the image stored.

See Also

Elements: | InsertDicomFile method, InsertDicomDS method
Topics: | DICOM Elements: DICOM Directories


RejectInvalidFileID property (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL RejectInvalidFileID
Overview | Refer to Creating DICOM Directories.

Remarks

Indicates whether methods of the ILEADDicomDir interface, that take a file name as a parameter, will fail if an invalid File ID is used. Possible values are:

Value | Meaning
VARIANT_TRUE | Any method of the ILEADDicomDir interface that takes a file name as a parameter will fail if the number of components in the File ID exceeds 8, or if the number of characters in any component of the File ID exceeds 8. (The last case is possible only for the last component, since short file names are used for File IDs.)
VARIANT_FALSE | (Default) The methods of the ILEADDicomDir interface that take a file name as a parameter will not fail if an invalid File ID is used.

As an example, if the destination folder is specified as "C:\DICOM Images\", then the following filenames will be rejected if the RejectInvalidFileID property is set to VARIANT_TRUE:

"C:\DICOM Images\Sub1\Sub2\Sub3\Sub4\Sub5\Sub6\Sub7\Sub8\Brain"

"C:\DICOM Images\Patient 1\CT-10-Knee.dic"

The first filename is rejected because the number of components in the File ID exceeds 8 (there are 9 components, starting from "Sub1"). The second filename is rejected because the number of characters in the last component, which is the short format of "CT-10-Knee.dic" (e.g., "CT-10-~1.dic") exceeds 8. On the other hand, the following filenames will not be rejected:

"C:\DICOM Images\Sub1\Sub2\Sub3\Sub4\Sub5\Sub6\Sub7\Brain"

"C:\DICOM Images\ Patient 1\Knee.dic"

See Also

Elements: | InsertDicomFile method, InsertDicomDS method, SetDescriptorFile method
Topics: | DICOM Elements: DICOM Directories


InsertDicomDS method (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertDicomDS(long hDicomDS, BSTR bstrFileName);
Overview | Refer to Creating DICOM Directories.

Remarks

Adds a DICOM Data Set to the Dicom Directory.

If the name of a DICOM file is to be specified, then before using this method, a destination folder must have been specified using the ResetDicomDir method. Otherwise, the method will fail.

The DICOM filename must refer to an existing file that resides in the destination folder or in a subfolder of the destination folder. Otherwise, the method will fail and the Data Set will not be added to the Dicom Directory. Please notice that the filename passed to the method must specify the absolute path of the file, not the relative one.

If the parameter bstrFileName is set to NULL, a Data Set can still be added, even if no destination folder is specified. (That is, if bstrFileName is set to NULL and the destination folder has not been set, a Data Set can still be added.) In this case, no DICOM file will be referenced for this Data Set (i.e., the corresponding Referenced File ID (0004,1500) will have an empty value).

See Also

Elements: | ResetDicomDir method, InsertDicomFile method
Topics: | DICOM Elements: DICOM Directories


InsertDicomFile method (ILEADDicomDir Interface)

VB.NET example | C# example
VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertDicomFile(BSTR bstrFileName);
Overview | Refer to Creating DICOM Directories.

Remarks

Adds the specified DICOM file to the Dicom Directory referenced by this interface.

Before using this method, a destination folder must have been specified using the ResetDicomDir method. Otherwise, this method will fail.

The DICOM file to be added must reside in the destination folder or in a subfolder of the destination folder. Otherwise, the method will fail and the file will not be added to the Directory. For example, if the destination folder is specified as "C:\DICOM Images\", then the DICOM file "C:\DICOM Images\Patient 1\Brain" can be added to the Directory, while the DICOM file "C:\Images\Knee" cannot be added. Please notice that the filename passed to the method must specify the absolute path of the file, not the relative one.

If the parameter bstrFileName is set to NULL, the method will add all the DICOM files contained in the destination folder to the Dicom Directory. In this case, the DicomFileInsert event will be fired for each file, so that the progress can be monitored. To add the DICOM files in the subfolders of the destination folder, set the IncludeSubfolders property to VARIANT_TRUE. Therefore, to add all the Dicom files in the destination folder and all the Dicom files in the subfolders of the destination folder, set the IncludeSubfolders property to VARIANT_TRUE and then call the InsertDicomFile method with bstrFileName set to NULL.

See Also

Elements: | ResetDicomDir method, InsertDicomDS method, DicomFileInsert event
Topics: | DICOM Elements: DICOM Directories


LoadDicomDir method (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short LoadDicomDir(BSTR bstrFileName, short nFlags);
Overview | Refer to Creating DICOM Directories.

Remarks

The LoadDicomDir method loads the DICOM Directory Data Set from the specified file.

In addition to loading the DICOM Directory Data Set, the method also sets the destination folder to the folder in which the specified DICOMDIR File resides. Additional DICOM files in this folder (and subfolders) can be added to the loaded Directory.

If you know certain characteristics of the file, you can set those in nFlags. Any characteristic that you don’t set will be automatically determined. If you do not know any of the characteristics of the file, set nFlags to 0 and LEADTOOLS will automatically determine all the file characteristics and load the file accordingly.

If DS_LOAD_CLOSE is not set in the nFlags parameter, the file will remain open until this method is called again, the ResetDicomDir method is called, or the hDicomDirDS property is set to the handle of a Data Set.

See Also

Elements: | SaveDicomDir method
Topics: | DICOM Elements: DICOM Directories


ResetDicomDir method (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short ResetDicomDir(BSTR bstrDICOMDIRDstFolder);
Overview | Refer to Creating DICOM Directories.

Remarks

Removes the contents of the Dicom directory referenced by this interface and reinitializes it, therefore emptying the Dicom directory. It also sets the destination folder using the string in the bstrDICOMDIRDstFolder parameter. Most of the methods of the ILEADDicomDir interface will fail if this destination folder is not specified. Therefore, this method should be called at the beginning of your application.

See Also

Elements: | SaveDicomDir method
Topics: | DICOM Elements: DICOM Directories


SaveDicomDir method (ILEADDicomDir Interface)

VB.NET example | C# example
VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SaveDicomDir();
Overview | Refer to Creating DICOM Directories.

Remarks

The SaveDicomDir method creates the DICOMDIR File and stores the Dicom Directory information in it.

The DICOMDIR File created by this method is named "DICOMDIR" and is placed in the destination folder specified using the ResetDicomDir method. If no destination folder is specified, the method will fail.

See Also

Elements: | LoadDicomDir method, ResetDicomDir method
Topics: | DICOM Elements: DICOM Directories


SetDescriptorFile method (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetDescriptorFile(BSTR bstrFileName, BSTR bstrCharSet);
Overview | Refer to Creating DICOM Directories.

Remarks

Sets the descriptor file (non-DICOM file) used for comments related to the file-set for which the Dicom Directory is created.

This method sets the values of the File-set Descriptor File ID (0004,1141) and the Specific Character Set of File-set Descriptor File (0004,1142) elements. If the parameter bstrCharSet is set to NULL, the latter element will be deleted (if it exists). If the parameter bstrFileName is set to NULL, both elements will be deleted.

If the name of a descriptor file is to be specified, then before using this method, a destination folder must have been specified using the ResetDicomDir method. Otherwise, the method will fail.

The descriptor filename must refer to an existing file that resides in the destination folder or in a subfolder of the destination folder. Otherwise, the method will fail. Please notice that the filename passed to the method must specify the absolute path of the file, not the relative one.

See Also

Elements: | ResetDicomDir method
Topics: | DICOM Elements: DICOM Directories


SetFileSetID method (ILEADDicomDir Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetFileSetID(BSTR bstrFileSetID);
Overview | Refer to Creating DICOM Directories.

Remarks

Sets the identifier of the file-set for which the Dicom Directory is created.

This method sets the value of the File-set ID (0004,1130) element. Since the VR of this element is CS (Code String), the identifier of the File-set shouldn’t exceed 16 characters. The characters allowed are the uppercase characters, "0" – "9", the SPACE character, and the underscore "_", of the Default Character Repertoire.

The identifier of a file-set provides a simple, humanly readable reference. However, the identifier might not be globally unique. For example, a File-set ID can be set to be identical to a disk label.

See Also

Topics:

DICOM Elements: DICOM Directories


DicomFileInsert event (_ILEADDicomDirEvents Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DicomFileInsert (BSTR bstrFileName, long hDicomDS, short nStatus, short* pReturnVal);
Overview | Refer to Creating DICOM Directories.

Remarks

This event is fired for each file enumerated by the InsertDicomFile method.

If the parameter passed to the InsertDicomFile method is NULL, then all files in the destination folder will be enumerated. If the IncludeSubfolders property is set to VARIANT_TRUE before calling the InsertDicomFile method, then all the files in the destination folder root and all files in all the subfolders of the destination folder will be enumerated. For each file, the DicomFileInsert event is fired once or twice:

The event is fired first just after trying to load the Data Set in the file and before actually adding the file to the Dicom Directory. If the Data Set was loaded successfully, the parameter hDicomDS specifies the loaded Data Set and the parameter nStatus is set to DICOMDIR_INSERTDICOMFILE_PREADD. To skip the addition of the file, the variable pointed to by pReturnVal should be set to DICOM_ERROR_FORMAT. If the Data Set wasn’t loaded successfully, the parameter hDicomDS is set to 0 and the parameter nStatus is set to an error code.

The event is fired the second time just after trying to add the loaded Data Set to the DICOM Directory. The parameter hDicomDS specifies the loaded Data Set. If the Data Set was added successfully, the parameter nStatus is set to DICOM_SUCCESS. Otherwise, it is set to an error code. The event will not be fired this second time if a loading failure was reported during the first firing of the event, or the file addition was skipped during the first firing of the event.

If the variable pointed to by pReturnVal is set to a value other than DICOM_SUCCESS or DICOM_ERROR_FORMAT, the InsertDicomFile method will stop adding new files and will return the same value. Therefore, to keep adding the DICOM files, this variable should be set to DICOM_SUCCESS (or left as is), or set to DICOM_ERROR_FORMAT if only the current file is to be skipped (which can be done during the first firing of the event).

The InsertDicomFile method will stop adding new files if an error occurred and it will return an error value.

See Also

Elements: | InsertDicomFile method
Topics: | DICOM Elements: DICOM Directories


AgeValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long AgeValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of age values in the AgeValues property.

If you are retrieving age values associated with the element specified in the CurrentElement property, calling the GetAgeValue method updates this property with the number of age values associated with the specified element.

If you are setting age values associated with the element specified in the CurrentElement property, you can set the AgeValueCount property to allocate storage for the AgeValues array property, prior to setting the age values using SetAgeValue.

Set this property to 0 at any time to free the memory used for the AgeValues property.

See Also

Elements: | AgeValues property, GetAgeValue method, SetAgeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


AgeValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | AGEVALUEItem AgeValues ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of age values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the AgeValueCount property.

The AgeValues property has the following properties:

Property | Type | Description
Number | short | Numerical value that indicates the age.
Reference | short | A character that indicates whether the value in Number refers to days, weeks, months, or years. Possible values are: VALUE_AGE_DAYS ‘D’ The age is given in days. VALUE_AGE_WEEKS ‘W’ The age is given in weeks. VALUE_AGE_MONTHS ‘M’ The age is given in months. VALUE_AGE_YEARS ‘Y’ The age is given in years.

If you are retrieving age values associated with the element specified in the CurrentElement property, calling the GetAgeValue method updates this property with the age values associated with the specified element.

If you are setting age values associated with the element specified in the CurrentElement property, you can set the AgeValueCount property to allocate storage for the AgeValues property, prior to setting the age values using SetAgeValue.

Set the AgeValueCount property to 0 at any time to free the memory used for the AgeValues property.

See Also

Elements: | AgeValueCount property, GetAgeValue method, SetAgeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


AnnContainer property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | OLE_HANDLE AnnContainer
Overview | Refer to DICOM Annotation Files.

Remarks

(Medical only) Is the handle to the annotation container object.

This is the root container, which you may need to specify when using LEADTOOLS DLL functions for annotations. The value of this property is 0 if the Dicom Control has no annotations.

This property contains the annotations that will be saved when saving annotations to a DICOM data set using the AnnSave method. Assign a value to this property prior to calling the AnnSave method. Typically, this property is set using the AnnContainer property of the LEAD Raster Annotation COM Object control. For example, using Visual Basic syntax:

LEAD1.Load "d:\work\images\gabe.bmp", 0, 0, 1
LEAD1.AnnLoad "d:\work\images\gabe.ann", 1
LEADDICOM1.LoadDS "d:\work\images\a.dic", 0
LEADDICOM1.AnnContainer = LEAD1.AnnContainer
LEADDICOM1.AnnSave 0, ANNFMT_NATIVE, False, SAVE_OVERWRITE, 1

This property is also used by the AnnLoad method. The AnnLoad method updates this property with the annotation container that is loaded from the DICOM data set. This can then be used in the Raster Annotation COM Object.

For example, using Visual Basic syntax:

LEADDICOM1.LoadDS "d:\erase\dicom.dic", 0
LEADDICOM1.AnnLoad 0, 1
LEAD1.Load "d:\work\images\a.dic", 0, 0, 1
LEAD1.AnnContainer = LEADDICOM1.AnnContainer

See Also

Elements: | AnnLoad method, AnnSave method, AnnCount method, AnnDelete method, AnnPrivateCreatorTag property, AnnEntries property
Topics: | Data Sets: Annotation Files


AnnEntries property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL AnnEntries (iIndex)
Overview | Refer to DICOM Annotation Files.

Remarks

(Medical only) (Read only) Indicates which of the possible 256 private tags are being used to store annotations in a DICOM data set.

This property is updated by the AnnCount method.

For example, suppose that a DICOM data set contains three LEAD annotation files at indices 0,1, and 4.

Executing the following

LEADDICOM1.LoadDS "d:\\work\\images\\a.dic", 0
LEADDICOM1.AnnCount

will set the AnnEntries property as follows:

AnnEntries(0) = 1
AnnEntries(1) = 1
AnnEntries(2) = 0
AnnEntries(3) = 0
AnnEntries(4) = 1
AnnEntries(5..255) = 0

See Also

Elements: | AnnLoad method, AnnSave method, AnnCount method, AnnDelete method, AnnPrivateCreatorTag property, AnnContainer property
Topics: | Data Sets: Annotation Files


AnnPrivateCreatorTag property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long AnnPrivateCreatorTag
Overview | Refer to DICOM Annotation Files.

Remarks

(Medical only) Gets or sets the annotation private creator tag used by LEAD to store annotation in a DICOM data set.

This property is used by the AnnSave and AnnCount methods

When saving annotations using the AnnSave method, you can select the private creator tag (and therefore the private tags) or have the private creator tag automatically chosen by setting the AnnPrivateCreatorTag property appropriately.

To choose a private creator tag, do the following:

Set the AnnPrivateCreatorTag to the desired tag and element. Note that private creator tags must follow the following format:

(gggg, 0010-00FF) where gggg is odd

This reserves 256 private data elements. For example,

LEADDICOM1.AnnPrivateCreatorTag = &H0710043

This particular private creator tag reserves the following elements:

0x00714300 through 0x007143FF

To choose the group but not the element of a private creator tag, do the following:

Set AnnPrivateCreatorTag as follows:

(gggg0000) where gggg is odd

For example,

LEADDICOM1.AnnPrivateCreatorTag = &H0710000

If successful, the private creator tag (group and element) will be set in the AnnPrivateCreatorTag property.

To have the private creator tag automatically chosen and returned, do the following:

Set AnnPrivateCreatorTag = 0:

If successful, the private creator tag (group and element) will be set in the AnnPrivateCreatorTag property

This property is also updated when calling the AnnCount method. It will contain the LEAD annotation private creator tag that is used to store LEAD annotations.

See Also

Elements: | AnnLoad method, AnnSave method, AnnCount method, AnnDelete method, AnnContainer property, AnnEntries property
Topics: | Data Sets: Annotation Files


BinaryValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long BinaryValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of binary values (in bytes) in the BinaryValues property.

If you are retrieving binary values associated with the element specified in the CurrentElement property, calling the GetBinaryValue method updates this property with the number of binary values (in bytes) associated with the specified element.

If you are setting binary values associated with the element specified in the CurrentElement property, you can set the BinaryValueCount property to allocate storage for the BinaryValues array property, prior to setting the binary values using SetBinaryValue.

Set this property to 0 at any time to free the memory used for the BinaryValues property.

See Also

Elements: | BinaryValues property, GetBinaryValue method, SetBinaryValue method
Topics: | Data Sets: Getting and Setting Data Element Values


BinaryValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short BinaryValues ( long lIndex )
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of binary values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the BinaryValueCount property.

If you are retrieving binary values associated with the element specified in the CurrentElement property, calling the GetBinaryValue method updates this property with the binary values associated with the specified element.

If you are setting binary values associated with the element specified in the CurrentElement property, you can set the BinaryValueCount property to allocate storage for the BinaryValues property, prior to setting the binary values using SetBinaryValue.

Set the BinaryValueCount property to 0 at any time to free the memory used for the BinaryValues property.

It is strongly recommended that you not use the BinaryValues2 property and the BinaryValues property in the same section of code. However, if they are used in the same section of code, the order in which these properties are used is important. The last property set will control the values used when you call the SetBinaryValue method.

See Also

Elements: | BinaryValueCount property, GetBinaryValue method, SetBinaryValue method
Topics: | Data Sets: Getting and Setting Data Element Values


BinaryValues2 property (ILEADDicomDS)

Visual Basic example

Visual C++ 6.0 example

Syntax | VARIANT BinaryValues2
Overview | Refer to Working with Data Sets.

Remarks

Gets or sets a byte array retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the BinaryValueCount property.

If you are retrieving binary values associated with the element specified in the CurrentElement property, calling the GetBinaryValue method updates this property with the binary values associated with the specified element.

If you are setting binary values associated with the element specified in the CurrentElement property by calling SetBinaryValue method, setting this property will automatically update the BinaryValueCount property.

The data type of this property is byte array, which makes accessing the data faster than the existing BinaryValues property, other than that, both properties are identical.

After calling the GetBinaryValue method to retrieve the binary data of an element, both the BinaryValues and BinaryValues2 properties will have the same data, but give the user different ways to access that data.

It is strongly recommended that you not use this property and the BinaryValues property in the same section of code. However, if they are used in the same section of code, the order in which these properties are used is important. The last property set will control the values used when you call the SetBinaryValue method.

Set the BinaryValueCount property to 0 at any time to free the memory used for both the BinaryValues and BinaryValues2 properties.

See Also

Elements: | BinaryValueCount property, GetBinaryValue method, SetBinaryValue method, BinaryValues property
Topics: | Data Sets: Getting and Setting Data Element Values


Bitmap property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Bitmap
Overview | Refer to Working with Data Sets.

Remarks

This is the handle to a LEAD bitmap.

Calling GetBitmapValue will update this property with the image from the item specified by the CurrentElement property.

Set the Bitmap property to 0 at any time to free the memory used for the bitmap.

See Also

Elements: | GetBitmapCount method, GetBitmapValue, SetBitmapValue
Topics: | Data Sets: Getting and Setting Data Element Values


BitmapList property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long BitmapList
Overview | Refer to Working with Data Sets.

Remarks

This is the handle to the bitmap list.

Calling GetBitmapListValue will update this property with the image list from the item specified by the CurrentElement property.

Set the BitmapList property to 0 at any time to free the memory used for the bitmap list.

See Also

Elements: | BitmapListCount property, GetBitmapCount method, GetBitmapListValue method, SetBitmapListValue method
Topics: | Data Sets: Getting and Setting Data Element Values


BitmapListCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long BitmapListCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of bitmaps in the BitmapList property.

This property is updated by the GetBitmapListValue method. It is also updated when you assign a bitmap list to the BitmapList property before calling the SetBitmapListValue method to update a data element.

See Also

Elements: | BitmapList property, GetBitmapListValue method, SetBitmapListValue method
Topics: | Data Sets: Getting and Setting Data Element Values


CharValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long CharValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of character values in the CharValues property.

If you are retrieving character values associated with the element specified in the CurrentElement property, calling the GetCharValue method updates this property with the number of character values associated with the specified element.

If you are setting character values associated with the element specified in the CurrentElement property, you can set the CharValueCount property to allocate storage for the CharValues array property, prior to setting the character values using SetCharValue.

Set this property to 0 at any time to free the memory used for the CharValues property.

See Also

Elements: | CharValues property, GetCharValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


CharValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short CharValues ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of character values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the CharValueCount property.

If you are retrieving character values associated with the element specified in the CurrentElement property, calling the GetCharValue method updates this property with the character values associated with the specified element.

If you are setting character values associated with the element specified in the CurrentElement property, you can set the CharValueCount property to allocate storage for the CharValues property, prior to setting the character values using SetCharValue.

Set the CharValueCount property to 0 at any time to free the memory used for the CharValues property.

See Also

Elements: | CharValueCount property, GetCharValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


CurrentCodedConcept property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomCodedConcept * CurrentCodedConcept
Overview | Refer to Working with Context Groups.

Remarks

(Read-only) The CurrentCodedConcept property specifies the currently selected Coded Concept in the Context Group Table.

The following properties are specified by the CurrentCodedConcept property:

CodingSchemeDesignator property

CodingSchemeVersion property

CodeValue property

CodeMeaning property

IsContextGroupLocalVersion property

ContextGroupLocalVersion property

ContextGroupExtensionCreatorUID property

See Also

Elements: | CurrentContextGroup property, MoveFirstCodedConcept method, MoveLastCodedConcept method, MoveNextCodedConcept method, MovePrevCodedConcept method, GetCodedConceptCount method, FindCodedConcept method, FindIndexCodedConcept method, SetCodedConceptCodeMeaning method, InsertCodedConcept method, DeleteCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


CurrentContextGroup property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | IDicomContextGroup* CurrentContextGroup
Overview | Refer to Working with Context Groups.

Remarks

(Read-only) The CurrentContextGroup property specifies the currently selected Context Group in the Context Group Table.

The following properties are specified by the CurrentContextGroup property:

ContextIdentifier property

Name property

Extensible property

ContextGroupVersion property

See Also

Elements: | CurrentCodedConcept property, LoadContextGroup method, InsertContextGroup method, ResetContextGroup method, MoveFirstContextGroup method, MoveLastContextGroup method, MoveNextContextGroup method, MovePrevContextGroup method, GetContextGroupCount method, FindContextGroup method, FindIndexContextGroup method, DeleteContextGroup method, DefaultContextGroup method, MoveFirstCodedConcept method, MoveLastCodedConcept method, MoveCodedConceptGroup method, GetCodedConceptCount method, FindCodedConcept method, FindIndexCodedConcept method, InsertCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


CurrentElement property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DICOMDSElement CurrentElement
Overview | Refer to Working with Data Sets.

Remarks

Holds the currently selected Data Set Element.

CurrentElement has the following Read-Only properties:

Property | Type | Description
Tag | long | Data element tag. For a list of default values, refer to Data Element Tag Constants.
VR | short | Value representation. For a list of default values supported by DICOM, refer to Value Representation Constants.
Length | long | Length of the value stored in the data element. If the stored value is a sequence, this value will be ELEMENT_LENGTH_MAX (0xFFFFFFFF).
hElement | long | Memory handle that can be used to uniquely identify a Data Element.

When a data set is loaded from a DICOM file, only the tag, the value representation and the length of the stored value data are actually loaded. This information is stored in the CurrentElement property. You can access and modify this data set information, add to the data set, or delete items from the data set.

See Also

Elements: | InsertElement method, InsertModule method, DeleteElement method, DeleteModule method, MoveRootElement method, MoveParentElement method, MoveChildElement method, MoveFirstElement method, MoveLastElement method, MoveNextElement method, MovePrevElement method, FindFirstElement method, FindLastElement method, FindPrevElement method, FindNextElement method, SetCurrentElement method, GetValueCount method, GetBinaryValue method, GetCharValue method, GetShortValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetStringValue method, GetAgeValue method, GetTimeValue method, GetDateTimeValue method, SetBinaryValue method, SetCharValue method, SetShortValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetStringValue method, SetAgeValue method, SetTimeValue method, SetDateTimeValue method
Topics: | Data Sets: Maneuvering Through a Data Set
 | Data Sets: Searching a Data Set
 | Data Sets: Inserting and Deleting Data Set Members
 | Data Sets: Getting and Setting Data Element Values


CurrentIOD property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DICOMIODItem CurrentIOD
Overview | Refer to Working with Information Object Definitions.

Remarks

Holds the currently selected IOD Structure item.

CurrentIOD has the following Read-Only properties:

Property | Type | Description
Code | long | Code value that specifies the Information Object Definition. The information object may be a Class, a Module or a Tag. For lists of default values, refer to Data Element Tag Constants, IOD Class Constants, and IOD Module Constants.
Name | BSTR | Character string that contains the name of the Information Object Definition.
Type | short | The type of Information Object Definition you are working with. Possible values are:
 |  | DICOM_IOD_TYPE_CLASS | [0x00] Class type Information Object Definition.
 |  | DICOM_IOD_TYPE_MODULE | [0x01] Module type Information Object Definition.
 |  | DICOM_IOD_TYPE_ELEMENT | [0x02] Element type Information Object Definition.
Usage | short | Value that indicates whether the Information Object is mandatory, conditional or optional, and the type of usage. For a list of possible values, refer to IOD Usage Constants. For more information about mandatory, conditional, and optional IODs, refer to An Overview of Dicom or the DICOM Spec.
Description | BSTR | Character string that contains a description of the Information Object Definition.
hIOD | long | Memory handle that can be used to uniquely identify an IOD.

Internally LEADTOOLS maintains a tree structure, referred to as the IOD Structure, of available Information Object Definitions (IODs). TheseIODs can include default IODs available in DICOM, as well as user defined IODs. You can access any of this information, add to the IOD Structure, or delete items from the IOD Structure using the xxxIOD and xxxIODxx methods.

Note: The CurrentIOD property is read only, except for the following two situations:

1. If you have a memory handle to a specific item within the IOD table, you can explicitly set the CurrentIOD property to that item using the SetCurrentIOD method.

2. You can explicitly set the CurrentIOD property to 0.

See Also

Elements: | SetCurrentIOD method, DefaultIOD method, InsertIOD method, DeleteIOD method, ResetIOD method, MoveRootIOD method, MoveParentIOD, MoveChildIOD method, MoveFirstIOD method, MoveLastIOD method, MovePrevIOD method, MoveNextIOD method, FindIOD method, FindClassIOD method, FindModuleIOD method, , SetIODName method, SetIODDescription method
Topics: | Information Object Definitions: Maneuvering Through the IOD Table
 | Information Object Definitions: Searching the IOD Table
 | Information Object Definitions: Inserting and Deleting IODs
 | Information Object Definitions: Modifying an Existing IOD


CurrentModule property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DICOMDSModule CurrentModule
Overview | Refer to Working with Data Sets.

Remarks

Holds the currently selected Data Set Module.

CurrentModule has the following Read-Only properties:

Property | Type | Description
Module | long | Module code number. For a list of default values, refer to IOD Module Constants.
ElementCount | long | Number of elements in the Element array property.
Element | DICOMDSElement[long lIndex] | An array of Data Elements.
hModule | long | Memory handle that can be used to uniquely identify a Data Element.

See Also

Elements: | InsertModule method, DeleteModule method, GetModuleCount method, FindModule method, FindIndexModule method
Topics: | Data Sets: Searching a Data Set


CurrentTag property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | LEADDICOMTag CurrentTag
Overview | Refer to Working with Tags.

Remarks

Holds the currently selected Data Element Tag Table item.

CurrentTag has the following Read-Only properties:

Property | Type | Description
Code | long | Code that indicates the tag. For a list of default values, refer to Data Element Tag Constants.
Mask | long | Masking value. Masking allows you to insert multiple elements in the same entry in the table.
Name | BSTR | Character string that contains the name of the tag. To see the default values for the Tag Names, refer to the Default Data Element Tag Table.
VR | short | Value representation code that indicates the type of value stored in the data element. For a list of default values supported by DICOM, refer to Value Representation Constants.
MinVM | long | Value that indicates the minimum number of values that may be stored in the Value Field of the Data Element.
MaxVM | long | Value that indicates the maximum number of values that may be stored in the Value Field of the Data Element.
DivideVM | long | Value used to divide the value multiplicity. When multiple values are stored in the value field of a data element, the number of values present must be evenly divisible by nDivideVM. For most items nDivideVM will be 1. However, if the values stored in the value field are RGB triplets, for example, you would have to store three values for each triplet. You could store 12 values, since 12 values would be 4 triplets, however, you could not store 13 values. In this case nDivideVM would be 3.

Internally LEADTOOLS maintains a table or list of available tag values. These values can include default values for standard tags available in DICOM, as well as user defined tags. You can access any of this information, add to the table, or delete items from the table using the XXXTag methods. To see the default values, refer to the Default Data Element Tag Table.

See Also

Elements: | DefaultTag method, InsertTag method, DeleteTag method, ResetTag method, MoveFirstTag method, MoveLastTag method, MovePrevTag method, MoveNextTag method, GetTagCount method, FindTag method, FindIndexTag method, SetTagName method
Topics: | Data Element Tags: Maneuvering Through the Data Element Tag Table
 | Data Element Tags: Searching the Data Element Tag Table
 | Data Element Tags: Inserting and Deleting Data Element Tags
 | Data Element Tags: Modifying an Existing Data Element Tag


CurrentUID property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DICOMUIDItem CurrentUID
Overview | Refer to Working with Unique Identifiers.

Remarks

Holds the currently selected UID Table item.

CurrentUID has the following Read-Only properties:

Property | Type | Description
Code | BSTR | Unique identifier code. For a list of default values, refer to the Default UID Table.
Name | BSTR | The name of the unique identifier. For a list of default values, refer to the Default UID Table.
Type | long | Type of UID. Possible values are:
 |  | Value | Meaning
 |  | UID_TYPE_OTHER | [0] Unknown
 |  | UID_TYPE_TRANSFER1 | [1] Transfer Syntax - Uncompressed Image
 |  | UID_TYPE_TRANSFER2 | [2] Transfer Syntax - Compressed Image
 |  | UID_TYPE_CLASS | [3] SOP Class
 |  | UID_TYPE_META_CLASS | [4] Meta SOP Class
 |  | UID_TYPE_INSTANCE | [5] SOP Instance
 |  | UID_TYPE_APPLICATION | [6] Application Context Name

Internally LEADTOOLS maintains a table or list of available unique identifiers. These values can include default values for standard unique identifiers available in DICOM, as well as user defined unique identifiers. You can access any of this information, add to the table, or delete items from the table using the XXXUID methods. To see the default values, refer to the Default UID Table.

See Also

Elements: | DefaultUID method, InsertUID method, DeleteUID method, ResetUID method, MoveFirstUID method, MoveLastUID method, MovePrevUID method, MoveNextUID method, GetUIDCount method, FindUID method, FindIndexUID method, SetUIDName method
Topics: | Unique Identifiers: Maneuvering Through the UID Table
 | Unique Identifiers: Searching the UID Table
 | Unique Identifiers: Inserting and Deleting UIDs
 | Unique Identifiers: Modifying an Existing UID


CurrentVR property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DICOMVRItem CurrentVR
Overview | Refer to Working with Value Representations.

Remarks

Holds the currently selected Value Representation Table item.

CurrentVR has the following Read-Only properties:

Property | Type | Description
Code | short | Code that indicates the type of value stored in the data element. For a list of default values supported by DICOM, refer to Value Representation Constants.
Name | BSTR | Character string that contains the name of the Value Representation. To see the default values for the Value Representation Names, refer to the Default Value Representation Table.
Length | long | The length of the value to be stored in the data element.
Restrict | short | Restrictions on the length. Possible values are given below. For a list of available options, see below.
UnitSize | short | The size of the smallest item that can be stored in the data element.

Internally LEADTOOLS maintains a table or list of available value representations. These value representations can include default value representations available in DICOM, as well as user defined value representations. You can access any of this information, add to the table, or delete items from the table using the XXXVR methods. To see the default values, refer to the Value Representation Table.

Possible values for the Restrict property are given below.

Value | Meaning
DICOM_VR_FIXED | [0x00] Length is a fixed number of bytes.
DICOM_VR_MAXIMUM | [0x01] Length is the maximum number of bytes allowed.
DICOM_VR_MAXIMUM_GROUP | [0x02] Length is the maximum number of bytes allowed per component group
VR_ANY | [0x03] Any length is valid.
VR_NOT_APPLICABLE | [0x04] Length is not applicable

One of the values above may be combined with one of the values below using the bitwise OR ( | ) operator.

DIALOG_VR_BINARY | [0x0100] Binary value.
DIALOG_VR_STRING | [0x0200] String value (The character '\' is used as the delimiter between values for multiple data elements).
DIALOG_VR_TEXT | [0x0400] Text value. (Data elements with this VR cannot be multi-valued).

See Also

Elements: | DefaultVR method, InsertVR method, DeleteVR method, ResetVR method, MoveFirstVR method, MoveLastVR method, MovePrevVR method, MoveNextVR method, GetVRCount method, FindVR method, FindIndexVR method, SetVRName method
Topics: | Value Representations: Maneuvering Through the Value Representation Table
 | Value Representations: Searching the Value Representation Table
 | Value Representations: Inserting and Deleting Value Representations
 | Value Representations: Modifying an Existing Value Representation


DateTimeValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long DateTimeValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of date-time values in the DateTimeValues property.

If you are retrieving date-time values associated with the element specified in the CurrentElement property, calling the GetDateTimeValue method updates this property with the number of date-time values associated with the specified element.

If you are setting date-time values associated with the element specified in the CurrentElement property, you can set the DateTimeValueCount property to allocate storage for the DateTimeValues array property, prior to setting the date-time values using SetDateTimeValue.

Set this property to 0 at any time to free the memory used for the DateTimeValues property.

See Also

Elements: | DateTimeValues property, GetDateTimeValue method, SetDateTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


DateTimeValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DATETIMEVALUEItem DateTimeValues
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of date-time values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the DateTimeValueCount property.

The DateTimeValues property has the following properties:

Property | Type | Description
Year | short | The year.
Month | short | The month.
Day | short | The day.
Hours | short | The hours.
Minutes | short | The minutes.
Seconds | short | The seconds.
Fractions | long | The fraction of a second.
Offset | long | The optional suffix for plus/minus from Coordinated Universal Time.

If you are retrieving date-time values associated with the element specified in the CurrentElement property, calling the GetDateTimeValue method updates this property with the date-time values associated with the specified element.

If you are setting date-time values associated with the element specified in the CurrentElement property, you can set the DateTimeValueCount property to allocate storage for the DateTimeValues property, prior to setting the date-time values using SetDateTimeValue.

Set the DateTimeValueCount property to 0 at any time to free the memory used for the DateTimeValues property.

See Also

Elements: | DateTimeValueCount property, GetDateTimeValue method, SetDateTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


DateValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long DateValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of date values in the DateValues property.

If you are retrieving date values associated with the element specified in the CurrentElement property, calling the GetDateValue method updates this property with the number of date values associated with the specified element.

If you are setting date values associated with the element specified in the CurrentElement property, you can set the DateValueCount property to allocate storage for the DateValues array property, prior to setting the date values using SetDateValue.

Set this property to 0 at any time to free the memory used for the DateValues property.

See Also

Elements: | DateValues property, GetDateValue method, SetDateValue method
Topics: | Data Sets: Getting and Setting Data Element Values


DateValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DATEVALUEItem DateValues ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of date values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the DateValueCount property.

The DateValues property has the following properties:

Property | Type | Description
Year | short | The year.
Month | short | The month.
Day | short | The day.

If you are retrieving date values associated with the element specified in the CurrentElement property, calling the GetDateValue method updates this property with the date values associated with the specified element.

If you are setting date values associated with the element specified in the CurrentElement property, you can set the DateValueCount property to allocate storage for the DateValues property, prior to setting the date values using SetDateValue.

Set the DateValueCount property to 0 at any time to free the memory used for the DateValues property.

See Also

Elements: | DateValueCount property, GetDateValue method, SetDateValue method
Topics: | Data Sets: Getting and Setting Data Element Values


DoubleValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long DoubleValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of double values in the DoubleValues property.

If you are retrieving double values associated with the element specified in the CurrentElement property, calling the GetDoubleValue method updates this property with the number of double values associated with the specified element.

If you are setting double values associated with the element specified in the CurrentElement property, you can set the DoubleValueCount property to allocate storage for the DoubleValues array property, prior to setting the double values using SetDoubleValue.

Set this property to 0 at any time to free the memory used for the DoubleValues property.

See Also

Elements: | DoubleValues property, GetDoubleValue method, SetDoubleValue method
Topics: | Data Sets: Getting and Setting Data Element Values


DoubleValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double DoubleValues ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of double values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the DoubleValueCount property.

If you are retrieving double values associated with the element specified in the CurrentElement property, calling the GetDoubleValue method updates this property with the double values associated with the specified element.

If you are setting double values associated with the element specified in the CurrentElement property, you can set the DoubleValueCount property to allocate storage for the DoubleValues property, prior to setting the double values using SetDoubleValue.

Set the DoubleValueCount property to 0 at any time to free the memory used for the DoubleValues property.

See Also

Elements: | DoubleValueCount property, GetDoubleValue method, SetDoubleValue method
Topics: | Data Sets: Getting and Setting Data Element Values


DSTempPath property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR DSTempPath
Overview | Refer to Working with Data Sets.

Remarks

Character string containing the location of the temporary files. DICOM uses temporary files during the course of creating a file. If this property is NULL, the DICOM temporary files are kept in the directory Windows places its own temporary files. If this property is not NULL, the temporary files are placed in the specified directory.

See Also

Elements: | InitDS method, LoadDS method
Topics: | Data Sets: Creating, Initializing, Loading, and Saving Data Sets


EnableConformanceStatus property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL EnableConformanceStatus
Overview | Refer to Working with Data Sets.

Remarks

Specifies whether LEADTOOLS generates the ConformanceStatus Event for each element that does not conform.

Set this property to False in the ConformanceStatus Event to terminate the Conformance Test.

The Conformance Test is started by calling the ConformanceTestDS method.

See Also

Elements: | ConformanceStatus event, ConformanceTestDS method
Topics: | Data Sets: Getting and Setting Data Set Information


EnableMethodErrors property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL EnableMethodErrors
Overview | Refer to Working with Data Sets.

Remarks

(Persistent property, available at design time) Specifies whether LEADTOOLS generates system error events (in addition to error return codes).

Setting | Description
TRUE | Generate system error events.
FALSE | Do not generate system error events.

See Also

Elements: | EnableProgressEvent property
Topics: | DICOM Elements: General Support


EnableProgressEvent property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL EnableProgressEvent
Overview | Refer to Working with Data Sets.

Remarks

(Persistent property, available at design time) Specifies whether LEADTOOLS generates a ProgressStatus event, to indicate the completion percentage of the current LEADTOOLS function.

If this property is set to TRUE, you can use the ProgressStatus event to update a status bar or to detect a user interrupt.

This property can also be used to cancel a load process by setting it to FALSE during a load process.

Setting | Description
TRUE | Generate progress status events.
FALSE | If this property is set to FALSE outside the load process, ProgressStatus events will not be generated. If this property is set to FALSE during a load process, the load process is canceled.

See Also

Elements: | EnableMethodErrors property
Topics: | Data Sets: Getting and Setting Data Set Information


FloatValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long FloatValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of float values in the FloatValues property.

If you are retrieving float values associated with the element specified in the CurrentElement property, calling the GetFloatValue method updates this property with the number of float values associated with the specified element.

If you are setting float values associated with the element specified in the CurrentElement property, you can set the FloatValueCount property to allocate storage for the FloatValues array property, prior to setting the float values using SetFloatValue.

Set this property to 0 at any time to free the memory used for the FloatValues property.

See Also

Elements: | FloatValues property, GetFloatValue method, SetFloatValue method
Topics: | Data Sets: Getting and Setting Data Element Values


FloatValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | float FloatValues ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of float values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the FloatValueCount property.

If you are retrieving float values associated with the element specified in the CurrentElement property, calling the GetFloatValue method updates this property with the float values associated with the specified element.

If you are setting float values associated with the element specified in the CurrentElement property, you can set the FloatValueCount property to allocate storage for the FloatValues property, prior to setting the float values using SetFloatValue.

Set the FloatValueCount property to 0 at any time to free the memory used for the FloatValues property.

See Also

Elements: | FloatValueCount property, GetFloatValue method, SetFloatValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GraphicObjectAttributes property (ILEADDicomDS)

GraphicObjectAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | IDicomGraphicObjectAttributes* GraphicObjectAttributes
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The GraphicObjectAttributes property specifies the attributes that describe a graphic annotation object.

When the GetGraphicObjectAttributes method is called to retrieve the attributes of a graphic annotation object, the various properties specified by the GraphicObjectAttributes property are updated with the retrieved values.

When creating a new graphic annotation object, or when setting the attributes of an existing one, the properties specified by the GraphicObjectAttributes property should be set to the desired values before calling the CreateGraphicObject method or the SetGraphicObjectAttributes method.

The following properties are specified by the GraphicObjectAttributes property:

LayerName property

Type property property

Units property

Filled property

PointCount property

PointsX property

PointsY property

These properties are based on some of the attributes of the "Graphic Annotation Module". For more information, refer to the "Graphic Annotation Module Attributes" in the DICOM standard.

See Also

Elements: | CreateGraphicObject method, GetGraphicObjectAttributes method, SetGraphicObjectAttributes method, TextObjectAttributes property
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


hDicomDS property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long hDicomDS
Overview | Refer to

Remarks

(Runtime only) This is the handle to the DICOM Data Set. You can use this when calling the DICOM ILEADDicomNet's SendData method.

Assigning a valid Data Set to this property will copy the source Data Set. Assigning 0 to this property will free the existing Data Set.


ImageInfo property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DICOMImageInfo ImageInfo
Overview | Refer to Working with Data Sets.

Remarks

Contains information about the image in a Pixel Data Element, specified by the CurrentElementproperty.

You must call the GetImageInformation method to update this property.

ImageInfo has the following Read-Only properties:

Property | Type | Description
Compression | long | Type of compression used on the image.
PhotometricString | BSTR | Name of the photometric type.
Photometric | long | Photometric type code.
SamplesPerPixel | long | Number of samples (or planes) in the image.
Rows | long | Number of rows.
Columns | long | Number of columns.
BitsAllocated | long | Number of bits allocated for each pixel sample.
BitsStored | long | Number of bits stored for each pixel sample.
HighBit | long | The highest (most significant) bit set.
PixelRepresentation | long | Datal representation of the pixels. Unsigned integers (0) or 2’s complement (1).
PlanarConfiguration | long | Planar configuration. Color-by-plane or color-by-pixel.
ResolutionX | long | The x resolution.
ResolutionY | long | The y resolution.
SmallestImagePixelValue | long | The smallest pixel value in the image.
SmallestImagePixelValueFlag | BOOL | Flag that indicates whether the smallest pixel value applies to the entire image or to one plane.
LargestImagePixelValue | long | The largest pixel value in the image.
LargestImagePixelValueFlag | BOOL | Flag that indicates whether the largest pixel value applies to the entire image or to one plane.
RedEntries | long | The number of red entries in the Red Palette ColorLookup Table.
RedFirst | long | The first value in the Red Palette Color Lookup Table.
RedBits | long | The number of bits per entry in the Red Palette Color Lookup Table. Either 8 or 16.
GreenEntries | long | The number of green entries in the Green Palette ColorLookup Table.
GreenFirst | long | The first value in the Green Palette Color Lookup Table.
GreenBits | long | The number of bits per entry in the Green Palette Color Lookup Table. Either 8 or 16.
BlueEntries | long | The number of blue entries in the Blue Palette ColorLookup Table.
BlueFirst | long | The first value in the Blue Palette Color Lookup Table.
BlueBits | long | The number of bits per entry in the Blue Palette Color Lookup Table. Either 8 or 16.
PaletteEntries | long | The number of palette entries.
PaletteFirst | long | The smallest value of the first entries in the Red, Green and Blue Color Lookup Tables.
BitsPerPixel | long | The number of bits per pixel.
Gray | BOOL | Flag that indicates whether it is grayscale.
Frames | long | The number of frames.

For more information about image information, refer to PS 3.3 of the DICOM Standard.

See Also

Elements: | GetImageInformation method
Topics: | Data Sets: Maneuvering Through a Data Set


IncludeVolatile property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IncludeVolatile
Overview | Refer to Working with Data Sets.

Remarks

Indicates whether the Current element is volatile.

A volatile element is an element that can be changed or destroyed in the process of inserting or setting an image. A non-volatile element is an element that must be changed manually. It is not changed or destroyed by inserting or setting an image.

For example, a grayscale image has elements TAG_SMALLEST_IMAGE_PIXEL_VALUE, TAG_LARGEST_IMAGE_PIXEL_VALUE, etc. If the image is changed to a color image, these elements disappear and the following elements appear: TAG_RED_PALETTE_COLOR_LOOKUP_TABLE_DESCRIPTOR, etc. These are volatile elements since they are changed or destroyed when an image is changed or set.

Possible values are:

Value | Meaning
TRUE | Process/retrieve any element, volatile or not.
FALSE | Process/retrieve only non-volatile Elements:.

See Also

Elements: | CurrentElement property
Topics: | Data Sets: Maneuvering Through a Data Set


InfoClass property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long InfoClass
Overview | Refer to Working with Data Sets.

Remarks

Contains the class value for the current Data Set. For a list of default class values, refer to the IOD Class Constants.

You must call the GetInfoDS method to update this property.

See Also

Elements: | InfoFlags property, GetInfoDS method
Topics: | Data Sets: Getting and Setting Data Set Information


InfoCommand property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InfoCommand
Overview | Refer to Working with Command Sets.

Remarks

(Runtime only, Read only) Contains the type of a command set. This property is updated by calling the GetInfoCS method. Possible values are:

Value | Meaning
COMMAND_C_STORE | [0x0001] Composite Store Command
COMMAND_C_FIND | [0x0020] Composite Find Command
COMMAND_C_GET | [0x0010] Composite Get Command
COMMAND_C_MOVE | [0x0021] Composite Move Command
COMMAND_C_CANCEL | [0x0FFF] Composite Cancel Command
COMMAND_C_ECHO | [0x0030] Composite Echo Command
COMMAND_N_REPORT | [0x0100] Normalized Report Command
COMMAND_N_GET | [0x0110] Normalized Get Command
COMMAND_N_SET | [0x0120] Normalized Set Command
COMMAND_N_ACTION | [0x0130] Normalized Action Command
COMMAND_N_CREATE | [0x0140] Normalized Create Command
COMMAND_N_DELETE | [0x0150] Normalized Delete Command

To determine whether the command set is a request or a response, check the InfoRequest property after calling the GetInfoCS method.

See Also

Elements: | GetInfoCS method, InfoRequest property
Topics: | Data Sets: Command Sets


InfoFlags property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InfoFlags
Overview | Refer to Working with Data Sets.

Remarks

Contains meta-header flags and transfer syntax flags that provide information about the current Data Set.

You must call the GetInfoDS method to update this property.

Possible values for the Meta-header flags are:

Value | Meaning
DS_METAHEADER_PRESENT | [0x0001] The header is present.
DS_METAHEADER_ABSENT | [0x0002] The header is absent.

Possible values and combinations for the Transfer Syntax flags are:

DS_LITTLE_ENDIAN | [0x0004] Byte order is Little Endian.
DS_BIG_ENDIAN | [0x0008] Byte order is Big Endian.
DS_IMPLICIT_VR | [0x0010] The Value Representation is implicit.
DS_EXPLICIT_VR | [0x0020] The Value Representation is explicit.

DS_LITTLE_ENDIAN | DS_IMPLICIT_VR

DS_LITTLE_ENDIAN | DS_EXPLICIT_VR

DS_BIG_ENDIAN | DS_EXPLICIT_VR

Any of the available Meta-header flags given above may be combined with any of the available values or combinations of values for the Transfer Syntax flags given above. For example, you may combine DS_METAHEADER_ABSENT with DS_EXPLICIT_VR, or you may combine DS_METAHEADER_PRESENT with DS_BIG_ENDIAN | DS_EXPLICIT_VR, etc.

See Also

Elements: | InfoClass property, GetInfoDS method
Topics: | Data Sets: Getting and Setting Data Set Information


InfoRequest property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL InfoRequest
Overview | Refer to Working with Command Sets.

Remarks

(Runtime only, Read only) Indicates whether a command set is a request or a response. This property is updated by calling the GetInfoCS method. Possible values are:

Value | Meaning
TRUE | The command set is a request.
FALSE | The command set is a response.

See Also

Elements: | GetInfoCS method, InfoCommand property
Topics: | Data Sets: Command Sets


KeepPixelDataIntact property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL KeepPixelDataIntact
Overview | Refer to Working with Data Sets.

Remarks

Gets or sets a value that indicates whether image data will be pre-processed when a function that gets a bitmap from a Pixel Data element is called.

When a method that gets a bitmap from a data set is called, such as GetBitmapValue or GetBitmapListValue, LEADTOOLS may pre-process the image data in the bitmap handle for optimal display, depending on the value of the KeepPixelDataIntact property. Possible values are:

Value | Meaning
VARIANT_TRUE | The image data will not be pre-processed.
VARIANT_FALSE | The image data will be pre-processed.

Please note that setting this property to VARIANT_TRUE stops LEADTOOLS from pre-processing the image data in the bitmap and may result in unexpected behavior when a LEADTOOLS display or image processing method is called for that bitmap.

See Also

Elements: | GetBitmapValue, GetBitmapListValue
Topics: | Data Sets: Getting and Setting Data Set Information


LayerAttributes property (ILEADDicomDS)

LayerAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | IDicomLayerAttributes* LayerAttributes
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The LayerAttributes property specifies the attributes that describe a DICOM graphic layer.

When the GetLayerAttributes method is called to retrieve the attributes of a layer, the various properties specified by the LayerAttributes property are updated with the retrieved values.

When creating a new layer, or when setting the attributes of an existing layer, the properties specified by the LayerAttributes property should be set to the desired values before calling the CreateLayer method or the SetLayerAttributes method.

The following properties are specified by the LayerAttributes property:

LayerName property

LayerOrder property

DisplayGrayscaleValue property

DisplayRedValue property

DisplayGreenValue property

DisplayBlueValue property

LayerDescription property

These properties are based on the attributes of the "Graphic Layer Module"; please see the "Graphic Layer Module Attributes" in the DICOM standard for more details.

See Also

Elements: | CreateLayer method, GetLayerAttributes method, SetLayerAttributes method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


LayerCount property (ILEADDicomDS)

LayerCount property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long LayerCount
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The LayerCount property specifies the number of layers defined in the Data Set.

The count specified by this property is the number of Items in the "Graphic Layer Sequence" (0070,0060) under the "Graphic Layer Module".

See Also

Elements: | CreateLayer method, GetLayerAttributes method, SetLayerAttributes method, RemoveLayer method, FindLayerItem method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


LongValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LongValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of long values in the LongValues property.

If you are retrieving long values associated with the element specified in the CurrentElement property, calling the GetLongValue method updates this property with the number of long values associated with the specified element.

If you are setting long values associated with the element specified in the CurrentElement property, you can set the LongValueCount property to allocate storage for the LongValues array property, prior to setting the long values using SetLongValue.

Set this property to 0 at any time to free the memory used for the LongValues property.

See Also

Elements: | LongValues property, GetLongValue method, SetLongValue method
Topics: | Data Sets: Getting and Setting Data Element Values


LongValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LongValues ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of long values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the LongValueCount property.

If you are retrieving long values associated with the element specified in the CurrentElement property, calling the GetLongValue method updates this property with the long values associated with the specified element.

If you are setting long values associated with the element specified in the CurrentElement property, you can set the LongValueCount property to allocate storage for the LongValues property, prior to setting the short values using SetLongValue.

Set the LongValueCount property to 0 at any time to free the memory used for the LongValues property.

See Also

Elements: | LongValueCount property, GetLongValue method, SetLongValue method
Topics: | Data Sets: Getting and Setting Data Element Values


ModalityLUTAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILModalityLUTAttributes* ModalityLUTAttributes
Overview | Refer to LUT Encoding.

Remarks

(Read-only) The ModalityLUTAttributes property specifies the attributes of the Modality LUT.

When the GetModalityLUTAttributes method is called to retrieve the attributes of the Modality LUT, the various properties specified by the ModalityLUTAttributes property are updated with the retrieved values.

When setting the attributes of the Modality LUT, the properties specified by the ModalityLUTAttributes property should be set to the desired values before calling the SetModalityLUT method.

This is a list of the properties specified by the ModalityLUTAttributes property:

IsModalityLUTSequence property

LUTDescriptorNumberOfEntries property

LUTDescriptorFirstMapped property

LUTDescriptorEntryBits property

LUTExplanation property

ModalityLUTType property

IsRescaleSlopeIntercept property

RescaleIntercept property

RescaleSlope property

RescaleType property

These properties are based on the attributes of the "Modality LUT Module". Please see the "Modality LUT Module Attributes" in the DICOM standard for more details.

The DICOM standard states that: "Either a Modality LUT Sequence containing a single Item or Rescale Slope and Intercept values shall be present but not both". This is why either the IsModalityLUTSequence property or the IsRescaleSlopeIntercept property can be set at the same time, but not both.

When using the SetModalityLUT method, you need to set either the IsModalityLUTSequence property or the IsRescaleSlopeIntercept property. If you set the IsModalityLUTSequence property, then you need to populate the LUTDescriptorNumberOfEntries property, the LUTDescriptorFirstMapped property, the LUTDescriptorEntryBits property, the LUTExplanation property, and the ModalityLUTType property with proper values. If you set the IsRescaleSlopeIntercept property, then you need to populate the RescaleIntercept property, the RescaleSlope property, and the RescaleType property with proper values.

According to the DICOM standard when the number of table entries under the "LUT Data" (0028,3006) element is equal to 2^16 then the value of LUTDescriptorNumberOfEntries property shall be 0. However, the 2 methods, GetModalityLUTAttributes and SetModalityLUT, do NOT have this limitation.

See Also

Elements: | GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


NewLayerIndex property (ILEADDicomDS)

NewLayerIndex property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long NewLayerIndex
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The NewLayerIndex property specifies the index of the layer most recently created by the CreateLayer method. The index is zero-based.

See Also

Elements: | CreateLayer method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


OverlayActivationLayer property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OverlayActivationLayer(long lOverlayIndex)
Overview | Refer to Overlays Overview.

Remarks

(Read-only) The OverlayActivationLayer property specifies the "Overlay Activation Layer" (60xx,1001) of the specified overlay.

See Also

Elements: | OverlayCount property, GetOverlayAttributes method
Topics: | Overlays


OverlayAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADOverlayAttributes * OverlayAttributes
Overview | Refer to Overlays Overview.

Remarks

(Read-only) The OverlayAttributes property specifies the attributes of an overlay.

When the GetOverlayAttributes method is called to retrieve the attributes of an overlay, the various properties specified by the OverlayAttributes property are updated with the retrieved values.

When setting the attributes of an overlay, the properties specified by the OverlayAttributes property should be set to the desired values before calling the SetOverlayAttributes method. These properties are listed below:

ActivationLayer property

BitPosition property

BitsAllocated property

Color property

Columns property

Description property

Flags property

ImageFrameOrigin property

Label property

NumberFramesInOverlay property

OriginX property

OriginY property

ROIArea property

ROIMean property

ROIStandardDeviation property

Rows property

Subtype property

Type property

See Also

Elements | GetOverlayAttributes method, SetOverlayAttributes method
Topics: | Overlays


OverlayBitmap property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long OverlayBitmap
Overview | Refer to Overlays Overview.

Remarks

The OverlayBitmap property specifies the handle to a LEAD overlay bitmap.

Calling the GetOverlayBitmap method updates this property with the bitmap of an overlay.

Before calling the SetOverlayBitmap method to update the overlay data of an overlay, set this property to the handle of the bitmap that will be used to update the data.

See Also

Elements: | GetOverlayBitmap method, SetOverlayBitmap method
Topics: | Overlays


OverlayBitmapList property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long OverlayBitmapList
Overview | Refer to Overlays Overview.

Remarks

The OverlayBitmapList property specifies the handle to a LEAD bitmap list.

Calling the GetOverlayBitmapList method updates this property with the frames of an overlay.

Before calling the SetOverlayBitmapList method to update the overlay data of an overlay, set this property to the handle of the bitmap list that will be used to update the data.

See Also

Elements: | GetOverlayBitmapList method, SetOverlayBitmapList method
Topics: | Overlays


OverlayCount property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long OverlayCount
Overview | Refer to Overlays Overview.

Remarks

(Read-only) The OverlayCount property specifies the number of overlays in the DICOM Data Set.

The count specified by this property is the number of repeating groups in the range (6000-601E).

See Also

Elements: | GetOverlayAttributes method, SetOverlayAttributes method, OverlayAttributes property, OverlayGroupNumber property, IsOverlayInDataSet method, OverlayActivationLayer property, GetOverlayBitmap method, SetOverlayBitmap method, GetOverlayBitmapList method, SetOverlayBitmapList method, DeleteOverlay method
Topics: | Overlays


OverlayGroupNumber property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long OverlayGroupNumber(long lOverlayIndex, long lFlags)
Overview | Refer to Overlays Overview.

Remarks

(Read-only) The OverlayGroupNumber property specifies the group number of the specified overlay.

Since DICOM uses Repeating Groups to represent multiple overlays, this property is useful in knowing under which group number an overlay exists.

See Also

Elements: | OverlayCount property, GetOverlayAttributes method, IsOverlayInDataSet method
Topics: | Overlays


PaletteColorLUTAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILPaletteColorLUTAttributes* PaletteColorLUTAttributes
Overview | Refer to LUT Encoding.

Remarks

(Read-only) The PaletteColorLUTAttributes property specifies the attributes that describe the "Palette Color Lookup Table".

When the GetPaletteColorLUTAttributes method is called to retrieve the attributes of the Palette Color LUT, the various properties specified by the PaletteColorLUTAttributes property are updated with the retrieved values.

When setting the attributes of the Palette Color LUT, the properties specified by the PaletteColorLUTAttributes property should be set to the desired values before calling the SetPaletteColorLUTAttributes method.

This is a list of the properties specified by the PaletteColorLUTAttributes property:

RedLUTDescriptorNumberOfEntries property

RedLUTDescriptorFirstMapped property

RedLUTDescriptorEntryBits property

GreenLUTDescriptorNumberOfEntries property

GreenLUTDescriptorFirstMapped property

GreenLUTDescriptorEntryBits property

BlueLUTDescriptorNumberOfEntries property

BlueLUTDescriptorFirstMapped property

BlueLUTDescriptorEntryBits property

UID property

IsSegmented property

These properties are based on the attributes of the "Palette Color Lookup Module". Please see the "Palette Color Lookup Module" in the DICOM standard for more details.

See Also

Elements: | GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


Preamble property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Preamble
Overview | Refer to Working with Data Sets.

Remarks

Character string that contains the optional preamble to the Data Set. When setting the preamble, the actual size that will be written to the file when you call SaveDS will be limited to the first 128 bytes.

Call GetDSPreamble to update this property from a loaded Data Set. Call SetDSPreamble to set this property with the preamble to be saved into the DICOM file.

See Also

Elements: | GetDSPreamble method, SetDSPreamble method
Topics: | Data Sets: Getting and Setting Data Set Information


PresStateAttributes property (ILEADDicomDS)

PresStateAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | IDicomPresStateAttributes* PresStateAttributes
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The PresStateAttributes property specifies the attributes that describe the "Presentation State Module".

When the GetPresStateAttributes method is called to retrieve the attributes of the "Presentation State Module", the various properties specified by the PresStateAttributes property are updated with the retrieved values.

When setting the attributes of the "Presentation State Module", the properties specified by the PresStateAttributes property should be set to the desired values before calling the SetPresStateAttributes method.

The following properties are specified by the PresStateAttributes property:

InstanceNumber property

PresLabel property

PresDescription property

PresCreationDate property

PresCreationTime property

PresCreatorName property

These properties are based on the attributes of the "Presentation State Module". For more information, refer to the "Presentation State Module Attributes" in the DICOM standard.

See Also

Elements: | GetPresStateAttributes method, SetPresStateAttributes method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


ShortValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long ShortValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of short values in the ShortValues property.

If you are retrieving short values associated with the element specified in the CurrentElement property, calling the GetShortValue method updates this property with the number of short values associated with the specified element.

If you are setting short values associated with the element specified in the CurrentElement property, you can set the ShortValueCount property to allocate storage for the ShortValues array property, prior to setting the short values using SetShortValue.

Set this property to 0 at any time to free the memory used for the ShortValues property.

See Also

Elements: | ShortValues property, GetShortValue method, SetShortValue method
Topics: | Data Sets: Getting and Setting Data Element Values


ShortValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short ShortValues ( long lIndex )
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of short values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the ShortValueCount property.

If you are retrieving short values associated with the element specified in the CurrentElement property, calling the GetShortValue method updates this property with the short values associated with the specified element.

If you are setting short values associated with the element specified in the CurrentElement property, you can set the ShortValueCount property to allocate storage for the ShortValues property, prior to setting the short values using SetShortValue.

Set the ShortValueCount property to 0 at any time to free the memory used for the ShortValues property.

See Also

Elements: | ShortValueCount property, GetShortValue method, SetShortValue method
Topics: | Data Sets: Getting and Setting Data Element Values


StringValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long StringValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of string values in the StringValues property.

If you are retrieving string values associated with the element specified in the CurrentElement property, calling the GetStringValue method updates this property with the number of string values associated with the specified element.

If you are setting string values associated with the element specified in the CurrentElement property, you can set the StringValueCount property to allocate storage for the StringValues array property, prior to setting the string values using SetStringValue.

Set this property to 0 at any time to free the memory used for the StringValues property.

See Also

Elements: | StringValues property, GetStringValue method, SetStringValue method
Topics: | Data Sets: Getting and Setting Data Element Values


StringValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR StringValues ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of string values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the StringValueCount property.

If you are retrieving string values associated with the element specified in the CurrentElement property, calling the GetStringValue method updates this property with the string values associated with the specified element.

If you are setting string values associated with the element specified in the CurrentElement property, you can set the StringValueCount property to allocate storage for the StringValues property, prior to setting the string values using SetStringValue.

Set the StringValueCount property to 0 at any time to free the memory used for the StringValues property.

See Also

Elements: | StringValueCount property, GetStringValue method, SetStringValue method
Topics: | Data Sets: Getting and Setting Data Element Values


TextObjectAttributes property (ILEADDicomDS)

TextObjectAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | IDicomTextObjectAttributes* TextObjectAttributes
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The TextObjectAttributes property specifies the attributes that describe a text annotation object.

When the GetTextObjectAttributes method is called to retrieve the attributes of a text annotation object, the various properties specified by the TextObjectAttributes property are updated with the retrieved values.

When creating a new text annotation object, or when setting the attributes of an existing one, the properties specified by the TextObjectAttributes property should be set to the desired values before calling the CreateTextObject method or the SetTextObjectAttributes method.

The following properties are specified by the TextObjectAttributes property:

LayerName property

TextValue property

BoundingBoxUsed property

AnchorPointUsed property

BoundingBoxUnits property

AnchorPointUnits property

BoundingBoxTLHCornerX property

BoundingBoxTLHCornerY property

BoundingBoxBRHCornerX property

BoundingBoxBRHCornerY property

BoundingBoxTextJustification property

AnchorPointX property

AnchorPointY property

AnchorPointVisible property

These properties are based on some of the attributes of the "Graphic Annotation Module". For more information, refer to the "Graphic Annotation Module Attributes" in the DICOM standard.

See Also

Elements: | CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method, GraphicObjectAttributes property
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Text Objects


TimeValueCount property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long TimeValueCount
Overview | Refer to Working with Data Sets.

Remarks

Contains the number of time values in the TimeValues property.

If you are retrieving time values associated with the element specified in the CurrentElement property, calling the GetTimeValue method updates this property with the number of time values associated with the specified element.

If you are setting time values associated with the element specified in the CurrentElement property, you can set the TimeValueCount property to allocate storage for the TimeValues array property, prior to setting the time values using SetTimeValue.

Set this property to 0 at any time to free the memory used for the TimeValues property.

See Also

Elements: | TimeValues property, GetTimeValue method, SetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


TimeValues property (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | TIMEVALUEItem TimeValues ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Contains an array of time values retrieved from or set to the Data Element specified by the CurrentElement property. The size of this array is determined by the TimeValueCount property.

The TimeValues property has the following properties:

Property | Type | Description
Hours | short | Hours
Minutes | short | Minutes
Seconds | short | Seconds
Fractions | long | Fraction of a second.

If you are retrieving time values associated with the element specified in the CurrentElement property, calling the GetTimeValue method updates this property with the time values associated with the specified element.

If you are setting time values associated with the element specified in the CurrentElement property, you can set the TimeValueCount property to allocate storage for the TimeValues property, prior to setting the date values using SetTimeValue.

Set the TimeValueCount property to 0 at any time to free the memory used for the TimeValues property.

See Also

Elements: | TimeValueCount property, GetTimeValue method, SetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


VOILUTCount property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long VOILUTCount
Overview | Refer to LUT Encoding.

Remarks

(Read-only) The VOILUTCount property specifies the number of items under the "VOI LUT Sequence" (0028,3010).

The property will be set to 0 if the "VOI LUT Sequence" doesn’t exist in the file.

See Also

Elements: | VOILUTAttributes property, GetVOILUTAttributes method, GetVOILUTData method, SetVOILUT method, DeleteVOILUT method, WindowCount property
Topics: | Lookup Tables


WindowAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILWindowAttributes* WindowAttributes
Overview | Refer to LUT Encoding.

Remarks

(Read-only) The WindowAttributes property specifies the attributes of a window.

When the GetWindowAttributes method is called to retrieve the attributes of a window, the properties specified by the WindowAttributes property are updated with the retrieved values.

When setting the attributes of a window, the properties specified by the WindowAttributes property should be set to the desired values before calling the SetWindowAttributes method.

This is a list of the properties specified by the WindowAttributes property:

WindowCenter property

WindowWidth property

WindowCWExplanation property

These properties are based on the attributes of the "VOI LUT Module". Please see the "VOI LUT Module Attributes" in the DICOM standard for more details.

See Also

Elements: | GetWindowAttributes method, SetWindowAttributes method, VOILUTAttributes property
Topics: | Lookup Tables


WindowCount property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long WindowCount
Overview | Refer to LUT Encoding.

Remarks

(Read-only) The WindowCount property specifies the number of values under the "Window Center" (0028,1050) element. This should also be equal to the number of values under the "Window Width" (0028,1051) element.

See Also

Elements: | WindowAttributes property, GetWindowAttributes method, SetWindowAttributes method, DeleteWindow method, VOILUTCount property
Topics: | Lookup Tables


VOILUTAttributes property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILVOILUTAttributes* VOILUTAttributes
Overview | Refer to LUT Encoding.

Remarks

(Read-only) The VOILUTAttributes property specifies the attributes that describe a VOI LUT.

When the GetVOILUTAttributes method is called to retrieve the attributes of a VOI LUT, the various properties specified by the VOILUTAttributes property are updated with the retrieved values.

When setting the attributes of a VOI LUT, the properties specified by the VOILUTAttributes property should be set to the desired values before calling the SetVOILUT method.

This is a list of the properties specified by the VOILUTAttributes property:

LUTDescriptorNumberOfEntries property

LUTDescriptorFirstMapped property

LUTDescriptorEntryBits property

LUTExplanation property

These properties are based on the attributes of the "VOI LUT Module". Please see the "VOI LUT Module Attributes" in the DICOM standard for more details.

See Also

Elements: | GetVOILUTAttributes method, SetVOILUT method, WindowAttributes property
Topics: | Lookup Tables


AddLayerImageRef method (ILEADDicomDS)

AddLayerImageRef method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short AddLayerImageRef(BSTR bstrSOPInstanceUID);
Overview | Refer to Working with DICOM Annotations

Remarks

The AddLayerImageRef method adds a new Item to the "Referenced Image Sequence" (0008,1140) under one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method. Also, the specified Image SOP Instance should be already referenced by the "Referenced Image Sequence" (0008,1140) under the "Presentation State Module" (the AddPresStateImageRef method can be used to do this).

See Also

Elements: | AddPresStateImageRef method, GetLayerImageRefCount method, GetLayerImageRefInstanceUID method, RemoveLayerImageRef method, FindLayerRefImageItem method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Layers


AddPresStateImageRef method (ILEADDicomDS)

AddPresStateImageRef method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short AddPresStateImageRef(VARIANT Image, VARIANT FrameNumbers);
Overview | Refer to Working with DICOM Annotations

Remarks

The AddPresStateImageRef method adds a reference to an Image SOP Instance by inserting a new Item into the "Referenced Image Sequence" (0008,1140) under the "Presentation State Module".

See Also

Elements: | RemovePresStateImageRef method, RemoveAllPresStateImageRefs method, GetPresStateImageRefInstanceUID method, GetPresStateImageRefCount method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


AnnCount method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AnnCount ();
Overview | Refer to DICOM Annotation Files.

Remarks

(Medical only) Gets information about the annotations stored in a DICOM data set.

LEAD Annotation files can be saved as private data in a DICOM data set (LEAD native format or binary encoded format). There can be up to 256 private data tags for LEAD annotation files.

This method updates the AnnPrivateCreatorTag property with the private creator tag used to allocate private data for the LEAD annotations. For more information, refer to the AnnPrivateCreatorTag property.

This method also updates the AnnEntries property to identify how many annotation files are stored in the DICOM data set. For more information, refer to the AnnEntries property.

See Also

Elements: | AnnSave method, AnnDelete method, AnnLoad method, AnnContainer property, AnnPrivateCreatorTag property, AnnEntries property
Topics: | Data Sets: Annotation Files


AnnDelete method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AnnDelete (short iIndex, long lPage);
Overview | Refer to DICOM Annotation Files.

Remarks

(Medical only) Deletes a page from an annotation file, deletes the entire annotation file, or deletes all annotation files stored in a DICOM data set.

LEAD Annotation files can be saved as private data in a DICOM data set (LEAD native format or binary encoded format). There can be up to 256 private data tags for LEAD annotation files. The AnnDelete method can delete a page from an annotation file, delete the entire annotation file, or delete all annotation files in a DICOM data set.

To delete the third page of the annotation file at index 1:

m_pLEADDICOM1->LoadDS("d:\\work\\images\\a.dic", 0);
m_pLEADDICOM1->AnnDelete(1, 3);

To delete the annotation file at index 1

m_pLEADDICOM1->LoadDS("d:\\work\\images\\a.dic", 0);
m_pLEADDICOM1->AnnDelete(1, -1);

To delete all annotation files and the private creator data element

m_pLEADDICOM1->LoadDS("d:\\work\\images\\a.dic", 0);
m_pLEADDICOM1->AnnDelete(-1, 0);

See Also

Elements: | AnnLoad method, AnnSave method, AnnCount method, AnnContainer property, AnnPrivateCreatorTag property, AnnEntries property
Topics: | Data Sets: Annotation Files


AnnLoad method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AnnLoad (short iIndex, long lPage);
Overview | Refer to DICOM Annotation Files.

Remarks

(Medical only) Loads the specified annotation file from a DICOM data set.

LEAD Annotation files can be saved as private data in a DICOM data set (LEAD native format or binary encoded format). There can be up to 256 private data tags for LEAD annotation files. Specify one of the 256 possible files by setting the nIndex parameter to be a value from 0 to 255.

This method updates the AnnContainer property, which can be used in the LEAD Raster Annotation COM Object.

This method also updates the AnnPrivateCreatorTag property with the private creator tag of the LEAD annotations.

The 256 annotation files can hold one or more pages. Select the page to load by setting the lPage argument to the desired page number. The page number is one based. Therefore, the first page is page 1; the second page is page 2, etc.

To delete a page from a multi-page annotation file, or to delete the entire annotation file, use the AnnDelete method.

See Also

Elements: | AnnSave method, AnnCount method, AnnDelete method, AnnContainer property, AnnPrivateCreatorTag property, AnnEntries property
Topics: | Data Sets: Annotation Files


AnnSave method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AnnSave (short iIndex, short iFormat, VARIANT_BOOL bSelected, short iModify, short iSavePage);
Overview | Refer to DICOM Annotation Files.

Remarks

(Medical only) Saves annotations as private data in a DICOM data set.

LEAD Annotation files can be saved as private data in a DICOM data set (LEAD native format or binary encoded format). There can be up to 256 private data tags for LEAD annotation files. Specify one of the 256 possible files by setting the nIndex parameter to be a value from 0 to 255.

The annotations that are saved are those that are stored in the AnnContainer property. Therefore, you must set the AnnContainer property prior to calling this method. For more information, see the documentation for AnnContainer.

Setting the AnnPrivateCreatorTag property before calling this method affects where the data is stored in the DICOM data set. You can specify a private creator tag, or set it to 0 to have the tag automatically chosen. For more information, see the documentation for AnnPrivateCreatorTag.

Each of the possible 256 annotation files can store multiple pages

To overwrite an existing annotation file, pass SAVE_OVERWRITE for the iModify parameter (iSavePage will be ignored).

To add a page to the end of an annotation file, pass SAVE_APPEND for the iModify argument (iSavePage will be ignored).

To replace a page in an annotation file, pass SAVE_REPLACE and set iSavePage to the page number to be replaced. Note that page numbers are 1-based. Therefore, the first page is page 1, the second page is page 2, etc.

To insert a new page, pass SAVE_INSERT and set iSavePage. The new page will be inserted BEFORE the page specified in iSavePage.

See Also

Elements: | AnnLoad method, AnnCount method, AnnDelete method, AnnContainer property, AnnPrivateCreatorTag property, AnnEntries property
Topics: | Data Sets: Annotation Files


AddWaveformGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AddWaveformGroup(IDicomWaveformGroup* pWaveformGroup, short nFlags, long lIndex);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The AddWaveformGroup method adds a new waveform multiplex group to the dataset.

In DICOM, a waveform consists of one or more multiplex groups, each encoded into an Item in the Waveform Sequence (5400,0100). Use this method to add a new multiplex group to the dataset.

See Also

Elements: | GetWaveformGroupCount method, GetWaveformGroup method, DeleteWaveformGroup method
Topics: | DICOM Waveform Groups: Using Waveform Groups


ChangeTransferSyntax method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short ChangeTransferSyntax (BSTR bstrUID, short nQFactor, short nFlags);
Overview | Refer to Working with Data Sets.

Remarks

Changes the transfer syntax of the data set.

This method will convert the data set's transfer syntax to the transfer syntax specified in bstrUID, maintaining all elements and values in the data set.

After this function is called all previous references to data elements in the data set will no longer be valid.

This function is especially useful when sending a C_STORE_REQ message using the SendCStoreRequest method. The user can match the data set transfer syntax with the transfer syntax of the SCP.

See Also

Elements: | SendCStoreRequest method
Topics: | Data Sets: Getting and Setting Data Set Information


ConformanceTestDS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ConformanceTestDS ();
Overview | Refer to Working with Data Sets.

Remarks

Verifies the conformance of the Data Set with the DICOM Standard.

For each Data Element in the Data Set that is invalid, a ConformanceStatus event is fired.

Information from the Value Representation Table, the Data Element Tag Table and the IOD Table is used when analyzing the Data Element for conformance.

See Also

Topics:

Data Sets: Getting and Setting Data Set Information


ConvertDicomAnnObjToLEADAnnObj method (ILEADDicomDS)

ConvertDicomAnnObjToLEADAnnObj method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short ConvertDicomAnnObjToLEADAnnObj(VARIANT_BOOL bConvertGraphicObject);
Overview | Refer to Working with DICOM Annotations

Remarks

The ConvertDicomAnnObjToLEADAnnObj method converts a DICOM annotation object to a LEAD annotation object. The handle to the resulted LEAD annotation object can be obtained by accessing the LEADAnnObject property.

Before calling the method, describe the DICOM annotation object to be converted by setting the proper properties (those specified either by the GraphicObjectAttributes property or by the TextObjectAttributes property).

Note: When no longer needed, the resulting LEAD annotation object must be destroyed using the AnnDestroy method of the LEAD Raster Annotation object.

See Also

Elements: | LEADAnnObject property, ConvertLEADAnnObjToDicomAnnObjs method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Converting Between LEADTOOLS Annotations and DICOM Annotations


ConvertLEADAnnObjToDicomAnnObjs method (ILEADDicomDS)

ConvertLEADAnnObjToDicomAnnObjs method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short ConvertLEADAnnObjToDicomAnnObjs(long hLEADAnnObject, long lFlags);
Overview | Refer to Working with DICOM Annotations

Remarks

The ConvertLEADAnnObjToDicomAnnObjs method converts a LEAD annotation object to one or more DICOM graphic and/or text annotation objects.

The OnConvertLEADAnnObjToDicomAnnObj event will be fired for each DICOM annotation object resulted from the conversion. Based on the parameter bGraphicObject of the event, which indicates the type (graphic or text) of the resulted DICOM object, the attributes of the resulted object can be obtained by accessing the properties specified either by the GraphicObjectAttributes property or by the TextObjectAttributes property. During the handling of the event, the EndConversion method can be used to stop the conversion process.

If a "Graphic Annotation Sequence" (0070,0001) Item (in the "Graphic Annotation Module") is specified by the CurrentElement property when the method is called, the method will automatically add the resulted DICOM annotation objects to the Data Set. If the resulted object is a graphic one, a corresponding Item will be added to the "Graphic Object Sequence" (0070,0009) under the "Graphic Annotation Sequence" Item. Similarly, if the resulted object is a text one, a corresponding Item will be added to the "Text Object Sequence" (0070,0008) under the "Graphic Annotation Sequence" Item. Set the CurrentElement property to 0 when calling the method if you don’t want the resulted objects to be added to the Data Set.

Currently, a subset of the LEADTOOLS annotation objects can be converted (mapped) into DICOM annotation objects; this includes:

Line objects

Rectangle objects

Ellipse objects

Poly-line objects

Polygon objects

Pointer objects

Freehand objects

Text objects

Protractor objects

Point objects

Curve objects (interpolated lines)

Curve Closed objects

Text Pointer objects

See Also

Elements: | OnConvertLEADAnnObjToDicomAnnObj event, EndConversion method, GraphicObjectAttributes property, TextObjectAttributes property, ConvertDicomAnnObjToLEADAnnObj method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Converting Between LEADTOOLS Annotations and DICOM Annotations


CreateGraphicAnnItem method (ILEADDicomDS)

CreateGraphicAnnItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short CreateGraphicAnnItem(long lIndex, BSTR bstrLayerName);
Overview | Refer to Working with DICOM Annotations

Remarks

The CreateGraphicAnnItem method adds a new Item to the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module". The method will create the sequence if it doesn't already exist.

See Also

Elements: | FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, SetLayerName method, GetLayerGraphicObjectCount method, GetLayerTextObjectCount method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


CreateGraphicObject method (ILEADDicomDS)

CreateGraphicObject method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short CreateGraphicObject(VARIANT_BOOL bCheckLayer);
Overview | Refer to Working with DICOM Annotations

Remarks

The CreateGraphicObject method creates a graphic annotation object by adding a new Item to the "Graphic Object Sequence" (0070,0009) under one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module". The object will be created based on the values of the properties specified by the GraphicObjectAttributes property.

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method. Also, the properties specified by the GraphicObjectAttributes property should be set to the desired values before calling the method.

The CreateGraphicAnnItem method can be used to add a new "Graphic Annotation Sequence" Item.

See Also

Elements: | GetGraphicObjectAttributes method, SetGraphicObjectAttributes method, RemoveGraphicObject method, GetGraphicObjectCount method, FindGraphicObjectItem method, CreateGraphicAnnItem method, CreateTextObject method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


CreateLayer method (ILEADDicomDS)

CreateLayer method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short CreateLayer();
Overview | Refer to Working with DICOM Annotations

Remarks

The CreateLayer method creates a new layer by adding a new Item to the "Graphic Layer Sequence" (0070,0060) under the "Graphic Layer Module".

The new layer will be created based on the values of the properties specified by the LayerAttributes property These properties should be set to the desired values before calling the method. The index of the newly created layer can be obtained by accessing the NewLayerIndex property.

The method will fail and return DICOM_ERROR_PARAMETER if a layer with the same name as the new layer already exists in the Data Set.

See Also

Elements: | LayerAttributes property, NewLayerIndex property, GetLayerAttributes method, SetLayerAttributes method, RemoveLayer method, GetLayerIndex, FindLayerItem method, SetLayerName method.
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


CreateSignature method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short CreateSignature(BSTR bstrPrivateKeyFile, BSTR bstrCertificateFile, BSTR bstrPassword, BSTR bstrMacTransferSyntax, DicomMacAlgorithm MacAlgorithm, VARIANT_BOOL bElementsToSign, DicomSecurityProfile SecurityProfile, short nReserved);
Overview | Refer to Working with Digital Signatures.

Remarks

The CreateSignature method creates a Digital Signature in the Data Set. Before calling the method, the CurrentElement property must be updated either with 0 or with an Item of a Sequence of Items in the Data Set. If the property is updated with 0, the Digital Signature will be created in the main Data Set. If the property is updated with an Item, the Digital Signature will be created in the specified Item. In case of success, the CurrentElement property will be updated with the new Digital Signatures Sequence Item that corresponds to the newly created Digital Signature.

The bstrMacTransferSyntax parameter specifies the Transfer Syntax in which the Data Elements included in the Message Authentication Code (MAC) calculation should be encoded. This Transfer Syntax must explicitly include the Value Representation (Explicit VR) and it must use the Little Endian Byte ordering. If the specified Transfer Syntax doesn’t fulfill this condition, the method will behave as if the parameter were set to NULL or to an empty string.

If bstrMacTransferSyntax is set to NULL or to an empty string, the method will use the Transfer Syntax in which the Data Set is currently encoded if this Transfer Syntax fulfills the condition mentioned in the previous paragraph. If it doesn’t, the method will use the Explicit VR Little Endian Transfer Syntax.

With the parameter bElementsToSign set to VARIANT_TRUE, you can use the LongValues property and the LongValueCount property to specify the Data Elements to be covered by the new Digital Signature. These Data Elements, which are indicated by their Tags, must be on the root of the Data Set if the Digital Signature is being created in the main Data Set. If the Digital Signature is being created in an Item, then they must be located immediately under that Item. Any Tag that doesn’t specify an existing Data Element in the expected location will be ignored. Also, any Tag that specifies a Data Element that cannot be signed according to the standard will be ignored as well.

If bElementsToSign is set to VARIANT_FALSE, or if it is set to VARIANT_TRUE while the LongValueCount property is 0, the method will sign all the Data Elements that can be signed according to the standard and that exist on the root of the Data Set, if the CurrentElement property is set to 0, or immediately under the Item specified by the CurrentElement property.

Digital Signature Security Profiles put restrictions and add specifications. For example, the RSA Security Profiles require the use of RSA encryption. Therefore, the method will fail if one of these Security Profiles is used while the specified keys are DSA keys. Another example is that the Creator and Authorization RSA Digital Signature Profiles require that, as a minimum, certain Data Elements must be signed if they exist. Therefore, if one of these Security Profiles is used, the method will sign any existing Data Element that is required, even if this Data Element is not included in the array specified by the LongValues property (when bElementsToSign is set to VARIANT_TRUE).

See Also

Elements: | VerifySignature method, DeleteSignature method, GetSignatureUID method, GetSignatureDateTime method, MoveSignedElement method, GetMacTransferSyntax method, MoveSignature method, CurrentElement property, LongValues property, LongValueCount property
Topics: | Data Sets: Digital Signatures


CreateTextObject method (ILEADDicomDS)

CreateTextObject method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short CreateTextObject(VARIANT_BOOL bCheckLayer);
Overview | Refer to Working with DICOM Annotations

Remarks

The CreateTextObject method creates a text annotation object by adding a new Item to the "Text Object Sequence" (0070,0008) under one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module". The object will be created based on the values of the properties specified by the TextObjectAttributes property.

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method. Also, the properties specified by the TextObjectAttributes property should be set to the desired values before calling the method.

The CreateGraphicAnnItem method can be used to add a new "Graphic Annotation Sequence" Item.

See Also

Elements: | GetTextObjectAttributes method, SetTextObjectAttributes method . RemoveTextObject method . GetTextObjectCount method, FindTextObjectItem method, CreateGraphicAnnItem method, CreateGraphicObject method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Text Objects


DefaultContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DefaultContextGroup(VARIANT_BOOL bDefaultAll);
Overview | Refer to Working with Context Groups.

Remarks

The DefaultContextGroup method restores the Context Group specified by the CurrentContextGroup property to the default values as stored in the internal table maintained by LEADTOOLS. If the parameter bDefaultAll is set to VARIANT_TRUE, the method will restore all the Context Groups in the Context Group Table.

LEADTOOLS maintains an internal table of the Context Groups defined by the DICOM Content Mapping Resource (DCMR). Use the LoadContextGroup method to load Context Groups from this table into the Context Group Table. After a Context Group loaded, its Coded Concepts can be deleted, their Code Meanings can be modified, and new Concepts can be added to the Group. Use the DefaultContextGroup method to discard all the changes made to the Context Group.

If the internal table doesn’t contain a Context Group with the same Context ID as that of the Context Group specified by the CurrentContextGroup property, the method will just return successfully without affecting the Context Group.

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, ResetContextGroup method, DeleteContextGroup method, DeleteCodedConcept method, SetCodedConceptCodeMeaning method, InsertCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


DefaultIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DefaultIOD ();
Overview | Refer to Working with Information Object Definitions.

Remarks

Resets the IOD Structure to the default values. This will delete any user-defined items that have been added.

If you remove the contents of the IOD Structure using the ResetIOD method, you can reset the IOD Structure to the default values by calling this function.

See Also

Elements: | InsertIOD method, DeleteIOD method, ResetIOD method
Topics: | Information Object Definitions: Setting the Default IOD Table


DefaultTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DefaultTag ();
Overview | Refer to Working with Tags.

Remarks

Resets the Data Element Tag Table to the default values. This will delete any user-defined items that have been added.

To see the default values for the Data Element Tag Table, refer to the Default Data Element Tag Table.

If you remove the contents of the table using ResetTag, you can reset the table to the default values by calling this method.

See Also

Elements: | InsertTag method, DeleteTag method, ResetTag method
Topics: | Data Element Tags: Setting the Default Data Element Tag Table


DefaultUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DefaultUID ();
Overview | Refer to Working with Unique Identifiers.

Remarks

Resets the UID Table to the default values. This will delete any user-defined items that have been added.

To see the default values for the UID Table, refer to the Default UID Table.

If you remove the contents of the table using ResetUID, you can reset the table to the default values by calling this method.

See Also

Elements: | InsertUID method, DeleteUID method, ResetUID method
Topics: | Unique Identifiers: Setting the Default UID Table


DefaultVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DefaultVR ();
Overview | Refer to Working with Value Representations.

Remarks

Resets the Value Representation Table to the default values. This will delete any user-defined items that have been added.

To see the default values for the Value Representation Table, refer to the Default Value Representation Table.

If you remove the contents of the table using the ResetVR method, you can reset the table to the default values by calling this method.

See Also

Elements: | InsertVR method, DeleteVR method, ResetVR method
Topics: | Value Representations: Setting the Default Value Representation Table


DeleteBitmapValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteBitmapValue (long lIndex, long lCount);
Overview | Refer to Working with Data Sets.

Remarks

This method deletes the image(s) in the Pixel Data Element starting at the specified index and continuing for the specified count.

As an example, if you wish to delete 50 images starting with the 50th frame in the Pixel Data, call this method with lIndex set to 49 (the 50th frame in a zero-based index) and lCount set to 50.

Most DICOM files will only have one Data Element of type TAG_PIXEL_DATA. Therefore, in most instances the CurrentElement property can be NULL, since the method will automatically delete the images of the only Pixel Data Element in the file. If the CurrentElement property is not NULL, it must contain the Pixel Data Element itself.

If the DICOM file is CLASS_BASIC_DIRECTORY, the file may contain more than one Pixel Data Element. In this case you must specify in the CurrentElement property the Pixel Data Element from which to delete the images.

If you wish to replace only one image within the Pixel Data Element, you must use DeleteBitmapValue method and InsertBitmapValue method.

See Also

Elements: | GetBitmapValue method, GetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method, SetBitmapListValue method, SetBitmapListValue method, DeleteBitmapValue method
Topics: | Data Sets: Getting and Setting Data Element Values


DeleteCodedConcept method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL DeleteCodedConcept();
Overview | Refer to Working with Context Groups.

Remarks

The DeleteCodedConcept method deletes the Coded Concept specified by the CurrentCodedConcept property from the Context Group to which it belongs and updates the property with an adjacent Coded Concept in the same Context Group if the deleted Concept wasn’t the last one in the Group.

If a Context Group in the Context Group Table has a corresponding Group in the internal table maintained by LEADTOOLS, then you can use the DefaultContextGroup method to discard any changes made to the Context Group, including the deletions of any Coded Concepts that originally belong to the Context Group, as stored in the internal table.

See Also

Elements: | CurrentCodedConcept property, SetCodedConceptCodeMeaning method, InsertCodedConcept method, MoveFirstCodedConcept method, FindIndexCodedConcept method, MoveCodedConceptGroup method, DefaultContextGroup method, DeleteContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


DeleteContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL DeleteContextGroup();
Overview | Refer to Working with Context Groups.

Remarks

The DeleteContextGroup method deletes the Context Group specified by the CurrentContextGroup property from the Context Group Table and updates the property with an adjacent Context Group if the deleted Group wasn’t the last one in the table.

Use the LoadContextGroup method and the InsertContextGroup method to add Context Groups to the Context Group Table. Use the DeleteContextGroup method to delete a Context Group from the table. You can also use the ResetContextGroup method to delete all the Context Groups at once.

Use the DeleteCodedConcept method to delete a Coded Concept in a Context Group.

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, ResetContextGroup method, DefaultContextGroup method, DeleteCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


DeleteElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteElement ();
Overview | Refer to Working with Data Sets.

Remarks

Deletes the item specified by the CurrentElement property from the Data Set.

You can remove all items from the table using ResetDS method.

Since the Data Set is stored internally as a tree, the deletion must be carried out as a tree.

When deleting an item from the tree, if the item being deleted has a sibling (same level, same parent), following it, this method updates the CurrentElement property with this sibling. If the item being deleted does not have a sibling following it, but has a sibling preceding it, this method updates the CurrentElement property with the preceding sibling. If the item being deleted is an only child, this method updates the CurrentElement property with the parent. If there is no parent this method updates the CurrentElement property with 0.

Below are illustrations of these situations:

For the sake of these illustrations, the order of siblings is top to bottom. A preceding sibling is drawn above the sibling it precedes, a following sibling is drawn below the sibling it follows.

Please note that the numbering of the items of interest is arbitrary, and does not imply order.

In this illustration item 2 will be deleted. Since it has a following sibling, the CurrentElement property will be updated with item 3.

In this illustration item 3 will be deleted. Since it does not have a following sibling, but does have a preceding sibling, the CurrentElement property will be updated with item 2.

In this illustration item 2 will be deleted. Since it is an only child, the CurrentElement property will be updated with the parent, item 1.

In this illustration item 1 will be deleted. Since it has no siblings and no parent, the CurrentElement property will be updated with NULL.

See Also

Elements: | ResetDS method, MoveFirstElement method, MoveLastElement method, MovePrevElement method, MoveNextElement method, FindFirstElement method, FindNextElement method, FindLastElement method, FindPrevElement method, InsertElement method
Topics: | Data Sets: Inserting and Deleting Data Set Members


DeleteIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteIOD ();
Overview | Refer to Working with Information Object Definitions.

Remarks

Deletes the item specified by the CurrentIOD property from the IOD Structure. Sets the CurrentIOD property to the previous item in the IOD Structure.

You can remove all items from the table using ResetIOD method.

Since the IOD Structure is stored internally as a tree, the deletion must be carried out as a tree.

When deleting an item from the tree, if the item being deleted has a sibling (same level, same parent), following it, this method updates the CurrentIOD property with this sibling. If the item being deleted does not have a sibling following it, but has a sibling preceding it, this method updates the CurrentIOD property with the preceding sibling. If the item being deleted is an only child, this method updates the CurrentIOD property with the parent. If there is no parent this method updates the CurrentIOD property with 0.

Below are illustrations of these situations:

For the sake of these illustrations, the order of siblings is top to bottom. A preceding sibling is drawn above the sibling it precedes, a following sibling is drawn below the sibling it follows.

Please note that the numbering of the items of interest is arbitrary, and does not imply order.

In this illustration item 2 will be deleted. Since it has a following sibling, the CurrentIOD property will be updated with item 3.

In this illustration item 3 will be deleted. Since it does not have a following sibling, but does have a preceding sibling, the CurrentIOD property will be updated with item 2.

In this illustration item 2 will be deleted. Since it is an only child, the CurrentIOD property will be updated with the parent, item 1.

In this illustration item 1 will be deleted. Since it has no siblings and no parent, the CurrentIOD property will be updated with NULL.

See Also

Elements: | ResetIOD method, MoveFirstIOD method, MoveLastIOD method, MovePrevIOD method, MoveNextIOD method, FindIOD method, InsertIOD method
Topics: | Information Object Definitions: Inserting and Deleting IODs


DeleteKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteKey ();
Overview | Refer to Working with Key Elements.

Remarks

Deletes the key element specified by the CurrentElement property from the DICOM Dir Data Set.

When a key element is deleted using this function, all offspring of the key element (both key element children and non-key element children) and all their respective children are also deleted.

Below are illustrations of this:

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items of interest is arbitrary, and does not imply order.

In this illustration item 2 will be deleted. If any of the children of item 2 had children, these would be deleted also.

In this illustration item 3 will be deleted. Again, if any of the children of item 2 had children, these would be deleted also.

Please note that key elements should not be deleted using the DeleteElement method. Deleting a key element using DeleteElement method will not delete any child key elements, but will delete information that references the child key elements.

For more information about key elements, refer to Working with Key Elements.

See Also

Elements: | InsertKey method
Topics: | Key Elements: Inserting and Deleting Key Elements


DeleteModalityLUT method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteModalityLUT(long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The DeleteModalityLUT method deletes all the elements defined under the "Modality LUT Module".

See Also

Elements: | GetModalityLUTAttributes method, GetModalityLUTData method, SetModalityLUT method
Topics: | Lookup Tables


DeleteModule method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteModule ( long lModule );
Overview | Refer to Working with Data Sets.

Remarks

Deletes a module from the Data Set.

You can remove all items from the Data Set using the ResetDS method.

Following deletion, the CurrentModule property is set to NULL.

See Also

Topics:

Data Sets: Inserting and Deleting Data Set Members


DeleteOverlay method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteOverlay(long lOverlayIndex, long lFlags);
Overview | Refer to Overlays Overview.

Remarks

The DeleteOverlay method deletes all the elements that describe an overlay.

The method will delete the following elements:

"Overlay Rows" | (60xx, 0010)
"Overlay Columns" | (60xx, 0011)
"Overlay Planes" | (60xx, 0012)
"Number of Frames in Overlay" | (60xx, 0015)
"Overlay Description" | (60xx, 0022)
"Overlay Type" | (60xx, 0040)
"Overlay Subtype" | (60xx, 0045)
"Overlay Origin" | (60xx, 0050)
"Image Frame Origin" | (60xx, 0051)
"Overlay Plane Origin" | (60xx, 0052)
"Overlay Bits Allocated" | (60xx, 0100)
"Overlay Bit Position" | (60xx, 0102)
"Overlay Activation Layer" | (60xx, 1001)
"ROI Area" | (60xx, 1301)
"ROI Mean" | (60xx, 1302)
"ROI Standard Deviation" | (60xx, 1303)
"Overlay Label" | (60xx, 1500)
"Overlay Data" | (60xx, 3000)

See Also

Elements: | OverlayCount property, GetOverlayAttributes method
Topics: | Overlays


DeletePaletteColorLUT method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeletePaletteColorLUT(long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The DeletePaletteColorLUT method deletes all the elements defined under the "Palette Color Lookup Module", this includes:

Red Palette Color Lookup Table Descriptor (0028,1101)

Green Palette Color Lookup Table Descriptor (0028,1102)

Blue Palette Color Lookup Table Descriptor (0028,1103)

Palette Color Lookup Table UID (0028,1199)

Red Palette Color Lookup Table Data (0028,1201)

Green Palette Color Lookup Table Data (0028,1202)

Blue Palette Color Lookup Table Data (0028,1203)

Segmented Red Palette Color Lookup Table Data (0028,1221)

Segmented Green Palette Color Lookup Table Data (0028,1222)

Segmented Blue Palette Color Lookup Table Data (0028,1223)

See Also

Elements: | GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method, GetPaletteColorLUTData method, SetPaletteColorLUTData method
Topics: | Lookup Tables


DeleteSignature method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DeleteSignature();
Overview | Refer to Working with Digital Signatures.

Remarks

The DeleteSignature method removes Digital Signatures from the Data Set. Before calling the method, the CurrentElement property must be updated either with 0 or with a Digital Signatures Sequence Item. If the property is updated with 0, the method will remove all the Digital Signatures in the whole Data Set. If the property is updated with the Digital Signatures Sequence Item of a Digital Signature, the method will remove only the specified Digital Signature.

When the method is used to remove a single Digital Signature, the method will delete the corresponding Digital Signatures Sequence Item from the Data Set. The Message Authentication Code (MAC) Parameters Sequence Item that was referenced by the deleted Item will also be deleted if it is not referenced by a Digital Signatures Sequence Item anymore.

When the method is used to remove all the Digital Signatures in the whole Data Set, the method will delete all the MAC Parameters Sequence (4FFE,0001) and the Digital Signatures Sequence (FFFA,FFFA) Data Elements that exist in the Data Set.

See Also

Elements: | MoveSignature method, FindSignature method, VerifySignature method, CreateSignature method, CurrentElement property
Topics: | Data Sets: Digital Signatures


DeleteTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteTag ();
Overview | Refer to Working with Tags.

Remarks

Deletes the item specified by the CurrentTag property from the Data Element Tag Table. Sets the CurrentTag property to the previous item in the table.

You can remove all items from the table using the ResetTag method.

See Also

Elements: | ResetTag method, MoveFirstTag method, MoveLastTag method, MovePrevTag method, MoveNextTag method, FindTag method, FindIndexTag method, InsertTag method
Topics: | Data Element Tags: Inserting and Deleting Data Element Tags


DeleteUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteUID ();
Overview | Refer to Working with Unique Identifiers.

Remarks

Deletes the item specified by the CurrentUID property from the UID Table. Sets the CurrentUID property to the previous item in the table.

You can remove all items from the table using the ResetUID method.

See Also

Elements: | ResetUID method, MoveFirstUID method, MoveLastUID method, MovePrevUID method, MoveNextUID method, FindUID method, FindIndexUID method, InsertUID method
Topics: | Unique Identifiers: Inserting and Deleting UIDs


DeleteVOILUT method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteVOILUT(long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The DeleteVOILUT method deletes the "VOI LUT Sequence" (0028,3010) and all the items under that sequence.

See Also

Elements: | VOILUTCount property, GetVOILUTAttributes method, GetVOILUTData method, SetVOILUT method, DeleteWindow method
Topics: | Lookup Tables


DeleteVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteVR ();
Overview | Refer to Working with Value Representations.

Remarks

Deletes the item specified by the CurrentVR property from the Value Representation Table. Sets the CurrentVR property to the previous item in the table.

You can remove all items from the table using the ResetVR method.

See Also

Elements: | ResetVR method, MoveFirstVR method, MoveLastVR method, MovePrevVR method, MoveNextVR method, FindVR method, FindIndexVR method, InsertVR method
Topics: | Value Representations: Inserting and Deleting Value Representations


DeleteWaveformGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteWaveformGroup(long lIndex, short nReserved);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The DeleteWaveformGroup method removes the waveform multiplex group at the specified index from the dataset.

See Also

Elements: | GetWaveformGroupCount method, GetWaveformGroup method, AddWaveformGroup method
Topics: | DICOM Waveform Groups: Using Waveform Groups


DeleteWindow method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short DeleteWindow(long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The DeleteWindow method deletes all the elements that describe the Window Center and Window Width.

The method will delete the following elements:

Window Center (0028,1050)

Window Width (0028,1051)

Window Center & Width Explanation (0028,1055)

See Also

Elements: | WindowCount property, GetWindowAttributes method, SetWindowAttributes method, DeleteVOILUT method
Topics: | Lookup Tables


EndConversion method (ILEADDicomDS)

EndConversion method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | void EndConversion(short nReturnValue);
Overview | Refer to Working with DICOM Annotations

Remarks

The EndConversion method terminates the conversion process started by a call to the ConvertLEADAnnObjToDicomAnnObjs method.

The use of the EndConversion method is meaningless unless made during the handling of the OnConvertLEADAnnObjToDicomAnnObj event. When the method is called during the processing of the event, the ConvertLEADAnnObjToDicomAnnObjs method will stop the conversion and return the value specified by the parameter nReturnValue.

See Also

Elements: | ConvertLEADAnnObjToDicomAnnObjs method, OnConvertLEADAnnObjToDicomAnnObj event
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Converting Between LEADTOOLS Annotations and DICOM Annotations


FindClassIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindClassIOD ( long lClass );
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property with the item in the IOD Structure that contains the IOD for the specified class.

To find the IOD of modules within a class, use the FindModuleIOD method.

The FindIOD method lets you find IODs for classes, modules or elements in the IOD Structure.

See Also

Elements: | FindIOD method, FindModuleIOD method
Topics: | Information Object Definitions: Searching the IOD Table


FindCodedConcept method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL FindCodedConcept(BSTR bstrCodingSchemeDesignator, BSTR bstrCodeValue);
Overview | Refer to Working with Context Groups.

Remarks

The FindCodedConcept method searches the Context Group specified by the CurrentContextGroup property for the Coded Concept that has the specified Coding Scheme Designator and Code Value. The CurrentCodedConcept property is updated with the Coded Concept if it was found.

A Coded Concept is identified in its Context Group by its Coding Scheme Designator (0008,0102) and Code Value (0008,0100). Use the FindCodedConcept method to search a Context Group for a specific Coded Concept.

You can use the FindContextGroup method to search for a specific Context Group in the Context Group Table.

See Also

Elements: | CurrentCodedConcept property, CurrentContextGroup property, MoveFirstCodedConcept method, MoveCodedConceptGroup method, FindContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


FindContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL FindContextGroup(BSTR bstrContextID);
Overview | Refer to Working with Context Groups.

Remarks

The FindContextGroup method updates the CurrentContextGroup property with the Context Group in the Context Group Table which has the Context Identifier (CID) specified.

A Context Group is identified by its Context Identifier (CID). For a list of the Context Identifiers of the Context Groups maintained internally, refer to Context Identifiers.

Notice that only the Context Groups in the Context Group Table are searched by the method; the LoadContextGroup method and the InsertContextGroup method are used to add Context Groups to the table.

You can use the FindCodedConcept method to search for a specific Coded Concept in a Context Group.

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveFirstContextGroup method, MoveFirstCodedConcept method, FindCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


FindFirstElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindFirstElement ( long lTag, BOOL bTree );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property with the first element in the Data Set that has the specified tag. The search begins with the element specified in the CurrentElement property. The results depend on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the first item on the same level and with the same parent as the element specified in the CurrentElement property, that has tag lTag.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore first is evaluated top to bottom.

Please note that the numbering of the items of interest in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | The first sibling (same level, same parent) of Item 1 that has tag lTag, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 2 | The first sibling (same level, same parent) of Item 2 that has tag lTag, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 3 | The first sibling (same level, same parent) of Item 3 that has tag lTag, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.

If the Data Set is evaluated as a list, this method updates the CurrentElement with the first item in the entire list that has tag lTag. The search begins at the element specified in the CurrentElement property.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore first is evaluated top to bottom.

Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property is updated with :
Item 1 | The first item in the list that has tag lTag, if such an item exists. If an item with tag lTag is not found, the CurrentElement property is updated with NULL.
Item 14 | The first item in the list that has tag lTag, if such an item exists If an item with tag lTag is not found, the CurrentElement property is updated with NULL.
Item 22 | The first item in the list that has tag lTag, if such an item exists. If an item with tag lTag is not found, the CurrentElement property is updated with NULL.

The following methods will also help you find elements in the Data Set with a specific tag:

FindLastElement method

FindPrevElement method

FindNextElement method

The following methods will help you find specific modules in the Data Set:

FindModule method

FindIndexModule method

See Also

Elements: | FindFirstElement method, FindPrevElement method, FindNextElement method, FindModule method, FindIndexModule method
Topics: | Data Sets: Searching a Data Set


FindFirstGraphicAnnItem method (ILEADDicomDS)

FindFirstGraphicAnnItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short FindFirstGraphicAnnItem();
Overview | Refer to Working with DICOM Annotations

Remarks

The FindFirstGraphicAnnItem method updates the CurrentElement property with the first Item under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

Use this method along with the MoveNextGraphicAnnItem to enumerate all the Items under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

See Also

Elements: | MoveNextGraphicAnnItem method, CreateGraphicAnnItem method, GetLayerGraphicObjectCount method, RemoveLayerGraphicObjects method, GetLayerTextObjectCount method, RemoveLayerTextObjects method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


FindFirstKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindFirstKey (BSTR pszKey, BOOL bTree);
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property with the first key element in the Data Set that has the specified key element type. The search begins with the element specified in the CurrentElement property. The results depend on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the first item on the same level and with the same parent as the key element specified in the CurrentElement property, that has key element type pszKey. For the sake of these illustrations, the order of siblings is top to bottom. Therefore first is evaluated top to bottom.

Please note that the numbering of the items of interest in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | The first sibling (same level, same parent) of Item 1 that has key element type pszKey, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 2 | The first sibling (same level, same parent) of Item 2 that has key element type pszKey, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 3 | The first sibling (same level, same parent) of Item 3 that has key element type pszKey, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.

If the Data Set is evaluated as a list, this method updates the CurrentElement with the first item in the entire list that has key element type pszKey. The search begins at the element specified in the CurrentElement property.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore first is evaluated top to bottom.

Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property is updated with :
Item 1 | The first item in the list that has key element type pszKey, if such an item exists. If an item with key element type pszKeyis not found, the CurrentElement property is updated with NULL.
Item 14 | The first item in the list that has key element type pszKey, if such an item exists If an item with key element type pszKeyis not found, the CurrentElement property is updated with NULL.
Item 22 | The first item in the list that has key element type pszKey, if such an item exists. If an item with key element type pszKey is not found, the CurrentElement property is updated with NULL.

The following methods will also help you find elements in the Data Set with a specific key element type:

FindLastKey method

FindPrevKey method

FindNextKey method

See Also

Elements: | FindLastKey method, FindPrevKey method, FindNextKey method
Topics: | Key Elements: Searching the DICOM Dir Data Set


FindFirstPresStateRefSeriesItem method (ILEADDicomDS)

FindFirstPresStateRefSeriesItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short FindFirstPresStateRefSeriesItem();
Overview | Refer to Working with DICOM Annotations

Remarks

The FindFirstPresStateRefSeriesItem method updates the CurrentElement property with the first Item under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module".

Use this method along with the MoveNextPresStateRefSeriesItem method to enumerate all the Items under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module".

See Also

Elements: | MoveNextPresStateRefSeriesItem method, GetPresStateImageRefCount method, GetPresStateImageRefInstanceUID method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


FindGraphicObjectItem method (ILEADDicomDS)

FindGraphicObjectItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short FindGraphicObjectItem(long lGraphicObjectIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The FindGraphicObjectItem method updates the CurrentElement property with the Item under the "Graphic Object Sequence" (0070,0009) that corresponds to the specified graphic annotation object which is defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | GetGraphicObjectCount method, CreateGraphicObject method, FindTextObjectItem method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


FindIndexCodedConcept method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindIndexCodedConcept(long lIndex);
Overview | Refer to Working with Context Groups.

Remarks

The FindIndexCodedConcept method updates the CurrentCodedConcept property with the Coded Concept at the specified index in the Context Group specified by the CurrentContextGroup property.

The following methods can also be used to maneuver through the Coded Concepts:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

See Also

Elements: | CurrentCodedConcept property, CurrentContextGroup property, GetCodedConceptCount method, MoveFirstCodedConcept method, FindIndexContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


FindIndexContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindIndexContextGroup(long lIndex);
Overview | Refer to Working with Context Groups.

Remarks

The FindIndexContextGroup method updates the CurrentContextGroup property with the Context Group located at the specified index in the Context Group Table.

The following methods can also be used to maneuver through the Context Groups in the Context Group Table:

MoveFirstContextGroup method

MoveLastContextGroup method

MoveNextContextGroup method

MovePrevContextGroup method

The Coded Concepts of a Context Group can be investigated using the following methods:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

GetCodedConceptCount method

FindIndexCodedConcept method

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, GetContextGroupCount method, MoveFirstContextGroup method, FindIndexCodedConcept method,
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


FindIndexModule method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindIndexModule ( long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentModule property with the module at the specified index on Level 0 of the Data Set.

This method only finds modules at a specific index on Level 0 of the Data Set.

To find a module with a specific module value within the Data Set use the FindModule method.

To find specific elements within the Data Set use the following:

FindFirstElement method

FindLastElement method

FindPrevElement method

FindNextElement method

See Also

Topics:

Data Sets: Searching a Data Set


FindIndexTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindIndexTag ( long lIndex );
Overview | Refer to Working with Tags.

Remarks

Updates the CurrentTag property to the item located at the specified index in the Data Element Tag Table.

See Also

Elements: | FindTag method
Topics: | Data Element Tags: Searching the Data Element Tag Table


FindIndexUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindIndexUID ( long lIndex );
Overview | Refer to Working with Unique Identifiers.

Remarks

Updates the CurrentUID property to the item located at the specified index in the UID Table.

See Also

Elements: | FindUID method
Topics: | Unique Identifiers: Searching the UID Table


FindIndexVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindIndexVR ( long lIndex );
Overview | Refer to Working with Value Representations.

Remarks

Updates the CurrentVR property to the item located at the specified index in the Value Representation Table.

See Also

Elements: | FindVR method
Topics: | Value Representations: Searching the Value Representation Table


FindIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindIOD ( long lCode, short nType, BOOL bTree);
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property to the item in the IOD Structure that contains the IOD with the specified code and type. The result depends on whether the IOD Structure is evaluated as a tree or a list.

Searching begins with the item specified in the CurrentIOD property at the time this method is called.

The lCode and nType parameters must correspond. For example, if you specify DICOM_IOD_TYPE_CLASS in nType, you must specify a value from the IOD Class Constants in lCode. If you specify some other value, the item will not be found in the IOD Structure.

See Also

Elements: | FindClassIOD method, FindModuleIOD method
Topics: | Information Object Definitions: Searching the IOD Table


FindLastElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindLastElement ( long lTag, BOOL bTree );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property with the last element in the Data Set that has the specified tag. The search begins with the element specified in the CurrentElement property. The results depend on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the last item on the same level and with the same parent as the element specified in the CurrentElement property, that has tag lTag.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore last is the item closest to the bottom.

Please note that the numbering of the items of interest in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | The last sibling (same level, same parent) of Item 1 that has tag lTag, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 2 | The last sibling (same level, same parent) of Item 2 that has tag lTag, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 3 | The last sibling (same level, same parent) of Item 3 that has tag lTag, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.

If the Data Set is evaluated as a list, this method updates the CurrentElement with the last item in the entire list that has tag lTag. The search begins at the element specified in the CurrentElement property.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore last is closest to the bottom.

Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property is updated with :
Item 1 | The last item in the list that has tag lTag, if such an item exists. If an item with tag lTag is not found, the CurrentElement property is updated with NULL.
Item 14 | The last item in the list that has tag lTag, if such an item exists If an item with tag lTag is not found, the CurrentElement property is updated with NULL.
Item 22 | The last item in the list that has tag lTag, if such an item exists. If an item with tag lTag is not found, the CurrentElement property is updated with NULL.

The following methods will also help you find elements in the Data Set with a specific tag:

FindFirstElement method

FindPrevElement method

FindNextElement method

The following methods will help you find specific modules in the Data Set:

FindModule method

FindIndexModule method

See Also

Elements: | FindFirstElement method, FindPrevElement method, FindNextElement method, FindModule method, FindIndexModule method
Topics: | Data Sets: Searching a Data Set


FindLastKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindLastKey (BSTR pszKey, BOOL bTree);
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property with the last element in the Data Set that has the specified key element type. The search begins with the element specified in the CurrentElement property. The results depend on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the last item on the same level and with the same parent as the element specified in the CurrentElement property, that has key element type pszKey.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore last is the item closest to the bottom.

Please note that the numbering of the items of interest in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | The last sibling (same level, same parent) of Item 1 that has key element type pszKey, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 2 | The last sibling (same level, same parent) of Item 2 that has key element type pszKey, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 3 | The last sibling (same level, same parent) of Item 3 that has key element type pszKey, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.

If the Data Set is evaluated as a list, this method updates the CurrentElement with the last item in the entire list that has key element type pszKey. The search begins at the element specified in the CurrentElement property.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore last is closest to the bottom.

Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property is updated with :
Item 1 | The last item in the list that has key element type pszKey, if such an item exists. If an item with key element type pszKey is not found, the CurrentElement property is updated with NULL.
Item 14 | The last item in the list that has key element type pszKey, if such an item exists If an item with key element type pszKey is not found, the CurrentElement property is updated with NULL.
Item 22 | The last item in the list that has key element type pszKey, if such an item exists. If an item with key element type pszKey is not found, the CurrentElement property is updated with NULL.

The following methods will also help you find elements in the Data Set with a specific key element type:

FindFirstKey method

FindPrevKey method

FindNextKey method

See Also

Elements: | FindFirstKey method, FindPrevKey method, FindNextKey method
Topics: | Key Elements: Searching the DICOM Dir Data Set


FindLayerItem method (ILEADDicomDS)

FindLayerItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short FindLayerItem(VARIANT LayerNameOrIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The FindLayerItem method updates the CurrentElement property with the Item under the "Graphic Layer Sequence" (0070,0060) that corresponds to the layer specified.

See Also

Elements: | LayerCount property, CreateLayer method, GetLayerIndex method, GetLayerName method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


FindLayerRefImageItem method (ILEADDicomDS)

FindLayerRefImageItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short FindLayerRefImageItem(BSTR bstrSOPInstanceUID);
Overview | Refer to Working with DICOM Annotations

Remarks

The FindLayerRefImageItem method updates the CurrentElement property with the Item in the "Referenced Image Sequence" (0008,1140) that references the specified Image SOP Instance, where the sequence exists under one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

See Also

Elements: | AddLayerImageRef method, GetLayerImageRefCount method, GetLayerImageRefInstanceUID method, RemoveLayerImageRef method, FindPresStateRefImageItem method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Layers


FindModule method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindModule ( long lModule );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentModule property with the first module in the Data Set that has the specified module value.

To find the module at a specific index use the FindIndexModule method.

See Also

Topics:

Data Sets: Searching a Data Set


FindModuleIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindModuleIOD ( long lClass, long lModule );
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property with the item in the IOD Structure that contains the IOD for the specified module in the specified class.

To find the IOD for a specific class use FindClassIOD method.

FindIOD method lets you find IODs for classes, modules or elements in the IOD Structure.

See Also

Elements: | FindIOD method, FindClassIOD method
Topics: | Information Object Definitions: Searching the IOD Table


FindNextElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindNextElement ( BOOL bTree );
Overview | Refer to Working with Data Sets.

Remarks

Note: This method does not specify a tag to use when searching. The search will look for an item with the same tag as the element specified in the CurrentElement property.

Updates the CurrentElement property with the next element in the Data Set that has the specified tag. The search begins with the element specified in the CurrentElement property. The results depend on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the next item on the same level and with the same parent as the element specified in the CurrentElement property, that has tag lTag.

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items of interest in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | The next sibling (same level, same parent) of Item 1 that has the same tag as item 1, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 2 | The next sibling (same level, same parent) of Item 2 that has the same tag as item 2, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 3 | The next sibling (same level, same parent) of Item 3 that has the same tag as item 3, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.

If the Data Set is evaluated as a list, this method updates the CurrentElement with the next item in the entire list that has tag lTag. The search begins at the element specified in the CurrentElement property.

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property is updated with :
Item 1 | The next item in the list that has the same tag as item 1, if such an item exists. If such an item does not exist, the CurrentElement property is updated with NULL.
Item 14 | The next item in the list that has the same tag as item 14, if such an item exists If such an item does not exist, the CurrentElement property is updated with NULL.
Item 22 | The next item in the list that has has the same tag as item 22, if such an item exists. If such an item does not exist, the CurrentElement property is updated with NULL.

The following methods will also help you find elements in the Data Set with a specific tag:

FindFirstElement method

FindLastElement method

FindPrevElement method

The following methods will help you find specific modules in the Data Set:

FindModule method

FindIndexModule method

See Also

Elements: | FindFirstElement method, FindLastElement method, FindPrevElement method, FindModule method, FindIndexModule method
Topics: | Data Sets: Searching a Data Set


FindNextKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindNextKey (BOOL bTree);
Overview | Refer to Working with Key Elements.

Remarks

Note: This method does not specify a key element type to use when searching. The search will look for an item with the same key element type as the element specified in the CurrentElement property.

Updates the CurrentElement property with the next element in the Data Set that has the specified key element type. The search begins with the element specified in the CurrentElement property. The results depend on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the next item on the same level and with the same parent as the element specified in the CurrentElement property, that has key element type pszKey.

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items of interest in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | The next sibling (same level, same parent) of Item 1 that has the same key element type as item 1, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 2 | The next sibling (same level, same parent) of Item 2 that has the same key element type as item 2, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 3 | The next sibling (same level, same parent) of Item 3 that has the same key element type as item 3, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.

If the Data Set is evaluated as a list, this method updates the CurrentElement with the next item in the entire list that has key element type pszKey. The search begins at the element specified in the CurrentElement property.

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property is updated with :
Item 1 | The next item in the list that has the same key element type as item 1, if such an item exists. If such an item does not exist, the CurrentElement property is updated with NULL.
Item 14 | The next item in the list that has the same key element type as item 14, if such an item exists If such an item does not exist, the CurrentElement property is updated with NULL.
Item 22 | The next item in the list that has has the same key element type as item 22, if such an item exists. If such an item does not exist, the CurrentElement property is updated with NULL.

The following methods will also help you find elements in the Data Set with a specific key element type:

FindFirstKey method

FindLastKey method

FindPrevKey method

See Also

Elements: | FindFirstKey method, FindLastKey method, FindPrevKey method
Topics: | Key Elements: Searching the DICOM Dir Data Set


FindPresStateRefImageItem method (ILEADDicomDS)

FindPresStateRefImageItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short FindPresStateRefImageItem(BSTR bstrSOPInstanceUID);
Overview | Refer to Working with DICOM Annotations

Remarks

The FindPresStateRefImageItem method updates the CurrentElement property with the Item under the "Referenced Image Sequence" (0008,1140) (in the "Presentation State Module") that references an Image SOP Instance.

See Also

Elements: | AddPresStateImageRef method, RemovePresStateImageRef method, GetPresStateImageRefCount method, GetPresStateImageRefInstanceUID method .
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


FindPrevElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindPrevElement ( BOOL bTree );
Overview | Refer to Working with Data Sets.

Remarks

Note: This method does not specify a tag to use when searching. The search will look for an item with the same tag as the element specified in the CurrentElement property.

Updates the CurrentElement property with the previous element in the Data Set that has the specified tag. The search begins with the element specified in the CurrentElement property. The results depend on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the previous item on the same level and with the same parent as the element specified in the CurrentElement property, that has tag lTag.

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items of interest in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | The previous sibling (same level, same parent) of Item 1 that has the same tag as item 1, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 2 | The previous sibling (same level, same parent) of Item 2 that has the same tag as item 2, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 3 | The previous sibling (same level, same parent) of Item 3 that has the same tag as item 3, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.

If the Data Set is evaluated as a list, this method updates the CurrentElement with the previous item in the entire list that has tag lTag. The search begins at the element specified in the CurrentElement property.

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property is updated with :
Item 1 | The previous item in the list that has the sam e tag as item 1, if such an item exists. If such an item does not exist, the CurrentElement property is updated with NULL.
Item 14 | The previous item in the list that has the same tag as item 14, if such an item exists If such an item does not exist, the CurrentElement property is updated with NULL.
Item 22 | The previous item in the list that has the same tag as item 22, if such an item exists. If such an item does not exist, the CurrentElement property is updated with NULL.

The following methods will also help you find elements in the Data Set with a specific tag:

FindFirstElement method

FindLastElement method

FindNextElement method

The following methods will help you find specific modules in the Data Set:

FindModule method

FindIndexModule method

See Also

Elements: | FindFirstElement method, FindLastElement method, FindNextElement method, FindModule method, FindIndexModule method
Topics: | Data Sets: Searching a Data Set


FindPrevKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindPrevKey (BOOL bTree);
Overview | Refer to Working with Key Elements.

Remarks

Note: This method does not specify a key element type to use when searching. The search will look for an item with the same key element type as the element specified in the CurrentElement property.

Updates the CurrentElement property with the previous element in the Data Set that has the specified key element type. The search begins with the element specified in the CurrentElement property. The results depend on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the previous item on the same level and with the same parent as the element specified in the CurrentElement property, that has key element type pszKey.

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items of interest in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | The previous sibling (same level, same parent) of Item 1 that has the same key element type as item 1, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 2 | The previous sibling (same level, same parent) of Item 2 that has the same key element type as item 2, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.
Item 3 | The previous sibling (same level, same parent) of Item 3 that has the same key element type as item 3, if such an item exists. If such an item does not exist, the CurrentElement is updated with NULL.

If the Data Set is evaluated as a list, this method updates the CurrentElement with the previous item in the entire list that has key element type pszKey. The search begins at the element specified in the CurrentElement property.

For the sake of these illustrations, the order of siblings is top to bottom.

Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property is updated with :
Item 1 | The previous item in the list that has the same key element type as item 1, if such an item exists. If such an item does not exist, the CurrentElement property is updated with NULL.
Item 14 | The previous item in the list that has the same key element type as item 14, if such an item exists If such an item does not exist, the CurrentElement property is updated with NULL.
Item 22 | The previous item in the list that has the same key element type as item 22, if such an item exists. If such an item does not exist, the CurrentElement property is updated with NULL.

The following methods will also help you find elements in the Data Set with a specific key element type:

FindFirstKey method

FindLastKey method

FindNextKey method

See Also

Elements: | FindFirstKey method, FindLastKey method, FindNextKey method
Topics: | Key Elements: Searching the DICOM Dir Data Set


FindSignature method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL FindSignature(BSTR bstrSignatureUID);
Overview | Refer to Working with Digital Signatures.

Remarks

The FindSignature method searches the Data Set for the Digital Signature with the specified Digital Signature UID. If found in the Data Set, the method updates the CurrentElement property with the corresponding Digital Signatures Sequence Item.

Each Digital Signature should be uniquely identified by a UID specified by the Digital Signature UID (0400,0100) under the corresponding Digital Signatures Sequence Item. Use this method to search the whole Data Set for a Digital Signature by knowing its Digital Signature UID.

Once the CurrentElement property is updated with the Digital Signatures Sequence Item, the following methods can be used to verify, delete, or get information about the Digital Signature:

VerifySignature method

DeleteSignature method

GetSignatureUID method

GetSignatureDateTime method

GetSignedElementsCount method

MoveSignedElement method

GetMacTransferSyntax method

GetMacAlgorithm method

SaveCertificate method

You can also use the GetSignaturesCount method and the MoveSignature method to enumerate the Digital Signatures in the main Data Set or in an Item of a Sequence of Items.

See Also

Elements: | GetSignaturesCount method, MoveSignature method, VerifySignature method, DeleteSignature method, GetSignatureUID method, GetSignatureDateTime method, GetSignedElementsCount method, MoveSignedElement method, GetMacTransferSyntax method, GetMacAlgorithm method, SaveCertificate method, CreateSignature method, CurrentElement property
Topics: | Data Sets: Digital Signatures


FindTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindTag ( long lCode );
Overview | Refer to Working with Tags.

Remarks

Updates the CurrentTag property to the item in the Data Element Tag Table with the specified tag (lCode).

As an example, if you call this function with lCode set to TAG_STUDY_DATE, and the Data Element Tag Table filled with the default values, the CurrentTag property will contain TAG_STUDY_DATE, 0x00080020, 0xFFFFFFFF, "Study Date", VR_DA, 1, 1, and 1.

To see the default values for the Data Element Tag Table, refer to the Default Data Element Tag Table.

See Also

Elements: | FindIndexTag method
Topics: | Data Element Tags: Searching the Data Element Tag Table


FindTextObjectItem method (ILEADDicomDS)

FindTextObjectItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short FindTextObjectItem(long lTextObjectIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The FindTextObjectItem method updates the CurrentElement property with the Item under the "Text Object Sequence" (0070,0008) that corresponds to the specified text annotation object which is defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | GetTextObjectCount method, CreateTextObject method, FindGraphicObjectItem method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Text Objects


FindUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindUID ( BSTR pszCode );
Overview | Refer to Working with Unique Identifiers.

Remarks

Updates the CurrentUID property to the item in the UID Table with the specified unique identifier code.

As an example, if you call this function with pszCode set to "1.2.840.10008.1.1", and the UID Table filled with the default values, the CurrentUID property will contain "1.2.840.10008.1.1" and "Verification SOP Class".

To see the default values for the UID Table, refer to the Default UID Table.

See Also

Elements: | FindIndexUID method
Topics: | Unique Identifiers: Searching the UID Table


FindVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindVR ( short nCode );
Overview | Refer to Working with Value Representations.

Remarks

Updates the CurrentVR property to the item in the Value Representation Table with the specified value representation code.

As an example, if you call this method with nCode set to VR_AE, and the Value Representation Table filled with the default values, the properties in the CurrentVR property will contain VR_AE, "Application Entity", 16, VR_STRING|VR_MAXIMUM, and 1.

To see the default values for the Value Representation Table, refer to the Default Value Representation Table.

See Also

Elements: | FindIndexVR method
Topics: | Value Representations: Searching the Value Representation Table


GetAgeValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetAgeValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the AgeValues property with the age value(s) associated with the item specified in the CurrentElement property. This method also updates the AgeValueCount property to lCount, where lCount is the number of age values to get.

If you call this method with lCount greater than the number of age values in the Value Field of the specified item, this method will return an error. For example, if there are only three age values in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three age values, and you are only interested in retrieving the last two age values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the age values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_AS. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetBinaryValue method, GetCharValue method, GetShortValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetStringValue method, GetDateValue method, GetTimeValue method, GetDateTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetBinaryValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetBinaryValue ( long lLength );
Overview | Refer to Working with Data Sets.

Remarks

Updates the BinaryValues and BinaryValues2 properties with the binary values associated with the item specified by the CurrentElement property. This method also updates the BinaryValueCount property with lLength, where lLength is the number of bytes of binary data to get.

The retrieved binary data does not undergo any type coercion. It is retrieved in the same form in which it is stored.

If you call this method with lLength greater than the number of bytes of data associated with the specified item, this method will return an error. For example, if there are only three bytes of binary data associated with the specified item and you call this method with lLength set to four, an error will be returned.

This method can be called for every Value Representation, and it will return the exact value in the Value Field (unconverted).

See Also

Elements: | GetAgeValue method, GetCharValue method, GetShortValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetStringValue method, GetDateValue method, GetTimeValue method, GetDateTimeValue method, BinaryValues property, BinaryValues2 property, BinaryValueCount property
Topics: | Data Sets: Getting and Setting Data Element Values


GetBitmapCount method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetBitmapCount ();
Overview | Refer to Working with Data Sets.

Remarks

Returns the number of images in the Pixel Data Element specified by the CurrentElement property. If the CurrentElement property is NULL, it returns the number of images in the entire Data Set.

See Also

Elements: | GetBitmapValue method, GetBitmapListValue method
Topics: | Data Sets: Getting and Setting Data Set Information


GetBitmapListValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetBitmapListValue ( long lIndex, long lCount, short nBitsPerPixel, short nOrder, long lFlags );
Overview | Refer to Working with Data Sets.

Remarks

Updates the BitmapList property with the image list associated with the Pixel Data Element specified by the CurrentElement property. If the CurrentElement property is NULL, this method updates the BitmapList property with all the images present in the Data Set.

As an example, if you wish to load 50 images starting with the 50th frame in the Pixel Data, call this function with lIndex set to 49 (the 50th frame in a zero-based index) and nCount set to 50.

For a table of possible Compression, Photometric, BitsPerPixel, and Quality Factor combinations, refer to Compression Table.

If DICOM_GETIMAGE_ALLOW_RANGE_EXPANSION is set in lFlags, consider the
following example:

If the dataset has the following attributes:

Bits allocated 16
Bits stored 12
Pixel Range 0 - +4095
Pixel Representation is unsigned (0)
Photometric Interpretation is MONOCHROME2
Rescale Slope 1
Rescale Intercept -1024

After applying the rescale slope and the intercept:

Output minimum pixel value = (0 * 1 +(-1024)) = -1024
Output maximum pixel value = (4095 * 1 + (-1024)) = 3071

The new pixel value range (–1024 to 3071) can’t be represented with the current bits stored (12 bits), which can represent values in the range (–2048 to 2048). In this case the function will change the high bit inside the bitmap handle to be 12 instead of 11 (bits stored becomes 13), which can represent values in the range (–8192 to 8191). Please note that the function won’t be able to update the high bit and/or low bit if the number of bits stored was already equal to the number of bits allocated.

See Also

Elements: | BitmapList property, SetBitmapListValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetBitmapValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetBitmapValue ( long lIndex, short nBitsPerPixel, short nOrder, long lFlags);
Overview | Refer to Working with Data Sets.

Remarks

Updates the Bitmap property with the image associated with the Pixel Data Element specified by the CurrentElement property.

If more than one image is present, lIndex specifies which image to get. lIndex is zero-based.

For a table of possible Compression, Photometric, BitsPerPixel, and Quality Factor combinations, refer to Compression Table.

If DICOM_GETIMAGE_ALLOW_RANGE_EXPANSION is set in lFlags, consider the
following example:

If the dataset has the following attributes:
Bits allocated 16
Bits stored 12
Pixel Range 0 - +4095
Pixel Representation is unsigned (0)
Photometric Interpretation is MONOCHROME2
Rescale Slope 1
Rescale Intercept -1024

After applying the rescale slope and the intercept:

Output minimum pixel value = (0 * 1 +(-1024)) = -1024
Output maximum pixel value = (4095 * 1 + (-1024)) = 3071

The new pixel value range (–1024 to 3071) can’t be represented with the current bits stored (12 bits), which can represent values in the range (–2048 to 2048). In this case the function will change the high bit inside the bitmap handle to be 12 instead of 11 (bits stored becomes 13), which can represent values in the range (–8192 to 8191). Please note that the function won’t be able to update the high bit and/or low bit if the number of bits stored was already equal to the number of bits allocated.

See Also

Elements: | Bitmap property, SetBitmapValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetCharValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetCharValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CharValues property with the character value(s) associated with the item specified in the CurrentElement property. This method also updates the CharValueCount property to lCount, where lCount is the number of characters to get.

If you call this method with lCount greater than the number of characters in the Value Field of the specified item, this method will return an error. For example, if there are only three characters in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three character values, and you are only interested in retrieving the last two character values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the character values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_OB, VR_SQ, or VR_UN. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetShortValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetStringValue method, GetDateValue method, GetTimeValue method, GetDateTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetCodedConceptCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetCodedConceptCount();
Overview | Refer to Working with Context Groups.

Remarks

The GetCodedConceptCount method returns the number of Coded Concepts in the Context Group specified by the CurrentContextGroup property.

Using this method along with the FindIndexCodedConcept method, you can enumerate the Coded Concepts in a Context Group.

Also, the following methods can be used to maneuver through the Coded Concepts:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

The number of Context Groups in the Context Group Table can be obtained using the GetContextGroupCount method.

See Also

Elements: | CurrentContextGroup property, FindIndexCodedConcept method, MoveFirstCodedConcept method, MoveCodedConceptGroup method, GetContextGroupCount method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


GetContextGroupCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetContextGroupCount();
Overview | Refer to Working with Context Groups.

Remarks

The GetContextGroupCount method returns the number of Context Groups in the Context Group Table.

The LoadContextGroup method and the InsertContextGroup method are used to add Context Groups to the Context Group Table.

By using this method along with the FindIndexContextGroup method, you can enumerate the Context Groups in the table.

Use the following methods to maneuver through the Context Groups in the table:

MoveFirstContextGroup method

MoveLastContextGroup method

MoveNextContextGroup method

MovePrevContextGroup method

Use the GetCodedConceptCount method to obtain the number of Coded Concepts in a Context Group.

See Also

Elements: | LoadContextGroup method, InsertContextGroup method, FindIndexContextGroup method, MoveFirstContextGroup method, GetCodedConceptCount method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


GetConvertValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetConvertValue (L_VOID);
Overview | Refer to Working with Data Sets.

Remarks

Converts the value(s) in the CurrentElement to strings.

Calling this method will update the StringValueCount and StringValues properties with the values from the current element converted to strings, which can be used for display purposes.

This method can be called for any Value Representation. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetConvertValue method
Topics: | Data Sets: Converting Values


GetDateTimeValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetDateTimeValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the DateTimeValues property with the date-time value(s) associated with the item specified in the CurrentElement property. This method also updates the DateTimeValueCount property to lCount, where lCount is the number of date-time values to get.

If you call this method with lCount greater than the number of date-time values in the Value Field of the specified item, this method will return an error. For example, if there are only three date-time values in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three date-time values, and you are only interested in retrieving the last two date-time values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the date-time values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_DT. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetCharValue method, GetShortValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetStringValue method, GetDateValue method, GetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetDateValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetDateValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the DateValues property with the date value(s) associated with the item specified in the CurrentElement property. This method also updates the DateValueCount property to lCount, where lCount is the number of date values to get.

If you call this method with lCount greater than the number of date values in the Value Field of the specified item, this method will return an error. For example, if there are only three date values in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three date values, and you are only interested in retrieving the last two date values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the date values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_DA. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetCharValue method, GetShortValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetStringValue method, GetDateTimeValue method, GetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetDoubleValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetDoubleValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the DoubleValues property with the double value(s) associated with the item specified in the CurrentElement property. This method also updates the DoubleValueCount property to lCount, where lCount is the number of double values to get.

If you call this method with lCount greater than the number of double values in the Value Field of the specified item, this method will return an error. For example, if there are only three double values in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three double values, and you are only interested in retrieving the last two double values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the double values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_DS or VR_FD. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetCharValue method, GetShortValue method, GetLongValue method, GetFloatValue method, GetDateValue method, GetStringValue method, GetDateTimeValue method, GetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetDSPreamble method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetDSPreamble ();
Overview | Refer to Working with Data Sets.

Remarks

Updates the Preamble property with the buffer containing the preamble of the open DICOM file.

See Also

Topics:

Data Sets: Getting and Setting Data Set Information


GetElementLevel method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetElementLevel ();
Overview | Refer to Working with Data Sets.

Remarks

Returns a value that indicates the level at which the element specified in the CurrentElement property is located, within the Data Set.

This method requires that the Data Set is evaluated as a tree.

The following illustration gives an example:

If the CurrentElement property contains: | The method returns
Item 1 | 0
Item 2 | 1
Item 3 | 2

See Also

Topics:

Data Sets: Getting and Setting Data Set Information


GetFloatValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetFloatValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the FloatValues property with the float value(s) associated with the item specified in the CurrentElement property. This method also updates the FloatValueCount property to lCount, where lCount is the number of float values to get.

If you call this method with lCount greater than the number of float values in the Value Field of the specified item, this method will return an error. For example, if there are only three float values in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three float values, and you are only interested in retrieving the last two float values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the float values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_FL. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetCharValue method, GetShortValue method, GetLongValue method, GetDoubleValue method, GetDateValue method, GetStringValue method, GetDateTimeValue method, GetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetGraphicObjectAttributes method (ILEADDicomDS)

GetGraphicObjectAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short GetGraphicObjectAttributes(long lGraphicObjectIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The GetGraphicObjectAttributes method retrieves the attributes of a graphic annotation object that is defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module". The method updates the properties specified by the GraphicObjectAttributes property with the values retrieved.

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | GetGraphicObjectCount method, GraphicObjectAttributes property, SetGraphicObjectAttributes method, CreateGraphicObject method, RemoveGraphicObject method, FindGraphicObjectItem method, GetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


GetGraphicObjectCount method (ILEADDicomDS)

GetGraphicObjectCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetGraphicObjectCount();
Overview | Refer to Working with DICOM Annotations

Remarks

The GetGraphicObjectCount method returns the number of the graphic annotation objects defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

This method and the GetLayerGraphicObjectCount method perform the same function.

See Also

Elements: | CreateGraphicObject method, GetGraphicObjectAttributes method, SetGraphicObjectAttributes method, RemoveGraphicObject method, RemoveAllGraphicObjects method, GetTextObjectCount method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, GetLayerGraphicObjectCount method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


GetImageInformation method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetImageInformation (long lIndex);
Overview | Refer to Working with Data Sets.

Remarks

Gets information about the image at the specified index within the Pixel Data Element specified by the CurrentElement property.

This method updates the ImageInfo property.

See Also

Elements: | ImageInfo property
Topics: | Data Sets: Getting and Setting Data Set Information


GetInfoCS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void GetInfoCS ();
Overview | Refer to Working with Command Sets.

Remarks

Gets information about the Command Set. This method updates the InfoCommand and InfoRequest properties.

A Command Set is a special type of Data Set. The InitCS method creates a Data Set as a Command Set and inserts the elements for the specified command.

You can also determine the type of a command set by "and-ing" the value of the TAG_COMMAND_FIELD with COMMAND_REQUEST[0x0000] or COMMAND_RESPONSE[0x8000].

In addition, you can determine whether a command set has a required data set by "and-ing" the value of the TAG_DATA_SET_TYPE element with COMMAND_DATASET_PRESENT, COMMAND_DATASET_IDENTIFIER, or COMMAND_DATASET_ABSENT.

See Also

Elements: | InitCS method
Topics: | Data Sets: Command Sets


GetInfoDS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetInfoDS ();
Overview | Refer to Working with Data Sets.

Remarks

Gets information about the current Data Set.

This method updates the InfoClass and InfoFlags properties for the current Data Set.

See Also

Elements: | InfoClass property, InfoFlags property, GetDSPreamble method, GetValueCount method
Topics: | Data Sets: Getting and Setting Data Set Information


GetKeyValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetKeyValue ();
Overview | Refer to Working with Key Elements.

Remarks

Returns the key element type of the specified key element.

See Also

Topics:

Key Elements: Getting the Type of an Existing Key Element


GetLayerAttributes method (ILEADDicomDS)

GetLayerAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short GetLayerAttributes(long lLayerIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The GetLayerAttributes method retrieves the attributes of a layer. The method updates the properties specified by the LayerAttributes property with the values of the attributes.

See Also

Elements: | LayerCount property, LayerAttributes property, SetLayerAttributes method, CreateLayer method .
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


GetLayerGraphicObjectCount method (ILEADDicomDS)

GetLayerGraphicObjectCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetLayerGraphicObjectCount();
Overview | Refer to Working with DICOM Annotations

Remarks

The GetLayerGraphicObjectCount method returns the number of the graphic annotation objects defined by one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

This method and the GetGraphicObjectCount method perform the same function.

See Also

Elements: | RemoveLayerGraphicObjects method, CreateGraphicAnnItem method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, GetLayerTextObjectCount method, GetGraphicObjectCount method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


GetLayerImageRefCount method (ILEADDicomDS)

GetLayerImageRefCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetLayerImageRefCount();
Overview | Refer to Working with DICOM Annotations

Remarks

The GetLayerImageRefCount method returns the number of Image SOP Instances that are referenced in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

See Also

Elements: | AddLayerImageRef method, GetLayerImageRefInstanceUID method, RemoveLayerImageRef method, FindLayerRefImageItem method, GetPresStateImageRefCount method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Layers


GetLayerImageRefInstanceUID method (ILEADDicomDS)

GetLayerImageRefInstanceUID method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR GetLayerImageRefInstanceUID(long lImageIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The GetLayerImageRefInstanceUID method returns the SOP Instance UID of an Image SOP Instance referenced by the "Referenced Image Sequence" (0008,1140) that belongs to one of the Items (the one specified by the CurrentElement property) under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

See Also

Elements: | AddLayerImageRef method, GetLayerImageRefCount method, RemoveLayerImageRef method, FindLayerRefImageItem method, GetPresStateImageRefCount method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Layers


GetLayerIndex method (ILEADDicomDS)

GetLayerIndex method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetLayerIndex(BSTR bstrLayerName);
Overview | Refer to Working with DICOM Annotations

Remarks

The GetLayerIndex method returns the index of a layer by knowing its name.

See Also

Elements: | LayerCount property, GetLayerName method, CreateLayer method, GetLayerAttributes method, SetLayerAttributes method, RemoveLayer method, FindLayerItem method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


GetLayerName method (ILEADDicomDS)

GetLayerName method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR GetLayerName();
Overview | Refer to Working with DICOM Annotations

Remarks

The GetLayerName method returns the value of the "Graphic Layer" (0070,0002) element under one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | SetLayerName method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


GetLayerTextObjectCount method (ILEADDicomDS)

GetLayerTextObjectCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetLayerTextObjectCount();
Overview | Refer to Working with DICOM Annotations

Remarks

The GetLayerTextObjectCount method returns the number of the text annotation objects defined by one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

This method and the GetTextObjectCount method perform the same function.

See Also

Elements: | RemoveLayerTextObjects method, CreateGraphicAnnItem method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, GetLayerGraphicObjectCount method, GetTextObjectCount method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


GetLongValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetLongValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the LongValues property with the long value(s) associated with the item specified in the CurrentElement property. This method also updates the LongValueCount property to lCount, where lCount is the number of long values to get.

If you call this method with lCount greater than the number of long values in the Value Field of the specified item, this method will return an error. For example, if there are only three long values in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three long values, and you are only interested in retrieving the last two long values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the long values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_AT, VR_IS, VR_SL, or VR_UL. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetCharValue method, GetShortValue method, GetFloatValue method, GetDoubleValue method, GetDateValue method, GetStringValue method, GetDateTimeValue method, GetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetMacAlgorithm method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetMacAlgorithm();
Overview | Refer to Working with Digital Signatures.

Remarks

The GetMacAlgorithm method gets the Message Authentication Code (MAC) Algorithm (0400,0015) used in the creation of the Digital Signature specified by the CurrentElement property. The CurrentElement property must be updated with the corresponding Digital Signatures Sequence Item before calling the method.

The Digital Signatures Sequence Item of a Digital Signature should reference an Item under the MAC Parameters Sequence associated with the Digital Signatures Sequence. The MAC Algorithm (0400,0015) under the referenced MAC Parameters Sequence Item specifies the algorithm used in generating the Message Authentication Code (MAC). The encrypted MAC is the digital signature itself. You can use this method to obtain the value of this Data Element; the expected values are: "RIPEMD160", "SHA1", and "MD5".

In addition to this method, the following methods can be used to get information about the Digital Signature:

GetSignatureUID method

GetSignatureDateTime method

GetSignedElementsCount method

MoveSignedElement method

GetMacTransferSyntax method

SaveCertificate method

See Also

Elements: | MoveSignature method, FindSignature method, GetSignatureUID method, GetSignatureDateTime method, GetSignedElementsCount method, MoveSignedElement method, GetMacTransferSyntax method, SaveCertificate method, CurrentElement property, StringValueCount property, StringValues property
Topics: | Data Sets: Digital Signatures


GetMacTransferSyntax method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetMacTransferSyntax();
Overview | Refer to Working with Digital Signatures.

Remarks

The GetMacTransferSyntax method gets the Message Authentication Code (MAC) Calculation Transfer Syntax UID (0400,0010) used in the creation of the Digital Signature specified by the CurrentElement property. The CurrentElement property must be updated with the corresponding Digital Signatures Sequence Item before calling the method.

The Digital Signatures Sequence Item of a Digital Signature should reference an Item under the MAC Parameters Sequence associated with the Digital Signatures Sequence. The MAC Calculation Transfer Syntax UID (0400,0010) under the referenced MAC Parameters Sequence Item specifies the Transfer Syntax used in the calculation of the Message Authentication Code (MAC). The encrypted MAC is the digital signature itself. You can use this method to obtain the value of this Data Element.

If the Data Set was properly encoded, the return value will be a Transfer Syntax that explicitly includes the Value Representation (VR) and uses Little Endian encoding.

In addition to this method, the following methods can be used to get information about the Digital Signature:

GetSignatureUID method

GetSignatureDateTime method

GetSignedElementsCount method

MoveSignedElement method

GetMacAlgorithm method

SaveCertificate method

See Also

Elements: | MoveSignature method, FindSignature method, GetSignatureUID method, GetSignatureDateTime method, GetSignedElementsCount method, MoveSignedElement method, GetMacAlgorithm method, SaveCertificate method, CurrentElement property, StringValueCount property, StringValues property
Topics: | Data Sets: Digital Signatures


GetModalityLUTAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetModalityLUTAttributes(long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The GetModalityLUTAttributes method retrieves the attributes that describe the Modality LUT. The method updates the properties specified by the ModalityLUTAttributes property with the values of the attributes of the "Modality LUT Module".

If the method doesn’t find any of the attributes of the "Modality LUT Module" it will set both the IsModalityLUTSequence property and the IsRescaleSlopeIntercept property to VARIANT_FALSE. In this case the rest of the properties specified by the ModalityLUTAttributes property are undefined.

If the method finds "Rescale Intercept" (0028,1052) and "Rescale Slope" (0028,1053), it will set the IsRescaleSlopeIntercept property to VARIANT_TRUE and populate the RescaleIntercept property, the RescaleSlope property, and the RescaleType property with the values retrieved from the DICOM Data Set.

If the method finds "Modality LUT Sequence" (0028,3000), it will set the IsModalityLUTSequence property to VARIANT_TRUE and populate the LUTDescriptorNumberOfEntries property, the LUTDescriptorFirstMapped property, the LUTDescriptorEntryBits property, the LUTExplanation property, and the ModalityLUTType property with the values retrieved from the DICOM Data Set.

It’s prohibited by the DICOM standard for both "Rescale Intercept" and "Modality LUT Sequence" to exist in the same DICOM Data Set. However, if this happens, the method will ignore "Modality LUT Sequence" and assume that only "Rescale Intercept" exists.

See Also

Elements: | ModalityLUTAttributes property, GetModalityLUTData method, SetModalityLUT method, DeleteModalityLUT method
Topics: | Lookup Tables


GetModalityLUTData method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetModalityLUTData(VARIANT* pData, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The GetModalityLUTData method retrieves the "LUT Data" (0028,3006) under the "Modality LUT Sequence" (0028,3000).

Before calling this method you need to call the GetModalityLUTAttributes method and check the IsModalityLUTSequence property to see if a "Modality LUT Sequence" exists in the DICOM Data Set or not.

The method retrieves the LUT Data as a one-dimensional safearray of long values (VT_ARRAY | VT_I4).

See Also

Elements: | GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


GetModuleCount method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetModuleCount ();
Overview | Refer to Working with Data Sets.

Remarks

Returns the number of modules in the entire Data Set.

The following methods will also help you navigate the Data Set as either a tree or a list:

MoveFirstElement method

MovePrevElement method

MoveNextElement method

MoveLastElement method

If you evaluate the Data Set as a tree, you can also use the following methods to navigate the tree:

MoveRootElement method

MoveParentElement method

MoveChildElement method

See Also

Topics:

Data Sets: Getting and Setting Data Set Information


GetOverlayAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetOverlayAttributes(long lOverlayIndex, long lFlags);
Overview | Refer to Overlays Overview.

Remarks

The GetOverlayAttributes method updates the properties specified by the OverlayAttributes property with the values of the attributes of the specified overlay.

Most of the properties specified by the OverlayAttributes property are based on the Attributes of the Overlay Plane Module in the DICOM Standard.

If the overlay data is embedded in the "Image Pixel Data" (7FE0,0010), the flag DICOM_OVERLAY_USEBITPLANE will be set inside the ILEADOverlayAttributes::Flags property . If this flag is not set then the overlay data is stored in the "Overlay Data" (60xx,3000) element and in this case you can call the GetOverlayBitmap method to get the data for that overlay.

The ILEADOverlayAttributes::OriginX property and the ILEADOverlayAttributes::OriginY property will hold the value of the "Overlay Origin" (60xx,0050) element; however, the upper left pixel of the image will have the coordinate 0\0, instead of 1\1 (as in the DICOM standard).

The Color property will always be set to black by the method.

For multi-frame overlays, the method will update the ILEADOverlayAttributes::NumberFramesInOverlay property with the value of "Number of Frames in Overlay" (60xx,0015) element and the ILEADOverlayAttributes::ImageFrameOrigin property with the value of "Image Frame Origin" (60xx,0051) element.

The ILEADOverlayAttributes::ActivationLayer property will be updated with the value of the element "Overlay Activation Layer" (60xx,1001). (The same value can also be obtained directly by accessing the OverlayActivationLayer property.)

See Also

Elements: | OverlayCount property, OverlayAttributes property, SetOverlayAttributes method, OverlayGroupNumber property, IsOverlayInDataSet method, OverlayActivationLayer property, GetOverlayBitmap method, GetOverlayBitmapList method
Topics: | Overlays


GetOverlayBitmap method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetOverlayBitmap(long lOverlayIndex, long lFlags);
Overview | Refer to Overlays Overview.

Remarks

The GetOverlayBitmap method extracts the "Overlay Data" (60xx,3000) for an overlay, initializes and allocates a bitmap based on the "Overlay Columns" (60xx,0011) and "Overlay Rows" (60xx,0010), and then fills the bitmap with the stream of bytes under "Overlay Data" (60xx,3000) element. The handle to the extracted bitmap can then be obtained by accessing the OverlayBitmap property.

If the method doesn’t find the "Overlay Data" element inside the Data Set it will return DICOM_ERROR_OVERLAY_DATA_MISSING.

Before calling this method, you need to use the GetOverlayAttributes method to know if the overlay pixel data is embedded in the "Image Pixel Data" (7FE0,0010) or is under the "Overlay Data" (60xx,3000) element. If the overlay data is embedded in the Image Pixel Data, the flag DICOM_OVERLAY_USEBITPLANE will be set inside the Flags property (specified by the OverlayAttributes property).

If the overlay pixel data is embedded in the "Image Pixel Data" (7FE0, 0010) you will need to follow these steps to get the overlay data as a bitmap handle:

1. | Call one of the methods which can be used to extract the Image Pixel Data like the GetBitmapValue method; this will result in a bitmap handle populated with the Image Pixel Data which has the overlay data embedded. Set the Bitmap property of a LEADRaster object (let’s call it objMainBitmapRaster) to that bitmap handle.
2. | Call the GetOverlayAttributes method to get the attributes of the overlay and then set the overlay attributes specified by the OverlayAttributes property of a LEADRasterProcess object (let’s call it objRasterProcess) to the values retrieved by the method.
3. | Now we need to add our overlay as one of the overlays associated with objMainBitmapRaster; to do this, we need to call the SetOverlayAttributes method of the LEADRasterProcess object like this:

objRasterProcess.SetOverlayAttributes objMainBitmapRaster, _
0, _
OVERLAYATTRIBUTES_FLAGS + _
OVERLAYATTRIBUTES_BITINDEX + _
OVERLAYATTRIBUTES_ORIGIN + _
OVERLAYATTRIBUTES_DICOM + _
OVERLAYATTRIBUTES_COLOR

 | We are assuming that this is the first overlay in the bitmap and this is why we are passing 0 as the overlay index.
4. | Now we need to extract the overlay data from the main image data:

objRasterProcess.UpdateOverlayBits objMainBitmapRaster, _
0, _
SETOVERLAYBITS_FROMBITMAP

5.

Now to get the overlay data itself as a bitmap handle (LEADRaster object) we need to call the GetOverlayBitmap method of objRasterProcess.

See Also

Elements: | OverlayCount property, OverlayBitmap property, SetOverlayBitmap method, GetOverlayAttributes method, GetOverlayBitmapList method
Topics: | Overlays


GetOverlayBitmapList method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetOverlayBitmapList(long lOverlayIndex, long lFrameIndex, long lCount, long lFlags);
Overview | Refer to Overlays Overview.

Remarks

The GetOverlayBitmapList method loads a bitmap list with frames from the "Overlay Data" (60xx, 3000) element of the specified overlay. The handle to the bitmap list can then be obtained by accessing the OverlayBitmapList property.

Before calling this method, you need to use the GetOverlayAttributes method to get the number of frames under the overlay. The NumberFramesInOverlay property specifies this number.

As an example, if you wish to load 5 frames starting with the 1st frame in the "Overlay Data", call this method with lFrameIndex set to 0 and lCount set to 5.

See Also

Elements: | OverlayCount property, OverlayBitmapList property, SetOverlayBitmapList method, GetOverlayAttributes method, GetOverlayBitmap method
Topics: | Overlays


GetPaletteColorLUTAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetPaletteColorLUTAttributes(long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The GetPaletteColorLUTAttributes method updates the properties specified by the PaletteColorLUTAttributes property with the values of the attributes that describe the "Palette Color Lookup Table".

The method will fail and return DICOM_ERROR_LUT_DESCRIPTOR_MISSING if any of the following elements is missing from the DICOM Data Set:

"Red Palette Color Lookup Table Descriptor" (0028,1101)

"Green Palette Color Lookup Table Descriptor" (0028,1102)

"Blue Palette Color Lookup Table Descriptor" (0028,1103)

See Also

Elements: | PaletteColorLUTAttributes property, SetPaletteColorLUTAttributes method, GetPaletteColorLUTData method, SetPaletteColorLUTData method, DeletePaletteColorLUT method
Topics: | Lookup Tables


GetPaletteColorLUTData method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetPaletteColorLUTData(VARIANT* pData, DicomPaletteColorLUTConstants PaletteColorLUTType, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The GetPaletteColorLUTData method retrieves the "Red", "Green", or "Blue" "Palette Color Lookup Table Data".

If the "Palette Color Lookup Table Data" is segmented, the method will decode the data before copying it to the safearray.

Before calling this method, you need to call the GetPaletteColorLUTAttributes method to see if a "Palette Color Lookup Table" exists in the DICOM Data Set or not.

The method retrieves the "Palette Color Lookup Table Data" as a one-dimensional safearray of long values (VT_ARRAY | VT_UI2).

See Also

Elements: | SetPaletteColorLUTData method, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method, DeletePaletteColorLUT method
Topics: | Lookup Tables


GetPresStateAttributes method (ILEADDicomDS)

GetPresStateAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short GetPresStateAttributes(long lFlags);
Overview | Refer to Working with DICOM Annotations

Remarks

The GetPresStateAttributes method retrieves the attributes of the "Presentation State Module". The method updates the properties specified by the PresStateAttributes property with the values of the attributes.

See Also

Elements: | PresStateAttributes property, SetPresStateAttributes method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


GetPresStateImageRefCount method (ILEADDicomDS)

GetPresStateImageRefCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetPresStateImageRefCount();
Overview | Refer to Working with DICOM Annotations

Remarks

The GetPresStateImageRefCount method returns the number of Image SOP Instances referenced by the "Referenced Image Sequence" (0008,1140) in one of the Items (the one specified by the CurrentElement property) under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module".

The "Referenced Series Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstPresStateRefSeriesItem method and the MoveNextPresStateRefSeriesItem method can be used to enumerate all the Items under the "Referenced Series Sequence".

Having the CurrentElement property updated with an Item in the "Referenced Series Sequence", the images referenced by the "Referenced Image Sequence" under that Item can be enumerated using this method and the GetPresStateImageRefInstanceUID method.

See Also

Elements: | FindFirstPresStateRefSeriesItem method, MoveNextPresStateRefSeriesItem method, GetPresStateImageRefInstanceUID method, AddPresStateImageRef method, RemovePresStateImageRef method, RemoveAllPresStateImageRefs method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


GetPresStateImageRefInstanceUID method (ILEADDicomDS)

GetPresStateImageRefInstanceUID method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | BSTR GetPresStateImageRefInstanceUID(long lImageIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The GetPresStateImageRefInstanceUID method returns the SOP Instance UID of an Image SOP Instance referenced by the "Referenced Image Sequence" (0008,1140) that belongs to one of the Items (the one specified by the CurrentElement property) under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module".

The "Referenced Series Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstPresStateRefSeriesItem method and the MoveNextPresStateRefSeriesItem method can be used to enumerate all the Items under the "Referenced Series Sequence".

Having the CurrentElement property updated with an Item in the "Referenced Series Sequence", the images referenced by the "Referenced Image Sequence" under that Item can be enumerated using this method and the GetPresStateImageRefCount method.

See Also

Elements: | FindFirstPresStateRefSeriesItem method, MoveNextPresStateRefSeriesItem method, GetPresStateImageRefCount method, AddPresStateImageRef method, RemovePresStateImageRef method, RemoveAllPresStateImageRefs method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


GetShortValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetShortValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the ShortValues property with the short value(s) associated with the item specified in the CurrentElement property. This method also updates the ShortValueCount property to lCount, where lCount is the number of short values to get.

If you call this method with lCount greater than the number of short values in the Value Field of the specified item, this method will return an error. For example, if there are only three short values in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three short values, and you are only interested in retrieving the last two short values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the short values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_OW, VR_SS, or VR_US. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetCharValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetDateValue method, GetStringValue method, GetDateTimeValue method, GetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetSignatureDateTime method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetSignatureDateTime();
Overview | Refer to Working with Digital Signatures.

Remarks

The GetSignatureDateTime method gets the Digital Signature DateTime (0400,0105) of the Digital Signature specified by the CurrentElement property. The CurrentElement property must be updated with the corresponding Digital Signatures Sequence Item before calling the method.

The Digital Signature DateTime (0400,0105) under the Digital Signatures Sequence Item of a Digital Signature specifies the date and time the Digital Signature was created. You can use this method to obtain the value of this Data Element.

In addition to this method, the following methods can be used to get information about the Digital Signature:

GetSignatureUID method

GetSignedElementsCount method

MoveSignedElement method

GetMacTransferSyntax method

GetMacAlgorithm method

SaveCertificate method

See Also

Elements: | MoveSignature method, FindSignature method, GetSignatureUID method, GetSignedElementsCount method, MoveSignedElement method, GetMacTransferSyntax method, GetMacAlgorithm method, SaveCertificate method, CurrentElement property, DateTimeValueCount property, DateTimeValues property
Topics: | Data Sets: Digital Signatures


GetSignaturesCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetSignaturesCount();
Overview | Refer to Working with Digital Signatures.

Remarks

The GetSignaturesCount method returns the number of Digital Signatures in the main Data Set or in an Item of a Sequence of Items. Before calling the method, the CurrentElement property must be updated either with 0 or with an Item of a Sequence of Items in the Data Set. If the property is updated with 0, the method returns the number of Digital Signatures in the main Data Set. If the property is updated with an Item, the method returns the number of Digital Signatures in the Item.

The method computes the number of Digital Signatures by counting the number of Items under the Digital Signatures Sequence (FFFA,FFFA) which is located under the Item specified by the CurrentElement property or on the root of the Data Set if the property is set to 0. The method returns 0 if this Sequence doesn’t exist.

One way of enumerating the Digital Signatures in the main Data Set or in an Item of a Sequence of Items is by using this function along with the MoveSignature method.

See Also

Elements: | MoveSignature method, FindSignature method, CreateSignature method, CurrentElement property
Topics: | Data Sets: Digital Signatures


GetSignatureUID method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetSignatureUID();
Overview | Refer to Working with Digital Signatures.

Remarks

The GetSignatureUID method gets the Digital Signature UID (0400,0100) of the Digital Signature specified by the CurrentElement property. The CurrentElement property must be updated with the corresponding Digital Signatures Sequence Item before calling the method.

The Digital Signature UID (0400,0100) under the Digital Signatures Sequence Item of a Digital Signature should uniquely identify the Digital Signature. You can use this method to obtain the value of this Data Element.

In addition to this method, the following methods can be used to get information about the Digital Signature:

GetSignatureDateTime method

GetSignedElementsCount method

MoveSignedElement method

GetMacTransferSyntax method

GetMacAlgorithm method

SaveCertificate method

See Also

Elements: | MoveSignature method, FindSignature method, GetSignatureDateTime method, GetSignedElementsCount method, MoveSignedElement method, GetMacTransferSyntax method, GetMacAlgorithm method, SaveCertificate method, CurrentElement property, StringValueCount property, StringValues property
Topics: | Data Sets: Digital Signatures


GetSignedElementsCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetSignedElementsCount();
Overview | Refer to Working with Digital Signatures.

Remarks

The GetSignedElementsCount method returns the number of Data Elements covered by the Digital Signature specified by the CurrentElement property. The CurrentElement property must be updated with the corresponding Digital Signatures Sequence Item before calling the method.

The Digital Signatures Sequence Item of a Digital Signature should reference an Item under the MAC Parameters Sequence associated with the Digital Signatures Sequence. The Data Elements Signed (0400,0020) under the referenced MAC Parameters Sequence Item specifies the signed Data Elements. You can use this method to obtain the number of Data Elements specified by this Data Element.

Along with this method, the MoveSignedElement method can be used to enumerate the Data Elements covered by the Digital Signature.

The following methods can also be used to get information about the Digital Signature:

GetSignatureUID method

GetSignatureDateTime method

GetMacTransferSyntax method

GetMacAlgorithm method

SaveCertificate method

See Also

Elements: | MoveSignedElement method, MoveSignature method, FindSignature method, GetSignatureUID method, GetSignatureDateTime method, GetMacTransferSyntax method, GetMacAlgorithm method, SaveCertificate method, CurrentElement property
Topics: | Data Sets: Digital Signatures


GetStringValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetStringValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the StringValues property with the string value(s) associated with the item specified in the CurrentElement property. This method also updates the StringValueCount property to lCount, where lCount is the number of strings to get.

If you call this method with lCount greater than the number of strings in the Value Field of the specified item, this method will return an error. For example, if there are only three strings in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three string values, and you are only interested in retrieving the last two string values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the string values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_AE, VR_CS, VR_LO, VR_LT, VR_SH, VR_ST, VR_UI, VR_UT, VR_PN. For more information about Value Representations, refer to Default Value Representation Table.

When more than one string is retrieved, all strings, separated by the 0 delimiter, are in the character string returned by this function. For example, the illustration below shows the returned character string, containing three strings separated by the 0 delimiter.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetCharValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetDateValue method, GetShortValue method, GetDateTimeValue method, GetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetTagCount method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetTagCount ();
Overview | Refer to Working with Tags.

Remarks

Returns the number of items in the Data Element Tag Table.

The following functions will help you navigate the Data Element Tag Table:

MoveFirstTag method

MoveLastTag method

MoveNextTag method

MovePrevTag method

See Also

Elements: | MoveFirstTag method, MoveLastTag method, MoveNextTag method, MovePrevTag method
Topics: | Data Element Tags: Maneuvering Through the Data Element Tag Table


GetTextObjectAttributes method (ILEADDicomDS)

GetTextObjectAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short GetTextObjectAttributes(long lTextObjectIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The GetTextObjectAttributes method retrieves the attributes of a text annotation object that is defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module". The method updates the properties specified by the TextObjectAttributes property with the values retrieved.

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | GetTextObjectCount method, TextObjectAttributes property, SetTextObjectAttributes method, CreateTextObject method, RemoveTextObject method, FindTextObjectItem method, GetGraphicObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Text Objects


GetTextObjectCount method (ILEADDicomDS)

GetTextObjectCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetTextObjectCount();
Overview | Refer to Working with DICOM Annotations

Remarks

The GetTextObjectCount method returns the number of the text annotation objects defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

This method and the GetLayerTextObjectCount method perform the same function.

See Also

Elements: | CreateTextObject method, GetTextObjectAttributes method, SetTextObjectAttributes method, RemoveTextObject method, RemoveAllTextObjects method, GetGraphicObjectCount method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, GetLayerTextObjectCount method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Text Objects


GetTimeValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetTimeValue ( long lIndex, long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Updates the TimeValues property with the time value(s) associated with the item specified in the CurrentElement property. This method also updates the TimeValueCount property to lCount, where lCount is the number of time values to get.

If you call this method with lCount greater than the number of time values in the Value Field of the specified item, this method will return an error. For example, if there are only three time values in the Value Field and you call this method with lCount set to four, an error will be returned.

If you have more than one value stored in the Value Field of the specified Data Element, you can retrieve one or more of those elements. For example, if the Value Field of the specified Data Element contains three time values, and you are only interested in retrieving the last two time values, set lIndex to 1 and lCount to 2. This tells the method to retrieve the time values starting at position 1 (the index is zero based) and retrieve two values. Therefore you would retrieve the values in positions 1 and 2 in the Value Field.

This method can be called only if the Value Representation of the Data Element is VR_TM. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | GetAgeValue method, GetBinaryValue method, GetCharValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetDateValue method, GetShortValue method, GetDateTimeValue method, GetStringValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetUIDCount method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetUIDCount ();
Overview | Refer to Working with Unique Identifiers.

Remarks

Returns the number of items in the UID Table.

The following functions will help you navigate the UID Table:

MoveFirstUID method

MoveLastUID method

MoveNextUID method

MovePrevUID method

See Also

Elements: | MoveFirstUID method, MoveLastUID method, MoveNextUID method, MovePrevUID method
Topics: | Unique Identifiers: Maneuvering Through the UID Table


GetValueCount method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetValueCount ();
Overview | Refer to Working with Data Sets.

Remarks

Returns the number of values stored in the Value Field of the element specified in the CurrentElement property.

Note: This method does not allocate memory or retrieve values.

See Also

Elements: | GetInfoDS method, GetDSPreamble method, GetBinaryValue method, GetCharValue method, GetShortValue method, GetLongValue method, GetFloatValue method, GetDoubleValue method, GetAgeValue method, GetDateValue method, GetDateTimeValue method, GetTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


GetVOILUTAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetVOILUTAttributes(long lVOILUTIndex, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The GetVOILUTAttributes method updates the properties specified by the VOILUTAttributes property with the values of the attributes that describe the specified VOI LUT.

Before calling this method, use the VOILUTCount property to see if a "VOI LUT Sequence" (0028,3010) exists in the DICOM Data Set and to obtain the number of items under that sequence. The index specified by the parameter lVOILUTIndex is zero-based. If you pass 0 for example the method will populate the LUTDescriptorNumberOfEntries property, the LUTDescriptorFirstMapped property, and the LUTDescriptorEntryBits property with the values of the "LUT Descriptor" (0028,3002) under the first item in the "VOI LUT Sequence", and the LUTExplanation property with the value of the "LUT Explanation" (0028,3003) element if it exists.

See Also

Elements: | VOILUTCount property, VOILUTAttributes property, GetVOILUTData method, SetVOILUT method, DeleteVOILUT method, GetWindowAttributes method
Topics: | Lookup Tables


GetVOILUTData method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetVOILUTData(long lVOILUTIndex, VARIANT* pData, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The GetVOILUTData method retrieves the "LUT Data" (0028,3006) for an item under the "VOI LUT Sequence" (0028,3010).

The method retrieves the LUT Data as a one-dimensional safearray of long values (VT_ARRAY | VT_I4).

See Also

Elements: | VOILUTCount property, GetVOILUTAttributes method, SetVOILUT method, DeleteVOILUT method
Topics: | Lookup Tables


GetVRCount method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetVRCount ();
Overview | Refer to Working with Value Representations.

Remarks

Returns the number of items in the Value Representation Table.

The following functions will help you navigate the Value Representation Table:

MoveFirstVR method

MoveLastVR method

MoveNextVR method

MovePrevVR method

See Also

Elements: | MoveFirstVR method, MoveLastVR method, MoveNextVR method, MovePrevVR method
Topics: | Value Representations: Maneuvering Through the Value Representation Table


GetWaveformGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetWaveformGroup(long lIndex, IDicomWaveformGroup* pWaveformGroup);
Overview | Refer to Working with DICOM Waveforms.

Remarks

The GetWaveformGroup method extracts the waveform multiplex group at the specified index and populates the specified DicomWaveformGroup object with the attributes of the extracted waveform group. For each channel in the extracted group, a DicomWaveformChannel object is added to the collection specified by the Channels property of the waveform group object.

In DICOM, a waveform consists of one or more multiplex groups, each encoded into an Item in the Waveform Sequence (5400,0100).

This is the main method for extracting waveforms from a DICOM dataset. Once the passed object is populated, use the methods and properties defined by the IDicomWaveformGroup interface and the IDicomWaveformChannel interface to examine the extracted waveform group; these methods and properties provide a comprehensive DICOM waveform support.

See Also

Elements: | GetWaveformGroupCount method, DeleteWaveformGroup method, AddWaveformGroup method
Topics: | DICOM Waveform Groups: Using Waveform Groups


GetWaveformGroupCount method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetWaveformGroupCount();
Overview | Refer to Working with DICOM Waveforms.

Remarks

The GetWaveformGroupCount method returns the number of waveform multiplex groups that are included in the dataset.

In DICOM, a waveform consists of one or more multiplex groups, each encoded into an Item in the Waveform Sequence (5400,0100). Use this method to retrieve the number of iems under that squence.

See Also

Elements: | GetWaveformGroup method, DeleteWaveformGroup method, AddWaveformGroup method
Topics: | DICOM Waveform Groups: Using Waveform Groups


GetWindowAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetWindowAttributes(long lWindowIndex, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The GetWindowAttributes method updates the properties specified by the WindowAttributes property with the values of the attributes that describe the specified window.

The "Window Center" (0028,1050) and "Window Width" (0028,1051) specify a linear conversion from stored pixel values (after any modality LUT or rescale slope and intercept specified in the IOD have been applied) to values to be displayed. Please see the "VOI LUT Module Attributes" in the DICOM standard for more details.

The method will fail and return DICOM_ERROR_PARAMETER if the window count (number of values under the Window Center element) equals 0 or if the parameter lWindowIndex is greater than or equal to the window count (which is specified by the WindowCount property). The index specified by the parameter lWindowIndex is zero-based. If you pass 0 for example the method will populate the WindowCenter property with the first value under the "Window Center" (0028,1050) element, the WindowWidth property with the first value under the "Window Width" (0028,1051) element, and the WindowCWExplanation property with the value of the "Window Center & Width Explanation" (0028,1055) element if it exists.

See Also

Elements: | WindowCount property, WindowAttributes property, SetWindowAttributes method, DeleteWindow method, GetVOILUTAttributes method, GetVOILUTData method
Topics: | Lookup Tables


InitCS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void InitCS (short nCommand, BOOL bRequest);
Overview | Refer to Working with Command Sets.

Remarks

Creates a Data Set as a Command Set and inserts the elements for the specified command.

Command sets are special data sets that hold information about a command.

For more information about the elements contained in the command sets supported by LEADTOOLS, refer to Command Set Default Tables.

See Also

Elements: | GetInfoCS method
Topics: | Data Sets: Command Sets


InitDS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void InitDS ( long lClass, short nFlags );
Overview | Refer to Working with Data Sets.

Remarks

Creates the data set, inserting the appropriate elements for the specified class.

If a Data Set exists at the time this method is called, that Data Set will be destroyed.

See Also

Elements: | LoadDSArray method
Topics: | Data Sets: Creating, Initializing, Loading, and Saving Data Sets


InsertBitmapListValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertBitmapListValue (long hBitmapList, long lIndex, long lCompression, long lPhotometric, short nBitsPerPixel, short nQFactor, long lFlags);
Overview | Refer to Working with Data Sets.

Remarks

This method inserts the images in the BitmapList property into the Pixel Data Element.

As an example, if you wish to insert 50 images starting with the 50th frame in the Pixel Data, call this function with lIndex set to 49 (the 50th frame in a zero-based index) and the 50 frames you wish to insert in hBitmapList.

Most DICOM files will only have one Data Element of type TAG_PIXEL_DATA. Therefore, in most instances the CurrentElement property can be NULL, since the method will automatically replace the images of the only Pixel Data Element in the file. If the CurrentElement property is not NULL, it must contain the Pixel Data Element itself.

If the DICOM file is CLASS_BASIC_DIRECTORY, the file may contain more than one Pixel Data Element. In this case you must specify in the CurrentElement property the Pixel Data Element in which the images will be replaced.

If you wish to replace only one image within the Pixel Data Element, you must use DeleteBitmapValue method and InsertBitmapValue method.

For more options when using the JPEG 2000 compression, refer to the J2KOptions property.

This function will either insert, delete or update one or more of the following elements:

Tag | Name
(7FE0,0010) | Pixel Data
(0002,0010) | Transfer Syntax UID
(0028,0101) | Bits Stored
(0028,0100) | Bits Allocated
(0028,0102) | High Bit
(0028,0103) | Pixel Representation
(0028,0010) | Rows
(0028,0011) | Columns
(0028,0002) | Samples per Pixel
(0028,0006) | Planar Configuration
(0028,0004) | Photometric Interpretation
(0028,0106) | Smallest Image Pixel Value
(0028,0107) | Largest Image Pixel Value
(0028,1101) | Red Palette Color Lookup Table Descriptor
(0028,1102) | Green Palette Color Lookup Table Descriptor
(0028,1103) | Blue Palette Color Lookup Table Descriptor
(0028,1201) | Red Palette Color Lookup Table Data
(0028,1202) | Green Palette Color Lookup Table Data
(0028,1203) | Blue Palette Color Lookup Table Data
(0028,1199) | Palette Color Lookup Table UID
(0028,1052) | Rescale Intercept
(0028,1053) | Rescale Slope
(0028,1054) | Rescale Type
(0028,1221) | Segmented Red Palette Color Lookup Table Data
(0028,1222) | Segmented Green Palette Color Lookup Table Data
(0028,1223) | Segmented Blue Palette Color Lookup Table Data
(0028,3010) | VOI LUT Sequence
(0028,1050) | Window Center
(0028,1051) | Window Width
(0028,1055) | Window Center & Width Explanation
(0028,0008) | Number of Frames
(0054,0070) | Time Slot Vector

This function is indifferent to the pixel data restrictions imposed by the various DICOM IOD classes, for example this function will allow the user to insert a colored image into a "Digital X-Ray Image Storage" dataset.

This function will always insert a "Number of Frames" (0028, 0008) element and set its value.

See Also

Elements: | GetBitmapValue method, GetBitmapListValue method, SetBitmapValue method, InsertBitmapListValue method, SetBitmapValue method, DeleteBitmapValue method
Topics: | Data Sets: Getting and Setting Data Element Values


InsertBitmapValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertBitmapValue (long Bitmap, long lIndex, long lCompression, long lPhotometric, short nBitsPerPixel, short nQFactor, long lFlags);
Overview | Refer to Working with Data Sets.

Remarks

This method inserts the image in the Bitmap property into the Pixel Data Element at the specified index.

Most DICOM files will only have one Data Element of type TAG_PIXEL_DATA. Therefore, in most instances the CurrentElement property can be NULL, since the method will automatically replace the images of the only Pixel Data Element in the file. If the CurrentElement property is not NULL, it must contain the Pixel Data Element itself.

If the DICOM file is CLASS_BASIC_DIRECTORY, the file may contain more than one Pixel Data Element. In this case you must specify in the CurrentElement property the Pixel Data Element in which the images will be replaced.

If you wish to replace only one image within the Pixel Data Element, you must use DeleteBitmapValue method and InsertBitmapValue method.

For more options when using the JPEG 2000 compression, refer to the J2KOptions property.

This function will either insert, delete or update one or more of the following elements:

Tag | Name
(7FE0,0010) | Pixel Data
(0002,0010) | Transfer Syntax UID
(0028,0101) | Bits Stored
(0028,0100) | Bits Allocated
(0028,0102) | High Bit
(0028,0103) | Pixel Representation
(0028,0010) | Rows
(0028,0011) | Columns
(0028,0002) | Samples per Pixel
(0028,0006) | Planar Configuration
(0028,0004) | Photometric Interpretation
(0028,0106) | Smallest Image Pixel Value
(0028,0107) | Largest Image Pixel Value
(0028,1101) | Red Palette Color Lookup Table Descriptor
(0028,1102) | Green Palette Color Lookup Table Descriptor
(0028,1103) | Blue Palette Color Lookup Table Descriptor
(0028,1201) | Red Palette Color Lookup Table Data
(0028,1202) | Green Palette Color Lookup Table Data
(0028,1203) | Blue Palette Color Lookup Table Data
(0028,1199) | Palette Color Lookup Table UID
(0028,1052) | Rescale Intercept
(0028,1053) | Rescale Slope
(0028,1054) | Rescale Type
(0028,1221) | Segmented Red Palette Color Lookup Table Data
(0028,1222) | Segmented Green Palette Color Lookup Table Data
(0028,1223) | Segmented Blue Palette Color Lookup Table Data
(0028,3010) | VOI LUT Sequence
(0028,1050) | Window Center
(0028,1051) | Window Width
(0028,1055) | Window Center & Width Explanation
(0028,0008) | Number of Frames
(0054,0070) | Time Slot Vector

This function is indifferent to the pixel data restrictions imposed by the various DICOM IOD classes, for example this function will allow the user to insert a colored image into a "Digital X-Ray Image Storage" dataset.

This function will always insert a "Number of Frames" (0028, 0008) element and set its value.

See Also

Elements: | GetBitmapValue method, GetBitmapListValue method, InsertBitmapValue method, SetBitmapListValue method, SetBitmapListValue method, DeleteBitmapValue method
Topics: | Data Sets: Getting and Setting Data Element Values


InsertCodedConcept method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertCodedConcept(BSTR bstrCodingSchemeDesignator, BSTR bstrCodingSchemeVersion, BSTR bstrCodeValue, BSTR bstrCodeMeaning, VARIANT_BOOL bContextGroupLocalVersion, BSTR bstrContextGroupExtensionCreatorUID, short nFlags);
Overview | Refer to Working with Context Groups.

Remarks

The InsertCodedConcept method adds a new Coded Concept to the Context Group specified by the CurrentContextGroup property and updates the CurrentCodedConcept property with the newly inserted Coded Concept.

If the parameter bContextGroupLocalVersion is set to VARIANT_TRUE, then the Context Group Local Version (0008,0107) of the new Coded Concept should be specified using the DateTimeValues property before the method is called. The method will take the first value in the array specified by the DateTimeValues property as the Context Group Local Version of the new Coded Concept.

At least the Coding Scheme Designator, the Code Value, and the Code Meaning of the new Coded Concept should be specified.

If a Context Group in the Context Group Table has a corresponding Group in the internal table maintained by LEADTOOLS, then you can use the DefaultContextGroup method to discard any changes made to the Context Group, including the additions of new Coded Concepts.

See Also

Elements: | CurrentCodedConcept property, CurrentContextGroup property, SetCodedConceptCodeMeaning method, DeleteCodedConcept method, MoveFirstCodedConcept method, FindIndexCodedConcept method, DefaultContextGroup method, DateTimeValues property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


InsertContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertContextGroup(BSTR bstrContextIdentifier, BSTR bstrName, VARIANT_BOOL bExtensible, short nFlags);
Overview | Refer to Working with Context Groups.

Remarks

The InsertContextGroup method adds a new Context Group to the Context Group Table and updates the CurrentContextGroup property with the newly inserted Context Group.

A Context Group can be added to the Context Group Table either by loading from the internal table maintained by LEADTOOLS or by inserting into the Context Group Table directly. Use the InsertContextGroup method to insert a new Context Group to the Context Group Table. The LoadContextGroup method is used to load Context Groups from the internal table.

The Context Group Version (0008,0106) of the new Context Group is not passed as a parameter to the method. It should be specified using the DateTimeValues property before the method is called. The method will take the first value in the array specified by the DateTimeValues property as the Context Group Version of the new Context Group.

The Context Identifier, name, and Context Group Version of the new Context Group should all be specified.

Use the InsertCodedConcept method to add Coded Concepts to a Context Group in the Context Group Table.

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, DeleteContextGroup method, ResetContextGroup method, FindContextGroup method, MoveFirstContextGroup method, InsertCodedConcept method, MoveFirstCodedConcept method, DateTimeValues property, DateTimeValueCount property
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


InsertDS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertDS (long hDS, long hSrcElement);
Overview | Refer to Working with Command Sets.

Remarks

Inserts the source Data Set at the current element in the current Data Set.

If both hSrcElement the CurrentElement property are NULL, the source data set will be inserted at the root level of the destination data set. Therefore the highest level elements of the source data set will be added as siblings to the highest level elements of the destination data set. This can be seen in the diagram below.

If hSrcElement is not NULL and the CurrentElement property is NULL, the children of hSrcElement will be added at the root level of the destination data set (i.e. as siblings to elements at the highest level). This can be seen in the diagram below. Note that the source elements to be added are in blue.

If hSrcElement is NULL and the CurrentElement property is not NULL, the entire source data set will be added as children to the element specified in the CurrentElement property. This can be seen in the diagram below. The CurrentElement property contains the destination element pointed to by the arrow.

If hSrcElement and the CurrentElement property are both not NULL, then the children of hSrcElement are added as the children of the element specified in the CurrentElement property. This can be seen in the diagram below. The original children of the element specified in the CurrentElement property are in red and the source elements to be added are in blue.

If an inserted element has the same tag value as a destination element at the same level and with the same parent, then the value from the source element is copied into the destination element and any child elements are added accordingly. For example, the diagram below shows the result of a call to the InsertDS method. If the two elements indicated by the arrows have the same tag value, the value from the source element is copied into the destination element and the structure on the right results. This is shown by the red outline of the destination element with the blue center of the source element.

To make an exact copy, refer to hDicomDS.

See Also

Elements: | InitDS method, GetInfoDS method
Topics: | Data Sets: Inserting and Deleting Data Set Members


InsertElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertElement ( BOOL bChild, long lTag, short nVR, BOOL bSequence, long lIndex );
Overview | Refer to Working with Data Sets.

Remarks

Inserts a new item in the Data Set, based on the value of bChild. If the element is successfully inserted, the CurrentElement property will be updated with the new item.

The illustrations below show how items are added to the Data Set (internally maintained as a tree), based on the value of bChild.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore, since added items become the last sibling or the last child, these are drawn at the bottom of the appropriate group of items.

In this illustration, the CurrentElement property contains Item 1 and bChild is False. The new item is added as the last sibling of Item 1.

In this illustration, the CurrentElement property contains Item 1 and bChild is True. The new item is added as the last child of Item 1.

See Also

Elements: | DeleteElement method
Topics: | Data Sets: Inserting and Deleting Data Set Members


InsertIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertIOD ( BOOL bChild, short nType, long lCode, BSTR pszName, short nUsage, BSTR pszDescription );
Overview | Refer to Working with Information Object Definitions.

Remarks

Inserts a new item in the IOD Structure, based on the value of bChild.

The illustrations below show how items are added to the IOD Structure (internally maintained as a tree), based on the value of bChild.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore, since added items become the last sibling or the last child, these are drawn at the bottom of the appropriate group of items.

In this illustration, the CurrentIOD property contains Item 1 and bChild is False. The new item is added as the last sibling of Item 1.

In this illustration, the CurrentIOD property contains Item 1 and bChild is True. The new item is added as the last child of Item 1.

See Also

Elements: | DeleteIOD method, ResetIOD method, DefaultIOD method
Topics: | Information Object Definitions: Inserting and Deleting IODs


InsertKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertKey (BSTR pszKey, BOOL bOptional);
Overview | Refer to Working with Key Elements.

Remarks

Inserts a new key element in the Dicom Dir Data Set.

If the CurrentElement property is not 0, then the key element will be inserted as a child of the element specified in the the CurrentElement property.

If the new key element is successfully inserted, the the CurrentElement property will be updated with the new key element.

See Also

Elements: | GetKeyValue method, DeleteKey method, MoveRootKey method, MoveParentKey method, MoveChildKey method, MoveFirstKey method, MoveLastKey method, MovePrevKey method, MoveNextKey method, FindFirstKey method, FindLastKey method, FindPrevKey method, FindNextKey method
Topics: | Key Elements: Inserting and Deleting Key Elements


InsertModule method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertModule ( long lModule, BOOL bOptional );
Overview | Refer to Working with Data Sets.

Remarks

Inserts a new module in the Data Set. If the module is successfully inserted, the CurrentModule property is updated with the new module.

LEAD controls the placement of the module in the Data Set.

See Also

Elements: | CurrentModule property, InsertElement method
Topics: | Data Sets: Inserting and Deleting Data Set Members


InsertTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertTag ( long lCode, long lMask, BSTR pszName, short nVR, long lMinVM, long lMaxVM, long lDivideVM );
Overview | Refer to Working with Tags.

Remarks

Inserts a new item in the Data Element Tag Table. If successful, it sets the CurrentTag property to the new item.

All items are inserted at the bottom of the table.

To see the default values for the Data Element Tag Table, refer to the Default Data Element Tag Table.

See Also

Elements: | DeleteTag method, ResetTag method, DefaultTag method
Topics: | Data Element Tags: Inserting and Deleting Data Element Tags


InsertUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertUID (BSTR pszCode, BSTR pszName , long nType);
Overview | Refer to Working with Unique Identifiers.

Remarks

Inserts a new item in the UID Table. If successful, it sets the CurrentUID property to the new item.

Note: Inserted UID items will work within LEADTOOLS, however, in order for new UID values to work across countries, sites, equipment, etc. you must contact the National Electrical Manufacturers Association.

All items are inserted at the bottom of the table.

To see the default values for the UID Table, refer to the UID Table.

For more information on the DICOM file format, refer to An Overview of Dicom or the DICOM Spec.

See Also

Elements: | DeleteUID method, ResetUID method, DefaultUID method
Topics: | Unique Identifiers: Inserting and Deleting UIDs


InsertVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short InsertVR ( short nCode, BSTR pszName, long lLength, short nRestrict, short nUnitSize );
Overview | Refer to Working with Value Representations.

Remarks

Inserts a new item in the Value Representation Table. If successful, it sets the CurrentVR property to the new item. The value specified by nCode must be unique.

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 lLength, you must also consider the values in nRestrict. If nRestrict contains VR_FIXED, then lLength is a fixed value. Therefore, the data stored in the value Field of a data element would have that length and lLength and nUnitSize would be equal.

If nRestrict contains VR_MAXIMUM, lLength is the maximum length of data that can be stored in the Value Field of a Data Element. In this case, nUnitSize 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 VR_AE has the following default values:

lLength | 16
nRestrict | VR_STRING|VR_MAXIMUM
nUnitSize | 1

Therefore, the Value Field of a Data Element that has a Value Representation of VR_AE can store between 1 and 16 bytes of string data.

For more information on the structure of the DICOM file format, refer to An Overview of Dicom or the DICOM Spec.

See Also

Elements: | DeleteVR method, ResetVR method, DefaultVR method
Topics: | Value Representations: Inserting and Deleting Value Representations


IsOverlayInDataSet method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsOverlayInDataSet(long lOverlayIndex, long lFlags);
Overview | Refer to Overlays Overview.

Remarks

The IsOverlayInDataSet method specifies whether the overlay data of the specified overlay exists inside this Data Set.

See Also

Elements: | OverlayCount property, GetOverlayAttributes method
Topics: | Overlays


LEADAnnObject property (ILEADDicomDS)

LEADAnnObject property (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long LEADAnnObject
Overview | Refer to Working with DICOM Annotations

Remarks

(Read-only) The LEADAnnObject property specifies the handle to the LEAD annotation object resulted from converting a DICOM graphic or text annotation object using the ConvertDicomAnnObjToLEADAnnObj method.

See Also

Elements: | ConvertDicomAnnObjToLEADAnnObj method, ConvertLEADAnnObjToDicomAnnObjs method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Converting Between LEADTOOLS Annotations and DICOM Annotations


LoadContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short LoadContextGroup(BSTR bstrContextID);
Overview | Refer to Working with Context Groups.

Remarks

The LoadContextGroup method loads the specified Context Group from the internal table into the Context Group Table.

A Context Group can be added to the Context Group Table either by loading it from the internal table maintained by LEADTOOLS or by inserting it directly into the Context Group Table. The Context Groups in the internal table are those defined by the DICOM Content Mapping Resource (DCMR). Use the LoadContextGroup method to load the desired Context Groups from this table into the Context Group Table. Use the InsertContextGroup method to insert a Context Group.

If the Context Group Table already contains a Context Group with the specified Context ID, the method will just return successfully. If the parameter bstrContextID is set to NULL or if an empty string is specified, the method will load all the Context Groups that are not loaded currently, without affecting any Context Group that is already in the Context Group Table. Therefore, all the Context Groups in the internal table can be loaded from the beginning by calling the method with the parameter bstrContextID set to NULL or by specifying an empty string.

See Also

Elements: | InsertContextGroup method, DeleteContextGroup method, ResetContextGroup method, FindContextGroup method, MoveFirstContextGroup method, MoveFirstCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


LoadDS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short LoadDS ( BSTR pszFilename, short nFlags );
Overview | Refer to Working with Data Sets.

Remarks

Loads the Data Set from the specified file.

If you know certain characteristics of the file, you can set those in nFlags. Any characteristic that you don’t set will be automatically determined. For example, if you know that the metaheader is present, but you do not know the byte order, or whether the Value Representation is implicit or explicit, you can set only DS_METAHEADER_PRESENT in nFlags. During loading LEADTOOLS will determine the byte order and whether the byte order is implicit or explicit.

If you do not know any of the characteristics of the file, set nFlags to 0 and LEADTOOLS will automatically determine all the file characteristics and load the file accordingly.

Any of the available Meta-header flags listed under nFlags may be combined with any of the available values or combinations of values for the Transfer Syntax flags. For example, you may combine DS_METAHEADER_ABSENT with DS_EXPLICIT_VR, or you may combine DS_METAHEADER_PRESENT with DS_BIG_ENDIAN | DS_EXPLICIT_VR, etc.

To load a data set from a byte array, call LoadDSArray method.

See Also

Elements: | LoadDSArray method, InitDS method, SaveDS method
Topics: | Data Sets: Creating, Initializing, Loading, and Saving Data Sets


LoadDSArray method (ILEADDicomDS)

Visual Basic example

Visual C++ 6.0 example

Syntax | short LoadDSArray(VARIANT vMem, short nFlags);
Overview | Refer to Working with Data Sets.

Remarks

Loads the Data Set from a byte array.

This method DOES NOT make a copy of the byte array stored in vMem. Therefore, DO NOT destroy this memory as long as you are using the dataset referenced by this instance of the COM object, or until you have reset the dataset by calling ResetDS method.

Once you have called the ResetDS method, you can repopulate the data set by calling InitDS method, LoadDS method, or LoadDSArray method.

If you know certain characteristics of the DICOM file stored in vMem, you can set those in nFlags. Any characteristic that you don’t set will be automatically determined. For example, if you know that the metaheader is present, but you do not know the byte order, or whether the Value Representation is implicit or explicit, you can set only DS_METAHEADER_PRESENT in nFlags. During loading LEADTOOLS will determine the byte order and whether the byte order is implicit or explicit.

If you do not know any of the characteristics of the DICOM file, set nFlags to 0 and LEADTOOLS will automatically determine all the file characteristics and load the file accordingly.

Any of the available Meta-header flags listed under nFlags may be combined with any of the available values or combinations of values for the Transfer Syntax flags. For example, you may combine DS_METAHEADER_ABSENT with DS_EXPLICIT_VR, or you may combine DS_METAHEADER_PRESENT with DS_BIG_ENDIAN | DS_EXPLICIT_VR, etc.

See Also

Elements: | ResetDS method, InitDS method, LoadDS method, SaveDS method
Topics: | Data Sets: Creating, Initializing, Loading, and Saving Data Sets


MoveChildElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveChildElement ();
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property to the first child of the item specified in the CurrentElement property.

This method requires that the Data Set is evaluated as a tree structure.

The child is the offspring one level lower than the specified item. If the specified item has no child items, the CurrentElement property will be set to NULL. For example:

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | NULL
Item 2 | Item 3
Item 4 | Item 5
Item 6 | NULL

The following methods will also help you navigate the Data Set:

MoveFirstElement method

MoveLastElement method

MoveNextElement method

MoveRootElement method

MoveParentElement method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxElement method examples.

See Also

Elements: | MoveFirstElement method, MoveLastElement method, MoveNextElement method, MovePrevElement method, MoveRootElement method, MoveParentElement method
Topics: | Data Sets: Maneuvering Through a Data Set


MoveChildIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveChildIOD ();
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property to the first child of the item specified in the CurrentIOD property.

This method requires that the IOD Structure is evaluated as a tree structure.

The child is the offspring one level lower than the specified item. If the specified item has no child items, the CurrentIOD property will be set to NULL. For example:

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
Item 1 | NULL
Item 2 | Item 3
Item 4 | Item 5
Item 6 | NULL

The following methods will also help you navigate the IOD Structure:

MoveFirstIOD method

MoveLastIOD method

MoveNextIOD method

MoveRootIOD method

MoveParentIOD method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxIOD methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxIOD method examples.

See Also

Elements: | MoveFirstIOD method, MoveLastIOD method, MoveNextIOD method, MovePrevIOD method, MoveRootIOD method, MoveParentIOD method
Topics: | Information Object Definitions: Maneuvering Through the IOD Table


MoveChildKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveChildKey ();
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property to the first key element child of the key element specified in the CurrentElement property.

This method requires that the DICOM Dir Data Set is evaluated as a tree structure.

The child is the offspring one level lower than the specified key element. If the specified key element has no child key elements, the CurrentElement property will be set to NULL. For example:

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | NULL
Item 2 | Item 3
Item 4 | Item 5
Item 6 | NULL

The following methods will also help you navigate the DICOM Dir Data Set:

MoveFirstKey method

MoveLastKey method

MoveNextKey method

MoveRootKey method

MoveParentKey method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully.

See Also

Elements: | MoveFirstKey method, MoveLastKey method, MoveNextKey method, MovePrevKey method, MoveRootKey method, MoveParentKey method
Topics: | Key Elements: Maneuvering Through the DICOM Dir Data Set


MoveCodedConceptGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void MoveCodedConceptGroup();
Overview | Refer to Working with Context Groups.

Remarks

The MoveCodedConceptGroup method updates the CurrentContextGroup property with the Context Group, in the Context Group Table, to which the Coded Concept specified by the CurrentCodedConcept property belongs.

See Also

Elements: | CurrentCodedConcept property, CurrentContextGroup property, MoveFirstCodedConcept method, FindIndexCodedConcept method, FindCodedConcept method, InsertCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MoveFirstCodedConcept method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL MoveFirstCodedConcept();
Overview | Refer to Working with Context Groups.

Remarks

The MoveFirstCodedConcept method updates the CurrentCodedConcept property with the first Coded Concept in the Context Group specified by the CurrentContextGroup property.

Along with this method, the following methods can be used to maneuver through the Coded Concepts of a Context Group in the Context Group Table:

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

You can also use the GetCodedConceptCount method and the FindIndexCodedConcept method to enumerate the Coded Concepts.

The Context Group to which a Coded Concept belongs can be obtained using the MoveCodedConceptGroup method.

See Also

Elements: | CurrentCodedConcept property, CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveLastCodedConcept method, MoveNextCodedConcept method, MovePrevCodedConcept method, GetCodedConceptCount method, FindIndexCodedConcept method, MoveCodedConceptGroup method, SetCodedConceptCodeMeaning method, DeleteCodedConcept method, MoveFirstContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MoveFirstContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL MoveFirstContextGroup();
Overview | Refer to Working with Context Groups.

Remarks

The MoveFirstContextGroup method updates the CurrentContextGroup property with the first Context Group in the Context Group Table.

Use the LoadContextGroup method and the InsertContextGroup method to add Context Groups to the Context Group Table.

Along with this method, the following methods can be used to maneuver through the Context Groups in the Context Group Table:

MoveLastContextGroup method

MoveNextContextGroup method

MovePrevContextGroup method

You can also use the GetContextGroupCount method and the FindIndexContextGroup method to enumerate the Context Groups in the table.

Use the following methods to investigate the Coded Concepts of a Context Group:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

GetCodedConceptCount method

FindIndexCodedConcept method

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveLastContextGroup method, MoveNextContextGroup method, MovePrevContextGroup method, GetContextGroupCount method, FindIndexContextGroup method, FindContextGroup method, MoveFirstCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MoveFirstElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveFirstElement ( BOOL bTree );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property to the first item in the Data Set. The result depends on whether the Data Set is evaluated as a list or a tree.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the first item on the same level and with the same parent as the item contained in the CurrentElement property. Please note that the numbering of the items in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | Item 5
Item 6 | Item 7
NULL | Item 2

If the Data Set is evaluated as a list, the CurrentElement property is updated with the first item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
NULL | Item 1
Item 12 | Item 1
Item 14 | Item 1
Item 22 | Item 1
Item 25 | Item 1

The following methods will also help you navigate the Data Set as either a tree or a list:

MoveGetLastElement method

MovePrevElement method

MoveNextElement method

If you evaluate the Data Set as a tree, you can also use the following methods to navigate the tree:

MoveRootElement method

MoveParentElement method

MoveChildElement method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxElement method examples.

See Also

Elements: | MoveLastElement method, MovePrevElement method, MoveNextElement method, MoveRootElement method, MoveParentElement method, MoveChildElement method
Topics: | Data Sets: Maneuvering Through a Data Set


MoveFirstIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveFirstIOD ( BOOL bTree );
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property to the first item in the IOD Structure. The result depends on whether the IOD Structure is evaluated as a list or a tree.

If the IOD Structure is evaluated as a tree structure, this method updates the CurrentIOD property with the first item on the same level and with the same parent as the item contained in the CurrentIOD property. Please note that the numbering of the items in this first illustration is arbitrary and does not imply order.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | Item 5
Item 6 | Item 7
NULL | Item 2

If the IOD Structure is evaluated as a list, the CurrentIOD property is updated with the first item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the IOD Structure is evaluated as a list.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
NULL | Item 1
Item 12 | Item 1
Item 14 | Item 1
Item 22 | Item 1
Item 25 | Item 1

The following methods will also help you navigate the IOD Structure as either a tree or a list:

MoveGetLastIOD method

MovePrevIOD method

MoveNextIOD method

If you evaluate the IOD Structure as a tree, you can also use the following methods to navigate the tree:

MoveRootIOD method

MoveParentIOD method

MoveChildIOD method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxIOD methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxIOD method examples.

See Also

Elements: | MoveLastIOD method, MovePrevIOD method, MoveNextIOD method, MoveRootIOD method, MoveParentIOD method, MoveChildIOD method
Topics: | Information Object Definitions: Maneuvering Through the IOD Table


MoveFirstKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveFirstKey (BOOL bTree);
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property to the first key element in the DICOM Dir Data Set. The result depends on whether the DICOM Dir Data Set is evaluated as a list or a tree.

If the DICOM Dir Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the first key element on the same level and with the same parent as the key element contained in the CurrentElement property. Please note that the numbering of the items in this first illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | Item 5
Item 6 | Item 7
NULL | Item 2

If the DICOM Dir Data Set is evaluated as a list, the CurrentElement property is updated with the first key element in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the DICOM Dir Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
NULL | Item 1
Item 12 | Item 1
Item 14 | Item 1
Item 22 | Item 1
Item 25 | Item 1

The following methods will also help you navigate the DICOM Dir Data Set as either a tree or a list:

MoveLastKey method

MovePrevKey method

MoveNextKey method

If you evaluate the DICOM Dir Data Set as a tree, you can also use the following methods to navigate the tree:

MoveRootKey method

MoveParentKey method

MoveChildKey method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully.

See Also

Elements: | MoveLastKey method, MovePrevKey method, MoveNextKey method, MoveRootKey method, MoveParentKey method, MoveChildKey method
Topics: | Key Elements: Maneuvering Through the DICOM Dir Data Set


MoveFirstTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveFirstTag ();
Overview | Refer to Working with Tags.

Remarks

Updates the CurrentTag property to the first item in the Data Element Tag Table.

The following methods will also help you navigate the Data Element Tag Table:

MoveLastTag method

MovePrevTag method

MoveNextTag method

To determine the number of entries in the Data Element Tag Table, use GetTagCount.

See Also

Elements: | MoveLastTag method, MovePrevTag method, MoveNextTag method, GetTagCount method
Topics: | Data Element Tags: Maneuvering Through the Data Element Tag Table


MoveFirstUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveFirstUID ();
Overview | Refer to Working with Unique Identifiers.

Remarks

Updates the CurrentUID property to the first item in the UID Table.

The following methods will also help you navigate the UID Table:

MoveLastUID method

MovePrevUID method

MoveNextUID method

To determine the number of entries in the UID Table, use GetUIDCount.

See Also

Elements: | MoveLastUID method, MovePrevUID method, MoveNextUID method, GetUIDCount method
Topics: | Unique Identifiers: Maneuvering Through the UID Table


MoveFirstVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveFirstVR ();
Overview | Refer to Working with Value Representations.

Remarks

Updates the CurrentVR property to the first item in the Value Representation Table.

The following methods will also help you navigate the Value Representation Table:

MoveLastVR method

MovePrevVR method

MoveNextVR method

To determine the number of entries in the Value Representation Table, use GetVRCount.

See Also

Elements: | MoveLastVR method, MovePrevVR method, MoveNextVR method, GetVRCount method
Topics: | Value Representations: Maneuvering Through the Value Representation Table


MoveLastCodedConcept method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL MoveLastCodedConcept();
Overview | Refer to Working with Context Groups.

Remarks

The MoveLastCodedConcept method updates the CurrentCodedConcept property with the last Coded Concept in the Context Group specified by the CurrentContextGroup property.

Along with this method, the following methods can be used to maneuver through the Coded Concepts of a Context Group in the Context Group Table:

MoveFirstCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

You can also use the GetCodedConceptCount method and the FindIndexCodedConcept method to enumerate the Coded Concepts.

The Context Group to which a Coded Concept belongs can be obtained using the MoveCodedConceptGroup method.

See Also

Elements: | CurrentCodedConcept property, CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveFirstCodedConcept method, MoveNextCodedConcept method, MovePrevCodedConcept method, GetCodedConceptCount method, FindIndexCodedConcept method, MoveCodedConceptGroup method, SetCodedConceptCodeMeaning method, DeleteCodedConcept method, MoveLastContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MoveLastContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL MoveLastContextGroup();
Overview | Refer to Working with Context Groups.

Remarks

The MoveLastContextGroup method updates the CurrentContextGroup property with the last Context Group in the Context Group Table.

Use the LoadContextGroup method and the InsertContextGroup method to add Context Groups to the Context Group Table.

Along with this method, use the following methods to maneuver through the Context Groups in the Context Group Table:

MoveFirstContextGroup method

MoveNextContextGroup method

MovePrevContextGroup method

You can also use the GetContextGroupCount method and the FindIndexContextGroup method to enumerate the Context Groups in the table.

Use the following methods to investigate the Coded Concepts of a Context Group:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

GetCodedConceptCount method

FindIndexCodedConcept method

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveFirstContextGroup method, MoveNextContextGroup method, MovePrevContextGroup method, GetContextGroupCount method, FindIndexContextGroup method, FindContextGroup method, MoveLastCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MoveLastElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveLastElement ( BOOL bTree );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property with the last item in the Data Set. The result depends on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the last item on the same level and with the same parent as the item specified in the CurrentElement property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | Item 5
Item 6 | Item 7
NULL | Item 2

If the IOD Structure is evaluated as a list, the CurrentElement property is updated with the last item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
NULL | Item 30
Item 12 | Item 30
Item 14 | Item 30
Item 22 | Item 30
Item 25 | Item 30

The following methods will also help you navigate the Data Set as either a tree or a list:

MoveFirstElement method

MovePrevElement method

MoveNextElement method

If you evaluate the Data Set as a tree, you can also use the following methods to navigate the tree:

MoveRootElement method

MoveParentElement method

MoveChildElement method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxElement method examples.

See Also

Elements: | MoveFirstElement method, MovePrevElement method, MoveNextElement method, MoveRootElement method, MoveParentElement method, MoveChildElement method
Topics: | Data Sets: Maneuvering Through a Data Set


MoveLastIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveLastIOD ( BOOL bTree);
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property with the last item in the IOD Structure. The result depends on whether the IOD Structure is evaluated as a tree or a list.

If the IOD Structure is evaluated as a tree structure, this method updates the CurrentIOD property with the last item on the same level and with the same parent as the item specified in the CurrentIOD property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | Item 5
Item 6 | Item 7
NULL | Item 2

If the IOD Structure is evaluated as a list, the CurrentIOD property is updated with the last item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the IOD Structure is evaluated as a list.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
NULL | Item 30
Item 12 | Item 30
Item 14 | Item 30
Item 22 | Item 30
Item 25 | Item 30

The following methods will also help you navigate the IOD Structure as either a tree or a list:

MoveFirstIOD method

MovePrevIOD method

MoveNextIOD method

If you evaluate the IOD Structure as a tree, you can also use the following methods to navigate the tree:

MoveRootIOD method

MoveParentIOD method

MoveChildIOD method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxIOD methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxIOD method examples.

See Also

Elements: | MoveFirstIOD method, MovePrevIOD method, MoveNextIOD method, MoveRootIOD method, MoveParentIOD method, MoveChildIOD method
Topics: | Information Object Definitions: Maneuvering Through the IOD Table


MoveLastKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveLastKey (BOOL bTree);
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property with the last key element in the DICOM Dir Data Set. The result depends on whether the Data Set is evaluated as a tree or a list.

If the DICOM Dir Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the last key element on the same level and with the same parent as the key element specified in the CurrentElement property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | Item 5
Item 6 | Item 7
NULL | Item 2

If the DICOM Dir Data Set is evaluated as a list, the CurrentElement property is updated with the last key element in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
NULL | Item 30
Item 12 | Item 30
Item 14 | Item 30
Item 22 | Item 30
Item 25 | Item 30

The following methods will also help you navigate the DICOM Dir Data Set as either a tree or a list:

MoveFirstKey method

MovePrevKey method

MoveNextKey method

If you evaluate the DICOM Dir Data Set as a tree, you can also use the following methods to navigate the tree:

MoveRootKey method

MoveParentKey method

MoveChildKey method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully.

See Also

Elements: | MoveFirstKey method, MovePrevKey method, MoveNextKey method, MoveRootKey method, MoveParentKey method, MoveChildKey method
Topics: | Key Elements: Maneuvering Through the DICOM Dir Data Set


MoveLastTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveLastTag ();
Overview | Refer to Working with Tags.

Remarks

Updates the CurrentTag property to the last item in the Data Tag Element Table.

The following methods will also help you navigate the Data Element Tag Table:

MoveFirstTag method

MovePrevTag method

MoveNextTag method

To determine the number of entries in the Data Tag Element Table, use GetTagCount.

See Also

Elements: | MoveFirstTag method, MovePrevTag method, MoveNextTag method, GetTagCount method
Topics: | Data Element Tags: Maneuvering Through the Data Element Tag Table


MoveLastUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveLastUID ();
Overview | Refer to Working with Unique Identifiers.

Remarks

Updates the CurrentUID property to the last item in the UID Table.

The following methods will also help you navigate the UID Table:

MoveFirstUID method

MovePrevUID method

MoveNextUID method

To determine the number of entries in the UID Table, use GetUIDCount.

See Also

Elements: | MoveFirstUID method, MovePrevUID method, MoveNextUID method, GetUIDCount method
Topics: | Unique Identifiers: Maneuvering Through the UID Table


MoveLastVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveLastVR ();
Overview | Refer to Working with Value Representations.

Remarks

Updates the CurrentVR property to the last item in the Value Representation Table.

The following methods will also help you navigate the Value Representation Table:

MoveFirstVR method

MovePrevVR method

MoveNextVR method

To determine the number of entries in the Value Representation Table, use GetVRCount.

See Also

Elements: | MoveFirstVR method, MovePrevVR method, MoveNextVR method, GetVRCount method
Topics: | Value Representations: Maneuvering Through the Value Representation Table


MoveNextCodedConcept method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL MoveNextCodedConcept();
Overview | Refer to Working with Context Groups.

Remarks

The MoveNextCodedConcept method updates the CurrentCodedConcept property with the Coded Concept that immediately follows the Concept specified by the CurrentCodedConcept property (in the same Context Group).

Along with this method, the following methods can be used to maneuver through the Coded Concepts of a Context Group in the Context Group Table:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MovePrevCodedConcept method

You can also use the GetCodedConceptCount method and the FindIndexCodedConcept method to enumerate the Coded Concepts.

The Context Group to which a Coded Concept belongs can be obtained using the MoveCodedConceptGroup method.

See Also

Elements: | CurrentCodedConcept property, CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveFirstCodedConcept method, MoveLastCodedConcept method, MovePrevCodedConcept method, GetCodedConceptCount method, FindIndexCodedConcept method, MoveCodedConceptGroup method, SetCodedConceptCodeMeaning method, DeleteCodedConcept method, MoveNextContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MoveNextContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL MoveNextContextGroup();
Overview | Refer to Working with Context Groups.

Remarks

The MoveNextContextGroup method updates the CurrentContextGroup property with the Context Group in the Context Group Table that immediately follows the Context Group specified by the CurrentContextGroup property.

Along with this method, the following methods can be used to maneuver through the Context Groups in the Context Group Table:

MoveFirstContextGroup method

MoveLastContextGroup method

MovePrevContextGroup method

You can also use the GetContextGroupCount method and the FindIndexContextGroup method to enumerate the Context Groups in the table.

Use the following methods to investigate the Coded Concepts of a Context Group:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

GetCodedConceptCount method

FindIndexCodedConcept method

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveFirstContextGroup method, MoveLastContextGroup method, MovePrevContextGroup method, GetContextGroupCount method, FindIndexContextGroup method, FindContextGroup method, MoveNextCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MoveNextElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveNextElement ( BOOL bTree );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property with the item in the Data Set that immediately follows the item specified in the CurrentElement property. The result depends on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the next item on the same level and with the same parent as the item in the CurrentElement property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | NULL
Item 6 | Item 7

If the Data Set is evaluated as a list, the CurrentElement property is updated with the next item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 14 | Item 15
Item 4 | Item 5
Item 8 | Item 9
Item 19 | Item 20
Item 27 | Item 28
Item 30 | NULL

The following methods will also help you navigate the Data Set as either a tree or a list:

MoveFirstElement method

MovePrevElement method

MoveLastElement method

If you evaluate the IOD Structure as a tree, you can also use the following methods to navigate the tree:

MoveRootElement method

MoveParentElement method

MoveChildElement method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxElement method examples.

See Also

Elements: | MoveFirstElement method, MovePrevElement method, MoveLastElement method, MoveRootElement method, MoveParentElement method, MoveChildElement method
Topics: | Data Sets: Maneuvering Through a Data Set


MoveNextGraphicAnnItem method (ILEADDicomDS)

MoveNextGraphicAnnItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short MoveNextGraphicAnnItem();
Overview | Refer to Working with DICOM Annotations

Remarks

The MoveNextGraphicAnnItem method updates the CurrentElement property with the Item under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module" that immediately follows the Item specified in the CurrentElement property.

Use this method along with the FindFirstGraphicAnnItem method to enumerate all the Items under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

See Also

Elements: | FindFirstGraphicAnnItem method, CreateGraphicAnnItem method, GetLayerGraphicObjectCount method, RemoveLayerGraphicObjects method, GetLayerTextObjectCount method, RemoveLayerTextObjects method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


MoveNextIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveNextIOD ( BOOL bTree );
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property with the item in the IOD Structure that immediately follows the item specified in the CurrentIOD property. The result depends on whether the IOD Structure is evaluated as a tree or a list.

If the IOD Structure is evaluated as a tree structure, this method updates the CurrentIOD property with the next item on the same level and with the same parent as the item in the CurrentIOD property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | NULL
Item 6 | Item 7

If the IOD Structure is evaluated as a list, the CurrentIOD property is updated with the next item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the IOD Structure is evaluated as a list.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
Item 14 | Item 15
Item 4 | Item 5
Item 8 | Item 9
Item 19 | Item 20
Item 27 | Item 28
Item 30 | NULL

The following methods will also help you navigate the IOD Structure as either a tree or a list:

MoveFirstIOD method

MovePrevIOD method

MoveLastIOD method

If you evaluate the IOD Structure as a tree, you can also use the following methods to navigate the tree:

MoveRootIOD method

MoveParentIOD method

MoveChildIOD method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxIOD methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxIOD method examples.

See Also

Elements: | MoveFirstIOD method, MovePrevIOD method, MoveLastIOD method, MoveRootIOD method, MoveParentIOD method, MoveChildIOD method
Topics: | Information Object Definitions: Maneuvering Through the IOD Table


MoveNextKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveNextKey (BOOL bTree);
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property with the key element in the Data Set that immediately follows the key element specified in the CurrentElement property. The result depends on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the next key element on the same level and with the same parent as the key element in the CurrentElement property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | NULL
Item 6 | Item 7

If the Data Set is evaluated as a list, the CurrentElement property is updated with the next item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 14 | Item 15
Item 4 | Item 5
Item 8 | Item 9
Item 19 | Item 20
Item 27 | Item 28
Item 30 | NULL

The following methods will also help you navigate the DICOM Dir Data Set as either a tree or a list:

MoveFirstKey method

MovePrevKey method

MoveLastKey method

If you evaluate the Data Set as a tree, you can also use the following methods to navigate the tree:

MoveRootKey method

MoveParentKey method

MoveChildKey method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully.

See Also

Elements: | MoveFirstKey method, MovePrevKey method, MoveLastKey method, MoveRootKey method, MoveParentKey method, MoveChildKey method
Topics: | Key Elements: Maneuvering Through the DICOM Dir Data Set


MoveNextPresStateRefSeriesItem method (ILEADDicomDS)

MoveNextPresStateRefSeriesItem method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short MoveNextPresStateRefSeriesItem();
Overview | Refer to Working with DICOM Annotations

Remarks

The MoveNextPresStateRefSeriesItem method updates the CurrentElement property with the Item under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module" that immediately follows the Item specified in the CurrentElement property.

Use this method along with the FindFirstPresStateRefSeriesItem method to enumerate all the Items under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module".

See Also

Elements: | FindFirstPresStateRefSeriesItem method, GetPresStateImageRefCount method, GetPresStateImageRefInstanceUID method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


MoveNextTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveNextTag ();
Overview | Refer to Working with Tags.

Remarks

Updates the CurrentTag property to the item in the Data Element Tag Table that immediately follows the item specified by the CurrentTag property.

The following methods will also help you navigate the Data Element Tag Table:

MoveFirstTag method

MoveLastTag method

MovePrevTag method

To determine the number of entries in the Data Element Tag Table, use GetTagCount.

See Also

Elements: | MoveLastTag method, MoveFirstTag method, MovePrevTag method, GetTagCount method
Topics: | Data Element Tags: Maneuvering Through the Data Element Tag Table


MoveNextUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveNextUID ();
Overview | Refer to Working with Unique Identifiers.

Remarks

Updates the CurrentUID property to the item in the UID Table that immediately follows the item specified by the CurrentUID property.

The following methods will also help you navigate the UID Table:

MoveFirstUID method

MoveLastUID method

MovePrevUID method

To determine the number of entries in the UID Table, use GetUIDCount.

See Also

Elements: | MoveLastUID method, MoveFirstUID method, MovePrevUID method, GetUIDCount method
Topics: | Unique Identifiers: Maneuvering Through the UID Table


MoveNextVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveNextVR ();
Overview | Refer to Working with Value Representations.

Remarks

Updates the CurrentVR property to the item in the Value Representation Table that immediately follows the item specified by the CurrentVR property.

The following methods will also help you navigate the Value Representation Table:

MoveFirstVR method

MoveLastVR method

MovePrevVR method

To determine the number of entries in the Value Representation Table, use GetVRCount method.

See Also

Elements: | MoveLastVR method, MoveFirstVR method, MovePrevVR method, GetVRCount method
Topics: | Value Representations: Maneuvering Through the Value Representation Table


MoveParentElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveParentElement ();
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property with the parent of the item specified in the CurrentElement property.

This method requires that the Data Set is evaluated as a tree structure.

The parent is the ancestor one level higher than the specified item. If the specified item is a Level 0 item, this method will set the CurrentElement property to 0. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | NULL
Item 2 | Item 3
Item 4 | Item3
Item 5 | Item 6

The following methods will also help you navigate the Data Set:

MoveFirstElement method

MoveLastElement method

MoveNextElement method

MoveRootElement method

MoveChildElement method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxElement method examples.

See Also

Elements: | MoveFirstElement method, MoveLastElement method, MoveNextElement method, MovePrevElement method, MoveRootElement method, MoveChildElement method
Topics: | Data Sets: Maneuvering Through a Data Set


MoveParentIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveParentIOD ();
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property with the parent of the item specified in the CurrentIOD property.

This method requires that the IOD Structure is evaluated as a tree structure.

The parent is the ancestor one level higher than the specified item. If the specified item is a Level 0 item, this method will set the CurrentIOD property to 0. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
Item 1 | NULL
Item 2 | Item 3
Item 4 | Item3
Item 5 | Item 6

The following methods will also help you navigate the IOD Structure:

MoveFirstIOD method

MoveLastIOD method

MoveNextIOD method

MoveRootIOD method

MoveChildIOD method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxIOD methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxIOD method examples.

See Also

Elements: | MoveFirstIOD method, MoveLastIOD method, MoveNextIOD method, MovePrevIOD method, MoveRootIOD method, MoveChildIOD method
Topics: | Information Object Definitions: Maneuvering Through the IOD Table


MoveParentKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveParentKey ();
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property with the parent of the key element specified in the CurrentElement property.

This method requires that the DICOM Dir Data Set is evaluated as a tree structure.

The parent is the ancestor one level higher than the specified key element. If the specified item is a Level 0 key element, this method will set the CurrentElement property to 0. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | NULL
Item 2 | Item 3
Item 4 | Item3
Item 5 | Item 6

The following methods will also help you navigate the Data Set:

MoveFirstKey method

MoveLastKey method

MoveNextKey method

MoveRootKey method

MoveChildKey method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully.

See Also

Elements: | MoveFirstKey method, MoveLastKey method, MoveNextKey method, MovePrevKey method, MoveRootKey method, MoveChildKey method
Topics: | Key Elements: Maneuvering Through the DICOM Dir Data Set


MovePrevCodedConcept method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL MovePrevCodedConcept();
Overview | Refer to Working with Context Groups.

Remarks

The MovePrevCodedConcept method updates the CurrentCodedConcept property with the Coded Concept that immediately precedes the Concept specified by the CurrentCodedConcept property (in the same Context Group).

Along with this method, the following methods can be used to maneuver through the Coded Concepts of a Context Group in the Context Group Table:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

You can also use the GetCodedConceptCount method and the FindIndexCodedConcept method to enumerate the Coded Concepts.

The Context Group to which a Coded Concept belongs can be obtained using the MoveCodedConceptGroup method.

See Also

Elements: | CurrentCodedConcept property, CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveFirstCodedConcept method, MoveLastCodedConcept method, MoveNextCodedConcept method, GetCodedConceptCount method, FindIndexCodedConcept method, MoveCodedConceptGroup method, SetCodedConceptCodeMeaning method, DeleteCodedConcept method, MovePrevContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MovePrevContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL MovePrevContextGroup();
Overview | Refer to Working with Context Groups.

Remarks

The MovePrevContextGroup method updates the CurrentContextGroup property with the Context Group in the Context Group Table that immediately precedes the Context Group specified by the CurrentContextGroup property.

Along with this method, the following methods can be used to maneuver through the Context Groups in the Context Group Table:

MoveFirstContextGroup method

MoveLastContextGroup method

MoveNextContextGroup method

You can also use the GetContextGroupCount method and the FindIndexContextGroup method to enumerate the Context Groups in the table.

Use the following methods to investigate the Coded Concepts of a Context Group:

MoveFirstCodedConcept method

MoveLastCodedConcept method

MoveNextCodedConcept method

MovePrevCodedConcept method

GetCodedConceptCount method

FindIndexCodedConcept method

See Also

Elements: | CurrentContextGroup property, LoadContextGroup method, InsertContextGroup method, MoveFirstContextGroup method, MoveLastContextGroup method, MoveNextContextGroup method, GetContextGroupCount method, FindIndexContextGroup method, FindContextGroup method, MovePrevCodedConcept method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


MovePrevElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MovePrevElement ( BOOL bTree );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property with the item in the Data Set that immediately precedes the item specified in the CurrentElement property. The result depends on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the previous item on the same level and with the same parent as the item specified in the CurrentElement property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | NULL
Item 6 | Item 7

If the Data Set is evaluated as a list, the CurrentElement property is updated with the previous item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | NULL
Item 15 | Item 14
Item 5 | Item 4
Item 9 | Item 8
Item 22 | Item 21
Item 25 | Item 24

The following methods will also help you navigate the Data Set as either a tree or a list:

MoveFirstElement method

MoveLastElement method

MoveNextElement method

If you evaluate the IOD Structure as a tree, you can also use the following methods to navigate the tree:

MoveRootElement method

MoveParentElement method

MoveChildElement method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxElement method examples.

See Also

Elements: | MoveFirstElement method, MoveLastElement method, MoveNextElement method, MoveRootElement method, MoveParentElement method, MoveChildElement method
Topics: | Data Sets: Maneuvering Through a Data Set


MovePrevIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MovePrevIOD ( BOOL bTree );
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property with the item in the IOD Structure that immediately precedes the item specified in the CurrentIOD property. The result depends on whether the IOD Structure is evaluated as a tree or a list.

If the IOD Structure is evaluated as a tree structure, this method updates the CurrentIOD property with the previous item on the same level and with the same parent as the item specified in the CurrentIOD property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | NULL
Item 6 | Item 7

If the IOD Structure is evaluated as a list, the CurrentIOD property is updated with the previous item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the IOD Structure is evaluated as a list.

If the CurrentIOD property contains: | The CurrentIOD property will be updated with:
Item 1 | NULL
Item 15 | Item 14
Item 5 | Item 4
Item 9 | Item 8
Item 22 | Item 21
Item 25 | Item 24

The following methods will also help you navigate the IOD Structure as either a tree or a list:

MoveFirstIOD method

MoveLastIOD method

MoveNextIOD method

If you evaluate the IOD Structure as a tree, you can also use the following methods to navigate the tree:

MoveRootIOD method

MoveParentIOD method

MoveChildIOD method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxIOD methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxIOD method examples.

See Also

Elements: | MoveFirstIOD method, MoveLastIOD method, MoveNextIOD method, MoveRootIOD method, MoveParentIOD method, MoveChildIOD method
Topics: | Information Object Definitions: Maneuvering Through the IOD Table


MovePrevKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MovePrevKey (BOOL bTree);
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property with the key element in the DICOM Dir Data Set that immediately precedes the key element specified in the CurrentElement property. The result depends on whether the Data Set is evaluated as a tree or a list.

If the DICOM Dir Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the previous key element on the same level and with the same parent as the key element specified in the CurrentElement property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | Item 2
Item 3 | Item 4
Item 5 | NULL
Item 6 | Item 7

If the Data Set is evaluated as a list, the CurrentElement property is updated with the previous key element in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

If the CurrentElement property contains: | The CurrentElement property will be updated with:
Item 1 | NULL
Item 15 | Item 14
Item 5 | Item 4
Item 9 | Item 8
Item 22 | Item 21
Item 25 | Item 24

The following methods will also help you navigate the DICOM Dir Data Set as either a tree or a list:

MoveFirstKey method

MoveLastKey method

MoveNextKey method

If you evaluate the Data Set as a tree, you can also use the following methods to navigate the tree:

MoveRootKey method

MoveParentKey method

MoveChildKey method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully.

See Also

Elements: | MoveFirstKey method, MoveLastKey method, MoveNextKey method, MoveRootKey method, MoveParentKey method, MoveChildKey method
Topics: | Key Elements: Maneuvering Through the DICOM Dir Data Set


MovePrevTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MovePrevTag ();
Overview | Refer to Working with Tags.

Remarks

Updates the CurrentTag property to the item in the Data Element Tag Table that immediately precedes the item specified by the CurrentTag property.

The following methods will also help you navigate the Data Element Tag Table:

MoveFirstTag method

MoveLastTag method

MoveNextTag method

To determine the number of entries in the Data Element Tag Table, use GetTagCount.

See Also

Elements: | MoveLastTag method, MoveFirstTag method, MoveNextTag method, GetTagCount method
Topics: | Data Element Tags: Maneuvering Through the Data Element Tag Table


MovePrevUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MovePrevUID ();
Overview | Refer to Working with Unique Identifiers.

Remarks

Updates the CurrentUID property to the item in the UID Table that immediately precedes the item specified by the CurrentUID property.

The following methods will also help you navigate the UID Table:

MoveFirstUID method

MoveLastUID method

MoveNextUID method

To determine the number of entries in the UID Table, use GetUIDCount.

See Also

Elements: | MoveLastUID method, MoveFirstUID method, MoveNextUID method, GetUIDCount method
Topics: | Unique Identifiers: Maneuvering Through the UID Table


MovePrevVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MovePrevVR ();
Overview | Refer to Working with Value Representations.

Remarks

Updates the CurrentVR property to the item in the Value Representation Table that immediately precedes the item specified by the CurrentVR property.

The following methods will also help you navigate the Value Representation Table:

MoveFirstVR method

MoveLastVR method

MoveNextVR method

To determine the number of entries in the Value Representation Table, use GetVRCount method.

See Also

Elements: | MoveLastVR method, MoveFirstVR method, MoveNextVR method, GetVRCount method
Topics: | Value Representations: Maneuvering Through the Value Representation Table


MoveRootElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveRootElement ();
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property to the root of the item specified in the CurrentElement property.

The root is the Level 0 ancestor of the item specified in the CurrentElement property. If the CurrentElement property specifies an item on Level 0, the CurrentElement property will be updated with the same item . Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with :
Item 1 | Item 2
Item 3 | Item 2
Item 4 | Item4
Item 5 | Item 6

The following methods will also help you navigate the Data Set:

MoveFirstElement method

MoveLastElement method

MoveNextElement method

MoveParentElement method

MoveChildElement method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxElement method examples.

See Also

Elements: | MoveFirstElement method, MoveLastElement method, MoveNextElement method, MovePrevElement method, MoveParentElement method, MoveChildElement method
Topics: | Data Sets: Maneuvering Through a Data Set


MoveRootIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveRootIOD ();
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property to the root of the item specified in the CurrentIOD property.

The root is the Level 0 ancestor of the item specified in the CurrentIOD property. If the CurrentIOD property specifies an item on Level 0, the CurrentIOD property will be updated with the same item . Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentIOD property contains: | The CurrentIOD property willl be updated with :
Item 1 | Item 2
Item 3 | Item 2
Item 4 | Item4
Item 5 | Item 6

The following methods will also help you navigate the IOD Structure:

MoveFirstIOD method

MoveLastIOD method

MoveNextIOD method

MoveParentIOD method

MoveChildIOD method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxIOD methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxIOD method examples.

See Also

Elements: | MoveFirstIOD method, MoveLastIOD method, MoveNextIOD method, MovePrevIOD method, MoveParentIOD method, MoveChildIOD method
Topics: | Information Object Definitions: Maneuvering Through the IOD Table


MoveRootKey method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveRootKey ();
Overview | Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property to the root of the key element specified in the CurrentElement property.

The root is the Level 0 ancestor of the key element specified in the CurrentElement property. If the CurrentElement property specifies a key element on Level 0, the CurrentElement property will be updated with the same key element. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

If the CurrentElement property contains: | The CurrentElement property will be updated with :
Item 1 | Item 2
Item 3 | Item 2
Item 4 | Item4
Item 5 | Item 6

The following methods will also help you navigate the Data Set:

MoveFirstKey method

MoveLastKey method

MoveNextKey method

MoveParentKey method

MoveChildKey method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully.

See Also

Elements: | MoveFirstKey method, MoveLastKey method, MoveNextKey method, MovePrevKey method, MoveParentKey method, MoveChildKey method
Topics: | Key Elements: Maneuvering Through the DICOM Dir Data Set


MoveSignature method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveSignature(long lIndex);
Overview | Refer to Working with Digital Signatures.

Remarks

The MoveSignature method updates the CurrentElement property with the Digital Signatures Sequence Item that corresponds to the Digital Signature at the specified index. If the required Digital Signature exists in the main Data Set, the CurrentElement property must be set to 0 before calling the method. Similarly, if the required Digital Signature exists in an Item of a Sequence of Items in the Data Set, the CurrentElement property must be set to that Item before calling the method.

For each Digital Signature in the main Data Set or in an Item of a Sequence of Items, there should be a corresponding Item under the Digital Signatures Sequence (FFFA,FFFA) located in the main Data Set or in the Item. This method can be used to update the CurrentElement property with that Digital Signatures Sequence Item.

Along with this method, the GetSignaturesCount method can be used to enumerate the Digital Signatures in the main Data Set or in an Item of a Sequence of Items. Once the CurrentElement property is updated with the Digital Signatures Sequence Item, the following methods can be used to verify, delete, or get information about the Digital Signature:

VerifySignature method

DeleteSignature method

GetSignatureUID method

GetSignatureDateTime method

GetSignedElementsCount method

MoveSignedElement method

GetMacTransferSyntax method

GetMacAlgorithm method

SaveCertificate method

You can also use the FindSignature method to search the whole Data Set for a specific Digital Signature.

See Also

Elements: | GetSignaturesCount method, FindSignature method, VerifySignature method, DeleteSignature method, GetSignatureUID method, GetSignatureDateTime method, GetSignedElementsCount method, MoveSignedElement method, GetMacTransferSyntax method, GetMacAlgorithm method, SaveCertificate method, CreateSignature method, CurrentElement property
Topics: | Data Sets: Digital Signatures


MoveSignedElement method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short MoveSignedElement(long lIndex);
Overview | Refer to Working with Digital Signatures.

Remarks

The MoveSignedElement method updates the CurrentElement property with the signed Data Element, at the specified index, that is covered by the Digital Signature specified by the CurrentElement property. The CurrentElement property must be updated with the corresponding Digital Signatures Sequence Item before calling the method.

The Digital Signatures Sequence Item of a Digital Signature should reference an Item under the MAC Parameters Sequence associated with the Digital Signatures Sequence. The Data Elements Signed (0400,0020) under the referenced MAC Parameters Sequence Item specifies the Tags of the Data Elements covered by the Digital Signature. These Data Elements should be located at the same level as the MAC Parameters Sequence and the Digital Signatures Sequence.

The GetSignedElementsCount method returns the number of signed Data Elements as specified by the Data Elements Signed (0400,0020). The MoveSignedElement method searches the level at which the Message Authentication Code (MAC) Parameters Sequence appears for the Data Element with the Tag determined by the passed index and updates the CurrentElement property with the Data Element if it does exist; if it doesn’t exist, the method returns DICOM_ERROR_PARAMETER.

Note: In addition to the Data Elements specified by the Data Elements Signed (0400,0020), certain Data Elements under the Digital Signatures Sequence Item are always covered by the Digital Signature.

The following methods can also be used to get information about the Digital Signature:

GetSignatureUID method

GetSignatureDateTime method

GetMacTransferSyntax method

GetMacAlgorithm method

SaveCertificate method

See Also

Elements: | GetSignedElementsCount method, MoveSignature method, FindSignature method, GetSignatureUID method, GetSignatureDateTime method, GetMacTransferSyntax method, GetMacAlgorithm method, SaveCertificate method, CurrentElement property
Topics: | Data Sets: Digital Signatures


RemoveAllGraphicObjects method (ILEADDicomDS)

RemoveAllGraphicObjects method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveAllGraphicObjects();
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveAllGraphicObjects method removes all the graphic annotation objects defined by one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

This method and the RemoveLayerGraphicObjects method perform the same function.

See Also

Elements: | RemoveGraphicObject method, CreateGraphicObject method, RemoveAllTextObjects method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, RemoveLayerGraphicObjects method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


RemoveAllLayerImageRefs method (ILEADDicomDS)

RemoveAllLayerImageRefs method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveAllLayerImageRefs();
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveAllLayerImageRefs method removes all the Items of the "Referenced Image Sequence" (0008,1140) in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

See Also

Elements: | RemoveLayerImageRef method, RemoveAllLayersImageRefs method, AddLayerImageRef method, GetLayerImageRefCount method, RemoveAllPresStateImageRefs method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Layers


RemoveAllLayers method (ILEADDicomDS)

RemoveAllLayers method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveAllLayers(VARIANT_BOOL bRemoveAnnSeqItems);
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveAllLayers method removes all the Items under the "Graphic Layer Sequence" (0070,0060). If the parameter bRemoveAnnSeqItems is set, the method will also remove all the Items under the "Graphic Annotation Sequence" (0070,0001), which correspond to the layers.

See Also

Elements: | RemoveLayer method, CreateLayer method .
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


RemoveAllLayersImageRefs method (ILEADDicomDS)

RemoveAllLayersImageRefs method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveAllLayersImageRefs();
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveAllLayersImageRefs method removes all the Items of all the "Referenced Image Sequence(s)" (0008,1140) in all the Items of the "Graphic Annotation Sequence" (0070,0001) under the "Graphic Annotation Module".

See Also

Elements: | RemoveLayerImageRef method, RemoveAllLayerImageRefs method, AddLayerImageRef method, GetLayerImageRefCount method, RemoveAllPresStateImageRefs method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Layers


RemoveAllPresStateImageRefs method (ILEADDicomDS)

RemoveAllPresStateImageRefs method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveAllPresStateImageRefs();
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveAllPresStateImageRefs method removes all the "Referenced Image Sequence(s)" (0008,1140) which belong to the "Referenced Series Sequence" (0008,1115) under the "Presentation State Module".

See Also

Elements: | AddPresStateImageRef method, RemovePresStateImageRef method, GetPresStateImageRefInstanceUID method, GetPresStateImageRefCount method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


RemoveAllTextObjects method (ILEADDicomDS)

RemoveAllTextObjects method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveAllTextObjects();
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveAllTextObjects method removes all the text annotation objects defined by one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

This method and the RemoveLayerTextObjects method perform the same function.

See Also

Elements: | RemoveTextObject method, CreateTextObject method, RemoveAllGraphicObjects method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, RemoveLayerTextObjects method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Text Objects


RemoveGraphicObject method (ILEADDicomDS)

RemoveGraphicObject method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveGraphicObject(long lGraphicObjectIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveGraphicObject method removes a graphic annotation object that is defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | GetGraphicObjectCount method, RemoveAllGraphicObjects method, CreateGraphicObject method, RemoveTextObject method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


RemoveLayer method(ILEADDicomDS)

RemoveLayer method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveLayer(VARIANT LayerNameOrIndex, VARIANT_BOOL bRemoveAnnSeqItems);
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveLayer method removes the Item under the "Graphic Layer Sequence" (0070,0060), which corresponds to the layer specified. If the parameter bRemoveAnnSeqItems is set, the method will also remove all the Items under the "Graphic Annotation Sequence" (0070,0001), which correspond to the layer being removed.

See Also

Elements: | LayerCount property, RemoveAllLayers method, CreateLayer method, GetLayerAttributes method, GetLayerIndex method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


RemoveLayerGraphicObjects method (ILEADDicomDS)

RemoveLayerGraphicObjects method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveLayerGraphicObjects();
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveLayerGraphicObjects method removes all the graphic annotation objects defined by one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

This method and the RemoveAllGraphicObjects method perform the same function.

See Also

Elements: | GetLayerGraphicObjectCount method, CreateGraphicAnnItem method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, RemoveLayerTextObjects method, RemoveAllGraphicObjects method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


RemoveLayerImageRef method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveLayerImageRef(BSTR bstrSOPInstanceUID);
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveLayerImageRef method removes the reference to the specified Image SOP Instance by removing the corresponding Item under the "Referenced Image Sequence" (0008,1140) in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | RemoveAllLayerImageRefs method, RemoveAllLayersImageRefs method, AddLayerImageRef method, RemovePresStateImageRef method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Layers


RemoveLayerTextObjects method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveLayerTextObjects();
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveLayerTextObjects method removes all the text annotation objects defined by one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

This method and the RemoveAllTextObjects method perform the same function.

See Also

Elements: | GetLayerTextObjectCount method, CreateGraphicAnnItem method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method, RemoveLayerGraphicObjects method, RemoveAllTextObjects method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


RemovePresStateImageRef method(ILEADDicomDS)

RemovePresStateImageRef method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemovePresStateImageRef(BSTR bstrSOPInstanceUID);
Overview | Refer to Working with DICOM Annotations

Remarks

The RemovePresStateImageRef method removes the reference to an Image SOP Instance by removing the corresponding Item under the "Referenced Image Sequence" in the "Presentation State Module".

See Also

Elements: | AddPresStateImageRef method, RemoveAllPresStateImageRefs method, GetPresStateImageRefInstanceUID method, GetPresStateImageRefCount method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


RemoveTextObject method (ILEADDicomDS)

RemoveTextObject method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short RemoveTextObject(long lTextObjectIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The RemoveTextObject method removes a text annotation object that is defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | GetTextObjectCount method, RemoveAllTextObjects method, CreateTextObject method, RemoveGraphicObject method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Text Objects


ResetContextGroup method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ResetContextGroup();
Overview | Refer to Working with Context Groups.

Remarks

The ResetContextGroup method deletes all the Context Groups from the Context Group Table.

Use the LoadContextGroup method and the InsertContextGroup method to add Context Groups to the Context Group Table. You can use the ResetContextGroup method to delete all the Context Groups in the table. You can also use the DeleteContextGroup method to delete a single Context Group from the table.

See Also

Elements: | LoadContextGroup method, InsertContextGroup method, DeleteContextGroup method, DefaultContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


ResetDS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ResetDS ();
Overview | Refer to Working with Data Sets.

Remarks

Removes all items from the Data Set. Sets the CurrentElement property to 0.

This does not affect the actual file on disk.

See Also

Elements: | DeleteElement method, DeleteModule method
Topics: | Data Sets: Inserting and Deleting Data Set Members


ResetIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ResetIOD ();
Overview | Refer to Working with Information Object Definitions.

Remarks

Removes all items from the IOD Structure. Sets the CurrentIOD property to 0.

To reset the IOD Structure to the default values, use DefaultIOD.

See Also

Elements: | DefaultIOD method, DeleteIOD method
Topics: | Information Object Definitions: Inserting and Deleting IODs


ResetTag method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ResetTag ();
Overview | Refer to Working with Tags.

Remarks

Removes all items from the Data Element Tag Table. Sets the CurrentTag property to 0.

To reset the Data Element Tag Table to the default values, use DefaultTag.

To see the default values for the Data Element Tag Table, refer to the Default Data Element Tag Table.

See Also

Elements: | DefaultTag method, DeleteTag method
Topics: | Data Element Tags: Inserting and Deleting Data Element Tags


ResetUID method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ResetUID ();
Overview | Refer to Working with Unique Identifiers.

Remarks

Removes all items from the UID Table. Sets the CurrentUID property to 0.

To reset the UID Table to the default values, use DefaultUID.

To see the default values for the UID Table, refer to the Default UID Table.

See Also

Elements: | DefaultUID method, DeleteUID method
Topics: | Unique Identifiers: Inserting and Deleting UIDs


ResetVR method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ResetVR ();
Overview | Refer to Working with Value Representations.

Remarks

Removes all items from the Value Representation Table. Sets the CurrentVR property to 0.

To reset the Value Representation Table to the default values, use DefaultVR.

To see the default values for the Value Representation Table, refer to the Default Value Representation Table.

See Also

Elements: | DefaultVR method, DeleteVR method
Topics: | Value Representations: Inserting and Deleting Value Representations


SaveCertificate method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SaveCertificate(BSTR bstrFilename, DicomCertificateFormat Format);
Overview | Refer to Working with Digital Signatures.

Remarks

The SaveCertificate method saves to a file the signer’s digital certificate associated with the Digital Signature specified by the CurrentElement property. The CurrentElement property must be updated with the corresponding Digital Signatures Sequence Item before calling the method.

The Certificate of Signer (0400,0115) under the Digital Signatures Sequence Item of a Digital Signature contains the digital certificate of the entity that produced the Digital Signature. You can use this method to save this digital certificate to a file.

The following methods can also be used to get information about the Digital Signature:

GetSignatureUID method

GetSignatureDateTime method

GetSignedElementsCount method

MoveSignedElement method

GetMacTransferSyntax method

GetMacAlgorithm method

See Also

Elements: | MoveSignature method, FindSignature method, GetSignatureUID method, GetSignatureDateTime method, GetSignedElementsCount method, MoveSignedElement method, GetMacTransferSyntax method, GetMacAlgorithm method, CurrentElement property
Topics: | Data Sets: Digital Signatures


SaveDS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SaveDS ( BSTR pszFilename, short nFlags );
Overview | Refer to Working with Data Sets.

Remarks

Saves the Data Set to the specified file.

If the Data Set was loaded from a file, the file characteristics were included from the file. If you wish to use these same characteristics, save the Data Set with nFlags set to 0.

If you wish to specify the file characteristics for saving the file, set the characteristics using the possible values listed for nFlags.

See Also

Elements: | LoadDSArray method, InitDS method, LoadDS method
Topics: | Data Sets: Creating, Initializing, Loading, and Saving Data Sets


SaveExtDS method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SaveExtDS (long hDicomDS, BSTR pszFilename, short nFlags);
Overview | Refer to

Remarks

Saves the specified DICOM Data Set to a file on disk.

Use this method to save a data set that you receive from a remote computer via a DICOM Network connection.

See Also

Elements:

NetReceiveData event


SetAgeValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetAgeValue ( long lCount );
Overview | Refer to Working with Tags.

Remarks

Sets the specified number of age values from the AgeValues property into the item specified by the CurrentElement property.

Before calling this method, set the AgeValueCount property to the number of values you wish to set, and then fill the AgeValues property with the desired values.

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

If lCount is less than 0 or greater than the AgeValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_AS. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetCharValue method, SetShortValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetStringValue method, SetBinaryValue method, SetDateValue method, SetTimeValue method, SetDateTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetBinaryValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetBinaryValue ( long lLength );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of binary values from the BinaryValues property or the BinaryValues2 property into the item specified by the CurrentElement property.

It is strongly recommended that you not use BinaryValues2 property and the BinaryValues property in the same section of code. However, if they are used in the same section of code, the order in which these properties are used is important. The last property set will control the values used when you call the SetBinaryValue method.

Before calling this method, set the BinaryValueCount property to the number of values you wish to set, and then fill the BinaryValues property with the desired values.

If lLength is less than 0 or greater than the BinaryValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

See Also

Elements: | SetCharValue method, SetShortValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetStringValue method, SetAgeValue method, SetDateValue method, SetTimeValue method, SetDateTimeValue method, BinaryValues property, BinaryValues2 property, BinaryValueCount property
Topics: | Data Sets: Getting and Setting Data Element Values


SetBitmapListValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetBitmapListValue (long lCompression, long lPhotometric, short nBitsPerPixel, short nQFactor, long lFlags);
Overview | Refer to Working with Data Sets.

Remarks

This method replaces all the images in the Pixel Data Element with the images in the BitmapList property.

Most DICOM files will only have one Data Element of type TAG_PIXEL_DATA. Therefore, in most instances the CurrentElement property can be NULL, since the method will automatically replace the images of the only Pixel Data Element in the file. If the CurrentElement property is not NULL, it must contain the Pixel Data Element itself.

If the DICOM file is CLASS_BASIC_DIRECTORY, the file may contain more than one Pixel Data Element. In this case you must specify in the CurrentElement property the Pixel Data Element in which the images will be replaced.

If you wish to replace only one image within the Pixel Data Element, you must use DeleteBitmapValue method and InsertBitmapValue method.

For a table of possible Compression, Photometric, BitsPerPixel, and Quality Factor combinations, refer to Compression Table.

For more options when using the JPEG 2000 compression, refer to the J2KOptions property.

This function will either insert, delete or update one or more of the following elements:

Tag | Name
(7FE0,0010) | Pixel Data
(0002,0010) | Transfer Syntax UID
(0028,0101) | Bits Stored
(0028,0100) | Bits Allocated
(0028,0102) | High Bit
(0028,0103) | Pixel Representation
(0028,0010) | Rows
(0028,0011) | Columns
(0028,0002) | Samples per Pixel
(0028,0006) | Planar Configuration
(0028,0004) | Photometric Interpretation
(0028,0106) | Smallest Image Pixel Value
(0028,0107) | Largest Image Pixel Value
(0028,1101) | Red Palette Color Lookup Table Descriptor
(0028,1102) | Green Palette Color Lookup Table Descriptor
(0028,1103) | Blue Palette Color Lookup Table Descriptor
(0028,1201) | Red Palette Color Lookup Table Data
(0028,1202) | Green Palette Color Lookup Table Data
(0028,1203) | Blue Palette Color Lookup Table Data
(0028,1199) | Palette Color Lookup Table UID
(0028,1052) | Rescale Intercept
(0028,1053) | Rescale Slope
(0028,1054) | Rescale Type
(0028,1221) | Segmented Red Palette Color Lookup Table Data
(0028,1222) | Segmented Green Palette Color Lookup Table Data
(0028,1223) | Segmented Blue Palette Color Lookup Table Data
(0028,3010) | VOI LUT Sequence
(0028,1050) | Window Center
(0028,1051) | Window Width
(0028,1055) | Window Center & Width Explanation
(0028,0008) | Number of Frames
(0054,0070) | Time Slot Vector

This function is indifferent to the pixel data restrictions imposed by the various DICOM IOD classes, for example this function will allow the user to insert a colored image into a "Digital X-Ray Image Storage" dataset.

This function will always insert a "Number of Frames" (0028, 0008) element and set its value.

See Also

Elements: | GetBitmapValue method, GetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method, SetBitmapValue method, DeleteBitmapValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetBitmapValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetBitmapValue (long lCompression, long lPhotometric, short nBitsPerPixel, short nQFactor, long lFlags);
Overview | Refer to Working with Data Sets.

Remarks

This method replaces all the images in the Pixel Data Element with the image in the Bitmap property.

Most DICOM files will only have one Data Element of type TAG_PIXEL_DATA. Therefore, in most instances the CurrentElement property can be NULL, since the method will automatically replace the images of the only Pixel Data Element in the file. If the CurrentElement property is not NULL, it must contain the Pixel Data Element itself.

If the DICOM file is CLASS_BASIC_DIRECTORY, the file may contain more than one Pixel Data Element. In this case you must specify in the CurrentElement property the Pixel Data Element in which the images will be replaced.

If you wish to replace only one image within the Pixel Data Element, you must use DeleteBitmapValue method and InsertBitmapValue method.

For a table of possible Compression, Photometric, BitsPerPixel, and Quality Factor combinations, refer to Compression Table.

For more options when using the JPEG 2000 compression, refer to the J2KOptions property.

This function will either insert, delete or update one or more of the following elements:

Tag | Name
(7FE0,0010) | Pixel Data
(0002,0010) | Transfer Syntax UID
(0028,0101) | Bits Stored
(0028,0100) | Bits Allocated
(0028,0102) | High Bit
(0028,0103) | Pixel Representation
(0028,0010) | Rows
(0028,0011) | Columns
(0028,0002) | Samples per Pixel
(0028,0006) | Planar Configuration
(0028,0004) | Photometric Interpretation
(0028,0106) | Smallest Image Pixel Value
(0028,0107) | Largest Image Pixel Value
(0028,1101) | Red Palette Color Lookup Table Descriptor
(0028,1102) | Green Palette Color Lookup Table Descriptor
(0028,1103) | Blue Palette Color Lookup Table Descriptor
(0028,1201) | Red Palette Color Lookup Table Data
(0028,1202) | Green Palette Color Lookup Table Data
(0028,1203) | Blue Palette Color Lookup Table Data
(0028,1199) | Palette Color Lookup Table UID
(0028,1052) | Rescale Intercept
(0028,1053) | Rescale Slope
(0028,1054) | Rescale Type
(0028,1221) | Segmented Red Palette Color Lookup Table Data
(0028,1222) | Segmented Green Palette Color Lookup Table Data
(0028,1223) | Segmented Blue Palette Color Lookup Table Data
(0028,3010) | VOI LUT Sequence
(0028,1050) | Window Center
(0028,1051) | Window Width
(0028,1055) | Window Center & Width Explanation
(0028,0008) | Number of Frames
(0054,0070) | Time Slot Vector

This function is indifferent to the pixel data restrictions imposed by the various DICOM IOD classes, for example this function will allow the user to insert a colored image into a "Digital X-Ray Image Storage" dataset.

This function will always insert a "Number of Frames" (0028, 0008) element and set its value.

See Also

Elements: | GetBitmapValue method, GetBitmapListValue method, InsertBitmapValue method, InsertBitmapListValue method, SetBitmapListValue method, DeleteBitmapValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetCharValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetCharValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of character values from the CharValues property into the item specified by the CurrentElement property.

Before calling this method, set the CharValueCount property to the number of values you wish to set, and then fill the CharValues property with the desired value(s).

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

A character has a standard size of one byte. When multiple characters are in the CharValues property, the first byte of data is the first character, the second byte of data is the second character, etc. Therefore no delimiters are needed.

If lCount is less than 0 or greater than the CharValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_OB, VR_SQ, or VR_UN. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetShortValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetStringValue method, SetAgeValue method, SetDateValue method, SetTimeValue method, SetDateTimeValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetCodedConceptCodeMeaning method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetCodedConceptCodeMeaning(BSTR bstrCodeMeaning);
Overview | Refer to Working with Context Groups.

Remarks

The SetCodedConceptCodeMeaning method sets the Code Meaning (0008,0104) of the Coded Concept specified by the CurrentCodedConcept property.

If a Context Group in the Context Group Table has a corresponding Group in the internal table maintained by LEADTOOLS, then you can use the DefaultContextGroup method to discard any changes made to the Context Group, including those made to the Code Meanings of its Coded Concepts, and to revert to the values stored in the internal table.

See Also

Elements: | CurrentCodedConcept property, InsertCodedConcept method, DeleteCodedConcept method, MoveFirstCodedConcept method, FindIndexCodedConcept method, DefaultContextGroup method
Topics: | ILEADDicomDS Interface, IDicomContextGroup Interface, IDicomCodedConcept Interface, Working with the DicomContextGroup Object, Working with the DicomCodedConcept Object, Context Identifiers


SetCommandSet method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetCommandSet (long hDicomDS);
Overview | Refer to Working with Command Sets

Remarks

Sets a Command Set to the control.

Use this method to copy a command set that you receive from another computer to a Main DICOM Control.


SetConvertValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetConvertValue (L_VOID);
Overview | Refer to Working with Data Sets.

Remarks

Sets the value(s) in the CurrentElement from strings.

Before calling this method, set the StringValueCount property to the number of values you wish to set, and then fill the StringValues property with the desired value(s). The string values that you set, will be automatically converted to the appropirate VR for the current element.

See Also

Elements:

GetConvertValue method


SetCurrentElement method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL SetCurrentElement ( long hElement );
Overview | Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property to the Data Set item identified by hElement.

You can store the hElement property of the CurrentElement property when you move to a new item, and use that to return to that item later.

See Also

Elements:

CurrentElement property


SetCurrentIOD method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL SetCurrentIOD ( long hIOD );
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the CurrentIOD property to the IOD Structure item identified by hIOD.

You can store the hIOD property of the CurrentIOD property when you move to a new item, and use that to return to that item later.


SetDateTimeValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetDateTimeValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of time values from the DateTimeValues property into the item specified by the CurrentElement property.

Before calling this method, set the DateTimeValueCount property to the number of values you wish to set, and then fill the DateTimeValues property with the desired values.

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

If lCount is less than 0 or greater than the DateTimeValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_DT. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetShortValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetStringValue method, SetAgeValue method, SetDateValue method, SetTimeValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetDateValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetDateValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of date values from the DateValues property into the item specified by the CurrentElement property.

Before calling this method, set the DateValueCount property to the number of values you wish to set, and then fill the DateValues property with the desired values.

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

If lCount is less than 0 or greater than the DateValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_DA. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetShortValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetStringValue method, SetAgeValue method, SetDateTimeValue method, SetTimeValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetDoubleValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetDoubleValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of float values from the DoubleValues property into the item specified by the CurrentElement property.

Before calling this method, set the DoubleValueCount property to the number of values you wish to set, and then fill the DoubleValues property with the desired values.

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

If lCount is less than 0 or greater than the DoubleValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_DS or VR_FD. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetShortValue method, SetLongValue method, SetFloatValue method, SetDateValue method, SetStringValue method, SetAgeValue method, SetDateTimeValue method, SetTimeValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetDSPreamble method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetDSPreamble ();
Overview | Refer to Working with Data Sets.

Remarks

Sets the preamble buffer with the value of the Preamble property. This will be used when saving the Data Set to a DICOM file.

The standard length of the preamble is 128 bytes. If the preamble buffer contains more than 128 bytes of data, only the first 128 bytes will be used.

To retrieve the contents of the Preamble, call the GetDSPreamble method.

See Also

Elements: | GetDSPreamble method, Preamble property
Topics: | Data Sets: Getting and Setting Data Set Information


SetEncryptKeyISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetEncryptKeyISCL(long hNet, long nIndex, VARIANT AuthKey);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets an encryption key at the specified index in the array.

The index of the encryption key is sent with every message sent from the sender to the receiver. Different encryption keys can be used for each message, as long as the keys of the sender and the receiver match.

See Also

Elements: | SetIndexForEncryptISCL method, SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL method
Topics: | DICOM Security: Working with ISCL


SetFloatValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetFloatValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of float values from the FloatValues property into the item specified by the CurrentElement property.

Before calling this method, set the FloatValueCount property to the number of values you wish to set, and then fill the FloatValues property with the desired values.

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

If lCount is less than 0 or greater than the FloatValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_FL. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetShortValue method, SetLongValue method, SetDoubleValue method, SetDateValue method, SetStringValue method, SetAgeValue method, SetDateTimeValue method, SetTimeValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetGraphicObjectAttributes method (ILEADDicomDS)

SetGraphicObjectAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short SetGraphicObjectAttributes(long lGraphicObjectIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The SetGraphicObjectAttributes method sets the attributes of a graphic annotation object that is defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module". The attributes of the graphic annotation object are updated as given by the properties specified by the GraphicObjectAttributes property.

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method. Also, the properties specified by the GraphicObjectAttributes should be set to the desired values before calling the method.

See Also

Elements: | GetGraphicObjectCount method, GraphicObjectAttributes property, GetGraphicObjectAttributes method, CreateGraphicObject method, RemoveGraphicObject method, FindGraphicObjectItem method, SetTextObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


SetIODDescription method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetIODDescription ( BSTR pszDescription );
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the description of the item in the IOD Structure specified by the CurrentIOD property.

The following methods will also help you navigate the IOD Structure:

MoveFirstIOD method

MoveLastIOD method

MoveNextIOD method

MoveParentIOD method

MoveChildIOD method

MoveRootIOD method

See Also

Elements: | MoveFirstIOD method, MoveLastIOD method, MoveNextIOD method, MovePrevIOD method, MoveParentIOD method, MoveChildIOD method, MoveRootIOD method, SetIODName method
Topics: | Information Object Definitions: Modifying an Existing IOD


SetIODName method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetIODName ( BSTR pszName );
Overview | Refer to Working with Information Object Definitions.

Remarks

Updates the name of the item in the IOD Structure specified by the CurrentIOD property.

The following methods will also help you navigate the IOD Structure:

MoveFirstIOD method

MoveLastIOD method

MoveNextIOD method

MoveParentIOD method

MoveChildIOD method

MoveRootIOD method

See Also

Elements: | MoveFirstIOD method, MoveLastIOD method, MoveNextIOD method, MovePrevIOD method, MoveParentIOD method, MoveChildIOD method, MoveRootIOD method, SetIODDescription method
Topics: | Information Object Definitions: Modifying an Existing IOD


SetLayerAttributes method (ILEADDicomDS)

SetLayerAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short SetLayerAttributes(long lLayerIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The SetLayerAttributes method sets the attributes of a layer as specified by the LayerAttributes property.

Before calling this method, set the properties specified by the LayerAttributes property to the desired values.

See Also

Elements: | LayerCount property, LayerAttributes property, GetLayerAttributes method, CreateLayer method
Topics: | ILEADDicomDS Interface, IDicomLayerAttributes Interface
 | Dicom Annotations: Layers


SetLayerName method (ILEADDicomDS)

SetLayerName method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short SetLayerName(BSTR bstrNewLayerName);
Overview | Refer to Working with DICOM Annotations

Remarks

The SetLayerName method sets the value of the "Graphic Layer" (0070,0002) element under one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The FindFirstGraphicAnnItem method and the MoveNextGraphicAnnItem method can be used to enumerate all the Items under the "Graphic Annotation Sequence" in the "Graphic Annotation Module".

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method.

See Also

Elements: | GetLayerName method, FindFirstGraphicAnnItem method, MoveNextGraphicAnnItem method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface
 | Dicom Annotations: Graphic Objects


SetLongValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetLongValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of long values from the LongValues property into the item specified by the CurrentElement property.

Before calling this method, set the LongValueCount property to the number of values you wish to set, and then fill the LongValues property with the desired values.

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

If lCount is less than 0 or greater than the LongValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_AT, VR_IS, VR_SL, or VR_UL. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetShortValue method, SetFloatValue method, SetDoubleValue method, SetDateValue method, SetStringValue method, SetAgeValue method, SetDateTimeValue method, SetTimeValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetModalityLUT method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetModalityLUT(VARIANT Data, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The SetModalityLUT method sets the attributes of the "Modality LUT Module" as specified by the ModalityLUTAttributes property and the Data parameter.

Before calling this method, set the properties specified by the ModalityLUTAttributes property to the desired values.

If you are trying to set the "Rescale Intercept" (0028,1052) and "Rescale Slope" (0028,1053), set the IsRescaleSlopeIntercept property to VARIANT_TRUE and populate the RescaleIntercept property and the RescaleSlope property with the new values. You can also populate the RescaleType property if you want to set "Rescale Type" (0028,1054).

If you are trying to set the elements under the "Modality LUT Sequence", set the IsModalityLUTSequence property to VARIANT_TRUE and populate the LUTDescriptorNumberOfEntries property, the LUTDescriptorFirstMapped property, the LUTDescriptorEntryBits property, and the ModalityLUTType property. In this case, the Data parameter should specify the "LUT Data" (0028,3006).

This method will return an error if both the IsRescaleSlopeIntercept property and the IsModalityLUTSequence property are set to VARIANT_TRUE. It will also return an error if the IsModalityLUTSequence property is set to VARIANT_TRUE and no LUT Data is specified (using the Data parameter).

See Also

Elements: | ModalityLUTAttributes property, GetModalityLUTAttributes method, GetModalityLUTData method
Topics: | Lookup Tables


SetOverlayAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetOverlayAttributes(long lOverlayIndex, long lFlags);
Overview | Refer to Overlays Overview.

Remarks

The SetOverlayAttributes method sets the overlay attributes of an overlay as specified by the OverlayAttributes property.

Before calling this method, set the properties specified by the OverlayAttributes property to the desired values.

See Also

Elements: | OverlayCount property, OverlayAttributes property, GetOverlayAttributes method, SetOverlayBitmap method, SetOverlayBitmapList method
Topics: | Overlays


SetOverlayBitmap method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetOverlayBitmap(long lOverlayIndex, long lFlags);
Overview | Refer to Overlays Overview.

Remarks

The SetOverlayBitmap method updates the stream of bytes under the "Overlay Data" (60xx, 3000) element of an overlay with the data specified by the OverlayBitmap property.

Before calling the method, set the OverlayBitmap property to the handle of the bitmap which will be used to update the overlay data.

This method will fail if the bitmap width doesn’t match the "Overlay Columns" (60xx, 0011) or if the bitmap height doesn’t match the "Overlay Rows" (60xx, 0011) for the overlay we are updating the data for.

See Also

Elements: | OverlayCount property, OverlayBitmap property, GetOverlayBitmap method, SetOverlayAttributes method, SetOverlayBitmapList method
Topics: | Overlays


SetOverlayBitmapList method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetOverlayBitmapList(long lOverlayIndex, long lFlags);
Overview | Refer to Overlays Overview.

Remarks

The SetOverlayBitmapList method updates the stream of bytes under the "Overlay Data" (60xx, 3000) element of an overlay with the data of the bitmaps specified by the OverlayBitmapList property.

Before calling the method, set the OverlayBitmapList property to the handle of the bitmap list which will be used to update the overlay data.

Before calling this method, make sure to call the SetOverlayAttributes method to set the attributes of the bitmap you are trying to update; make sure that the number of bitmaps in the list doesn’t exceed the value of "Number of Frames in Overlay" (60xx,0015) element.

See Also

Elements: | OverlayCount property, OverlayBitmapList property, SetOverlayAttributes method, GetOverlayBitmapList method, SetOverlayBitmap method
Topics: | Overlays


SetPaletteColorLUTAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetPaletteColorLUTAttributes(long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The SetPaletteColorLUTAttributes method sets the attributes that describe the "Palette Color Lookup Table", as specified by the PaletteColorLUTAttributes property.

Before calling this method, set the properties specified by the PaletteColorLUTAttributes property to the desired values.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTData method, GetPaletteColorLUTData method, DeletePaletteColorLUT method
Topics: | Lookup Tables


SetPaletteColorLUTData method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetPaletteColorLUTData(VARIANT Data, DicomPaletteColorLUTConstants PaletteColorLUTType, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The SetPaletteColorLUTData method sets the "Red", "Green", or "Blue" "Palette Color Lookup Table Data".

Before calling this method, you need to call the SetPaletteColorLUTAttributes method to set the attributes of the "Palette Color Lookup Table"; otherwise, the SetPaletteColorLUTData method will fail and return DICOM_ERROR_LUT_DESCRIPTOR_MISSING.

See Also

Elements: | GetPaletteColorLUTData method, SetPaletteColorLUTAttributes method, GetPaletteColorLUTAttributes method, DeletePaletteColorLUT method
Topics: | Lookup Tables


SetPresStateAttributes method (ILEADDicomDS)

SetPresStateAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short SetPresStateAttributes();
Overview | Refer to Working with DICOM Annotations

Remarks

The SetPresStateAttributes method sets the attributes of the "Presentation State Module" as specified by the PresStateAttributes property.

Before calling this method, set the properties specified by the PresStateAttributes property to the desired values.

See Also

Elements: | PresStateAttributes property, GetPresStateAttributes method
Topics: | ILEADDicomDS Interface, IDicomPresStateAttributes Interface
 | Dicom Annotations: Presentation State Module


SetShortValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetShortValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of short values from the ShortValues property into the item specified by the CurrentElement property.

Before calling this method, set the ShortValueCount property to the number of values you wish to set, and then fill the ShortValues property with the desired values.

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

If lCount is less than 0 or greater than the ShortValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_OW, VR_SS, or VR_US. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetDateValue method, SetStringValue method, SetAgeValue method, SetDateTimeValue method, SetTimeValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetStringValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetStringValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of string values from the StringValues property into the item specified by the CurrentElement property.

Before calling this method, set the StringValueCount property to the number of values you wish to set, and then fill the StringValues property with the desired value(s).

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

For more information on required delimiters between multiple values, refer to An Overview of the DICOM File Format and the DICOM Standard.

If lCount is less than 0 or greater than the CharValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_AE, VR_CS, VR_LO, VR_LT, VR_SH, VR_ST, VR_UI, VR_UT, or VR_PN. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetDateValue method, SetShortValue method, SetAgeValue method, SetDateTimeValue method, SetTimeValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetTagName method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetTagName ( BSTR pszName );
Overview | Refer to Working with Tags.

Remarks

Sets the name of the item in the Data Element Tag Table specified by the CurrentTag property.

See Also

Elements: | MoveFirstTag method, MoveLastTag method, MoveNextTag method, MovePrevTag method, FindTag method, FindIndexTag method
Topics: | Data Element Tags: Modifying an Existing Data Element Tag


SetTextObjectAttributes method (ILEADDicomDS)

SetTextObjectAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short SetTextObjectAttributes(long lTextObjectIndex);
Overview | Refer to Working with DICOM Annotations

Remarks

The SetTextObjectAttributes method sets the attributes of a text annotation object that is defined in one of the Items (the one specified by the CurrentElement property) of the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module". The attributes of the text annotation object are updated as given by the properties specified by the TextObjectAttributes property.

The "Graphic Annotation Sequence" Item should be specified by the CurrentElement property when calling the method. Also, the properties specified by the TextObjectAttributes property should be set to the desired values before calling the method.

See Also

Elements: | GetTextObjectCount method . TextObjectAttributes property, GetTextObjectAttributes method, CreateTextObject method, RemoveTextObject method, FindTextObjectItem method, SetGraphicObjectAttributes method
Topics: | ILEADDicomDS Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Text Objects


SetTimeValue method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetTimeValue ( long lCount );
Overview | Refer to Working with Data Sets.

Remarks

Sets the specified number of time values from the TimeValues property into the item specified by the CurrentElement property.

Before calling this method, set the TimeValueCount property to the number of values you wish to set, and then fill the TimeValues property with the desired values.

If more than one value is stored in the Value Field of the Data Element, you must set all values at the same time.

If lCount is less than 0 or greater than the TimeValueCount property, an error is returned.

This method overwrites the values associated with the item specified by the CurrentElement property.

This function can be called only if the Value Representation of the Data Element is VR_TM. For more information about Value Representations, refer to Default Value Representation Table.

See Also

Elements: | SetBinaryValue method, SetLongValue method, SetFloatValue method, SetDoubleValue method, SetDateValue method, SetShortValue method, SetAgeValue method, SetDateTimeValue method, SetStringValue method, SetCharValue method
Topics: | Data Sets: Getting and Setting Data Element Values


SetUIDName method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetUIDName ( BSTR pszName);
Overview | Refer to Working with Unique Identifiers.

Remarks

Sets the name of the item in the UID Table specified by the CurrentUID property.

See Also

Elements: | MoveFirstUID method, MoveLastUID method, MoveNextUID method, MovePrevUID method, FindUID method, FindIndexUID method
Topics: | Unique Identifiers: Modifying an Existing UID


SetVOILUT method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetVOILUT(long lVOILUTIndex, VARIANT Data, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The SetVOILUT method sets the attributes of a VOI LUT as specified by the VOILUTAttributes property and the Data parameter.

The passed safearray shouldn’t be empty and its size should be at least equal to the value specified by the LUTDescriptorNumberOfEntries property.

According to the DICOM standard, the LUTDescriptorNumberOfEntries property should be set to 0 if the number of entries in the lookup table is 2^16. However, you should NOT do that when calling this method. This method will handle correctly setting the value inside the dataset.

See Also

Elements: | VOILUTAttributes property, VOILUTCount property, GetVOILUTAttributes method, GetVOILUTData method, DeleteVOILUT method, SetWindowAttributes method
Topics: | Lookup Tables


SetVRName method (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetVRName ( BSTR pszName );
Overview | Refer to Working with Value Representations.

Remarks

Sets the name of the item in the Value Representation Table specified by the CurrentVR property.

See Also

Elements: | MoveFirstVR method, MoveLastVR method, MoveNextVR method, MovePrevVR method, FindVR method, FindIndexVR method
Topics: | Value Representations: Modifying an Existing Value Representation


SetWindowAttributes method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetWindowAttributes(long lWindowIndex, long lFlags);
Overview | Refer to LUT Encoding.

Remarks

The SetWindowAttributes method sets the attributes that describe a window, as specified by the WindowAttributes property.

Before calling this method, set the properties specified by the WindowAttributes property to the desired values.

If the "Window Center" (0028,1050) doesn’t already exist in the Data Set, the method will insert it and set its value to the value specified by the WindowCenter property. Similarly, if the "Window Width" (0028,1051) doesn’t already exist in the Data Set, the method will insert it and set its value to the value specified by the WindowWidth property.

See Also

Elements: | WindowAttributes property, WindowCount property, GetWindowAttributes method, DeleteWindow method, SetVOILUT method
Topics: | Lookup Tables


VerifySignature method (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short VerifySignature(short nReserved);
Overview | Refer to Working with Digital Signatures.

Remarks

The VerifySignature method verifies Digital Signatures in the Data Set. Before calling the method, the CurrentElement property must be updated either with 0 or with a Digital Signatures Sequence Item. If the property is updated with 0, the method will verify all the Digital Signatures in the whole Data Set. If the property is updated with the Digital Signatures Sequence Item of a Digital Signature, the method will verify only the specified Digital Signature.

When the CurrentElement property is updated with 0, the method will examine all the Digital Signatures that exist in the Data Set. If at least one of these Digital Signatures is invalid, the method will return DICOM_ERROR_INVALID_SIGNATURE and will not examine the remaining Digital Signatures, if there are any.

See Also

Elements: | MoveSignature method, FindSignature method, DeleteSignature method, CreateSignature method, CurrentElement property
Topics: | Data Sets: Digital Signatures


OnConvertLEADAnnObjToDicomAnnObj event (ILEADDicomDS)

OnConvertLEADAnnObjToDicomAnnObj event (ILEADDicomDS Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | void OnConvertLEADAnnObjToDicomAnnObj(VARIANT_BOOL bGraphicObject);
Overview | Refer to Working with DICOM Annotations

Remarks

The OnConvertLEADAnnObjToDicomAnnObj event is fired for each DICOM annotation object resulted from converting a LEAD annotation object using the ConvertLEADAnnObjToDicomAnnObjs method.

During the handling of the event, the conversion process can be stopped by using the EndConversion method.

See Also

Elements: | ConvertLEADAnnObjToDicomAnnObjs method, EndConversion method
Topics: | ILEADDicomDS Interface, IDicomGraphicObjectAttributes Interface, IDicomTextObjectAttributes Interface
 | Dicom Annotations: Converting Between LEADTOOLS Annotations and DICOM Annotations


ProgressStatus event (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ProgressStatus (short iPercent);
Overview | Refer to Working with Data Sets.

Remarks

Occurs repeatedly as LEADTOOLS processes data, so that you can update a status bar or detect a user interrupt.

This event is generated only if the EnableProgressEvent property is set to TRUE.

To interrupt a process, set the EnableProgressEvent property to FALSE.

The following methods generate ProgressStatus events:

GetBitmapValue

InsertBitmapValue

SetBitmapValue

See Also

Elements: | EnableProgressEvent property
Topics: | Data Sets: Getting and Setting Data Set Information


CreateObject method (ILEADDicomFactory Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | LPUNKNOWN CreateObject (BSTR pszClassID, BSTR pszLic)
Overview | Refer to Creating Instances of Licensed COM Objects.

Remarks

Creates an instance of a licensed COM Object.

Use this method in languages like Visual Basic.

See Also

Elements: | CreateObject2 method
Topics: | DICOM Elements: Licensed COM Objects


CreateObject2 method (ILEADDicomFactory Interface)

Syntax | LPDISPATCH CreateObject2 (BSTR pszClassID, BSTR pszLic)
Overview | Refer to Creating Instances of Licensed COM Objects.

Remarks

Creates an instance of a licensed COM Object. This function returns an IDispatch pointer to the created object.

Use this method in ASP/VisualBasic Script/Java Script.

See Also

Elements: | CreateObject method
Topics: | DICOM Elements: Licensed COM Objects


EnableMethodErrors property (ILEADDicomKernel Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL EnableMethodErrors
Overview | Refer to General DICOM COM Support.

Remarks

Specifies whether LEADTOOLS generates runtime exceptions (in addition to method return values). Possible values are:

Setting | Description
TRUE | Generate runtime exceptions.
FALSE | Do not generate runtime exceptions.

See Also

Topics: | DICOM Elements: DICOM Directories
 | DICOM Elements: General Support


IsSupportLocked method (ILEADDicomKernel)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsSupportLocked (DicomSupportLockConstants SupportType);
Overview | Refer to General DICOM COM Support.

Remarks

Indicates whether support is locked for an optional feature, such as LEADTOOLS Document/Medical capabilities.

For information about LEADTOOLS Document/Medical capabilities, contact LEAD.

To unlock a feature, use the UnlockSupport method.

All LEADTOOLS COM Objects support this method.

See Also

Topics:

DICOM Elements: General Support


UnlockSupport method (ILEADDicomKernel)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void UnlockSupport (DicomSupportLockConstants SupportType, BSTR pszKey);
Overview | Refer to General DICOM COM Support.

Remarks

Unlocks support for an optional feature, such as LEADTOOLS Document/Medical capabilities.

For information about LEADTOOLS Document/Medical capabilities, contact LEAD.

Note:

UnlockSupport can be replaced by entering the appropriate keys in LTOCX14.LIC. Edit the LTOCX14.LIC file and append at the end of a line, and on the same line, one or more pairs in the form |L_SUPPORT_xxx=key. The keys that can be specified are:

L_SUPPORT_BARCODES_1D
L_SUPPORT_BARCODES_1D_SILVER
L_SUPPORT_BARCODES_PDF_READ
L_SUPPORT_BARCODES_PDF_WRITE
L_SUPPORT_BARCODES_DATAMATRIX_READ
L_SUPPORT_BARCODES_DATAMATRIX_WRITE
L_SUPPORT_BARCODES_QR_READ
L_SUPPORT_BARCODES_QR_WRITE
L_SUPPORT_BITONAL
L_SUPPORT_CMW
L_SUPPORT_DICOM
L_SUPPORT_DOCUMENT
L_SUPPORT_EXTGRAY
L_SUPPORT_J2K
L_SUPPORT_MEDICAL
L_SUPPORT_MEDICAL_NET
L_SUPPORT_OCR
L_SUPPORT_VECTOR

For example, if you wanted to unlock DOCUMENT and OCR support, you would include the following at the end of a line:

|L_SUPPORT_DOCUMENT=dockey|L_SUPPORT_OCR=ocrkey

See Also

Topics:

DICOM Elements: General Support


EnableMethodErrors property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL EnableMethodErrors
Overview | Refer to Working with DICOM Network Connections.

Remarks

Persistent property, available at design time) Specifies whether LEADTOOLS generates system error events (in addition to error return codes).

Setting | Description
TRUE | Generate system error events.
FALSE | Do not generate system error events.

See Also

Elements: | EnableProgressEvent property
Topics: | DICOM Elements: General Support


hNet property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long hNet
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) (Runtime only, Read only) This is the handle to the local DICOM Network connection.

See Also

Topics:

DICOM Network Connection: Getting Information About a Network Connection


hPDU property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long hPDU
Overview | Refer to Working with DICOM Associate Connections.

Remarks

(Runtime only, Read only) This is the handle to the DICOM Associate connection.

See Also

Topics:

DICOM Associate Connection: Getting Information About a DICOM Associate Handle


ISCLChallengeResponseSuccess property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | VARIANT_BOOL ISCLChallengeResponseSuccess;
Overview | Refer to ISCL Protocols

Remarks

(Medical Imaging Suite only) Used to verify the successful processing of the following events:

NetExternalAuthenticateISCL event

NetGetChallengeISCL event

NetInternalAuthenticateISCL event

Prior to triggering any these events, this property is set internally to FALSE. If the event handler successfully processes the event, it should set it to TRUE before returning.

For more information about using this property, refer to the events listed above.

See Also

Elements: | NetExternalAuthenticateISCL event, NetGetChallengeISCL event, NetInternalAuthenticateISCL event
Topics: | DICOM Security: Working with ISCL


NetworkSecurityMode property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long NetworkSecurityMode;
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Determines which security mode to use when initializing the DICOM Network. To set the security mode, this property must be set before calling the StartUp method.

Possible values are:

Value | Meaning
DICOM_SECURE_NONE | No security mode. (default value)
DICOM_SECURE_ISCL | Integrated Secure Communication Layer protocol security.
DICOM_SECURE_TLS | Transport Layer Secure protocol security.

See Also

Elements: | StartUp method, UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLCAFile property, SSLVerifyDepth property, SSLSuccess property, SSLOptions property, SSLPrivateKeyPassword property, SSLPrivateKeyPasswordEvent event
Topics: | DICOM Network Connection:Creating a Network Connection


NetworkTempPath property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR NetworkTempPath
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sets the path for the temporary files for network operations. By default, this is an empty string, which means that the TEMP environment variable for the system will be used. To change this, you must set this property before calling the StartUp method. If you set this property after calling the StartUp method, but before calling the ShutDown method, an error will occur.

See Also

Elements: | StartUp method, ShutDown method
Topics: | DICOM Network Connection:Creating a Network Connection


RequestAttributeCount property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long RequestAttributeCount
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Gets or sets the number of Request Attributes stored in the RequestAttributes array property.

The RequestAttributes property is used in association with the SendNGetRequest method.

See Also

Elements: | RequestAttributes property, SendNGetRequest method
Topics: | DICOM Network Connection: Sending Data Messages


RequestAttributes property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long RequestAttributes (long lIndex);
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Gets or sets the Request Attribute at the specified index.

This property is the list of element tags that you wish to retrieve from the called AE using the SendNGetRequest method.

When the NetReceiveNGetRequest event is generated, the RequestAttributes array property is updated with the attribute list sent by the calling AE.

See Also

Elements: | RequestAttributeCount property, SendNGetRequest method, SendNGetResponse method, NetReceiveNGetRequest event, NetReceiveNGetResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SSLCAFile property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SSLCAFile
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Used to set the name of a file containing the trusted certificate authority certificates in PEM format. The default value is no file. More than one CA certificate may be present in the file.

Use the following procedure to change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

See Also

Elements: | StartUp method,UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLOptions property, SSLVerifyDepth property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


SSLCreateFlags property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomSSLCreateFlags SSLCreateFlags
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Values that indicate which SSL security options are to be changed from the defaults. Values may be combined using the bitwise OR ( | ) operator. Possible values are:

Value | Meaning
DICOM_SSL_CTX_CREATE_METHOD_TYPE | [0x001] The SSLMethodType member is valid.
DICOM_SSL_CTX_CREATE_VERIFY_DEPTH | [0x002] The SSLVerifyDepth member is valid
DICOM_SSL_CTX_CREATE_VERIFY_MODE | [0x004] The SSLVerifyMode member is valid
DICOM_SSL_CTX_CREATE_CAFILE | [0x008] The SSLCAfile member is valid
DICOM_SSL_CTX_CREATE_OPTIONS | [0x010] The SSLOptions member is valid
DICOM_SSL_CTX_CREATE_ALL | [0x01F] All members are valid

Use the following procedure to change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE.
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS.
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

See Also

Elements: | StartUp method,UseSSLOptions property, SSLMethodType property, SSLVerifyMode property, SSLOptions property, SSLCAFile property, SSLVerifyDepth property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


SSLMethodType property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomSSLMethodType SSLMethodType
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Used to set the SSL method type used for security verification. The default value is DICOM_TYPE_TLSV1_METHOD. Possible values are:

Value | Meaning
DICOM_TYPE_SSLV2_METHOD | (0x01) Use Secure Sockets Layer (SSL) Version 2. Avoid using SSL Version 2 because this version is known to have security flaws.
DICOM_TYPE_SSLV3_METHOD | (0x02) Use SSL Version 3.
DICOM_TYPE_TLSV1_METHOD | (0x02) Use Transport Layer Security (TLS) Version 1.
DICOM_TYPE_SSLV23_METHOD | (0x04) Use a compatible security verification mode. This mode can handle any of the three modes (DICOM_TYPE_SSLV2_METHOD, DICOM_TYPE_SSLV3_METHOD, DICOM_TYPE_TLSV1_METHOD)

Use the following procedure to change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE.
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS.
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

See Also

Elements: | StartUp method,UseSSLOptions property, SSLCreateFlags property, SSLVerifyMode property, SSLOptions property, SSLCAFile property, SSLVerifyDepth property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


SSLOptions property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomSSLOptions SSLOptions
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only)

Used to set additional restrictions to the SSL security verification mode. This property should be used when the SSLMethodType property is DICOM_TYPE_SSLV23_METHOD (otherwise it is ignored). Values may be combined using a bitwise OR (|). The default value is (L_SSL_OP_NO_SSLv3 | L_SSL_OP_NO_SSLv2 | L_SSL_OP_ALL). Possible values are:

Value | Meaning
DICOM_SSL_OP_NO_SSLv2 | [0x01000000L] Ignore the SSL Version 2 protocol.
DICOM_SSL_OP_NO_SSLv3 | [0x02000000L] Ignore the SSL Version 3 protocol.
DICOM_SSL_OP_NO_TLSv1 | [0x04000000L] Ignore the TLS Version 1 protocol.
DICOM_SSL_OP_ALL | [0x000FFFFFL] Implement all known SSL bug workarounds so that communication with peers with such SSL bugs can be established.

Use the following procedure to change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

See Also

Elements: | StartUp method,UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLCAFile property, SSLVerifyDepth property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


SSLPrivateKeyPassword property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SSLPrivateKeyPassword
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only)

This property should be set to contain the password used to encrypt a private key file.

A private key file is set using either the SetClientCertificateTLS method or the SetServerCertificateTLS method. If the private key file is password encrypted, the SSLPrivateKeyPasswordEvent event will be fired. In this event, set the SLLPrivateKeyPassword property.

See Also

Elements: | SetClientCertificateTLS method, SetServerCertificateTLS method, SSLPrivateKeyPasswordEvent event, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


SSLSuccess property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long SSLSuccess
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only)

After setting security options with any of the following properties and calling the StartUp method, this member will return any errors. If all options were set successfully, this will contain DICOM_SUCCESS. For information on errors, refer to Return Codes.

SSLCreateFlags property

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

Use the following procedure to change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

See Also

Elements: | StartUp method,UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLOptions property, SSLCAFile property, SSLVerifyDepth property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


SSLVerifyDepth property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long SSLVerifyDepth
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Used to set the maximum depth of the certificate chain to be verified. The default value is 9.

Use the following procedure to change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

See Also

Elements: | StartUp method,UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLOptions property, SSLCAFile property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


SSLVerifyMode property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | DicomSSLVerifyMode SSLVerifyMode
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Used to set the SSL verification mode used for security verification. The default value is L_SSL_VERIFY_NONE. Values may be combined using the bitwise OR ( | ) operator. Possible values are:

Value | Meaning
DICOM_SSL_VERIFY_NONE | [0x00] Server Mode: no request for a certificate is sent to the client, and the client should not send a certificate.
 | Client Mode: If the server sends a certificate, it will be verified, but failure will not terminate communication. This flag should not be used in conjunction with any other flag.
DICOM_SSL_VERIFY_PEER | [0x01]Server mode: a request for a certificate is send to the client. The client can ignore the request, but if the client does send a certificate, it will be verified. If verification fails, communication is terminated.
 | Client mode: if the server sends a certificate, it is verified. If verification fails, communication is terminated.
DICOM_SSL_VERIFY_FAIL_IF_NO_PEER_CERT | [0x02] Server Mode: If the client does not send a certificate, or if a certificate is sent that fails verification, then communication is terminated. This flag must be combined with DICOM_SSL_VERIFY_PEER.
 | Client mode: This flag is ignored.
DICOM_SSL_VERIFY_CLIENT_ONCE | [0x04] Server Mode: During initial negotiation a certificate is requested from the client. During renegotiation, no certificates are requested. This flag must be used with DICOM_SSL_VERIFY_PEER.
 | Client Mode: This flag is ignored.

Use the following procedure to change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE.
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS.
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

See Also

Elements: | StartUp method,UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLOptions property, SSLCAFile property, SSLVerifyDepth property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


UseSSLOptions property (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL UseSSLOptions
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only) Indicates whether the default security options are to be changed. Possible values are:

Value | Meaning
VARIANT_TRUE | Change the default security options.
VARIANT_FALSE | Do not change the default security options.

The default value is VARIANT_FALSE.

Use the following procedure to change the default security options:

1. | Set the UseSSLOptions property to VARIANT_TRUE.
2. | Set the NetworkSecurityMode property to DICOM_SECURE_TLS.
3. | Set any or all of the following properties.

SSLMethodType property

SSLVerifyMode property

SSLOptions property

SSLCAFile property

SSLVerifyDepth property

4. | Set the SSLCreateFlags property to have the flags that correspond to the properties that were set in step 3.
5. | Call the StartUp method.

Note that the properties in steps 1, 2, 3, and 4 must be set before calling the StartUp method, and that the NetworkSecurityMode property must be set to DICOM_SECURE_TLS. If the NetworkSecurityMode property is not DICOM_SECURE_TLS, then the SSL properties are ignored.

See Also

Elements: | StartUp method,SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLOptions property, SSLCAFile property, SSLVerifyDepth property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


ConformanceStatus event (ILEADDicomNet)

ConformanceStatus event (ILEADDicomDS)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ConformanceStatus (short nFlags );
Overview | Refer to Working with Data Sets.

Remarks

This event is fired for each element in the Data Set that does not conform to the DICOM standard. When this event occurs, the CurrentElement property will be updated to the element that does not conform and nFlags will contain a flag indicating where the non-conformity exists. Set the EnableConformanceStatus property to False to terminate the Conformance test.

See Also

Elements: | EnableConformanceStatus property, ConformanceTestDS method
Topics: | Data Sets: Getting and Setting Data Set Information


NetAccept event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetAccept (short nStatus);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a listening connection (SCP) that it can accept pending connection requests.

This event is generated on an SCP when an SCU calls Connect method.

To accept a connection request, call Accept method.

You should always accept a connection request. Once the connection is made you can check the client and close the connection if you do not wish to maintain it. Since the connection requests are queued, if you do not accept a connection, it remains in the queue. When the next request is received, it is placed in the queue behind the first request. Calling the Accept method at this point will connect the first request, not the second, since the first request is still in the queue.

See Also

Elements: | Connect method, Accept method, NetConnect event
Topics: | DICOM Network Connection: Creating a Network Connection


NetClose event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetClose (long hNet, short nStatus, long hPeer);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a member of a connection that the connection was closed.

This event is generated by a call to the Close method. The NetClose event is useful to both SCUs and SCPs.

See Also

Elements: | Close method
Topics: | DICOM Network Connection: Closing a Network Connection


NetConnect event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetConnect (long hNet, short nStatus);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies the SCU that the connection attempt is complete.

This event is generated on an SCU when an SCP calls the Accept method. It is generated whether or not the connection attempt is successful. It is also generated when a connection attempt has timed out.

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.

See Also

Elements: | Connect method, Accept method, NetAccept event
Topics: | DICOM Network Connection: Creating a Network Connection


NetExternalAuthenticateISCL event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | void NetExternalAuthenticateISCL(long hNet, VARIANT nChallenge, VARIANT nResponse, VARIANT nParameter);
Overview | Refer to ISCL Protocols

Remarks

(Medical Imaging Suite only) Determines whether the response code is a valid response for the challenge code.

If the response code and challenge code match, the event handler should set the ISCLChallengeResponseSuccess property to TRUE. Otherwise keep its value set to FALSE to indicate they do not match.

See Also

Elements: | NetInternalAuthenticateISCL event
Topics: | DICOM Security: Working with ISCL


NetGetChallengeISCL event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | void NetGetChallengeISCL(long hNet, VARIANT *nChallenge, VARIANT nParameter);
Overview | Refer to ISCL Protocols

Remarks

(Medical Imaging Suite only) Generates a random number.

The generation of a random number can use a pool of random (or pseudo-random) data. If the pool is empty, the NetGetChallengeISCL event may fail. In this case, try to call GetChallenge later in the application, when some random data has been added to the pool.

If generation of the random number was successful, the event handler should set the ISCLChallengeResponseSuccess property to TRUE. Otherwise keep its value set to FALSE to indicate that generation of the random number was not successful.

See Also

Elements: | NetInternalAuthenticateISCL event
Topics: | DICOM Security: Working with ISCL


NetInternalAuthenticateISCL event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | void NetInternalAuthenticateISCL(long hNet, VARIANT nChallenge, VARIANT *nResponse, VARIANT nParameter);
Overview | Refer to ISCL Protocols

Remarks

(Medical Imaging Suite only) Generates a response code, based on the specified challenge code.

If generation of the response code was successful, the event handler should set the ISCLChallengeResponseSuccess property to TRUE. Otherwise keep its value set to FALSE to indicate that generation of the response code was not successful.

See Also

Elements: | NetGetChallengeISCL event
Topics: | DICOM Security: Working with ISCL


NetNonSecureReceivedISCL event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | void NetNonSecureReceivedISCL(long hNet, long nError, VARIANT * vBuffer, long nLength);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) This event is fired after data sent in non-secure mode is received.

See Also

Elements: | NetNonSecureSendISCL event
Topics: | DICOM Security: Working with ISCL


NetNonSecureSendISCL event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | void NetNonSecureSendISCL(long hNet, long nError, long nType, long nLength);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) This event is fired after data has been sent using the SendNonSecureISCL method.

See Also

Elements: | NetNonSecureReceivedISCL event, SendNonSecureISCL method
Topics: | DICOM Security: Working with ISCL


NetReceive event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceive (long hNet, short nStatus, short nType, VARIANT pData, long lSize);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that data was received.


NetReceiveAbort event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveAbort (long hNet, short nSource, short nReason);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an Abort message was received.

This event is generated on a connection when the peer member of the connection calls the SendAbort method.

Please note that it is preferable to close a DICOM Association using the SendReleaseRequest method and SendReleaseResponse method methods. For more information on closing a DICOM Association, refer to Closing a DICOM Associate Connection.

See Also

Elements: | SendAbort method, SendReleaseRequest method, SendReleaseResponse method, NetReceiveReleaseRequest event, NetReceiveReleaseResponse event
Topics: | DICOM Network Connection: DICOM Associate Connection Messages


NetReceiveAssociateAccept event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveAssociateAccept (long hNet, long hPDU);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an Associate Accept message was received.

This event is generated on an SCU when an SCP calls the SendAssociateAccept method.

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.

When a DICOM Associate Connection is no longer needed, the connection should be closed. For more information, refer to Closing a DICOM Associate Connection.

See Also

Elements: | SendAssociateAccept method, SendAssociateReject method, SendAssociateRequest method, NetReceiveAssociateReject event, NetReceiveAssociateRequest event
Topics: | Creating a DICOM Associate Connection
 | Creating an SCU
 | DICOM Network Connection: DICOM Associate Connection Messages


NetReceiveAssociateReject event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveAssociateReject (long hNet, short nResult, short nSource, short nReason);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an Associate Reject message was received.

This event is generated on an SCU when an SCP calls the SendAssociateReject method. For more information on DICOM Associate connections, refer to Creating a DICOM Associate Connection.

See Also

Elements: | SendAssociateReject method, SendAssociateAccept method, SendAssociateRequest method, NetReceiveAssociateAccept event, NetReceiveAssociateRequest method
Topics: | Creating a DICOM Associate Connection
 | Receiving Messages
 | Diagram of a Basic SCU-SCP Set-up
 | Creating an SCU
 | Creating an SCP
 | DICOM Network Connection: DICOM Associate Connection Messages


NetReceiveAssociateRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveAssociateRequest (long hNet, long hPDU);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an Associate Request message was received.

This event is generated on an SCP when an SCU calls the SendAssociateRequest method. For more information on DICOM Associate connections, refer to Creating a DICOM Associate Connection.

When the DICOM Association is no longer needed, it should be ended. For more information, refer to Closing a DICOM Associate Connection.

See Also

Elements: | SendAssociateReject method, SendAssociateAccept method, SendAssociateRequest method, NetReceiveAssociateAccept event, NetReceiveAssociateRequest event
Topics: | Creating a DICOM Associate Connection
 | Receiving Messages
 | Diagram of a Basic SCU-SCP Set-up
 | Creating an SCU
 | Creating an SCP
 | DICOM Network Connection: DICOM Associate Connection Messages


NetReceiveCCancelRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCCancelRequest (long hNet, short nPresentationID, short nMessageID);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-CANCEL-REQ command was received.

This event is generated on a peer member of a connection when the SendCCancelRequest method is called.

See Also

Elements: | SendCCancelRequest method
Topics: | DICOM Network Connection: Sending Data Messages


NetReceiveCEchoRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCEchoRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-ECHO-REQ command was received.

This event is generated on a peer member of a connection when the SendCEchoRequest method is called.

See Also

Elements: | SendCEchoRequest method, SendCEchoResponse method, NetReceiveCEchoResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCEchoResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCEchoResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nStatus);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-ECHO-RSP command was received.

This event is generated on a peer member of a connection when the SendCEchoResponse method is called.

See Also

Elements: | SendCEchoRequest method, SendCEchoResponse method, NetReceiveCEchoRequest event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCFindRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCFindRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nPriority, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-FIND-REQ command was received.

This event is generated on a peer member of a connection when SendCFindRequest method is called.

See Also

Elements: | SendCFindRequest method, SendCFindResponse method, NetReceiveCFindResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCFindResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCFindResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nStatus, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-FIND-RSP command was received.

This event is generated on an SCU when SendCFindResponse method is called by the SCP.

See Also

Elements: | SendCFindRequest method, SendCFindResponse method, NetReceiveCFindRequest event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCGetRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCGetRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nPriority, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-GET-REQ command was received.

This event is generated on an SCP when SendCGetRequest method is called by the SCP.

See Also

Elements: | SendCGetRequest method, SendCGetResponse method, NetReceiveCGetResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCGetResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCGetResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nStatus, short nRemaining, short nCompleted, short nFailed, short nWarning, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-GET-RSP command was received.

This event is generated on an SCU when the SendCGetResponse method is called by the SCP.

See Also

Elements: | SendCGetResponse method, SendCGetRequest method, NetReceiveCGetRequest event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCMoveRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCMoveRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nPriority, BSTR pszMoveAE, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-MOVE-REQ command was received.

This event is generated on an SCP when the SendCMoveRequest method is called by the SCU.

See Also

Elements: | SendCMoveRequest method, SendCMoveResponse method, SendCStoreRequest method, SendCStoreResponse method, NetReceiveCMoveResponse event, NetReceiveCStoreRequest event, NetReceiveCStoreResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCMoveResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCMoveResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nStatus, short nRemaining, short nCompleted, short nFailed, short nWarning, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-MOVE-RSP command was received.

This event is generated on an SCU when SendCMoveResponse method is called by the SCP.

See Also

Elements: | SendCMoveRequest method, SendCMoveResponse method, SendCStoreRequest method, SendCStoreResponse method, NetReceiveCMoveResponse event, NetReceiveCStoreRequest event, NetReceiveCStoreResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCStoreRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCStoreRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nPriority, BSTR pszMoveAE, short nMoveMessageID, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-STORE-REQ command was received.

This event is generated on a peer member of a connection when the SendCStoreRequest method is called.

When an SCU requests a Move (C-MOVE-REQ), the SCP may have to call the SendCStoreRequest method to request one or more C-STORE-REQ sub-operations to complete the storage. The series of calls and information transfer in a C-MOVE-REQ is complicated. For more information, refer to Moving Composite Data.

See Also

Elements: | SendCMoveRequest method, SendCMoveResponse method, SendCStoreRequest method, SendCStoreResponse method, NetReceiveCMoveResponse event, NetReceiveCMoveRequest event, NetReceiveCStoreResponse event
Topics: | Moving Composite Data
 | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveCStoreResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveCStoreResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a C-STORE-RSP command was received.

This event is generated on an SCU when the SendCStoreResponse method is called by an SCP.

When an SCU requests a Move (C-MOVE-REQ), the SCP may have to call the SendCStoreRequest method to request one or more C-STORE-REQ sub-operations to complete the storage. The series of calls and information transfer in a C-MOVE-REQ is complicated. For more information, refer to Moving Composite Data.

See Also

Elements: | SendCMoveRequest method, SendCMoveResponse method, SendCStoreRequest method, SendCStoreResponse method, NetReceiveCMoveResponse event, NetReceiveCMoveRequest event, NetReceiveCStoreRequest event
Topics: | Moving Composite Data
 | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveData event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveData (long hNet, short nID, long hDicomCS, long hDicomDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection when a Data message was received.

This is a low level means of receiving DICOM messages and data. It allows you to process messages yourself, instead of using the high level message processing functions provided.

This event is generated for each SendCXXX or SendNXXX method provided by LEADTOOLS.

See Also

Elements: | SendCCancelRequest method, SendCEchoRequest method, SendCEchoResponse, SendCFindRequest method, SendCFindResponse method, SendCGetRequest method, SendCGetResponse method, SendCMoveRequest method, SendCMoveResponse method, SendCStoreRequest method, SendCStoreResponse method, SendNReportRequest method, SendNReportResponse method, SendNGetRequest method, SendNGetResponse method, SendNSetRequest method, SendNSetResponse method, SendNActionRequest method, SendNActionResponse method, SendNCreateRequest method, SendNCreateResponse method, SendNDeleteRequest method, SendNDeleteResponse method
Topics: | Receiving Messages


NetReceiveNActionRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNActionRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nAction, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-ACTION-REQ command was received.

This event is generated on a peer member of a connection when SendNActionRequest method is called.

The action specified may be the addition of a new patient, the deletion of a patient, the addition of a new study, a print job, etc. The nAction value, which designates the action to perform is determined by the server. To find out the values used, you must contact the organization that created the server. When creating a server, the values and their corresponding meanings are determined by those creating the server.

See Also

Elements: | SendNActionRequest method, SendNActionResponse method, NetReceiveNActionResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNActionResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNActionResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, short nAction, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-ACTION-RSP command was received.

This event is generated on a peer member of a connection when the SendNActionResponse method is called.

The action specified may be the addition of a new patient, the deletion of a patient, the addition of a new study, a print job, etc. The nAction value, which designates the action to perform is determined by the server. To find out the values used, you must contact the organization that created the server. When creating a server, the values and their corresponding meanings are determined by those creating the server.

See Also

Elements: | SendNActionRequest method, SendNActionResponse method, NetReceiveNActionRequest event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNCreateRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNCreateRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-CREATE-REQ command was received.

This event is generated on a peer member of a connection when SendNCreateRequest method is called locally.

See Also

Elements: | SendNCreateRequest method, SendNCreateResponse method, NetReceiveNCreateResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNCreateResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNCreateResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-CREATE-RSP command was received.

This event is generated on a peer member of a connection when the SendNCreateResponse method is called locally.

See Also

Elements: | SendNCreateRequest method, SendNCreateResponse method, NetReceiveNCreateRequest event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNDeleteRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNDeleteRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-DELETE-REQ command was received.

This event is generated on a peer member of a connection when the SendNDeleteRequest method is called locally.

See Also

Elements: | SendNDeleteRequest method, SendNDeleteResponse method, NetReceiveNDeleteResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNDeleteResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNDeleteResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-DELETE-RSP command was received.

This event is generated on a peer member of a connection when the SendNDeleteResponse method is called locally.

See Also

Elements: | SendNDeleteRequest method, SendNDeleteResponse method, NetReceiveNDeleteRequest event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNGetRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNGetRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-GET-REQ command was received.

This event is generated on a peer member of a connection when the SendNGetRequest method is called locally.

The attributes of the data to retrieve are stored in the RequestAttributes property.

See Also

Elements: | SendNGetRequest method, SendNGetResponse method, NetReceiveNGetResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNGetResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNGetResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-GET-RSP command was received.

This event is generated on an SCU when the SendNGetResponse method is called by an SCP.

See Also

Topics:

DICOM Network Connection: Sending Data Messages


NetReceiveNReportRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNReportRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nEvent, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-REPORT-REQ command was received.

This event is generated on a peer member of a connection when the SendNReportRequest method is called locally.

See Also

Elements: | SendNReportRequest method, SendNReportResponse method, NetReceiveNReportResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNReportResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNReportResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, short nEvent, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-REPORT-RSP command was received.

This event is generated on a peer member of a connection when SendNReportResponse method is called locally.

See Also

Elements: | SendNReportRequest method, SendNReportResponse method, NetReceiveNReportRequest event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNSetRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNSetRequest (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-SET-REQ command was received.

This event is generated on a peer member of a connection when the SendNSetRequest method is called locally.

See Also

Elements: | SendNSetRequest method, SendNSetResponse method, NetReceiveNSetResponse event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveNSetResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveNSetResponse (long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an N-SET-RSP command was received.

This event is generated on a peer member of a connection when the SendNSetResponse method is called locally.

See Also

Elements: | SendNSetRequest method, SendNSetResponse method, NetReceiveNSetRequest event
Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetReceiveReleaseRequest event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveReleaseRequest (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a Release Request message was received.

This event is generated on an SCP when an SCU calls the SendReleaseRequest method. For more information on DICOM Associate connections, refer to Creating a DICOM Associate Connection.

When the DICOM Association is no longer needed, it should be ended. For more information, refer to Closing a DICOM Associate Connection.

See Also

Elements: | SendReleaseResponse method, SendAssociateReject method, SendAssociateAccept method, SendAssociateRequest method, NetReceiveReleaseResponse event, NetReceiveAssociateAccept event, NetReceiveAssociateRequest event
Topics: | Creating a DICOM Associate Connection
 | Receiving Messages
 | Diagram of a Basic SCU-SCP Set-up
 | Creating an SCU
 | Creating an SCP
 | Data Sets: Converting Values
 | DICOM Network Connection: DICOM Associate Connection Messages


NetReceiveReleaseResponse event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveReleaseResponse (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that a Release Response message was received.

This event is generated on an SCU when an SCP calls the SendReleaseResponse method.

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.

When a DICOM Associate Connection is no longer needed, the connection should be closed. For more information, refer to Closing a Connection.

See Also

Elements: | SendReleaseResponse method, SendReleaseRequest method, SendAssociateAccept method, SendAssociateReject method, SendAssociateRequest method, NetReceiveReleaseRequest event, NetReceiveAssociateReject event, NetReceiveAssociateRequest event
Topics: | Receiving Messages
 | Creating a DICOM Associate Connection
 | Creating an SCU
 | DICOM Network Connection: DICOM Associate Connection Messages


NetReceiveUnknown event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetReceiveUnknown (long hNet, short nPresentationID, long hCS, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that an unknown command was received.

This event is generated when an unknown command is received.

See Also

Topics: | Receiving Messages
 | DICOM Network Connection: Sending Data Messages


NetSecureLinkReady event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetSecureLinkReady(long hNet, long nError);
Overview | Refer to Adding TLS Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) This event is triggered when an ISCL or TLS secured connection is successfully established. From this moment until the connection is closed, an application can securely send and receive data.

See Also

Elements: | GetPeerAuthDataISCL method, SendAssociateRequest method
Topics: | DICOM Security: Working with ISCL


NetSend event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void NetSend (long hNet, short nStatus, short nType, long lBytes);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Notifies a connection that data was sent.

When one of the SendXXX functions is called, the message is not sent immediately. It is placed in a Network queue and sent later. When the data is actually sent, this callback function is called to let the calling AE know that the data has been sent.

See Also

Elements: | SendCCancelRequest method, SendCEchoRequest method, SendCEchoResponse method, SendCFindRequest method, SendCFindResponse method, SendCGetRequest method, SendCGetResponse method, SendCMoveRequest method, SendCMoveResponse method, SendCStoreRequest method, SendCStoreResponse method, SendNReportRequest method, SendNReportResponse method, SendNGetRequest method, SendNGetResponse method, SendNSetRequest method, SendNSetResponse method, SendNActionRequest method, SendNActionResponse method, SendNCreateRequest method, SendNCreateResponse method, SendNDeleteRequest method, SendNDeleteResponse method
Topics: | Sending Messages
 | DICOM Network Connection: DICOM Associate Connection Messages


SSLPrivateKeyPasswordEvent event (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void SSLPrivateKeyPasswordEvent (long hNet, long nFlag);
Overview | Refer to Working with DICOM Network Connections

Remarks

(Medical Imaging Suite only)

This event may be generated after calling the SetClientCertificateTLS method or the SetServerCertificateTLS method when the private key file is password encrypted. When processing this event, set the SSLPrivateKeyPassword property to the string that was used to encrypt the private key file.

See Also

Elements: | SetClientCertificateTLS method, SetServerCertificateTLS method, SSLPrivateKeyPassword property, NetworkSecurityMode property
Topics: | DICOM Network Connection:Creating a Network Connection
 | DICOM Security: Working with TLS
 | Adding TLS Secuirty to a DICOM Connection


Accept method (ILEADDicomNet)

Visual Basic example | Visual C++ 6.0 example
VB.NET example | C# example

Syntax | short Accept ();
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Accepts the latest connection request on a control that is setup as a server.

When a client requests a connection by calling the Connect method, the NetAccept event is generated on the server. Within the NetAccept event the server can decide whether to accept the connection or not. If the connection is accepted, the Accept method is called. This generates the NetConnect event on the client, letting the client know the connection has been made.

You should always accept a connection request. Once the connection is made you can check the SCU and close the connection if you do not wish to maintain it. Since the connection requests are queued, if you do not accept a connection, it remains in the queue. When the next request is received, it is placed in the queue behind the first request. Calling the Accept method at this point will connect the first request, not the second, since the first request is still in the queue.

See Also

Elements: | Connect method, Listen method, NetConnect event, NetAccept event, UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLCAFile property, SSLVerifyDepth property, SSLSuccess property, SSLOptions property, SSLPrivateKeyPassword property, SSLPrivateKeyPasswordEvent event
Topics: | DICOM Network Connection: Creating a Network Connection


AddPresentation method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AddPresentation (long hPDU, short nID, short nResult, BSTR pszAbstract);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Adds a Presentation Context to the specified DICOM Associate.

A DICOM Associate (Request or Accept) can have multiple Presentation Contexts. A Presentation Context can be added by specifying a unique ID for the new Presentation Context and valid values for the Result (Associate Accept Presentation Context entries only) and the Abstract Syntax.

See Also

Elements: | GetPresentationID method, GetPresentationAbstract method, GetPresentationResult method, GetPresentationCount method, DeletePresentation method, SetPresentationID method, SetPresentationAbstract method, SetPresentationResult method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


AddTransferSyntax method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AddTransferSyntax (long hPDU, short nID, BSTR pszUID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Adds a Transfer Syntax to the specified Presentation Context.

A DICOM Associate (Request or Accept) can have multiple Presentation Contexts. A Transfer Syntax can be added by specifying the ID for the appropriate Presentation Context to which to add the Transfer Syntax.

See Also

Elements: | GetTransfer Syntax method, GetTransferCount method, SetTransferSyntax method, DeleteTransferSyntax method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


AddUserInfo method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AddUserInfo (long hPDU, short nType, VARIANT *pData, short nLength);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Appends a User-defined item to the specified DICOM Associate.

User-defined items may be included in the DICOM Associate to provide any other data the user finds necessary when establishing a DICOM Associate connection. The basic structure of the User-defined item is

where the Type, Length and User Data are all determined by the user. The values shown are the lengths, in bytes, of the elements of the User-defined item.

See Also

Elements: | GetUserInfoCount method, GetUserInfoLength method, GetUserInfoData method, GetUserInfoType method, SetUserInfo method, DeleteUserInfo method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


Close method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void Close (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Closes the connection between an associated SCU and SCP.

Calling this method generates a NetClose event . The NetClose event is useful to both SCUs and SCPs.

Calling Close closes the connection between an associated SCU and SCP. The Network connection itself is not shutdown until the ShutDown method is called.

See Also

Elements: | Accept method, Connect method, NetClose event
Topics: | DICOM Network Connection: Closing a Network Connection


CloseForced method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short CloseForced(long hNet, VARIANT_BOOL bForced);
Overview | Refer to Closing an ISCL Connection

Remarks

(Medical Imaging Suite only) Closes an ISCL connection.

When bForced is TRUE, the connection is closed immediately. Therefore, it is best to determine if the ISCL message queue is empty before calling this method. To determine whether the ISCL queue is empty, use the IsISCLQueueEmpty method.

Please note that CloseForced(hNet, FALSE) is queued in the ISCL message queue. (It will be processed later.) CloseForced(hNet, TRUE) is immediate, however.

See Also

Elements: | IsISCLQueueEmpty method
Topics: | DICOM Security: Working with ISCL


Connect method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Connect (BSTR pszHost, long lHostPort, BSTR pszPeer, long lPeerPort);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Connects an SCU to an SCP.

If pszHostAddress is "" or NULL, the IP address will be the local computer's address.

If nHostPort is 0, the port number will be the number of the first available port.

To connect to an SCP as an SCU, you must first create and initialize a handle to the DICOM Network using the StartUp method. Then call the Connect method to establish the connection.

To use your computer as an SCP, you must first create and initialize a handle to the DICOM Network using the StartUp method. Then call the Listen method to listen for incoming connection requests.

When an SCU calls this function, it generates a NetAccept event on the SCP.

See Also

Elements: | StartUp method, Listen method
Topics: | DICOM Network Connection: Creating a Network Connection


CreateAssociate method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short CreateAssociate (BOOL bRequest);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Creates a handle to a DICOM Associate of the specified type. This updates the hPDU property.

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.

The characteristics of the DICOM Associate Connection may be set using the DefaultAssociate method or by calling the following methods:

SetRequest method

SetVersion method

SetCalled method

SetCalling method

SetApplication method

SetPresentationAbstract method

SetPresentationID method

SetPresentationResult method

SetTransferSyntax method

SetMaxLength method

SetImplementClass method

SetAsyncOperations method

SetRoleSelect method

SetImplementVersion method

SetUserInfo method

SetExtendedData method

When the DICOM Association is no longer needed, it should be closed. For more information, refer to Closing a DICOM Associate Connection.

See Also

Elements: | FreeAssociate method, DefaultAssociate method, ResetAssociate method, SetRequest method,SetVersion method, SetCalled method, SetCalling method, SetApplication method, SetPresentationID method, SetPresentationResult method, SetPresentationAbstract method, SetTransferSyntax method, SetMaxLength method, SetImplementClass method, SetAsyncOperations method, SetRoleSelect method, SetImplementVersion method, SetUserInfo method, SetExtendedData method
Topics: | DICOM Associate Connection: Creating an Associate Connection


DefaultAssociate method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DefaultAssociate (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the default values for the specified DICOM Associate handle.

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.

The characteristics of the DICOM Associate Connection may be set using DefaultAssociate or by calling the following methods:

SetRequest method

SetVersion method

SetCalled method

SetCalling method

SetApplication method

SetPresentationAbstract method

SetPresentationID method

SetPresentationResult method

SetTransferSyntax method

SetMaxLength method

SetImplementClass method

SetAsyncOperations method

SetRoleSelect method

SetImplementVersion method

SetUserInfo method

SetExtendedData method

When the DICOM Association is no longer needed, it should be closed. For more information, refer to Closing a DICOM Associate Connection.

See Also

Elements: | FreeAssociate method, ResetAssociate method, SetRequest method,SetVersion method, SetCalled method, SetCalling method, SetApplication method, SetPresentationID method, SetPresentationResult method, SetPresentationAbstract method, SetTransferSyntax method, SetMaxLength method, SetImplementClass method, SetAsyncOperations method, SetRoleSelect method, SetImplementVersion method, SetUserInfo method, SetExtendedData method
Topics: | DICOM Associate Connection: Creating an Associate Connection


DeletePresentation method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DeletePresentation (long hPDU, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Deletes a presentation context in the specified DICOM Associate.

A DICOM Associate can have multiple presentation contexts. Any of these can be deleted by passing the appropriate value for nID.

To determine the number of presentation contexts a DICOM Associate has, call the GetPresentationCount method.

See Also

Elements: | AddPresentation method, SetPresentationAbstract method, SetPresentationID method, SetPresentationResult method, GetPresentationAbstract method, GetPresentationID method, GetPresentationResult method, GetPresentationCount method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


DeleteTransferSyntax method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DeleteTransferSyntax (long hPDU, short nID, long lIndex);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Deletes a Transfer Syntax from the specified Presentation Context.

A DICOM Associate (Request or Accept) can have multiple Presentation Contexts. A DICOM Associate Request can have multiple Transfer Syntax entries for each Presentation Context. A Transfer Syntax can be deleted by specifying the ID for the appropriate Presentation Context and the index for the appropriate Transfer Syntax.

See Also

Elements: | GetTransferCount method, GetTransferSyntax method, SetTransferSyntax method, AddTransferSyntax method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


DeleteUserInfo method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void DeleteUserInfo (long hPDU, long lIndex);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Deletes a user-defined item.

For more information about User-defined items, refer to AddUserInfo method.

See Also

Elements: | GetUserInfoCount method, GetUserInfoLength method, GetUserInfoData method, SetUserInfo method, AddUserInfo method, GetUserInfoType method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


FindPresentationAbstract method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short FindPresentationAbstract (long hPDU, BSTR pszUID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the ID for the specified Abstract Syntax in the specified DICOM Associate. This method will return 0 if the specified Abstract Syntax cannot be found in the specified DICOM Associate.

The Abstract Syntax provides information about the class type of the data that will be transferred across the DICOM Associate connection.

This method is valid only for DICOM Associates of type Associate Request.

To get the Abstract Syntax of a specific Presentation Context, call GetPresentationAbstract method.

To set the Abstract Syntax of a specific Presentation Context, call SetPresentationAbstract method.

See Also

Elements: | GetPresentationAbstract method, SetPresentationAbstract method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


FreeAssociate method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void FreeAssociate (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Frees the memory allocated for the specified DICOM Associate.

This method frees the memory allocated using the CreateAssociate method, and should be called after the DICOM Associate Connection has been closed. For more information, refer to Closing a DICOM Associate Connection.

See Also

Elements: | CreateAssociate method
Topics: | DICOM Network Connection: Closing a Network Connection


GetApplication method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetApplication (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the Application Context for the specified DICOM Associate.

The default value for the Application Context is "1.2.840.10008.3.1.1.1" (UID_APPLICATION_CONTEXT_NAME).

See Also

Elements: | SetApplication method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetAssociate method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetAssociate (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Returns the DICOM Associate handle for the specified DICOM Network handle.

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Association.

When the DICOM Association is no longer needed, it should be ended. For more information, refer to Closing a DICOM Associate Connection.

See Also

Topics: | DICOM Network Connection: DICOM Associate Connection Messages
 | DICOM Network Connection: Getting Information About a Network Connection


GetAuthenticationAlgorithmTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetAuthenticationAlgorithmTLS(long hNet, long nCipher);
Overview | Refer to Negotiating a Ciphersuite

Remarks

(Medical Imaging Suite only) Returns the mutual authentication mode or algorithm for the cipher.

There are several different cipher suites. Some differ only in the mutual authentication algorithm. Usually the authentication algorithm is based on RSA or DSS certificates.

See Also

Elements: | GetEncryptionAlgorithmTLS method, GetIntegrityAlgorithmTLS method, GetKeyExchangeAlgorithmTLS method, GetEncryptKeyLengthTLS method, GetMutualAuthKeyLengthTLS method
Topics: | DICOM Security :Working with TLS


GetCalled method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetCalled (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the name of the Application Entity that was called.

For more information on the structure of an Associate, refer to LEADTOOLS DICOM Network Communication Support for Message Exchange.

See Also

Elements: | SetCalled method, GetCalling method, SetCalling method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetCalling method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetCalling (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the name of the calling Application Entity of the specified DICOM Associate.

See Also

Elements: | SetCalling method, GetCalled method, SetCalled method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetCipherFromIndexTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetCipherFromIndexTLS(long hNet, long nIndex);
Overview | Refer to Negotiating a Ciphersuite

Remarks

(Medical Imaging Suite only) Returns a value that represents the ciphersuite present at the specified index.

More ciphersuites from the TLS standard can be added. Currently however, LEADTOOLS only supports those ciphersuites listed in Supported Ciphersuites

See Also

Elements: | SetCipherToIndexTLS method, GetCiphersuiteTLS method
Topics: | DICOM Security :Working with TLS


GetCiphersuiteTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetCiphersuiteTLS(long hNet);
Overview | Refer to Adding TLS Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Returns the cipher suite agreed upon during the TLS protocol.

The ciphersuite is chosen by the server as the first client proposed ciphersuite that the server can understand.

See Also

Elements: | GetCipherFromIndexTLS method
Topics: | DICOM Security :Working with TLS


GetClient method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetClient (long hNet, lIndex);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Returns the DICOM Network handle of the client at the specified index.

This method is only valid when called by an SCP. If this method is called by an SCU, it will return NULL.

See Also

Elements: | GetClientCount method, GetServer method
Topics: | DICOM Network Connection: Getting Information About a Network Connection


GetClientCount method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetClientCount (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Returns the number of SCUs connected to the SCP.

This method is only valid when called by an SCP. If this method is called by an SCU, it will return 0.

See Also

Elements: | GetClient method, GetServer method
Topics: | DICOM Network Connection: Getting Information About a Network Connection


GetCommBlockLengthISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetCommBlockLengthISCL(long hNet);
Overview | Refer to Establishing an ISCL Line Connection

Remarks

(Medical Imaging Suite only) Returns the communication block length agreed upon during mutual authentication.

Using a block size that is too small or too big could impact performance.

See Also

Elements: | SetMaxCommBlockLengthISCL method
Topics: | DICOM Security: Working with ISCL


GetEncryptionAlgorithmTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetEncryptionAlgorithmTLS(long hNet, long nCipher);
Overview | Refer to Adding TLS Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Returns the encryption mode (DES, 3DES, etc) for the cipher.

There are several different cipher suites. Some of these differ only in encryption mode or algorithm.

See Also

Elements: | GetAuthenticationAlgorithmTLS method, GetIntegrityAlgorithmTLS method, GetKeyExchangeAlgorithmTLS method, GetEncryptKeyLengthTLS method, GetMutualAuthKeyLengthTLS method
Topics: | DICOM Security :Working with TLS


GetEncryptKeyLengthTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetEncryptKeyLengthTLS(long hNet, long nCipher);
Overview | Refer to Negotiating a Ciphersuite

Remarks

(Medical Imaging Suite only) Returns the effective length (in bits) of the encryption key associated with the specified ciphersuite (56 for DES etc).

There are differences between the size of the key and the effective length. The security of a key is given by the effective length, not by the size (a DES key has 8 bytes, just like a DES40 key, but the first has 56 bits effective, and the second only 40.)

See Also

Elements: | GetAuthenticationAlgorithmTLS method, GetIntegrityAlgorithmTLS method, GetEncryptionAlgorithmTLS method, GetKeyExchangeAlgorithmTLS method, GetMutualAuthKeyLengthTLS method
Topics: | DICOM Security :Working with TLS


GetErrorSecure method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetErrorSecure(long hNet);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) Returns a special ISCL or TLS error.

The errors returned by this method may be useful for debugging purposes.

See Also

Elements: | GetStatusISCL method
Topics: | DICOM Security :Working with TLS
 | DICOM Security: Working with ISCL


GetExtendedData method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT GetExtendedData (long hPDU, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the extended data associated with the specified Presentation Context.

To retrieve the length of the extended data associated with a Presentation Context, call GetExtendedDataLength method.

To set extended data associated with a Presentation Context, call SetExtendedData method.

See Also

Elements: | GetExtendedDataLength method, SetExtendedData method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetExtendedDataLength method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetExtendedDataLength (short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the length of the extended data associated with the specified Presentation Context.

To retrieve the extended data associated with a Presentation Context, call GetExtendedData method.

To set extended data associated with a Presentation Context, call SetExtendedData method.

See Also

Elements: | GetExtendedData method, SetExtendedData method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetHostAddress method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetHostAddress (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Gets the local address for the specified connection.

To get the local port value for the specified connection, call the GetHostPort method.

To get information about a peer, use the GetPeerAddress method and the GetPeerPort method.

See Also

Elements: | GetHostPort method, GetPeerAddress method, GetPeerPort method
Topics: | DICOM Network Connection: Getting Information About a Network Connection


GetHostPort method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetHostPort (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Gets the local port for the specified connection.

To get the local address for the specified connection, call the GetHostAddress method.

To get information about a peer, use the GetPeerAddress method and the GetPeerPort method.

See Also

Elements: | GetHostAddress method, GetPeerAddress method, GetPeerPort method
Topics: | DICOM Network Connection: Getting Information About a Network Connection


GetImplementClass method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetImplementClass (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the Implementation Class name for the specified DICOM Associate.

Setting the Implementation Class can be disabled, or enabled and set using SetImplementClass method.

See Also

Elements: | IsImplementClass method, SetImplementClass method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetImplementVersion method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetImplementVersion (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the Implementation Version for the specified DICOM Associate.

Setting the Implementation Version can be disabled, or enabled and set using SetImplementVersion method.

See Also

Elements: | IsImplementVersion method, SetImplementVersion method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetIndexForEncryptISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetIndexForEncryptISCL(long hNet);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Gets the current index of the encryption key.

See Also

Elements: | SetEncryptKeyISCL method, SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL method, GetIndexForMutualAuthISCL method
Topics: | DICOM Security: Working with ISCL


GetIndexForMutualAuthISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetIndexForMutualAuthISCL(long hNet);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Gets the current index of the mutual authentication key to be used during the mutual authentication process.

This method gets the index of the actual key used for mutual authentication operations. This index can be between 1 and 8, inclusively.

See Also

Elements: | SetIndexForMutualAuthISCL method, SetMutualAuthKeyISCL method, SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetEncryptKeyISCL method, SetIndexForEncryptISCL method
Topics: | DICOM Security: Working with ISCL


GetIntegrityAlgorithmTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetIntegrityAlgorithmTLS(long hNet, long nCipher);
Overview | Refer to Adding TLS Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Returns the message authentication code type (MD5, SHA) for the cipher.

There are several different cipher suites. Some differ only in the MAC algorithm.

See Also

Elements: | GetAuthenticationAlgorithmTLS method, GetEncryptionAlgorithmTLS method, GetKeyExchangeAlgorithmTLS method, GetEncryptKeyLengthTLS method, GetMutualAuthKeyLengthTLS method
Topics: | DICOM Security :Working with TLS


GetInvokedOperationsCount method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetInvokedOperationsCount (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the number of Asynchronous Operations that may be invoked for the specified DICOM Associate connection.

If a DICOM Associate connection does not support Asynchronous Operations, then an Application Entity must wait for the response from one message before sending another. If Asynchronous Operations are supported, multiple messages may be sent without waiting for a response. The number of messages that may be sent is set using SetAsyncOperations method.

To determine the number of Asynchronous Operations that may be invoked without a response, call the GetInvokedOperationsCount method. To determine the number of operations that have been completed, call the GetPerformedOperationsCount method.

See Also

Elements: | IsAsyncOperations method, GetPerformedOperationsCount method, SetAsyncOperations method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetKeyExchangeAlgorithmTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetKeyExchangeAlgorithmTLS(long hNet, long nCipher);
Overview | Refer to Negotiating a Ciphersuite

Remarks

(Medical Imaging Suite only) Returns a value that represents the key exchange algorithm.

The key exchange algorithm is the algorithm for securely generating secret keys.

There are several different cipher suites. Some differ only in the key exchange algorithm.

See Also

Elements: | GetAuthenticationAlgorithmTLS method, GetIntegrityAlgorithmTLS method, GetEncryptionAlgorithmTLS method, GetEncryptKeyLengthTLS method, GetMutualAuthKeyLengthTLS method
Topics: | DICOM Security :Working with TLS


GetMaxLength method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetMaxLength (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the Maximum Length for data transfer, in bytes.

If the Maximum Length restriction is enabled the Maximum Length must be 0, or >= 8 and it must be an even number (8, 10, 12, …).

See Also

Elements: | IsMaxLengthEnabled method, SetMaxLength method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetMutualAuthKeyLengthTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetMutualAuthKeyLengthTLS(long hNet, long nCipher);
Overview | Refer to Negotiating a Ciphersuite

Remarks

(Medical Imaging Suite only) Returns the effective length (in bits) of the mutual authentication key associated with the specified ciphersuite.

The usual sizes for a RSA key is 512 and 1024 bits. There is a limitation for import in Europe – a RSA key must be at least 768 bits long. There are no known export restrictions. In addition, the length of the mutual authentication key can be found only after a successful call to the SetClientCertificateTLS or SetServerCertificateTLS method.

See Also

Elements: | GetAuthenticationAlgorithmTLS method, GetIntegrityAlgorithmTLS method, GetEncryptionAlgorithmTLS method, GetKeyExchangeAlgorithmTLS method, GetEncryptKeyLengthTLS method
Topics: | DICOM Security :Working with TLS


GetPeerAddress method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetPeerAddress (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Gets the peer address for the specified connection.

To get the peer port value for the specified connection, call the GetPeerPort method.

To get information about the host, use the GetHostAddress method and the GetHostPort method.

See Also

Elements: | GetHostPort method, GetHostAddress method, GetPeerPort method
Topics: | DICOM Network Connection: Getting Information About a Network Connection


GetPeerAuthDataISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | short GetPeerAuthDataISCL(long hNet, VARIANT *vBuffer, long *nLength);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) Gets the authentication data the peer computer sent during mutual authentication.

The receiver of a message can only call this method, if the message is not successfully received.

See Also

Elements: | StartUp method, GetPeerMACISCL method, GetPeerEncryptionISCL method, GetPeerRequestedMessageLengthISCL method
Topics: | DICOM Security: Working with ISCL


GetPeerEcryptionISCL method (ILEADDicomNet)

GetPeerEncryptionISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetPeerEncryptionISCL(long hNet);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) Returns a value that represents the encryption mode the sender used when sending a message.

If the encryption mode is not the same for the sender and the receiver, the message will not be sent successfully. If the MAC type is not the same on the sender and the receiver, the message will not be sent successfully.

The GetPeerEncryptionISCL method can only be called by the receiver, once the sender has attempted to send a message.

To set the encryption mode, use the SetDefaultEncryptionISCL method.

To set the MAC type, use the SetDefaultSigningISCL method.

The encryption mode and the MAC are specified for every message, not for each connection. Every message can have a different encryption mode and MAC, keeping the connection parameters unchanged.

See Also

Elements: | StartUp method, GetPeerMACISCL method, GetPeerAuthDataISCL method, GetPeerRequestedMessageLengthISCL method, GetPeerEncryptionISCL method
Topics: | DICOM Security: Working with ISCL


GetPeerMACISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetPeerMACISCL(long hNet);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) Returns a value that represents the MAC type the sender used when sending a message to the receiver.

If the type of MAC is not the same for the sender and the receiver, the message will not be sent successfully. If the encryption mode is not the same on the sender and the receiver, the message will not be sent successfully.

The GetPeerMACISCL method can only be called by the receiver, once the sender has attempted to send a message.

To set the MAC type, use the SetDefaultSigningISCL method.

To set the encryption mode, use the SetDefaultEncryptionISCL method.

The encryption mode and the MAC are specified for every message, not for each connection. Every message can have a different encryption mode and MAC, keeping the connection parameters unchanged.

See Also

Elements: | StartUp method, GetPeerEncryptionISCL method, GetPeerAuthDataISCL method, GetPeerRequestedMessageLengthISCL method
Topics: | DICOM Security: Working with ISCL


GetPeerPort method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetPeerPort (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Gets the peer port for the specified connection.

To get the peer address for the specified connection, call the GetPeerAddress method.

To get information about the host, use the GetHostAddress method and the GetHostPort method.

See Also

Elements: | GetPeerAddress method, GetHostAddress method, GetHostPort method
Topics: | DICOM Network Connection: Getting Information About a Network Connection


GetPeerRequestedMessageLengthISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetPeerRequestedMessageLengthISCL(long hNet);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) Gets the length of the message sent unsuccessfully by a peer computer.

If the message size limit of the server is less than that of the client and the client tries to send a very long message, problems may occur on the server.

If on a server there is a limit for message size smaller than the one of the client, a client can try to send a very long message. This can lead to problems on the server.

See Also

Elements: | StartUp method, GetPeerMACISCL method, GetPeerAuthDataISCL method, GetPeerEncryptionISCL method
Topics: | DICOM Security: Working with ISCL


GetPerformedOperationsCount method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetPerformedOperationsCount (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the number of completed Asynchronous Operations.

If a DICOM Associate connection does not support Asynchronous Operations, then an Application Entity must wait for the response from one message before sending another. If Asynchronous Operations are supported, multiple messages may be sent without waiting for a response. The number of messages that may be sent is set using SetAsyncOperations method.

To determine the number of Asynchronous Operations that may be invoked without a response, call the GetInvokedOperationsCount method. To determine the number of operations that have been completed, call the GetPerformedOperationsCount method.

See Also

Elements: | IsAsyncOperations method, GetInvokedOperationsCount method, SetAsyncOperations method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetPresentationAbstract method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetPresentationAbstract (long hPDU, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Gets the Abstract Syntax for the specified Presentation Context of the specified DICOM Associate.

The Abstract Syntax of the specified Presentation Context of the specified DICOM Associate. For a list of possible values, refer to Abstract Syntax Values.

This method is valid only for DICOM Associates of type Associate Request.

To set the Abstract Syntax of a specific Presentation Context, call the SetPresentationAbstract method.

See Also

Elements: | SetPresentationAbstract method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetPresentationCount method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetPresentationCount (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the number of Presentation Context entries for the specified DICOM Associate.

A DICOM Associate can have multiple Presentation Context entries. This method returns the number of Presentation Context entries in the specified DICOM Associate.

See Also

Elements: | GetPresentationAbstract method, GetPresentationID method, GetPresentationResult method, SetPresentationAbstract method, SetPresentationID method, SetPresentationResult method, AddPresentation method, DeletePresentation method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetPresentationID method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetPresentationID (long hPDU, long lIndex);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the Presentation Context ID of the Presentation Context at the specified index, for the specified DICOM Associate.

A DICOM Associate (Request or Accept) can have multiple Presentation Contexts. The Presentation ID can be retrieved by passing the appropriate value for nIndex.

To determine the number of presentation contexts a DICOM Associate has, call GetPresentationCount method.

See Also

Elements: | GetPresentationAbstract method, GetPresentationCount method, GetPresentationResult method, SetPresentationAbstract method, SetPresentationID method, SetPresentationResult method, AddPresentation method, DeletePresentation method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetPresentationResult method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetPresentationResult (long hPDU, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the result of the specified Presentation Context of the specified DICOM Associate.

This method is only valid for DICOM Associates of type Associate Accept.

See Also

Elements: | GetPresentationAbstract method, GetPresentationID method, GetPresentationCount method, SetPresentationAbstract method, SetPresentationID method, SetPresentationResult method, AddPresentation method, DeletePresentation method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetProviderRole method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetProviderRole (long hPDU, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the value for the Provider Role of the specified Presentation Context of the specified DICOM Associate.

Support for the Provider Role allows the Application Entity to act as an SCP for that Presentation Context.

To enable Role Selection, call the SetRoleSelect method.

To set the User and Provider Roles, call SetRoleSelect method.

See Also

Elements: | IsRoleSelect method, GetUserRole method, SetRoleSelect method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetSendQueueSize method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetSendQueueSize (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Returns the number of bytes in the send queue.

This method should only be called for an SCU. If it is called for an SCP it will return 0.

See Also

Topics:

DICOM Network Connection: Getting Information About a Network Connection


GetServer method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetServer (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Returns the DICOM Network handle of the SCP.

The handle returned is valid only if the handle passed into the function is for an SCU. If the handle passed to this function is an SCP, this function will return NULL.

See Also

Elements: | GetClient method, GetClientCount method
Topics: | DICOM Network Connection: Getting Information About a Network Connection


GetStatusISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | long GetStatusISCL(long hNet);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) Returns the internal ISCL status when an error occurs.

The current ISCL status is set to neutral if certain errors occur, and to 0 if other errors occur.

Use returned error codes with the ISCL internal status returned by this method, to find where an error occurred. For example, DICOM_ERROR_ISCL_LOCAL_ICCARD can occur during NetGetChallengeISCL event , NetInternalAuthenticateISCL event or NetExternalAuthenticateISCL event

See Also

Elements: | GetErrorSecure method
Topics: | DICOM Security: Working with ISCL


GetTransferCount method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetTransferCount (long hPDU, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the number of Transfer Syntax entries for the specified Presentation Context.

A DICOM Associate can have more than one Presentation Context. The nID parameter identifies which Presentation Context to use when getting the number of Transfer Syntax entries.

A Presentation Context for an Associate Accept has only one Transfer Syntax. Therefore if you call this function for the Presentation Context of a DICOM Associate Accept, it will return 1.

See Also

Elements: | GetTransferSyntax method, SetTransferSyntax method, AddTransferSyntax method, DeleteTransferSyntax method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetTransferSyntax method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetTransferSyntax (long hPDU, short nID, long lIndex);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the Transfer Syntax for the specified Presentation Context and index.

A DICOM Associate (Request or Accept) can have multiple Presentation Contexts. A DICOM Associate Request can have multiple Transfer Syntax entries for each Presentation Context. A Transfer Syntax can be retrieved by specifying the ID for the appropriate Presentation Context and the index for the appropriate Transfer Syntax.

See Also

Elements: | DeleteTransferSyntax method, SetTransferSyntax method, GetTransferCount method, AddTransferSyntax method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetUserInfoCount method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GetUserInfoCount (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the number of User-defined items in the specified DICOM Associate.

For more information about User-defined items, refer to AddUserInfo method.

See Also

Elements: | GetUserInfoType method, GetUserInfoLength method, GetUserInfoData method, SetUserInfo method, AddUserInfo method, DeleteUserInfo method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetUserInfoData method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT GetUserInfoData (long hPDU, long lIndex);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the data of the User-defined item.

For more information about User-defined items, refer to AddUserInfo method.

See Also

Elements: | GetUserInfoType method, GetUserInfoLength method, GetUserInfoCount method, SetUserInfo method, AddUserInfo method, DeleteUserInfo method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetUserInfoLength method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetUserInfoLength (long hPDU, long lIndex);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the length of the specified User-defined item.

For more information about User-defined items, refer to AddUserInfo method.

See Also

Elements: | GetUserInfoType method, GetUserInfoCount method, GetUserInfoData method, SetUserInfo method, AddUserInfo method, DeleteUserInfo method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetUserInfoType method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetUserInfoType (long hPDU, long lIndex);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the type of the User-defined item.

For more information about User-defined items, refer to AddUserInfo method.

See Also

Elements: | GetUserInfoLength method, GetUserInfoCount method, GetUserInfoData method, SetUserInfo method, AddUserInfo method, DeleteUserInfo method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetUserRole method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetUserRole (long hPDU, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the value for the User Role of the specified Presentation Context of the specified DICOM Associate.

Support for the User Role allows the Application Entity to act as an SCU for that Presentation Context.

To enable Role Selection, call SetRoleSelect method.

To set the User and Provider Roles, call SetRoleSelect method.

See Also

Elements: | IsRoleSelect method, GetProviderRole method, SetRoleSelect method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


GetVersion method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetVersion (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns the version of the specified DICOM Associate.

The default value is 1.

See Also

Elements: | SetVersion method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


IsActivated method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsActivated (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Indicates whether the specified connection has been activated.

A connection is activated by calling the Listen method, the Connect method, or the Accept method. Therefore, if any of these functions have been called for the connection, this function will return TRUE. Otherwise it will return FALSE.

Note that when the control is acting as a server, the connection is always considered Activated, Connected and Not Associated.

See Also

Elements: | Connect method, Listen method, Accept method, StartUp method
Topics: | Creating a DICOM Network Connection
 | Creating a DICOM Associate Connection
 | DICOM Network Connection: Getting Information About a Network Connection


IsAssociated method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsAssociated (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Indicates whether the specified connection has been associated.

A connection has been associated if the SCP of the connection has called SendAssociateAccept method and the NetReceiveAssociateAccept event was generated on the SCU of the connection. If this exchange has occurred, this function will return TRUE, otherwise it will return FALSE.

For more information on creating an associated connection, refer to Creating a DICOM Association.

See Also

Elements: | SendAssociateAccept method, NetReceiveAssociateAccept event, CreateAssociate method, StartUp method, SendAssociateRequest method
Topics: | Creating a DICOM Network Connection
 | Creating a DICOM Associate Connection
 | DICOM Network Connection: Getting Information About a Network Connection


IsAsyncOperations method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsAsyncOperations (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Determines whether Asynchronous Operations are supported.

If a DICOM Associate connection does not support Asynchronous Operations, then an Application Entity must wait for the response from one message before sending another. If Asynchronous Operations are supported, multiple messages may be sent without waiting for a response. The number of messages that may be sent is set using the SetAsyncOperations method.

To determine the number of Asynchronous Operations that may be invoked without a response, call the GetInvokedOperationsCount method. To determine the number of operations that have been completed, call the GetPerformedOperationsCount method.

See Also

Elements:

GetInvokedOperationsCount method, GetPerformedOperationsCount method, SetAsyncOperations method


IsConnected method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsConnected (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Indicates whether a connection has been established.

A connection is created by an SCU calling the Connect method and the SCP responding by calling the Accept method. If this has occurred successfully, this function will return TRUE. Otherwise, it will return FALSE.

For more information on creating a connection, refer to Creating a DICOM Network Connection.

Note that when the control is acting as a server, the connection is always considered Activated, Connected and Not Associated.

See Also

Elements: | Connect method, Accept method, StartUp method
Topics: | Creating a DICOM Network Connection
 | Creating a DICOM Associate Connection
 | DICOM Network Connection: Getting Information About a Network Connection


IsImplementClass method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsImplementClass (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Determines whether setting the Implementation Class is enabled for the specified DICOM Associate.

If setting the Implementation Class is enabled, the name may be retrieved using GetImplementClass method, or set using SetImplementClass method.

See Also

Elements: | GetImplementClass method, SetImplementClass method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


IsImplementVersion method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsImplementVersion (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Determines whether setting the Implementation Version is enabled for the specified DICOM Associate.

If setting the Implementation Version is enabled, the name may be retrieved using GetImplementVersion method, or set using , SetImplementVersion method.

See Also

Elements: | GetImplementVersion method, SetImplementVersion method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


IsISCLQueueEmpty method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 5.0 example

Syntax | VARIANT_BOOL IsISCLQueueEmpty(long hNet);
Overview | Refer to Closing an ISCL Connection

Remarks

(Medical Imaging Suite only) Determines whether the ISCL transmission queue is empty.

The ISCL messages are added to the ISCL transmission queue, and will be sent in order on the network. Every object has its own ISCL transmission queue.

The ISCL transmission queue contains requests to send data, requests to send non-secure data and requests for closing the connection. Closing the connection does not start until all send requests are processed.

See Also

Elements: | SendCEchoRequest method, CloseForced method
Topics: | DICOM Security: Working with ISCL


IsMaxLengthEnabled method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsMaxLengthEnabled (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Determine whether the Maximum Length restriction is enabled or disabled for the specified DICOM Associate.

A Maximum Length restriction can be placed on the data transport across a DICOM Associate connection. If the restriction is enabled, the value may be retrieved using GetMaxLength method, or set using SetMaxLength method.

To enable or disable the Maximum Length restriction, call SetMaxLength method.

See Also

Elements: | GetMaxLength method, SetMaxLength method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


IsRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsRequest (long hPDU);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Returns a value that indicates the type of the specified Associate (Request or Accept).

See Also

Elements: | SetRequest method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


IsRoleSelect method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BOOL IsRoleSelect (long hPDU, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Determines whether Role Selection is enabled for the specified Presentation Context of the specified DICOM Associate.

If Role Selection is enabled, the role of the specified Presentation Context can be retrieved using the GetUserRole method and the GetProviderRole method. To set the role of the specified Presentation Context, use SetRoleSelect method.

Role Selection is optional, and is only included in the Associate Request.

See Also

Elements: | GetUserRole method, GetProviderRole method, SetRoleSelect method
Topics: | DICOM Associate Connection: Getting Information About a DICOM Associate Handle


Listen method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Listen (BSTR pszHost, long lPort, long lPeers);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Establishes a connection to listen for incoming connection requests.

If pszHost is "" or NULL, the IP address will be the local computer's address.

If lPort is 0, the port number will be the number of the first available port.

To connect to an SCP as an SCU, you must first create and initialize a handle to the DICOM Network using the StartUp method. Next, customize any events you wish to use. Then call the Connect method to establish the connection.

To use your computer as a server, you must first create and initialize a handle to the DICOM Network using the StartUp method. Next, customize any events you wish to use. Then call the Listen method to listen for incoming connection requests.

See Also

Elements: | StartUp method, Listen method
Topics: | DICOM Network Connection: Creating a Network Connection


ResetAssociate method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ResetAssociate (long hPDU, BOOL bRequest);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Removes all elements from the specified DICOM Associate and resets it to the specified type.

For more information about the structure of a DICOM Associate, refer to LEADTOOLS DICOM Network Communication Support for Message Exchange.

See Also

Elements: | CreateAssociate method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SendAbort method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendAbort (long hNet, short nSource, short nReason);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an Abort message to a connection.

Calling the SendAbort method generates a call to NetReceiveAbort event. At this time the DICOM Association is closed.

Please note that it is preferable to close a DICOM Association using the SendReleaseRequest method and SendReleaseResponse method. For more information on closing a DICOM Association, refer to Closing a DICOM Associate Connection.

See Also

Elements: | SendReleaseResponse method, SendReleaseRequest method
Topics: | Working with DICOM Network Connections
 | Working with DICOM Associate Connections
 | Closing a DICOM Associate Connection
 | Creating a DICOM Associate Connection
 | Sending Messages
 | DICOM Network Connection: DICOM Associate Connection Messages


SendAssociateAccept method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendAssociateAccept (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends the current value of the hPDU property as an Associate Accept message to a connection.

If the hPDU property is not an Associate Accept, an error will occur.

The SendAssociateAccept method is called by the SCP in response to a SendAssociateRequest method call placed by an SCU. It establishes the DICOM Association between an SCU and an SCP and generates a NetReceiveAssociateAccept event on the SCU. The SCU and SCP can now transmit DICOM messages and data.

When the DICOM Association is no longer needed, it should be ended. For more information, refer to Closing a DICOM Associate Connection.

See Also

Elements: | NetReceiveAssociateAccept event, CreateAssociate method, SendAssociateRequest method, SendAssociateReject method, SendReleaseRequest method
Topics: | Working with DICOM Associate Connections
 | Creating a DICOM Associate Connection
 | Creating an SCP
 | Diagram of a Basic Client-Server Set-Up
 | Sending Messages
 | DICOM Network Connection: DICOM Associate Connection Messages


SendAssociateReject method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendAssociateReject (long hNet, short nResult, short nSource, short nReason);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an Associate Reject message to a connection.

The SendAssociateReject method is called by the SCP in response to a SendAssociateRequest method call placed by an SCU. It generates a NetReceiveAssociateReject event on the SCU.

See Also

Elements: | NetReceiveAssociateReject event, CreateAssociate method, SendAssociateRequest method, SendAssociateAccept method, SendReleaseRequest method
Topics: | Working with DICOM Associate Connections
 | Creating a DICOM Associate Connection
 | Creating an SCP
 | Diagram of a Basic SCU-SCP Set-Up
 | Sending Messages
 | DICOM Network Connection: DICOM Associate Connection Messages


SendAssociateRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendAssociateRequest (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends the current value of the hPDU property as an Associate Request message to a connection.

If the hPDU property is not an Associate Request, an error will occur.

Calling the SendAssociateRequest method on an SCU generates a NetReceiveAssociateRequest event on the SCP. Within the event the SCP may accept or reject the Association request by calling the SendAssociateAccept method or the SendAssociateReject method.

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.

When the DICOM Association is no longer needed, it should be ended. For more information, refer to Closing a DICOM Associate Connection.

See Also

Elements: | NetReceiveAssociateRequest event, CreateAssociate method, SendAssociateAccept method, SendAssociateReject method, SendReleaseRequest method
Topics: | Working with DICOM Associate Connections
 | Creating a DICOM Associate Connection
 | Creating an SCU
 | Diagram of a Basic Client-Server Set-Up
 | Sending Messages
 | DICOM Network Connection: DICOM Associate Connection Messages


SendCCancelRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCCancelRequest ( long hNet, short nPresentationID, short nMessageID);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-CANCEL-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveCCancelRequest event on the SCP.

See Also

Elements: | NetReceiveCCancelRequest event
Topics: | DICOM Network Connection: Sending Data Messages


SendCEchoRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCEchoRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-ECHO-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveCEchoRequest event on the SCP. The SCP should respond by calling the SendCEchoResponse method which will generate a NetReceiveCEchoResponse event.

See Also

Elements: | SendCEchoResponse method, NetReceiveCEchoRequest event, NetReceiveCEchoResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendCEchoResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCEchoResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nStatus);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-ECHO-RSP message to a peer member of a connection.

The SendCEchoResponse method is called by the SCP in response to a SendCEchoRequest method call placed by an SCU. This generates a NetReceiveCEchoResponse event on the SCU.

See Also

Elements: | SendCEchoRequest method, NetReceiveCEchoRequest event, NetReceiveCEchoResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendCFindRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCFindRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nPriority, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-FIND-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveCFindRequest event on the SCP. The SCP should respond by calling the SendCFindResponse method which will generate a NetReceiveCFindResponse event.

You must create a data set and insert elements corresponding to the data you wish to find. A pointer to this data set is then passed as a parameter to this function.

See Also

Elements: | SendCFindResponse method, NetReceiveCFindRequest event, NetReceiveCFindResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendCFindResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCFindResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nStatus, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-FIND-RSP message to a peer member of a connection.

The SendCFindResponse method is called by the SCP in response to a SendCFindRequest method call placed by an SCU. This generates a NetReceiveCFindResponse event on the SCU.

See Also

Elements: | SendCFindRequest method, NetReceiveCFindResponse event, NetReceiveCFindRequest event
Topics: | DICOM Network Connection: Sending Data Messages


SendCGetRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCGetRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nPriority, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-GET-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveCGetRequest event on the SCP. The SCP should respond by calling the SendCGetResponse method which will generate a call to NetReceiveCGetResponse event.

You must create a data set and insert elements corresponding to the data you wish to get. The data set returned will include the entire data set that includes the requested data.

See Also

Elements: | SendCGetResponse method, NetReceiveCGetRequest event, NetReceiveCGetResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendCGetResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCGetResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nStatus, short nRemaining, short nCompleted, short nFailed, short nWarning, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-GET-RSP message to a peer member of a connection.

The SendCGetResponse method is sent by the SCP in response to an SendCGetRequest method call placed by an SCU. This generates a NetReceiveCGetResponse event on the SCU.

As an example, suppose an SCU requests an SCP to search all CT class instances for specific data. If the SCP has three CT class instances present, it must search all three instances for the required data. During the search, the SendCGetResponse method may be called multiple times. The table below gives examples of possible parameter values for the calls made to the SendCGetResponse method during the search:

Point within search | nStatus | nRemaining | nCompleted | nFailed | nWarning
Finished 1st instance | COMMAND_STATUS _PENDING | 2 | 1 | 0 | 0
Finished 2nd instance | COMMAND_STATUS _PENDING | 1 | 2 | 1 | 1
Finished the search | COMMAND_STATUS _SUCCESS | 0 | 3 | 1 | 1

After the first instance is searched, there are 2 remaining instances to search (nRemaining), there is 1 instance that has been completed (nCompleted), no instances have failed the search (nFailed), and there are no warnings(nWarning).

After the second instance is searched, there is 1 remaining instance to search (nRemaining), there are 2 instances that have been completed (nCompleted), 1 instance has failed the search (nFailed), and there is one warning (nWarning).

After the last instance has been searched, there are 0 remaining instances to search (nRemaining), there are 3 instances that have been completed (nCompleted), 1 instance has failed the search (nFailed), and there is one warning (nWarning).

The instance that failed may have failed because one data element you were searching for was not in the instance. For example, you may have included "Patient Birth Date" in the elements to search for and one instance did not include "Patient Birth Date".

Information about the warning may be found in the data set that is returned.

See Also

Elements: | SendCGetRequest method, NetReceiveCGetResponse event, NetReceiveCGetRequest event
Topics: | DICOM Network Connection: Sending Data Messages


SendCMoveRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCMoveRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nPriority, BSTR pszMoveAE, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-MOVE-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveCMoveRequest event on the SCP. The SCP should respond by calling the SendCMoveResponse method which will generate a NetReceiveCMoveResponse event.

See Also

Elements: | SendCMoveResponse method, SendCStoreRequest method, NetReceiveCMoveRequest event, NetReceiveCMoveResponse event, NetReceiveCStoreRequest event, NetReceiveCStoreResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendCMoveResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCMoveResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, short nStatus, short nRemaining, short nCompleted, short nFailed, short nWarning, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-MOVE-RSP message to a peer member of a connection.

The SendCMoveResponse method is called by the SCP in response to a SendCMoveRequest method call placed by an SCU. This generates NetReceiveCMoveResponse event on the SCU.

See Also

Elements: | SendCMoveResponse method, SendCStoreRequest method, NetReceiveCMoveRequest event, NetReceiveCMoveResponse event, NetReceiveCStoreRequest event, NetReceiveCStoreResponse event
Topics: | Moving Composite Data
 | DICOM Network Connection: Sending Data Messages


SendCStoreRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCStoreRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nPriority, BSTR pszMoveAE, short nMoveMessageID, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-STORE-REQ message to a peer member of a connection.

When an SCU requests a Move (C-MOVE-REQ), the SCP may have to call this function to request one or more C-STORE-REQ sub-operations to complete the storage. The series of calls and information transfer in a C-MOVE-REQ is complicated. For more information, refer to Moving Composite Data.

Calling this method generates a NetReceiveCStoreRequest event on the SCP. The SCP should respond by calling the SendCStoreResponse method which will generate a NetReceiveCStoreResponse event.

See Also

Elements: | SendCStoreResponse method, SendCMoveRequest method, NetReceiveCStoreRequest event, NetReceiveCStoreResponse event, NetReceiveCMoveRequest event, NetReceiveCMoveResponse event
Topics: | Moving Composite Data
 | DICOM Network Connection: Sending Data Messages


SendCStoreResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendCStoreResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a C-STORE-RSP message to a peer member of a connection.

The SendCStoreResponse is sent by the SCP in response to a SendCStoreRequest method call placed by an SCU. This generates a NetReceiveCStoreResponse event on the SCU.

See Also

Elements: | SendCStoreRequest method, NetReceiveCStoreRequest event, NetReceiveCStoreResponse event
Topics: | Moving Composite Data
 | DICOM Network Connection: Sending Data Messages


SendData method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendData (long hNet, short nID, long hDicomCS, long hDicomDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a Data message to a connection.

Pass 0 for hDicomDS if the command set does not require an associated Data Set.

This is a low level means of sending DICOM messages and data. It allows you to send messages yourself, instead of using the high level message sending functions provided.

For more information about sending messages, refer to Sending Messages.

See Also

Elements: | NetReceiveData event
Topics: | Working with DICOM Associate Connections
 | DICOM Network Connection: DICOM Associate Connection Messages


SendNActionRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNActionRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nAction, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-ACTION-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveNActionRequest event on the SCP. The SCP should respond by calling the SendNActionResponse method which will generate a NetReceiveNActionResponse event.

The action specified may be the addition of a new patient, the deletion of a patient, the addition of a new study, a print job, etc. The nAction value, which designates the action to perform is determined by the server. To find out the values used, you must contact the organization that created the server. When creating a server, the values and their corresponding meanings are determined by those creating the server.

See Also

Elements: | SendNActionResponse method, NetReceiveNActionRequest event, NetReceiveNActionResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNActionResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNActionResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, short nAction, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-ACTION-RSP message to a peer member of a connection.

The SendNActionResponse method is called by the SCP in response to a SendNActionRequest method call placed by an SCU. This generates a NetReceiveNActionResponse event on the SCU.

See Also

Elements: | SendNActionRequest method, NetReceiveNActionRequest event, NetReceiveNActionResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNCreateRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNCreateRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-CREATE-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveNCreateRequest event on the SCP. The SCP should respond by calling the SendNCreateResponse method which will generate a NetReceiveNCreateResponse event.

This function creates a new SOP Instance on the specified peer connection. The data set with the new information must be created and filled before calling this function.

See Also

Elements: | SendNCreateResponse method, NetReceiveNCreateRequest event, NetReceiveNCreateResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNCreateResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNCreateResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-CREATE-RSP message to a peer member of a connection.

The SendNCreateResponse method is called by the SCP in response to a SendNCreateRequest method call placed by an SCU. This generates a NetReceiveNCreateResponse event on the SCU.

See Also

Elements: | SendNCreateRequest method, NetReceiveNCreateRequest event, NetReceiveNCreateResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNDeleteRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNDeleteRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-DELETE-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveNDeleteRequest event on the SCP. The SCP should respond by calling the SendNDeleteResponse method which will generate a NetReceiveNDeleteResponse event.

This method requests that the SCP delete the specified SOP Instance.

See Also

Elements: | SendNDeleteResponse method, NetReceiveNDeleteRequest event, NetReceiveNDeleteResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNDeleteResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNDeleteResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-DELETE-RSP message to a peer member of a connection.

The SendNDeleteResponse method is called by the SCP in response to a SendNDeleteRequest method call placed by an SCU. This generates a NetReceiveNDeleteResponse event on the SCU.

See Also

Elements: | SendNDeleteRequest method, NetReceiveNDeleteRequest event, NetReceiveNDeleteResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNGetRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNGetRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends the values stored in the RequestAttributes property as an N-GET-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveNGetRequest event on the SCP. The SCP should respond by calling the SendNGetResponse method which will generate a NetReceiveNGetResponse event.

The RequestAttributes array property should contain the attributes to get. The attributes must be specified using the Data Element Tags. For a list of available Data Element Tags, refer to Data Element Tag Constants.

See Also

Elements: | RequestAttributes property, RequestAttributeCount property, SendNGetResponse method, NetReceiveNGetRequest event, NetReceiveNGetResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNGetResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNGetResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-GET-RSP message to a peer member of a connection.

The SendNGetResponse method is called by the SCP in response to a SendNGetRequest method call placed by an SCU. This generates a NetReceiveNGetResponse event on the SCU.

See Also

Elements: | SendNGetRequest method, NetReceiveNGetRequest event, NetReceiveNGetResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNonSecureISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNonSecureISCL(long hNet, VARIANT *vBuffer, long nBytes);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) Send the data in vBuffer over an ISCL connection, unsecured. This data is not encrypted and the message has no authentication code.

The non-secure send is the fastest method of transmitting data over an ISCL connection. It is faster than the normal send/receive process and has no encryption and no message authentication codes.

See Also

Elements: | NetNonSecureReceivedISCL event, NetNonSecureSendISCL event
Topics: | DICOM Security: Working with ISCL


SendNReportRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNReportRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nEvent, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-REPORT-REQ message to a peer member of a connection.

Calling this method generates a NetReceiveNReportRequest method on the SCP. The SCP should respond by calling the SendNReportResponse method which will generate a NetReceiveNReportResponse event.

A report is generated to let all peers attached to a server know of some event that has occurred. This event may be the addition of a new patient, the deletion of a patient, the addition of a new study, etc. The nEvent value, which designates the event that occurred is determined by the server. To find out the values used, you must contact the organization that created the server. When creating a server, the values and their corresponding meanings are determined by those creating the server.

See Also

Elements: | SendNReportResponse method, NetReceiveNReportRequest event, NetReceiveNReportResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNReportResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNReportResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, short nEvent, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-REPORT-RSP message to a peer member of a connection.

The SendNReportResponse method is sent by the SCP in response to a SendNReportRequest method call placed by an SCU. This generates a NetReceiveNReportResponse event on the SCU.

A report is generated to let all peers attached to a server know of some event that has occurred. This event may be the addition of a new patient, the deletion of a patient, the addition of a new study, etc. The nEvent value, which designates the event that occurred, is determined by the server. To find out the values used, you must contact the organization that created the server. When creating a server, the values and their corresponding meanings are determined by those creating the server.

See Also

Elements: | SendNReportRequest method, NetReceiveNReportRequest event, NetReceiveNReportResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNSetRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNSetRequest ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-GET-RSP message to a peer member of a connection.

Calling this method generates a NetReceiveNSetRequest event on the SCP. The SCP should respond by calling the SendNSetResponse method which will generate a NetReceiveNSetResponse event.

See Also

Elements: | SendNSetResponse method, NetReceiveNSetRequest event, NetReceiveNSetResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendNSetResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendNSetResponse ( long hNet, short nPresentationID, short nMessageID, BSTR pszClass, BSTR pszInstance, short nStatus, long hDS);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends an N-SET-RSP message to a peer member of a connection.

The SendNSetResponse method is sent by the SCP in response to a SendNSetRequest method call placed by an SCU. This generates a NetReceiveNSetResponse event on the SCU.

See Also

Elements: | SendNSetRequest method, NetReceiveNSetRequest event, NetReceiveNSetResponse event
Topics: | DICOM Network Connection: Sending Data Messages


SendReleaseRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendReleaseRequest (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a Release Request message to a connection.

Calling the SendReleaseRequest method generates a NetReceiveReleaseRequest event on the SCP. The SCP will call the SendReleaseResponse method which will generate a NetReceiveReleaseResponse event on the SCU. At this time the DICOM Association may be closed. For more information, refer to Closing a DICOM Associate Connection.

Please note that this method of closing a DICOM Association is preferable to just calling the SendAbort method.

See Also

Elements: | SendReleaseResponse method, SendAbort method
Topics: | Working with DICOM Associate Connections
 | Closing a DICOM Associate Connection
 | Creating a DICOM Associate Connection
 | Sending Messages
 | DICOM Network Connection: DICOM Associate Connection Messages


SendReleaseResponse method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SendReleaseResponse (long hNet);
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Sends a Release Response message to a connection.

The SendReleaseResponse method is called by the SCP in response to a SendReleaseRequest method call placed by the SCU. It generates a NetReceiveReleaseResponse event on the SCU. The SCU and SCP can now close the DICOM Association by calling the Close method. For more information about ending a DICOM Association, refer to Closing a DICOM Associate Connection.

Please note that ending the DICOM Association by calling the SendReleaseRequest method and the SendReleaseResponse method is preferable to calling the SendAbort method.

See Also

Elements: | SendReleaseRequest method, SendAbort method
Topics: | Working with DICOM Associate Connections
 | Closing a DICOM Associate Connection
 | Creating a DICOM Associate Connection
 | Sending Messages
 | DICOM Network Connection: DICOM Associate Connection Messages


SetApplication method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetApplication (long hPDU, BSTR pszUID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the Application Context of the specified DICOM Associate.

The default value for the Application Context is "1.2.840.10008.3.1.1.1" (UID_APPLICATION_CONTEXT_NAME).

See Also

Elements: | GetApplication method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetAsyncOperations method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetAsyncOperations (long hPDU, BOOL bEnabled, short nInvoked, short nPerformed);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Enables or disables Asynchronous Operation support. It also sets the number of operations that can be invoked if enabled.

If a DICOM Associate connection does not support Asynchronous Operations, then an Application Entity must wait for the response from one message before sending another. If Asynchronous Operations are supported, multiple messages may be sent without waiting for a response. The number of messages that may be sent is set using the SetAsyncOperations method.

To determine the number of Asynchronous Operations that may be invoked without a response, call the GetInvokedOperationsCount method. To determine the number of operations that have been completed, call GetPerformedOperationsCount method.

See Also

Elements: | IsAsyncOperations method, GetPerformedOperationsCount method, GetInvokedOperationsCount method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetAuthDataISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetAuthDataISCL(long hNet, VARIANT *vBuffer, long nLength);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets the authentication data used during the mutual authentication process.

Every ISCL-compliant entity must have between 1 and 128 bytes of authentication data. These authentication data bytes are exchanged between client and server during the mutual authentication process. This method sets an array of 1 to 128 bytes that contains authentication data.

The authentication data is data exchanged in plain text. After the mutual authentication process, the communication entities can verify the authentication data of the other entity (client or server) and, if the authentication data is wrong, can close the connection.

See Also

Elements: | SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL method, SetEncryptKeyISCL method, SetIndexForEncryptISCL method
Topics: | DICOM Security: Working with ISCL


SetCalled method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetCalled (long hPDU, BSTR pszName);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the name of the called Application Entity in the specified DICOM Associate.

See Also

Elements: | GetCalled method, GetCalling method, SetCalling method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetCalling method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetCalling (long hPDU, BSTR pszName);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the name of the calling Application Entity of the specified DICOM Associate.

See Also

Elements: | GetCalling method, GetCalled method, SetCalled method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetCipherToIndexTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetCipherToIndexTLS(long hNet, long nIndex, long nCipher);
Overview | Refer to Negotiating a Ciphersuite

Remarks

(Medical Imaging Suite only) Sets the ciphersuite for the specified index.

The server chooses the first ciphersuite proposed by the client which it can understand. If the client puts the ciphersuites with reduced security first, then the server will most likely select a ciphersuite with reduced security.

See Also

Elements: | GetCipherFromIndexTLS method, GetCiphersuiteTLS method
Topics: | DICOM Security :Working with TLS


SetClientCertificateTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetClientCertificateTLS(long hNet, BSTR pszPathToCertificateFile, long nCertType, BSTR pszPathToKeyFile);
Overview | Refer to Adding TLS Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets a certificate for the client.

Usual size for RSA key is 512 and 1024 bits. There are no known export restrictions.

The nCertType can take values L_TLS_FILETYPE_PEM (text certificate) or L_TLS_FILETYPE_ASN1 (binary certificate).

See Also

Elements: | SetServerCertificateTLS method, UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLCAFile property, SSLVerifyDepth property, SSLSuccess property, SSLOptions property, SSLPrivateKeyPassword property, SSLPrivateKeyPasswordEvent event
Topics: | DICOM Security :Working with TLS


SetDefaultEncryptionISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetDefaultEncryptionISCL(long hNet, long nEncryptionMode);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets the encryption mode used by the ISCL operations.

This method may be called after startup, regardless of whether a connection has been established.

See Also

Elements: | StartUp method, SetDefaultSigningISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL method, SetEncryptKeyISCL method, SetIndexForEncryptISCL method
Topics: | DICOM Security: Working with ISCL


SetDefaultSigningISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetDefaultSigningISCL(long hNet, long nSignMode);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets the current message authentication code.

The message authentication code is encrypted using the current encryption mode before being sent and decrypted after being received. The current encryption mode is set using the SetDefaultEncryptionISCL method.

The encryption mode and the message authentication code type must be the same for both the sender and the receiver.

See Also

Elements: | SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL method, SetEncryptKeyISCL method, SetIndexForEncryptISCL method
Topics: | DICOM Security: Working with ISCL


SetExtendedData method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetExtendedData (long hPDU, short nID, VARIANT *pData, long lLength);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the extended data associated with the specified Presentation Context.

To retrieve the length of the extended data associated with a Presentation Context, call GetExtendedDataLength method.

To get extended data associated with a Presentation Context, call the GetExtendedData method.

See Also

Elements: | GetExtendedDataLength method, GetExtendedData method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetImplementClass method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetImplementClass (long hPDU, BOOL bEnabled, BSTR pszUID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Enables or disables setting the Implementation Class. It also sets the Implementation Class if enabled.

If setting the Implementation Class is enabled, you can get the name of the Implementation Class by calling the GetImplementClass method.

To determine whether the Implementation Class can be set, call the ImplementClass method.

See Also

Elements: | IsImplementClass method, GetImplementClass method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetImplementVersion method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetImplementVersion (long hPDU, BOOL bEnabled, BSTR pszVersion);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Enables or disables setting the Implementation Version. It also sets the Implementation Version if enabled.

If setting the Implementation Version is enabled, you can get the Implementation Version by calling GetImplementVersion method.

To determine whether the Implementation Version can be set, call IsImplementVersion method.

See Also

Elements: | IsImplementVersion method, GetImplementVersion method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetIndexForEncryptISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetIndexForEncryptISCL(long hNet, long nIndex);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets the index of the encryption key.

See Also

Elements: | SetEncryptKeyISCL method, SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL method
Topics: | DICOM Security: Working with ISCL


SetIndexForMutualAuthISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetIndexForMutualAuthISCL(long hNet, long nIndex);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets the index of the mutual authentication key to be used during the mutual authentication process.

This method sets the actual key used for mutual authentication operations, based on an index from 1 to 8

See Also

Elements: | SetMutualAuthKeyISCL method, SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetEncryptKeyISCL method, SetIndexForEncryptISCL method
Topics: | DICOM Security: Working with ISCL


SetMaxCommBlockLengthISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetMaxCommBlockLengthISCL(long hNet, long nCommBlockLength);
Overview | Refer to Establishing an ISCL Line Connection

Remarks

(Medical Imaging Suite only) Sets the maximum communication block length that can be sent/received by the current entity.

An ISCL communication block contains a 32-byte header, followed by data, if data is included.

Note that the size of the ISCL packets is 32 bytes larger than the communication block length, because of the header.

If this method succeeds, the client and server will agree to use the smaller communication block size of the two during mutual authentication.

See Also

Elements: | SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL metohd, SetEncryptKeyISCL method, SetIndexForEncryptISCL method, GetCommBlockLengthISCL method
Topics: | DICOM Security: Working with ISCL


SetMaxLength method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetMaxLength (long hPDU, BOOL bEnabled, long lLength);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Enables or disables the Maximum Length restriction for data transfer. It also sets the maximum length value if the restriction is enabled.

If the Maximum Length restriction is enabled the Maximum Length must be 0, or >= 8 and it must be an even number (8, 10, 12, …).

See Also

Elements: | IsMaxLengthEnabled method, GetMaxLength method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetMaxMessageLengthISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetMaxMessageLengthISCL(long hNet, long nMsgLength);
Overview | Refer to Sending and Receiving Messages with ISCL

Remarks

(Medical Imaging Suite only) Sets the maximum message length that can be processed (sent and received) by the current entity.

See Also

Elements: | SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMutualAuthAlgISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL method, SetEncryptKeyISCL method, SetIndexForEncryptISCL method
Topics: | DICOM Security: Working with ISCL


SetMutualAuthAlgISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetMutualAuthAlgISCL(long hNet, long nMutualAuthMode);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets the mutual authentication mode. Currently only DICOM_ISCL_MUTUAL_AUTH_3P4W, the three pass four way mutual authentication, is described in the standard. This value is set implicitly at Network startup.

See Also

Elements: | SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthKeyISCL method, SetIndexForMutualAuthISCL method, SetEncryptKeyISCL method, SetIndexForEncryptISCL method
Topics: | DICOM Security: Working with ISCL


SetMutualAuthKeyISCL method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetMutualAuthKeyISCL(long hNet, long nIndex, VARIANT AuthKey);
Overview | Refer to Adding ISCL Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets a mutual authentication key at the specified index in the array.

One of eight mutual authentication keys can be used for authenticating a peer.

See Also

Elements: | SetDefaultSigningISCL method, SetDefaultEncryptionISCL method, SetAuthDataISCL method, SetMaxCommBlockLengthISCL method, SetMaxMessageLengthISCL method, SetMutualAuthAlgISCL method, SetIndexForMutualAuthISCL method, SetEncryptKeyISCL method, SetIndexForEncryptISCL method
Topics: | DICOM Security: Working with ISCL


SetPresentationAbstract method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetPresentationAbstract (long hPDU, short nID, BSTR pszUID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the Abstract Syntax of the specified Presentation Context of the specified DICOM Associate.

The Abstract Syntax provides information about the class type of the data that will be transferred across the DICOM Associate connection.

This function is valid only for DICOM Associates of type Associate Request.

To get the Abstract Syntax of a specific Presentation Context, call the GetPresentationAbstract method.

See Also

Elements: | GetPresentationAbstract method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetPresentationID method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetPresentationID (long hPDU, long lIndex, short nID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the ID for a Presentation Context.

A DICOM Associate (Request or Accept) can have multiple Presentation Contexts. The ID for each of these Presentation Contexts must be unique. The IDs for the Presentation Context entries for the specified DICOM Associate should start at 1, and must be odd.

For example, a DICOM Associate may have three Presentation Context entries. One of those entries should have an ID of 1. The IDs must be unique. (Having two Presentation Context entries with an ID of 3 is not valid.) Therefore the IDs may be 1 for the first Presentation Context, 3 for the next one and 5 for the last one.

See Also

Elements: | DeletePresentation method, GetPresentationID method, GetPresentationCount method, GetPresentationResult method, GetPresentationAbstract method, AddPresentation method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetPresentationResult method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetPresentationResult (long hPDU, short nID, short nResult);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the result of the specified Presentation Context of the specified DICOM Associate.

This method is only valid for DICOM Associates of type Associate Accept.

See Also

Elements: | GetPresentationResult method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetRequest method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void SetRequest (long hPDU, BOOL bRequest);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the type of DICOM Associate (Request or Accept).

For more information about Associate Connections, refer to Creating a DICOM Associate Connection.

To determine what of Associate a specific DICOM Associate is, use the IsRequest method.

See Also

Elements: | IsRequest method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetRoleSelect method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetRoleSelect (long hPDU, short nID, BOOL bEnabled, short nUser, short nProvider);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Enables or disables Role Selection. It also sets the User Role and Provider Role, if enabled, for the specified Presentation Context of the specified DICOM Associate.

If Role Selection is enabled for a specific Presentation Context, that Application Entity can act as an SCU, an SCP or both for that Presentation Context.

For example, suppose a DICOM Associate Request has three Presentation Contexts. One Presentation Context is for the transfer of X-RAY data, another Presentation Context is for the transfer of CT data, and the third Presentation Context is for the transfer of Nuclear Medicine data.

To serve as an SCU only for the X-RAY data transfer, the User Role for the first Presentation Context should be PDU_ROLE_SUPPORT, while the Provider Role should be PDU_ROLE_NON_SUPPORT.

To serve as both an SCU and an SCP for the CT data transfer, the User Role and the Provider Role should both be PDU_ROLE_SUPPORT for the second Presentation Context.

To serve as an SCU only for the Nuclear Medicine data transfer, the User Role for the third Presentation Context should be PDU_ROLE_SUPPORT, while the Provider Role should be PDU_ROLE_NON_SUPPORT.

If Role Selection is enabled, the User Role and Provider Role settings can be retrieved using the GetUserRole method and the GetProviderRole method.

To determine whether Role Selection is enabled, use the IsRoleSelect method.

See Also

Elements: | IsRoleSelect method, GetUserRole method, GetProviderRole method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetServerCertificateTLS method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetServerCertificateTLS(long hNet, BSTR pszPathToCertificateFile, long nCertType, BSTR pszPathToKeyFile);
Overview | Refer to Adding TLS Security to a DICOM Connection

Remarks

(Medical Imaging Suite only) Sets a certificate for the server.

The usual sizes for an RSA key is 512 and 1024 bits. There is a limitation for import in Europe – a RSA key must be at least 768 bits long. There are no known export restrictions.

The server is authenticated always. A server may be authenticated with a chain of certificates, all in the same file.

When implementing a server, use this method prior to calling the Accept method (ILEADDicomNet). Pass NULL for the hNet argument. This stores the pszPathToCertificateFile and pszPathToKeyFile internally, which allows the Accept to assign the server certificate to the correct internal hNet.

Please note that when changing security settings the CA file needs to be in PEM format.

See Also

Elements: | SetClientCertificateTLS method, UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLCAFile property, SSLVerifyDepth property, SSLSuccess property, SSLOptions property, SSLPrivateKeyPassword property, SSLPrivateKeyPasswordEvent event
Topics: | DICOM Security :Working with TLS


SetTransferSyntax method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetTransferSyntax (long hPDU, short nID, long lIndex, BSTR pszUID);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets a Transfer Syntax for the specified Presentation Context.

A DICOM Associate (Request or Accept) can have multiple Presentation Contexts. A DICOM Associate Request can have multiple Transfer Syntax entries for each Presentation Context. A Transfer Syntax can be retrieved by specifying the ID for the appropriate Presentation Context and the index for the appropriate Transfer Syntax.

See Also

Elements: | DeleteTransferSyntax method, GetTransferSyntax method, GetTransferCount method, AddTransferSyntax method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetUserInfo method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetUserInfo (long hPDU, long lIndex, short nType, VARIANT *pData, short nLength);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the specified User-defined item using the specified parameters.

See Also

Elements: | GetUserInfoCount method, GetUserInfoType method, GetUserInfoLength method, GetUserInfoData method, AddUserInfo method, DeleteUserInfo method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


SetVersion method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short SetVersion (long hPDU, short nVersion);
Overview | Refer to Working with DICOM Associate Connections.

Remarks

Sets the version of the specified DICOM Associate.

The default version number is 1.

See Also

Elements: | GetVersion method
Topics: | DICOM Associate Connection: Modifying a DICOM Associate Handle


ShutDown method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void ShutDown ();
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Shuts down the DICOM Network.

See Also

Elements: | StartUp method
Topics: | DICOM Network Connection: Closing a Network Connection


StartUp method (ILEADDicomNet)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short StartUp ();
Overview | Refer to Working with DICOM Network Connections.

Remarks

(Medical Imaging Suite only) Initializes the DICOM Network. This method sets up the local computer for network communication and creates a DICOM Network handle. It must be called before calling any other DICOM Network related method.

See Also

Elements: | ShutDown method, UseSSLOptions property, SSLCreateFlags property, SSLMethodType property, SSLVerifyMode property, SSLCAFile property, SSLVerifyDepth property, SSLSuccess property, SSLOptions property, SSLPrivateKeyPassword property, SSLPrivateKeyPasswordEvent event
Topics: | DICOM Network Connection: Creating a Network Connection


AbortReason property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AbortReason
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The AbortReason property specifies the reason for the Association aborting as specified in the Abort message received by the Print SCU. Possible values are:

Value | Meaning
PDU_ABORT_REASON_UNKNOWN | [0] Unknown.
PDU_ABORT_REASON_UNRECOGNIZED | [1] Unrecognized PDU.
PDU_ABORT_REASON_UNEXPECTED | [2] Unexpected PDU.
PDU_ABORT_REASON_UNRECOGNIZED_PARAM | [4] Unrecognized PDU parameter.
PDU_ABORT_REASON_UNEXPECTED_PARAM | [5] Unexpected PDU parameter.
PDU_ABORT_REASON_INVALID_PARAM | [6] Invalid PDU parameter value.

The value of this property is meaningless unless an Abort message is received by the Print SCU.

When the Print SCU receives an Abort message from the Print SCP, the OnStatus event will be fired with the parameter Status set to PRNSCU_STATUS_RECEIVE_ABORT.

See Also

Elements: | Associate method, OnStatus event
Topics: | DICOM Print Management SCU: Association


AbortSource property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AbortSource
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The AbortSource property specifies the source of the Association aborting as specified in the Abort message received by the Print SCU. Possible value is:

Value | Meaning
PDU_ABORT_SOURCE_PROVIDER | [2] Service provider (Print SCP).

The value of this property is meaningless unless an Abort message is received by the Print SCU.

When the Print SCU receives an Abort message from the Print SCP, the OnStatus event will be fired with the parameter Status set to PRNSCU_STATUS_RECEIVE_ABORT.

See Also

Elements: | Associate method, OnStatus event
Topics: | DICOM Print Management SCU: Association


AnnotationBoxes property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILAnnotationBoxes* AnnotationBoxes
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The AnnotationBoxes property is the collection of Annotation Boxes resulted from creating a Film Box.

When a Film Box is created, and if an Annotation Display Format ID is specified, the Print SCP will also create one or more Annotation Boxes, based on the Value of the Annotation Display Format ID. This is true given that the Basic Annotation Box SOP Class is supported on the Association. For each Annotation Box created, an LAnnotationBox object is added to this collection, so that the Annotation Box can be manipulated.

Each time a new Film Box is created, the collection will be refilled with the Annotation Boxes that belong to the new Film Box.

See Also

Elements: | FilmSession property, FilmBox property, ImageBoxes property, Printer property, PresentationLUT property, ImageOverlayBox property, PullPrintRequest property, PrintJob property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Basic Print Management


Associated property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL Associated
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Associated property specifies whether the Association is established or not. The value of this property is VARIANT_TRUE only when the Association is established.

See Also

Elements: | Associate method, ReleaseAssociation method, AbortAssociation method
Topics: | DICOM Print Management SCU: Association


AssociateRejectReason property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AssociateRejectReason
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The AssociateRejectReason property specifies the reason for the Association rejection. This depends on the value of the AssociateRejectSource property as follows:

If the AssociateRejectSource property is PDU_REJECT_SOURCE_USER, the possible values are:

Value | Meaning
PDU_REJECT_REASON_UNKNOWN | [1] Unknown.
PDU_REJECT_REASON_APPLICATION | [2] Application context name not supported.
PDU_REJECT_REASON_CALLING | [3] Calling AE Title not recognized.
PDU_REJECT_REASON_CALLED | [7] Called AE Title not recognized.

If the AssociateRejectSource property is PDU_REJECT_SOURCE_PROVIDER1, the possible values are:

Value | Meaning
PDU_REJECT_REASON_UNKNOWN | [1] Unknown.
PDU_REJECT_REASON_VERSION | [2] Protocol version not supported.

If the AssociateRejectSource property is PDU_REJECT_SOURCE_PROVIDER2, the possible values are:

Value | Meaning
PDU_REJECT_REASON_CONGESTION | [1] Temporary congestion.
PDU_REJECT_REASON_LIMIT | [2] Local client limit exceeded.

The value of the AssociateRejectReason property is meaningless unless the Association request was rejected by the Print SCP.

See Also

Elements: | Associate method
Topics: | DICOM Print Management SCU: Association


AssociateRejectResult property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AssociateRejectResult
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The AssociateRejectResult property specifies the type of the Association rejection. Possible values are:

Value | Meaning
PDU_REJECT_RESULT_PERMANENT | [1] Rejected permanently.
PDU_REJECT_RESULT_TRANSIENT | [2] Rejected transiently.

The value of this property is meaningless unless the Association request was rejected by the Print SCP.

See Also

Elements: | Associate method
Topics: | DICOM Print Management SCU: Association


AssociateRejectSource property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AssociateRejectSource
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The AssociateRejectSource property specifies the source of the Association rejection. Possible values are:

Value | Meaning
PDU_REJECT_SOURCE_USER | [1] DICOM Upper Layer Service – User.
PDU_REJECT_SOURCE_PROVIDER1 | [2] DICOM Upper Layer Service – Provider (ASCE related function).
PDU_REJECT_SOURCE_PROVIDER2 | [3] DICOM Upper Layer Service – Provider (Presentation related function).

The value of this property is meaningless unless the Association request was rejected by the Print SCP.

See Also

Elements: | Associate method
Topics: | DICOM Print Management SCU: Association


EnableMethodErrors property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL EnableMethodErrors
Overview | Refer to Print Management SCU.

Remarks

If the EnableMethodErrors property is set to VARIANT_TRUE, then runtime exceptions will be generated when a method error occurs. Otherwise, no runtime exceptions will be generated.

The default value of this property is VARIANT_FALSE.

See Also

Topics: | DICOM Print Management SCU: Miscellaneous
 | DICOM Elements: General Support


FilmBox property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILFilmBox* FilmBox
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The FilmBox property returns a reference to the LFilmBox object, which can be used to create and manipulate Film Boxes.

See Also

Elements: | FilmSession property, ImageBoxes property, AnnotationBoxes property, Printer property, PresentationLUT property, ImageOverlayBox property, PullPrintRequest property, PrintJob property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Basic Print Management


FilmSession property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILFilmSession* FilmSession
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The FilmSession property returns a reference to the LFilmSession object, which can be used to create and manipulate Film Sessions.

See Also

Elements: | FilmBox property, ImageBoxes property, AnnotationBoxes property, Printer property, PresentationLUT property, ImageOverlayBox property, PullPrintRequest property, PrintJob property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Basic Print Management


ImageBoxes property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILImageBoxes* ImageBoxes
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The ImageBoxes property is the collection of Image Boxes resulted from creating a Film Box.

When a Film Box is created, the Print SCP will also create one or more Image Boxes, based on the Image Display Format. For each Image Box created, a LImageBox object is added to this collection, so that the Image Box can be manipulated.

Each time a new Film Box is created, the collection will be refilled with the Image Boxes that belong to the new Film Box.

See Also

Elements: | FilmSession property, FilmBox property, AnnotationBoxes property, Printer property, PresentationLUT property, ImageOverlayBox property, PullPrintRequest property, PrintJob property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Basic Print Management


ImageOverlayBox property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILImageOverlayBox* ImageOverlayBox
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The ImageOverlayBox property returns a reference to the LImageOverlayBox object, which can be used to create and manipulate Image Overlay Boxes.

See Also

Elements: | FilmSession property, FilmBox property, ImageBoxes property, AnnotationBoxes property, Printer property, PresentationLUT property, PullPrintRequest property, PrintJob property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Basic Print Management


LastOperationStatus property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LastOperationStatus
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The LastOperationStatus property specifies the status code returned in the response of the Print SCP to the last operation requested on a SOP Class.

Status codes are grouped by the Print Management Service Class into Success, Warning, and Failure categories. For some of the possible status codes, refer to Status Constants.

When a method requests the Print SCP to perform an operation on a SOP Class, the Print SCP is supposed to specify a status code in its response to the request. This property returns the status code specified. The category of the status code can be determined as follows:

If the method that made the request returned DICOM_ERROR_PRINTSCU_FAILURE_STATUS, then the status code specified by the LastOperationStatus property is a Failure one.

If the method that made the request returned 0, then the status code specified by the LastOperationStatus property is a Warning one if it is not COMMAND_STATUS_SUCCESS.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


PresentationLUT property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILPresentationLUT* PresentationLUT
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PresentationLUT property returns a reference to the LPresentationLUT object, which can be used to create and manipulate Presentation LUTs.

See Also

Elements: | FilmSession property, FilmBox property, ImageBoxes property, AnnotationBoxes property, Printer property, ImageOverlayBox property, PullPrintRequest property, PrintJob property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Basic Print Management


Printer property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILPrinter* Printer
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Printer property returns a reference to the LPrinter object, which can be used to query the Print SCP for information about the printer.

See Also

Elements: | FilmSession property, FilmBox property, ImageBoxes property, AnnotationBoxes property, PresentationLUT property, ImageOverlayBox property, PullPrintRequest property, PrintJob property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Printer


PrinterConfiguration property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILPrinterConfiguration* PrinterConfiguration
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrinterConfiguration property returns a reference to the ILPrinterConfiguration object, which can be used to query the Print SCP for the printer configuration information.

See Also

Elements: | FilmSession property, FilmBox property, ImageBoxes property, AnnotationBoxes property, Printer property, PresentationLUT property, ImageOverlayBox property, PullPrintRequest property, PrintJob property
Topics: | DICOM Print Management SCU: Printer


PrintJob property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILPrintJob* PrintJob
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrintJob property returns a reference to the LPrintJob object, which can be used to query the Print SCP for information about a Print Job.

See Also

Elements: | FilmSession property, FilmBox property, ImageBoxes property, AnnotationBoxes property, Printer property, PresentationLUT property, ImageOverlayBox property, PullPrintRequest property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Print Jobs


PullPrintRequest property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILPullPrintRequest* PullPrintRequest
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PullPrintRequest property returns a reference to the LPullPrintRequest object, which can be used to create and manipulate Pull Print Request SOP Instances.

See Also

Elements: | FilmSession property, FilmBox property, ImageBoxes property, AnnotationBoxes property, Printer property, PresentationLUT property, ImageOverlayBox property, PrintJob property, PrinterConfiguration property
Topics: | DICOM Print Management SCU: Pull Stored Print Management


Timeout property (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Timeout
Overview | Refer to Print Management SCU.

Remarks

The Timeout property specifies the timeout value, in seconds, for communicating with the Print SCP. The deafult value of this property is 30 seconds.

When a method sends a request to the Print SCP, it waits a specific amount of time for the Print SCP response. If this amount of time elapsed before the response is received, the method will return with an error code of DICOM_ERROR_PRINTSCU_TIME_OUT. The Timeout property specifies this timeout value. If the value specified is 0, the methods will wait for the Print SCP response indefinitely.

For the Associate method, the connection must be established and the Print SCP response to the Association request must be received within the amount of time specified.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


AbortAssociation method (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AbortAssociation();
Overview | Refer to Print Management SCU.

Remarks

The AbortAssociation method aborts the Association and closes the connection.

If the Association is established, the method will try to abort it; regardless of its success or failure. The method will then close the connection if it is established.

The ReleaseAssociation method can be used to release the Association instead of aborting it.

See Also

Elements: | Associate method, ReleaseAssociation method
Topics: | DICOM Print Management SCU: Association


Associate method (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Associate(BSTR pszPrintScpIP, long lPrintScpPort, BSTR pszCalledTitle, BSTR pszCallingTitle, DicomClassEnum SupportedClasses);
Overview | Refer to Print Management SCU.

Remarks

The Associate method connects to the Print SCP and then establishes the DICOM Association.

The Association must be established successfully before any of the print management operations can succeed.

The method will first try to connect to the Print SCP. If successful, it will then try to establish the Association. The method will not return until the Association is accpeted/rejected by the Print SCP or an error occurs.

The AssociateRejectResult property, AssociateRejectSource property, and AssociateRejectReason property provide information about the Association rejection in case the Association request was rejected by the Print SCP.

The parameter SupportedClasses specifies those SOP/Meta SOP Classes that are supported by the Print SCU itself. Once the Association is established, the IsClassSupported method can be used to test whether a particular SOP/Meta SOP Class is supported on the Association (and hence by the Print SCP).

The established Association can be released using the ReleaseAssociation method or aborted using the AbortAssociation method.

See Also

Elements: | Associated property, IsClassSupported method, ReleaseAssociation method, AbortAssociation method, AssociateRejectResult property, AssociateRejectSource property, AssociateRejectReason property, AbortSource property, AbortReason property, Timeout property, OnStatus event
Topics: | DICOM Print Management SCU: Association


IsClassSupported method (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsClassSupported(DicomClassEnum Class);
Overview | Refer to Print Management SCU.

Remarks

The IsClassSupported method determines whether the specified SOP/Meta SOP Class is supported on the Association.

The method will always return VARIANT_FALSE if the Association is not established.

See Also

Elements: | Associate method
Topics: | DICOM Print Management SCU: Association


ReleaseAssociation method (ILEADDicomPrintSCU Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short ReleaseAssociation();
Overview | Refer to Print Management SCU.

Remarks

The ReleaseAssociation method releases the Association and closes the connection.

If the Association is established, the method will not return until the Association is released and the connection is closed, or an error occurs.

You can use the AbortAssociation method if it is desired to abort the Association instead of releasing it.

See Also

Elements: | Associate method, AbortAssociation method
Topics: | DICOM Print Management SCU: Association


OnPrinterReport event (_ILEADDicomPrintSCUEvents dispinterface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void OnPrinterReport(short EventTypeID, BSTR PrinterStatusInfo, BSTR FilmDestination, BSTR PrinterName);
Overview | Refer to Print Management SCU.

Remarks

The OnPrinterReport event is fired when a printer status report is received from the Print SCP.

The event is fired whenever the Print SCU receives a report from the Print SCP about the changes of the printer status. If any of the three Meta SOP Classes (the Basic Grayscale Print Management Meta SOP Class, the Basic Color Print Management Meta SOP Class, or the Pull Stored Print Management Meta SOP Class) is supported on the Association, the Printer SOP Class is also supported and hence the event is expected to be fired; if none of the three Meta SOP Classes is supported, the event will never be fired.

In warning and failure conditions, the Print SCP is supposed to supply additional information about the printer status in the Attribute Printer Status Info (the PrinterStatusInfo parameter).

See Also

Elements: | GetInfo method (ILPrinter interface), Get method
Topics: | DICOM Print Management SCU: Printer


OnPrintJobReport event (_ILEADDicomPrintSCUEvents dispinterface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void OnPrintJobReport(BSTR PrintJobSOPInstanceUID, short EventTypeID, BSTR ExecutionStatusInfo, BSTR PrintJobID, BSTR FilmSessionLabel, BSTR PrinterName);
Overview | Refer to Print Management SCU.

Remarks

The OnPrintJobReport event is fired when a Print Job status report is received from the Print SCP.

The event is fired whenever the Print SCU receives a report from the Print SCP about the changes in the status of a Print Job. The intended Print Job is specified by its SOP Instance UID. If the Print Job SOP Class is supported on the Association, the event is expected to be fired; otherwise, it will never be fired.

If the status of the Print Job is Pending or Failure, the Print SCP is supposed to supply additional information about the pending/error condition in the Attribute Execution Status Info (the ExecutionStatusInfo parameter).

See Also

Elements: | PrintJobSOPInstanceUID property (ILFilmSession interface), PrintJobSOPInstanceUID property (ILFilmBox interface), PrintJobSOPInstanceUID property (ILPullPrintRequest interface), GetInfo method (ILPrintJob interface)
Topics: | DICOM Print Management SCU: Print Jobs


OnStatus event (_ILEADDicomPrintSCUEvents dispinterface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void OnStatus(PrintScuStatusEnum Status, long OperationStatus);
Overview | Refer to Print Management SCU.

Remarks

The OnStatus event is fired to indicate the status of the Print SCU itself.

As an example, when the Create method of the ILFilmSession interface is called to create a Film Session, and assuming that the method will succeed, the OnStatus event will be fired twice: The first time with Status set to PRNSCU_STATUS_SEND_CREATE_FILM_SESSION_RQ and OperationStatus set to 0, and the second time with Status set to PRNSCU_STATUS_RECEIVE_CREATE_FILM_SESSION_RSP and OperationStatus set to COMMAND_STATUS_SUCCESS.

When the parameter Status is one of the PRNSCU_STATUS_xxx_RSP status values, the parameter OperationStatus is determined as follows:

If the status code specified in the response of the Print SCP is either a Success or Warning status code, OperationStatus will be set to COMMAND_STATUS_SUCCESS. The actual status code can be obtained from the LastOperationStatus property; if it is really a Success status code, the property will specify COMMAND_STATUS_SUCCESS, otherwise, it will specify the Warning status code.

If a Failure status code is specified in the response of the Print SCP, OperationStatus will be set to that Failure status code. The same status code would be specified by the LastOperationStatus property.

See Also

Elements: | LastOperationStatus property
Topics: | DICOM Print Management SCU: Miscellaneous


AnnotationDisplayFormatID property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR AnnotationDisplayFormatID
Overview | Refer to Print Management SCU.

Remarks

The AnnotationDisplayFormatID property specifies the Annotation Display Format ID (2010,0030). Refer to the DICOM Standard for the description.

When creating the Film Box, the corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_ANNOTATION_DISPLAY_FORMAT_ID. The property will always be ignored when updating the Film Box.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


BorderDensity property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR BorderDensity
Overview | Refer to Print Management SCU.

Remarks

The BorderDensity property specifies the Border Density (2010,0100). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_BORDER_DENSITY.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


ConfigurationInformation property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ConfigurationInformation
Overview | Refer to Print Management SCU.

Remarks

The ConfigurationInformation property specifies the Configuration Information (2010,0150). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_CONFIGURATION_INFORMATION.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


EmptyImageDensity property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR EmptyImageDensity
Overview | Refer to Print Management SCU.

Remarks

The EmptyImageDensity property specifies the Empty Image Density (2010,0110). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_EMPTY_IMAGE_DENSITY.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


FilmOrientation property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR FilmOrientation
Overview | Refer to Print Management SCU.

Remarks

The FilmOrientation property specifies the Film Orientation (2010,0040). Refer to the DICOM Standard for the description.

When creating the Film Box, the corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_FILM_ORIENTATION. The property will always be ignored when updating the Film Box.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


FilmSizeID property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR FilmSizeID
Overview | Refer to Print Management SCU.

Remarks

The FilmSizeID property specifies the Film Size ID (2010,0050). Refer to the DICOM Standard for the description.

When creating the Film Box, the corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_FILM_SIZE_ID. The property will always be ignored when updating the Film Box.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


Illumination property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Illumination
Overview | Refer to Print Management SCU.

Remarks

The Illumination property specifies the Illumination (2010,015E). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_ILLUMINATION.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


IncludedParameters property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | FilmBoxParameterEnum IncludedParameters
Overview | Refer to Print Management SCU.

Remarks

The IncludedParameters property specifies the parameters to be included when creating/updating the Film Box. It can be set to any combination of the following values:

Value | Meaning
FB_ANNOTATION_DISPLAY_FORMAT_ID | [0x0001] Includes the parameter specified by the AnnotationDisplayFormatID property (only when creating the Film Box).
FB_FILM_ORIENTATION | [0x0002] Includes the parameter specified by the FilmOrientation property (only when creating the Film Box).
FB_FILM_SIZE_ID | [0x0004] Includes the parameter specified by the FilmSizeID property (only when creating the Film Box).
FB_MAGNIFICATION_TYPE | [0x0008] Includes the parameter specified by the MagnificationType property.
FB_SMOOTHING_TYPE | [0x0010] Includes the parameter specified by the SmoothingType property.
FB_BORDER_DENSITY | [0x0020] Includes the parameter specified by the BorderDensity property.
FB_EMPTY_IMAGE_DENSITY | [0x0040] Includes the parameter specified by the EmptyImageDensity property.
FB_MIN_DENSITY | [0x0080] Includes the parameter specified by the MinDensity property.
FB_MAX_DENSITY | [0x0100] Includes the parameter specified by the MaxDensity property.
FB_TRIM | [0x0200] Includes the parameter specified by the Trim property.
FB_CONFIGURATION_INFORMATION | [0x0400] Includes the parameter specified by the ConfigurationInformation property.
FB_ILLUMINATION | [0x0800] Includes the parameter specified by the Illumination property.
FB_REFLECTED_AMBIENT_LIGHT | [0x1000] Includes the parameter specified by the ReflectedAmbientLight property.
FB_REQUESTED_RESOLUTION_ID | [0x2000] Includes the parameter specified by the RequestedResolutionID property (only when creating the Film Box).
FB_REF_PRES_LUT_INSTANCE_UID | [0x4000] Includes the parameter specified by the RefPresLUTInstanceUID property.
FB_ALL_PARAMETERS | [0x7FFF] Combines all the above values and hence includes all the parameters.

The property can also be set to 0; in this case, none of the parameters will be included.

If a parameter is not specified by the IncludedParameters property, the corresponding Attribute will not be included in the request to the Print SCP.

The default value of this property is 0.

See Also

Elements: | Create method, Update method
Topics: | DICOM Print Management SCU: Basic Print Management


MagnificationType property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR MagnificationType
Overview | Refer to Print Management SCU.

Remarks

The MagnificationType property specifies the Magnification Type (2010,0060). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_MAGNIFICATION_TYPE.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


MainObject property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the ILEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


MaxDensity property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long MaxDensity
Overview | Refer to Print Management SCU.

Remarks

The MaxDensity property specifies the Max Density (2010,0130). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_MAX_DENSITY.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


MinDensity property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long MinDensity
Overview | Refer to Print Management SCU.

Remarks

The MinDensity property specifies the Min Density (2010,0120). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_MIN_DENSITY.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


PrintJobSOPInstanceUID property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrintJobSOPInstanceUID
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrintJobSOPInstanceUID property specifies the SOP Instance UID of the Print Job SOP Instance resulted from the last successful request sent to the Print SCP to print the Film Box.

The property specifies an empty string if no Print Job was created by the Print SCP for the last request sent to print the Film Box.

The PrintBox method requests the Print SCP to print the current Film Box. If the Print Job SOP Class is supported on the Association, the Print SCP is supposed to create a Print Job SOP Instance for the new Print Job and send the SOP Instance UID of that Instance in the response to the printing request. The PrintJobSOPInstanceUID property specifies that SOP Instance UID.

The SOP Instance UID of a Print Job can be used to query the Print SCP for information about the Print Job (refer to the GetInfo method of the ILPrintJob interface). Also, it is used to identify the Print Job when status reports are received from the Print SCP (refer to the OnPrintJobReport event).

See Also

Elements: | PrintBox method, OnPrintJobReport event, GetInfo method (ILPrintJob interface), PrintJobSOPInstanceUID property (ILFilmSession interface), PrintJobSOPInstanceUID property (ILPullPrintRequest interface)
Topics: | DICOM Print Management SCU: Print Jobs


ReflectedAmbientLight property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long ReflectedAmbientLight
Overview | Refer to Print Management SCU.

Remarks

The ReflectedAmbientLight property specifies the Reflected Ambient Light (2010,0160). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_REFLECTED_AMBIENT_LIGHT.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


RefPresLUTInstanceUID property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR RefPresLUTInstanceUID
Overview | Refer to Print Management SCU.

Remarks

The RefPresLUTInstanceUID property specifies the SOP Instance UID of a previously created Presentation LUT SOP Instance to be referenced by the Film Box. Refer to the Create method of the ILPresentationLUT Interface for creating Presentation LUTs.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_REF_PRES_LUT_INSTANCE_UID.

When updating the Film Box, if this property specifies an empty string and the Film Box already references a Presentation LUT, then the update will remove that reference.

See Also

Elements: | Create method, Update method, IncludedParameters property, Create method (ILPresentationLUT interface)
Topics: | DICOM Print Management SCU: Basic Print Management


RequestedResolutionID property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR RequestedResolutionID
Overview | Refer to Print Management SCU.

Remarks

The RequestedResolutionID property specifies the Requested Resolution ID (2020,0050). Refer to the DICOM Standard for the description.

When creating the Film Box, the corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_REQUESTED_RESOLUTION_ID. The property will always be ignored when updating the Film Box.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


SmoothingType property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SmoothingType
Overview | Refer to Print Management SCU.

Remarks

The SmoothingType property specifies the Smoothing Type (2010,0080). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_SMOOTHING_TYPE.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


SmoothingType property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SmoothingType
Overview | Refer to Print Management SCU.

Remarks

The SmoothingType property specifies the Smoothing Type (2010,0080). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_SMOOTHING_TYPE.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


SOPInstanceUID property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SOPInstanceUID
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The SOPInstanceUID property specifies the SOP Instance UID of the current Basic Film Box SOP Instance.

The property specifies an empty string if no Film Box is currently created.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Basic Print Management


SOPInstanceUID property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SOPInstanceUID
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The SOPInstanceUID property specifies the SOP Instance UID of the Image Box.

See Also

Topics:

DICOM Print Management SCU: Basic Print Management


Trim property (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Trim
Overview | Refer to Print Management SCU.

Remarks

The Trim property specifies the Trim (2010,0140). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FB_TRIM.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


Create method (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Create(BSTR ImageDisplayFormat);
Overview | Refer to Print Management SCU.

Remarks

The Create method requests the Print SCP to create a Basic Film Box SOP Instance.

A Film Session must have been created before creating Film Boxes.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Film Box was created successfully, with either a Success or Warning status code in the response of the Print SCP.

Having the Film Box created, its SOP Instance UID can be obtained from the SOPInstanceUID property. Also, the Update method, PrintBox method, and Delete method can be used to update, print, and delete the Film Box, respectively.

When a Film Box is created, the Print SCP will also create one or more Image Boxes, based on the Image Display Format specified by the parameter ImageDisplayFormat. For each Image Box created, a LImageBox object will be added to the collection of Image Boxes specified by the ImageBoxes property of the ILEADDicomPrintSCU interface. The members of the ILImageBox interface (exposed by the LImageBox object) can then be used to manipulate the Image Box.

Similarly, when a Film Box is created, and if the AnnotationDisplayFormatID property is used to specify an Annotation Display Format ID, the Print SCP will also create one or more Annotation Boxes, based on the Value of the Annotation Display Format ID. This is true given that the Basic Annotation Box SOP Class is supported on the Association. For each Annotation Box created, a LAnnotationBox object is added to the collection of Annotation Boxes specified by the AnnotationBoxes property of the ILEADDicomPrintSCU Interface. The members of the ILAnnotationBox Interface (exposed by the LAnnotationBox object) can then be used to manipulate the Annotation Box.

The method can be used to create more than one Film Box. However, only the current Film Box (the last one created) can be updated, printed alone, and deleted. Previous Film Boxes can only be printed by printing the whole Film Session.

Before calling the method, the various properties can be used to set the parameters of the Film Box to be created. Only those parameters specified by the IncludedParameters property will be included. If a parameter is not specified, the corresponding Attribute will not be included in the request to the Print SCP.

See Also

Elements: | Create method (ILFilmSession interface), IncludedParameters property, SOPInstanceUID property, Update method, PrintBox method, Delete method, LastOperationStatus property, ImageBoxes property, AnnotationBoxes property
Topics: | DICOM Print Management SCU: Basic Print Management


Delete method (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Delete();
Overview | Refer to Print Management SCU.

Remarks

The Delete method requests the Print SCP to delete the current Basic Film Box SOP Instance.

There must be a Film Box currently created before using this method.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Film Box was deleted successfully, with either a Success or Warning status code in the response of the Print SCP.

Notice that deleting the Film Box will cause all the referenced Image Boxes and Annotation Boxes to be deleted also. However, the contents of the collections of Image Boxes and Annotation Boxes will not be removed.

See Also

Elements: | Create method, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


PrintBox method (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short PrintBox();
Overview | Refer to Print Management SCU.

Remarks

The PrintBox method requests the Print SCP to print the current Film Box.

There must be a Film Box currently created before using this method.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Film Box was printed successfully, with either a Success or Warning status code in the response of the Print SCP.

This method requests the Print SCP to print only the current Film Box. The PrintSession method of the ILFilmSession interface can be used to print all the Film Boxes that belong to the current Film Session.

See Also

Elements: | Create method, LastOperationStatus property, PrintSession method (ILFilmSession interface)
Topics: | DICOM Print Management SCU: Basic Print Management


Update method (ILFilmBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Update();
Overview | Refer to Print Management SCU.

Remarks

The Update method requests the Print SCP to update the current Basic Film Box SOP Instance.

There must be a Film Box currently created before using this method.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Film Box was updated successfully, with either a Success or Warning status code in the response of the Print SCP.

Before calling the method, the various properties can be used to set the parameters to be updated. Only those parameters specified by the IncludedParameters property will be included. If a parameter is not specified, the corresponding Attribute will not be included in the request to the Print SCP and hence will not be updated. The method will return an error if none of the parameters is specified. Notice that not all the parameters that can be specified when creating the Film Box can be updated; the method will ignore the parameters specified by the following properties:

AnnotationDisplayFormatID property

FilmOrientation property

FilmSizeID property

RequestedResolutionID property

See Also

Elements: | Create method, IncludedParameters property, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


FilmDestination property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR FilmDestination
Overview | Refer to Print Management SCU.

Remarks

The FilmDestination property specifies the Film Destination (2000,0040). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FS_FILM_DESTINATION.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


FilmSessionLabel property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR FilmSessionLabel
Overview | Refer to Print Management SCU.

Remarks

The FilmSessionLabel property specifies the Film Session Label (2000,0050). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FS_FILM_SESSION_LABEL.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


IncludedParameters property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | FilmSessionParameterEnum IncludedParameters
Overview | Refer to Print Management SCU.

Remarks

The IncludedParameters property specifies the parameters to be included when creating/updating the Film Session. It can be set to any combination of the following values:

Value | Meaning
FS_NUMBER_OF_COPIES | [0x01] Includes the parameter specified by the NumberOfCopies property.
FS_PRINT_PRIORITY | [0x02] Includes the parameter specified by the PrintPriority property.
FS_MEDIUM_TYPE | [0x04] Includes the parameter specified by the MediumType property.
FS_FILM_DESTINATION | [0x08] Includes the parameter specified by the FilmDestination property.
FS_FILM_SESSION_LABEL | [0x10] Includes the parameter specified by the FilmSessionLabel property.
FS_MEMORY_ALLOCATION | [0x20] Includes the parameter specified by the MemoryAllocation property.
FS_OWNER_ID | [0x40] Includes the parameter specified by the OwnerID property.
FS_ALL_PARAMETERS | [0x7F] Combines all the above values and hence includes all the parameters.

The property can also be set to 0; in this case, none of the parameters will be included.

If a parameter is not specified by the IncludedParameters property, the corresponding Attribute will not be included in the request to the Print SCP.

The default value of this property is 0.

See Also

Elements: | Create method, Update method
Topics: | DICOM Print Management SCU: Basic Print Management


MainObject property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the ILEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


MediumType property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR MediumType
Overview | Refer to Print Management SCU.

Remarks

The MediumType property specifies the Medium Type (2000,0030). Refer to the DICOM standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FS_MEDIUM_TYPE.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


MemoryAllocation property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long MemoryAllocation
Overview | Refer to Print Management SCU.

Remarks

The MemoryAllocation property specifies the Memory Allocation (2000,0060). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FS_MEMORY_ALLOCATION.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


NumberOfCopies property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long NumberOfCopies
Overview | Refer to Print Management SCU.

Remarks

The NumberOfCopies property specifies the Number of Copies (2000,0010). Refer to the DICOM standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FS_NUMBER_OF_COPIES.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


OwnerID property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OwnerID
Overview | Refer to Print Management SCU.

Remarks

The OwnerID property specifies the Owner ID (2100,0160). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FS_OWNER_ID.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


PrintJobSOPInstanceUID property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrintJobSOPInstanceUID
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrintJobSOPInstanceUID property specifies the SOP Instance UID of the Print Job SOP Instance resulted from the last successful request sent to the Print SCP to print the Film Session.

The property specifies an empty string if no Print Job was created by the Print SCP for the last request sent to print the Film Session.

The PrintSession method requests the Print SCP to print the current Film Session. If the Print Job SOP Class is supported on the Association, the Print SCP is supposed to create a Print Job SOP Instance for the new Print Job and send the SOP Instance UID of that Instance in the response to the printing request. The PrintJobSOPInstanceUID property specifies that SOP Instance UID.

The SOP Instance UID of a Print Job can be used to query the Print SCP for information about the Print Job (refer to the GetInfo method of the ILPrintJob interface). Also, it is used to identify the Print Job when status reports are received from the Print SCP (refer to the OnPrintJobReport event).

See Also

Elements: | PrintSession method, OnPrintJobReport event, GetInfo method (ILPrintJob interface), PrintJobSOPInstanceUID property (ILFilmBox interface), PrintJobSOPInstanceUID property (ILPullPrintRequest interface)
Topics: | DICOM Print Management SCU: Print Jobs


PrintPriority property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrintPriority
Overview | Refer to Print Management SCU.

Remarks

The PrintPriority property specifies the Print Priority (2000,0020). Refer to the DICOM standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies FS_PRINT_PRIORITY.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


PrintSession method (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short PrintSession();
Overview | Refer to Print Management SCU.

Remarks

The PrintSession method requests the Print SCP to print all the Film Boxes that belong to the current Film Session.

There must be a Film Session currently created before using this method.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Film Session was printed successfully, with either a Success or Warning status code in the response of the Print SCP.

This method requests the Print SCP to print all the Film Boxes that belong to the current Film Session. The PrintBox method of the ILFilmBox interface can be used to print only the current Film Box.

See Also

Elements: | Create method, LastOperationStatus property, PrintBox method
Topics: | DICOM Print Management SCU: Basic Print Management


SOPInstanceUID property (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SOPInstanceUID
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The SOPInstanceUID property specifies the SOP Instance UID of the current Basic Film Session SOP Instance.

This property specifies an empty string if no Film Session is currently created.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Basic Print Management


Create method (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Create(VARIANT_BOOL bColorPrintManagement);
Overview | Refer to Print Management SCU.

Remarks

The Create method requests the Print SCP to create a Basic Film Session SOP Instance.

Once a Film Session is created, the Create method of the ILFilmBox interface can then be used to create one or more Film Boxes in the new Film Session. Notice that only one Film Session can be handled on the Association at any time.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Film Session was created successfully, with either a Success or Warning status code in the response of the Print SCP.

Having the Film Session created, its SOP Instance UID can be obtained from the SOPInstanceUID property. Also, the Update method, PrintSession method, and Delete method can be used to update, print, and delete the Film Session, respectively.

Before calling the method, the various properties can be used to set the parameters of the Film Session to be created. Only those parameters specified by the IncludedParameters property will be included. If a parameter is not specified, the corresponding Attribute will not be included in the request to the Print SCP.

All the rest of the basic Print Management methods, defined by the ILFilmSession interface and by the other interfaces, will adopt the Meta SOP Class of the created Basic Film Session SOP Instance.

See Also

Elements: | IncludedParameters property, SOPInstanceUID property, Update method, PrintSession method, Delete method, Create method (ILFilmBox interface), LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


Delete method (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Delete();
Overview | Refer to Print Management SCU.

Remarks

The Delete method requests the Print SCP to delete the current Basic Film Session SOP Instance.

There must be a Film Session currently created before using this method.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Film Session was deleted successfully, with either a Success or Warning status code in the response of the Print SCP.

Notice that deleting the Film Session will cause all the referenced Film Boxes, Image Boxes, and Annotation Boxes to be deleted also.

See Also

Elements: | Create method, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


Update method (ILFilmSession Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Update();
Overview | Refer to Print Management SCU.

Remarks

The Update method requests the Print SCP to update the current Basic Film Session SOP Instance.

There must be a Film Session currently created before using this method.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Film Session was updated successfully, with either a Success or Warning status code in the response of the Print SCP.

Before calling the method, the various properties can be used to set the parameters to be updated. Only those parameters specified by the IncludedParameters property will be included. If a parameter is not specified, the corresponding Attribute will not be included in the request to the Print SCP and hence will not be updated. The method will return an error if none of the parameters is specified.

See Also

Elements: | Create method, IncludedParameters property, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


ConfigurationInformation property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ConfigurationInformation
Overview | Refer to Print Management SCU.

Remarks

The ConfigurationInformation property specifies the Configuration Information (2010,0150). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_CONFIGURATION_INFORMATION.

Notice that since the Configuration Information is defined only for Grayscale Image Boxes, this property will always be ignored for Color Image Boxes.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


ImageFilename property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ImageFilename
Overview | Refer to Print Management SCU.

Remarks

The ImageFilename property specifies the name of the Data Set file that contains the image to be printed in the Image Box.

When updating the Image Box using the Update method, this property will be ignored if the IncludedParameters property doesn’t specify IB_IMAGE_FILENAME.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


ImagePosition property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long ImagePosition
Overview | Refer to Print Management SCU.

Remarks

The ImagePosition property specifies the Image Position (2020,0010). Refer to the DICOM Standard for the description.

When the collection of Image Boxes is filled with the LImageBox objects as a result of creating a Film Box, this property will be set to 1 for the first object in the collection, 2 for the second object, and so on.

When updating the Image Box using the Update method, an error will be returned by the method if this property is set to a value less than 1.

See Also

Elements: | Update method
Topics: | DICOM Print Management SCU: Basic Print Management


IncludedParameters property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ImageBoxParameterEnum IncludedParameters
Overview | Refer to Print Management SCU.

Remarks

The IncludedParameters property specifies the parameters to be included when updating the Image Box. It can be set to any combination of the following values:

Value | Meaning
IB_IMAGE_FILENAME | [0x001] If no image is specified when calling the Update method, the image to be printed in the Image Box is the one contained in the Data Set file specified by the ImageFilename property.
IB_POLARITY | [0x002] Includes the parameter specified by the Polarity property.
IB_MAGNIFICATION_TYPE | [0x004] Includes the parameter specified by the MagnificationType property.
IB_SMOOTHING_TYPE | [0x008] Includes the parameter specified by the SmoothingType property.
IB_MIN_DENSITY | [0x010] Includes the parameter specified by the MinDensity property (only for Grayscale Image Boxes).
IB_MAX_DENSITY | [0x020] Includes the parameter specified by the MaxDensity property (only for Grayscale Image Boxes).
IB_CONFIGURATION_INFORMATION | [0x040] Includes the parameter specified by the ConfigurationInformation property (only for Grayscale Image Boxes).
IB_REQUESTED_IMAGE_SIZE | [0x080] Includes the parameter specified by the RequestedImageSize property.
IB_REQUESTED_DECIMATE_CROP_BEHAVIOR | [0x100] Includes the parameter specified by the RequestedDecimateCropBehavior property.
IB_REF_IMAGE_OVERLAY_BOX_INSTANCE_UID | [0x200] Includes the parameter specified by the RefImageOverlayBoxInstanceUID property.
IB_REF_PRES_LUT_INSTANCE_UID | [0x400] Includes the parameter specified by the RefPresLUTInstanceUID property (only for Grayscale Image Boxes).
IB_ALL_PARAMETERS | [0x7FF] Combines all the above values and hence includes all the parameters.

The property can also be set to 0; in this case, none of the parameters will be included.

If a parameter is not specified by the IncludedParameters property, the corresponding Attribute will not be included in the request to the Print SCP and hence will not be updated. Refer to the Update method for more details on the image to be printed in the Image Box.

The default value of this property is IB_IMAGE_FILENAME.

See Also

Elements: | Update method
Topics: | DICOM Print Management SCU: Basic Print Management


MagnificationType property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR MagnificationType
Overview | Refer to Print Management SCU.

Remarks

The MagnificationType property specifies the Magnification Type (2010,0060). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_MAGNIFICATION_TYPE.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


MainObject property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the ILEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


MaxDensity property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long MaxDensity
Overview | Refer to Print Management SCU.

Remarks

The MaxDensity property specifies the Max Density (2010,0130). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_MAX_DENSITY.

Notice that since the Max Density is defined only for Grayscale Image Boxes, this property will always be ignored for Color Image Boxes.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


MinDensity property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long MinDensity
Overview | Refer to Print Management SCU.

Remarks

The MinDensity property specifies the Min Density (2010,0120). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_MIN_DENSITY.

Notice that since the Min Density is defined only for Grayscale Image Boxes, this property will always be ignored for Color Image Boxes.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


Polarity property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Polarity
Overview | Refer to Print Management SCU.

Remarks

The Polarity property specifies the Polarity (2020,0020). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_POLARITY.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


RefImageOverlayBoxInstanceUID property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR RefImageOverlayBoxInstanceUID
Overview | Refer to Print Management SCU.

Remarks

The RefImageOverlayBoxInstanceUID property specifies the SOP Instance UID of a previously created Basic Print Image Overlay Box SOP Instance to be referenced by the Image Box. Refer to the Create method of the ILImageOverlayBox interface for creating Image Overlay Boxes.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_REF_IMAGE_OVERLAY_BOX_INSTANCE_UID.

When updating the Image Box, if this property specifies an empty string and the Image Box already references an Image Overlay Box, then the update will remove that reference.

See Also

Elements: | Update method, IncludedParameters property, Create method (ILImageOverlayBox interface)
Topics: | DICOM Print Management SCU: Basic Print Management


RefPresLUTInstanceUID property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR RefPresLUTInstanceUID
Overview | Refer to Print Management SCU.

Remarks

The RefPresLUTInstanceUID property specifies the SOP Instance UID of a previously created Presentation LUT SOP Instance to be referenced by the Image Box. Refer to the Create method of the ILPresentationLUT interface for creating Presentation LUTs.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_REF_PRES_LUT_INSTANCE_UID.

When updating the Image Box, if this property specifies an empty string and the Image Box already references a Presentation LUT, then the update will remove that reference.

Since only a Grayscale Image Box may reference a Presentation LUT, this property will always be ignored for Color Image Boxes.

See Also

Elements: | Update method, IncludedParameters property, Create method (ILPresentationLUT interface)
Topics: | DICOM Print Management SCU: Basic Print Management


RequestedImageSize property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double RequestedImageSize
Overview | Refer to Print Management SCU.

Remarks

The RequestedImageSize property specifies the Requested Image Size (2020,0030). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_REQUESTED_IMAGE_SIZE.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


RequestedDecimateCropBehavior property (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR RequestedDecimateCropBehavior
Overview | Refer to Print Management SCU.

Remarks

The RequestedDecimateCropBehavior property specifies the Requested Decimate/Crop Behavior (2020,0040). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies IB_REQUESTED_DECIMATE_CROP_BEHAVIOR.

See Also

Elements: | Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


Update method (ILImageBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Update(VARIANT Image);
Overview | Refer to Print Management SCU.

Remarks

The Update method requests the Print SCP to update the Image Box.

When the Print SCP is requested to create a Film Box, it will also create one or more Basic Grayscale/Color Image Box SOP Instances, based on the Image Display Format. For each Instance created, an LImageBox object is added to the collection of Image Boxes specified by the ImageBoxes property. This method updates the Image Box.

The type of the Image Boxes created by the Print SCP (Grayscale or Color) depends on the Meta SOP Class of the Film Session created at first. Refer to the Create method of the ILFilmSession interface for more information.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Image Box was updated successfully, with either a Success or Warning status code in the response of the Print SCP.

The image to be printed in the Image Box can be specified either by using the Image parameter or by using the ImageFilename property. However, the parameter is always given the priority. Therefore, the method will inspect the parameter first; if it is not supplied or if it doesn’t specify neither a character string nor a long value, the method will use the property if the IncludedParameters property specifies IB_IMAGE_FILENAME. If this is not specified, the Print SCP will be instructed to erase the image (if there is one) in the Image Box.

The method will return an error if the ImagePosition property is set to a value less than 1.

Before calling the method, the various properties can be used to set the parameters to be updated. Only those parameters specified by the IncludedParameters property will be included. If a parameter is not specified, the corresponding Attribute will not be included in the request to the Print SCP and hence will not be updated. Notice that since the Attributes Min Density, Max Density, and Configuration Information are defined only for Grayscale Image Boxes, the method will always ignore the following properties if the Image Box is a Color one:

MinDensity property

MaxDensity property

ConfigurationInformation property

See Also

Elements: | Create method (ILFilmSession interface), Create method (ILFilmBox interface), ImageBoxes property, IncludedParameters property, ImageFilename property, ImagePosition property, SOPInstanceUID property, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


_NewEnum property (ILImageBoxes Interface)

Syntax | IUnknown* _NewEnum
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The _NewEnum property returns an IEnumVARIANT on an enumeration object for the collection.

This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

See Also

Topics:

DICOM Print Management SCU: Basic Print Management


Count property (ILImageBoxes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Count
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Count property specifies the number of LImageBox objects in the collection.

See Also

Topics:

DICOM Print Management SCU: Basic Print Management


Item method (ILImageBoxes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILImageBox* Item(long Index);
Overview | Refer to Print Management SCU.

Remarks

The Item method returns an ILImageBox object from the collection. This is the default member of the ILImageBoxes interface.

See Also

Topics:

DICOM Print Management SCU: Basic Print Management


IncludedParameters property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | OverlayBoxParameterEnum IncludedParameters
Overview | Refer to Print Management SCU.

Remarks

The IncludedParameters property specifies the parameters to be included when creating/updating Image Overlay Boxes. It can be set to any combination of the following values:

Value | Meaning
OB_OVERLAY_FILENAME | [0x01] If no Overlay data is specified when calling the Update method, the method will use the Overlay data contained in the Data Set file specified by the OverlayFilename property.
OB_OVERLAY_ORIGIN | [0x02] When calling the Update method, the Overlay Origin will be updated as specified by the OverlayOriginRow property and OverlayOriginColumn property.
OB_OVERLAY_MAGNIFICATION_TYPE | [0x04] Includes the parameter specified by the OverlayMagnificationType property.
OB_OVERLAY_SMOOTHING_TYPE | [0x08] Includes the parameter specified by the OverlaySmoothingType property.
OB_OVERLAY_IMAGE_MAGNIFICATION | [0x10] Includes the parameters specified by the OverlayOrImageMagnification property and MagnifyToNumberOfColumns property.
OB_OVERLAY_FOREGROUND_DENSITY | [0x20] Includes the parameter specified by the OverlayForegroundDensity property.
OB_OVERLAY_BACKGROUND_DENSITY | [0x40] Includes the parameter specified by the OverlayBackgroundDensity property.
OB_ALL_PARAMETERS | [0x7F] Combines all the above values and hence includes all the parameters.

The property can also be set to 0; in this case, none of the parameters will be included.

If a parameter is not specified by the IncludedParameters property, the corresponding Attribute will not be included in the request to the Print SCP. Refer to the Create method and Update method for more details on the Overlay data.

The default value of this property is OB_OVERLAY_FILENAME.

See Also

Elements: | Create method, Update method
Topics: | DICOM Print Management SCU: Basic Print Management


MagnifyToNumberOfColumns property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long MagnifyToNumberOfColumns
Overview | Refer to Print Management SCU.

Remarks

The MagnifyToNumberOfColumns property specifies the Magnify to Number of Columns (2040,0074). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies OB_OVERLAY_IMAGE_MAGNIFICATION; notice that this is the same constant value used for the OverlayOrImageMagnification property.

See Also

Elements: | Create method, Update method, OverlayOrImageMagnification property, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


MainObject property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the LEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


OverlayBackgroundDensity property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OverlayBackgroundDensity
Overview | Refer to Print Management SCU.

Remarks

The OverlayBackgroundDensity property specifies the Overlay Background Density (2040,0082). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies OB_OVERLAY_BACKGROUND_DENSITY.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


OverlayFilename property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OverlayFilename
Overview | Refer to Print Management SCU.

Remarks

The OverlayFilename property specifies the name of the Data Set file that contains the Overlay data for the Image Overlay Box.

If the Overlay data is not specified for the Create method when creating an Image Overlay Box, the method will use this property even if the IncludedParameters property doesn’t specify OB_OVERLAY_FILENAME. However, when updating the Image Overlay Box using the Update method, the OverlayFilename property will be ignored if OB_OVERLAY_FILENAME is not specified.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


OverlayForegroundDensity property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OverlayForegroundDensity
Overview | Refer to Print Management SCU.

Remarks

The OverlayForegroundDensity property specifies the Overlay Foreground Density (2040,0080). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies OB_OVERLAY_FOREGROUND_DENSITY.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


OverlayMagnificationType property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OverlayMagnificationType
Overview | Refer to Print Management SCU.

Remarks

The OverlayMagnificationType property specifies the Overlay Magnification Type (2040,0060). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies OB_OVERLAY_MAGNIFICATION_TYPE.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


OverlayOriginColumn property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short OverlayOriginColumn
Overview | Refer to Print Management SCU.

Remarks

The OverlayOriginColumn property specifies the second Value in Overlay Origin (6000,0050). Refer to the DICOM Standard for the description.

When creating the Image Overlay Box using the Create method, this property will be used by the method to specify the Overlay Origin, even if the IncludedParameters property doesn’t specify OB_OVERLAY_ORIGIN. However, when updating the Image Overlay Box using the Update method, the Attribute Overlay Origin will not be included in the request to the Print SCP unless OB_OVERLAY_ORIGIN is specified.

See Also

Elements: | Create method, Update method, OverlayOriginRow property, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


OverlayOriginRow property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short OverlayOriginRow
Overview | Refer to Print Management SCU.

Remarks

The OverlayOriginRow property specifies the first Value in Overlay Origin (6000,0050). Refer to the DICOM Standard for the description.

When creating the Image Overlay Box using the Create method, this property will be used by the method to specify the Overlay Origin, even if the IncludedParameters property doesn’t specify OB_OVERLAY_ORIGIN. However, when updating the Image Overlay Box using the Update method, the Attribute Overlay Origin will not be included in the request to the Print SCP unless OB_OVERLAY_ORIGIN is specified.

See Also

Elements: | Create method, Update method, OverlayOriginColumn property, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


OverlayOrImageMagnification property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OverlayOrImageMagnification
Overview | Refer to Print Management SCU.

Remarks

The OverlayOrImageMagnification property specifies the Overlay or Image Magnification (2040,0072). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies OB_OVERLAY_IMAGE_MAGNIFICATION; notice that this is the same constant value used for the MagnifyToNumberOfColumns property.

See Also

Elements: | Create method, Update method, MagnifyToNumberOfColumns property, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


OverlaySmoothingType property (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OverlaySmoothingType
Overview | Refer to Print Management SCU.

Remarks

The OverlaySmoothingType property specifies the Overlay Smoothing Type (2040,0070). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies OB_OVERLAY_SMOOTHING_TYPE.

See Also

Elements: | Create method, Update method, IncludedParameters property
Topics: | DICOM Print Management SCU: Basic Print Management


Create method (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Create(VARIANT Overlay);
Overview | Refer to Print Management SCU.

Remarks

The Create method requests the Print SCP to create a Basic Print Image Overlay Box SOP Instance.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Image Overlay Box was created successfully, with either a Success or Warning status code in the response of the Print SCP.

The Overlay data of the Image Overlay Box to be created can be specified either by using the Overlay parameter or by using the OverlayFilename property. However, the parameter is always given the priority. Therefore, the method will inspect the parameter first; if it is omitted or if it doesn’t specify neither a character string nor a long value, the method will use the property (even if the IncludedParameters property doesn’t specify OB_OVERLAY_FILENAME).

The method can be used to create one or more Image Overlay Boxes. Having an Image Overlay Box created, the GetSOPInstanceUID method can be used to obtain its SOP Instance UID, which in turn can be used to reference the Image Overlay Box from Image Boxes. Refer to the RefImageOverlayBoxInstanceUID property of the ILImageBox interface.

The Update method and Delete method can be used to update and delete Image Overlay Boxes, respectively.

Before calling the method, the various properties can be used to set the parameters of the Image Overlay Box to be created. Only those parameters specified by the IncludedParameters property will be included. If a parameter is not specified, the corresponding Attribute will not be included in the request to the Print SCP. Notice that the method will use the OverlayOriginRow property and OverlayOriginColumn property to specify the Overlay Origin, even if the IncludedParameters property doesn’t specify OB_OVERLAY_ORIGIN.

See Also

Elements: | OverlayFilename property, OverlayOriginRow property, OverlayOriginColumn property, IncludedParameters property, GetSOPInstanceUID method, Update method, Delete method, LastOperationStatus property, RefImageOverlayBoxInstanceUID property (ILImageBox interface)
Topics: | DICOM Print Management SCU: Basic Print Management


Delete method (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Delete(BSTR pszSOPInstanceUID);
Overview | Refer to Print Management SCU.

Remarks

The Delete method requests the Print SCP to delete the specified Basic Print Image Overlay Box SOP Instance.

The Image Overlay Box specified (by the SOP Instance UID) must be an exiting one. Refer to the Create method for creating Image Overlay Boxes.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the specified Image Overlay Box was deleted successfully, with either a Success or Warning status code in the response of the Print SCP.

Once an Image Overlay Box is deleted, it cannot be referenced by Image Boxes.

See Also

Elements: | Create method, GetSOPInstanceUID method, Update method, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


GetSOPInstanceUID method (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetSOPInstanceUID();
Overview | Refer to Print Management SCU.

Remarks

The GetSOPInstanceUID method returns the SOP Instance UID of the last created Basic Print Image Overlay Box SOP Instance.

Once an Image Overlay Box is created, a call to this method will return the SOP Instance UID of the newly created Image Overlay Box. Therefore, if the SOP Instance UID of an Image Overlay Box is needed, it should be stored before creating the next Image Overlay Box.

See Also

Elements: | Create method, Update method, Delete method
Topics: | DICOM Print Management SCU: Basic Print Management


Update method (ILImageOverlayBox Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Update(BSTR pszSOPInstanceUID, VARIANT Overlay);
Overview | Refer to Print Management SCU.

Remarks

The Update method requests the Print SCP to update the specified Basic Print Image Overlay Box SOP Instance.

The Image Overlay Box specified (by the SOP Instance UID) must be an exiting one. Refer to the Create method for creating Image Overlay Boxes.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the specified Image Overlay Box was updated successfully, with either a Success or Warning status code in the response of the Print SCP.

If the Overlay data of the specified Image Overlay Box is not to be updated, the Overlay parameter should be omitted and the IncludedParameters property shouldn’t specify OB_OVERLAY_FILENAME. Otherwise, the Overlay data can be specified either by using the Overlay parameter or by using the OverlayFilename property. However, the parameter is always given the priority. Therefore, the method will inspect the parameter first; if it is omitted or if it doesn’t specify neither a character string nor a long value, the method will use the property if the IncludedParameters property specifies OB_OVERLAY_FILENAME.

Before calling the method, the various properties can be used to set the parameters to be updated. Only those parameters specified by the IncludedParameters property will be included. If a parameter is not specified, the corresponding Attribute will not be included in the request to the Print SCP and hence will not be updated.

See Also

Elements: | Create method, OverlayFilename property, IncludedParameters property, GetSOPInstanceUID method, Delete method, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


IsModalityLUTSequence property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsModalityLUTSequence
Overview | Refer to LUT Encoding.

Remarks

The IsModalityLUTSequence property specifies whether a "Modality LUT Sequence" (0028,3000) exists in the DICOM Data Set or not.

When this property is set, the LUTDescriptorNumberOfEntries property, the LUTDescriptorFirstMapped property, the LUTDescriptorEntryBits property, the LUTExplanation property, and the ModalityLUTType property will be valid; otherwise, their values are undefined. Also if this property is set, the GetModalityLUTData method can be called to retrieve the "LUT Data" for a "Modality LUT Sequence", otherwise, this data will be missing.

See Also

Elements: | IsRescaleSlopeIntercept property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method, GetModalityLUTData method
Topics: | Lookup Tables


IsRescaleSlopeIntercept property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsRescaleSlopeIntercept
Overview | Refer to LUT Encoding.

Remarks

The IsRescaleSlopeIntercept property specifies whether "Rescale Intercept" (0028,1052) and "Rescale Slope" (0028,1053) exist in the DICOM Data Set or not.

When this property is set, the RescaleIntercept property, the RescaleSlope property, and the RescaleType property will be valid, otherwise, their values are undefined.

See Also

Elements: | IsModalityLUTSequence property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


LUTDescriptorEntryBits property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LUTDescriptorEntryBits
Overview | Refer to LUT Encoding.

Remarks

The LUTDescriptorEntryBits property specifies the number of bits for each entry in the LUT Data. This is the third value in the "LUT Descriptor" (0028,3002) element under the "Modality LUT Sequence" (0028,3000).

This property is defined only when the IsModalityLUTSequence property is set.

See Also

Elements: | IsModalityLUTSequence property, LUTDescriptorNumberOfEntries property, LUTDescriptorFirstMapped property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


LUTDescriptorFirstMapped property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LUTDescriptorFirstMapped
Overview | Refer to LUT Encoding.

Remarks

The LUTDescriptorFirstMapped property specifies the first stored pixel value mapped. This is the second value in the "LUT Descriptor" (0028,3002) element under the "Modality LUT Sequence" (0028,3000).

This property is defined only when the IsModalityLUTSequence property is set.

See Also

Elements: | IsModalityLUTSequence property, LUTDescriptorNumberOfEntries property, LUTDescriptorEntryBits property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


LUTDescriptorNumberOfEntries property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LUTDescriptorNumberOfEntries
Overview | Refer to LUT Encoding.

Remarks

The LUTDescriptorNumberOfEntries property specifies the number of entries in the lookup table. This is the first value in the "LUT Descriptor" (0028,3002) element under the "Modality LUT Sequence" (0028,3000).

This property is defined only when the IsModalityLUTSequence property is set.

According to the DICOM standard when the number of entries under the "LUT Data" (0028,3006) in the "Modality LUT Sequence" (0028, 3000) is equal to 2^16 then the value of this property should be set to 0. However, LEADTOOLS does NOT have this limitation.

See Also

Elements: | IsModalityLUTSequence property, LUTDescriptorFirstMapped property, LUTDescriptorEntryBits property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


LUTExplanation property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR LUTExplanation
Overview | Refer to LUT Encoding.

Remarks

The LUTExplanation property specifies the value of the "LUT Explanation" (0028,3003) element under the "Modality LUT Sequence" (0028,3000).

This property is defined only when the IsModalityLUTSequence property is set.

The maximum length of the string specified by this property is 64.

See Also

Elements: | IsModalityLUTSequence property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


ModalityLUTType property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ModalityLUTType
Overview | Refer to LUT Encoding.

Remarks

The ModalityLUTType property specifies the value of the "Modality LUT Type" (0028,3004) element under the "Modality LUT Sequence" (0028,3000).

This property is defined only when the IsModalityLUTSequence property is set.

The maximum length of the string specified by this property is 64.

See Also

Elements: | IsModalityLUTSequence property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


RescaleIntercept property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double RescaleIntercept
Overview | Refer to LUT Encoding.

Remarks

The RescaleIntercept property specifies the value of the "Rescale Intercept" (0028,1052) element.

This property is defined only when the IsRescaleSlopeIntercept property is set.

See Also

Elements: | IsRescaleSlopeIntercept property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


RescaleSlope property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double RescaleSlope
Overview | Refer to LUT Encoding.

Remarks

The RescaleSlope property specifies the value of the "Rescale Slope" (0028,1053) element.

This property is defined only when the IsRescaleSlopeIntercept property is set.

See Also

Elements: | IsRescaleSlopeIntercept property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


RescaleType property (ILModalityLUTAttributes interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR RescaleType
Overview | Refer to LUT Encoding.

Remarks

The RescaleType property specifies the value of the "Rescale Type" (0028,1054) element.

This property is defined only when the IsRescaleSlopeIntercept property is set.

The maximum length of the string specified by this property is 64.

See Also

Elements: | IsRescaleSlopeIntercept property, ModalityLUTAttributes property, GetModalityLUTAttributes method, SetModalityLUT method
Topics: | Lookup Tables


BlueLUTDescriptorEntryBits property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long BlueLUTDescriptorEntryBits
Overview | Refer to LUT Encoding.

Remarks

The BlueLUTDescriptorEntryBits property specifies the number of bits for each entry in the "Blue Palette Color Lookup Table Data". This is the third value in the "Blue Palette Color Lookup Table Descriptor" (0028,1103) element.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


BlueLUTDescriptorFirstMapped property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long BlueLUTDescriptorFirstMapped
Overview | Refer to LUT Encoding.

Remarks

The BlueLUTDescriptorFirstMapped property specifies the first stored pixel value mapped. This is the second value in the "Blue Palette Color Lookup Table Descriptor" (0028,1103) element.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


BlueLUTDescriptorNumberOfEntries property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long BlueLUTDescriptorNumberOfEntries
Overview | Refer to LUT Encoding.

Remarks

The BlueLUTDescriptorNumberOfEntries property specifies the number of entries in the "Blue Palette Color Lookup Table". This is the first value in the "Blue Palette Color Lookup Table Descriptor" (0028,1103) element.

According to the DICOM standard when the number of entries under the "Blue Palette Color Lookup Table" is equal to 2^16 then the value of this property should be set to 0. However, LEADTOOLS does NOT have this limitation.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


GreenLUTDescriptorEntryBits property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GreenLUTDescriptorEntryBits
Overview | Refer to LUT Encoding.

Remarks

The GreenLUTDescriptorEntryBits property specifies the number of bits for each entry in the "Green Palette Color Lookup Table Data". This is the third value in the "Green Palette Color Lookup Table Descriptor" (0028,1102) element.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


GreenLUTDescriptorFirstMapped property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GreenLUTDescriptorFirstMapped
Overview | Refer to LUT Encoding.

Remarks

The GreenLUTDescriptorFirstMapped property specifies the first stored pixel value mapped. This is the second value in the "Green Palette Color Lookup Table Descriptor" (0028,1102) element.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


GreenLUTDescriptorNumberOfEntries property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long GreenLUTDescriptorNumberOfEntries
Overview | Refer to LUT Encoding.

Remarks

The GreenLUTDescriptorNumberOfEntries property specifies the number of entries in the "Green Palette Color Lookup Table". This is the first value in the "Green Palette Color Lookup Table Descriptor" (0028,1102) element.

According to the DICOM standard when the number of entries under the "Green Palette Color Lookup Table" is equal to 2^16 then the value of this property should be set to 0. However, LEADTOOLS does NOT have this limitation.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


IsSegmented property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | VARIANT_BOOL IsSegmented
Overview | Refer to LUT Encoding.

Remarks

The IsSegmented property specifies whether the "Palette Color Lookup Table Data" is segmented or not.

This property is set when the "Segmented Red Palette Color Lookup Table Data" (0028,1221), the "Segmented Green Palette Color Lookup Table Data" (0028,1222), and the "Segmented Blue Palette Color Lookup Table Data" (0028,1223) exist in the DICOM Data Set.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


RedLUTDescriptorEntryBits property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long RedLUTDescriptorEntryBits
Overview | Refer to LUT Encoding.

Remarks

The RedLUTDescriptorEntryBits property specifies the number of bits for each entry in the "Red Palette Color Lookup Table Data". This is the third value in the "Red Palette Color Lookup Table Descriptor" (0028,1101) element.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


RedLUTDescriptorFirstMapped property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long RedLUTDescriptorFirstMapped
Overview | Refer to LUT Encoding.

Remarks

The RedLUTDescriptorFirstMapped property specifies the first stored pixel value mapped. This is the second value in the "Red Palette Color Lookup Table Descriptor" (0028,1101) element.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


RedLUTDescriptorNumberOfEntries property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long RedLUTDescriptorNumberOfEntries
Overview | Refer to LUT Encoding.

Remarks

The RedLUTDescriptorNumberOfEntries property specifies the number of entries in the "Red Palette Color Lookup Table". This is the first value in the "Red Palette Color Lookup Table Descriptor" (0028,1101) element.

According to the DICOM standard when the number of entries under the "Red Palette Color Lookup Table" is equal to 2^16 then the value of this property should be set to 0. However, LEADTOOLS does NOT have this limitation.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


UID property (ILPaletteColorLUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR UID
Overview | Refer to LUT Encoding

Remarks

The UID property specifies the value of the "Palette Color Lookup Table UID" (0028,1199) element.

The maximum length of the string specified by this property is 64.

See Also

Elements: | PaletteColorLUTAttributes property, GetPaletteColorLUTAttributes method, SetPaletteColorLUTAttributes method
Topics: | Lookup Tables


Create method (ILPresentationLUT Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | Short Create(VARIANT PresentationLUT, BSTR pszPresentationLUTShape);
Overview | Refer to Print Management SCU.

Remarks

The Create method requests the Print SCP to create a Presentation LUT SOP Instance.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Presentation LUT was created successfully, with either a Success or Warning status code in the response of the Print SCP.

The method can be used to create one or more Presentation LUTs. Having a Presentation LUT created, the GetSOPInstanceUID method can be used to obtain its SOP Instance UID, which in turn can be used to reference the Presentation LUT from Film Boxes and Grayscale Image Boxes. Refer to the RefPresLUTInstanceUID property of the ILFilmBox interface and the RefPresLUTInstanceUID property of the ILImageBox interface.

The Print SCP can be requested to delete an existing Presentation LUT SOP Instance using the Delete method.

See Also

Elements: | GetSOPInstanceUID method, Delete method, LastOperationStatus property, RefPresLUTInstanceUID property (ILFilmBox interface), RefPresLUTInstanceUID property (ILImageBox interface)
Topics: | DICOM Print Management SCU: Basic Print Management


Delete method (ILPresentationLUT Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Delete(BSTR pszSOPInstanceUID);
Overview | Refer to Print Management SCU.

Remarks

The Delete method requests the Print SCP to delete the specified Presentation LUT SOP Instance.

The Presentation LUT specified (by the SOP Instance UID) must be an existing one. Refer to the Create method for creating Presentation LUTs.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the specified Presentation LUT was deleted successfully, with either a Success or Warning status code in the response of the Print SCP.

Once a Presentation LUT is deleted, it cannot be referenced by Film Boxes and Image Boxes.

See Also

Elements: | Create method, GetSOPInstanceUID method, LastOperationStatus property
Topics: | DICOM Print Management SCU: Basic Print Management


GetSOPInstanceUID method (ILPresentationLUT Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR GetSOPInstanceUID();
Overview | Refer to Print Management SCU.

Remarks

The GetSOPInstanceUID method returns the SOP Instance UID of the last created Presentation LUT SOP Instance.

Once a Presentation LUT is created, a call to this method will return the SOP Instance UID of the newly created Presentation LUT. Therefore, if the SOP Instance UID of a Presentation LUT is needed, it should be stored before creating the next Presentation LUT.

See Also

Elements: | Create method, Delete method
Topics: | DICOM Print Management SCU: Basic Print Management


MainObject property (ILPresentationLUT Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the LEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


DateOfLastCalibration property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR DateOfLastCalibration
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The DateOfLastCalibration property specifies the Date of Last Calibration (0018,1200). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_DATE_OF_LAST_CALIBRATION.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


DeviceSerialNumber property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR DeviceSerialNumber
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The DeviceSerialNumber property specifies the Device Serial Number (0018,1000). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_DEVICE_SERIAL_NUMBER.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


MainObject property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the LEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


Manufacturer property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Manufacturer
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Manufacturer property specifies the Manufacturer (0008,0070). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_MANUFACTURER.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


ManufacturerModelName property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ManufacturerModelName
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The ManufacturerModelName property specifies the Manufacturer’s Model Name (0008,1090). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_MANUFACTURER_MODEL_NAME.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


PrinterName property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrinterName
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrinterName property specifies the Printer Name (2110,0030). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_PRINTER_NAME.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


PrinterStatus property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrinterStatus
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrinterStatus property specifies the Printer Status (2110,0010). Refer to the DICOM standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_PRINTER_STATUS.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


PrinterStatusInfo property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrinterStatusInfo
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrinterStatusInfo property specifies the Printer Status Info (2110,0020). Refer to the DICOM standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_PRINTER_STATUS_INFO.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


RequiredInfo property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | PrinterInfoAttribEnum RequiredInfo
Overview | Refer to Print Management SCU.

Remarks

The RequiredInfo property specifies the printer information to be retrieved using the GetInfo method. It can be set to any combination of the following values:

Value | Meaning
PRN_PRINTER_STATUS | [0x001] The Printer Status is required (PrinterStatus property).
PRN_PRINTER_STATUS_INFO | [0x002] The Printer Status Info is required (PrinterStatusInfo property).
PRN_PRINTER_NAME | [0x004] The Printer Name is required (PrinterName property).
PRN_MANUFACTURER | [0x008] The Manufacturer is required (Manufacturer property).
PRN_MANUFACTURER_MODEL_NAME | [0x010] The Manufacturer’s Model Name is required (ManufacturerModelName property).
PRN_DEVICE_SERIAL_NUMBER | [0x020] The Device Serial Number is required (DeviceSerialNumber property).
PRN_SOFTWARE_VERSIONS | [0x040] The Software Version(s) are required (SoftwareVersions property).
PRN_DATE_OF_LAST_CALIBRATION | [0x080] The Date of Last Calibration is required (DateOfLastCalibration property).
PRN_TIME_OF_LAST_CALIBRATION | [0x100] The Time of Last Calibration is required (TimeOfLastCalibration property).
PRN_ALL_ATTRIBUTES | [0x1FF] Combines all the above values and hence the Values of all the Attributes will be requested.

To query the Print SCP for the Value of an Attribute using the GetInfo method, the RequiredInfo property should specify the corresponding constant. If an Attribute is not specified, it will not be included in the request. However, if none of the Attributes is specified (by setting the RequiredInfo property to 0), then it will be assumed that the Values of all the Attributes are required (the same as PRN_ALL_ATTRIBUTES).

The default value of the property combines PRN_PRINTER_STATUS and PRN_PRINTER_STATUS_INFO.

See Also

Elements: | GetInfo method
Topics: | DICOM Print Management SCU: Printer


SoftwareVersions property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SoftwareVersions
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The SoftwareVersions property specifies the Software Version(s) (0018,1020). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_SOFTWARE_VERSIONS.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


TimeOfLastCalibration property (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR TimeOfLastCalibration
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The TimeOfLastCalibration property specifies the Time of Last Calibration (0018,1201). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PRN_TIME_OF_LAST_CALIBRATION.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Printer


GetInfo method (ILPrinter Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetInfo(VARIANT_BOOL bBasicPrintManagement, VARIANT_BOOL bColorPrintManagement);
Overview | Refer to Print Management SCU.

Remarks

The GetInfo method queries the Print SCP for information about the printer.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the required printer information was retrieved successfully, with either a Success or Warning status code in the response of the Print SCP.

Before calling the method, the required printer information can be specified using the RequiredInfo property. Once the printer information is retrieved successfully, it can be obtained by accessing the various properties. Notice that any property that specifies the Value of an Attribute will be updated, even if the Attribute wasn’t specified before calling the method.

The Printer SOP Class is included in each of the three Meta SOP Classes (the Basic Grayscale Print Management Meta SOP Class, the Basic Color Print Management Meta SOP Class, and the Pull Stored Print Management Meta SOP Class). The parameters bBasicPrintManagement and bColorPrintManagement recommend the Meta SOP Class to be specified in the request to the Print SCP. However, unless the Meta SOP Class specified by these parameters is supported on the Association, it will not be specified in the request and the method will choose a supported Meta SOP Class instead. Therefore, if only one Meta SOP Class is supported, the method will always choose it irrespective of the values of these parameters. The parameter bBasicPrintManagement selects between the Basic Print Management Meta SOP Classes and the Pull Stored Print Management Meta SOP Class, while the parameter bColorPrintManagement selects between the Basic Grayscale Print Management Meta SOP Class and the Basic Color Print Management Meta SOP Class.

See Also

Elements: | RequiredInfo property, LastOperationStatus property, OnPrinterReport event, Get method
Topics: | DICOM Print Management SCU: Printer


MainObject property (ILPrinterConfiguration Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the LEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


PrinterConfigItems property (ILPrinterConfiguration Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILPrinterConfigurationItems* PrinterConfigItems
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrinterConfigItems property is the collection of the Printer Configuration Items retrieved from the Print SCP by the Get method.

The printer configuration information is supposed to be sent by the Print SCP as one or more Items in a Printer Configuration Sequence (2000,001E). For each Item received, an LPrinterConfigurationItem object is added to the collection. Each LPrinterConfigurationItem object exposes the ILPrinterConfigurationItem Interface which defines two collections:

A collection of LAttribute objects that contains an LAttribute object for each Attribute in the Printer Configuration Item, and a collection of LSequence objects that contains an LSequence object for each sequence of items in the Printer Configuration Item. Each LSequence object specifies a collection of LSequenceItem objects, each of which specifies a collection LAttribute objects.

This way, the retrieved printer configuration information can be fully investigated. The following diagram illustrates these relations.

Each time a successful call to the Get method is made, the collection will be refilled with the Printer Configuration Items retrieved from the Print SCP.

See Also

Elements: | Get method, Attributes property (ILPrinterConfigurationItem interface), Sequences property (ILPrinterConfigurationItem interface), Items property (ILSequence interface), Attributes property (ILSequenceItem interface)
Topics: | DICOM Print Management SCU: Printer


Get method (ILPrinterConfiguration Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Get();
Overview | Refer to Print Management SCU.

Remarks

The Get method queries the Print SCP for the printer configuration information.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the printer configuration information was retrieved successfully, with either a Success or Warning status code in the response of the Print SCP.

The printer configuration information retrieved from the Print SCP is specified by the PrinterConfigItems property. Refer to the property for more information.

See Also

Elements: | PrinterConfigItems property, LastOperationStatus property, GetInfo method (ILPrinter interface)
Topics: | DICOM Print Management SCU: Printer


Attributes property (ILPrinterConfigurationItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILAttributes* Attributes
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Attributes property is the collection of all the Attributes in the Printer Configuration Item. Refer to the PrinterConfigItems property for more information.

The Name and Value of each Attribute in the collection are specified by the members of the ILAttribute interface exposed by the corresponding LAttribute object.

See Also

Elements: | Sequences property, PrinterConfigItems property
Topics: | DICOM Print Management SCU: Printer


Sequences property (ILPrinterConfigurationItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILSequences* Sequences
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Sequences property is the collection of all the Sequences of Items in the Printer Configuration Item. Refer to the PrinterConfigItems property for more information.

The Name and Items of each Sequence in the collection are specified by the members of the ILSequence interface exposed by the corresponding LSequence object.

A Sequence in the collection is supposed to be one of the following Sequences of Items:

Media Installed Sequence (2000,00A2)

Other Media Available Sequence (2000,00A4)

Supported Image Display Formats Sequence (2000,00A8)

See Also

Elements: | Attributes property, PrinterConfigItems property
Topics: | DICOM Print Management SCU: Printer


_NewEnum property (ILPrinterConfigurationItems Interface)

Syntax | IUnknown* _NewEnum
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The _NewEnum property returns an IEnumVARIANT interface on an enumeration object for the collection.

This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

See Also

Topics:

DICOM Print Management SCU: Printer


Count property (ILPrinterConfigurationItems Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Count
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Count property specifies the number of LPrinterConfigurationItem objects in the collection.

See Also

Topics:

DICOM Print Management SCU: Printer


Item method (ILPrinterConfigurationItems Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILPrinterConfigurationItem* Item(long Index);
Overview | Refer to Print Management SCU.

Remarks

The Item method returns an LPrinterConfigurationItem object from the collection. This is the default member of the ILPrinterConfigurationItems interface.

See Also

Topics:

DICOM Print Management SCU: Printer


CreationDate property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CreationDate
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The CreationDate property specifies the Creation Date (2100,0040). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PJ_CREATION_DATE.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Print Jobs


CreationTime property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CreationTime
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The CreationTime property specifies the Creation Time (2100,0050). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PJ_CREATION_TIME.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Print Jobs


ExecutionStatus property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ExecutionStatus
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The ExecutionStatus property specifies the Execution Status (2100,0020). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PJ_EXECUTION_STATUS.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Print Jobs


ExecutionStatusInfo property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ExecutionStatusInfo
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The ExecutionStatusInfo property specifies the Execution Status Info (2100,0030). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PJ_EXECUTION_STATUS_INFO.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Print Jobs


MainObject property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the LEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


Originator property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Originator
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Originator property specifies the Originator (2100,0070). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PJ_ORIGINATOR.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Print Jobs


PrinterName property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrinterName
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrinterName property specifies the Printer Name (2110,0030). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PJ_PRINTER_NAME.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Print Jobs


PrintPriority property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrintPriority
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrintPriority property specifies the Print Priority (2000,0020). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the RequiredInfo property specifies PJ_PRINT_PRIORITY.

See Also

Elements: | GetInfo method, RequiredInfo property
Topics: | DICOM Print Management SCU: Print Jobs


RequiredInfo property (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | PrintJobInfoAttribEnum RequiredInfo
Overview | Refer to Print Management SCU.

Remarks

The RequiredInfo property specifies the Print Job information to be retrieved using the GetInfo method. It can be set to any combination of the following values:

Value | Meaning
PJ_EXECUTION_STATUS | [0x01] The Execution Status is required (ExecutionStatus property).
PJ_EXECUTION_STATUS_INFO | [0x02] The Execution Status Info is required (ExecutionStatusInfo property).
PJ_PRINT_PRIORITY | [0x04] The Print Priority is required (PrintPriority property).
PJ_CREATION_DATE | [0x08] The Creation Date is required (CreationDate property).
PJ_CREATION_TIME | [0x10] The Creation Time is required (CreationTime property).
PJ_PRINTER_NAME | [0x20] The Printer Name is required (PrinterName property).
PJ_ORIGINATOR | [0x40] The Originator is required (Originator property).
PJ_ALL_ATTRIBUTES | [0x7F] Combines all the above values and hence the Values of all the Attributes will be requested.

To query the Print SCP for the Value of an Attribute using the GetInfo method, the RequiredInfo property should specify the corresponding constant. If an Attribute is not specified, it will not be included in the request. However, if none of the Attributes is specified (by setting the RequiredInfo property to 0), then it will be assumed that the Values of all the Attributes are required (the same as PJ_ALL_ATTRIBUTES).

The default value of the property combines PJ_EXECUTION_STATUS, PJ_EXECUTION_STATUS_INFO, and PJ_PRINT_PRIORITY.

See Also

Elements: | GetInfo method
Topics: | DICOM Print Management SCU: Print Jobs


GetInfo method (ILPrintJob Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short GetInfo(BSTR pszSOPInstanceUID);
Overview | Refer to Print Management SCU.

Remarks

The GetInfo method queries the Print SCP for information about the specified Print Job.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the required Print Job information was retrieved successfully, with either a Success or Warning status code in the response of the Print SCP.

Before calling the method, the required Print Job information can be specified using the RequiredInfo property. Once the Print Job information is retrieved successfully, it can be obtained by accessing the various properties. Notice that any property that specifies the Value of an Attribute will be updated, even if the Attribute wasn’t specified before calling the method.

See Also

Elements: | PrintJobSOPInstanceUID property (ILFilmSession interface), PrintJobSOPInstanceUID property (ILFilmBox interface), PrintJobSOPInstanceUID property (ILPullPrintRequest interface), RequiredInfo property, OnPrintJobReport event, LastOperationStatus property
Topics: | DICOM Print Management SCU: Print Jobs


AnnotationFlag property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR AnnotationFlag
Overview | Refer to Print Management SCU.

Remarks

The AnnotationFlag property specifies the Annotation Flag (2000,0065). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_ANNOTATION_FLAG.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


CollationFlag property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR CollationFlag
Overview | Refer to Print Management SCU.

Remarks

The CollationFlag property specifies the Collation Flag (2000,0063). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_COLLATION_FLAG.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


ColorImagePrintingFlag property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ColorImagePrintingFlag
Overview | Refer to Print Management SCU.

Remarks

The ColorImagePrintingFlag property specifies the Color Image Printing Flag (2000,0062). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_COLOR_IMAGE_PRINTING_FLAG.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


ConfigurationInformation property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ConfigurationInformation
Overview | Refer to Print Management SCU.

Remarks

The ConfigurationInformation property specifies the Configuration Information (2010,0150). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_CONFIGURATION_INFORMATION.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


FilmDestination property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR FilmDestination
Overview | Refer to Print Management SCU.

Remarks

The FilmDestination property specifies the Film Destination (2000,0040). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_FILM_DESTINATION.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


FilmSessionLabel property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR FilmSessionLabel
Overview | Refer to Print Management SCU.

Remarks

The FilmSessionLabel property specifies the Film Session Label (2000,0050). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_FILM_SESSION_LABEL.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


ImageBoxPresentationLUTFlag property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ImageBoxPresentationLUTFlag
Overview | Refer to Print Management SCU.

Remarks

The ImageBoxPresentationLUTFlag property specifies the Image Box Presentation LUT Flag (2000,006A). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_IMAGE_BOX_PRESENTATION_LUT_FLAG.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


ImageOverlayFlag property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR ImageOverlayFlag
Overview | Refer to Print Management SCU.

Remarks

The ImageOverlayFlag property specifies the Image Overlay Flag (2000,0067). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_IMAGE_OVERLAY_FLAG.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


Illumination property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Illumination
Overview | Refer to Print Management SCU.

Remarks

The Illumination property specifies the Illumination (2010,015E). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_ILLUMINATION.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


IncludedParameters property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | PullPrintRequestParameterEnum IncludedParameters
Overview | Refer to Print Management SCU.

Remarks

The IncludedParameters property specifies the parameters to be included when creating the Pull Print Request SOP Instance using the Create method. It can be set to any combination of the following values:

Value | Meaning
PPR_NUMBER_OF_COPIES | [0x0001] Includes the parameter specified by the NumberOfCopies property.
PPR_PRINT_PRIORITY | [0x0002] Includes the parameter specified by the PrintPriority property.
PPR_MEDIUM_TYPE | [0x0004] Includes the parameter specified by the MediumType property.
PPR_FILM_DESTINATION | [0x0008] Includes the parameter specified by the FilmDestination property.
PPR_FILM_SESSION_LABEL | [0x0010] Includes the parameter specified by the FilmSessionLabel property.
PPR_MEMORY_ALLOCATION | [0x0020] Includes the parameter specified by the MemoryAllocation property.
PPR_COLOR_IMAGE_PRINTING_FLAG | [0x0040] Includes the parameter specified by the ColorImagePrintingFlag property.
PPR_COLLATION_FLAG | [0x0080] Includes the parameter specified by the CollationFlag property.
PPR_ANNOTATION_FLAG | [0x0100] Includes the parameter specified by the AnnotationFlag property.
PPR_IMAGE_OVERLAY_FLAG | [0x0200] Includes the parameter specified by the ImageOverlayFlag property.
PPR_PRESENTATION_LUT_FLAG | [0x0400] Includes the parameter specified by the PresentationLUTFlag property.
PPR_IMAGE_BOX_PRESENTATION_LUT_FLAG | [0x0800] Includes the parameter specified by the ImageBoxPresentationLUTFlag property.
PPR_CONFIGURATION_INFORMATION | [0x1000] Includes the parameter specified by the ConfigurationInformation property.
PPR_ILLUMINATION | [0x2000] Includes the parameter specified by the Illumination property.
PPR_REFLECTED_AMBIENT_LIGHT | [0x4000] Includes the parameter specified by the ReflectedAmbientLight property.
PPR_OWNER_ID | [0x8000] Includes the parameter specified by the OwnerID property.
PPR_ALL_PARAMETERS | [0xFFFF] Combines all the above values and hence includes all the parameters.

The property can also be set to 0; in this case, none of the parameters will be included.

If a parameter is not specified by the IncludedParameters property, the corresponding Attribute will not be included in the request to the Print SCP.

The default value of this property is 0.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


MainObject property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILEADDicomPrintSCU* MainObject
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The MainObject property returns a reference to the LEADDicomPrintSCU object.

See Also

Topics:

DICOM Print Management SCU: Miscellaneous


MediumType property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR MediumType
Overview | Refer to Print Management SCU.

Remarks

The MediumType property specifies the Medium Type (2000,0030). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_MEDIUM_TYPE.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


MemoryAllocation property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long MemoryAllocation
Overview | Refer to Print Management SCU.

Remarks

The MemoryAllocation property specifies the Memory Allocation (2000,0060). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_MEMORY_ALLOCATION.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


NumberOfCopies property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long NumberOfCopies
Overview | Refer to Print Management SCU.

Remarks

The NumberOfCopies property specifies the Number of Copies (2000,0010). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_NUMBER_OF_COPIES.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


OwnerID property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR OwnerID
Overview | Refer to Print Management SCU.

Remarks

The OwnerID property specifies the Owner ID (2100,0160). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_OWNER_ID.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


PresentationLUTFlag property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PresentationLUTFlag
Overview | Refer to Print Management SCU.

Remarks

The PresentationLUTFlag property specifies the Presentation LUT Flag (2000,0069). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_PRESENTATION_LUT_FLAG.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


PrintJobSOPInstanceUID property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrintJobSOPInstanceUID
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The PrintJobSOPInstanceUID property specifies the SOP Instance UID of the Print Job SOP Instance resulted from the last successful request sent to the Print SCP to print the session of the current Pull Print Request SOP Instance.

The property specifies an empty string if no Print Job was created by the Print SCP for the last request sent to print the session.

The PrintSession method requests the Print SCP to print the session of the current Pull Print Request SOP Instance. If the Print Job SOP Class is supported on the Association, the Print SCP is supposed to create a Print Job SOP Instance for the new Print Job and send the SOP Instance UID of that Instance in the response to the printing request. The PrintJobSOPInstanceUID property specifies that SOP Instance UID.

The SOP Instance UID of a Print Job can be used to query the Print SCP for information about the Print Job (refer to the GetInfo method of the ILPrintJob interface). Also, it is used to identify the Print Job when status reports are received from the Print SCP (refer to the OnPrintJobReport event).

See Also

Elements: | PrintSession method, OnPrintJobReport event, GetInfo method (ILPrintJob interface), PrintJobSOPInstanceUID property (ILFilmSession interface), PrintJobSOPInstanceUID property (ILFilmBox interface)
Topics: | DICOM Print Management SCU: Print Jobs


PrintPriority property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR PrintPriority
Overview | Refer to Print Management SCU.

Remarks

The PrintPriority property specifies the Print Priority (2000,0020). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_PRINT_PRIORITY.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


ReflectedAmbientLight property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long ReflectedAmbientLight
Overview | Refer to Print Management SCU.

Remarks

The ReflectedAmbientLight property specifies the Reflected Ambient Light (2010,0160). Refer to the DICOM Standard for the description.

The corresponding Attribute will be included in the request to the Print SCP only if the IncludedParameters property specifies PPR_REFLECTED_AMBIENT_LIGHT.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


SOPInstanceUID property (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR SOPInstanceUID
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The SOPInstanceUID property specifies the SOP Instance UID of the current Pull Print Request SOP Instance.

The property specifies an empty string if no Pull Print Request SOP Instance is currently created.

See Also

Elements: | Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


AddStoredPrintItem method (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short AddStoredPrintItem(BSTR RetrieveAETitle, BSTR ReferencedSOPInstanceUID, BSTR StudyInstanceUID, BSTR SeriesInstanceUID, BSTR PatientID);
Overview | Refer to Print Management SCU.

Remarks

The AddStoredPrintItem method specifies a Stored Print Storage SOP Instance to be referenced by the Pull Print Request SOP Instance that will be created using the Create method.

The method can be used repeatedly to add information about as many Stored Print Storage SOP Instances as required. When the Create method is then called, the Pull Print Request SOP Instance will be created such that it references the specified Instances.

Except for the PatientID parameter, if any parameter was set to NULL or if the parameter specified an empty string when the AddStoredPrintItem method was called to add a Stored Print Item, the Create method will return an error.

Use the RemoveAllStoredPrintItems method to remove all the Stored Print Items that were previously added.

See Also

Elements: | Create method, RemoveAllStoredPrintItems method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


Create method (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Create();
Overview | Refer to Print Management SCU.

Remarks

The Create method requests the Print SCP to create a Pull Print Request SOP Instance.

Only one Pull Print Request SOP Instance can be supported on the Association at any time.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Pull Print Request SOP Instance was created successfully, with either a Success or Warning status code in the response of the Print SCP.

Having the Instance created, its SOP Instance UID can be obtained from the SOPInstanceUID property. Also, the PrintSession method and Delete method can be used to print the session and to delete the Instance, respectively.

Before calling the method, the AddStoredPrintItem method must be used to specify at least one Stored Print Storage SOP Instance to be referenced; otherwise, the Create method will return an error.

Also, before calling the method, the various properties can be used to set the parameters of the Pull Print Request SOP Instance to be created. Only those parameters specified by the IncludedParameters property will be included. If a parameter is not specified, the corresponding Attribute will not be included in the request to the Print SCP.

See Also

Elements: | AddStoredPrintItem method, IncludedParameters property, SOPInstanceUID property, PrintSession method, Delete method, LastOperationStatus property
Topics: | DICOM Print Management SCU: Pull Stored Print Management


Delete method (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short Delete();
Overview | Refer to Print Management SCU.

Remarks

The Delete method requests the Print SCP to delete the current Pull Print Request SOP Instance.

There must be a Pull Print Request SOP Instance currently created before using this method.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the Pull Print Request SOP Instance was deleted successfully, with either a Success or Warning status code in the response of the Print SCP.

See Also

Elements: | Create method, LastOperationStatus property
Topics: | DICOM Print Management SCU: Pull Stored Print Management


PrintSession method (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | short PrintSession();
Overview | Refer to Print Management SCU.

Remarks

The PrintSession method requests the Print SCP to print the session of the current Pull Print Request SOP Instance.

There must be a Pull Print Request SOP Instance currently created before using this method.

The method will not return until it receives the response of the Print SCP or an error occurs. The status code specified in the response of the Print SCP is given by the LastOperationStatus property. When the return value of the method is 0, then this means that the session was printed successfully, with either a Success or Warning status code in the response of the Print SCP.

To print the session, the Print SCP should first retrieve the Stored Print Storage SOP Instance(s) specified when the Pull Print Request SOP Instance was created, retrieve the Image SOP Instances referenced by the former Instance(s), and then print the resulting film box(es).

See Also

Elements: | Create method, LastOperationStatus property
Topics: | DICOM Print Management SCU: Pull Stored Print Management


RemoveAllStoredPrintItems method (ILPullPrintRequest Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | void RemoveAllStoredPrintItems();
Overview | Refer to Print Management SCU.

Remarks

The RemoveAllStoredPrintItems method removes all the Stored Print Items added so far using the AddStoredPrintItem method.

After calling this method, the Create method would fail if called before using the AddStoredPrintItem method to specify at least one Stored Print Storage SOP Instance to be referenced.

See Also

Elements: | AddStoredPrintItem method, Create method
Topics: | DICOM Print Management SCU: Pull Stored Print Management


Items property (ILSequence Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILSequenceItems* Items
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Items property is the collection of all Items in the Sequence of Items.

The Attributes of each Item in the collection are contained in the collection specified by the Attributes property of the ILSequenceItem interface exposed by the corresponding LSequenceItem object.

See Also

Elements: | Name property, PrinterConfigItems property, Sequences property
Topics: | DICOM Print Management SCU: Printer


Name property (ILSequence Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR Name
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Name property specifies the Name of the Sequence of Items. This is supposed to be one of the following:

Media Installed Sequence

Other Media Available Sequence

Supported Image Display Formats Sequence

See Also

Elements: | Items property, PrinterConfigItems property, Sequences property
Topics: | DICOM Print Management SCU: Printer


_NewEnum property (ILSequences Interface)

Syntax | IUnknown* _NewEnum
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The _NewEnum property returns an IEnumVARIANT interface on an enumeration object for the collection.

This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

See Also

Topics:

DICOM Print Management SCU: Printer


Count property (ILSequences Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Count
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Count property specifies the number of LSequence objects in the collection.

See Also

Topics:

DICOM Print Management SCU: Printer


Item method (ILSequences Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILSequence* Item(long Index);
Overview | Refer to Print Management SCU.

Remarks

The Item method returns an LSequence object from the collection. This is the default member of the ILSequences interface.

See Also

Topics:

DICOM Print Management SCU: Printer


Attributes property (ILSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILAttributes* Attributes
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Attributes property is the collection of all the Attributes in the Sequence Item.

The Name and Value of each Attribute in the collection are specified by the members of the ILAttribute interface exposed by the corresponding LAttribute object.

See Also

Elements: | PrinterConfigItems property, Items property
Topics: | DICOM Print Management SCU: Printer


Count property (ILSequenceItem Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long Count
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The Count property specifies the number of LSequenceItem objects in the collection.

See Also

Topics:

DICOM Print Management SCU: Printer


_NewEnum property (ILSequenceItems Interface)

Syntax | IUnknown* _NewEnum
Overview | Refer to Print Management SCU.

Remarks

(Read-only) The _NewEnum property returns an IEnumVARIANT interface on an enumeration object for the collection.

This is a standard property that allows the collection to be iterated over using the For…Each syntax of Visual Basic and VBScript.

See Also

Topics:

DICOM Print Management SCU: Printer


Item method (ILSequenceItems Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | ILSequenceItem* Item(long Index);
Overview | Refer to Print Management SCU.

Remarks

The Item method returns an LSequenceItem object from the collection. This is the default member of the ILSequenceItems interface.

See Also

Topics:

DICOM Print Management SCU: Printer


WindowCenter property (ILWindowAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double WindowCenter
Overview | Refer to LUT Encoding.

Remarks

The WindowCenter property specifies the value of the "Window Center" (0028,1050) element.

See Also

Elements: | WindowAttributes property, GetWindowAttributes method, SetWindowAttributes method
Topics: | Lookup Tables


WindowCWExplanation property (ILWindowAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR WindowCWExplanation
Overview | Refer to LUT Encoding.

Remarks

The WindowCWExplanation property specifies the value of the "Window Center & Width Explanation" (0028,1055) element.

The maximum length of the string specified by this property is 64.

See Also

Elements: | WindowAttributes property, GetWindowAttributes method, SetWindowAttributes method
Topics: | Lookup Tables


WindowWidth property (ILWindowAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | double WindowWidth
Overview | Refer to LUT Encoding.

Remarks

The WindowWidth property specifies the value of the "Window Width" (0028,1051) element.

The value of this property shall always be greater than or equal to 1.

See Also

Elements: | WindowAttributes property, GetWindowAttributes method, SetWindowAttributes method
Topics: | Lookup Tables


LUTDescriptorEntryBits property (ILVOILUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LUTDescriptorEntryBits
Overview | Refer to LUT Encoding.

Remarks

The LUTDescriptorEntryBits property specifies the number of bits for each entry in the LUT Data. This is the third value in the "LUT Descriptor" (0028,3002) element under the "VOI LUT Sequence" (0028,3010).

See Also

Elements: | VOILUTAttributes property, GetVOILUTAttributes method, SetVOILUT method
Topics: | Lookup Tables


LUTDescriptorFirstMapped property (ILVOILUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LUTDescriptorFirstMapped
Overview | Refer to LUT Encoding.

Remarks

The LUTDescriptorFirstMapped property specifies the first stored pixel value mapped. This is the second value in the "LUT Descriptor" (0028,3002) element under the "VOI LUT Sequence" (0028,3010).

See Also

Elements: | VOILUTAttributes property, GetVOILUTAttributes method, SetVOILUT method
Topics: | Lookup Tables


LUTDescriptorNumberOfEntries property (ILVOILUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | long LUTDescriptorNumberOfEntries
Overview | Refer to LUT Encoding.

Remarks

The LUTDescriptorNumberOfEntries property specifies the number of entries in the lookup table. This is the first value in the "LUT Descriptor" (0028,3002) element under the "VOI LUT Sequence" (0028,3010).

See Also

Elements: | VOILUTAttributes property, GetVOILUTAttributes method, SetVOILUT method
Topics: | Lookup Tables


LUTExplanation property (ILVOILUTAttributes Interface)

VB.NET example | C# example
Visual Basic example | Visual C++ 6.0 example

Syntax | BSTR LUTExplanation
Overview | Refer to LUT Encoding.

Remarks

The LUTExplanation property specifies the value of the "LUT Explanation" (0028,3003) element under the "VOI LUT Sequence" (0028,3010).

The maximum length of the string specified by this property is 64.

See Also

Elements: | VOILUTAttributes property, GetVOILUTAttributes method, SetVOILUT method
Topics: | Lookup Tables


DICOM Standard

The DICOM Standard is published by the

National Electrical Manufacturers Association

1300 N. 17th Street

Rosslyn, Virginia 22209 USA


Raster Pro/Document/Medical Features

Raster Pro:

LEADTOOLS Raster Imaging Pro provides some imaging capabilities that are not available in the LEADTOOLS Raster Imaging product. In order to access these features, you must unlock them by calling UnlockSupport (L_SUPPORT_LTPRO, L_KEY_LTPRO). L_KEY_LTPRO can be found in ltkey.h.

If you are a licensed user of LEADTOOLS Raster Imaging, and would like to access Raster Imaging Pro features, you must contact Tech Support for information on obtaining a license and the unlock key for calling LSettings::UnlockSupport.

Document/Medical:

LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite are the most comprehensive imaging toolkits on the market. No other toolkit provides as many imaging features for color, gray-scale and black & white images in one development package, and for one price. These toolkits comprise LEAD's best code and are designed for the programmer who is looking for the fastest performance, and/or the most extensive color, document, and medical imaging capabilities available.

These toolkits contain powerful annotation capabilities and optimized document image processing filters, and high performance compression, decompression and viewing of JPEG, LEAD CMP, MRC and CCITT G3/G4. The annotation capabilities enable the programmer to add text, highlights, sticky notes, audio, ellipses, buttons, lines, arrows, rectangles, polygons, redaction (blackout), hotspots, freehand scribble, pointers, bitmap and text stamps, to black & white and color images. Programmers working with document imaging will also find special processing filters such as despeckle, deskew, favor black, and scale to gray to enhance their black and white 1 bit images. Additionally, you can achieve faster rotation in 90-degree increments by applying a rotated view perspective to the bitmap. These LEADTOOLS toolkits offer the fastest software-only JPEG decoder available.

LEADTOOLS Document Imaging

The LEADTOOLS Document Imaging toolkit contains all the features available in the LEADTOOLS Raster Imaging Pro. In addition, it contains the following capabilities:

Special functions for Document (bitonal) images. The LEADTOOLS functions for bitonal images are especially useful for working with images from black-and-white scanners or FAX machines. These functions let you do things such as automatically straighten (deskew) an image, remove spots (despeckle), or clarify a scaled display (using scale-to-gray and favor-black features).

Annotation. LEADTOOLS supports annotation of images by letting you overlay images with text, lines, shapes, arrows, buttons, highlights, hot spots, sticky notes, stamps, buttons, and sounds.

Fast rotation. LEADTOOLS achieves fast rotation in 90-degree increments by applying a rotated view perspective to the bitmap.

ISIS support. LEADTOOLS supports ISIS interfaces for driving scanning devices.

Faster compression and decompression. The Document/Medical editions work faster when loading and saving LEAD CMP, JPEG, and CCITT Group 3 and Group 4 images. The LEADTOOLS functions for loading and saving are the same in all products. The only difference is in performance.

1-bit Image Clean-up. The Document toolkits include support for removing dots, blobs, holes, inverted text, lines, borders, bumps and nicks from 1-bit images.

Region Clean-up. [Document/Medical] Remove all the holes from a region.

Embedded Messages. The Document toolkits include support for embedding messages in lossless image formats like bmp, tiff, lossless jpeg, etc. The message is embedded without any visible changes to the image, and does not appreciably increase the size of the image. The message is password-protected.

Image Conversion. The Document toolkits include support for transforming a bitmap into a binary image using specified thresholds or a threshold calculated automatically based on statistical features of the bitmap.

12 and 16 bit grayscale images. [Document/Medical] Load, process, display, window level and save 12 and 16 bit grayscale images (including support for 16-bit grayscale TIFF).

48 and 64 bit color images. [Document/Medical] Load, process, display, and save 48 and 64 bit color images.

MRC Support. [Document/Medical] LEADTOOLS supports the Mixed Raster Content format for color documents containing mixed image and text components. For more information, refer to the .

Halftoning. [Document/Medical] Convert 1-, 4-, 8-, 16-, 24-, or 32-bit bitmaps to a halftoned bitmap, with a specified pattern rotation. A halftoned bitmap is a 1-bit bitmap that has been dithered for black and white printing or display.

LEADTOOLS Document Imaging Suite

The LEADTOOLS Document Imaging Suite toolkit contains all the capabilities of LEADTOOLS Document Imaging, and includes the features listed below. Please note that the OCR features are included in this toolkit, however they can also be purchased as a plug-in for the LEADTOOLS Document Imaging toolkit. Also, JBIG support is provided in this toolkit, however a JBIG Module may be added on to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite.

OCR features. [Document/Medical] LEAD offers OCR features that use Scansoft Textbridge technology. Support for these features is included in the LEADTOOLS Document Imaging Suite, and can be added, via plug-in to the LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite toolkits. The OCR features allow you to perform optical character recognition and turn images into documents. Features include preset confidence and accuracy levels for controlling how sensitive the engine is to unrecognized text, artificial intelligence for improving recognition on documents of the same type, and built-in and user-defined lexicons for limiting the type of text to recognize within a particular zone. LEADTOOLS provides the ability to verify or correct text during, and (using LEAD's unique OCR editor) after recognition. LEAD's OCR editor ties the text being edited directly to the image, providing a visual reference to the original bitmap data. The OCR engine can perform Automatic area segmentation creating multi-layered zones, recognizing areas such as tables, rules, images and text. Or, you can manually designate up to 250 such zones. The OCR features support different fonts, sizes (5 to 72 point) and styles. Fax, dot matrix and halftones can be preprocessed to improve recognition results. The OCR Engine supports major European and Scandinavian languages (Danish, Dutch, Finnish, French, German, Italian, Norwegian, Portuguese, Russian, Spanish, and Swedish) as well as English. Support for dialects such as US. English, French Canadian, Latin American Spanish, Swiss German, and Brazilian Portuguese is also provided.

Recognized text can be exported to more than 40 different formats, including MS Word, MS Excel, Dbase andWordPerfect. The LEADTOOLS OCR features contain superior OCR processing speeds, for use in form recognition and processing applications.

LEAD's JBIG filter. [Document/Medical] LEAD includes support for this filter in the LEADTOOLS Document Imaging Suite toolkit. Support for this filter can be added to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite by purchasing the JBIG Module. JBIG defines a method for lossless compression encoding of a bi-level image (two-color image). This method can also be used for coding grayscale and color images. LEADTOOLS completely supports all three types of images, giving you the ability to make full use of this powerful compression technology. LEADTOOLS also supports the progressive capability of JBIG, allowing you to store and send multiple representations of images at different resolutions without any extra storage overhead.

LEADTOOLS Medical Imaging

LEADTOOLS Medical Imaging contains all the capabilities of LEADTOOLS Document Imaging. It also includes general medical imaging technologies (1-16,24,32 bit color, 1-16 bit grayscale and window leveling of 12 and 16-bit grayscale images) and support for the DICOM file format.

DICOM file support. [Medical] LEADTOOLS Medical Imaging provides COMPLETE support for the DICOM 3.0 specification, including all standard IOD classes and modalities (CR, CT, MR, NM, US, RF, SC, VL, etc.) and complete DICOM Basic Directory support.

Window leveling. [Document/Medical] Detect and set LowBit and HighBit for image data, display images with automatic LUT intensity expansion, or set LUT entries and ranges with specific values and gradients. Display images through the LUT without changing the data, or process the image data using the LUT. Linearize the number of pixels locally in a bitmap, based on the specified color space in order to bring out the detail in dark areas of an image, and smooth the edges between blocks.

Medical Imaging Processing. [Medical] LEADTOOLS Medical Imaging provides image processing functionality designed specifically to allow you to examine and improve the quality of medical images.

LEADTOOLS Medical Imaging Suite

LEADTOOLS Medical Imaging Suite contains all the capabilities of LEADTOOLS Medical Imaging. In addition, it supports the following:

DICOM Communication support. [Medical Suite] LEADTOOLS provides COMPLETE support for DICOM Communications, including all Service Classes (Verification, Storage, Query/Retrieve, Patient Management, etc), and contains high-level communications functions simplifying the creation of DICOM client/server applications.

(Document/Medical) is used in the documentation to designate the features that are available in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. Those features that are available only in the Medical toolkits are indicated in the documentation by (Medical). Features available only in the LEADTOOLS Medical Imaging Suite toolkit are indicated in the documentation by (Medical Suite).

(Internet only) is used in the documentation to designate the features that are available only in the LEADTOOLS Internet toolkit.

For more information, refer to Document/Medical Edition Support and Licensing Requirements.


Document/Medical Support and Licensing Requirements

Document/Medical Licensing and Royalty Agreements:

Congratulations! You have licensed one of the LEADTOOLS Document/Medical software products, the most comprehensive imaging toolkits on the market, enabling you to create powerful imaging applications. The license terms for LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite require runtime licensing based on the number of copies of your application that you deploy (i.e., distribute or install and use internally).

By paying the initial box price for the applicable LEADTOOLS product, you have obtained a development license, which entitles you to develop your application and test it. Once completed, if you wish to distribute the application or deploy it internally on multiple machines, you are required to enter into a duplication and distribution agreement with LEAD. You have the ability to choose from several licensing options depending on your volume needs.

The product you are installing is a fully functional working version and includes support for all features in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. (Depending on which product you have licensed, some of the features may ultimately not be available to you. See the on-line help file for a product feature comparison.) Until you sign and return the correct licensing agreement, your application will display a "nag" message. Once LEAD receives the executed contract, we will provide you a password that will permit you to terminate the "nag" message for the product that you have licensed. In addition to providing the password, you must also use the no nag version of the LTKRN14N.DLL, found in the REDIST\NONAGLTKRN directory. This is also the version you must redistribute.

Duplication and Distribution Agreements

Click this button to start the Licensing help file to review the License Agreements governing your use of the software.


Abstract Syntax Values

Value | Meaning
UID_VERIFICATION_CLASS | "1.2.840.10008.1.1"
UID_MEDIA_STORAGE_DIRECTORY | "1.2.840.10008.1.3.10"
UID_BASIC_STUDY_NOTIFICATION_CLASS | "1.2.840.10008.1.9"
UID_STORAGE_COMMITMENT_PUSH_MODEL_CLASS | "1.2.840.10008.1.20.1"
UID_STORAGE_COMMITMENT_PUSH_MODEL_INSTANCE | "1.2.840.10008.1.20.1.1"
UID_STORAGE_COMMITMENT_PULL_MODEL_CLASS | "1.2.840.10008.1.20.2"
UID_STORAGE_COMMITMENT_PULL_MODEL_INSTANCE | "1.2.840.10008.1.20.2.1"
UID_APPLICATION_CONTEXT_NAME | "1.2.840.10008.3.1.1.1"
UID_DETACHED_PATIENT_CLASS | "1.2.840.10008.3.1.2.1.1"
UID_DETACHED_PATIENT_META_CLASS | "1.2.840.10008.3.1.2.1.4"
UID_DETACHED_VISIT_CLASS | "1.2.840.10008.3.1.2.2.1"
UID_DETACHED_STUDY_CLASS | "1.2.840.10008.3.1.2.3.1"
UID_STUDY_COMPONENT_CLASS | "1.2.840.10008.3.1.2.3.2"
UID_MODALITY_PERFORMED_CLASS | "1.2.840.10008.3.1.2.3.3"
UID_MODALITY_PERFORMED_RETRIEVE_CLASS | "1.2.840.10008.3.1.2.3.4"
UID_MODALITY_PERFORMED_NOTIFICATION_CLASS | "1.2.840.10008.3.1.2.3.5"
UID_DETACHED_RESULTS_CLASS | "1.2.840.10008.3.1.2.5.1"
UID_DETACHED_RESULTS_META_CLASS | "1.2.840.10008.3.1.2.5.4"
UID_DETACHED_STUDY_META_CLASS | "1.2.840.10008.3.1.2.5.5"
UID_DETACHED_INTERPRETATION_CLASS | "1.2.840.10008.3.1.2.6.1"
UID_BASIC_FILM_SESSION_CLASS | "1.2.840.10008.5.1.1.1"
UID_BASIC_FILM_BOX_CLASS | "1.2.840.10008.5.1.1.2"
UID_BASIC_GRAYSCALE_IMAGE_BOX_CLASS | "1.2.840.10008.5.1.1.4"
UID_BASIC_COLOR_IMAGE_BOX_CLASS | "1.2.840.10008.5.1.1.4.1"
UID_REFERENCED_IMAGE_BOX_CLASS | "1.2.840.10008.5.1.1.4.2"
UID_REFERENCED_IMAGE_BOX_CLASS_RETIRED | "1.2.840.10008.5.1.1.4.2"
UID_BASIC_GRAYSCALE_PRINT_META_CLASS | "1.2.840.10008.5.1.1.9"
UID_REFERENCED_GRAYSCALE_PRINT_META_CLASS_RETIRED | "1.2.840.10008.5.1.1.9.1"
UID_PRINT_JOB_CLASS | "1.2.840.10008.5.1.1.14"
UID_BASIC_ANNOTATION_BOX_CLASS | "1.2.840.10008.5.1.1.15"
UID_PRINTER_CLASS | "1.2.840.10008.5.1.1.16"
UID_PRINTER_CONFIGURATION_RETRIEVAL_CLASS | "1.2.840.10008.5.1.1.16.376"
UID_PRINTER_INSTANCE | "1.2.840.10008.5.1.1.17"
UID_PRINTER_CONFIGURATION_RETRIEVAL_INSTANCE | "1.2.840.10008.5.1.1.17.376"
UID_BASIC_COLOR_PRINT_META_CLASS | "1.2.840.10008.5.1.1.18"
UID_REFERENCED_COLOR_PRINT_META_CLASS_RETIRED | "1.2.840.10008.5.1.1.18.1"
UID_VOI_LUT_BOX_CLASS_RETIRED | "1.2.840.10008.5.1.1.22"
UID_PRESENTATION_LUT_CLASS | "1.2.840.10008.5.1.1.23"
UID_IMAGE_OVERLAY_BOX_CLASS_RETIRED | "1.2.840.10008.5.1.1.24"
UID_BASIC_PRINT_IMAGE_OVERLAY_BOX_CLASS | "1.2.840.10008.5.1.1.24.1"
UID_PRINT_QUEUE_INSTANCE | "1.2.840.10008.5.1.1.25"
UID_PRINT_QUEUE_CLASS | "1.2.840.10008.5.1.1.26"
UID_STORED_PRINT_STORAGE_CLASS | "1.2.840.10008.5.1.1.27"
UID_HARDCOPY_GRAYSCALE_IMAGE_STORAGE_CLASS | "1.2.840.10008.5.1.1.29"
UID_HARDCOPY_COLOR_IMAGE_STORAGE_CLASS | "1.2.840.10008.5.1.1.30"
UID_PULL_PRINT_REQUEST_CLASS | "1.2.840.10008.5.1.1.31"
UID_PULL_STORED_PRINT_META_CLASS | "1.2.840.10008.5.1.1.32"
UID_CR_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.1"
UID_CT_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.2"
UID_US_MULTIFRAME_IMAGE_STORAGE_RETIRED | "1.2.840.10008.5.1.4.1.1.3"
UID_US_MULTIFRAME_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.3.1"
UID_MR_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.4"
UID_NM_IMAGE_STORAGE_RETIRED | "1.2.840.10008.5.1.4.1.1.5"
UID_US_IMAGE_STORAGE_RETIRED | "1.2.840.10008.5.1.4.1.1.6"
UID_US_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.6.1"
UID_SC_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.7"
UID_STANDALONE_OVERLAY_STORAGE | "1.2.840.10008.5.1.4.1.1.8"
UID_STANDALONE_CURVE_STORAGE | "1.2.840.10008.5.1.4.1.1.9"
UID_STANDALONE_MODALITY_LUT_STORAGE | "1.2.840.10008.5.1.4.1.1.10"
UID_STANDALONE_VOI_LUT_STORAGE | "1.2.840.10008.5.1.4.1.1.11"
UID_XA_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.12.1"
UID_XRF_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.12.2"
UID_XA_BIPLANE_IMAGE_STORAGE_RETIRED | "1.2.840.10008.5.1.4.1.1.12.3"
UID_NM_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.20"
UID_PET_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.128"
UID_STANDALONE_PET_CURVE_STORAGE | "1.2.840.10008.5.1.4.1.1.129"
UID_RT_IMAGE_STORAGE | "1.2.840.10008.5.1.4.1.1.481.1"
UID_RT_DOSE_STORAGE | "1.2.840.10008.5.1.4.1.1.481.2"
UID_RT_STRUCTURE_STORAGE | "1.2.840.10008.5.1.4.1.1.481.3"
UID_RT_BEAMS_TREATMENT_RECORD_STORAGE_CLASS | "1.2.840.10008.5.1.4.1.1.481.4"
UID_RT_PLAN_STORAGE | "1.2.840.10008.5.1.4.1.1.481.5"
UID_RT_BRACHY_TREATMENT_RECORD_STORAGE_CLASS | "1.2.840.10008.5.1.4.1.1.481.6"
UID_RT_TREATMENT_SUMMARY_RECORD_STORAGE_CLASS | "1.2.840.10008.5.1.4.1.1.481.7"
UID_VL_IMAGE_STORAGE_RETIRED | "1.2.840.10008.5.1.4.1.1.77.1"
UID_VL_MULTIFRAME_IMAGE_STORAGE_RETIRED | "1.2.840.10008.5.1.4.1.1.77.2"
UID_VL_ENDOSCOPIC_IMAGE_STORAGE_CLASS | "1.2.840.10008.5.1.4.1.1.77.1.1"
UID_VL_MICROSCOPIC_IMAGE_STORAGE_CLASS | "1.2.840.10008.5.1.4.1.1.77.1.2"
UID_VL_SLIDE_COORDINATES_MICROSCOPIC_IMAGE_STORAGE_CLASS | "1.2.840.10008.5.1.4.1.1.77.1.3"
UID_VL_PHOTOGRAPHIC_IMAGE_STORAGE_CLASS | "1.2.840.10008.5.1.4.1.1.77.1.4"
UID_BASIC_TEXT_SR | "1.2.840.10008.5.1.4.1.1.88.11"
UID_ENHANCED_SR | "1.2.840.10008.5.1.4.1.1.88.22"
UID_COMPREHENSIVE_SR | "1.2.840.10008.5.1.4.1.1.88.33"
UID_PAPYRUS_3_IMPLICIT_VR_LITTLE_ENDIAN | "1.2.840.10008.1.20"
UID_WAVEFORM_STORAGE | "1.2.840.10008.5.1.4.1.1.9.1"
UID_ECG_WAVEFORM_STORAGE | "1.2.840.10008.5.1.4.1.1.9.1.1"
UID_AUDIO_WAVEFORM_STORAGE | "1.2.840.10008.5.1.4.1.1.9.1.2"
UID_GE_MR_IMAGE | "1.2.840.113619.4.2"
UID_GE_CT_IMAGE | "1.2.840.113619.4.3"
UID_GE_DISPLAY_IMAGERMATION | "1.2.840.113619.4.4"
UID_GE_ARM_MIGRATION | "1.2.840.113619.4.10"
UID_GE_ARM_MIGRATION_INSTANCE | "1.2.840.113619.7.2"
UID_DX_IMAGE_STORAGE_PRESENTATION | "1.2.840.10008.5.1.4.1.1.1.1"
UID_DX_IMAGE_STORAGE_PROCESSING | "1.2.840.10008.5.1.4.1.1.1.1.1"
UID_DX_MAMMOGRAPHY_IMAGE_STORAGE_PRESENTATION | "1.2.840.10008.5.1.4.1.1.1.2"
UID_DX_MAMMOGRAPHY_IMAGE_STORAGE_PROCESSING | "1.2.840.10008.5.1.4.1.1.1.2.1"
UID_DX_INTRAORAL_IMAGE_STORAGE_PRESENTATION | "1.2.840.10008.5.1.4.1.1.1.3"
UID_DX_INTRAORAL_IMAGE_STORAGE_PROCESSING | "1.2.840.10008.5.1.4.1.1.1.3.1"
UID_PATIENT_ROOT_QUERY_FIND | "1.2.840.10008.5.1.4.1.2.1.1"
UID_PATIENT_ROOT_QUERY_MOVE | "1.2.840.10008.5.1.4.1.2.1.2"
UID_PATIENT_ROOT_QUERY_GET | "1.2.840.10008.5.1.4.1.2.1.3"
UID_STUDY_ROOT_QUERY_FIND | "1.2.840.10008.5.1.4.1.2.2.1"
UID_STUDY_ROOT_QUERY_MOVE | "1.2.840.10008.5.1.4.1.2.2.2"
UID_STUDY_ROOT_QUERY_GET | "1.2.840.10008.5.1.4.1.2.2.3"
UID_PATIENT_STUDY_QUERY_FIND | "1.2.840.10008.5.1.4.1.2.3.1"
UID_PATIENT_STUDY_QUERY_MOVE | "1.2.840.10008.5.1.4.1.2.3.2"
UID_PATIENT_STUDY_QUERY_GET | "1.2.840.10008.5.1.4.1.2.3.3"
UID_MODALITY_WORKLIST_FIND | "1.2.840.10008.5.1.4.31"


DICOM Definitions

C-STORE | This service allows an invoking service-user to request the storage of Composite SOP Instance information by a peer service-user.
C-FIND | This service allows an invoking service-user to match a series of Attribute strings against the Attributes of the set of SOP Instances being handled by a peer service-user. This service will return a list of requested Attributes and their values for each match.
C-GET | This service allows an invoking service-user to fetch information for one or more Composite SOP Instances from a peer service-user. The information returned by the performing service-user is based on the Attributes supplied by the invoking DIMSE-service-user.
C-MOVE | This service allows an invoking service-user to move information for one or more Composite SOP Instances from a peer service-user, to a third party service-user. The information moved is based on the Attributes supplied by the invoking service-user
C-ECHO | This service allows an invoking service-user to verify end-to-end communications with a peer service-user.
N-GET | This service allows an invoking service-user to retrieve information from a peer service-user.
N-SET | This service allows an invoking service-user to modify information being handled by a peer service-user.
N-ACTION | This service allows an invoking service-user to request that a peer service-user perform a specified action.
N-CREATE | This service allows an invoking service-user to request that a peer service-user create an instance of a SOP Class.
N-DELETE | This service allows an invoking service-user to delete an instance of a SOP Class that is being handled by a peer service-user.
SCP | Service Class Provider.
SCU | Service Class User.


Data Element Tag Constants for the Command Sets

The following is a list of the default Data Element Tags for the Command Sets that are supported by LEADTOOLS. For more information on the data elements that make up the command sets supported by LEADTOOLS, refer to Command Set Default Tables.

Code constant | Code value
TAG_COMMAND_LENGTH_TO_END | 0x00000001UL
TAG_AFFECTED_SOP_CLASS_UID | 0x00000002UL
TAG_REQUESTED_SOP_CLASS_UID | 0x00000003UL
TAG_COMMAND_RECOGNITION_CODE | 0x00000010UL
TAG_COMMAND_FIELD | 0x00000100UL
TAG_MESSAGE_ID | 0x00000110UL
TAG_MESSAGE_ID_BEING_RESPONDED_TO | 0x00000120UL
TAG_INITIATOR | 0x00000200UL
TAG_RECEIVER | 0x00000300UL
TAG_FIND_LOCATION | 0x00000400UL
TAG_MOVE_DESTINATION | 0x00000600UL
TAG_PRIORITY | 0x00000700UL
TAG_DATA_SET_TYPE | 0x00000800UL
TAG_NUMBER_OF_MATCHES | 0x00000850UL
TAG_RESPONSE_SEQUENCE_NUMBER | 0x00000860UL
TAG_STATUS | 0x00000900UL
TAG_OFFENDING_ELEMENT | 0x00000901UL
TAG_ERROR_COMMENT | 0x00000902UL
TAG_ERROR_ID | 0x00000903UL
TAG_AFFECTED_SOP_INSTANCE_UID | 0x00001000UL
TAG_REQUESTED_SOP_INSTANCE_UID | 0x00001001UL
TAG_EVENT_TYPE_ID | 0x00001002UL
TAG_ATTRIBUTE_IDENTIFIER_LIST | 0x00001005UL
TAG_ACTION_TYPE_ID | 0x00001008UL
TAG_NUMBER_OF_REMAINING_SUBOPERATIONS | 0x00001020UL
TAG_NUMBER_OF_COMPLETED_SUBOPERATIONS | 0x00001021UL
TAG_NUMBER_OF_FAILED_SUBOPERATIONS | 0x00001022UL
TAG_NUMBER_OF_WARNING_SUBOPERATIONS | 0x00001023UL
TAG_MOVE_ORIGINATOR_APPLICATION_ENTITY_TITLE | 0x00001030UL
TAG_MOVE_ORIGINATOR_MESSAGE_ID | 0x00001031UL
TAG_DIALOG_RECEIVER | 0x00004000UL
TAG_TERMINAL_TYPE | 0x00004010UL
TAG_MESSAGE_SET_ID | 0x00005010UL
TAG_END_MESSAGE_SET | 0x00005020UL
TAG_DISPLAY_FORMAT | 0x00005110UL
TAG_PAGE_POSITION_ID | 0x00005120UL
TAG_TEXT_FORMAT_ID | 0x00005130UL
TAG_NORMAL_REVERSE | 0x00005140UL
TAG_ADD_GRAY_SCALE | 0x00005150UL
TAG_BORDERS | 0x00005160UL
TAG_COPIES | 0x00005170UL
TAG_OLD_MAGNIFICATION_TYPE | 0x00005180UL
TAG_ERASE | 0x00005190UL
TAG_PRINT | 0x000051A0UL
TAG_OVERLAYS | 0x000051B0UL


LEADTOOLS Documentation

LEADTOOLS Reference Manuals

LEADTOOLS provides reference manuals that contain the same information as the online help. You can print them from PDF files. Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

To print the PDF files, you must use the Adobe Acrobat Reader 3.0 or higher. You can download a copy of the Acrobat Reader from the Adobe web site (http://www.adobe.com). Note that different versions of the Acrobat Reader are available for different operating systems, but they all can read the same PDF files.


Status Values

Value | Meaning
COMMAND_STATUS_SUCCESS | [0x0000] Success
COMMAND_STATUS_CANCEL | [0xFE00] Cancel
COMMAND_STATUS_ATTRIBUTE_LIST_ERROR | [0x0107] Attribute list error
COMMAND_STATUS_ATTRIBUTE_OUT_OF_RANGE | [0x0116] Attribute Value Out of Range
COMMAND_STATUS_CLASS_NOT_SUPPORTED | [0x0122] Class not supported
COMMAND_STATUS_CLASE_INSTANCE_CONFLICT | [0x0119] Class-instance conflict
COMMAND_STATUS_DUPLICATE_INSTANCE | [0x0111] Duplicate instance
COMMAND_STATUS_DUPLICATE_INVOCATION | [0x0210] Duplicate invocation
COMMAND_STATUS_INVALID_ARGUMENT_VALUE | [0x0115] Invalid argument value
COMMAND_STATUS_INVALID_ATTRIBUTE_VALUE | [0x0106] Invalid attribute value
COMMAND_STATUS_INVALID_OBJECT_INSTANCE | [0x0117] Invalid object instance
COMMAND_STATUS_MISSING_ATTRIBUTE | [0x0120] Missing attribute
COMMAND_STATUS_MISSING_ATTRIBUTE_VALUE | [0x0121] Missing attribute value
COMMAND_STATUS_MISTYPED_ARGUMENT | [0x0212] Mistyped argument
COMMAND_STATUS_NO_SUCH_ARGUMENT | [0x0114] No such argument
COMMAND_STATUS_NO_SUCH_ATTRIBUTE | [0x0105] No such attribute
COMMAND_STATUS_NO_SUCH_EVENT_TYPE | [0x0113] No such event type
COMMAND_STATUS_NO_SUCH_OBJECT_INSTANCE | [0x0112] No such object instance
COMMAND_STATUS_NO_SUCH_CLASS | [0x0118] No such class
COMMAND_STATUS_NO_SUCH_ACTION_TYPE | [0x0123] No such action type
COMMAND_STATUS_PROCESSING_FAILURE | [0x0110] Processing failure
COMMAND_STATUS_RESOURCE_LIMITATION | [0x0213] Resource limitation
COMMAND_STATUS_UNRECOGNIZED_OPERATION | [0x0211] Unrecognized operation
COMMAND_STATUS_PENDING | [0xFF00] Matches are continuing - Current Match is supplied and any Optional Keys were supported in the same manner as Required Keys.
COMMAND_STATUS_PENDING_WARNING | [0xFF01] Matches are continuing - Warning that one or more Optional Keys were not supported for existence and/or matching for this Identifier.


Transfer Syntax Values

Value | Meaning
UID_IMPLICIT_VR_LITTLE_ENDIAN | "1.2.840.10008.1.2"
UID_EXPLICIT_VR_LITTLE_ENDIAN | "1.2.840.10008.1.2.1"
UID_EXPLICIT_VR_BIG_ENDIAN | "1.2.840.10008.1.2.2"
UID_JPEG_BASELINE_1 | "1.2.840.10008.1.2.4.50"
UID_JPEG_EXTENDED_2_4 | "1.2.840.10008.1.2.4.51"
UID_JPEG_EXTENDED_3_5 | "1.2.840.10008.1.2.4.52"
UID_JPEG_SPECTRAL_NONHIER_6_8 | "1.2.840.10008.1.2.4.53"
UID_JPEG_SPECTRAL_NONHIER_7_9 | "1.2.840.10008.1.2.4.54"
UID_JPEG_FULL_NONHIER_10_12 | "1.2.840.10008.1.2.4.55"
UID_JPEG_FULL_NONHIER_11_13 | "1.2.840.10008.1.2.4.56"
UID_JPEG_LOSSLESS_NONHIER_14 | "1.2.840.10008.1.2.4.57"
UID_JPEG_LOSSLESS_NONHIER_15 | "1.2.840.10008.1.2.4.58"
UID_JPEG_EXTENDED_HIER_16_18 | "1.2.840.10008.1.2.4.59"
UID_JPEG_EXTENDED_HIER_17_19 | "1.2.840.10008.1.2.4.60"
UID_JPEG_SPECTRAL_HIER_20_22 | "1.2.840.10008.1.2.4.61"
UID_JPEG_SPECTRAL_HIER_21_23 | "1.2.840.10008.1.2.4.62"
UID_JPEG_FULL_HIER_24_26 | "1.2.840.10008.1.2.4.63"
UID_JPEG_FULL_HIER_25_27 | "1.2.840.10008.1.2.4.64"
UID_JPEG_LOSSLESS_HIER_PROCESS_28 | "1.2.840.10008.1.2.4.65"
UID_JPEG_LOSSLESS_HIER_PROCESS_29 | "1.2.840.10008.1.2.4.66"
UID_JPEG_LOSSLESS_NONHIER_14B | "1.2.840.10008.1.2.4.70"
UID_JPEG2000_LOSSLESS_ONLY | "1.2.840.10008.1.2.4.90"
UID_JPEG2000 | "1.2.840.10008.1.2.4.91"
UID_RLE_LOSSLESS | "1.2.840.10008.1.2.5"


Context Identifiers

LEADTOOLS maintains an internal table of the Context Groups defined by the DICOM Content Mapping Resource (DCMR). The following is a list of the Context Identifiers (CIDs) of these Context Groups, along with their names.

Context ID | Name
"CID 2" | "Anatomic Modifier"
"CID 4" | "Anatomic Region"
"CID 5" | "Transducer Approach"
"CID 6" | "Transducer Orientation"
"CID 7" | "Ultrasound Beam Path"
"CID 8" | "Angiographic Interventional Devices"
"CID 9" | "Image Guided Therapeutic Procedures"
"CID 10" | "Interventional Drug"
"CID 11" | "Route of Administration"
"CID 12" | "Radiographic Contrast Agent"
"CID 18" | "Isotopes in Radiopharmaceuticals"
"CID 19" | "Patient Orientation"
"CID 20" | "Patient Orientation Modifier"
"CID 21" | "Patient Gantry Relationship"
"CID 23" | "Cranio-caudad Angulation"
"CID 25" | "Radiopharmaceuticals"
"CID 26" | "Nuclear Medicine Projections"
"CID 29" | "Acquisition Modality"
"CID 30" | "DICOM Devices"
"CID 42" | "Numeric Value Qualifier"
"CID 82" | "Units of Measurement"
"CID 244" | "Laterality"
"CID 3001" | "ECG Leads"
"CID 3003" | "Hemodynamic Waveform Sources"
"CID 3010" | "Cardiovascular Anatomic Locations"
"CID 3011" | "Electrophysiology Anatomic Locations"
"CID 3014" | "Coronary Artery Segments"
"CID 3015" | "Coronary Arteries"
"CID 3019" | "Cardiovascular Anatomic Location Modifiers"
"CID 3082" | "Cardiology Units of Measurement"
"CID 3090" | "Time Synchronization Channel Types"
"CID 3101" | "NM Procedural State Values"
"CID 3240" | "Electrophysiology Measurement Functions and Techniques"
"CID 3241" | "Hemodynamic Measurement Techniques"
"CID 3250" | "Catheterization Procedure Phase"
"CID 3254" | "Electrophysiology Procedure Phase"
"CID 3261" | "Stress Protocols"
"CID 3262" | "ECG Patient State Values"
"CID 3263" | "Electrode Placement Values"
"CID 3264" | "XYZ Electrode Placement Values"
"CID 3271" | "Hemodynamic Physiological Challenges"
"CID 3335" | "ECG Annotations"
"CID 3337" | "Hemodynamic Annotations"
"CID 3339" | "Electrophysiology Annotations"
"CID 4009" | "DX Anatomy Images"
"CID 4010" | "DX View"
"CID 4011" | "DX View Modifier"
"CID 4012" | "Projection Eponymous Name"
"CID 4013" | "Anatomic Region for Mammography"
"CID 4014" | "View for Mammography"
"CID 4015" | "View Modifier for Mammography"
"CID 4016" | "Anatomic Region for Intra-oral Radiography"
"CID 4017" | "Anatomic Region Modifier for Intra-oral Radiography"
"CID 4018" | "Primary Anatomic Structure for Intra-oral Radiography (Permanent Dentition - Designation of Teeth)"
"CID 4019" | "Primary Anatomic Structure for Intra-oral Radiography (Deciduous Dentition - Designation of Teeth)"
"CID 4020" | "PET Radionuclide"
"CID 4021" | "PET Radiopharmaceutical"
"CID 4030" | "MR Spectroscopy Metabolites"
"CID 4031" | "MR Proton Spectroscopy Metabolites"
"CID 4200" | Ophthalmic Imaging Agent
"CID 4201" | Patient Eye Movement Command
"CID 4202" | Ophthalmic Photography Acquisition Device
"CID 4203" | Ophthalmic Photography Illumination
"CID 4204" | Ophthalmic Filter
"CID 4205" | Ophthalmic Lens
"CID 4206" | Ophthalmic Channel Description
"CID 4207" | Ophthalmic Image Position
"CID 4208" | Mydriatic Agent
"CID 4209" | Ophthalmic Anatomic Structure Imaged
"CID 5000" | "Languages"
"CID 5001" | "Countries"
"CID 6000" | "Overall Breast Composition"
"CID 6001" | "Overall Breast Composition from BI-RADS®"
"CID 6002" | "Change Since Last Mammogram or Prior Surgery"
"CID 6003" | "Change Since Last Mammogram or Prior Surgery from BI-RADS®"
"CID 6004" | "Mammography Characteristics of Shape"
"CID 6005" | "Characteristics of Shape from BI-RADS®"
"CID 6006" | "Mammography Characteristics of Margin"
"CID 6007" | "Characteristics of Margin from BI-RADS®"
"CID 6008" | "Density Modifier"
"CID 6009" | "Density Modifier from BI-RADS®"
"CID 6010" | "Mammography Calcification Types"
"CID 6011" | "Calcification Types from BI-RADS®"
"CID 6012" | "Calcification Distribution Modifier"
"CID 6013" | "Calcification Distribution Modifier from BI-RADS®"
"CID 6014" | "Mammography Single Image Finding"
"CID 6015" | "Single Image Finding from BI-RADS®"
"CID 6016" | "Mammography Composite Feature"
"CID 6017" | "Composite Feature from BI-RADS®"
"CID 6018" | "Clockface Location or Region"
"CID 6019" | "Clockface Location or Region from BI-RADS®"
"CID 6020" | "Quadrant Location"
"CID 6021" | "Quadrant Location from BI-RADS®"
"CID 6022" | "Side"
"CID 6023" | "Side from BI-RADS®"
"CID 6024" | "Depth"
"CID 6025" | "Depth from BI-RADS®"
"CID 6026" | "Mammography Assessment"
"CID 6027" | "Assessment from BI-RADS®"
"CID 6028" | "Mammography Recommended Follow-up"
"CID 6029" | "Recommended Follow-up from BI-RADS®"
"CID 6030" | "Mammography Pathology Codes"
"CID 6031" | "Benign Pathology Codes from BI-RADS®"
"CID 6032" | "High Risk Lesions Pathology Codes from BI-RADS®"
"CID 6033" | "Malignant Pathology Codes from BI-RADS®"
"CID 6034" | "Intended Use of CAD Output"
"CID 6035" | "Composite Feature Relations"
"CID 6036" | "Scope of Feature"
"CID 6037" | "Mammography Quantitative Temporal Difference Type"
"CID 6038" | "Mammography Qualitative Temporal Difference Type"
"CID 6039" | "Nipple Characteristic"
"CID 6040" | "Non-Lesion Object Type"
"CID 6041" | "Mammography Image Quality Finding"
"CID 6042" | "Status of Results"
"CID 6043" | "Types of Mammography CAD Analysis"
"CID 6044" | "Types of Image Quality Assessment"
"CID 6045" | "Mammography Types of Quality Control Standard"
"CID 6046" | "Units of Follow-up Interval"
"CID 6047" | "CAD Processing and Findings Summary"
"CID 6100" | "Chest Component Categories"
"CID 6101" | "Chest Finding or Feature"
"CID 6102" | "Chest Finding or Feature Modifier"
"CID 6103" | "Abnormal Lines Finding or Feature"
"CID 6104" | "Abnormal Opacity Finding or Feature"
"CID 6105" | "Abnormal Lucency Finding or Feature"
"CID 6106" | "Abnormal Texture Finding or Feature"
"CID 6107" | "Width Descriptor"
"CID 6108" | "Chest Anatomic Structure Abnormal Distribution"
"CID 6109" | "Radiographic Anatomy Finding or Feature"
"CID 6110" | "Lung Anatomy Finding or Feature"
"CID 6111" | "Bronchovascular Anatomy Finding or Feature"
"CID 6112" | "Pleura Anatomy Finding or Feature"
"CID 6113" | "Mediastinum Anatomy Finding or Feature"
"CID 6114" | "Osseous Anatomy Finding or Feature"
"CID 6115" | "Osseous Anatomy Modifiers"
"CID 6116" | "Muscular Anatomy"
"CID 6117" | "Vascular Anatomy"
"CID 6118" | "Size Descriptor"
"CID 6119" | "Chest Border Shape"
"CID 6120" | "Chest Border Definition"
"CID 6121" | "Chest Orientation Descriptor"
"CID 6122" | "Chest Content Descriptor"
"CID 6123" | "Chest Opacity Descriptor"
"CID 6124" | "Location in Chest"
"CID 6125" | "General Chest Location"
"CID 6126" | "Location in Lung"
"CID 6127" | "Segment Location in Lung"
"CID 6128" | "Chest Distribution Descriptor"
"CID 6129" | "Chest Site Involvement"
"CID 6130" | "Severity Descriptor"
"CID 6131" | "Chest Texture Descriptor"
"CID 6132" | "Chest Calcification Descriptor"
"CID 6133" | "Chest Quantitative Temporal Difference Type"
"CID 6134" | "Chest Qualitative Temporal Difference Type"
"CID 6135" | "Chest Image Quality Finding"
"CID 6136" | "Chest Types of Quality Control Standard"
"CID 6137" | "Types of Chest CAD Analysis"
"CID 6138" | "Chest Non-Lesion Object Type"
"CID 6139" | "Non-Lesion Modifiers"
"CID 6140" | "Calculation Methods"
"CID 6141" | "Attenuation Coefficient Measurements"
"CID 6142" | "Calculated Value"
"CID 6143" | "Response Criteria"
"CID 6144" | "RECIST Response Criteria"
"CID 6145" | "Baseline Category"
"CID 7000" | "Diagnostic Imaging Report Document Titles"
"CID 7001" | "Diagnostic Imaging Report Headings"
"CID 7002" | "Diagnostic Imaging Report Elements"
"CID 7003" | "Diagnostic Imaging Report Purposes of Reference"
"CID 7004" | "Waveform Purposes of Reference"
"CID 7005" | "Contributing Equipment Purposes of Reference"
"CID 7010" | "Key Object Selection Document Title"
"CID 7011" | "Rejected for Quality Reasons"
"CID 7012" | "Best In Set"
"CID 7201" | "Referenced Image Purposes of Reference"
"CID 7202" | "Source Image Purposes of Reference"
"CID 7203" | "Image Derivation"
"CID 7210" | "Related Series Purposes Of Reference"
"CID 7452" | "Organizational Roles"
"CID 7453" | "Performing Roles"
"CID 7454" | "Species"
"CID 7455" | "Sex"
"CID 7456" | "Units of Measure for Age"
"CID 7460" | "Units of Linear Measurement"
"CID 7461" | "Units of Area Measurement"
"CID 7462" | "Units of Volume Measurement"
"CID 7470" | "Linear Measurements"
"CID 7471" | "Area Measurements"
"CID 7472" | "Volume Measurements"
"CID 9231" | "General Purpose Workitem Definition"
"CID 9232" | "Non-DICOM Output Types"
"CID 9300" | "Procedure Discontinuation Reasons"
"CID 12001" | "Ultrasound Protocol Types"
"CID 12002" | "Ultrasound Protocol Stage Types"
"CID 12140" | "Pelvic Vasculature Anatomical Location"
"CID 12141" | "Fetal Vasculature Anatomical Location"


Syntax

This is the internal syntax of the property, method, or event. The external syntax depends on the development system you are using. Refer to the code example for your system, or for general information, refer to the following:

Visual Basic Syntax

Visual C++ 6.0 Syntax


Visual Basic Constants for Key Codes

Do the following to find the Visual Basic key codes:

1. | On the View pull-down menu, select Object Browser....
2. | Select VB - Visual Basic objects and procedures.
3. | Select VBKeyCodeConstants.
4. | Select one of the listed constants.

A description of the constant appears at the bottom of the form.


Visual Basic Syntax

The syntax for the LEAD control's properties, methods, and events is the same as for other controls in Visual Basic.

Whenever you declare a variable as a data type, you need to know how the ActiveX data type is expressed in Visual Basic. Refer to the following table for the appropriate data type:

ActiveX Data Type | Visual Basic Data Type
boolean | Integer
BSTR | String
IPictureDisp | Picture
long | Long
OLE_COLOR | Long color value (such as the RGB return value)
short | Integer
float | Single
VARIANT_BOOL | Boolean


Visual C++ 6.0 Syntax

In Version 6.0 of Visual C++, the MicroSoft Foundation Class (MFC) library provides an ActiveX interface. This topic describes how to use the interface with the LEADTOOLS ActiveX.

To add a LEAD RasterView control to your application, refer to the example in Loading and Displaying an Image .

Alternatively, to create an instance of the LEAD control at run time, use the Create function, which has the following prototype:

BOOL Create( | LPCTSTR lpszWindowName, DWORD dwStyle,
 | const RECT&rect, CWnd* pParentWnd, UINT nID,
 | CFile* pPersist = NULL, BOOL bStorage = FALSE,
 | BSTR bstrLicKey = NULL);

Provide parameters as follows:

lpszWindowName | Use "", because the control window does not need a name.
dwStyle | Use 0 for the default style.
&rect | Use the CRect function. For example: CRect(0,0,50,50).
pParentWnd | Use this to refer to the current window.
nID | Use 0 for the default ID.
pPersist | Use NULL.
bStorage | Use FALSE.
bstrLicKey | Use the LEADTOOLS license string, which is always the first line in the LTOCX14.LIC file. For example: "LEADTOOLS OCX Copyright (c) 1990-2005 LEAD Technologies, Inc." If you do not specify this string correctly, the ActiveX will not work when you distribute your application.

For example:

CLEADRasterView *pRasView=NULL;
static const WCHAR BASED_CODE _szLicString[] =
L"LEADTOOLS OCX Copyright (c) 1990-2005 LEAD Technologies, Inc.";
pRasView = new CLEADRasterView;
// pass the license string to the CLEADRasterView::Create function.
// The CLEADRasterView::Create expects a BSTR parameter and SysAllocString converts the
// WCHAR[] to a BSTR
BSTR lpLic = SysAllocString(_szLicString);
pRasView->Create("", 0,CRect(0,0,50,50),this,0,NULL,FALSE,lpLic);
pRasView->ShowWindow(SW_HIDE);
SysFreeString(lpLic);

When getting or setting a property value, you must use a function that is created by adding a prefix to the property name.

To set a property value, the syntax is as follows:

m_controlname.Setpropertyname(value);

For example:

m_Lead1.SetRubberBandVisible(FALSE);

To get a property value, the syntax is as follows:

value = m_controlname.Getpropertyname();

For example:

HeightFactor = m_Lead1.GetBitmapHeight();

To set a property array value, the syntax is as follows:

m_controlname.Setpropertyname(index, value);

For example:

m_Lead1.SetRemapTable(MyIndex, (255 * Offset) / CurrentRange);

To get a property array value, the syntax is as follows:

value = m_controlname.Getpropertyname(index);

For example:

m_Lead1.SetBitmap(m_Lead1.GetColorPlanes(3)); // Copy the K plane

In Version 6.0 of Visual C++, the MicroSoft compiler also has a #import directive, which can be used to import type library information from an ActiveX control or COM Object.

To add any of the LEAD COM Objects to your application you can use the following:

// get information for ILEADRaster
#import <ltr13n.dll> no_namespace, named_guids
// get information for ILEADRasterIO
#import <ltrio13n.dll> no_namespace, named_guids

Then, you can create instances of the objects. The following shows how to create

an instance of ILEADRaster, which is licensed, and an instance of ILEADRasterIO, which is not. Note, you can also use IClassFactory2::CreateInstanceLic to create ILEADRaster objects.

static const WCHAR BASED_CODE _szLicString[] =
L"LEADTOOLS OCX Copyright (c) 1990-2004 LEAD Technologies, Inc.";
BSTR lpLic = SysAllocString(_szLicString);
ILEADRasterFactory *pFactory=NULL;
ILEADRaster *pRaster=NULL;
CoCreateInstance(CLSID_LEADRasterFactory, NULL, CLSCTX_ALL,
IID_ILEADRasterFactory, (void**)&pFactory);
pRaster = (ILEADRaster*)pFactory->CreateObject("LEADRaster.LEADRaster.130", lpLic);
SysFreeString(lpLic);//free the string
pRaster->CreateBitmap(100.0f, 100.0f, 24);//create a bitmap
pFactory->Release();//release the object
pRaster->Release();//release the object

ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
IID_ILEADRasterIO, (void**)&pRasterIO);
pRasterIO->put_EnableMethodErrors(FALSE);//1
pRasterIO->PutEnableMethodErrors(FALSE); //2
pRasterIO->EnableMethodErrors = FALSE; //3
pRasterIO->Load(m_LEADRasterView1.GetRaster(),
"v:\\images\\chess.bmp", 0, 1, 1);
pRasterIO->Release();

Note that there are three different ways that you can access a COM Object's properties when you use the #import statement.

To set a property value, the syntax is as follows:

1) pObject->put_propertyname(value);
2) pObject->Putpropertyname(value);
3) pObject->propertyname = value;

For example:

pRasterIO->put_EnableMethodErrors(FALSE);//1
pRasterIO->PutEnableMethodErrors(FALSE); //2
pRasterIO->EnableMethodErrors = FALSE; //3

To get a property value, the syntax is as follows:

1) pObject->Get_propertyname(&value);
2) value = pObject->Getpropertyname();
3) value = pObject->propertyname;

For example:

VARIANT_BOOL bVal;
pRasterIO->get_EnableMethodErrors(&bVal); //1
bVal = pRasterIO->GetEnableMethodErrors();//2
bVal = pRasterIO->EnableMethodErrors; //3


Visual C++ Key Codes

The following are the Visual C++ key codes:

VK_A through VK_Z are the same as their ASCII equivalents: 'A' thru 'Z'.
VK_0 through VK_9 are the same as their ASCII equivalents: '0' thru '9'.
VK_LBUTTON
VK_RBUTTON
VK_CANCEL
VK_MBUTTON
VK_BACK
VK_TAB
VK_CLEAR
VK_RETURN
VK_SHIFT
VK_CONTROL
VK_MENU
VK_PAUSE
VK_CAPITAL
VK_ESCAPE
VK_SPACE
VK_PRIOR
VK_NEXT
VK_END
VK_HOME
VK_LEFT
VK_UP
VK_RIGHT
VK_DOWN
VK_SELECT
VK_PRINT
VK_EXECUTE
VK_SNAPSHOT
VK_INSERT
VK_DELETE
VK_HELP

VK_NUMPAD0
VK_NUMPAD1
VK_NUMPAD2
VK_NUMPAD3
VK_NUMPAD4
VK_NUMPAD5
VK_NUMPAD6
VK_NUMPAD7
VK_NUMPAD8
VK_NUMPAD9
VK_MULTIPLY
VK_ADD
VK_SEPARATOR
VK_SUBTRACT
VK_DECIMAL
VK_DIVIDE
VK_F1
VK_F2
VK_F3
VK_F4
VK_F5
VK_F6
VK_F7
VK_F8
VK_F9
VK_F10
VK_F11
VK_F12
VK_F13
VK_F14
VK_F15
VK_F16
VK_F17
VK_F18
VK_F19
VK_F20
VK_F21
VK_F22
VK_F23
VK_F24
VK_NUMLOCK
VK_SCROLL


Topic Selection

LEAD Technologies, Inc.
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

Sales@Leadtools.com
www.leadtools.com

(704) 332-5532
FAX: (704) 372-8161
Tech Support: (704) 372-9681

LEADTOOLS is ideal for developers involved in still frame, multimedia, document, medical, and vector imaging projects, including Internet/Intranet applications. Independent of the specific application requirement – scanning, file format support/conversion, compression, image processing, annotation, database support, multimedia, etc. – LEADTOOLS provides the most comprehensive, robust, flexible, and powerful imaging solution available.

Click this button to start the Licensing help file to review the License Agreements governing your use of the software.

Click this button to start the Products help file to review the full line of LEADTOOLS Products.

Click this button to start the Imaging help file to review the full line of LEADTOOLS Image Categories.


Command Set Default Tables

The following tables provide default information about the available Command Sets, and their respective Command Elements.

C-STORE-REQUEST

C-STORE-RESPONSE

C-FIND-REQUEST

C-FIND-RESPONSE

C-GET-REQUEST

C-GET-RESPONSE

C-MOVE-REQUEST

C-MOVE-RESPONSE

C-CANCEL-REQUEST

C-ECHO-REQUEST

C-ECHO-RESPONSE

N-EVENT-REPORT-REQUEST

N-EVENT-REPORT-RESPONSE

N-GET-REQUEST

N-GET-RESPONSE

N-SET-REQUEST

N-SET-RESPONSE

N-ACTION-REQUEST

N-ACTION-RESPONSE

N-CREATE-REQUEST

N-CREATE-RESPONSE

N-DELETE-REQUEST

N-DELETE-RESPONSE


C-CANCEL-REQUEST Default Table

The following table provides default information about the Command Elements contained in the C-CANCEL-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000100 | Command Field | US | 1 | 0x0FFF
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_ABSENT


C-ECHO-REQUEST Default Table

The following table provides default information about the Command Elements contained in the C-ECHO-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | M = UID_VERIFICATION_CLASS
0x00000100 | Command Field | US | 1 | 0x0030
0x00000110 | Message ID | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_ABSENT


C-ECHO-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the C-ECHO-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U = UID_VERIFICATION_CLASS
0x00000100 | Command Field | US | 1 | 0x8030
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M


C-FIND-REQUEST Default Table

The following table provides default information about the Command Elements contained in the C-FIND-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0020
0x00000110 | Message ID | US | 1 | M
0x00000700 | Priority | US | 1 | M
0x00000800 | Data Set Type | US | 1 | 0x0102
Data Set | Identifier - A Data Set which encode the Identifier to be matched |  |  | M


C-FIND-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the C-FIND-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8020
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | 0x0102
0x00000900 | Status | US | 1 | M
Data Set | Identifier - A Data Set which encode the Identifier to be matched |  |  | C


C-GET-REQUEST Default Table

The following table provides default information about the Command Elements contained in the C-GET-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0010
0x00000110 | Message ID | US | 1 | M
0x00000700 | Priority | US | 1 | M
0x00000800 | Data Set Type | US | 1 | 0x0102
Data Set | Identifier - A Data Set which encode the Identifier to be matched |  |  | M


C-GET-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the C-GET-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8010
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001020 | Number of Remaining Sub-operations | US | 1 | C
0x00001021 | Number of Completed Sub-operations | US | 1 | C
0x00001022 | Number of Failed Sub-operations | US | 1 | C
0x00001023 | Number of Warning Sub-operations | US | 1 | C
Data Set | Identifier - A Data Set which encode the Identifier to be matched |  |  | U


C-MOVE-REQUEST Default Table

The following table provides default information about the Command Elements contained in the C-MOVE-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0021
0x00000110 | Message ID | US | 1 | M
0x00000600 | Move Destination | AE | 1 | M
0x00000700 | Priority | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT
Data Set | Identifier - A Data Set which encode the Identifier to be matched |  |  | M


C-MOVE-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the C-MOVE-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8021
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001020 | Number of Remaining Sub-operations | US | 1 | C
0x00001021 | Number of Complete Sub-operations | US | 1 | C
0x00001022 | Number of Failed Sub-operations | US | 1 | C
0x00001023 | Number of Warning Sub-operations | US | 1 | C
Data Set | Identifier - A Data Set which encode the Identifier to be matched |  |  | U


C-STORE-REQUEST Default Table

The following table provides default information about the Command Elements contained in the C-STORE-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0001
0x00000110 | Message ID | US | 1 | M
0x00000700 | Priority | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT
0x00001000 | Affected SOP Instance UID | UI | 1 | M
0x00001030 | Move Originator Application Entity Title | AE | 1 | U
0x00001031 | Move Originator Message ID | US | 1 | U
Data Set | Application-specific Data Set |  |  | M


C-STORE-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the C-STORE-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8001
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001000 | Affected SOP Instance UID | UI | 1 | U


Compression Table

The table below contains possible combinations of compression, photometric setting, bits per pixel, and quality factor.

Compression | Photometric | BPP | QFactor
DICOM_IMAGE_COMPRESSION_NONE | IMAGE_PHOTOMETRIC_MONOCHROME2 | 8 |
DICOM_IMAGE_COMPRESSION_NONE | IMAGE_PHOTOMETRIC_MONOCHROME2 | 16 |
DICOM_IMAGE_COMPRESSION_NONE | IMAGE_PHOTOMETRIC_PALETTE_COLOR | 8 |
DICOM_IMAGE_COMPRESSION_NONE | IMAGE_PHOTOMETRIC_RGB | 24 |
DICOM_IMAGE_COMPRESSION_RLE | IMAGE_PHOTOMETRIC_MONOCHROME2 | 8 |
DICOM_IMAGE_COMPRESSION_RLE | IMAGE_PHOTOMETRIC_MONOCHROME2 | 16 |
DICOM_IMAGE_COMPRESSION_RLE | IMAGE_PHOTOMETRIC_PALETTE_COLOR | 8 |
DICOM_IMAGE_COMPRESSION_RLE | IMAGE_PHOTOMETRIC_RGB | 24 |
DICOM_IMAGE_COMPRESSION_JPEG_LOSSLESS | IMAGE_PHOTOMETRIC_MONOCHROME2 | 8 |
DICOM_IMAGE_COMPRESSION_JPEG_LOSSLESS | IMAGE_PHOTOMETRIC_MONOCHROME2 | 12 |
DICOM_IMAGE_COMPRESSION_JPEG_LOSSLESS | IMAGE_PHOTOMETRIC_MONOCHROME2 | 16 |
DICOM_IMAGE_COMPRESSION_JPEG_LOSSLESS | IMAGE_PHOTOMETRIC_RGB | 24 |
DICOM_IMAGE_COMPRESSION_JPEG_LOSSY | IMAGE_PHOTOMETRIC_MONOCHROME2 | 8 | 2-255
DICOM_IMAGE_COMPRESSION_JPEG_LOSSY | IMAGE_PHOTOMETRIC_MONOCHROME2 | 12 | 2-255
DICOM_IMAGE_COMPRESSION_JPEG_LOSSY | IMAGE_PHOTOMETRIC_RGB | 24 | 2-255
DICOM_IMAGE_COMPRESSION_J2K_LOSSLESS | IMAGE_PHOTOMETRIC_MONOCHROME2 | 8 |
DICOM_IMAGE_COMPRESSION_J2K_LOSSLESS | IMAGE_PHOTOMETRIC_MONOCHROME2 | 12 |
DICOM_IMAGE_COMPRESSION_J2K_LOSSLESS | IMAGE_PHOTOMETRIC_MONOCHROME2 | 16 |
DICOM_IMAGE_COMPRESSION_J2K_LOSSLESS | IMAGE_PHOTOMETRIC_RGB | 24 |
DICOM_IMAGE_COMPRESSION_J2K_LOSSY | IMAGE_PHOTOMETRIC_MONOCHROME2 | 8 | 2-255
DICOM_IMAGE_COMPRESSION_J2K_LOSSY | IMAGE_PHOTOMETRIC_MONOCHROME2 | 12 | 2-255
DICOM_IMAGE_COMPRESSION_J2K_LOSSY | IMAGE_PHOTOMETRIC_MONOCHROME2 | 16 | 2-255
DICOM_IMAGE_COMPRESSION_J2K_LOSSY | IMAGE_PHOTOMETRIC_RGB | 24 | 2-255


Data Element Tag Table

The following is a table of default information about the Data Element Tags that are standard for the DICOM file format. For a list of constants that correspond to the code values balow, refer to the Data Element Tag Constants.

Code value | Mask | Name | VR | Min | Max | Div
0x00000001 | 0xFFFFFFFF | Command Length to End | VR_UL | 1 | 1 | 1
0x00000002 | 0xFFFFFFFF | Affected SOP Class UID | VR_UI | 1 | 1 | 1
0x00000003 | 0xFFFFFFFF | Requested SOP Class UID | VR_UI | 1 | 1 | 1
0x00000010 | 0xFFFFFFFF | Command Recognition Code | VR_LO | 1 | 1 | 1
0x00000100 | 0xFFFFFFFF | Command Field | VR_US | 1 | 1 | 1
0x00000110 | 0xFFFFFFFF | Message ID | VR_US | 1 | 1 | 1
0x00000120 | 0xFFFFFFFF | Message ID Being Responded To | VR_US | 1 | 1 | 1
0x00000200 | 0xFFFFFFFF | Initiator | VR_AE | 1 | 1 | 1
0x00000300 | 0xFFFFFFFF | Receiver | VR_AE | 1 | 1 | 1
0x00000400 | 0xFFFFFFFF | Find Location | VR_AE | 1 | 1 | 1
0x00000600 | 0xFFFFFFFF | Move Destination | VR_AE | 1 | 1 | 1
0x00000700 | 0xFFFFFFFF | Priority | VR_US | 1 | 1 | 1
0x00000800 | 0xFFFFFFFF | Data Set Type | VR_US | 1 | 1 | 1
0x00000850 | 0xFFFFFFFF | Number of Matches | VR_US | 1 | 1 | 1
0x00000860 | 0xFFFFFFFF | Response Sequence Number | VR_US | 1 | 1 | 1
0x00000900 | 0xFFFFFFFF | Status | VR_US | 1 | 1 | 1
0x00000901 | 0xFFFFFFFF | Offending Element | VR_AT | 1 | -1 | 1
0x00000902 | 0xFFFFFFFF | Error Comment | VR_LO | 1 | 1 | 1
0x00000903 | 0xFFFFFFFF | Error ID | VR_US | 1 | 1 | 1
0x00001000 | 0xFFFFFFFF | Affected SOP Instance UID | VR_UI | 1 | 1 | 1
0x00001001 | 0xFFFFFFFF | Requested SOP Instance UID | VR_UI | 1 | 1 | 1
0x00001002 | 0xFFFFFFFF | Event Type ID | VR_US | 1 | 1 | 1
0x00001005 | 0xFFFFFFFF | Attribute Identifier List | VR_AT | 1 | -1 | 1
0x00001008 | 0xFFFFFFFF | Action Type ID | VR_US | 1 | 1 | 1
0x00001020 | 0xFFFFFFFF | Number of Remaining Suboperations | VR_US | 1 | 1 | 1
0x00001021 | 0xFFFFFFFF | Number of Completed Suboperations | VR_US | 1 | 1 | 1
0x00001022 | 0xFFFFFFFF | Number of Failed Suboperations | VR_US | 1 | 1 | 1
0x00001023 | 0xFFFFFFFF | Number of Warning Suboperations | VR_US | 1 | 1 | 1
0x00001030 | 0xFFFFFFFF | Move Originator Application Entity Title | VR_AE | 1 | 1 | 1
0x00001031 | 0xFFFFFFFF | Move Originator Message ID | VR_US | 1 | 1 | 1
0x00004000 | 0xFFFFFFFF | Dialog Receiver | VR_LO | 1 | 1 | 1
0x00004010 | 0xFFFFFFFF | Terminal Type | VR_LO | 1 | 1 | 1
0x00005010 | 0xFFFFFFFF | Message Set ID | VR_SH | 1 | 1 | 1
0x00005020 | 0xFFFFFFFF | End Message Set | VR_SH | 1 | 1 | 1
0x00005110 | 0xFFFFFFFF | Display Format | VR_LO | 1 | 1 | 1
0x00005120 | 0xFFFFFFFF | Page Position ID | VR_LO | 1 | 1 | 1
0x00005130 | 0xFFFFFFFF | Text Format ID | VR_LO | 1 | 1 | 1
0x00005140 | 0xFFFFFFFF | Normal Reverse | VR_LO | 1 | 1 | 1
0x00005150 | 0xFFFFFFFF | Add Gray Scale | VR_LO | 1 | 1 | 1
0x00005160 | 0xFFFFFFFF | Borders | VR_LO | 1 | 1 | 1
0x00005170 | 0xFFFFFFFF | Copies | VR_IS | 1 | 1 | 1
0x00005180 | 0xFFFFFFFF | Old Magnification Type | VR_LO | 1 | 1 | 1
0x00005190 | 0xFFFFFFFF | Erase | VR_LO | 1 | 1 | 1
0x000051A0 | 0xFFFFFFFF | Print | VR_LO | 1 | 1 | 1
0x000051B0 | 0xFFFFFFFF | Overlays | VR_US | 1 | -1 | 1
0x00020001 | 0xFFFFFFFF | File Meta Information Version | VR_OB | 1 | 1 | 1
0x00020002 | 0xFFFFFFFF | Media Storage SOP Class UID | VR_UI | 1 | 1 | 1
0x00020003 | 0xFFFFFFFF | Media Storage SOP Instance UID | VR_UI | 1 | 1 | 1
0x00020010 | 0xFFFFFFFF | Transfer Syntax UID | VR_UI | 1 | 1 | 1
0x00020012 | 0xFFFFFFFF | Implementation Class UID | VR_UI | 1 | 1 | 1
0x00020013 | 0xFFFFFFFF | Implementation Version Name | VR_SH | 1 | 1 | 1
0x00020016 | 0xFFFFFFFF | Source Application Entity Title | VR_AE | 1 | 1 | 1
0x00020100 | 0xFFFFFFFF | Private Information Creator UID | VR_UI | 1 | 1 | 1
0x00020102 | 0xFFFFFFFF | Private Information | VR_OB | 1 | 1 | 1
0x00041130 | 0xFFFFFFFF | File-set ID | VR_CS | 1 | 1 | 1
0x00041141 | 0xFFFFFFFF | File-set Descriptor File ID | VR_CS | 1 | 8 | 1
0x00041142 | 0xFFFFFFFF | Specific Character Set of File-set Descriptor File | VR_CS | 1 | 1 | 1
0x00041200 | 0xFFFFFFFF | Offset of the First Directory Record of the Root Directory Entity | VR_UL | 1 | 1 | 1
0x00041202 | 0xFFFFFFFF | Offset of the Last Directory Record of the Root Directory Entity | VR_UL | 1 | 1 | 1
0x00041212 | 0xFFFFFFFF | File-set Consistency Flag | VR_US | 1 | 1 | 1
0x00041220 | 0xFFFFFFFF | Directory Record Sequence | VR_SQ | 1 | 1 | 1
0x00041400 | 0xFFFFFFFF | Offset of the Next Directory Record | VR_UL | 1 | 1 | 1
0x00041410 | 0xFFFFFFFF | Record In-use Flag | VR_US | 1 | 1 | 1
0x00041420 | 0xFFFFFFFF | Offset of Referenced Lower-Level Directory Entity | VR_UL | 1 | 1 | 1
0x00041430 | 0xFFFFFFFF | Directory Record Type | VR_CS | 1 | 1 | 1
0x00041432 | 0xFFFFFFFF | Private Record UID | VR_UI | 1 | 1 | 1
0x00041500 | 0xFFFFFFFF | Referenced File ID | VR_CS | 1 | 8 | 1
0x00041504 | 0xFFFFFFFF | MRDR Directory Record Offset | VR_UL | 1 | 1 | 1
0x00041510 | 0xFFFFFFFF | Referenced SOP Class UID in File | VR_UI | 1 | 1 | 1
0x00041511 | 0xFFFFFFFF | Referenced SOP Instance UID in File | VR_UI | 1 | 1 | 1
0x00041512 | 0xFFFFFFFF | Referenced Transfer Syntax UID in File | VR_UI | 1 | 1 | 1
0x00041600 | 0xFFFFFFFF | Number of References | VR_UL | 1 | 1 | 1
0x00080001 | 0xFFFFFFFF | Length to End (Retired) | VR_UL | 1 | 1 | 1
0x00080005 | 0xFFFFFFFF | Specific Character Set | VR_CS | 1 | -1 | 1
0x00080008 | 0xFFFFFFFF | Image Type | VR_CS | 1 | -1 | 1
0x00080010 | 0xFFFFFFFF | Recognition Code (Retired) | VR_LO | 1 | 1 | 1
0x00080012 | 0xFFFFFFFF | Instance Creation Date | VR_DA | 1 | 1 | 1
0x00080013 | 0xFFFFFFFF | Instance Creation Time | VR_TM | 1 | 1 | 1
0x00080014 | 0xFFFFFFFF | Instance Creator UID | VR_UI | 1 | 1 | 1
0x00080016 | 0xFFFFFFFF | SOP Class UID | VR_UI | 1 | 1 | 1
0x00080018 | 0xFFFFFFFF | SOP Instance UID | VR_UI | 1 | 1 | 1
0x00080020 | 0xFFFFFFFF | Study Date | VR_DA | 1 | 1 | 1
0x00080021 | 0xFFFFFFFF | Series Date | VR_DA | 1 | 1 | 1
0x00080022 | 0xFFFFFFFF | Acquisition Date | VR_DA | 1 | 1 | 1
0x00080023 | 0xFFFFFFFF | Image Date | VR_DA | 1 | 1 | 1
0x00080024 | 0xFFFFFFFF | Overlay Date | VR_DA | 1 | 1 | 1
0x00080025 | 0xFFFFFFFF | Curve Date | VR_DA | 1 | 1 | 1
0x00080030 | 0xFFFFFFFF | Study Time | VR_TM | 1 | 1 | 1
0x00080031 | 0xFFFFFFFF | Series Time | VR_TM | 1 | 1 | 1
0x00080032 | 0xFFFFFFFF | Acquisition Time | VR_TM | 1 | 1 | 1
0x00080033 | 0xFFFFFFFF | Image Time | VR_TM | 1 | 1 | 1
0x00080034 | 0xFFFFFFFF | Overlay Time | VR_TM | 1 | 1 | 1
0x00080035 | 0xFFFFFFFF | Curve Time | VR_TM | 1 | 1 | 1
0x00080040 | 0xFFFFFFFF | Data Set Type (Retired) | VR_US | 1 | 1 | 1
0x00080041 | 0xFFFFFFFF | Data Set Subtype (Retired) | VR_LT | 1 | 1 | 1
0x00080042 | 0xFFFFFFFF | Nuclear Medicine Series Type (Retired) | VR_CS | 1 | 1 | 1
0x00080050 | 0xFFFFFFFF | Accession Number | VR_SH | 1 | 1 | 1
0x00080052 | 0xFFFFFFFF | Query/Retrieve Level | VR_CS | 1 | 1 | 1
0x00080054 | 0xFFFFFFFF | Retrieve AE Title | VR_AE | 1 | -1 | 1
0x00080058 | 0xFFFFFFFF | Failed SOP Instance UID List | VR_UI | 1 | -1 | 1
0x00080060 | 0xFFFFFFFF | Modality | VR_CS | 1 | 1 | 1
0x00080061 | 0xFFFFFFFF | Modalities in Study | VR_CS | 1 | -1 | 1
0x00080062 | 0xFFFFFFFF | Modality Subtype | VR_SQ | 1 | 1 | 1
0x00080064 | 0xFFFFFFFF | Conversion Type | VR_CS | 1 | 1 | 1
0x00080068 | 0xFFFFFFFF | Presentation Intent Type | VR_CS | 1 | 1 | 1
0x00080070 | 0xFFFFFFFF | Manufacturer | VR_LO | 1 | 1 | 1
0x00080080 | 0xFFFFFFFF | Institution Name | VR_LO | 1 | 1 | 1
0x00080081 | 0xFFFFFFFF | Institution Address | VR_ST | 1 | 1 | 1
0x00080082 | 0xFFFFFFFF | Institution Code Sequence | VR_SQ | 1 | 1 | 1
0x00080090 | 0xFFFFFFFF | Referring Physician's Name | VR_PN | 1 | 1 | 1
0x00080092 | 0xFFFFFFFF | Referring Physician's Address | VR_ST | 1 | 1 | 1
0x00080094 | 0xFFFFFFFF | Referring Physician's Telephone Numbers | VR_SH | 1 | -1 | 1
0x00080100 | 0xFFFFFFFF | Code Value | VR_SH | 1 | 1 | 1
0x00080102 | 0xFFFFFFFF | Coding Scheme Designator | VR_SH | 1 | 1 | 1
0x00080103 | 0xFFFFFFFF | Coding Scheme Version | VR_SH | 1 | 1 | 1
0x00080104 | 0xFFFFFFFF | Code Meaning | VR_LO | 1 | 1 | 1
0x00080105 | 0xFFFFFFFF | Mapping Resource | VR_CS | 1 | 1 | 1
0x00080106 | 0xFFFFFFFF | Context Group Version | VR_DT | 1 | 1 | 1
0x00080107 | 0xFFFFFFFF | Context Group Local Version | VR_DT | 1 | 1 | 1
0x0008010B | 0xFFFFFFFF | Code Set Extension Flag | VR_CS | 1 | 1 | 1
0x0008010C | 0xFFFFFFFF | Private Coding Scheme Creator UID | VR_UI | 1 | 1 | 1
0x0008010D | 0xFFFFFFFF | Code Set Extension Creator UID | VR_UI | 1 | 1 | 1
0x0008010F | 0xFFFFFFFF | Context Identifier | VR_CS | 1 | 1 | 1
0x00081000 | 0xFFFFFFFF | Network ID (Retired) | VR_LT | 1 | 1 | 1
0x00081010 | 0xFFFFFFFF | Station Name | VR_SH | 1 | 1 | 1
0x00081030 | 0xFFFFFFFF | Study Description | VR_LO | 1 | 1 | 1
0x00081032 | 0xFFFFFFFF | Procedure Code Sequence | VR_SQ | 1 | 1 | 1
0x0008103E | 0xFFFFFFFF | Series Description | VR_LO | 1 | 1 | 1
0x00081040 | 0xFFFFFFFF | Institutional Department Name | VR_LO | 1 | 1 | 1
0x00081048 | 0xFFFFFFFF | Physician(s) of Record | VR_PN | 1 | -1 | 1
0x00081050 | 0xFFFFFFFF | Performing Physician's Name | VR_PN | 1 | -1 | 1
0x00081060 | 0xFFFFFFFF | Name of Physician(s) Reading Study | VR_PN | 1 | -1 | 1
0x00081070 | 0xFFFFFFFF | Operators' Name | VR_PN | 1 | -1 | 1
0x00081080 | 0xFFFFFFFF | Admitting Diagnoses Description | VR_LO | 1 | -1 | 1
0x00081084 | 0xFFFFFFFF | Admitting Diagnosis Code Sequence | VR_SQ | 1 | 1 | 1
0x00081090 | 0xFFFFFFFF | Manufacturer's Model Name | VR_LO | 1 | 1 | 1
0x00081100 | 0xFFFFFFFF | Referenced Results Sequence | VR_SQ | 1 | 1 | 1
0x00081110 | 0xFFFFFFFF | Referenced Study Sequence | VR_SQ | 1 | 1 | 1
0x00081111 | 0xFFFFFFFF | Referenced Study Component Sequence | VR_SQ | 1 | 1 | 1
0x00081115 | 0xFFFFFFFF | Referenced Series Sequence | VR_SQ | 1 | 1 | 1
0x00081120 | 0xFFFFFFFF | Referenced Patient Sequence | VR_SQ | 1 | 1 | 1
0x00081125 | 0xFFFFFFFF | Referenced Visit Sequence | VR_SQ | 1 | 1 | 1
0x00081130 | 0xFFFFFFFF | Referenced Overlay Sequence 0008 | VR_SQ | 1 | 1 | 1
0x00081140 | 0xFFFFFFFF | Referenced Image Sequence | VR_SQ | 1 | 1 | 1
0x00081145 | 0xFFFFFFFF | Referenced Curve Sequence | VR_SQ | 1 | 1 | 1
0x00081148 | 0xFFFFFFFF | Referenced Previous Waveform | VR_SQ | 1 | 1 | 1
0x0008114A | 0xFFFFFFFF | Referenced Simultaneous Waveforms | VR_SQ | 1 | 1 | 1
0x0008114C | 0xFFFFFFFF | Referenced Subsequent Waveform | VR_SQ | 1 | 1 | 1
0x00081150 | 0xFFFFFFFF | Referenced SOP Class UID | VR_UI | 1 | 1 | 1
0x00081155 | 0xFFFFFFFF | Referenced SOP Instance UID | VR_UI | 1 | 1 | 1
0x0008115A | 0xFFFFFFFF | SOP Classes Supported | VR_UI | 1 | -1 | 1
0x00081160 | 0xFFFFFFFF | Referenced Frame Number | VR_IS | 1 | 1 | 1
0x00081195 | 0xFFFFFFFF | Transaction UID | VR_UI | 1 | 1 | 1
0x00081197 | 0xFFFFFFFF | Failure Reason | VR_US | 1 | 1 | 1
0x00081198 | 0xFFFFFFFF | Failed SOP Sequence | VR_SQ | 1 | 1 | 1
0x00081199 | 0xFFFFFFFF | Referenced SOP Sequence | VR_SQ | 1 | 1 | 1
0x00082110 | 0xFFFFFFFF | Lossy Image Compression (Retired) | VR_CS | 1 | 1 | 1
0x00082111 | 0xFFFFFFFF | Derivation Description | VR_ST | 1 | 1 | 1
0x00082112 | 0xFFFFFFFF | Source Image Sequence | VR_SQ | 1 | 1 | 1
0x00082120 | 0xFFFFFFFF | Stage Name | VR_SH | 1 | 1 | 1
0x00082122 | 0xFFFFFFFF | Stage Number | VR_IS | 1 | 1 | 1
0x00082124 | 0xFFFFFFFF | Number of Stages | VR_IS | 1 | 1 | 1
0x00082128 | 0xFFFFFFFF | View Number | VR_IS | 1 | 1 | 1
0x00082129 | 0xFFFFFFFF | Number of Event Timers | VR_IS | 1 | 1 | 1
0x0008212A | 0xFFFFFFFF | Number of Views in Stage | VR_IS | 1 | 1 | 1
0x00082130 | 0xFFFFFFFF | Event Elapsed Time(s) | VR_DS | 1 | -1 | 1
0x00082132 | 0xFFFFFFFF | Event Timer Name(s) | VR_LO | 1 | -1 | 1
0x00082142 | 0xFFFFFFFF | Start Trim | VR_IS | 1 | 1 | 1
0x00082143 | 0xFFFFFFFF | Stop Trim | VR_IS | 1 | 1 | 1
0x00082144 | 0xFFFFFFFF | Recommended Display Frame Rate | VR_IS | 1 | 1 | 1
0x00082200 | 0xFFFFFFFF | Transducer Position (Retired) | VR_CS | 1 | 1 | 1
0x00082204 | 0xFFFFFFFF | Transducer Orientation (Retired) | VR_CS | 1 | 1 | 1
0x00082208 | 0xFFFFFFFF | Anatomic Structure (Retired) | VR_CS | 1 | 1 | 1
0x00082218 | 0xFFFFFFFF | Anatomic Region Sequence | VR_SQ | 1 | 1 | 1
0x00082220 | 0xFFFFFFFF | Anatomic Region Modifier Sequence | VR_SQ | 1 | 1 | 1
0x00082228 | 0xFFFFFFFF | Primary Anatomic Structure Sequence | VR_SQ | 1 | 1 | 1
0x00082229 | 0xFFFFFFFF | Anatomic Structure, Space or Region Sequence | VR_SQ | 1 | 1 | 1
0x00082230 | 0xFFFFFFFF | Primary Anatomic Structure Modifier Sequence | VR_SQ | 1 | 1 | 1
0x00082240 | 0xFFFFFFFF | Transducer Position Sequence | VR_SQ | 1 | 1 | 1
0x00082242 | 0xFFFFFFFF | Transducer Position Modifier Sequence | VR_SQ | 1 | 1 | 1
0x00082244 | 0xFFFFFFFF | Transducer Orientation Sequence | VR_SQ | 1 | 1 | 1
0x00082246 | 0xFFFFFFFF | Transducer Orientation Modifier Sequence | VR_SQ | 1 | 1 | 1
0x00082251 | 0xFFFFFFFF | Anatomic Structure Space Or Region Code Sequence | VR_SQ | 1 | 1 | 1
0x00082253 | 0xFFFFFFFF | Anatomic Portal Of Entrance Code Sequence | VR_SQ | 1 | 1 | 1
0x00082255 | 0xFFFFFFFF | Anatomic Approach Direction Code Sequence | VR_SQ | 1 | 1 | 1
0x00082256 | 0xFFFFFFFF | Anatomic Perspective Description | VR_ST | 1 | 1 | 1
0x00082257 | 0xFFFFFFFF | Anatomic Perspective Code Sequence | VR_SQ | 1 | 1 | 1
0x00082258 | 0xFFFFFFFF | Anatomic Location Of Examining Instrument Description | VR_ST | 1 | 1 | 1
0x00082259 | 0xFFFFFFFF | Anatomic Location Of Examining Instrument Code Sequence | VR_SQ | 1 | 1 | 1
0x0008225A | 0xFFFFFFFF | Anatomic Structure Space Or Region Modifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0008225C | 0xFFFFFFFF | OnAxis Background Anatomic Structure Code Sequence | VR_SQ | 1 | 1 | 1
0x00084000 | 0xFFFFFFFF | Comments (Retired) | VR_LT | 1 | -1 | 1
0x00100010 | 0xFFFFFFFF | Patient's Name | VR_PN | 1 | 1 | 1
0x00100020 | 0xFFFFFFFF | Patient ID | VR_LO | 1 | 1 | 1
0x00100021 | 0xFFFFFFFF | Issuer of Patient ID | VR_LO | 1 | 1 | 1
0x00100030 | 0xFFFFFFFF | Patient's Birth Date | VR_DA | 1 | 1 | 1
0x00100032 | 0xFFFFFFFF | Patient's Birth Time | VR_TM | 1 | 1 | 1
0x00100040 | 0xFFFFFFFF | Patient's Sex | VR_CS | 1 | 1 | 1
0x00100050 | 0xFFFFFFFF | Patient's Insurance Plan Code Sequence | VR_SQ | 1 | 1 | 1
0x00101000 | 0xFFFFFFFF | Other Patient IDs | VR_LO | 1 | -1 | 1
0x00101001 | 0xFFFFFFFF | Other Patient Names | VR_PN | 1 | -1 | 1
0x00101005 | 0xFFFFFFFF | Patient's Birth Name | VR_PN | 1 | 1 | 1
0x00101010 | 0xFFFFFFFF | Patient's Age | VR_AS | 1 | 1 | 1
0x00101020 | 0xFFFFFFFF | Patient's Size | VR_DS | 1 | 1 | 1
0x00101030 | 0xFFFFFFFF | Patient's Weight | VR_DS | 1 | 1 | 1
0x00101040 | 0xFFFFFFFF | Patient's Address | VR_LO | 1 | 1 | 1
0x00101050 | 0xFFFFFFFF | Insurance Plan Identification (Retired) | VR_LT | 1 | -1 | 1
0x00101060 | 0xFFFFFFFF | Patient's Mother's Birth Name | VR_PN | 1 | 1 | 1
0x00101080 | 0xFFFFFFFF | Military Rank | VR_LO | 1 | 1 | 1
0x00101081 | 0xFFFFFFFF | Branch of Service | VR_LO | 1 | 1 | 1
0x00101090 | 0xFFFFFFFF | Medical Record Locator | VR_LO | 1 | 1 | 1
0x00102000 | 0xFFFFFFFF | Medical Alerts | VR_LO | 1 | -1 | 1
0x00102110 | 0xFFFFFFFF | Contrast Allergies | VR_LO | 1 | -1 | 1
0x00102150 | 0xFFFFFFFF | Country of Residence | VR_LO | 1 | 1 | 1
0x00102152 | 0xFFFFFFFF | Region of Residence | VR_LO | 1 | 1 | 1
0x00102154 | 0xFFFFFFFF | Patient's Telephone Numbers | VR_SH | 1 | -1 | 1
0x00102160 | 0xFFFFFFFF | Ethnic Group | VR_SH | 1 | 1 | 1
0x00102180 | 0xFFFFFFFF | Occupation | VR_SH | 1 | 1 | 1
0x001021A0 | 0xFFFFFFFF | Smoking Status | VR_CS | 1 | 1 | 1
0x001021B0 | 0xFFFFFFFF | Additional Patient History | VR_LT | 1 | 1 | 1
0x001021C0 | 0xFFFFFFFF | Pregnancy Status | VR_US | 1 | 1 | 1
0x001021D0 | 0xFFFFFFFF | Last Menstrual Date | VR_DA | 1 | 1 | 1
0x001021F0 | 0xFFFFFFFF | Patient's Religious Preference | VR_LO | 1 | 1 | 1
0x00104000 | 0xFFFFFFFF | Patient Comments | VR_LT | 1 | 1 | 1
0x00180010 | 0xFFFFFFFF | Contrast/Bolus Agent | VR_LO | 1 | 1 | 1
0x00180012 | 0xFFFFFFFF | Contrast/Bolus Agent Sequence | VR_SQ | 1 | 1 | 1
0x00180014 | 0xFFFFFFFF | Contrast/Bolus Administration Route Sequence | VR_SQ | 1 | 1 | 1
0x00180015 | 0xFFFFFFFF | Body Part Examined | VR_CS | 1 | 1 | 1
0x00180020 | 0xFFFFFFFF | Scanning Sequence | VR_CS | 1 | -1 | 1
0x00180021 | 0xFFFFFFFF | Sequence Variant | VR_CS | 1 | -1 | 1
0x00180022 | 0xFFFFFFFF | Scan Options | VR_CS | 1 | -1 | 1
0x00180023 | 0xFFFFFFFF | MR Acquisition Type | VR_CS | 1 | 1 | 1
0x00180024 | 0xFFFFFFFF | Sequence Name | VR_SH | 1 | 1 | 1
0x00180025 | 0xFFFFFFFF | Angio Flag | VR_CS | 1 | 1 | 1
0x00180026 | 0xFFFFFFFF | Intervention Drug Information Sequence | VR_SQ | 1 | 1 | 1
0x00180027 | 0xFFFFFFFF | Intervention Drug Stop Time | VR_TM | 1 | 1 | 1
0x00180028 | 0xFFFFFFFF | Intervention Drug Dose | VR_DS | 1 | 1 | 1
0x00180029 | 0xFFFFFFFF | Intervention Drug Code Sequence | VR_SQ | 1 | 1 | 1
0x0018002A | 0xFFFFFFFF | Additional Drug Sequence | VR_SQ | 1 | 1 | 1
0x00180030 | 0xFFFFFFFF | Radionuclide (Retired) | VR_LO | 1 | -1 | 1
0x00180031 | 0xFFFFFFFF | Radiopharmaceutical | VR_LO | 1 | 1 | 1
0x00180032 | 0xFFFFFFFF | Energy Window Centerline (Retired) | VR_DS | 1 | 1 | 1
0x00180033 | 0xFFFFFFFF | Energy Window Total Width (Retired) | VR_DS | 1 | -1 | 1
0x00180034 | 0xFFFFFFFF | Intervention Drug Name | VR_LO | 1 | 1 | 1
0x00180035 | 0xFFFFFFFF | Intervention Drug Start Time | VR_TM | 1 | 1 | 1
0x00180036 | 0xFFFFFFFF | Interventional Therapy Sequence | VR_SQ | 1 | 1 | 1
0x00180037 | 0xFFFFFFFF | Therapy Type | VR_CS | 1 | 1 | 1
0x00180038 | 0xFFFFFFFF | Interventional Status | VR_CS | 1 | 1 | 1
0x00180039 | 0xFFFFFFFF | Therapy Description | VR_CS | 1 | 1 | 1
0x00180040 | 0xFFFFFFFF | Cine Rate | VR_IS | 1 | 1 | 1
0x00180050 | 0xFFFFFFFF | Slice Thickness | VR_DS | 1 | 1 | 1
0x00180060 | 0xFFFFFFFF | KVP | VR_DS | 1 | 1 | 1
0x00180070 | 0xFFFFFFFF | Counts Accumulated | VR_IS | 1 | 1 | 1
0x00180071 | 0xFFFFFFFF | Acquisition Termination Condition | VR_CS | 1 | 1 | 1
0x00180072 | 0xFFFFFFFF | Effective Series Duration | VR_DS | 1 | 1 | 1
0x00180073 | 0xFFFFFFFF | Acquisition Start Condition | VR_CS | 1 | 1 | 1
0x00180074 | 0xFFFFFFFF | Acquisition Start Condition Data | VR_IS | 1 | 1 | 1
0x00180075 | 0xFFFFFFFF | Acquisition Termination Condition Data | VR_IS | 1 | 1 | 1
0x00180080 | 0xFFFFFFFF | Repetition Time | VR_DS | 1 | 1 | 1
0x00180081 | 0xFFFFFFFF | Echo Time | VR_DS | 1 | 1 | 1
0x00180082 | 0xFFFFFFFF | Inversion Time | VR_DS | 1 | 1 | 1
0x00180083 | 0xFFFFFFFF | Number of Averages | VR_DS | 1 | 1 | 1
0x00180084 | 0xFFFFFFFF | Imaging Frequency | VR_DS | 1 | 1 | 1
0x00180085 | 0xFFFFFFFF | Imaged Nucleus | VR_SH | 1 | 1 | 1
0x00180086 | 0xFFFFFFFF | Echo Number(s) | VR_IS | 1 | -1 | 1
0x00180087 | 0xFFFFFFFF | Magnetic Field Strength | VR_DS | 1 | 1 | 1
0x00180088 | 0xFFFFFFFF | Spacing Between Slices | VR_DS | 1 | 1 | 1
0x00180089 | 0xFFFFFFFF | Number of Phase Encoding Steps | VR_IS | 1 | 1 | 1
0x00180090 | 0xFFFFFFFF | Data Collection Diameter | VR_DS | 1 | 1 | 1
0x00180091 | 0xFFFFFFFF | Echo Train Length | VR_IS | 1 | 1 | 1
0x00180093 | 0xFFFFFFFF | Percent Sampling | VR_DS | 1 | 1 | 1
0x00180094 | 0xFFFFFFFF | Percent Phase Field of View | VR_DS | 1 | 1 | 1
0x00180095 | 0xFFFFFFFF | Pixel Bandwidth | VR_DS | 1 | 1 | 1
0x00181000 | 0xFFFFFFFF | Device Serial Number | VR_LO | 1 | 1 | 1
0x00181004 | 0xFFFFFFFF | Plate ID | VR_LO | 1 | 1 | 1
0x00181010 | 0xFFFFFFFF | Secondary Capture Device ID | VR_LO | 1 | 1 | 1
0x00181011 | 0xFFFFFFFF | Hardcopy Creation Device ID | VR_LO | 1 | 1 | 1
0x00181012 | 0xFFFFFFFF | Date of Secondary Capture | VR_DA | 1 | 1 | 1
0x00181014 | 0xFFFFFFFF | Time of Secondary Capture | VR_TM | 1 | 1 | 1
0x00181016 | 0xFFFFFFFF | Secondary Capture Device Manufacturer | VR_LO | 1 | 1 | 1
0x00181017 | 0xFFFFFFFF | Hardcopy Device Manufacturer | VR_LO | 1 | 1 | 1
0x00181018 | 0xFFFFFFFF | Secondary Capture Device Manufacturer's Model Name | VR_LO | 1 | 1 | 1
0x00181019 | 0xFFFFFFFF | Secondary Capture Device Software Version(s) | VR_LO | 1 | -1 | 1
0x0018101A | 0xFFFFFFFF | Hardcopy Device Software Version | VR_LO | 1 | -1 | 1
0x0018101B | 0xFFFFFFFF | Hardcopy Device Manfuacturer's Model Name | VR_LO | 1 | 1 | 1
0x00181020 | 0xFFFFFFFF | Software Version(s) | VR_LO | 1 | -1 | 1
0x00181022 | 0xFFFFFFFF | Video Image Format Acquired | VR_SH | 1 | 1 | 1
0x00181023 | 0xFFFFFFFF | Digital Image Format Acquired | VR_LO | 1 | 1 | 1
0x00181030 | 0xFFFFFFFF | Protocol Name | VR_LO | 1 | 1 | 1
0x00181040 | 0xFFFFFFFF | Contrast/Bolus Route | VR_LO | 1 | 1 | 1
0x00181041 | 0xFFFFFFFF | Contrast/Bolus Volume | VR_DS | 1 | 1 | 1
0x00181042 | 0xFFFFFFFF | Contrast/Bolus Start Time | VR_TM | 1 | 1 | 1
0x00181043 | 0xFFFFFFFF | Contrast/Bolus Stop Time | VR_TM | 1 | 1 | 1
0x00181044 | 0xFFFFFFFF | Contrast/Bolus Total Dose | VR_DS | 1 | 1 | 1
0x00181045 | 0xFFFFFFFF | Syringe Counts | VR_IS | 1 | 1 | 1
0x00181046 | 0xFFFFFFFF | Contrast Flow Rate(s) | VR_DS | 1 | -1 | 1
0x00181047 | 0xFFFFFFFF | Contrast Flow Duration(s) | VR_DS | 1 | -1 | 1
0x00181048 | 0xFFFFFFFF | Contrast/Bolus Ingredient | VR_CS | 1 | 1 | 1
0x00181049 | 0xFFFFFFFF | Contrast/Bolus Ingredient Concentration | VR_DS | 1 | 1 | 1
0x00181050 | 0xFFFFFFFF | Spatial Resolution | VR_DS | 1 | 1 | 1
0x00181060 | 0xFFFFFFFF | Trigger Time | VR_DS | 1 | 1 | 1
0x00181061 | 0xFFFFFFFF | Trigger Source or Type | VR_LO | 1 | 1 | 1
0x00181062 | 0xFFFFFFFF | Nominal Interval | VR_IS | 1 | 1 | 1
0x00181063 | 0xFFFFFFFF | Frame Time | VR_DS | 1 | 1 | 1
0x00181064 | 0xFFFFFFFF | Framing Type | VR_LO | 1 | 1 | 1
0x00181065 | 0xFFFFFFFF | Frame Time Vector | VR_DS | 1 | -1 | 1
0x00181066 | 0xFFFFFFFF | Frame Delay | VR_DS | 1 | 1 | 1
0x00181067 | 0xFFFFFFFF | Image Trigger Delay | VR_DS | 1 | 1 | 1
0x00181068 | 0xFFFFFFFF | Group Time Offset | VR_DS | 1 | 1 | 1
0x00181069 | 0xFFFFFFFF | Trigger Time Offset | VR_DS | 1 | 1 | 1
0x0018106A | 0xFFFFFFFF | Synchronization Trigger | VR_CS | 1 | 2 | 1
0x0018106B | 0xFFFFFFFF | Synchronization Frame of Reference | VR_UI | 1 | 1 | 1
0x0018106E | 0xFFFFFFFF | Trigger Sample Position | VR_UL | 1 | 1 | 1
0x00181070 | 0xFFFFFFFF | Radiopharmaceutical Route | VR_LO | 1 | 1 | 1
0x00181071 | 0xFFFFFFFF | Radiopharmaceutical Volume | VR_DS | 1 | 1 | 1
0x00181072 | 0xFFFFFFFF | Radiopharmaceutical Start Time | VR_TM | 1 | 1 | 1
0x00181073 | 0xFFFFFFFF | Radiopharmaceutical Stop Time | VR_TM | 1 | 1 | 1
0x00181074 | 0xFFFFFFFF | Radionuclide Total Dose | VR_DS | 1 | 1 | 1
0x00181075 | 0xFFFFFFFF | Radionuclide Half Life | VR_DS | 1 | 1 | 1
0x00181076 | 0xFFFFFFFF | Radionuclide Positron Fraction | VR_DS | 1 | 1 | 1
0x00181077 | 0xFFFFFFFF | Radiopharmaceutical Specific Activity | VR_DS | 1 | 1 | 1
0x00181080 | 0xFFFFFFFF | Beat Rejection Flag | VR_CS | 1 | 1 | 1
0x00181081 | 0xFFFFFFFF | Low R-R Value | VR_IS | 1 | 1 | 1
0x00181082 | 0xFFFFFFFF | High R-R Value | VR_IS | 1 | 1 | 1
0x00181083 | 0xFFFFFFFF | Intervals Acquired | VR_IS | 1 | 1 | 1
0x00181084 | 0xFFFFFFFF | Intervals Rejected | VR_IS | 1 | 1 | 1
0x00181085 | 0xFFFFFFFF | PVC Rejection | VR_LO | 1 | 1 | 1
0x00181086 | 0xFFFFFFFF | Skip Beats | VR_IS | 1 | 1 | 1
0x00181088 | 0xFFFFFFFF | Heart Rate | VR_IS | 1 | 1 | 1
0x00181090 | 0xFFFFFFFF | Cardiac Number of Images | VR_IS | 1 | 1 | 1
0x00181094 | 0xFFFFFFFF | Trigger Window | VR_IS | 1 | 1 | 1
0x00181100 | 0xFFFFFFFF | Reconstruction Diameter | VR_DS | 1 | 1 | 1
0x00181110 | 0xFFFFFFFF | Distance Source to Detector | VR_DS | 1 | 1 | 1
0x00181111 | 0xFFFFFFFF | Distance Source to Patient | VR_DS | 1 | 1 | 1
0x00181114 | 0xFFFFFFFF | Estimated Radiographic Magnification Factor | VR_DS | 1 | 1 | 1
0x00181120 | 0xFFFFFFFF | Gantry/Detector Tilt | VR_DS | 1 | 1 | 1
0x00181121 | 0xFFFFFFFF | Gantry/Detector Slew | VR_DS | 1 | 1 | 1
0x00181130 | 0xFFFFFFFF | Table Height | VR_DS | 1 | 1 | 1
0x00181131 | 0xFFFFFFFF | Table Traverse | VR_DS | 1 | 1 | 1
0x00181134 | 0xFFFFFFFF | Table Motion | VR_CS | 1 | 1 | 1
0x00181135 | 0xFFFFFFFF | Table Vertical Increment | VR_DS | 1 | -1 | 1
0x00181136 | 0xFFFFFFFF | Table Lateral Increment | VR_DS | 1 | -1 | 1
0x00181137 | 0xFFFFFFFF | Table Longitudinal Increment | VR_DS | 1 | -1 | 1
0x00181138 | 0xFFFFFFFF | Table Angle | VR_DS | 1 | 1 | 1
0x0018113A | 0xFFFFFFFF | Table Type | VR_CS | 1 | 1 | 1
0x00181140 | 0xFFFFFFFF | Rotation Direction | VR_CS | 1 | 1 | 1
0x00181141 | 0xFFFFFFFF | Angular Position | VR_DS | 1 | 1 | 1
0x00181142 | 0xFFFFFFFF | Radial Position | VR_DS | 1 | -1 | 1
0x00181143 | 0xFFFFFFFF | Scan Arc | VR_DS | 1 | 1 | 1
0x00181144 | 0xFFFFFFFF | Angular Step | VR_DS | 1 | 1 | 1
0x00181145 | 0xFFFFFFFF | Center of Rotation Offset | VR_DS | 1 | 1 | 1
0x00181146 | 0xFFFFFFFF | Rotation Offset (Retired) | VR_DS | 1 | -1 | 1
0x00181147 | 0xFFFFFFFF | Field of View Shape | VR_CS | 1 | 1 | 1
0x00181149 | 0xFFFFFFFF | Field of View Dimension(s) | VR_IS | 1 | 2 | 1
0x00181150 | 0xFFFFFFFF | Exposure Time | VR_IS | 1 | 1 | 1
0x00181151 | 0xFFFFFFFF | X-ray Tube Current | VR_IS | 1 | 1 | 1
0x00181152 | 0xFFFFFFFF | Exposure | VR_IS | 1 | 1 | 1
0x00181153 | 0xFFFFFFFF | Exposure in uAs | VR_IS | 1 | 1 | 1
0x00181154 | 0xFFFFFFFF | Average Pulse Width | VR_DS | 1 | 1 | 1
0x00181155 | 0xFFFFFFFF | Radiation Setting | VR_CS | 1 | 1 | 1
0x00181156 | 0xFFFFFFFF | Rectification Type | VR_CS | 1 | 1 | 1
0x0018115A | 0xFFFFFFFF | Radiation Mode | VR_CS | 1 | 1 | 1
0x0018115E | 0xFFFFFFFF | Image Area Dose Product | VR_DS | 1 | 1 | 1
0x00181160 | 0xFFFFFFFF | Filter Type | VR_SH | 1 | 1 | 1
0x00181161 | 0xFFFFFFFF | Type of Filters | VR_LO | 1 | -1 | 1
0x00181162 | 0xFFFFFFFF | Intensifier Size | VR_DS | 1 | 1 | 1
0x00181164 | 0xFFFFFFFF | Imager Pixel Spacing | VR_DS | 2 | 2 | 2
0x00181166 | 0xFFFFFFFF | Grid | VR_CS | 1 | 1 | 1
0x00181170 | 0xFFFFFFFF | Generator Power | VR_IS | 1 | 1 | 1
0x00181180 | 0xFFFFFFFF | Collimator/grid Name | VR_SH | 1 | 1 | 1
0x00181181 | 0xFFFFFFFF | Collimator Type | VR_CS | 1 | 1 | 1
0x00181182 | 0xFFFFFFFF | Focal Distance | VR_IS | 1 | 2 | 1
0x00181183 | 0xFFFFFFFF | X Focus Center | VR_DS | 1 | 2 | 1
0x00181184 | 0xFFFFFFFF | Y Focus Center | VR_DS | 1 | 2 | 1
0x00181190 | 0xFFFFFFFF | Focal Spot(s) | VR_DS | 1 | -1 | 1
0x00181191 | 0xFFFFFFFF | Anode Target Material | VR_CS | 1 | 1 | 1
0x001811A0 | 0xFFFFFFFF | Body Part Thickness | VR_DS | 1 | 1 | 1
0x001811A2 | 0xFFFFFFFF | Compression Force | VR_DS | 1 | 1 | 1
0x00181200 | 0xFFFFFFFF | Date of Last Calibration | VR_DA | 1 | -1 | 1
0x00181201 | 0xFFFFFFFF | Time of Last Calibration | VR_TM | 1 | -1 | 1
0x00181210 | 0xFFFFFFFF | Convolution Kernel | VR_SH | 1 | -1 | 1
0x00181240 | 0xFFFFFFFF | Upper/Lower Pixel Values (Retired) | VR_IS | 1 | -1 | 1
0x00181242 | 0xFFFFFFFF | Actual Frame Duration | VR_IS | 1 | 1 | 1
0x00181243 | 0xFFFFFFFF | Count Rate | VR_IS | 1 | 1 | 1
0x00181244 | 0xFFFFFFFF | Preferred Playback Sequencing | VR_US | 1 | 1 | 1
0x00181250 | 0xFFFFFFFF | Receiving Coil | VR_SH | 1 | 1 | 1
0x00181251 | 0xFFFFFFFF | Transmitting Coil | VR_SH | 1 | 1 | 1
0x00181260 | 0xFFFFFFFF | Plate Type | VR_SH | 1 | 1 | 1
0x00181261 | 0xFFFFFFFF | Phosphor Type | VR_LO | 1 | 1 | 1
0x00181300 | 0xFFFFFFFF | Scan Velocity | VR_DS | 1 | 1 | 1
0x00181301 | 0xFFFFFFFF | Whole Body Technique | VR_CS | 1 | -1 | 1
0x00181302 | 0xFFFFFFFF | Scan Length | VR_IS | 1 | 1 | 1
0x00181310 | 0xFFFFFFFF | Acquisition Matrix | VR_US | 4 | 4 | 4
0x00181312 | 0xFFFFFFFF | Phase Encoding Direction | VR_CS | 1 | 1 | 1
0x00181314 | 0xFFFFFFFF | Flip Angle | VR_DS | 1 | 1 | 1
0x00181315 | 0xFFFFFFFF | Variable Flip Angle Flag | VR_CS | 1 | 1 | 1
0x00181316 | 0xFFFFFFFF | SAR | VR_DS | 1 | 1 | 1
0x00181318 | 0xFFFFFFFF | dB/dt | VR_DS | 1 | 1 | 1
0x00181400 | 0xFFFFFFFF | Acquisition Device Processing Description | VR_LO | 1 | 1 | 1
0x00181401 | 0xFFFFFFFF | Acquisition Device Processing Code | VR_LO | 1 | 1 | 1
0x00181402 | 0xFFFFFFFF | Cassette Orientation | VR_CS | 1 | 1 | 1
0x00181403 | 0xFFFFFFFF | Cassette Size | VR_CS | 1 | 1 | 1
0x00181404 | 0xFFFFFFFF | Exposures on Plate | VR_US | 1 | 1 | 1
0x00181405 | 0xFFFFFFFF | Relative X-ray Exposure | VR_IS | 1 | 1 | 1
0x00181450 | 0xFFFFFFFF | Column Angulation | VR_CS | 1 | 1 | 1
0x00181460 | 0xFFFFFFFF | Tomo Layer Height | VR_DS | 1 | 1 | 1
0x00181470 | 0xFFFFFFFF | Tomo Angle | VR_DS | 1 | 1 | 1
0x00181480 | 0xFFFFFFFF | Tomo Time | VR_DS | 1 | 1 | 1
0x00181490 | 0xFFFFFFFF | Tomo Type | VR_CS | 1 | 1 | 1
0x00181491 | 0xFFFFFFFF | Tomo Class | VR_CS | 1 | 1 | 1
0x00181495 | 0xFFFFFFFF | Number of Tomosynthesis Source Images | VR_IS | 1 | 1 | 1
0x00181500 | 0xFFFFFFFF | Positioner Motion | VR_CS | 1 | 1 | 1
0x00181508 | 0xFFFFFFFF | Positioner Type | VR_CS | 1 | 1 | 1
0x00181510 | 0xFFFFFFFF | Positioner Primary Angle | VR_DS | 1 | 1 | 1
0x00181511 | 0xFFFFFFFF | Positioner Secondary Angle | VR_DS | 1 | 1 | 1
0x00181520 | 0xFFFFFFFF | Positioner Primary Angle Increment | VR_DS | 1 | -1 | 1
0x00181521 | 0xFFFFFFFF | Positioner Secondary Angle Increment | VR_DS | 1 | -1 | 1
0x00181530 | 0xFFFFFFFF | Detector Primary Angle | VR_DS | 1 | 1 | 1
0x00181531 | 0xFFFFFFFF | Detector Secondary Angle | VR_DS | 1 | 1 | 1
0x00181600 | 0xFFFFFFFF | Shutter Shape | VR_CS | 1 | 3 | 1
0x00181602 | 0xFFFFFFFF | Shutter Left Vertical Edge | VR_IS | 1 | 1 | 1
0x00181604 | 0xFFFFFFFF | Shutter Right Vertical Edge | VR_IS | 1 | 1 | 1
0x00181606 | 0xFFFFFFFF | Shutter Upper Horizontal Edge | VR_IS | 1 | 1 | 1
0x00181608 | 0xFFFFFFFF | Shutter Lower Horizontal Edge | VR_IS | 1 | 1 | 1
0x00181610 | 0xFFFFFFFF | Center of Circular Shutter | VR_IS | 2 | 2 | 2
0x00181612 | 0xFFFFFFFF | Radius of Circular Shutter | VR_IS | 1 | 1 | 1
0x00181620 | 0xFFFFFFFF | Vertices of the Polygonal Shutter | VR_IS | 2 | -1 | 2
0x00181700 | 0xFFFFFFFF | Collimator Shape | VR_CS | 1 | 3 | 1
0x00181702 | 0xFFFFFFFF | Collimator Left Vertical Edge | VR_IS | 1 | 1 | 1
0x00181704 | 0xFFFFFFFF | Collimator Right Vertical Edge | VR_IS | 1 | 1 | 1
0x00181706 | 0xFFFFFFFF | Collimator Upper Horizontal Edge | VR_IS | 1 | 1 | 1
0x00181708 | 0xFFFFFFFF | Collimator Lower Horizontal Edge | VR_IS | 1 | 1 | 1
0x00181710 | 0xFFFFFFFF | Center of Circular Collimator | VR_IS | 2 | 2 | 2
0x00181712 | 0xFFFFFFFF | Radius of Circular Collimator | VR_IS | 1 | 1 | 1
0x00181720 | 0xFFFFFFFF | Vertices of the Polygonal Collimator | VR_IS | 2 | -1 | 2
0x00181800 | 0xFFFFFFFF | Acquisition Time Synchronized | VR_CS | 1 | 1 | 1
0x00181801 | 0xFFFFFFFF | Time Source | VR_SH | 1 | 1 | 1
0x00181802 | 0xFFFFFFFF | Time Distribution Protocol | VR_CS | 1 | 1 | 1
0x00184000 | 0xFFFFFFFF | Comments (Retired) | VR_LT | 1 | -1 | 1
0x00185000 | 0xFFFFFFFF | Output Power | VR_SH | 1 | -1 | 1
0x00185010 | 0xFFFFFFFF | Transducer Data | VR_LO | 3 | 3 | 3
0x00185012 | 0xFFFFFFFF | Focus Depth | VR_DS | 1 | 1 | 1
0x00185020 | 0xFFFFFFFF | Processing Function | VR_LO | 1 | 1 | 1
0x00185021 | 0xFFFFFFFF | Postprocessing Function | VR_LO | 1 | 1 | 1
0x00185022 | 0xFFFFFFFF | Mechanical Index | VR_DS | 1 | 1 | 1
0x00185024 | 0xFFFFFFFF | Thermal Index | VR_DS | 1 | 1 | 1
0x00185026 | 0xFFFFFFFF | Cranial Thermal Index | VR_DS | 1 | 1 | 1
0x00185027 | 0xFFFFFFFF | Soft Tissue Thermal Index | VR_DS | 1 | 1 | 1
0x00185028 | 0xFFFFFFFF | Soft Tissue-focus Thermal Index | VR_DS | 1 | 1 | 1
0x00185029 | 0xFFFFFFFF | Soft Tissue-surface Thermal Index | VR_DS | 1 | 1 | 1
0x00185030 | 0xFFFFFFFF | Dynamic Range (Retired) | VR_DS | 1 | 1 | 1
0x00185040 | 0xFFFFFFFF | Total Gain (Retired) | VR_DS | 1 | 1 | 1
0x00185050 | 0xFFFFFFFF | Depth of Scan Field | VR_IS | 1 | 1 | 1
0x00185100 | 0xFFFFFFFF | Patient Position | VR_CS | 1 | 1 | 1
0x00185101 | 0xFFFFFFFF | View Position | VR_CS | 1 | 1 | 1
0x00185104 | 0xFFFFFFFF | Projection Eponymous Name Code Sequence | VR_SQ | 1 | 1 | 1
0x00185210 | 0xFFFFFFFF | Image Transformation Matrix | VR_DS | 6 | 6 | 6
0x00185212 | 0xFFFFFFFF | Image Translation Vector | VR_DS | 3 | 3 | 3
0x00186000 | 0xFFFFFFFF | Sensitivity | VR_DS | 1 | 1 | 1
0x00186011 | 0xFFFFFFFF | Sequence of Ultrasound Regions | VR_SQ | 1 | 1 | 1
0x00186012 | 0xFFFFFFFF | Region Spatial Format | VR_US | 1 | 1 | 1
0x00186014 | 0xFFFFFFFF | Region Data Type | VR_US | 1 | 1 | 1
0x00186016 | 0xFFFFFFFF | Region Flags | VR_UL | 1 | 1 | 1
0x00186018 | 0xFFFFFFFF | Region Location Min X 0 | VR_UL | 1 | 1 | 1
0x0018601A | 0xFFFFFFFF | Region Location Min Y 0 | VR_UL | 1 | 1 | 1
0x0018601C | 0xFFFFFFFF | Region Location Max X 1 | VR_UL | 1 | 1 | 1
0x0018601E | 0xFFFFFFFF | Region Location Max Y 1 | VR_UL | 1 | 1 | 1
0x00186020 | 0xFFFFFFFF | Reference Pixel X 0 | VR_SL | 1 | 1 | 1
0x00186022 | 0xFFFFFFFF | Reference Pixel Y 0 | VR_SL | 1 | 1 | 1
0x00186024 | 0xFFFFFFFF | Physical Units X Direction | VR_US | 1 | 1 | 1
0x00186026 | 0xFFFFFFFF | Physical Units Y Direction | VR_US | 1 | 1 | 1
0x00186028 | 0xFFFFFFFF | Reference Pixel Physical Value X | VR_FD | 1 | 1 | 1
0x0018602A | 0xFFFFFFFF | Reference Pixel Physical Value Y | VR_FD | 1 | 1 | 1
0x0018602C | 0xFFFFFFFF | Physical Delta X | VR_FD | 1 | 1 | 1
0x0018602E | 0xFFFFFFFF | Physical Delta Y | VR_FD | 1 | 1 | 1
0x00186030 | 0xFFFFFFFF | Transducer Frequency | VR_UL | 1 | 1 | 1
0x00186031 | 0xFFFFFFFF | Transducer Type | VR_CS | 1 | 1 | 1
0x00186032 | 0xFFFFFFFF | Pulse Repetition Frequency | VR_UL | 1 | 1 | 1
0x00186034 | 0xFFFFFFFF | Doppler Correction Angle | VR_FD | 1 | 1 | 1
0x00186036 | 0xFFFFFFFF | Steering Angle | VR_FD | 1 | 1 | 1
0x00186038 | 0xFFFFFFFF | Doppler Sample Volume X Position | VR_UL | 1 | 1 | 1
0x0018603A | 0xFFFFFFFF | Doppler Sample Volume Y Position | VR_UL | 1 | 1 | 1
0x0018603C | 0xFFFFFFFF | TM-Line Position X 0 | VR_UL | 1 | 1 | 1
0x0018603E | 0xFFFFFFFF | TM-Line Position Y 0 | VR_UL | 1 | 1 | 1
0x00186040 | 0xFFFFFFFF | TM-Line Position X 1 | VR_UL | 1 | 1 | 1
0x00186042 | 0xFFFFFFFF | TM-Line Position Y 1 | VR_UL | 1 | 1 | 1
0x00186044 | 0xFFFFFFFF | Pixel Component Organization | VR_US | 1 | 1 | 1
0x00186046 | 0xFFFFFFFF | Pixel Component Mask | VR_UL | 1 | 1 | 1
0x00186048 | 0xFFFFFFFF | Pixel Component Range Start | VR_UL | 1 | 1 | 1
0x0018604A | 0xFFFFFFFF | Pixel Component Range Stop | VR_UL | 1 | 1 | 1
0x0018604C | 0xFFFFFFFF | Pixel Component Physical Units | VR_US | 1 | 1 | 1
0x0018604E | 0xFFFFFFFF | Pixel Component Data Type | VR_US | 1 | 1 | 1
0x00186050 | 0xFFFFFFFF | Number of Table Break Points | VR_UL | 1 | 1 | 1
0x00186052 | 0xFFFFFFFF | Table of X Break Points | VR_UL | 1 | -1 | 1
0x00186054 | 0xFFFFFFFF | Table of Y Break Points | VR_FD | 1 | -1 | 1
0x00186056 | 0xFFFFFFFF | Number of Table Entries | VR_UL | 1 | 1 | 1
0x00186058 | 0xFFFFFFFF | Table of Pixel Values | VR_UL | 1 | -1 | 1
0x0018605A | 0xFFFFFFFF | Table of Parameter Values | VR_FL | 1 | -1 | 1
0x00187000 | 0xFFFFFFFF | Detector Conditions Nominal Flag | VR_CS | 1 | 1 | 1
0x00187001 | 0xFFFFFFFF | Detector Temperature | VR_DS | 1 | 1 | 1
0x00187004 | 0xFFFFFFFF | Detector Type | VR_CS | 1 | 1 | 1
0x00187005 | 0xFFFFFFFF | Detector Configuration | VR_CS | 1 | 1 | 1
0x00187006 | 0xFFFFFFFF | Detector Description | VR_LT | 1 | 1 | 1
0x00187008 | 0xFFFFFFFF | Detector Mode | VR_LT | 1 | 1 | 1
0x0018700A | 0xFFFFFFFF | Detector ID | VR_SH | 1 | 1 | 1
0x0018700C | 0xFFFFFFFF | Date of Last Detector Calibration | VR_DA | 1 | 1 | 1
0x0018700E | 0xFFFFFFFF | Time of Last Detector Calibration | VR_TM | 1 | 1 | 1
0x00187010 | 0xFFFFFFFF | Exposures on Detector Since Last Calibration | VR_IS | 1 | 1 | 1
0x00187011 | 0xFFFFFFFF | Exposures on Detector Since Manufactured | VR_IS | 1 | 1 | 1
0x00187012 | 0xFFFFFFFF | Detector Time Since Last Exposure | VR_DS | 1 | 1 | 1
0x00187014 | 0xFFFFFFFF | Detector Active Time | VR_DS | 1 | 1 | 1
0x00187016 | 0xFFFFFFFF | Detector Activation Offset From Exposure | VR_DS | 1 | 1 | 1
0x0018701A | 0xFFFFFFFF | Detector Binning | VR_DS | 2 | 2 | 2
0x00187020 | 0xFFFFFFFF | Detector Element Physical Size | VR_DS | 2 | 2 | 2
0x00187022 | 0xFFFFFFFF | Detector Element Spacing | VR_DS | 2 | 2 | 2
0x00187024 | 0xFFFFFFFF | Detector Active Shape | VR_CS | 1 | 1 | 1
0x00187026 | 0xFFFFFFFF | Detector Active Dimensions | VR_DS | 1 | 2 | 1
0x00187028 | 0xFFFFFFFF | Detector Active Origin | VR_DS | 2 | 2 | 2
0x00187030 | 0xFFFFFFFF | Field of View Origin | VR_DS | 2 | 2 | 2
0x00187032 | 0xFFFFFFFF | Field of View Rotation | VR_DS | 1 | 1 | 1
0x00187034 | 0xFFFFFFFF | Field of View Horizontal Flip | VR_CS | 1 | 1 | 1
0x00187040 | 0xFFFFFFFF | Grid Absorbing Material | VR_LT | 1 | 1 | 1
0x00187041 | 0xFFFFFFFF | Grid Spacing Material | VR_LT | 1 | 1 | 1
0x00187042 | 0xFFFFFFFF | Grid Thickness | VR_DS | 1 | 1 | 1
0x00187044 | 0xFFFFFFFF | Grid Pitch | VR_DS | 1 | 1 | 1
0x00187046 | 0xFFFFFFFF | Grid Aspect Ratio | VR_IS | 2 | 2 | 2
0x00187048 | 0xFFFFFFFF | Grid Period | VR_DS | 1 | 1 | 1
0x0018704C | 0xFFFFFFFF | Grid Focal Distance | VR_DS | 1 | 1 | 1
0x00187050 | 0xFFFFFFFF | Filter Material | VR_LT | 1 | -1 | 1
0x00187052 | 0xFFFFFFFF | Filter Thickness Minimum | VR_DS | 1 | -1 | 1
0x00187054 | 0xFFFFFFFF | Filter Thickness Maximum | VR_DS | 1 | -1 | 1
0x00187060 | 0xFFFFFFFF | Exposure Control Mode | VR_CS | 1 | 1 | 1
0x00187062 | 0xFFFFFFFF | Exposure Control Mode Description | VR_LT | 1 | 1 | 1
0x00187064 | 0xFFFFFFFF | Exposure Status | VR_CS | 1 | 1 | 1
0x00187065 | 0xFFFFFFFF | Phototimer Setting | VR_DS | 1 | 1 | 1
0x0020000D | 0xFFFFFFFF | Study Instance UID | VR_UI | 1 | 1 | 1
0x0020000E | 0xFFFFFFFF | Series Instance UID | VR_UI | 1 | 1 | 1
0x00200010 | 0xFFFFFFFF | Study ID | VR_SH | 1 | 1 | 1
0x00200011 | 0xFFFFFFFF | Series Number | VR_IS | 1 | 1 | 1
0x00200012 | 0xFFFFFFFF | Acquisition Number | VR_IS | 1 | 1 | 1
0x00200013 | 0xFFFFFFFF | Instance Number | VR_IS | 1 | 1 | 1
0x00200014 | 0xFFFFFFFF | Isotope Number (Retired) | VR_IS | 1 | 1 | 1
0x00200015 | 0xFFFFFFFF | Phase Number (Retired) | VR_IS | 1 | 1 | 1
0x00200016 | 0xFFFFFFFF | Interval Number (Retired) | VR_IS | 1 | 1 | 1
0x00200017 | 0xFFFFFFFF | Time Slot Number (Retired) | VR_IS | 1 | 1 | 1
0x00200018 | 0xFFFFFFFF | Angle Number (Retired) | VR_IS | 1 | 1 | 1
0x00200019 | 0xFFFFFFFF | Item Number | VR_IS | 1 | 1 | 1
0x00200020 | 0xFFFFFFFF | Patient Orientation | VR_CS | 2 | 2 | 2
0x00200022 | 0xFFFFFFFF | Overlay Number | VR_IS | 1 | 1 | 1
0x00200024 | 0xFFFFFFFF | Curve Number | VR_IS | 1 | 1 | 1
0x00200026 | 0xFFFFFFFF | Lookup Table Number | VR_IS | 1 | 1 | 1
0x00200030 | 0xFFFFFFFF | Image Position (Retired) | VR_DS | 3 | 3 | 3
0x00200032 | 0xFFFFFFFF | Image Position (Patient) | VR_DS | 3 | 3 | 3
0x00200035 | 0xFFFFFFFF | Image Orientation (Retired) | VR_DS | 6 | 6 | 6
0x00200037 | 0xFFFFFFFF | Image Orientation (Patient) | VR_DS | 6 | 6 | 6
0x00200050 | 0xFFFFFFFF | Location (Retired) | VR_DS | 1 | 1 | 1
0x00200052 | 0xFFFFFFFF | Frame of Reference UID | VR_UI | 1 | 1 | 1
0x00200060 | 0xFFFFFFFF | Laterality | VR_CS | 1 | 1 | 1
0x00200062 | 0xFFFFFFFF | Image Laterality | VR_CS | 1 | 1 | 1
0x00200070 | 0xFFFFFFFF | Image Geometry Type (Retired) | VR_LT | 1 | 1 | 1
0x00200080 | 0xFFFFFFFF | Masking Image (Retired) | VR_LO | 1 | -1 | 1
0x00200100 | 0xFFFFFFFF | Temporal Position Identifier | VR_IS | 1 | 1 | 1
0x00200105 | 0xFFFFFFFF | Number of Temporal Positions | VR_IS | 1 | 1 | 1
0x00200110 | 0xFFFFFFFF | Temporal Resolution | VR_DS | 1 | 1 | 1
0x00201000 | 0xFFFFFFFF | Series in Study | VR_IS | 1 | 1 | 1
0x00201001 | 0xFFFFFFFF | Acquisitions in Series (Retired) | VR_IS | 1 | 1 | 1
0x00201002 | 0xFFFFFFFF | Images in Acquisition | VR_IS | 1 | 1 | 1
0x00201003 | 0xFFFFFFFF | Images in Series | VR_IS | 1 | 1 | 1
0x00201004 | 0xFFFFFFFF | Acquisitions in Study | VR_IS | 1 | 1 | 1
0x00201005 | 0xFFFFFFFF | Images in Study | VR_IS | 1 | 1 | 1
0x00201020 | 0xFFFFFFFF | Reference (Retired) | VR_LO | 1 | -1 | 1
0x00201040 | 0xFFFFFFFF | Position Reference Indicator | VR_LO | 1 | 1 | 1
0x00201041 | 0xFFFFFFFF | Slice Location | VR_DS | 1 | 1 | 1
0x00201070 | 0xFFFFFFFF | Other Study Numbers | VR_IS | 1 | -1 | 1
0x00201200 | 0xFFFFFFFF | Number of Patient Related Studies | VR_IS | 1 | 1 | 1
0x00201202 | 0xFFFFFFFF | Number of Patient Related Series | VR_IS | 1 | 1 | 1
0x00201204 | 0xFFFFFFFF | Number of Patient Related Instances | VR_IS | 1 | 1 | 1
0x00201206 | 0xFFFFFFFF | Number of Study Related Series | VR_IS | 1 | 1 | 1
0x00201208 | 0xFFFFFFFF | Number of Study Related Instances | VR_IS | 1 | 1 | 1
0x00201209 | 0xFFFFFFFF | Number of Series Related Instances | VR_IS | 1 | 1 | 1
0x00203100 | 0xFFFFFF00 | Source Image IDs (Retired) | VR_LO | 1 | -1 | 1
0x00203401 | 0xFFFFFFFF | Modifying Device ID (Retired) | VR_LO | 1 | 1 | 1
0x00203402 | 0xFFFFFFFF | Modified Image ID (Retired) | VR_LO | 1 | 1 | 1
0x00203403 | 0xFFFFFFFF | Modified Image Date (Retired) | VR_DA | 1 | 1 | 1
0x00203404 | 0xFFFFFFFF | Modifying Device Manufacturer (Retired) | VR_LO | 1 | 1 | 1
0x00203405 | 0xFFFFFFFF | Modified Image Time (Retired) | VR_TM | 1 | 1 | 1
0x00203406 | 0xFFFFFFFF | Modified Image Description (Retired) | VR_LT | 1 | 1 | 1
0x00204000 | 0xFFFFFFFF | Image Comments | VR_LT | 1 | 1 | 1
0x00205000 | 0xFFFFFFFF | Original Image Identification (Retired) | VR_AT | 1 | -1 | 1
0x00205002 | 0xFFFFFFFF | Original Image Identification Nomenclature (Retired) | VR_LO | 1 | -1 | 1
0x00280002 | 0xFFFFFFFF | Samples per Pixel | VR_US | 1 | 1 | 1
0x00280004 | 0xFFFFFFFF | Photometric Interpretation | VR_CS | 1 | 1 | 1
0x00280005 | 0xFFFFFFFF | Image Dimensions (Retired) | VR_US | 1 | 1 | 1
0x00280006 | 0xFFFFFFFF | Planar Configuration | VR_US | 1 | 1 | 1
0x00280008 | 0xFFFFFFFF | Number of Frames | VR_IS | 1 | 1 | 1
0x00280009 | 0xFFFFFFFF | Frame Increment Pointer | VR_AT | 1 | -1 | 1
0x00280010 | 0xFFFFFFFF | Rows | VR_US | 1 | 1 | 1
0x00280011 | 0xFFFFFFFF | Columns | VR_US | 1 | 1 | 1
0x00280012 | 0xFFFFFFFF | Planes | VR_US | 1 | 1 | 1
0x00280014 | 0xFFFFFFFF | Ultrasound Color Data Present | VR_US | 1 | 1 | 1
0x00280030 | 0xFFFFFFFF | Pixel Spacing | VR_DS | 2 | 2 | 2
0x00280031 | 0xFFFFFFFF | Zoom Factor | VR_DS | 2 | 2 | 2
0x00280032 | 0xFFFFFFFF | Zoom Center | VR_DS | 2 | 2 | 2
0x00280034 | 0xFFFFFFFF | Pixel Aspect Ratio | VR_IS | 2 | 2 | 2
0x00280040 | 0xFFFFFFFF | Image Format (Retired) | VR_LO | 1 | 1 | 1
0x00280050 | 0xFFFFFFFF | Manipulated Image (Retired) | VR_LT | 1 | -1 | 1
0x00280051 | 0xFFFFFFFF | Corrected Image | VR_CS | 1 | -1 | 1
0x0028005F | 0xFFFFFFFF | Compression Recognition Code | VR_LO | 1 | 1 | 1
0x00280060 | 0xFFFFFFFF | Compression Code (Retired) | VR_LO | 1 | 1 | 1
0x00280061 | 0xFFFFFFFF | Compression Originator | VR_SH | 1 | 1 | 1
0x00280062 | 0xFFFFFFFF | Compression Label | VR_SH | 1 | 1 | 1
0x00280063 | 0xFFFFFFFF | Compression Description | VR_SH | 1 | 1 | 1
0x00280065 | 0xFFFFFFFF | Compression Sequence | VR_LO | 1 | -1 | 1
0x00280066 | 0xFFFFFFFF | Compression Step Pointers | VR_AT | 1 | -1 | 1
0x00280068 | 0xFFFFFFFF | Repeat Interval | VR_US | 1 | 1 | 1
0x00280069 | 0xFFFFFFFF | Bits Grouped | VR_US | 1 | 1 | 1
0x00280070 | 0xFFFFFFFF | Perimeter Table | VR_US | 1 | -1 | 1
0x00280071 | 0xFFFFFFFF | Perimeter Value | VR_US | 1 | 1 | 1
0x00280080 | 0xFFFFFFFF | Predictor Rows | VR_US | 1 | 1 | 1
0x00280081 | 0xFFFFFFFF | Predictor Columns | VR_US | 1 | 1 | 1
0x00280082 | 0xFFFFFFFF | Predictor Constants | VR_US | 1 | -1 | 1
0x00280090 | 0xFFFFFFFF | Blocked Pixels | VR_LO | 1 | 1 | 1
0x00280091 | 0xFFFFFFFF | Block Rows | VR_US | 1 | 1 | 1
0x00280092 | 0xFFFFFFFF | Block Columns | VR_US | 1 | 1 | 1
0x00280093 | 0xFFFFFFFF | Row Overlap | VR_US | 1 | 1 | 1
0x00280094 | 0xFFFFFFFF | Column Overlap | VR_US | 1 | 1 | 1
0x00280100 | 0xFFFFFFFF | Bits Allocated | VR_US | 1 | 1 | 1
0x00280101 | 0xFFFFFFFF | Bits Stored | VR_US | 1 | 1 | 1
0x00280102 | 0xFFFFFFFF | High Bit | VR_US | 1 | 1 | 1
0x00280103 | 0xFFFFFFFF | Pixel Representation | VR_US | 1 | 1 | 1
0x00280104 | 0xFFFFFFFF | Smallest Valid Pixel Value (Retired) | VR_US | 1 | 1 | 1
0x00280105 | 0xFFFFFFFF | Largest Valid Pixel Value (Retired) | VR_US | 1 | 1 | 1
0x00280106 | 0xFFFFFFFF | Smallest Image Pixel Value | VR_US | 1 | 1 | 1
0x00280107 | 0xFFFFFFFF | Largest Image Pixel Value | VR_US | 1 | 1 | 1
0x00280108 | 0xFFFFFFFF | Smallest Pixel Value in Series | VR_US | 1 | 1 | 1
0x00280109 | 0xFFFFFFFF | Largest Pixel Value in Series | VR_US | 1 | 1 | 1
0x00280110 | 0xFFFFFFFF | Smallest Image Pixel Value in Plane | VR_US | 1 | 1 | 1
0x00280111 | 0xFFFFFFFF | Largest Image Pixel Value in Plane | VR_US | 1 | 1 | 1
0x00280120 | 0xFFFFFFFF | Pixel Padding Value | VR_US | 1 | 1 | 1
0x00280200 | 0xFFFFFFFF | Image Location (Retired) | VR_US | 1 | 1 | 1
0x00280300 | 0xFFFFFFFF | Quality Control Image | VR_CS | 1 | 1 | 1
0x00280301 | 0xFFFFFFFF | Burned In Annotation | VR_CS | 1 | 1 | 1
0x00280400 | 0xFFFFFF0F | Rows For Nth Order Coefficients | VR_US | 1 | 1 | 1
0x00280401 | 0xFFFFFF0F | Columns For Nth Order Coefficients | VR_US | 1 | 1 | 1
0x00280402 | 0xFFFFFF0F | CoefficientCoding | VR_LO | 1 | -1 | 1
0x00280403 | 0xFFFFFF0F | Coefficient Coding Pointers | VR_AT | 1 | -1 | 1
0x00280404 | 0xFFFFFFFF | Details of Coefficients | VR_AT | 1 | -1 | 1
0x00280700 | 0xFFFFFFFF | DCT Label | VR_LO | 1 | 1 | 1
0x00280701 | 0xFFFFFFFF | Data Block Description | VR_LO | 1 | -1 | 1
0x00280702 | 0xFFFFFFFF | Data Block | VR_AT | 1 | -1 | 1
0x00280710 | 0xFFFFFFFF | Normalization Factor Format | VR_US | 1 | 1 | 1
0x00280720 | 0xFFFFFFFF | Zonal Map Number Format | VR_US | 1 | 1 | 1
0x00280721 | 0xFFFFFFFF | Zonal Map Location | VR_AT | 1 | -1 | 1
0x00280722 | 0xFFFFFFFF | Zonal Map Format | VR_US | 1 | 1 | 1
0x00280730 | 0xFFFFFFFF | Adaptive Map Format | VR_US | 1 | 1 | 1
0x00280740 | 0xFFFFFFFF | Code Number Format | VR_US | 1 | 1 | 1
0x00280800 | 0xFFFFFF0F | Code Label | VR_LO | 1 | -1 | 1
0x00280802 | 0xFFFFFF0F | Number of Tables | VR_US | 1 | 1 | 1
0x00280803 | 0xFFFFFF0F | Code Table Location | VR_AT | 1 | -1 | 1
0x00280804 | 0xFFFFFF0F | Bits For Code Word | VR_US | 1 | 1 | 1
0x00280808 | 0xFFFFFF0F | Image Data Location | VR_AT | 1 | -1 | 1
0x00281040 | 0xFFFFFFFF | Pixel Intensity Relationship | VR_CS | 1 | 1 | 1
0x00281041 | 0xFFFFFFFF | Pixel Intensity Relationship Sign | VR_SS | 1 | 1 | 1
0x00281050 | 0xFFFFFFFF | Window Center | VR_DS | 1 | -1 | 1
0x00281051 | 0xFFFFFFFF | Window Width | VR_DS | 1 | -1 | 1
0x00281052 | 0xFFFFFFFF | Rescale Intercept | VR_DS | 1 | 1 | 1
0x00281053 | 0xFFFFFFFF | Rescale Slope | VR_DS | 1 | 1 | 1
0x00281054 | 0xFFFFFFFF | Rescale Type | VR_LO | 1 | 1 | 1
0x00281055 | 0xFFFFFFFF | Window Center & Width Explanation | VR_LO | 1 | -1 | 1
0x00281080 | 0xFFFFFFFF | Gray Scale (Retired) | VR_LO | 1 | 1 | 1
0x00281090 | 0xFFFFFFFF | Recommended Viewing Mode | VR_CS | 1 | 1 | 1
0x00281100 | 0xFFFFFFFF | Gray Lookup Table Descriptor (Retired) | VR_US | 3 | 3 | 3
0x00281101 | 0xFFFFFFFF | Red Palette Color Lookup Table Descriptor | VR_US | 3 | 3 | 3
0x00281102 | 0xFFFFFFFF | Green Palette Color Lookup Table Descriptor | VR_US | 3 | 3 | 3
0x00281103 | 0xFFFFFFFF | Blue Palette Color Lookup Table Descriptor | VR_US | 3 | 3 | 3
0x00281111 | 0xFFFFFFFF | Large Red Palette Color Lookup Table Descriptor | VR_US | 4 | 4 | 4
0x00281112 | 0xFFFFFFFF | Large Green Palette Color Lookup Table Descriptor | VR_US | 4 | 4 | 4
0x00281113 | 0xFFFFFFFF | Large Blue Palette Color Lookup Table Descriptor | VR_US | 4 | 4 | 4
0x00281199 | 0xFFFFFFFF | Palette Color Lookup Table UID | VR_UI | 1 | 1 | 1
0x00281200 | 0xFFFFFFFF | Gray Lookup Table Data (Retired) | VR_US | 1 | -1 | 1
0x00281201 | 0xFFFFFFFF | Red Palette Color Lookup Table Data | VR_OW | 1 | -1 | 1
0x00281202 | 0xFFFFFFFF | Green Palette Color Lookup Table Data | VR_OW | 1 | -1 | 1
0x00281203 | 0xFFFFFFFF | Blue Palette Color Lookup Table Data | VR_OW | 1 | -1 | 1
0x00281211 | 0xFFFFFFFF | Large Red Palette Color Lookup Table Data | VR_OW | 1 | 1 | 1
0x00281212 | 0xFFFFFFFF | Large Green Palette Color Lookup Table Data | VR_OW | 1 | 1 | 1
0x00281213 | 0xFFFFFFFF | Large Blue Palette Color Lookup Table Data | VR_OW | 1 | 1 | 1
0x00281214 | 0xFFFFFFFF | Large Palette Color Lookup Table UID | VR_UI | 1 | 1 | 1
0x00281221 | 0xFFFFFFFF | Segmented Red Palette Color Lookup Table Data | VR_OW | 1 | 1 | 1
0x00281222 | 0xFFFFFFFF | Segmented Green Palette Color Lookup Table Data | VR_OW | 1 | 1 | 1
0x00281223 | 0xFFFFFFFF | Segmented Blue Palette Color Lookup Table Data | VR_OW | 1 | 1 | 1
0x00281300 | 0xFFFFFFFF | Implant Present | VR_CS | 1 | 1 | 1
0x00282110 | 0xFFFFFFFF | Lossy Image Compression | VR_CS | 1 | 1 | 1
0x00282112 | 0xFFFFFFFF | Lossy Image Compression Ratio | VR_DS | 1 | -1 | 1
0x00283000 | 0xFFFFFFFF | Modality LUT Sequence | VR_SQ | 1 | 1 | 1
0x00283002 | 0xFFFFFFFF | LUT Descriptor | VR_US | 3 | 3 | 3
0x00283003 | 0xFFFFFFFF | LUT Explanation | VR_LO | 1 | 1 | 1
0x00283004 | 0xFFFFFFFF | Modality LUT Type | VR_LO | 1 | 1 | 1
0x00283006 | 0xFFFFFFFF | LUT Data | VR_US | 1 | -1 | 1
0x00283010 | 0xFFFFFFFF | VOI LUT Sequence | VR_SQ | 1 | 1 | 1
0x00284000 | 0xFFFFFFFF | Comments (Retired) | VR_LT | 1 | -1 | 1
0x00285000 | 0xFFFFFFFF | Bi-Plane Acquisition Sequence | VR_SQ | 1 | 1 | 1
0x00286010 | 0xFFFFFFFF | Representative Frame Number | VR_US | 1 | 1 | 1
0x00286020 | 0xFFFFFFFF | Frame Numbers of Interest (FOI) | VR_US | 1 | -1 | 1
0x00286022 | 0xFFFFFFFF | Frame(s) of Interest Description | VR_LO | 1 | -1 | 1
0x00286030 | 0xFFFFFFFF | Mask Pointer(s) | VR_US | 1 | -1 | 1
0x00286040 | 0xFFFFFFFF | R Wave Pointer | VR_US | 1 | -1 | 1
0x00286100 | 0xFFFFFFFF | Mask Subtraction Sequence | VR_SQ | 1 | 1 | 1
0x00286101 | 0xFFFFFFFF | Mask Operation | VR_CS | 1 | 1 | 1
0x00286102 | 0xFFFFFFFF | Applicable Frame Range | VR_US | 2 | -1 | 2
0x00286110 | 0xFFFFFFFF | Mask Frame Numbers | VR_US | 1 | -1 | 1
0x00286112 | 0xFFFFFFFF | Contrast Frame Averaging | VR_US | 1 | 1 | 1
0x00286114 | 0xFFFFFFFF | Mask Sub-pixel Shift | VR_FL | 2 | 2 | 2
0x00286120 | 0xFFFFFFFF | TID Offset | VR_SS | 1 | 1 | 1
0x00286190 | 0xFFFFFFFF | Mask Operation Explanation | VR_ST | 1 | 1 | 1
0x0032000A | 0xFFFFFFFF | Study Status ID | VR_CS | 1 | 1 | 1
0x0032000C | 0xFFFFFFFF | Study Priority ID | VR_CS | 1 | 1 | 1
0x00320012 | 0xFFFFFFFF | Study ID Issuer | VR_LO | 1 | 1 | 1
0x00320032 | 0xFFFFFFFF | Study Verified Date | VR_DA | 1 | 1 | 1
0x00320033 | 0xFFFFFFFF | Study Verified Time | VR_TM | 1 | 1 | 1
0x00320034 | 0xFFFFFFFF | Study Read Date | VR_DA | 1 | 1 | 1
0x00320035 | 0xFFFFFFFF | Study Read Time | VR_TM | 1 | 1 | 1
0x00321000 | 0xFFFFFFFF | Scheduled Study Start Date | VR_DA | 1 | 1 | 1
0x00321001 | 0xFFFFFFFF | Scheduled Study Start Time | VR_TM | 1 | 1 | 1
0x00321010 | 0xFFFFFFFF | Scheduled Study Stop Date | VR_DA | 1 | 1 | 1
0x00321011 | 0xFFFFFFFF | Scheduled Study Stop Time | VR_TM | 1 | 1 | 1
0x00321020 | 0xFFFFFFFF | Scheduled Study Location | VR_LO | 1 | 1 | 1
0x00321021 | 0xFFFFFFFF | Scheduled Study Location AE Title(s) | VR_AE | 1 | -1 | 1
0x00321030 | 0xFFFFFFFF | Reason for Study | VR_LO | 1 | 1 | 1
0x00321032 | 0xFFFFFFFF | Requesting Physician | VR_PN | 1 | 1 | 1
0x00321033 | 0xFFFFFFFF | Requesting Service | VR_LO | 1 | 1 | 1
0x00321040 | 0xFFFFFFFF | Study Arrival Date | VR_DA | 1 | 1 | 1
0x00321041 | 0xFFFFFFFF | Study Arrival Time | VR_TM | 1 | 1 | 1
0x00321050 | 0xFFFFFFFF | Study Completion Date | VR_DA | 1 | 1 | 1
0x00321051 | 0xFFFFFFFF | Study Completion Time | VR_TM | 1 | 1 | 1
0x00321055 | 0xFFFFFFFF | Study Component Status ID | VR_CS | 1 | 1 | 1
0x00321060 | 0xFFFFFFFF | Requested Procedure Description | VR_LO | 1 | 1 | 1
0x00321064 | 0xFFFFFFFF | Requested Procedure Code Sequence | VR_SQ | 1 | 1 | 1
0x00321070 | 0xFFFFFFFF | Requested Contrast Agent | VR_LO | 1 | 1 | 1
0x00324000 | 0xFFFFFFFF | Study Comments | VR_LT | 1 | 1 | 1
0x00380004 | 0xFFFFFFFF | Referenced Patient Alias Sequence | VR_SQ | 1 | 1 | 1
0x00380008 | 0xFFFFFFFF | Visit Status ID | VR_CS | 1 | 1 | 1
0x00380010 | 0xFFFFFFFF | Admission ID | VR_LO | 1 | 1 | 1
0x00380011 | 0xFFFFFFFF | Issuer of Admission ID | VR_LO | 1 | 1 | 1
0x00380016 | 0xFFFFFFFF | Route of Admissions | VR_LO | 1 | 1 | 1
0x0038001A | 0xFFFFFFFF | Scheduled Admission Date | VR_DA | 1 | 1 | 1
0x0038001B | 0xFFFFFFFF | Scheduled Admission Time | VR_TM | 1 | 1 | 1
0x0038001C | 0xFFFFFFFF | Scheduled Discharge Date | VR_DA | 1 | 1 | 1
0x0038001D | 0xFFFFFFFF | Scheduled Discharge Time | VR_TM | 1 | 1 | 1
0x0038001E | 0xFFFFFFFF | Scheduled Patient Institution Residence | VR_LO | 1 | 1 | 1
0x00380020 | 0xFFFFFFFF | Admitting Date | VR_DA | 1 | 1 | 1
0x00380021 | 0xFFFFFFFF | Admitting Time | VR_TM | 1 | 1 | 1
0x00380030 | 0xFFFFFFFF | Discharge Date | VR_DA | 1 | 1 | 1
0x00380032 | 0xFFFFFFFF | Discharge Time | VR_TM | 1 | 1 | 1
0x00380040 | 0xFFFFFFFF | Discharge Diagnosis Description | VR_LO | 1 | 1 | 1
0x00380044 | 0xFFFFFFFF | Discharge Diagnosis Code Sequence | VR_SQ | 1 | 1 | 1
0x00380050 | 0xFFFFFFFF | Special Needs | VR_LO | 1 | 1 | 1
0x00380300 | 0xFFFFFFFF | Current Patient Location | VR_LO | 1 | 1 | 1
0x00380400 | 0xFFFFFFFF | Patient's Institution Residence | VR_LO | 1 | 1 | 1
0x00380500 | 0xFFFFFFFF | Patient State | VR_LO | 1 | 1 | 1
0x00384000 | 0xFFFFFFFF | Visit Comments | VR_LT | 1 | 1 | 1
0x003A0002 | 0xFFFFFFFF | Waveform Sequence | VR_SQ | 1 | 1 | 1
0x003A0005 | 0xFFFFFFFF | Waveform Number of Channels | VR_US | 1 | 1 | 1
0x003A0010 | 0xFFFFFFFF | Waveform Number of Samples | VR_UL | 1 | 1 | 1
0x003A001A | 0xFFFFFFFF | Sampling Frequency | VR_DS | 1 | 2 | 1
0x003A0020 | 0xFFFFFFFF | Group Label | VR_SH | 1 | 1 | 1
0x003A0103 | 0xFFFFFFFF | Waveform Sample Value Representation | VR_CS | 1 | 1 | 1
0x003A0122 | 0xFFFFFFFF | Waveform Padding Value | VR_OB | 1 | 1 | 1
0x003A0200 | 0xFFFFFFFF | Channel Definition | VR_SQ | 1 | 1 | 1
0x003A0202 | 0xFFFFFFFF | Waveform Channel Number | VR_IS | 1 | 1 | 1
0x003A0203 | 0xFFFFFFFF | Channel Label | VR_SH | 1 | 1 | 1
0x003A0205 | 0xFFFFFFFF | Channel Status | VR_CS | 1 | -1 | 1
0x003A0208 | 0xFFFFFFFF | Channel Source | VR_SQ | 1 | 1 | 1
0x003A0209 | 0xFFFFFFFF | Channel Source Modifiers | VR_SQ | 1 | 1 | 1
0x003A020A | 0xFFFFFFFF | Differential Channel Source | VR_SQ | 1 | 1 | 1
0x003A020B | 0xFFFFFFFF | Differential Channel Source Modifiers | VR_SQ | 1 | 1 | 1
0x003A0210 | 0xFFFFFFFF | Channel Sensitivity | VR_DS | 1 | 1 | 1
0x003A0211 | 0xFFFFFFFF | Channel Sensitivity Units | VR_SQ | 1 | 1 | 1
0x003A0212 | 0xFFFFFFFF | Channel Sensitivity Correction Factor | VR_DS | 1 | 1 | 1
0x003A0213 | 0xFFFFFFFF | Channel Baseline | VR_DS | 1 | 1 | 1
0x003A0214 | 0xFFFFFFFF | Channel Time Skew | VR_DS | 1 | 1 | 1
0x003A0215 | 0xFFFFFFFF | Channel Sample Skew | VR_DS | 1 | 1 | 1
0x003A0216 | 0xFFFFFFFF | Channel Minimum Value | VR_OB | 1 | 1 | 1
0x003A0217 | 0xFFFFFFFF | Channel Maximum Value | VR_OB | 1 | 1 | 1
0x003A0218 | 0xFFFFFFFF | Channel Offset | VR_DS | 1 | 1 | 1
0x003A021A | 0xFFFFFFFF | Bits Per Sample | VR_US | 1 | 1 | 1
0x003A0220 | 0xFFFFFFFF | Filter Low Frequency | VR_DS | 1 | 1 | 1
0x003A0221 | 0xFFFFFFFF | Filter High Frequency | VR_DS | 1 | 1 | 1
0x003A0222 | 0xFFFFFFFF | Notch Filter Frequency | VR_DS | 1 | 1 | 1
0x003A0223 | 0xFFFFFFFF | Notch Filter Bandwidth | VR_DS | 1 | 1 | 1
0x003A1000 | 0xFFFFFFFF | Waveform Data | VR_OB | 1 | 1 | 1
0x00400001 | 0xFFFFFFFF | Scheduled Station AE Title | VR_AE | 1 | -1 | 1
0x00400002 | 0xFFFFFFFF | Scheduled Procedure Step Start Date | VR_DA | 1 | 1 | 1
0x00400003 | 0xFFFFFFFF | Scheduled Procedure Step Start Time | VR_TM | 1 | 1 | 1
0x00400004 | 0xFFFFFFFF | Scheduled Procedure Step End Date | VR_DA | 1 | 1 | 1
0x00400005 | 0xFFFFFFFF | Scheduled Procedure Step End Time | VR_TM | 1 | 1 | 1
0x00400006 | 0xFFFFFFFF | Scheduled Performing Physician's Name | VR_PN | 1 | 1 | 1
0x00400007 | 0xFFFFFFFF | Scheduled Procedure Step Description | VR_LO | 1 | 1 | 1
0x00400008 | 0xFFFFFFFF | Scheduled Action Item Code Sequence | VR_SQ | 1 | 1 | 1
0x00400009 | 0xFFFFFFFF | Scheduled Procedure Step ID | VR_SH | 1 | 1 | 1
0x00400010 | 0xFFFFFFFF | Scheduled Station Name | VR_SH | 1 | -1 | 1
0x00400011 | 0xFFFFFFFF | Scheduled Procedure Step Location | VR_SH | 1 | 1 | 1
0x00400012 | 0xFFFFFFFF | Pre-Medication | VR_LO | 1 | 1 | 1
0x00400020 | 0xFFFFFFFF | Scheduled Procedure Step Status | VR_CS | 1 | 1 | 1
0x00400100 | 0xFFFFFFFF | Scheduled Procedure Step Sequence | VR_SQ | 1 | 1 | 1
0x00400220 | 0xFFFFFFFF | Referenced Standalone SOP Instance Sequence | VR_SQ | 1 | 1 | 1
0x00400241 | 0xFFFFFFFF | Performed Station AE Title | VR_AE | 1 | 1 | 1
0x00400242 | 0xFFFFFFFF | Performed Station Name | VR_SH | 1 | 1 | 1
0x00400243 | 0xFFFFFFFF | Performed Location | VR_SH | 1 | 1 | 1
0x00400244 | 0xFFFFFFFF | Performed Procedure Step Start Date | VR_DA | 1 | 1 | 1
0x00400245 | 0xFFFFFFFF | Performed Procedure Step Start Time | VR_TM | 1 | 1 | 1
0x00400250 | 0xFFFFFFFF | Performed Procedure Step End Date | VR_DA | 1 | 1 | 1
0x00400251 | 0xFFFFFFFF | Performed Procedure Step End Time | VR_TM | 1 | 1 | 1
0x00400252 | 0xFFFFFFFF | Performed Procedure Step Status | VR_CS | 1 | 1 | 1
0x00400253 | 0xFFFFFFFF | Performed Procedure Step ID | VR_CS | 1 | 1 | 1
0x00400254 | 0xFFFFFFFF | Performed Procedure Step Description | VR_LO | 1 | 1 | 1
0x00400255 | 0xFFFFFFFF | Performed Procedure Type Description | VR_LO | 1 | 1 | 1
0x00400260 | 0xFFFFFFFF | Performed Action Item Sequence | VR_SQ | 1 | 1 | 1
0x00400270 | 0xFFFFFFFF | Scheduled Step Attributes Sequence | VR_SQ | 1 | 1 | 1
0x00400275 | 0xFFFFFFFF | Request Attributes Sequence | VR_SQ | 1 | 1 | 1
0x00400280 | 0xFFFFFFFF | Comments on the Performed Procedure Steps | VR_ST | 1 | 1 | 1
0x00400293 | 0xFFFFFFFF | Quantity Sequence | VR_SQ | 1 | 1 | 1
0x00400294 | 0xFFFFFFFF | Quantity | VR_DS | 1 | 1 | 1
0x00400295 | 0xFFFFFFFF | Measuring Units Sequence | VR_SQ | 1 | 1 | 1
0x00400296 | 0xFFFFFFFF | Billing Item Sequence | VR_SQ | 1 | 1 | 1
0x00400300 | 0xFFFFFFFF | Total Time of Fluoroscopy | VR_US | 1 | 1 | 1
0x00400301 | 0xFFFFFFFF | Total Number of Exposures | VR_US | 1 | 1 | 1
0x00400302 | 0xFFFFFFFF | Entrance Dose | VR_US | 1 | 1 | 1
0x00400303 | 0xFFFFFFFF | Exposed Area | VR_US | 1 | 2 | 1
0x00400306 | 0xFFFFFFFF | Distance Source to Entrance | VR_DS | 1 | 1 | 1
0x00400307 | 0xFFFFFFFF | Distance Source to Support | VR_DS | 1 | 1 | 1
0x00400310 | 0xFFFFFFFF | Comments on Radiation Dose | VR_ST | 1 | 1 | 1
0x00400312 | 0xFFFFFFFF | X-Ray Output | VR_DS | 1 | 1 | 1
0x00400314 | 0xFFFFFFFF | Half Value Layer | VR_DS | 1 | 1 | 1
0x00400316 | 0xFFFFFFFF | Organ Dose | VR_DS | 1 | 1 | 1
0x00400318 | 0xFFFFFFFF | Organ Exposed | VR_CS | 1 | 1 | 1
0x00400320 | 0xFFFFFFFF | Billing Procedure Step Sequence | VR_SQ | 1 | 1 | 1
0x00400321 | 0xFFFFFFFF | Film Consumption Sequence | VR_SQ | 1 | 1 | 1
0x00400324 | 0xFFFFFFFF | Billing Supplies and Devices Sequence | VR_SQ | 1 | 1 | 1
0x00400330 | 0xFFFFFFFF | Referenced Procedure Step Sequence | VR_SQ | 1 | 1 | 1
0x00400340 | 0xFFFFFFFF | Performed Series Sequence | VR_SQ | 1 | 1 | 1
0x00400400 | 0xFFFFFFFF | Comments on the Scheduled Procedure Step | VR_LT | 1 | 1 | 1
0x0040050A | 0xFFFFFFFF | Specimen Accession Number | VR_LO | 1 | 1 | 1
0x00400550 | 0xFFFFFFFF | Specimen Sequence | VR_SQ | 1 | 1 | 1
0x00400551 | 0xFFFFFFFF | Specimen Identifier | VR_LO | 1 | 1 | 1
0x00400552 | 0xFFFFFFFF | Specimen Description Sequence | VR_SQ | 1 | 1 | 1
0x00400553 | 0xFFFFFFFF | Specimen Description | VR_ST | 1 | 1 | 1
0x00400555 | 0xFFFFFFFF | Acquisition Context Sequence | VR_SQ | 1 | 1 | 1
0x00400556 | 0xFFFFFFFF | Acquisition Context Description | VR_ST | 1 | 1 | 1
0x0040059A | 0xFFFFFFFF | Specimen Type Code Sequence | VR_SQ | 1 | 1 | 1
0x004006FA | 0xFFFFFFFF | Slide Identifier | VR_LO | 1 | 1 | 1
0x0040071A | 0xFFFFFFFF | Image Center Point Coordinates Sequence | VR_SQ | 1 | 1 | 1
0x0040072A | 0xFFFFFFFF | X Offset In Slide Coordinate System | VR_DS | 1 | 1 | 1
0x0040073A | 0xFFFFFFFF | Y Offset In Slide Coordinate System | VR_DS | 1 | 1 | 1
0x0040074A | 0xFFFFFFFF | Z Offset In Slide Coordinate System | VR_DS | 1 | 1 | 1
0x004008D8 | 0xFFFFFFFF | Pixel Spacing Sequence | VR_SQ | 1 | 1 | 1
0x004008DA | 0xFFFFFFFF | Coordinate System Axis Code Sequence | VR_SQ | 1 | 1 | 1
0x004008EA | 0xFFFFFFFF | Measurement Units Code Sequence | VR_SQ | 1 | 1 | 1
0x004009F8 | 0xFFFFFFFF | Vital Stain Code Sequence | VR_SQ | 1 | 1 | 1
0x00401001 | 0xFFFFFFFF | Requested Procedure ID | VR_SH | 1 | 1 | 1
0x00401002 | 0xFFFFFFFF | Reason for the Requested Procedure | VR_LO | 1 | 1 | 1
0x00401003 | 0xFFFFFFFF | Requested Procedure Priority | VR_SH | 1 | 1 | 1
0x00401004 | 0xFFFFFFFF | Patient Transport Arrangements | VR_LO | 1 | 1 | 1
0x00401005 | 0xFFFFFFFF | Requested Procedure Location | VR_LO | 1 | 1 | 1
0x00401006 | 0xFFFFFFFF | Placer Order Number / Procedure (Retired) | VR_SH | 1 | 1 | 1
0x00401007 | 0xFFFFFFFF | Filler Order Number / Procedure (Retired) | VR_SH | 1 | 1 | 1
0x00401008 | 0xFFFFFFFF | Confidentiality Code | VR_LO | 1 | 1 | 1
0x00401009 | 0xFFFFFFFF | Reporting Priority | VR_SH | 1 | 1 | 1
0x00401010 | 0xFFFFFFFF | Names of Intended Recipients of Results | VR_PN | 1 | -1 | 1
0x00401400 | 0xFFFFFFFF | Requested Procedure Comments | VR_LT | 1 | 1 | 1
0x00402001 | 0xFFFFFFFF | Reason for the Imaging Service Request | VR_LO | 1 | 1 | 1
0x00402004 | 0xFFFFFFFF | Issue Date of Imaging Service Request | VR_DA | 1 | 1 | 1
0x00402005 | 0xFFFFFFFF | Issue Time of Imaging Service Request | VR_TM | 1 | 1 | 1
0x00402006 | 0xFFFFFFFF | Placer Order Number / Imaging Service Request (Retired) | VR_SH | 1 | 1 | 1
0x00402007 | 0xFFFFFFFF | Filler Order Number / Imaging Service Request (Retired) | VR_SH | 1 | 1 | 1
0x00402008 | 0xFFFFFFFF | Order Entered By | VR_PN | 1 | 1 | 1
0x00402009 | 0xFFFFFFFF | Order Enterer's Location | VR_SH | 1 | 1 | 1
0x00402010 | 0xFFFFFFFF | Order Callback Phone Number | VR_SH | 1 | 1 | 1
0x00402016 | 0xFFFFFFFF | Placer Order Number / Imaging Service Request | VR_LO | 1 | 1 | 1
0x00402017 | 0xFFFFFFFF | Filler Order Number / Imaging Service Request | VR_LO | 1 | 1 | 1
0x00402400 | 0xFFFFFFFF | Imaging Service Request Comments | VR_LT | 1 | 1 | 1
0x00403001 | 0xFFFFFFFF | Confidentiality Constraint on Patient Data Description | VR_LO | 1 | 1 | 1
0x0040A007 | 0xFFFFFFFF | Findings Flag | VR_CS | 1 | 1 | 1
0x0040A020 | 0xFFFFFFFF | Findings Sequence | VR_SQ | 1 | 1 | 1
0x0040A021 | 0xFFFFFFFF | Findings Group UID | VR_UI | 1 | 1 | 1
0x0040A022 | 0xFFFFFFFF | Referenced Findings Group UID | VR_UI | 1 | 1 | 1
0x0040A023 | 0xFFFFFFFF | Findings Group Recording Date | VR_DA | 1 | 1 | 1
0x0040A024 | 0xFFFFFFFF | Findings Group Recording Time | VR_TM | 1 | 1 | 1
0x0040A026 | 0xFFFFFFFF | Findings Source Category Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A027 | 0xFFFFFFFF | Documenting Organization | VR_LO | 1 | 1 | 1
0x0040A028 | 0xFFFFFFFF | Documenting Organization Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A032 | 0xFFFFFFFF | History Reliability Qualifier Description | VR_LO | 1 | 1 | 1
0x0040A043 | 0xFFFFFFFF | Concept Name Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A047 | 0xFFFFFFFF | Measurement Precision Description | VR_LO | 1 | 1 | 1
0x0040A057 | 0xFFFFFFFF | Urgency or Priority Alerts | VR_CS | 1 | -1 | 1
0x0040A060 | 0xFFFFFFFF | Sequencing Indicator | VR_LO | 1 | 1 | 1
0x0040A066 | 0xFFFFFFFF | Document Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A067 | 0xFFFFFFFF | Document Author | VR_PN | 1 | 1 | 1
0x0040A068 | 0xFFFFFFFF | Document Author Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A070 | 0xFFFFFFFF | Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A073 | 0xFFFFFFFF | Object String Identifier | VR_LO | 1 | -1 | 1
0x0040A074 | 0xFFFFFFFF | Object Binary Identifier | VR_OB | 1 | 1 | 1
0x0040A075 | 0xFFFFFFFF | Documenting Observer | VR_PN | 1 | 1 | 1
0x0040A076 | 0xFFFFFFFF | Documenting Observer Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A078 | 0xFFFFFFFF | Observation Subject Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A080 | 0xFFFFFFFF | Person Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A085 | 0xFFFFFFFF | Procedure Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A088 | 0xFFFFFFFF | Object Directory String Identifier | VR_LO | 1 | 1 | 1
0x0040A089 | 0xFFFFFFFF | Object Directory Binary Identifier | VR_OB | 1 | 1 | 1
0x0040A090 | 0xFFFFFFFF | History Reliability Qualifier | VR_CS | 1 | 1 | 1
0x0040A0A0 | 0xFFFFFFFF | Referenced Type of Data | VR_CS | 1 | 1 | 1
0x0040A0B0 | 0xFFFFFFFF | Referenced Waveform Channels | VR_US | 2 | -1 | 2
0x0040A110 | 0xFFFFFFFF | Date of Document or Verbal Transaction | VR_DA | 1 | 1 | 1
0x0040A112 | 0xFFFFFFFF | Time of Document Creation or Verbal Transaction | VR_TM | 1 | 1 | 1
0x0040A121 | 0xFFFFFFFF | Date | VR_DA | 1 | 1 | 1
0x0040A122 | 0xFFFFFFFF | Time | VR_TM | 1 | 1 | 1
0x0040A123 | 0xFFFFFFFF | Person Name | VR_PN | 1 | 1 | 1
0x0040A124 | 0xFFFFFFFF | Referenced Person Sequence | VR_SQ | 1 | 1 | 1
0x0040A125 | 0xFFFFFFFF | Report Status ID | VR_CS | 2 | 2 | 2
0x0040A130 | 0xFFFFFFFF | Temporal Range Type | VR_CS | 1 | 1 | 1
0x0040A132 | 0xFFFFFFFF | Referenced Sample Offsets | VR_UL | 1 | -1 | 1
0x0040A136 | 0xFFFFFFFF | Referenced Frame Numbers | VR_US | 1 | -1 | 1
0x0040A138 | 0xFFFFFFFF | Referenced Time Offsets | VR_DS | 1 | -1 | 1
0x0040A13A | 0xFFFFFFFF | Referenced Datetime | VR_DT | 1 | -1 | 1
0x0040A160 | 0xFFFFFFFF | Text Value | VR_UT | 1 | 1 | 1
0x0040A167 | 0xFFFFFFFF | Observation Category Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A168 | 0xFFFFFFFF | Concept Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A16A | 0xFFFFFFFF | Bibliographic Citation | VR_ST | 1 | 1 | 1
0x0040A170 | 0xFFFFFFFF | Observation Class | VR_CS | 1 | 1 | 1
0x0040A171 | 0xFFFFFFFF | Observation UID | VR_UI | 1 | 1 | 1
0x0040A172 | 0xFFFFFFFF | Referenced Observation UID | VR_UI | 1 | 1 | 1
0x0040A173 | 0xFFFFFFFF | Referenced Observation Class | VR_CS | 1 | 1 | 1
0x0040A174 | 0xFFFFFFFF | Referenced Object Observation Class | VR_CS | 1 | 1 | 1
0x0040A180 | 0xFFFFFFFF | Annotation Group Number | VR_US | 1 | 1 | 1
0x0040A192 | 0xFFFFFFFF | Observation Date | VR_DA | 1 | 1 | 1
0x0040A193 | 0xFFFFFFFF | Observation Time | VR_TM | 1 | 1 | 1
0x0040A194 | 0xFFFFFFFF | Measurement Automation | VR_CS | 1 | 1 | 1
0x0040A195 | 0xFFFFFFFF | Concept Name Code Sequence Modifier | VR_SQ | 1 | 1 | 1
0x0040A224 | 0xFFFFFFFF | Identification Description | VR_ST | 1 | 1 | 1
0x0040A290 | 0xFFFFFFFF | Coordinates Set Geometric Type | VR_CS | 1 | 1 | 1
0x0040A296 | 0xFFFFFFFF | Algorithm Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A297 | 0xFFFFFFFF | Algorithm Description | VR_ST | 1 | 1 | 1
0x0040A29A | 0xFFFFFFFF | Pixel Coordinates Set | VR_SL | 2 | -1 | 2
0x0040A300 | 0xFFFFFFFF | Measured Value Sequence | VR_SQ | 1 | 1 | 1
0x0040A307 | 0xFFFFFFFF | Current Observer | VR_PN | 1 | 1 | 1
0x0040A30A | 0xFFFFFFFF | Numeric Value | VR_DS | 1 | -1 | 1
0x0040A313 | 0xFFFFFFFF | Referenced Accession Sequence | VR_SQ | 1 | 1 | 1
0x0040A33A | 0xFFFFFFFF | Report Status Comment | VR_ST | 1 | 1 | 1
0x0040A340 | 0xFFFFFFFF | Procedure Context Sequence | VR_SQ | 1 | 1 | 1
0x0040A352 | 0xFFFFFFFF | Verbal Source | VR_PN | 1 | 1 | 1
0x0040A353 | 0xFFFFFFFF | Address | VR_ST | 1 | 1 | 1
0x0040A354 | 0xFFFFFFFF | Telephone Number | VR_LO | 1 | 1 | 1
0x0040A358 | 0xFFFFFFFF | Verbal Source Identifier Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A380 | 0xFFFFFFFF | Report Detail Sequence | VR_SQ | 1 | 1 | 1
0x0040A402 | 0xFFFFFFFF | Observation Subject UID | VR_UI | 1 | 1 | 1
0x0040A403 | 0xFFFFFFFF | Observation Subject Class | VR_CS | 1 | 1 | 1
0x0040A404 | 0xFFFFFFFF | Observation Subject Type Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A600 | 0xFFFFFFFF | Observation Subject Context Flag | VR_CS | 1 | 1 | 1
0x0040A601 | 0xFFFFFFFF | Observer Context Flag | VR_CS | 1 | 1 | 1
0x0040A603 | 0xFFFFFFFF | Procedure Context Flag | VR_CS | 1 | 1 | 1
0x0040A730 | 0xFFFFFFFF | Observations Sequence | VR_SQ | 1 | 1 | 1
0x0040A731 | 0xFFFFFFFF | Relationship Sequence | VR_SQ | 1 | 1 | 1
0x0040A732 | 0xFFFFFFFF | Relationship Type Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A744 | 0xFFFFFFFF | Language Code Sequence | VR_SQ | 1 | 1 | 1
0x0040A992 | 0xFFFFFFFF | Uniform Resource Locator | VR_ST | 1 | 1 | 1
0x0040B020 | 0xFFFFFFFF | Annotation Sequence | VR_SQ | 1 | 1 | 1
0x0040DB73 | 0xFFFFFFFF | Relationship Type Code Sequence Modifier | VR_SQ | 1 | 1 | 1
0x00500004 | 0xFFFFFFFF | Calibration Image | VR_CS | 1 | 1 | 1
0x00500010 | 0xFFFFFFFF | Device Sequence | VR_SQ | 1 | 1 | 1
0x00500014 | 0xFFFFFFFF | Device Length | VR_DS | 1 | 1 | 1
0x00500016 | 0xFFFFFFFF | Device Diameter | VR_DS | 1 | 1 | 1
0x00500017 | 0xFFFFFFFF | Device Diameter Units | VR_CS | 1 | 1 | 1
0x00500018 | 0xFFFFFFFF | Device Volume | VR_DS | 1 | 1 | 1
0x00500019 | 0xFFFFFFFF | Inter-marker Distance | VR_DS | 1 | 1 | 1
0x00500020 | 0xFFFFFFFF | Device Description | VR_LO | 1 | 1 | 1
0x00500030 | 0xFFFFFFFF | CodedInterventionDeviceSequence | VR_SQ | 1 | 1 | 1
0x00540010 | 0xFFFFFFFF | Energy Window Vector | VR_US | 1 | -1 | 1
0x00540011 | 0xFFFFFFFF | Number of Energy Windows | VR_US | 1 | 1 | 1
0x00540012 | 0xFFFFFFFF | Energy Window Information Sequence | VR_SQ | 1 | 1 | 1
0x00540013 | 0xFFFFFFFF | Energy Window Range Sequence | VR_SQ | 1 | 1 | 1
0x00540014 | 0xFFFFFFFF | Energy Window Lower Limit | VR_DS | 1 | 1 | 1
0x00540015 | 0xFFFFFFFF | Energy Window Upper Limit | VR_DS | 1 | 1 | 1
0x00540016 | 0xFFFFFFFF | Radiopharmaceutical Information Sequence | VR_SQ | 1 | 1 | 1
0x00540017 | 0xFFFFFFFF | Residual Syringe Counts | VR_IS | 1 | 1 | 1
0x00540018 | 0xFFFFFFFF | Energy Window Name | VR_SH | 1 | 1 | 1
0x00540020 | 0xFFFFFFFF | Detector Vector | VR_US | 1 | -1 | 1
0x00540021 | 0xFFFFFFFF | Number of Detectors | VR_US | 1 | 1 | 1
0x00540022 | 0xFFFFFFFF | Detector Information Sequence | VR_SQ | 1 | 1 | 1
0x00540030 | 0xFFFFFFFF | Phase Vector | VR_US | 1 | -1 | 1
0x00540031 | 0xFFFFFFFF | Number of Phases | VR_US | 1 | 1 | 1
0x00540032 | 0xFFFFFFFF | Phase Information Sequence | VR_SQ | 1 | 1 | 1
0x00540033 | 0xFFFFFFFF | Number of Frames in Phase | VR_US | 1 | 1 | 1
0x00540036 | 0xFFFFFFFF | Phase Delay | VR_IS | 1 | 1 | 1
0x00540038 | 0xFFFFFFFF | Pause Between Frames | VR_IS | 1 | 1 | 1
0x00540050 | 0xFFFFFFFF | Rotation Vector | VR_US | 1 | -1 | 1
0x00540051 | 0xFFFFFFFF | Number of Rotations | VR_US | 1 | 1 | 1
0x00540052 | 0xFFFFFFFF | Rotation Information Sequence | VR_SQ | 1 | 1 | 1
0x00540053 | 0xFFFFFFFF | Number of Frames in Rotation | VR_US | 1 | 1 | 1
0x00540060 | 0xFFFFFFFF | R-R Interval Vector | VR_US | 1 | -1 | 1
0x00540061 | 0xFFFFFFFF | Number of R-R Intervals | VR_US | 1 | 1 | 1
0x00540062 | 0xFFFFFFFF | Gated Information Sequence | VR_SQ | 1 | 1 | 1
0x00540063 | 0xFFFFFFFF | Data Information Sequence | VR_SQ | 1 | 1 | 1
0x00540070 | 0xFFFFFFFF | Time Slot Vector | VR_US | 1 | -1 | 1
0x00540071 | 0xFFFFFFFF | Number of Time Slots | VR_US | 1 | 1 | 1
0x00540072 | 0xFFFFFFFF | Time Slot Information Sequence | VR_SQ | 1 | 1 | 1
0x00540073 | 0xFFFFFFFF | Time Slot Time | VR_DS | 1 | 1 | 1
0x00540080 | 0xFFFFFFFF | Slice Vector | VR_US | 1 | -1 | 1
0x00540081 | 0xFFFFFFFF | Number of Slices | VR_US | 1 | 1 | 1
0x00540090 | 0xFFFFFFFF | Angular View Vector | VR_US | 1 | -1 | 1
0x00540100 | 0xFFFFFFFF | Time Slice Vector | VR_US | 1 | -1 | 1
0x00540101 | 0xFFFFFFFF | Number of Time Slices | VR_US | 1 | 1 | 1
0x00540200 | 0xFFFFFFFF | Start Angle | VR_DS | 1 | 1 | 1
0x00540202 | 0xFFFFFFFF | Type of Detector Motion | VR_CS | 1 | 1 | 1
0x00540210 | 0xFFFFFFFF | Trigger Vector | VR_IS | 1 | -1 | 1
0x00540211 | 0xFFFFFFFF | Number of Triggers in Phase | VR_US | 1 | 1 | 1
0x00540220 | 0xFFFFFFFF | View Code Sequence | VR_SQ | 1 | 1 | 1
0x00540222 | 0xFFFFFFFF | View Modifier Code Sequence | VR_SQ | 1 | 1 | 1
0x00540300 | 0xFFFFFFFF | Radionuclide Code Sequence | VR_SQ | 1 | 1 | 1
0x00540302 | 0xFFFFFFFF | Administration Route Code Sequence | VR_SQ | 1 | 1 | 1
0x00540304 | 0xFFFFFFFF | Radiopharmaceutical Code Sequence | VR_SQ | 1 | 1 | 1
0x00540306 | 0xFFFFFFFF | Calibration Data Sequence | VR_SQ | 1 | 1 | 1
0x00540308 | 0xFFFFFFFF | Energy Window Number | VR_US | 1 | 1 | 1
0x00540400 | 0xFFFFFFFF | Image ID | VR_SH | 1 | 1 | 1
0x00540410 | 0xFFFFFFFF | Patient Orientation Code Sequence | VR_SQ | 1 | 1 | 1
0x00540412 | 0xFFFFFFFF | Patient Orientation Modifier Code Sequence | VR_SQ | 1 | 1 | 1
0x00540414 | 0xFFFFFFFF | Patient Gantry Relationship Code Sequence | VR_SQ | 1 | 1 | 1
0x00541000 | 0xFFFFFFFF | Series Type | VR_CS | 2 | 2 | 2
0x00541001 | 0xFFFFFFFF | Units | VR_CS | 1 | 1 | 1
0x00541002 | 0xFFFFFFFF | Counts Source | VR_CS | 1 | 1 | 1
0x00541004 | 0xFFFFFFFF | Reprojection Method | VR_CS | 1 | 1 | 1
0x00541100 | 0xFFFFFFFF | Randoms Correction Method | VR_CS | 1 | 1 | 1
0x00541101 | 0xFFFFFFFF | Attenuation Correction Method | VR_LO | 1 | 1 | 1
0x00541102 | 0xFFFFFFFF | Decay Correction | VR_CS | 1 | 1 | 1
0x00541103 | 0xFFFFFFFF | Reconstruction Method | VR_LO | 1 | 1 | 1
0x00541104 | 0xFFFFFFFF | Detector Lines of Response Used | VR_LO | 1 | 1 | 1
0x00541105 | 0xFFFFFFFF | Scatter Correction Method | VR_LO | 1 | 1 | 1
0x00541200 | 0xFFFFFFFF | Axial Acceptance | VR_DS | 1 | 1 | 1
0x00541201 | 0xFFFFFFFF | Axial Mash | VR_IS | 2 | 2 | 2
0x00541202 | 0xFFFFFFFF | Transverse Mash | VR_IS | 1 | 1 | 1
0x00541203 | 0xFFFFFFFF | Detector Element Size | VR_DS | 2 | 2 | 2
0x00541210 | 0xFFFFFFFF | Coincidence Window Width | VR_DS | 1 | 1 | 1
0x00541220 | 0xFFFFFFFF | Secondary Counts Type | VR_CS | 1 | -1 | 1
0x00541300 | 0xFFFFFFFF | Frame Reference Time | VR_DS | 1 | 1 | 1
0x00541310 | 0xFFFFFFFF | Primary (Prompts) Counts Accumulated | VR_IS | 1 | 1 | 1
0x00541311 | 0xFFFFFFFF | Secondary Counts Accumulated | VR_IS | 1 | -1 | 1
0x00541320 | 0xFFFFFFFF | Slice Sensitivity Factor | VR_DS | 1 | 1 | 1
0x00541321 | 0xFFFFFFFF | Decay Factor | VR_DS | 1 | 1 | 1
0x00541322 | 0xFFFFFFFF | Dose Calibration Factor | VR_DS | 1 | 1 | 1
0x00541323 | 0xFFFFFFFF | Scatter Fraction Factor | VR_DS | 1 | 1 | 1
0x00541324 | 0xFFFFFFFF | Dead Time Factor | VR_DS | 1 | 1 | 1
0x00541330 | 0xFFFFFFFF | Image Index | VR_US | 1 | 1 | 1
0x00541400 | 0xFFFFFFFF | Counts Included | VR_CS | 1 | -1 | 1
0x00541401 | 0xFFFFFFFF | Dead Time Correction Flag | VR_CS | 1 | 1 | 1
0x00603000 | 0xFFFFFFFF | Histogram Sequence | VR_SQ | 1 | 1 | 1
0x00603002 | 0xFFFFFFFF | Histogram Number of Bins | VR_US | 1 | 1 | 1
0x00603004 | 0xFFFFFFFF | Histogram First Bin Value | VR_US | 1 | 1 | 1
0x00603006 | 0xFFFFFFFF | Histogram Last Bin Value | VR_US | 1 | 1 | 1
0x00603008 | 0xFFFFFFFF | Histogram Bin Width | VR_US | 1 | 1 | 1
0x00603010 | 0xFFFFFFFF | Histogram Explanation | VR_LO | 1 | 1 | 1
0x00603020 | 0xFFFFFFFF | Histogram Data | VR_UL | 1 | -1 | 1
0x00880130 | 0xFFFFFFFF | Storage Media File-set ID | VR_SH | 1 | 1 | 1
0x00880140 | 0xFFFFFFFF | Storage Media File-set UID | VR_UI | 1 | 1 | 1
0x00880200 | 0xFFFFFFFF | Icon Image Sequence | VR_SQ | 1 | 1 | 1
0x00880904 | 0xFFFFFFFF | Topic Title | VR_LO | 1 | 1 | 1
0x00880906 | 0xFFFFFFFF | Topic Subject | VR_ST | 1 | 1 | 1
0x00880910 | 0xFFFFFFFF | Topic Author | VR_LO | 1 | 1 | 1
0x00880912 | 0xFFFFFFFF | Topic Key Words | VR_LO | 1 | 32 | 1
0x10000001 | 0xFFFFFF0F | Run Length Triplet | VR_US | 3 | 3 | 3
0x10000002 | 0xFFFFFF0F | Huffman Table Size | VR_US | 1 | 1 | 1
0x10000003 | 0xFFFFFF0F | Huffman Table Triplet | VR_US | 3 | 3 | 3
0x10000004 | 0xFFFFFF0F | Shift Table Size | VR_US | 1 | 1 | 1
0x10000005 | 0xFFFFFF0F | Shift Table Triplet | VR_US | 3 | 3 | 3
0x20000010 | 0xFFFFFFFF | Number of Copies | VR_IS | 1 | 1 | 1
0x2000001E | 0xFFFFFFFF | Printer Configuration Sequence | VR_SQ | 1 | 1 | 1
0x20000020 | 0xFFFFFFFF | Print Priority | VR_CS | 1 | 1 | 1
0x20000030 | 0xFFFFFFFF | Medium Type | VR_CS | 1 | 1 | 1
0x20000040 | 0xFFFFFFFF | Film Destination | VR_CS | 1 | 1 | 1
0x20000050 | 0xFFFFFFFF | Film Session Label | VR_LO | 1 | 1 | 1
0x20000060 | 0xFFFFFFFF | Memory Allocation | VR_IS | 1 | 1 | 1
0x20000061 | 0xFFFFFFFF | Maximum Memory Allocation | VR_IS | 1 | 1 | 1
0x20000062 | 0xFFFFFFFF | Color Image Printing Flag | VR_CS | 1 | 1 | 1
0x20000063 | 0xFFFFFFFF | Collation Flag | VR_CS | 1 | 1 | 1
0x20000065 | 0xFFFFFFFF | Annotation Flag | VR_CS | 1 | 1 | 1
0x20000067 | 0xFFFFFFFF | Image Overlay Flag | VR_CS | 1 | 1 | 1
0x20000069 | 0xFFFFFFFF | Presentation LUT Flag | VR_CS | 1 | 1 | 1
0x2000006A | 0xFFFFFFFF | Image Box Presentation LUT Flag | VR_CS | 1 | 1 | 1
0x200000A0 | 0xFFFFFFFF | Memory Bit Depth | VR_US | 1 | 1 | 1
0x200000A1 | 0xFFFFFFFF | Printing Bit Depth | VR_US | 1 | 1 | 1
0x200000A2 | 0xFFFFFFFF | Media Installed Sequence | VR_SQ | 1 | 1 | 1
0x200000A4 | 0xFFFFFFFF | Other Media Available Sequence | VR_SQ | 1 | 1 | 1
0x200000A8 | 0xFFFFFFFF | Supported Image Display Formats Sequence | VR_SQ | 1 | 1 | 1
0x20000500 | 0xFFFFFFFF | Referenced Film Box Sequence | VR_SQ | 1 | 1 | 1
0x20000510 | 0xFFFFFFFF | Referenced Stored Print Sequence | VR_SQ | 1 | 1 | 1
0x20100010 | 0xFFFFFFFF | Image Display Format | VR_ST | 1 | 1 | 1
0x20100030 | 0xFFFFFFFF | Annotation Display Format ID | VR_CS | 1 | 1 | 1
0x20100040 | 0xFFFFFFFF | Film Orientation | VR_CS | 1 | 1 | 1
0x20100050 | 0xFFFFFFFF | Film Size ID | VR_CS | 1 | 1 | 1
0x20100052 | 0xFFFFFFFF | Printer Resolution ID | VR_CS | 1 | 1 | 1
0x20100054 | 0xFFFFFFFF | Default Printer Resolution ID | VR_CS | 1 | 1 | 1
0x20100060 | 0xFFFFFFFF | Magnification Type | VR_CS | 1 | 1 | 1
0x20100080 | 0xFFFFFFFF | Smoothing Type | VR_CS | 1 | 1 | 1
0x201000A6 | 0xFFFFFFFF | Default Magnification Type | VR_CS | 1 | 1 | 1
0x201000A7 | 0xFFFFFFFF | Other Magnification Types Available | VR_CS | 1 | -1 | 1
0x201000A8 | 0xFFFFFFFF | Default Smoothing Type | VR_CS | 1 | 1 | 1
0x201000A9 | 0xFFFFFFFF | Other Smoothing Types Available | VR_CS | 1 | -1 | 1
0x20100100 | 0xFFFFFFFF | Border Density | VR_CS | 1 | 1 | 1
0x20100110 | 0xFFFFFFFF | Empty Image Density | VR_CS | 1 | 1 | 1
0x20100120 | 0xFFFFFFFF | Min Density | VR_US | 1 | 1 | 1
0x20100130 | 0xFFFFFFFF | Max Density | VR_US | 1 | 1 | 1
0x20100140 | 0xFFFFFFFF | Trim | VR_CS | 1 | 1 | 1
0x20100150 | 0xFFFFFFFF | Configuration Information | VR_ST | 1 | 1 | 1
0x20100152 | 0xFFFFFFFF | Configuration Information Description | VR_LT | 1 | 1 | 1
0x20100154 | 0xFFFFFFFF | Maximum Collated Films | VR_IS | 1 | 1 | 1
0x2010015E | 0xFFFFFFFF | Illumination | VR_US | 1 | 1 | 1
0x20100160 | 0xFFFFFFFF | Reflected Ambient Light | VR_US | 1 | 1 | 1
0x20100376 | 0xFFFFFFFF | Printer Pixel Spacing | VR_DS | 2 | 2 | 2
0x20100500 | 0xFFFFFFFF | Referenced Film Session Sequence | VR_SQ | 1 | 1 | 1
0x20100510 | 0xFFFFFFFF | Referenced Image Box Sequence | VR_SQ | 1 | 1 | 1
0x20100520 | 0xFFFFFFFF | Referenced Basic Annotation Box Sequence | VR_SQ | 1 | 1 | 1
0x20200010 | 0xFFFFFFFF | Image Position | VR_US | 1 | 1 | 1
0x20200020 | 0xFFFFFFFF | Polarity | VR_CS | 1 | 1 | 1
0x20200030 | 0xFFFFFFFF | Requested Image Size | VR_DS | 1 | 1 | 1
0x20200040 | 0xFFFFFFFF | Requested Decimate/Crop Behavior | VR_CS | 1 | 1 | 1
0x20200050 | 0xFFFFFFFF | Requested Resolution ID | VR_CS | 1 | 1 | 1
0x202000A0 | 0xFFFFFFFF | Requested Image Size Flag | VR_CS | 1 | 1 | 1
0x202000A2 | 0xFFFFFFFF | Decimate/Crop Result | VR_CS | 1 | 1 | 1
0x20200110 | 0xFFFFFFFF | Basic Grayscale Image Sequence | VR_SQ | 1 | 1 | 1
0x20200111 | 0xFFFFFFFF | Basic Color Image Sequence | VR_SQ | 1 | 1 | 1
0x20200130 | 0xFFFFFFFF | Referenced Image Overlay Box Sequence (Retired) | VR_SQ | 1 | 1 | 1
0x20200140 | 0xFFFFFFFF | Referenced VOI LUT Box Sequence (Retired) | VR_SQ | 1 | 1 | 1
0x20300010 | 0xFFFFFFFF | Annotation Position | VR_US | 1 | 1 | 1
0x20300020 | 0xFFFFFFFF | Text String | VR_LO | 1 | 1 | 1
0x20400010 | 0xFFFFFFFF | Referenced Overlay Plane Sequence | VR_SQ | 1 | 1 | 1
0x20400011 | 0xFFFFFFFF | Referenced Overlay Plane Groups | VR_US | 1 | 99 | 1
0x20400020 | 0xFFFFFFFF | Overlay Pixel Data Sequence | VR_SQ | 1 | 1 | 1
0x20400060 | 0xFFFFFFFF | Overlay Magnification Type | VR_CS | 1 | 1 | 1
0x20400070 | 0xFFFFFFFF | Overlay Smoothing Type | VR_CS | 1 | 1 | 1
0x20400072 | 0xFFFFFFFF | Overlay or Image Magnification | VR_CS | 1 | 1 | 1
0x20400074 | 0xFFFFFFFF | Magnify to Number of Columns | VR_US | 1 | 1 | 1
0x20400080 | 0xFFFFFFFF | Overlay Foreground Density | VR_CS | 1 | 1 | 1
0x20400082 | 0xFFFFFFFF | Overlay Background Density | VR_CS | 1 | 1 | 1
0x20400090 | 0xFFFFFFFF | Overlay Mode (Retired) | VR_CS | 1 | 1 | 1
0x20400100 | 0xFFFFFFFF | Threshold Density (Retired) | VR_CS | 1 | 1 | 1
0x20400500 | 0xFFFFFFFF | Referenced Image Box Sequence (Retired) | VR_SQ | 1 | 1 | 1
0x20500010 | 0xFFFFFFFF | Presentation LUT Sequence | VR_SQ | 1 | 1 | 1
0x20500020 | 0xFFFFFFFF | Presentation LUT Shape | VR_CS | 1 | 1 | 1
0x20500500 | 0xFFFFFFFF | Referenced Presentation LUT Sequence | VR_SQ | 1 | 1 | 1
0x21000010 | 0xFFFFFFFF | Print Job ID | VR_SH | 1 | 1 | 1
0x21000020 | 0xFFFFFFFF | Execution Status | VR_CS | 1 | 1 | 1
0x21000030 | 0xFFFFFFFF | Execution Status Info | VR_CS | 1 | 1 | 1
0x21000040 | 0xFFFFFFFF | Creation Date | VR_DA | 1 | 1 | 1
0x21000050 | 0xFFFFFFFF | Creation Time | VR_TM | 1 | 1 | 1
0x21000070 | 0xFFFFFFFF | Originator | VR_AE | 1 | 1 | 1
0x21000140 | 0xFFFFFFFF | Destination AE | VR_AE | 1 | 1 | 1
0x21000160 | 0xFFFFFFFF | Owner ID | VR_SH | 1 | 1 | 1
0x21000170 | 0xFFFFFFFF | Number of Films | VR_IS | 1 | 1 | 1
0x21000500 | 0xFFFFFFFF | Referenced Print Job Sequence 2100 | VR_SQ | 1 | 1 | 1
0x21100010 | 0xFFFFFFFF | Printer Status | VR_CS | 1 | 1 | 1
0x21100020 | 0xFFFFFFFF | Printer Status Info | VR_CS | 1 | 1 | 1
0x21100030 | 0xFFFFFFFF | Printer Name | VR_LO | 1 | 1 | 1
0x21100099 | 0xFFFFFFFF | Print Queue ID | VR_SH | 1 | 1 | 1
0x21200010 | 0xFFFFFFFF | Queue Status | VR_CS | 1 | 1 | 1
0x21200050 | 0xFFFFFFFF | Print Job Description Sequence | VR_SQ | 1 | 1 | 1
0x21200070 | 0xFFFFFFFF | Referenced Print Job Sequence 2120 | VR_SQ | 1 | 1 | 1
0x21300010 | 0xFFFFFFFF | Print Management Capabilities Sequence | VR_SQ | 1 | 1 | 1
0x21300015 | 0xFFFFFFFF | Printer Characteristics Sequence | VR_SQ | 1 | 1 | 1
0x21300030 | 0xFFFFFFFF | Film Box Content Sequence | VR_SQ | 1 | 1 | 1
0x21300040 | 0xFFFFFFFF | Image Box Content Sequence | VR_SQ | 1 | 1 | 1
0x21300050 | 0xFFFFFFFF | Annotation Content Sequence | VR_SQ | 1 | 1 | 1
0x21300060 | 0xFFFFFFFF | Image Overlay Box Content Sequence | VR_SQ | 1 | 1 | 1
0x21300080 | 0xFFFFFFFF | Presentation LUT Content Sequence | VR_SQ | 1 | 1 | 1
0x213000A0 | 0xFFFFFFFF | Proposed Study Sequence | VR_SQ | 1 | 1 | 1
0x213000C0 | 0xFFFFFFFF | Original Image Sequence | VR_SQ | 1 | 1 | 1
0x30020002 | 0xFFFFFFFF | RT Image Label | VR_SH | 1 | 1 | 1
0x30020003 | 0xFFFFFFFF | RT Image Name | VR_LO | 1 | 1 | 1
0x30020004 | 0xFFFFFFFF | RT Image Description | VR_ST | 1 | 1 | 1
0x3002000A | 0xFFFFFFFF | Reported Values Origin | VR_CS | 1 | 1 | 1
0x3002000C | 0xFFFFFFFF | RT Image Plane | VR_CS | 1 | 1 | 1
0x3002000E | 0xFFFFFFFF | X-Ray Image Receptor Angle | VR_DS | 1 | 1 | 1
0x30020010 | 0xFFFFFFFF | RT Image Orientation | VR_DS | 6 | 6 | 6
0x30020011 | 0xFFFFFFFF | Image Plane Pixel Spacing | VR_DS | 2 | 2 | 2
0x30020012 | 0xFFFFFFFF | RT Image Position | VR_DS | 2 | 2 | 2
0x30020020 | 0xFFFFFFFF | Radiation Machine Name | VR_SH | 1 | 1 | 1
0x30020022 | 0xFFFFFFFF | Radiation Machine SAD | VR_DS | 1 | 1 | 1
0x30020024 | 0xFFFFFFFF | Radiation Machine SSD | VR_DS | 1 | 1 | 1
0x30020026 | 0xFFFFFFFF | RT Image SID | VR_DS | 1 | 1 | 1
0x30020028 | 0xFFFFFFFF | Source to Reference Object Distance | VR_DS | 1 | 1 | 1
0x30020029 | 0xFFFFFFFF | Fraction Number | VR_IS | 1 | 1 | 1
0x30020030 | 0xFFFFFFFF | Exposure Sequence | VR_SQ | 1 | 1 | 1
0x30020032 | 0xFFFFFFFF | Meterset Exposure | VR_DS | 1 | 1 | 1
0x30040001 | 0xFFFFFFFF | DVH Type | VR_CS | 1 | 1 | 1
0x30040002 | 0xFFFFFFFF | Dose Units | VR_CS | 1 | 1 | 1
0x30040004 | 0xFFFFFFFF | Dose Type | VR_CS | 1 | 1 | 1
0x30040006 | 0xFFFFFFFF | Dose Comment | VR_LO | 1 | 1 | 1
0x30040008 | 0xFFFFFFFF | Normalization Point | VR_DS | 3 | 3 | 3
0x3004000A | 0xFFFFFFFF | Dose Summation Type | VR_CS | 1 | 1 | 1
0x3004000C | 0xFFFFFFFF | Grid Frame Offset Vector | VR_DS | 2 | -1 | 1
0x3004000E | 0xFFFFFFFF | Dose Grid Scaling | VR_DS | 1 | 1 | 1
0x30040010 | 0xFFFFFFFF | RT Dose ROI Sequence | VR_SQ | 1 | 1 | 1
0x30040012 | 0xFFFFFFFF | Dose Value | VR_DS | 1 | 1 | 1
0x30040040 | 0xFFFFFFFF | DVH Normalization Point | VR_DS | 3 | 3 | 3
0x30040042 | 0xFFFFFFFF | DVH Normalization Dose Value | VR_DS | 1 | 1 | 1
0x30040050 | 0xFFFFFFFF | DVH Sequence | VR_SQ | 1 | 1 | 1
0x30040052 | 0xFFFFFFFF | DVH Dose Scaling | VR_DS | 1 | 1 | 1
0x30040054 | 0xFFFFFFFF | DVH Volume Units | VR_CS | 1 | 1 | 1
0x30040056 | 0xFFFFFFFF | DVH Number of Bins | VR_IS | 1 | 1 | 1
0x30040058 | 0xFFFFFFFF | DVH Data | VR_DS | 2 | -1 | 2
0x30040060 | 0xFFFFFFFF | DVH Referenced ROI Sequence | VR_SQ | 1 | 1 | 1
0x30040062 | 0xFFFFFFFF | DVH ROI Contribution Type | VR_CS | 1 | 1 | 1
0x30040070 | 0xFFFFFFFF | DVH Minimum Dose | VR_DS | 1 | 1 | 1
0x30040072 | 0xFFFFFFFF | DVH Maximum Dose | VR_DS | 1 | 1 | 1
0x30040074 | 0xFFFFFFFF | DVH Mean Dose | VR_DS | 1 | 1 | 1
0x30060002 | 0xFFFFFFFF | Structure Set Label | VR_SH | 1 | 1 | 1
0x30060004 | 0xFFFFFFFF | Structure Set Name | VR_LO | 1 | 1 | 1
0x30060006 | 0xFFFFFFFF | Structure Set Description | VR_ST | 1 | 1 | 1
0x30060008 | 0xFFFFFFFF | Structure Set Date | VR_DA | 1 | 1 | 1
0x30060009 | 0xFFFFFFFF | Structure Set Time | VR_TM | 1 | 1 | 1
0x30060010 | 0xFFFFFFFF | Referenced Frame of Reference Sequence | VR_SQ | 1 | 1 | 1
0x30060012 | 0xFFFFFFFF | RT Referenced Study Sequence | VR_SQ | 1 | 1 | 1
0x30060014 | 0xFFFFFFFF | RT Referenced Series Sequence | VR_SQ | 1 | 1 | 1
0x30060016 | 0xFFFFFFFF | Contour Image Sequence | VR_SQ | 1 | 1 | 1
0x30060020 | 0xFFFFFFFF | Structure Set ROI Sequence | VR_SQ | 1 | 1 | 1
0x30060022 | 0xFFFFFFFF | ROI Number | VR_IS | 1 | 1 | 1
0x30060024 | 0xFFFFFFFF | Referenced Frame of Reference UID | VR_UI | 1 | 1 | 1
0x30060026 | 0xFFFFFFFF | ROI Name | VR_LO | 1 | 1 | 1
0x30060028 | 0xFFFFFFFF | ROI Description | VR_ST | 1 | 1 | 1
0x3006002A | 0xFFFFFFFF | ROI Display Color | VR_IS | 3 | 3 | 3
0x3006002C | 0xFFFFFFFF | ROI Volume | VR_DS | 1 | 1 | 1
0x30060030 | 0xFFFFFFFF | RT Related ROI Sequence | VR_SQ | 1 | 1 | 1
0x30060033 | 0xFFFFFFFF | RT ROI Relationship | VR_CS | 1 | 1 | 1
0x30060036 | 0xFFFFFFFF | ROI Generation Algorithm | VR_CS | 1 | 1 | 1
0x30060038 | 0xFFFFFFFF | ROI Generation Description | VR_LO | 1 | 1 | 1
0x30060039 | 0xFFFFFFFF | ROI Contour Sequence | VR_SQ | 1 | 1 | 1
0x30060040 | 0xFFFFFFFF | Contour Sequence | VR_SQ | 1 | 1 | 1
0x30060042 | 0xFFFFFFFF | Contour Geometric Type | VR_CS | 1 | 1 | 1
0x30060044 | 0xFFFFFFFF | Contour Slab Thickness | VR_DS | 1 | 1 | 1
0x30060045 | 0xFFFFFFFF | Contour Offset Vector | VR_DS | 3 | 3 | 3
0x30060046 | 0xFFFFFFFF | Number of Contour Points | VR_IS | 1 | 1 | 1
0x30060050 | 0xFFFFFFFF | Contour Data | VR_DS | 3 | -1 | 3
0x30060080 | 0xFFFFFFFF | RT ROI Observations Sequence | VR_SQ | 1 | 1 | 1
0x30060082 | 0xFFFFFFFF | Observation Number | VR_IS | 1 | 1 | 1
0x30060084 | 0xFFFFFFFF | Referenced ROI Number | VR_IS | 1 | 1 | 1
0x30060085 | 0xFFFFFFFF | ROI Observation Label | VR_SH | 1 | 1 | 1
0x30060086 | 0xFFFFFFFF | RT ROI Identification Code Sequence | VR_SQ | 1 | 1 | 1
0x30060088 | 0xFFFFFFFF | ROI Observation Description | VR_ST | 1 | 1 | 1
0x300600A0 | 0xFFFFFFFF | Related RT ROI Observations Sequence | VR_SQ | 1 | 1 | 1
0x300600A4 | 0xFFFFFFFF | RT ROI Interpreted Type | VR_CS | 1 | 1 | 1
0x300600A6 | 0xFFFFFFFF | ROI Interpreter | VR_PN | 1 | 1 | 1
0x300600B0 | 0xFFFFFFFF | ROI Physical Properties Sequence | VR_SQ | 1 | 1 | 1
0x300600B2 | 0xFFFFFFFF | ROI Physical Property | VR_CS | 1 | 1 | 1
0x300600B4 | 0xFFFFFFFF | ROI Physical Property Value | VR_DS | 1 | 1 | 1
0x300600C0 | 0xFFFFFFFF | Frame of Reference Relationship Sequence | VR_SQ | 1 | 1 | 1
0x300600C2 | 0xFFFFFFFF | Related Frame of Reference UID | VR_UI | 1 | 1 | 1
0x300600C4 | 0xFFFFFFFF | Frame of Reference Transformation Type | VR_CS | 1 | 1 | 1
0x300600C6 | 0xFFFFFFFF | Frame of Reference Transformation Matrix | VR_DS,,, | 1,,,6, 16, 16 |  |
0x300600C8 | 0xFFFFFFFF | Frame of Reference Transformation Comment | VR_LO | 1 | 1 | 1
0x30080010 | 0xFFFFFFFF | Measured Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x30080012 | 0xFFFFFFFF | Measured Dose Description | VR_ST | 1 | 1 | 1
0x30080014 | 0xFFFFFFFF | Measured Dose Type | VR_CS | 1 | 1 | 1
0x30080016 | 0xFFFFFFFF | Measured Dose Value | VR_DS | 1 | 1 | 1
0x30080020 | 0xFFFFFFFF | Treatment Session Beam Sequence | VR_SQ | 1 | 1 | 1
0x30080022 | 0xFFFFFFFF | Current Fraction Number | VR_IS | 1 | 1 | 1
0x30080024 | 0xFFFFFFFF | Treatment Control Point Date | VR_DA | 1 | 1 | 1
0x30080025 | 0xFFFFFFFF | Treatment Control Point Time | VR_TM | 1 | 1 | 1
0x3008002A | 0xFFFFFFFF | Treatment Termination Status | VR_CS | 1 | 1 | 1
0x3008002B | 0xFFFFFFFF | Treatment Termination Code | VR_SH | 1 | 1 | 1
0x3008002C | 0xFFFFFFFF | Treatment Verification Status | VR_CS | 1 | 1 | 1
0x30080030 | 0xFFFFFFFF | Referenced Treatment Record Sequence | VR_SQ | 1 | 1 | 1
0x30080032 | 0xFFFFFFFF | Specified Primary Meterset | VR_DS | 1 | 1 | 1
0x30080033 | 0xFFFFFFFF | Specified Secondary Meterset | VR_DS | 1 | 1 | 1
0x30080036 | 0xFFFFFFFF | Delivered Primary Meterset | VR_DS | 1 | 1 | 1
0x30080037 | 0xFFFFFFFF | Delivered Secondary Meterset | VR_DS | 1 | 1 | 1
0x3008003A | 0xFFFFFFFF | Specified Treatment Time | VR_DS | 1 | 1 | 1
0x3008003B | 0xFFFFFFFF | Delivered Treatment Time | VR_DS | 1 | 1 | 1
0x30080040 | 0xFFFFFFFF | Control Point Delivery Sequence | VR_SQ | 1 | 1 | 1
0x30080042 | 0xFFFFFFFF | Specified Meterset | VR_DS | 1 | 1 | 1
0x30080044 | 0xFFFFFFFF | Delivered Meterset | VR_DS | 1 | 1 | 1
0x30080048 | 0xFFFFFFFF | Dose Rate Delivered | VR_DS | 1 | 1 | 1
0x30080050 | 0xFFFFFFFF | Treatment Summary Calculated Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x30080052 | 0xFFFFFFFF | Cumulative Dose to Dose Reference | VR_DS | 1 | 1 | 1
0x30080054 | 0xFFFFFFFF | First Treatment Date | VR_DA | 1 | 1 | 1
0x30080056 | 0xFFFFFFFF | Most Recent Treatment Date | VR_DA | 1 | 1 | 1
0x3008005A | 0xFFFFFFFF | Number of Fractions Delivered | VR_IS | 1 | 1 | 1
0x30080060 | 0xFFFFFFFF | Override Sequence | VR_SQ | 1 | 1 | 1
0x30080062 | 0xFFFFFFFF | Override Parameter Pointer | VR_AT | 1 | 1 | 1
0x30080064 | 0xFFFFFFFF | Measured Dose Reference Number | VR_IS | 1 | 1 | 1
0x30080066 | 0xFFFFFFFF | Override Reason | VR_ST | 1 | 1 | 1
0x30080070 | 0xFFFFFFFF | Calculated Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x30080072 | 0xFFFFFFFF | Calculated Dose Reference Number | VR_IS | 1 | 1 | 1
0x30080074 | 0xFFFFFFFF | Calculated Dose Reference Description | VR_ST | 1 | 1 | 1
0x30080076 | 0xFFFFFFFF | Calculated Dose Reference Dose Value | VR_DS | 1 | 1 | 1
0x30080078 | 0xFFFFFFFF | Start Meterset | VR_DS | 1 | 1 | 1
0x3008007A | 0xFFFFFFFF | End Meterset | VR_DS | 1 | 1 | 1
0x30080080 | 0xFFFFFFFF | Referenced Measured Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x30080082 | 0xFFFFFFFF | Referenced Measured Dose Reference Number | VR_IS | 1 | 1 | 1
0x30080090 | 0xFFFFFFFF | Referenced Calculated Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x30080092 | 0xFFFFFFFF | Referenced Calculated Dose Reference Number | VR_IS | 1 | 1 | 1
0x300800A0 | 0xFFFFFFFF | Beam Limiting Device Leaf Pairs Sequence | VR_SQ | 1 | 1 | 1
0x300800B0 | 0xFFFFFFFF | Recorded Wedge Sequence | VR_SQ | 1 | 1 | 1
0x300800C0 | 0xFFFFFFFF | Recorded Compensator Sequence | VR_SQ | 1 | 1 | 1
0x300800D0 | 0xFFFFFFFF | Recorded Block Sequence | VR_SQ | 1 | 1 | 1
0x300800E0 | 0xFFFFFFFF | Treatment Summary Measured Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x30080100 | 0xFFFFFFFF | Recorded Source Sequence | VR_SQ | 1 | 1 | 1
0x30080105 | 0xFFFFFFFF | Source Serial Number | VR_LO | 1 | 1 | 1
0x30080110 | 0xFFFFFFFF | Treatment Session Application Setup Sequence | VR_SQ | 1 | 1 | 1
0x30080116 | 0xFFFFFFFF | Application Setup Check | VR_CS | 1 | 1 | 1
0x30080120 | 0xFFFFFFFF | Recorded Brachy Accessory Device Sequence | VR_SQ | 1 | 1 | 1
0x30080122 | 0xFFFFFFFF | Referenced Brachy Accessory Device Number | VR_IS | 1 | 1 | 1
0x30080130 | 0xFFFFFFFF | Recorded Channel Sequence | VR_SQ | 1 | 1 | 1
0x30080132 | 0xFFFFFFFF | Specified Channel Total Time | VR_DS | 1 | 1 | 1
0x30080134 | 0xFFFFFFFF | Delivered Channel Total Time | VR_DS | 1 | 1 | 1
0x30080136 | 0xFFFFFFFF | Specified Number of Pulses | VR_IS | 1 | 1 | 1
0x30080138 | 0xFFFFFFFF | Delivered Number of Pulses | VR_IS | 1 | 1 | 1
0x3008013A | 0xFFFFFFFF | Specified Pulse Repetition Interval | VR_DS | 1 | 1 | 1
0x3008013C | 0xFFFFFFFF | Delivered Pulse Repetition Interval | VR_DS | 1 | 1 | 1
0x30080140 | 0xFFFFFFFF | Recorded Source Applicator Sequence | VR_SQ | 1 | 1 | 1
0x30080142 | 0xFFFFFFFF | Referenced Source Applicator Number | VR_IS | 1 | 1 | 1
0x30080150 | 0xFFFFFFFF | Recorded Channel Shield Sequence | VR_SQ | 1 | 1 | 1
0x30080152 | 0xFFFFFFFF | Referenced Channel Shield Number | VR_IS | 1 | 1 | 1
0x30080160 | 0xFFFFFFFF | Brachy Control Point Delivered Sequence | VR_SQ | 1 | 1 | 1
0x30080162 | 0xFFFFFFFF | Safe Position Exit Date | VR_DA | 1 | 1 | 1
0x30080164 | 0xFFFFFFFF | Safe Position Exit Time | VR_TM | 1 | 1 | 1
0x30080166 | 0xFFFFFFFF | Safe Position Return Date | VR_DA | 1 | 1 | 1
0x30080168 | 0xFFFFFFFF | Safe Position Return Time | VR_TM | 1 | 1 | 1
0x30080200 | 0xFFFFFFFF | Current Treatment Status | VR_CS | 1 | 1 | 1
0x30080202 | 0xFFFFFFFF | Treatment Status Comment | VR_ST | 1 | 1 | 1
0x30080220 | 0xFFFFFFFF | Fraction Group Summary Sequence | VR_SQ | 1 | 1 | 1
0x30080223 | 0xFFFFFFFF | Referenced Fraction Number | VR_IS | 1 | 1 | 1
0x30080224 | 0xFFFFFFFF | Fraction Group Type | VR_CS | 1 | 1 | 1
0x30080230 | 0xFFFFFFFF | Beam Stopper Position | VR_CS | 1 | 1 | 1
0x30080240 | 0xFFFFFFFF | Fraction Status Summary Sequence | VR_SQ | 1 | 1 | 1
0x30080250 | 0xFFFFFFFF | Treatment Date | VR_DA | 1 | 1 | 1
0x30080251 | 0xFFFFFFFF | Treatment Time | VR_TM | 1 | 1 | 1
0x300A0002 | 0xFFFFFFFF | RT Plan Label | VR_SH | 1 | 1 | 1
0x300A0003 | 0xFFFFFFFF | RT Plan Name | VR_LO | 1 | 1 | 1
0x300A0004 | 0xFFFFFFFF | RT Plan Description | VR_ST | 1 | 1 | 1
0x300A0006 | 0xFFFFFFFF | RT Plan Date | VR_DA | 1 | 1 | 1
0x300A0007 | 0xFFFFFFFF | RT Plan Time | VR_TM | 1 | 1 | 1
0x300A0009 | 0xFFFFFFFF | Treatment Protocols | VR_LO | 1 | -1 | 1
0x300A000A | 0xFFFFFFFF | Treatment Intent | VR_CS | 1 | 1 | 1
0x300A000B | 0xFFFFFFFF | Treatment Sites | VR_LO | 1 | -1 | 1
0x300A000C | 0xFFFFFFFF | RT Plan Geometry | VR_CS | 1 | 1 | 1
0x300A000E | 0xFFFFFFFF | Prescription Description | VR_ST | 1 | 1 | 1
0x300A0010 | 0xFFFFFFFF | Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x300A0012 | 0xFFFFFFFF | Dose Reference Number | VR_IS | 1 | 1 | 1
0x300A0014 | 0xFFFFFFFF | Dose Reference Structure Type | VR_CS | 1 | 1 | 1
0x300A0015 | 0xFFFFFFFF | Nominal Beam Energy Unit | VR_CS | 1 | 1 | 1
0x300A0016 | 0xFFFFFFFF | Dose Reference Description | VR_LO | 1 | 1 | 1
0x300A0018 | 0xFFFFFFFF | Dose Reference Point Coordinates | VR_DS | 3 | 3 | 3
0x300A001A | 0xFFFFFFFF | Nominal Prior Dose | VR_DS | 1 | 1 | 1
0x300A0020 | 0xFFFFFFFF | Dose Reference Type | VR_CS | 1 | 1 | 1
0x300A0021 | 0xFFFFFFFF | Constraint Weight | VR_DS | 1 | 1 | 1
0x300A0022 | 0xFFFFFFFF | Delivery Warning Dose | VR_DS | 1 | 1 | 1
0x300A0023 | 0xFFFFFFFF | Delivery Maximum Dose | VR_DS | 1 | 1 | 1
0x300A0025 | 0xFFFFFFFF | Target Minimum Dose | VR_DS | 1 | 1 | 1
0x300A0026 | 0xFFFFFFFF | Target Prescription Dose | VR_DS | 1 | 1 | 1
0x300A0027 | 0xFFFFFFFF | Target Maximum Dose | VR_DS | 1 | 1 | 1
0x300A0028 | 0xFFFFFFFF | Target Underdose Volume Fraction | VR_DS | 1 | 1 | 1
0x300A002A | 0xFFFFFFFF | Organ at Risk Full-volume Dose | VR_DS | 1 | 1 | 1
0x300A002B | 0xFFFFFFFF | Organ at Risk Limit Dose | VR_DS | 1 | 1 | 1
0x300A002C | 0xFFFFFFFF | Organ at Risk Maximum Dose | VR_DS | 1 | 1 | 1
0x300A002D | 0xFFFFFFFF | Organ at Risk Overdose Volume Fraction | VR_DS | 1 | 1 | 1
0x300A0040 | 0xFFFFFFFF | Tolerance Table Sequence | VR_SQ | 1 | 1 | 1
0x300A0042 | 0xFFFFFFFF | Tolerance Table Number | VR_IS | 1 | 1 | 1
0x300A0043 | 0xFFFFFFFF | Tolerance Table Label | VR_SH | 1 | 1 | 1
0x300A0044 | 0xFFFFFFFF | Gantry Angle Tolerance | VR_DS | 1 | 1 | 1
0x300A0046 | 0xFFFFFFFF | Beam Limiting Device Angle Tolerance | VR_DS | 1 | 1 | 1
0x300A0048 | 0xFFFFFFFF | Beam Limiting Device Tolerance Sequence | VR_SQ | 1 | 1 | 1
0x300A004A | 0xFFFFFFFF | Beam Limiting Device Position Tolerance | VR_DS | 1 | 1 | 1
0x300A004C | 0xFFFFFFFF | Patient Support Angle Tolerance | VR_DS | 1 | 1 | 1
0x300A004E | 0xFFFFFFFF | Table Top Eccentric Angle Tolerance | VR_DS | 1 | 1 | 1
0x300A0051 | 0xFFFFFFFF | Table Top Vertical Position Tolerance | VR_DS | 1 | 1 | 1
0x300A0052 | 0xFFFFFFFF | Table Top Longitudinal Position Tolerance | VR_DS | 1 | 1 | 1
0x300A0053 | 0xFFFFFFFF | Table Top Lateral Position Tolerance | VR_DS | 1 | 1 | 1
0x300A0055 | 0xFFFFFFFF | RT Plan Relationship | VR_CS | 1 | 1 | 1
0x300A0070 | 0xFFFFFFFF | Fraction Group Sequence | VR_SQ | 1 | 1 | 1
0x300A0071 | 0xFFFFFFFF | Fraction Group Number | VR_IS | 1 | 1 | 1
0x300A0078 | 0xFFFFFFFF | Number of Fractions Planned | VR_IS | 1 | 1 | 1
0x300A0079 | 0xFFFFFFFF | Number of Fractions Per Day | VR_IS | 1 | 1 | 1
0x300A007A | 0xFFFFFFFF | Repeat Fraction Cycle Length | VR_IS | 1 | 1 | 1
0x300A007B | 0xFFFFFFFF | Fraction Pattern | VR_LT | 1 | 1 | 1
0x300A0080 | 0xFFFFFFFF | Number of Beams | VR_IS | 1 | 1 | 1
0x300A0082 | 0xFFFFFFFF | Beam Dose Specification Point | VR_DS | 3 | 3 | 3
0x300A0084 | 0xFFFFFFFF | Beam Dose | VR_DS | 1 | 1 | 1
0x300A0086 | 0xFFFFFFFF | Beam Meterset | VR_DS | 1 | 1 | 1
0x300A00A0 | 0xFFFFFFFF | Number of Brachy Application Setups | VR_IS | 1 | 1 | 1
0x300A00A2 | 0xFFFFFFFF | Brachy Application Setup Dose Specification Point | VR_DS | 3 | 3 | 3
0x300A00A4 | 0xFFFFFFFF | Brachy Application Setup Dose | VR_DS | 1 | 1 | 1
0x300A00B0 | 0xFFFFFFFF | Beam Sequence | VR_SQ | 1 | 1 | 1
0x300A00B2 | 0xFFFFFFFF | Treatment Machine Name | VR_SH | 1 | 1 | 1
0x300A00B3 | 0xFFFFFFFF | Primary Dosimeter Unit | VR_CS | 1 | 1 | 1
0x300A00B4 | 0xFFFFFFFF | Source-Axis Distance | VR_DS | 1 | 1 | 1
0x300A00B6 | 0xFFFFFFFF | Beam Limiting Device Sequence | VR_SQ | 1 | 1 | 1
0x300A00B8 | 0xFFFFFFFF | RT Beam Limiting Device Type | VR_CS | 1 | 1 | 1
0x300A00BA | 0xFFFFFFFF | Source to Beam Limiting Device Distance | VR_DS | 1 | 1 | 1
0x300A00BC | 0xFFFFFFFF | Number of Leaf/Jaw Pairs | VR_IS | 1 | 1 | 1
0x300A00BE | 0xFFFFFFFF | Leaf Position Boundaries | VR_DS | 3 | -1 | 1
0x300A00C0 | 0xFFFFFFFF | Beam Number | VR_IS | 1 | 1 | 1
0x300A00C2 | 0xFFFFFFFF | Beam Name | VR_LO | 1 | 1 | 1
0x300A00C3 | 0xFFFFFFFF | Beam Description | VR_ST | 1 | 1 | 1
0x300A00C4 | 0xFFFFFFFF | Beam Type | VR_CS | 1 | 1 | 1
0x300A00C6 | 0xFFFFFFFF | Radiation Type | VR_CS | 1 | 1 | 1
0x300A00C8 | 0xFFFFFFFF | Reference Image Number | VR_IS | 1 | 1 | 1
0x300A00CA | 0xFFFFFFFF | Planned Verification Image Sequence | VR_SQ | 1 | 1 | 1
0x300A00CC | 0xFFFFFFFF | Imaging Device-Specific Acquisition Parameters | VR_LO | 1 | -1 | 1
0x300A00CE | 0xFFFFFFFF | Treatment Delivery Type | VR_CS | 1 | 1 | 1
0x300A00D0 | 0xFFFFFFFF | Number of Wedges | VR_IS | 1 | 1 | 1
0x300A00D1 | 0xFFFFFFFF | Wedge Sequence | VR_SQ | 1 | 1 | 1
0x300A00D2 | 0xFFFFFFFF | Wedge Number | VR_IS | 1 | 1 | 1
0x300A00D3 | 0xFFFFFFFF | Wedge Type | VR_CS | 1 | 1 | 1
0x300A00D4 | 0xFFFFFFFF | Wedge ID | VR_SH | 1 | 1 | 1
0x300A00D5 | 0xFFFFFFFF | Wedge Angle | VR_IS | 1 | 1 | 1
0x300A00D6 | 0xFFFFFFFF | Wedge Factor | VR_DS | 1 | 1 | 1
0x300A00D8 | 0xFFFFFFFF | Wedge Orientation | VR_DS | 1 | 1 | 1
0x300A00DA | 0xFFFFFFFF | Source to Wedge Tray Distance | VR_DS | 1 | 1 | 1
0x300A00E0 | 0xFFFFFFFF | Number of Compensators | VR_IS | 1 | 1 | 1
0x300A00E1 | 0xFFFFFFFF | Material ID | VR_SH | 1 | 1 | 1
0x300A00E2 | 0xFFFFFFFF | Total Compensator Tray Factor | VR_DS | 1 | 1 | 1
0x300A00E3 | 0xFFFFFFFF | Compensator Sequence | VR_SQ | 1 | 1 | 1
0x300A00E4 | 0xFFFFFFFF | Compensator Number | VR_IS | 1 | 1 | 1
0x300A00E5 | 0xFFFFFFFF | Compensator ID | VR_SH | 1 | 1 | 1
0x300A00E6 | 0xFFFFFFFF | Source to Compensator Tray Distance | VR_DS | 1 | 1 | 1
0x300A00E7 | 0xFFFFFFFF | Compensator Rows | VR_IS | 1 | 1 | 1
0x300A00E8 | 0xFFFFFFFF | Compensator Columns | VR_IS | 1 | 1 | 1
0x300A00E9 | 0xFFFFFFFF | Compensator Pixel Spacing | VR_DS | 2 | 2 | 2
0x300A00EA | 0xFFFFFFFF | Compensator Position | VR_DS | 2 | 2 | 2
0x300A00EB | 0xFFFFFFFF | Compensator Transmission Data | VR_DS | 1 | -1 | 1
0x300A00EC | 0xFFFFFFFF | Compensator Thickness Data | VR_DS | 1 | -1 | 1
0x300A00ED | 0xFFFFFFFF | Number of Boli | VR_IS | 1 | 1 | 1
0x300A00EE | 0xFFFFFFFF | Compensator Type | VR_CS | 1 | 1 | 1
0x300A00F0 | 0xFFFFFFFF | Number of Blocks | VR_IS | 1 | 1 | 1
0x300A00F2 | 0xFFFFFFFF | Total Block Tray Factor | VR_DS | 1 | 1 | 1
0x300A00F4 | 0xFFFFFFFF | Block Sequence | VR_SQ | 1 | 1 | 1
0x300A00F5 | 0xFFFFFFFF | Block Tray ID | VR_SH | 1 | 1 | 1
0x300A00F6 | 0xFFFFFFFF | Source to Block Tray Distance | VR_DS | 1 | 1 | 1
0x300A00F8 | 0xFFFFFFFF | Block Type | VR_CS | 1 | 1 | 1
0x300A00FA | 0xFFFFFFFF | Block Divergence | VR_CS | 1 | 1 | 1
0x300A00FC | 0xFFFFFFFF | Block Number | VR_IS | 1 | 1 | 1
0x300A00FE | 0xFFFFFFFF | Block Name | VR_LO | 1 | 1 | 1
0x300A0100 | 0xFFFFFFFF | Block Thickness | VR_DS | 1 | 1 | 1
0x300A0102 | 0xFFFFFFFF | Block Transmission | VR_DS | 1 | 1 | 1
0x300A0104 | 0xFFFFFFFF | Block Number of Points | VR_IS | 1 | 1 | 1
0x300A0106 | 0xFFFFFFFF | Block Data | VR_DS | 2 | -1 | 2
0x300A0107 | 0xFFFFFFFF | Applicator Sequence | VR_SQ | 1 | 1 | 1
0x300A0108 | 0xFFFFFFFF | Applicator ID | VR_SH | 1 | 1 | 1
0x300A0109 | 0xFFFFFFFF | Applicator Type | VR_CS | 1 | 1 | 1
0x300A010A | 0xFFFFFFFF | Applicator Description | VR_LO | 1 | 1 | 1
0x300A010C | 0xFFFFFFFF | Cumulative Dose Reference Coefficient | VR_DS | 1 | 1 | 1
0x300A010E | 0xFFFFFFFF | Final Cumulative Meterset Weight | VR_DS | 1 | 1 | 1
0x300A0110 | 0xFFFFFFFF | Number of Control Points | VR_IS | 1 | 1 | 1
0x300A0111 | 0xFFFFFFFF | Control Point Sequence | VR_SQ | 1 | 1 | 1
0x300A0112 | 0xFFFFFFFF | Control Point Index | VR_IS | 1 | 1 | 1
0x300A0114 | 0xFFFFFFFF | Nominal Beam Energy | VR_DS | 1 | 1 | 1
0x300A0115 | 0xFFFFFFFF | Dose Rate Set | VR_DS | 1 | 1 | 1
0x300A0116 | 0xFFFFFFFF | Wedge Position Sequence | VR_SQ | 1 | 1 | 1
0x300A0118 | 0xFFFFFFFF | Wedge Position | VR_CS | 1 | 1 | 1
0x300A011A | 0xFFFFFFFF | Beam Limiting Device Position Sequence | VR_SQ | 1 | 1 | 1
0x300A011C | 0xFFFFFFFF | Leaf/Jaw Positions | VR_DS | 2 | -1 | 2
0x300A011E | 0xFFFFFFFF | Gantry Angle | VR_DS | 1 | 1 | 1
0x300A011F | 0xFFFFFFFF | Gantry Rotation Direction | VR_CS | 1 | 1 | 1
0x300A0120 | 0xFFFFFFFF | Beam Limiting Device Angle | VR_DS | 1 | 1 | 1
0x300A0121 | 0xFFFFFFFF | Beam Limiting Device Rotation Direction | VR_CS | 1 | 1 | 1
0x300A0122 | 0xFFFFFFFF | Patient Support Angle | VR_DS | 1 | 1 | 1
0x300A0123 | 0xFFFFFFFF | Patient Support Rotation Direction | VR_CS | 1 | 1 | 1
0x300A0124 | 0xFFFFFFFF | Table Top Eccentric Axis Distance | VR_DS | 1 | 1 | 1
0x300A0125 | 0xFFFFFFFF | Table Top Eccentric Angle | VR_DS | 1 | 1 | 1
0x300A0126 | 0xFFFFFFFF | Table Top Eccentric Rotation Direction | VR_CS | 1 | 1 | 1
0x300A0128 | 0xFFFFFFFF | Table Top Vertical Position | VR_DS | 1 | 1 | 1
0x300A0129 | 0xFFFFFFFF | Table Top Longitudinal Position | VR_DS | 1 | 1 | 1
0x300A012A | 0xFFFFFFFF | Table Top Lateral Position | VR_DS | 1 | 1 | 1
0x300A012C | 0xFFFFFFFF | Isocenter Position | VR_DS | 3 | 3 | 3
0x300A012E | 0xFFFFFFFF | Surface Entry Point | VR_DS | 3 | 3 | 3
0x300A0130 | 0xFFFFFFFF | Source to Surface Distance | VR_DS | 1 | 1 | 1
0x300A0134 | 0xFFFFFFFF | Cumulative Meterset Weight | VR_DS | 1 | 1 | 1
0x300A0180 | 0xFFFFFFFF | Patient Setup Sequence | VR_SQ | 1 | 1 | 1
0x300A0182 | 0xFFFFFFFF | Patient Setup Number | VR_IS | 1 | 1 | 1
0x300A0184 | 0xFFFFFFFF | Patient Additional Position | VR_LO | 1 | 1 | 1
0x300A0190 | 0xFFFFFFFF | Fixation Device Sequence | VR_SQ | 1 | 1 | 1
0x300A0192 | 0xFFFFFFFF | Fixation Device Type | VR_CS | 1 | 1 | 1
0x300A0194 | 0xFFFFFFFF | Fixation Device Label | VR_SH | 1 | 1 | 1
0x300A0196 | 0xFFFFFFFF | Fixation Device Description | VR_ST | 1 | 1 | 1
0x300A0198 | 0xFFFFFFFF | Fixation Device Position | VR_SH | 1 | 1 | 1
0x300A01A0 | 0xFFFFFFFF | Shielding Device Sequence | VR_SQ | 1 | 1 | 1
0x300A01A2 | 0xFFFFFFFF | Shielding Device Type | VR_CS | 1 | 1 | 1
0x300A01A4 | 0xFFFFFFFF | Shielding Device Label | VR_SH | 1 | 1 | 1
0x300A01A6 | 0xFFFFFFFF | Shielding Device Description | VR_ST | 1 | 1 | 1
0x300A01A8 | 0xFFFFFFFF | Shielding Device Position | VR_SH | 1 | 1 | 1
0x300A01B0 | 0xFFFFFFFF | Setup Technique | VR_CS | 1 | 1 | 1
0x300A01B2 | 0xFFFFFFFF | Setup Technique Description | VR_ST | 1 | 1 | 1
0x300A01B4 | 0xFFFFFFFF | Setup Device Sequence | VR_SQ | 1 | 1 | 1
0x300A01B6 | 0xFFFFFFFF | Setup Device Type | VR_CS | 1 | 1 | 1
0x300A01B8 | 0xFFFFFFFF | Setup Device Label | VR_SH | 1 | 1 | 1
0x300A01BA | 0xFFFFFFFF | Setup Device Description | VR_ST | 1 | 1 | 1
0x300A01BC | 0xFFFFFFFF | Setup Device Parameter | VR_DS | 1 | 1 | 1
0x300A01D0 | 0xFFFFFFFF | Setup Reference Description | VR_ST | 1 | 1 | 1
0x300A01D2 | 0xFFFFFFFF | Table Top Vertical Setup Displacement | VR_DS | 1 | 1 | 1
0x300A01D4 | 0xFFFFFFFF | Table Top Longitudinal Setup Displacement | VR_DS | 1 | 1 | 1
0x300A01D6 | 0xFFFFFFFF | Table Top Lateral Setup Displacement | VR_DS | 1 | 1 | 1
0x300A0200 | 0xFFFFFFFF | Brachy Treatment Technique | VR_CS | 1 | 1 | 1
0x300A0202 | 0xFFFFFFFF | Brachy Treatment Type | VR_CS | 1 | 1 | 1
0x300A0206 | 0xFFFFFFFF | Treatment Machine Sequence | VR_SQ | 1 | 1 | 1
0x300A0210 | 0xFFFFFFFF | Source Sequence | VR_SQ | 1 | 1 | 1
0x300A0212 | 0xFFFFFFFF | Source Number | VR_IS | 1 | 1 | 1
0x300A0214 | 0xFFFFFFFF | Source Type | VR_CS | 1 | 1 | 1
0x300A0216 | 0xFFFFFFFF | Source Manufacturer | VR_LO | 1 | 1 | 1
0x300A0218 | 0xFFFFFFFF | Active Source Diameter | VR_DS | 1 | 1 | 1
0x300A021A | 0xFFFFFFFF | Active Source Length | VR_DS | 1 | 1 | 1
0x300A0222 | 0xFFFFFFFF | Source Encapsulation Nominal Thickness | VR_DS | 1 | 1 | 1
0x300A0224 | 0xFFFFFFFF | Source Encapsulation Nominal Transmission | VR_DS | 1 | 1 | 1
0x300A0226 | 0xFFFFFFFF | Source Isotope Name | VR_LO | 1 | 1 | 1
0x300A0228 | 0xFFFFFFFF | Source Isotope Half Life | VR_DS | 1 | 1 | 1
0x300A022A | 0xFFFFFFFF | Reference Air Kerma Rate | VR_DS | 1 | 1 | 1
0x300A022C | 0xFFFFFFFF | Air Kerma Rate Reference Date | VR_DA | 1 | 1 | 1
0x300A022E | 0xFFFFFFFF | Air Kerma Rate Reference Time | VR_TM | 1 | 1 | 1
0x300A0230 | 0xFFFFFFFF | Application Setup Sequence | VR_SQ | 1 | 1 | 1
0x300A0232 | 0xFFFFFFFF | Application Setup Type | VR_CS | 1 | 1 | 1
0x300A0234 | 0xFFFFFFFF | Application Setup Number | VR_IS | 1 | 1 | 1
0x300A0236 | 0xFFFFFFFF | Application Setup Name | VR_LO | 1 | 1 | 1
0x300A0238 | 0xFFFFFFFF | Application Setup Manufacturer | VR_LO | 1 | 1 | 1
0x300A0240 | 0xFFFFFFFF | Template Number | VR_IS | 1 | 1 | 1
0x300A0242 | 0xFFFFFFFF | Template Type | VR_SH | 1 | 1 | 1
0x300A0244 | 0xFFFFFFFF | Template Name | VR_LO | 1 | 1 | 1
0x300A0250 | 0xFFFFFFFF | Total Reference Air Kerma | VR_DS | 1 | 1 | 1
0x300A0260 | 0xFFFFFFFF | Brachy Accessory Device Sequence | VR_SQ | 1 | 1 | 1
0x300A0262 | 0xFFFFFFFF | Brachy Accessory Device Number | VR_IS | 1 | 1 | 1
0x300A0263 | 0xFFFFFFFF | Brachy Accessory Device ID | VR_SH | 1 | 1 | 1
0x300A0264 | 0xFFFFFFFF | Brachy Accessory Device Type | VR_CS | 1 | 1 | 1
0x300A0266 | 0xFFFFFFFF | Brachy Accessory Device Name | VR_LO | 1 | 1 | 1
0x300A026A | 0xFFFFFFFF | Brachy Accessory Device Nominal Thickness | VR_DS | 1 | 1 | 1
0x300A026C | 0xFFFFFFFF | Brachy Accessory Device Nominal Transmission | VR_DS | 1 | 1 | 1
0x300A0280 | 0xFFFFFFFF | Channel Sequence | VR_SQ | 1 | 1 | 1
0x300A0282 | 0xFFFFFFFF | Channel Number | VR_IS | 1 | 1 | 1
0x300A0284 | 0xFFFFFFFF | Channel Length | VR_DS | 1 | 1 | 1
0x300A0286 | 0xFFFFFFFF | Channel Total Time | VR_DS | 1 | 1 | 1
0x300A0288 | 0xFFFFFFFF | Source Movement Type | VR_CS | 1 | 1 | 1
0x300A028A | 0xFFFFFFFF | Number of Pulses | VR_IS | 1 | 1 | 1
0x300A028C | 0xFFFFFFFF | Pulse Repetition Interval | VR_DS | 1 | 1 | 1
0x300A0290 | 0xFFFFFFFF | Source Applicator Number | VR_IS | 1 | 1 | 1
0x300A0291 | 0xFFFFFFFF | Source Applicator ID | VR_SH | 1 | 1 | 1
0x300A0292 | 0xFFFFFFFF | Source Applicator Type | VR_CS | 1 | 1 | 1
0x300A0294 | 0xFFFFFFFF | Source Applicator Name | VR_LO | 1 | 1 | 1
0x300A0296 | 0xFFFFFFFF | Source Applicator Length | VR_DS | 1 | 1 | 1
0x300A0298 | 0xFFFFFFFF | Source Applicator Manufacturer | VR_LO | 1 | 1 | 1
0x300A029C | 0xFFFFFFFF | Source Applicator Wall Nominal Thickness | VR_DS | 1 | 1 | 1
0x300A029E | 0xFFFFFFFF | Source Applicator Wall Nominal Transmission | VR_DS | 1 | 1 | 1
0x300A02A0 | 0xFFFFFFFF | Source Applicator Step Size | VR_DS | 1 | 1 | 1
0x300A02A2 | 0xFFFFFFFF | Transfer Tube Number | VR_IS | 1 | 1 | 1
0x300A02A4 | 0xFFFFFFFF | Transfer Tube Length | VR_DS | 1 | 1 | 1
0x300A02B0 | 0xFFFFFFFF | Channel Shield Sequence | VR_SQ | 1 | 1 | 1
0x300A02B2 | 0xFFFFFFFF | Channel Shield Number | VR_IS | 1 | 1 | 1
0x300A02B3 | 0xFFFFFFFF | Channel Shield ID | VR_SH | 1 | 1 | 1
0x300A02B4 | 0xFFFFFFFF | Channel Shield Name | VR_LO | 1 | 1 | 1
0x300A02B8 | 0xFFFFFFFF | Channel Shield Nominal Thickness | VR_DS | 1 | 1 | 1
0x300A02BA | 0xFFFFFFFF | Channel Shield Nominal Transmission | VR_DS | 1 | 1 | 1
0x300A02C8 | 0xFFFFFFFF | Final Cumulative Time Weight | VR_DS | 1 | 1 | 1
0x300A02D0 | 0xFFFFFFFF | Brachy Control Point Sequence | VR_SQ | 1 | 1 | 1
0x300A02D2 | 0xFFFFFFFF | Control Point Relative Position | VR_DS | 1 | 1 | 1
0x300A02D4 | 0xFFFFFFFF | Control Point 3D Position | VR_DS | 3 | 3 | 3
0x300A02D6 | 0xFFFFFFFF | Cumulative Time Weight | VR_DS | 1 | 1 | 1
0x300C0002 | 0xFFFFFFFF | Referenced RT Plan Sequence | VR_SQ | 1 | 1 | 1
0x300C0004 | 0xFFFFFFFF | Referenced Beam Sequence | VR_SQ | 1 | 1 | 1
0x300C0006 | 0xFFFFFFFF | Referenced Beam Number | VR_IS | 1 | 1 | 1
0x300C0007 | 0xFFFFFFFF | Referenced Reference Image Number | VR_IS | 1 | 1 | 1
0x300C0008 | 0xFFFFFFFF | Start Cumulative Meterset Weight | VR_DS | 1 | 1 | 1
0x300C0009 | 0xFFFFFFFF | End Cumulative Meterset Weight | VR_DS | 1 | 1 | 1
0x300C000A | 0xFFFFFFFF | Referenced Brachy Application Setup Sequence | VR_SQ | 1 | 1 | 1
0x300C000C | 0xFFFFFFFF | Referenced Brachy Application Setup Number | VR_IS | 1 | 1 | 1
0x300C000E | 0xFFFFFFFF | Referenced Source Number | VR_IS | 1 | 1 | 1
0x300C0020 | 0xFFFFFFFF | Referenced Fraction Group Sequence | VR_SQ | 1 | 1 | 1
0x300C0022 | 0xFFFFFFFF | Referenced Fraction Group Number | VR_IS | 1 | 1 | 1
0x300C0040 | 0xFFFFFFFF | Referenced Verification Image Sequence | VR_SQ | 1 | 1 | 1
0x300C0042 | 0xFFFFFFFF | Referenced Reference Image Sequence | VR_SQ | 1 | 1 | 1
0x300C0050 | 0xFFFFFFFF | Referenced Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x300C0051 | 0xFFFFFFFF | Referenced Dose Reference Number | VR_IS | 1 | 1 | 1
0x300C0055 | 0xFFFFFFFF | Brachy Referenced Dose Reference Sequence | VR_SQ | 1 | 1 | 1
0x300C0060 | 0xFFFFFFFF | Referenced Structure Set Sequence | VR_SQ | 1 | 1 | 1
0x300C006A | 0xFFFFFFFF | Referenced Patient Setup Number | VR_IS | 1 | 1 | 1
0x300C0080 | 0xFFFFFFFF | Referenced Dose Sequence | VR_SQ | 1 | 1 | 1
0x300C00A0 | 0xFFFFFFFF | Referenced Tolerance Table Number | VR_IS | 1 | 1 | 1
0x300C00B0 | 0xFFFFFFFF | Referenced Bolus Sequence | VR_SQ | 1 | 1 | 1
0x300C00C0 | 0xFFFFFFFF | Referenced Wedge Number | VR_IS | 1 | 1 | 1
0x300C00D0 | 0xFFFFFFFF | Referenced Compensator Number | VR_IS | 1 | 1 | 1
0x300C00E0 | 0xFFFFFFFF | Referenced Block Number | VR_IS | 1 | 1 | 1
0x300C00F0 | 0xFFFFFFFF | Referenced Control Point Index | VR_IS | 1 | 1 | 1
0x300E0002 | 0xFFFFFFFF | Approval Status | VR_CS | 1 | 1 | 1
0x300E0004 | 0xFFFFFFFF | Review Date | VR_DA | 1 | 1 | 1
0x300E0005 | 0xFFFFFFFF | Review Time | VR_TM | 1 | 1 | 1
0x300E0008 | 0xFFFFFFFF | Reviewer Name | VR_PN | 1 | 1 | 1
0x40000010 | 0xFFFFFFFF | Arbitrary (Retired) | VR_LT | 1 | -1 | 1
0x40004000 | 0xFFFFFFFF | Comments (Retired) | VR_LT | 1 | -1 | 1
0x40080040 | 0xFFFFFFFF | Results ID | VR_SH | 1 | 1 | 1
0x40080042 | 0xFFFFFFFF | Results ID Issuer | VR_LO | 1 | 1 | 1
0x40080050 | 0xFFFFFFFF | Referenced Interpretation Sequence | VR_SQ | 1 | 1 | 1
0x400800FF | 0xFFFFFFFF | Report Production Status | VR_CS | 1 | 1 | 1
0x40080100 | 0xFFFFFFFF | Interpretation Recorded Date | VR_DA | 1 | 1 | 1
0x40080101 | 0xFFFFFFFF | Interpretation Recorded Time | VR_TM | 1 | 1 | 1
0x40080102 | 0xFFFFFFFF | Interpretation Recorder | VR_PN | 1 | 1 | 1
0x40080103 | 0xFFFFFFFF | Reference to Recorded Sound | VR_LO | 1 | 1 | 1
0x40080108 | 0xFFFFFFFF | Interpretation Transcription Date | VR_DA | 1 | 1 | 1
0x40080109 | 0xFFFFFFFF | Interpretation Transcription Time | VR_TM | 1 | 1 | 1
0x4008010A | 0xFFFFFFFF | Interpretation Transcriber | VR_PN | 1 | 1 | 1
0x4008010B | 0xFFFFFFFF | Interpretation Text | VR_ST | 1 | 1 | 1
0x4008010C | 0xFFFFFFFF | Interpretation Author | VR_PN | 1 | 1 | 1
0x40080111 | 0xFFFFFFFF | Interpretation Approver Sequence | VR_SQ | 1 | 1 | 1
0x40080112 | 0xFFFFFFFF | Interpretation Approval Date | VR_DA | 1 | 1 | 1
0x40080113 | 0xFFFFFFFF | Interpretation Approval Time | VR_TM | 1 | 1 | 1
0x40080114 | 0xFFFFFFFF | Physician Approving Interpretation | VR_PN | 1 | 1 | 1
0x40080115 | 0xFFFFFFFF | Interpretation Diagnosis Description | VR_LT | 1 | 1 | 1
0x40080117 | 0xFFFFFFFF | Interpretation Diagnosis Code Sequence | VR_SQ | 1 | 1 | 1
0x40080118 | 0xFFFFFFFF | Results Distribution List Sequence | VR_SQ | 1 | 1 | 1
0x40080119 | 0xFFFFFFFF | Distribution Name | VR_PN | 1 | 1 | 1
0x4008011A | 0xFFFFFFFF | Distribution Address | VR_LO | 1 | 1 | 1
0x40080200 | 0xFFFFFFFF | Interpretation ID | VR_SH | 1 | 1 | 1
0x40080202 | 0xFFFFFFFF | Interpretation ID Issuer | VR_LO | 1 | 1 | 1
0x40080210 | 0xFFFFFFFF | Interpretation Type ID | VR_CS | 1 | 1 | 1
0x40080212 | 0xFFFFFFFF | Interpretation Status ID | VR_CS | 1 | 1 | 1
0x40080300 | 0xFFFFFFFF | Impressions | VR_ST | 1 | 1 | 1
0x40084000 | 0xFFFFFFFF | Results Comments | VR_ST | 1 | 1 | 1
0x50000005 | 0xFF00FFFF | Curve Dimensions | VR_US | 1 | 1 | 1
0x50000010 | 0xFF00FFFF | Number of Points | VR_US | 1 | 1 | 1
0x50000020 | 0xFF00FFFF | Type of Data | VR_CS | 1 | 1 | 1
0x50000022 | 0xFF00FFFF | Curve Description | VR_LO | 1 | 1 | 1
0x50000030 | 0xFF00FFFF | Axis Units | VR_SH | 1 | -1 | 1
0x50000040 | 0xFF00FFFF | Axis Labels | VR_SH | 1 | -1 | 1
0x50000103 | 0xFF00FFFF | Data Value Representation | VR_US | 1 | 1 | 1
0x50000104 | 0xFF00FFFF | Minimum Coordinate Value | VR_US | 1 | -1 | 1
0x50000105 | 0xFF00FFFF | Maximum Coordinate Value | VR_US | 1 | -1 | 1
0x50000106 | 0xFF00FFFF | Curve Range | VR_SH | 1 | -1 | 1
0x50000110 | 0xFF00FFFF | Curve Data Descriptor | VR_US | 1 | -1 | 1
0x50000112 | 0xFF00FFFF | Coordinate Start Value | VR_US | 1 | 1 | 1
0x50000114 | 0xFF00FFFF | Coordinate Step Value | VR_US | 1 | 1 | 1
0x50002000 | 0xFF00FFFF | Audio Type | VR_US | 1 | 1 | 1
0x50002002 | 0xFF00FFFF | Audio Sample Format | VR_US | 1 | 1 | 1
0x50002004 | 0xFF00FFFF | Number of Channels | VR_US | 1 | 1 | 1
0x50002006 | 0xFF00FFFF | Number of Samples | VR_UL | 1 | 1 | 1
0x50002008 | 0xFF00FFFF | Sample Rate | VR_UL | 1 | 1 | 1
0x5000200A | 0xFF00FFFF | Total Time | VR_UL | 1 | 1 | 1
0x5000200C | 0xFF00FFFF | Audio Sample Data | VR_OW | 1 | 1 | 1
0x5000200E | 0xFF00FFFF | Audio Comments | VR_LT | 1 | 1 | 1
0x50002500 | 0xFF00FFFF | Curve Label | VR_LO | 1 | 1 | 1
0x50002600 | 0xFF00FFFF | Referenced Overlay Sequence 50xx | VR_SQ | 1 | 1 | 1
0x50002610 | 0xFF00FFFF | Referenced Overlay Group | VR_US | 1 | 1 | 1
0x50003000 | 0xFF00FFFF | Curve Data | VR_OW | 1 | 1 | 1
0x60000010 | 0xFF00FFFF | Overlay Rows | VR_US | 1 | 1 | 1
0x60000011 | 0xFF00FFFF | Overlay Columns | VR_US | 1 | 1 | 1
0x60000012 | 0xFF00FFFF | Overlay Planes | VR_US | 1 | 1 | 1
0x60000015 | 0xFF00FFFF | Number of Frames in Overlay | VR_IS | 1 | 1 | 1
0x60000022 | 0xFF00FFFF | Overlay Description | VR_LO | 1 | 1 | 1
0x60000040 | 0xFF00FFFF | Overlay Type | VR_CS | 1 | 1 | 1
0x60000045 | 0xFF00FFFF | Overlay Subtype | VR_LO | 1 | 1 | 1
0x60000050 | 0xFF00FFFF | Overlay Origin | VR_SS | 2 | 2 | 2
0x60000051 | 0xFF00FFFF | Image Frame Origin | VR_US | 1 | 1 | 1
0x60000052 | 0xFF00FFFF | Overlay Plane Origin | VR_US | 1 | 1 | 1
0x60000060 | 0xFF00FFFF | Compression Code (Retired) | VR_LO | 1 | 1 | 1
0x60000061 | 0xFF00FFFF | Overlay Compression Originator | VR_SH | 1 | 1 | 1
0x60000062 | 0xFF00FFFF | Overlay Compression Label | VR_SH | 1 | 1 | 1
0x60000063 | 0xFF00FFFF | Overlay Compression Description | VR_SH | 1 | 1 | 1
0x60000066 | 0xFF00FFFF | Overlay Compression Step Pointers | VR_AT | 1 | -1 | 1
0x60000068 | 0xFF00FFFF | Overlay Repeat Interval | VR_US | 1 | 1 | 1
0x60000069 | 0xFF00FFFF | Overlay Bits Grouped | VR_US | 1 | 1 | 1
0x60000100 | 0xFF00FFFF | Overlay Bits Allocated | VR_US | 1 | 1 | 1
0x60000102 | 0xFF00FFFF | Overlay Bit Position | VR_US | 1 | 1 | 1
0x60000110 | 0xFF00FFFF | Overlay Format (Retired) | VR_LO | 1 | 1 | 1
0x60000200 | 0xFF00FFFF | Overlay Location (Retired) | VR_US | 1 | 1 | 1
0x60000800 | 0xFF00FFFF | Overlay Code Label | VR_LO | 1 | -1 | 1
0x60000802 | 0xFF00FFFF | Overlay Number of Tables | VR_US | 1 | 1 | 1
0x60000803 | 0xFF00FFFF | Overlay Code Table Location | VR_AT | 1 | -1 | 1
0x60000804 | 0xFF00FFFF | Overlay Bits For Code Word | VR_US | 1 | 1 | 1
0x60001100 | 0xFF00FFFF | Overlay Descriptor - Gray (Retired) | VR_US | 1 | 1 | 1
0x60001101 | 0xFF00FFFF | Overlay Descriptor - Red (Retired) | VR_US | 1 | 1 | 1
0x60001102 | 0xFF00FFFF | Overlay Descriptor - Green (Retired) | VR_US | 1 | 1 | 1
0x60001103 | 0xFF00FFFF | Overlay Descriptor - Blue (Retired) | VR_US | 1 | 1 | 1
0x60001200 | 0xFF00FFFF | Overlays - Gray (Retired) | VR_US | 1 | -1 | 1
0x60001201 | 0xFF00FFFF | Overlays - Red (Retired) | VR_US | 1 | -1 | 1
0x60001202 | 0xFF00FFFF | Overlays - Green (Retired) | VR_US | 1 | -1 | 1
0x60001203 | 0xFF00FFFF | Overlays - Blue (Retired) | VR_US | 1 | -1 | 1
0x60001301 | 0xFF00FFFF | ROI Area | VR_IS | 1 | 1 | 1
0x60001302 | 0xFF00FFFF | ROI Mean | VR_DS | 1 | 1 | 1
0x60001303 | 0xFF00FFFF | ROI Standard Deviation | VR_DS | 1 | 1 | 1
0x60001500 | 0xFF00FFFF | Overlay Label | VR_LO | 1 | 1 | 1
0x60003000 | 0xFF00FFFF | Overlay Data | VR_OW | 1 | 1 | 1
0x60004000 | 0xFF00FFFF | Comments (Retired) | VR_LT | 1 | -1 | 1
0x7FE00010 | 0xFFFFFFFF | Pixel Data | VR_OW | 1 | 1 | 1
0x7FE00020 | 0xFFFFFFFF | Coefficients SDVN | VR_OW | 1 | -1 | 1
0x7FE00030 | 0xFFFFFFFF | Coefficients SDHN | VR_OW | 1 | -1 | 1
0x7FE00040 | 0xFFFFFFFF | Coefficients SDDN | VR_OW | 1 | -1 | 1
0x7F000010 | 0xFF00FFFF | Variable Pixel Data | VR_OW | 1 | 1 | 1
0x7F000011 | 0xFF00FFFF | Variable Next Data Group | VR_US | 1 | 1 | 1
0x7F000020 | 0xFF00FFFF | Variable Coefficients SDVN | VR_OW | 1 | -1 | 1
0x7F000030 | 0xFF00FFFF | Variable Coefficients SDHN | VR_OW | 1 | -1 | 1
0x7F000040 | 0xFF00FFFF | Variable Coefficients SDDN | VR_OW | 1 | -1 | 1
0xFFFCFFFC | 0xFFFFFFFF | Data Set Trailing Padding | VR_OB | 1 | 1 | 1
0xFFFEE000 | 0xFFFFFFFF | Item | VR_OB | 1 | 1 | 1
0xFFFEE00D | 0xFFFFFFFF | Item Delimitation Item | VR_OB | 1 | 1 | 1
0xFFFEE0DD | 0xFFFFFFFF | Sequence Delimitation Item | VR_OB | 1 | 1 | 1


Default Value Representation Tag Table

Default Value Representation Table

The table below contains the default values for the Value Representations supported by DICOM.

Code | Name | Length | Restriction | UnitSize
VR_AE | Application Entity | 16 | VR_STRING | VR_MAXIMUM | 1
VR_AS | Age String | 4 | VR_TEXT | VR_FIXED | 1
VR_AT | Attribute Tag | 4 | VR_BINARY | VR_FIXED | 4
VR_CS | Code String | 16 | VR_STRING | VR_MAXIMUM | 1
VR_DA | Date | 8 | VR_TEXT | VR_FIXED | 1
VR_DS | Decimal String | 16 | VR_STRING | VR_MAXIMUM | 1
VR_DT | Date Time | 26 | VR_TEXT | VR_MAXIMUM | 1
VR_FD | Floating Point Double | 8 | VR_BINARY | VR_FIXED | 8
VR_FL | Floating Point Single | 4 | VR_BINARY | VR_FIXED | 4
VR_IS | Integer String | 12 | VR_STRING | VR_MAXIMUM | 1
VR_LO | Long String | 64 | VR_STRING | VR_MAXIMUM | 1
VR_LT | Long Text | 10240 | VR_TEXT | VR_MAXIMUM | 1
VR_OB | Other Byte String | 0 | VR_BINARY | VR_ANY | 1
VR_OW | Other Word String | 0 | VR_BINARY | VR_ANY | 2
VR_PN | Person Name | 64 | VR_TEXT | VR_MAXIMUM_GROUP | 1
VR_SH | Short String | 16 | VR_STRING | VR_MAXIMUM | 1
VR_SL | Signed Long | 4 | VR_BINARY | VR_FIXED | 4
VR_SQ | Sequence of Items | 0 | VR_NOT_APPLICABLE | 1
VR_SS | Signed Short | 2 | VR_BINARY | VR_FIXED | 2
VR_ST | Short Text | 1024 | VR_TEXT | VR_MAXIMUM | 1
VR_TM | Time | 16 | VR_TEXT | VR_MAXIMUM | 1
VR_UI | Unique Identifier | 64 | VR_TEXT | VR_MAXIMUM | 1
VR_UL | Unsigned Long | 4 | VR_BINARY | VR_FIXED | 4
VR_UN | Unknown | 0 | VR_BINARY | VR_ANY | 1
VR_US | Unsigned Short | 2 | VR_BINARY | VR_FIXED | 2
VR_UT | Unlimited Text | 0xFFFFFFFE | VR_TEXT | VR_MAXIMUM | 1


N-ACTION-REQUEST Default Table

The following table provides default information about the Command Elements contained in the N-ACTION-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000003 | Requested SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0130
0x00000110 | Message ID | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00001001 | Requested SOP Instance UID | UI | 1 | M
0x00001008 | Action Type ID | US | 1 | M
Data Set | Action Information - Application-specific Data Set containing additional information related to the operation |  |  | U


N-ACTION-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the N-ACTION-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8130
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001000 | Affected SOP Instance UID | UI | 1 | U
0x00001008 | Action Type ID | US | 1 | C
Data Set | Action Reply - Application-specific Data Set containing additional information related to the operation |  |  | C


N-CREATE-REQUEST Default Table

The following table provides default information about the Command Elements contained in the N-CREATE-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0140
0x00000110 | Message ID | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00001000 | Affected SOP Instance UID | UI | 1 | U
Data Set | Attribute List - This field is encoded as a Data Set. One Data Element is encoded for each Attribute and Attribute Value application to the operation |  |  | U


N-CREATE-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the N-CREATE-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8140
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001000 | Affected SOP Instance UID | UI | 1 | C
Data Set | Attribute List - This field is encoded as a Data Set. One Data Element is encoded for each Attribute and Attribute Value application to the operation |  |  | U


N-DELETE-REQUEST Default Table

The following table provides default information about the Command Elements contained in the N-DELETE-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000003 | Requested SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0150
0x00000110 | Message ID | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_ABSENT
0x00001001 | Requested SOP Instance UID | UI | 1 | M


N-DELETE-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the N-DELETE-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8150
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001000 | Affected SOP Instance UID | UI | 1 | U


N-EVENT-REPORT-REQUEST Default Table

The following table provides default information about the Command Elements contained in the N-EVENT-REPORT-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0100
0x00000110 | Message ID | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00001000 | Affected SOP Instance UID | UI | 1 | M
Data Set | Event Information - Application-specific Data Set containing additional information related to the operation |  |  | U


N-EVENT-REPORT-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the N-EVENT-REPORT-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8100
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001000 | Affected SOP Instance UID | UI | 1 | U
0x00001002 | Event Type ID | US | 1 | C
Data Set | Event Reply - Application-specific Data Set containing additional information related to the operation |  |  | C


N-GET-REQUEST Default Table

The following table provides default information about the Command Elements contained in the N-GET-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000003 | Requested SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0110
0x00000110 | Message ID | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_ABSENT
0x00001001 | Requested SOP Instance UID | UI | 1 | M
0x00001005 | Attribute Identifier List | AT | -1 | U


N-GET-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the N-GET-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8110
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001000 | Affected SOP Instance UID | UI | 1 | U
Data Set | Attribute List - This field is encoded as a Data Set. One Data Element is encoded for each Attribute Value returned |  |  | C


N-SET-REQUEST Default Table

The following table provides default information about the Command Elements contained in the N-SET-REQUEST Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000003 | Requested SOP Class UID | UI | 1 | M
0x00000100 | Command Field | US | 1 | 0x0120
0x00000110 | Message ID | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT
0x00001001 | Requested SOP Instance UID | UI | 1 | M
Data Set | Modification List - This field is encoded as a Data Set. One Data Element is encoded for each Attribute and Attribute Value applicable to the operation |  |  | M


N-SET-RESPONSE Default Table

The following table provides default information about the Command Elements contained in the N-SET-RESPONSE Command Set.

In the column headings the following abbreviations apply:

VR = Value Representation

VM = Value Multiplicity

In the Usage column the following abbreviations apply:

U = Use is a service user option.

C = Conditional

M = Mandatory

For more information about Value Representations, refer to Default Value Representation Table.

To see a list of the default tag constants for the command sets data elements, refer to Data Element Tag Constants for the Command Sets

Tag | Name | VR | VM | Usage
0x00000002 | Affected SOP Class UID | UI | 1 | U
0x00000100 | Command Field | US | 1 | 0x8120
0x00000120 | Message ID Being Responded To | US | 1 | M
0x00000800 | Data Set Type | US | 1 | COMMAND_DATASET_PRESENT or COMMAND_DATASET_ABSENT
0x00000900 | Status | US | 1 | M
0x00001000 | Affected SOP Instance UID | UI | 1 | U
Data Set | Attribute List - This field is encoded as a Data Set. One Data Element is encoded for each Attribute and Attribute Value application to the operation |  |  | U


UID Table

The following is a list of default values for the Unique Identifiers that are standard for the DICOM file format.

Code | Name
1.2.840.10008.1.1 | Verification SOP Class
1.2.840.10008.1.2 | Implicit VR Little Endian
1.2.840.10008.1.2.1 | Explicit VR Little Endian
1.2.840.10008.1.2.1.99 | Deflated Explicit VR Little Endian
1.2.840.10008.1.2.2 | Explicit VR Big Endian
1.2.840.10008.1.2.4.50 | JPEG Baseline (Process 1)
1.2.840.10008.1.2.4.51 | JPEG Extended (Process 2 & 4)
1.2.840.10008.1.2.4.52 | JPEG Extended (Process 3 & 5)
1.2.840.10008.1.2.4.53 | JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8)
1.2.840.10008.1.2.4.54 | JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9)
1.2.840.10008.1.2.4.55 | JPEG Full Progression, Non-Hierarchical (Process 10 & 12)
1.2.840.10008.1.2.4.56 | JPEG Full Progression, Non-Hierarchical (Process 11 & 13)
1.2.840.10008.1.2.4.57 | JPEG Lossless, Non-Hierarchical (Process 14)
1.2.840.10008.1.2.4.58 | JPEG Lossless, Non-Hierarchical (Process 15)
1.2.840.10008.1.2.4.59 | JPEG Extended, Hierarchical (Process 16 & 18)
1.2.840.10008.1.2.4.60 | JPEG Extended, Hierarchical (Process 17 & 19)
1.2.840.10008.1.2.4.61 | JPEG Spectral Selection, Hierarchical (Process 20 & 22)
1.2.840.10008.1.2.4.62 | JPEG Spectral Selection, Hierarchical (Process 21 & 23)
1.2.840.10008.1.2.4.63 | JPEG Full Progression, Hierarchical (Process 24 & 26)
1.2.840.10008.1.2.4.64 | JPEG Full Progression, Hierarchical (Process 25 & 27)
1.2.840.10008.1.2.4.65 | JPEG Lossless, Hierarchical (Process 28)
1.2.840.10008.1.2.4.66 | JPEG Lossless, Hierarchical (Process 29)
1.2.840.10008.1.2.4.70 | JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])
1.2.840.10008.1.2.4.80 | JPEG-LS Lossless Image Compression Transfer Syntax
1.2.840.10008.1.2.4.81 | JPEG-LS Lossy (Near-Lossless) Image Compression Transfer Syntax
1.2.840.10008.1.2.4.90 | JPEG 2000 Lossless
1.2.840.10008.1.2.4.91 | JPEG 2000 Lossy
1.2.840.10008.1.2.5 | RLE Lossless
1.2.840.10008.1.3.10 | Media Storage Directory Storage
1.2.840.10008.1.9 | Basic Study Content Notification SOP Class
1.2.840.10008.1.20.1 | Storage Commitment Push Model SOP Class
1.2.840.10008.1.20.1.1 | Storage Commitment Push Model SOP Instance
1.2.840.10008.1.20.2 | Storage Commitment Pull Model SOP Class
1.2.840.10008.1.20.2.1 | Storage Commitment Pull Model SOP Instance
1.2.840.10008.2.16.4 | DICOM Controlled Terminology
1.2.840.10008.3.1.1.1 | DICOM Application Context Name
1.2.840.10008.3.1.2.1.1 | Detached Patient Management SOP Class
1.2.840.10008.3.1.2.1.4 | Detached Patient Management Meta SOP Class
1.2.840.10008.3.1.2.2.1 | Detached Visit Management SOP Class
1.2.840.10008.3.1.2.3.1 | Detached Study Management SOP Class
1.2.840.10008.3.1.2.3.2 | Study Component Management SOP Class
1.2.840.10008.3.1.2.3.3 | Modality Performed Procedure Step SOP Class
1.2.840.10008.3.1.2.3.4 | Modality Performed Procedure Step Retrieve SOP Class
1.2.840.10008.3.1.2.3.5 | Modality Performed Procedure Step Notification SOP Class
1.2.840.10008.3.1.2.5.1 | Detached Results Management SOP Class
1.2.840.10008.3.1.2.5.4 | Detached Results Management Meta SOP Class
1.2.840.10008.3.1.2.5.5 | Detached Study Management Meta SOP Class
1.2.840.10008.3.1.2.6.1 | Detached Interpretation Management SOP Class
1.2.840.10008.5.1.1.1 | Basic Film Session SOP Class
1.2.840.10008.5.1.1.2 | Basic Film Box SOP Class
1.2.840.10008.5.1.1.4 | Basic Grayscale Image Box SOP Class
1.2.840.10008.5.1.1.4.1 | Basic Color Image Box SOP Class
1.2.840.10008.5.1.1.4.2 | Referenced Image Box SOP Class (Retired)
1.2.840.10008.5.1.1.9 | Basic Grayscale Print Management Meta SOP Class
1.2.840.10008.5.1.1.9.1 | Referenced Grayscale Print Management Meta SOP Class (Retired)
1.2.840.10008.5.1.1.14 | Print Job SOP Class
1.2.840.10008.5.1.1.15 | Basic Annotation Box SOP Class
1.2.840.10008.5.1.1.16 | Printer SOP Class
1.2.840.10008.5.1.1.16.376 | Printer Configuration Retrieval Class
1.2.840.10008.5.1.1.17 | Printer SOP Instance
1.2.840.10008.5.1.1.17.376 | Printer Configuration Retrieval Instance
1.2.840.10008.5.1.1.18 | Basic Color Print Management Meta SOP Class
1.2.840.10008.5.1.1.18.1 | Referenced Color Print Management Meta SOP Class (Retired)
1.2.840.10008.5.1.1.22 | VOI LUT Box SOP Class (Retired)
1.2.840.10008.5.1.1.23 | Presentation LUT SOP Class
1.2.840.10008.5.1.1.24 | Image Overlay Box SOP Class (Retired)
1.2.840.10008.5.1.1.24.1 | Basic Print Image Overlay Box Class
1.2.840.10008.5.1.1.25 | Print Queue SOP Instance
1.2.840.10008.5.1.1.26 | Print Queue Management SOP Class
1.2.840.10008.5.1.1.27 | Stored Print Storage SOP Class
1.2.840.10008.5.1.1.29 | Hardcopy Grayscale Image Storage SOP Class
1.2.840.10008.5.1.1.30 | Hardcopy Color Image Storage SOP Class
1.2.840.10008.5.1.1.31 | Pull Print Request SOP Class
1.2.840.10008.5.1.1.32 | Pull Stored Print Management Meta SOP Class
1.2.840.10008.5.1.4.1.1.1 | Computed Radiography Image Storage
1.2.840.10008.5.1.4.1.1.1.1 | Digital X-ray Image Storage Presentation
1.2.840.10008.5.1.4.1.1.1.1.1 | Digital X-ray Image Storage Processing
1.2.840.10008.5.1.4.1.1.1.2 | Digital X-ray Mammography Image Storage Presentation
1.2.840.10008.5.1.4.1.1.1.2.1 | Digital X-ray Mammography Image Storage Processing
1.2.840.10008.5.1.4.1.1.1.3 | Digital X-ray Intra-oral Image Storage Presentation
1.2.840.10008.5.1.4.1.1.1.3.1 | Digital X-ray Intra-oral Image Storage Processing
1.2.840.10008.5.1.4.1.1.2 | Computed Tomography Image Storage
1.2.840.10008.5.1.4.1.1.3 | Ultrasound Multi-frame Image Storage (Retired)
1.2.840.10008.5.1.4.1.1.3.1 | Ultrasound Multi-frame Image Storage
1.2.840.10008.5.1.4.1.1.4 | Magnetic Resonance Image Storage
1.2.840.10008.5.1.4.1.1.4.1 | Enhanced MR Image Storage
1.2.840.10008.5.1.4.1.1.4.2 | MR Spectroscopy Storage
1.2.840.10008.5.1.4.1.1.5 | Nuclear Medicine Image Storage (Retired)
1.2.840.10008.5.1.4.1.1.6 | Ultrasound Image Storage (Retired)
1.2.840.10008.5.1.4.1.1.6.1 | Ultrasound Image Storage
1.2.840.10008.5.1.4.1.1.7 | Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.7.1 | Multi-frame Single Bit Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.7.2 | Multi-frame Grayscale Byte Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.7.3 | Multi-frame Grayscale Word Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.7.4 | Multi-frame True Color Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.8 | Standalone Overlay Storage
1.2.840.10008.5.1.4.1.1.9 | Standalone Curve Storage
1.2.840.10008.5.1.4.1.1.9.1.3 | Ambulatory ECG Waveform Storage
1.2.840.10008.5.1.4.1.1.9.2.1 | Hemodynamic Waveform Storage
1.2.840.10008.5.1.4.1.1.9.3.1 | Cardiac Electrophysiology Waveform Storage
1.2.840.10008.5.1.4.1.1.9.4.1 | Basic Voice Audio Waveform Storage
1.2.840.10008.5.1.4.1.1.10 | Standalone Modality LUT Storage
1.2.840.10008.5.1.4.1.1.11 | Standalone VOI LUT Storage
1.2.840.10008.5.1.4.1.1.11.1 | Grayscale Softcopy Presentation State Storage
1.2.840.10008.5.1.4.1.1.12.1 | X-Ray Angiographic Image Storage
1.2.840.10008.5.1.4.1.1.12.2 | X-Ray Radiofluoroscopic Image Storage
1.2.840.10008.5.1.4.1.1.12.3 | X-Ray Angiographic Bi-Plane Image Storage (Retired)
1.2.840.10008.5.1.4.1.1.128 | Positron Emission Tomography Image Storage
1.2.840.10008.5.1.4.1.1.129 | Standalone Positron Emission Tomography Curve Storage
1.2.840.10008.5.1.4.1.1.20 | Nuclear Medicine Image Storage
1.2.840.10008.5.1.4.1.1.481.1 | Radiotherapy Image Storage
1.2.840.10008.5.1.4.1.1.481.2 | Radiotherapy Dose Storage
1.2.840.10008.5.1.4.1.1.481.3 | Radiotherapy Structure Set Storage
1.2.840.10008.5.1.4.1.1.481.4 | Radiotherapy Beams Treatment Record Storage Class
1.2.840.10008.5.1.4.1.1.481.5 | Radiotherapy Plan Storage
1.2.840.10008.5.1.4.1.1.481.6 | Radiotherapy Brachy Treatment Record Storage Class
1.2.840.10008.5.1.4.1.1.481.7 | Radiotherapy Treatment Summary Record Storage Class
1.2.840.10008.5.1.4.1.1.66 | Raw Data Storage
1.2.840.10008.5.1.4.1.1.77.1 | Visible Light Storage (Retired)
1.2.840.10008.5.1.4.1.1.77.2 | Visible Light Multiframe Image Storage (Retired)
1.2.840.10008.5.1.4.1.1.77.1.1 | Visible Light Endoscopic Image Storage Class
1.2.840.10008.5.1.4.1.1.77.1.2 | Visible Light Microscopic Image Storage Class
1.2.840.10008.5.1.4.1.1.77.1.3 | Visible Light Slide Coordinates Microscopic Image Storage Class
1.2.840.10008.5.1.4.1.1.77.1.4 | Visible Light Photographic Image Storage Class
1.2.840.10008.5.1.4.1.1.77.1.5.1 | Ophthalmic Photography 8 Bit Image Storage
1.2.840.10008.5.1.4.1.1.77.1.5.2 | Ophthalmic Photography 16 Bit Image Storage
1.2.840.10008.5.1.4.1.1.77.1.5.3 | Stereometric Relationship Storage
1.2.840.10008.5.1.4.1.1.88.11 | Basic Text Structured Reporting
1.2.840.10008.5.1.4.1.1.88.22 | Enhanced Structured Reporting
1.2.840.10008.5.1.4.1.1.88.33 | Comprehensive Structured Reporting
1.2.840.10008.5.1.4.1.1.88.50 | Mammography CAD SR
1.2.840.10008.5.1.4.1.1.88.59 | Key Object Selection Document
1.2.840.10008.5.1.4.1.1.88.65 | Chest CAD SR
1.2.840.10008.5.1.4.1.2.1.1 | Patient Root Query/Retrieve Information Model - FIND
1.2.840.10008.5.1.4.1.2.1.2 | Patient Root Query/Retrieve Information Model - MOVE
1.2.840.10008.5.1.4.1.2.1.3 | Patient Root Query/Retrieve Information Model - GET
1.2.840.10008.5.1.4.1.2.2.1 | Study Root Query/Retrieve Information Model - FIND
1.2.840.10008.5.1.4.1.2.2.2 | Study Root Query/Retrieve Information Model - MOVE
1.2.840.10008.5.1.4.1.2.2.3 | Study Root Query/Retrieve Information Model - GET
1.2.840.10008.5.1.4.1.2.3.1 | Patient/Study Only Query/Retrieve Information Model - FIND
1.2.840.10008.5.1.4.1.2.3.2 | Patient/Study Only Query/Retrieve Information Model - MOVE
1.2.840.10008.5.1.4.1.2.3.3 | Patient/Study Only Query/Retrieve Information Model - GET
1.2.840.10008.5.1.4.31 | Modality Worklist Information Model - FIND
1.2.840.10008.5.1.4.32 | General Purpose Worklist Management Meta SOP Class
1.2.840.10008.5.1.4.32.1 | General Purpose Worklist Information Model – FIND
1.2.840.10008.5.1.4.32.2 | General Purpose Scheduled Procedure Step SOP Class
1.2.840.10008.5.1.4.32.3 | General Purpose Performed Procedure Step SOP Class


Return for Accept

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For AddPresentation

hPDU

A DICOM Associate handle.


nID Parameter For AddPresentation

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. The ID should be unique. It should start at 1 and it must be odd. (1, 3, 5, …)


nResult Parameter For AddPresentation

nResult

The result value. This is only valid for Associate Accept. It will be ignored in an Associate Request. Possible values are:

Value | Meaning
PDU_ACCEPT_RESULT_SUCCESS | [0] Success
PDU_ACCEPT_RESULT_USER_REJECT | [1] User rejection
PDU_ACCEPT_RESULT_PROVIDER_REJECT | [2] No reason (provider rejection)
PDU_ACCEPT_RESULT_ABSTRACT_SYNTAX | [3] Abstract Syntax not supported. (provider rejection)
PDU_ACCEPT_RESULT_TRANSFER_SYNTAX | [4] Transfer Syntax not supported. (provider rejection)


pszAbstract Parameter For AddPresentation

pszAbstract

Abstract Syntax. This indicates the class type of the data. For a list of possibla values, refer to Abstract Syntax Values.


Return for AddPresentation

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For AddTransferSyntax

hPDU

A DICOM Associate handle.


nID Parameter For AddTransferSyntax

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszUID Parameter For AddTransferSyntax

pszUID

Character string that contains the new Transfer Syntax to add. For a list of possible values, refer to Transfer Syntax Values. This parameter cannot exceed PDU_MAX_UID_SIZE + 1, including the null character at the end.


Return for AddTransferSyntax

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For AddUserInfo

hPDU

A DICOM Associate handle.


nLength Parameter For AddUserInfo

nLength

Length of the User-defined item.


nType Parameter For AddUserInfo

nType

Type of the User-defined item.


pData Parameter For AddUserInfo

pData

Buffer that contains the data for the User-defined item.


Return for AddUserInfo

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lIndex Parameter for AgeValues

lIndex

Index into the array of age values. This is a zero-based index.


Return for AnnLoad

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


iIndex Parameter For AnnDelete

iIndex

Index into an array of annotation files stored in the DICOM data set. Each DICOM data set can store up to 256 annotation files. This is a zero-based index. Valid values are between 0 and 255. Pass –1 to delete ALL annotation files and the private creator data element.


lPage Parameter For AnnDelete

lPage

Number of the page to be deleted. The page number is 1-based. Therefore, the first page is page 1; the second page is page 2, etc. Pass -1 to delete the entire file specified by the iIndex parameter.


Return for AnnDelete

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


iIndex Parameter For AnnLoad

iIndex

Character string containing the name of the file from which to load the annotations.


lPage Parameter For AnnLoad

lPage

Number of the page in the annotation file specified by iIndex. The page number is one-based. Therefore, the first page is page 1; the second page is page 2.


bSelected Parameter For AnnSave

bSelected

One of the following values:

TRUE | Save only the selected objects.
FALSE | Save all of the annotation objects.


iFormat Parameter For AnnSave

iFormat

One of the following values:

Value | Meaning
ANNFMT_NATIVE | Use LEAD's own format for annotations.
ANNFMT_ENCODED | Save as a binary format. This file size is smaller and is upward compatible. It also provides better security.


iIndex Parameter For AnnSave

iIndex

Index of the annotation file to save. This is an index into an array of annotation files stored in the DICOM data set. Each DICOM data set can store up to 256 annotation files. This is a zero-based index. Valid values are between 0 and 255.


iModify Parameter For AnnSave

iModify

Flag that indicates how to save a new page in a multipage annotation file. Possible values are:

Value | Meaning
SAVE_OVERWRITE | [0] No insert/replace/append is performed. An existing file is overwritten.
SAVE_APPEND | [1] The page is appended if the file exists.
SAVE_REPLACE | [2] Replace the page specified in the iSavePage parameter.
SAVE_INSERT | [3] Insert the new page before the page specified in the iSavePage parameter.


iSavePage Parameter For AnnSave

iSavePage

Number of the page to overwrite, append, replace, or insert, based on the iModify parameter. The page number is 1-based. Therefore, the first page is page 1, the second page is page 2, etc.


Return for AnnSave

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lIndex Parameter for BinaryValues

lIndex

Index into the array of binary values. This is a zero-based index.


bstrUID Parameter For ChangeTransferSyntax

bstrUID

String that contains the UID of the new transfer syntax. Possible values are:

Value | Meaning
UID_IMPLICIT_VR_LITTLE_ENDIAN | "1.2.840.10008.1.2"
UID_EXPLICIT_VR_LITTLE_ENDIAN | "1.2.840.10008.1.2.1"
UID_EXPLICIT_VR_BIG_ENDIAN | "1.2.840.10008.1.2.2"
UID_JPEG_BASELINE_1 | "1.2.840.10008.1.2.4.50"
UID_JPEG_EXTENDED_2_4 | "1.2.840.10008.1.2.4.51"
UID_JPEG_LOSSLESS_NONHIER_14 | "1.2.840.10008.1.2.4.57"
UID_JPEG_LOSSLESS_NONHIER_14B | "1.2.840.10008.1.2.4.70"
UID_JPEG2000_LOSSLESS_ONLY | "1.2.840.10008.1.2.4.90"
UID_JPEG2000 | "1.2.840.10008.1.2.4.91"
UID_RLE_LOSSLESS | "1.2.840.10008.1.2.5"


nFlags Parameter For ChangeTransferSyntax

nFlags

Flag that indicates how the compression will be performed. Possible values are:

Value | Meaning
DICOM_CHANGETRAN_MINIMIZE_JPEG_SIZE | [0x00000001] If set, and the new transfer syntax uses JPEG compression, the JPEG compression engine will use optimized Huffman tables, which results in better compression, but slower speed.


nQFactor Parameter For ChangeTransferSyntax

nQFactor

The quality factor (Q factor) is a number that determines the degree of loss in the compression process. You can set a value from 2 to 255, where 2 is the highest quality and 255 is the most compression. This parameter only applies when the new transfer syntax will involve compressing pixel data using a lossy compression.


Return for ChangeTransferSyntax

Return Value

Return | Meaning
0 | The method was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lIndex Parameter for CharValues

lIndex

Index into the array of binary values. This is a zero-based index.


hNet Parameter For CloseForced

bForced

Flag that indicates whether to force the disconnection. Possible values are:

Value | Meaning
TRUE | Kill the connection. (Force the disconnection.)
FALSE | Request disconnection. The disconnection can be refused by a peer.


hNet Parameter For CloseForced

hNet

A DICOM Network handle.


Return for CloseForced

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For Close

hNet

A DICOM Network handle.


Return for Close

Return Value

None.


nFlags Parameter for ConformanceStatus

nFlags

Flag that indicates errors associated with the Data Element. Possible values are given below and may be combined using the bitwise OR ( | ) operator.

Value | Meaning
CALLBACK_ERROR_VR | [0x0001] Error associated with the Value Representation.
CALLBACK_ERROR_MIN_VM | [0x0002] Error associated with the minimum value multiplicity value.
CALLBACK_ERROR_MAX_VM | [0x0003] Error associated with the maximum value multiplicity value.
CALLBACK_ERROR_DIVIDE_VM | [0x0004] Error associated with the value multiplicity divisor.


Return for ConformanceTestDS

Return Value

None.


lHostPort Parameter For Connect

lHostPort

Port number of the host (the SCU's port).


lPeerPort Parameter For Connect

lPeerPort

Port number of the peer computer to which to connect (the SCP's port).


pszHost Parameter For Connect

pszHost

String that contains the IP address of the host computer (the SCU's address).


pszPeer Parameter For Connect

pszPeer

String that contains the IP address of the peer computer to which to connect (the SCP's address).


Return for Connect

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bRequest Parameter For CreateAssociate

bRequest

Flag that indicates whether to create an Associate Request or an Associate Accept. possible values are:

Value | Meaning
TRUE | Create an Associate Request.
FALSE | Create an Associate Accept.


Return for CreateAssociate

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lIndex Parameter for DateTimeValues

lIndex

Index into the array of date-time values. This is a zero-based index.


lIndex Parameter for DateValues

lIndex

Index into the array of date values. This is a zero-based index.


hPDU Parameter For DefaultAssociate

hPDU

A DICOM Associate handle.


Return for DefaultAssociate

Return Value

None.


Return for DefaultIOD

Return Value

None.


Return for DefaultTag

Return Value

None.


Return for DefaultUID

Return Value

None.


Return for DefaultVR

Return Value

None.


lCount Parameter For DeleteBitmapValue

lCount

Number of frames to delete from the Pixel Data Element.


lIndex Parameter For DeleteBitmapValue

lIndex

Position of the first frame to delete. Use zero-based indexing. For example, if there are 10 bitmaps in a list, the index of the last one is 9. You can delete the last image in the Pixel Data Element by setting this to ELEMENT_INDEX_MAX.


Return for DeleteBitmapValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for DeleteElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for DeleteIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for DeleteKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lModule Parameter For DeleteModule

lModule

Module constant that specifies which module to delete. For a list of default values, refer to IOD Module Constants.


Return for DeleteModule

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hPDU Parameter For DeletePresentation

hPDU

A DICOM Associate handle.


nID Parameter For DeletePresentation

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


Return for DeletePresentation

Return Value

None.


Return for DeleteTag

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hPDU Parameter For DeleteTransferSyntax

hPDU

A DICOM Associate handle.


lIndex Parameter For DeleteTransferSyntax

lIndex

The index of the Transfer Syntax to delete.


nID Parameter For DeleteTransferSyntax

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


Return for DeleteTransferSyntax

Return Value

None.


Return for DeleteUID

Return Value

Return

Meaning

0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hPDU Parameter For DeleteUserInfo

hPDU

A DICOM Associate handle.


lIndex Parameter For DeleteUserInfo

lIndex

Index of the user-defined item to delete.


Return for DeleteUserInfo

Return Value

None.


Return for DeleteVR

Return Value

Return

Meaning

0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lIndex Parameter for DoubleValues

lIndex

Index into the array of double values. This is a zero-based index.


lClass Parameter For FindClassIOD

lClass

Class constant that specifies the class to find. For a list of default values, refer to IOD Class Constants.


Return for FindClassIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For FindFirstElement

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree.
FALSE | Evaluate the Data Set as a list.


lTag Parameter For FindFirstElement

lTag

Tag that specifies the item to find. For a list of default tag values, refer to Data Element Tag Constants.


Return for FindFirstElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For FindFirstKey

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree.
FALSE | Evaluate the Data Set as a list.


pszKey Parameter For FindFirstKey

pszKey

String that contains the type of key element to find. Possible values are:

Value | Meaning
"PATIENT" | Patient key element
"STUDY" | Study key element
"SERIES" | Series key element
"IMAGE" | Image key element
"OVERLAY" | Overlay key element
"MODALITY LUT" | Modality-LUT key element
"VOI LUT" | VOI-LUT key element
"CURVE" | Curve key element
"STORED PRINT" | Stored print key element
"RT DOSE" | RT dose key element
"RT STRUCTURE SET" | RT structure set key element
"RT PLAN" | RT plan key element
"RT TREAT RECORD" | RT treatment record key element
"TOPIC" | Topic key element
"VISIT" | Visit key element
"RESULTS" | Results key element
"INTERPRETATION" | Interpretation key element
"STUDY COMPONENT" | Study Component key element
"PRESENTATION" | Presentation key element
"WAVEFORM" | Waveform key element
"SR DOCUMENT" | Structured Reporting Document key element
"PRIVATE" | Private key element


Return for FindFirstKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lIndex for FindIndexModule

lIndex

Index value that indicates the position of the module in Level 0 of the Data Set. This index is zero-based.


Return for FindIndexModule

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lIndex Parameter For FindIndexTag

lIndex

An index into the Data Element Tag Table. This index is zero-based.


Return for FindIndexTag

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lIndex Parameter For FindIndexUID

lIndex

An index into the UID Table. This index is zero-based.


Return for FindIndexUID

Return Value

Return

Meaning

0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lIndex Parameter For FindIndexVR

lIndex

An index into the Value Representation Table. This index is zero-based.


Return for FindIndexVR

Return Value

Return

Meaning

0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For FindIOD

bTree

Flag that indicates how the IOD Structure will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the IOD Structure as a tree. Update the CurrentIOD property with the first search item in the same level and with the same parent as the CurrentIOD.
FALSE | Evaluate the IOD Structure as a list. Update the CurrentIOD property with the first search item in the IOD Structure.


lCode Parameter For FindIOD

lCode

Code value that specifies the Information Object Definition. The information object may be a Class, a Module or a Tag. For lists of default values, refer to Data Element Tag Constants, IOD Class Constants, and IOD Module Constants.


nType Parameter For FindIOD

nType

The type of Information Object Definition you are working with. Possible values are:

Value | Meaning
DICOM_IOD_TYPE_CLASS | [0x00] Class type Information Object Definition.
DICOM_IOD_TYPE_MODULE | [0x01] Module type Information Object Definition.
DICOM_IOD_TYPE_ELEMENT | [0x02] Element type Information Object Definition.


Return for FindIOD

Return Value

Return

Meaning

0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For FindLastElement

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree.
FALSE | Evaluate the Data Set as a list.


lTag Parameter For FindLastElement

lTag

Tag that specifies the item to find. For a list of default tag values, refer to Data Element Tag Constants.


Return for FindLastElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For FindLastKey

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree.
FALSE | Evaluate the Data Set as a list.


pszKey Parameter For FindLastKey

pszKey

String that contains the type of key element to find. Possible values are:

Value | Meaning
"PATIENT" | Patient key element
"STUDY" | Study key element
"SERIES" | Series key element
"IMAGE" | Image key element
"OVERLAY" | Overlay key element
"MODALITY LUT" | Modality-LUT key element
"VOI LUT" | VOI-LUT key element
"CURVE" | Curve key element
"STORED PRINT" | Stored print key element
"RT DOSE" | RT dose key element
"RT STRUCTURE SET" | RT structure set key element
"RT PLAN" | RT plan key element
"RT TREAT RECORD" | RT treatment record key element
"TOPIC" | Topic key element
"VISIT" | Visit key element
"RESULTS" | Results key element
"INTERPRETATION" | Interpretation key element
"STUDY COMPONENT" | Study Component key element
"PRESENTATION" | Presentation key element
"WAVEFORM" | Waveform key element
"SR DOCUMENT" | Structured Reporting Document key element
"PRIVATE" | Private key element


Return for FindLastKey

Return Value

Return

Meaning

0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lClass Parameter For FindModuleIOD

lClass

Class constant that specifies the class in which to look for the module. For a list of default values, refer to IOD Class Constants .


lModule Parameter For FindModuleIOD

lModule

Module constant that specifies the module to look for within the class specified in nClass. For a list of default module constants, refer to IOD Module Constants.


Return for FindModuleIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lModule Parameter For FindModule

lModule

Module constant that specifies the module to find. For a list of default module constants, refer to IOD Module Constants.


Return for FindModule

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For FindNextElement

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree.
FALSE | Evaluate the Data Set as a list.


Return for FindNextElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For FindNextKey

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree.
FALSE | Evaluate the Data Set as a list.


Return for FindNextKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For FindPresentationAbstract

hPDU

A DICOM Associate handle.


pszUID Parameter For FindPresentationAbstract

pszUID

String that contains the Abstract String to find. For a list of possible values, refer to Abstract Syntax Values. This parameter cannot exceed PDU_MAX_UID_SIZE + 1, including the null character at the end.


Return for FindPresentationAbstract

Return Value

Return | Meaning
0 | The specified Abstract Syntax was not found in the specified DICOM Associate.
>0 | The ID of the Presentation Context that contains the specified Abstract Syntax.


bTree Parameter For FindPrevElement

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree.
FALSE | Evaluate the Data Set as a list.


Return for FindPrevElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For FindPrevKey

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree.
FALSE | Evaluate the Data Set as a list.


Return for FindPrevKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lCode Parameter For FindTag

lCode

A tag value. For a list of available tag values, refer to Data Element Tag Constants.


Return for FindTag

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


pszCode Parameter For FindUID

pszCode

Character string that contains a UID.


Return for FindUID

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


nCode Parameter For FindVR

nCode

A value representation code. For a list of default Value Representation codes, refer to Value Representation Constants.


Return for FindVR

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lIndex Parameter for FloatValues

lIndex

Index into the array of float values. This is a zero-based index.


hPDU Parameter For FreeAssociate

hPDU

A DICOM Associate handle.


Return for FreeAssociate

Return Value

None.


lCount Parameter For GetAgeValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetAgeValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetAgeValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for GetApplication

Return Value

A string that contains the Application Context for the specified DICOM Associate.


hPDU Parameter For GetApplication

hPDU

A DICOM Associate handle.


hNet Parameter For GetAssociate

hNet

A DICOM Network handle.


Return for GetAssociate

Return Value

Return

Meaning

!NULL | The DICOM Associate handle associated with the specified DICOM Network handle.
0 | An error occurred, or the connection is not associated.


hNet Parameter For GetAuthenticationAlgorithmTLS

hNet

A DICOM Network handle.


Return for GetAuthenticationAlgorithmTLS

Return value

Authentication mode or algorithm. Possible values are:

Value | Meaning
DICOM_MUTUALAUTH_RSA | [0x20] Mutual authentication through RSA certificates.


nCipher Parameter For GetAuthenticationAlgorithmTLS

nCipher

The ciphersuite for which to get the authentication mode or algorithm.


Return for GetBinaryValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for GetBitmapCount

Return Value

The number of images in the Pixel Data Element specified by the CurrentElement property.


lCount Parameter For GetBitmapListValue

lCount

Number of frames to load into the bitmap list.


lFlags Parameter For GetBitmapListValue

lFlags

Flags which control the behaviour of this function.

Value | Meaning
DICOM_GETIMAGE_AUTO_LOAD_OVERLAYS | [0x0001] If set, the function will automatically extract the overlays included in the dataset and add them to the loaded bitmap.
DICOM_GETIMAGE_AUTO_APPLY_MODALITY_LUT | [0x0002] If set, the function will automatically apply the "Modality LUT" when loading the bitmap.
DICOM_GETIMAGE_AUTO_APPLY_VOI_LUT | [0x0004] If set, the function will automatically apply the "VOI LUT" when loading the bitmap.
DICOM_GETIMAGE_ALLOW_RANGE_EXPANSION | [0x0008] If set, the method will adjust the high bit and / or low bit (if possible) inside the bitmap in order to be able to hold the range of pixel values after applying the modality LUT.


lIndex Parameter For GetBitmapListValue

lIndex

Position of the first frame to get. Use zero-based indexing. For example, if there are 10 bitmaps in a list, the index of the last one is 9.


nBitsPerPixel Parameter For GetBitmapListValue

nBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 to 8 | The specified bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap.
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


nOrder Parameter For GetBitmapListValue

nOrder

The desired color order. Possible values are:

Value | Meaning
ORDER_RGB | [0] Red-green-blue order.
ORDER_BGR | [1] Blue-green-red order.
ORDER_GRAY | [2] 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are only supported in the Document/Medical Imaging toolkits.
ORDER_RGBORGRAY | [3] Load the image as red, green, blue OR as a 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are supported in the Document/Medical Imaging toolkits.
ORDER_BGRORGRAY | [4] Load the image as blue, green, red OR as a 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are supported in the Document/Medical Imaging toolkits.
0 | The data is 8 bits per pixel or less.


Return for GetBitmapListValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lFlags Parameter For GetBitmapValue

lFlags

Flags which control the behaviour of this function.

Value | Meaning
DICOM_GETIMAGE_AUTO_LOAD_OVERLAYS | [0x0001] If set, the method will automatically extract the overlays included in the dataset and add them to the loaded bitmap.
DICOM_GETIMAGE_AUTO_APPLY_MODALITY_LUT | [0x0002] If set, the method will automatically apply the "Modality LUT" when loading the bitmap.
DICOM_GETIMAGE_AUTO_APPLY_VOI_LUT | [0x0004] If set, the method will automatically apply the "VOI LUT" when loading the bitmap.
DICOM_GETIMAGE_ALLOW_RANGE_EXPANSION | [0x0008] If set, the method will adjust the high bit and / or low bit (if possible) inside the bitmap in order to be able to hold the range of pixel values after applying the modality LUT.


lIndex Parameter For GetBitmapValue

lIndex

Position of the image to get. Use zero-based indexing. For example, if there are 10 bitmaps in a list, the index of the last one is 9.


nBitsPerPixel Parameter For GetBitmapValue

nBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 to 8 | The specified bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap.
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


nOrder Parameter For GetBitmapValue

nOrder

The desired color order. Possible values are:

Value | Meaning
ORDER_RGB | [0] Red-green-blue order.
ORDER_BGR | [1] Blue-green-red order.
ORDER_GRAY | [2] 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are only supported in the Document/Medical Imaging toolkits.
ORDER_RGBORGRAY | [3] Load the image as red, green, blue OR as a 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are supported in the Document/Medical Imaging toolkits.
ORDER_BGRORGRAY | [4] Load the image as blue, green, red OR as a 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are supported in the Document/Medical Imaging toolkits.
0 | The data is 8 bits per pixel or less.


Return for GetBitmapValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


Return for GetCalled

Return Value

String that contains the name of the Application Entity that was called.


hPDU Parameter For GetCalled

hPDU

A DICOM Associate handle.


Return for GetCalling

Return Value

String that contains the name of the calling Application Entity of the specified DICOM Associate.


hPDU Parameter For GetCalling

hPDU

A DICOM Associate handle.


lCount Parameter For GetCharValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetCharValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetCharValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hNet Parameter For GetCipherFromIndexTLS

hNet

A DICOM Network handle.


Return for GetCipherFromIndexTLS

Return Value

The ciphersuite at the specified index


nIndex Parameter For GetCipherFromIndexTLS

nIndex

Index of the ciphersuite to get. This is a zero-based index into an 8-position array that contains available ciphersuites, listed by preference.


hNet Parameter For GetCiphersuiteTLS

hNet

A DICOM Network handle.


Return for GetCiphersuiteTLS

Return value

Return | Meaning
<>0 | A value that indicates the ciphersuite agreed upon during the TLS protocol.
0 | No cipher suite has been agreed upon yet.


hNet Parameter For GetClientCount

hNet

A DICOM Network handle.


Return for GetClientCount

Return Value

The number of SCUs connected to the server.


hNet Parameter For GetClient

hNet

A DICOM Network handle of the SCP.


lIndex Parameter For GetClient

lIndex

Index of the client to retrieve. The maximum number of clients allowed is set in Listen method. This index is zero based.


Return for GetClient

Return Value

The DICOM Network handle of the client at the specified index.


hNet Parameter For GetCommBlockLengthISCL

hNet

A DICOM Network handle.


Return for GetCommBlockLengthISCL

Return Value

The communication block length agreed upon during mutual authentication.


Return for GetConvertValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For GetDateTimeValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetDateTimeValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetDateTimeValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For GetDateValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetDateValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetDateValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For GetDoubleValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetDoubleValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetDoubleValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for GetDSPreamble

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for GetElementLevel

Return Value

The level at which the element specified in the CurrentElement property is located, within the Data Set.


hNet Parameter For GetEncryptionAlgorithmTLS

hNet

A DICOM Network handle.


Return for GetEncryptionAlgorithmTLS

Return Value

Encryption mode or algorithm. Possible values are:

Value | Meaning
DICOM_CRYPT_DES | [0x01] DES encryption.
DICOM_CRYPT_3DES | [0x02] 3DES encryption.


nCipher Parameter For GetEncryptionAlgorithmTLS

nCipher

The ciphersuite for which to get the encryption mode or algorithm.


hNet Parameter For GetEncryptKeyLengthTLS

hNet

A DICOM Network handle.


Return for GetEncryptKeyLengthTLS

Return value

The effective length of the encryption key associated with the specified ciphersuite.


nCipher Parameter For GetEncryptKeyLengthTLS

nCipher

The ciphersuite for which to get the length of the encryption key.


Return for GetElementLevel

Return value

The last occurring error code.

Returns a specialized ISCL or TLS error code. For a list of possible values, refer to Return Codes.


hPDU Parameter For GetExtendedData

hPDU

A DICOM Associate handle.


Return for GetExtendedDataLength

Return Value

The length of the extended data of the specified Presentation Context of the specified DICOM Associate.


nID Parameter For GetExtendedDataLength

nID

Presentation ID of the Presentation Context from which to retrieve the length of the extended data. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


nID Parameter For GetExtendedData

nID

Presentation ID of the Presentation Context from which to retrieve the extended data. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


Return for GetExtendedData

Return Value

The extended data of the specified Presentation Context of the specified DICOM Associate.


lCount Parameter For GetFloatValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetFloatValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetFloatValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for GetHostAddress

Return Value

String that contains the local address for the specified DICOM Network connection.


hNet Parameter For GetHostAddress

hNet

A DICOM Network handle.


hNet Parameter For GetHostPort

hNet

A DICOM Network handle.


Return for GetHostPort

Return Value

The local port value for the specified DICOM Network connection.


lIndex Parameter For GetImageInformation

lIndex

Index value that indicates the position of the image in the Pixel Data Element. This is a zero-based index. For example, if lIndex is 0, information about the image in position 0 will be set in the ImageInfo property.


Return for GetImageInformation

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


Return for GetImplementClass

Return Value

String that contains the name of the Implementation Class for the specified DICOM Associate.


hPDU Parameter For GetImplementClass

hPDU

A DICOM Associate handle.


Return for GetImplementVersion

Return Value

String that contains the Implementation Version for the specified DICOM Associate.


hPDU Parameter For GetImplementVersion

hPDU

A DICOM Associate handle.


hNet Parameter For GetIndexForEncryptISCL

hNet

A DICOM Network handle.


Return for GetIndexForEncryptISCL

Return value

The index for the key used for encryption. This value must be between 1 and 8, inclusively, where 1 represents the first key in the array.


hNet Parameter For GetIndexForMutualAuthISCL

hNet

A DICOM Network handle.


Return for GetIndexForMutualAuthISCL

Return value

The index for the key used for mutual authentication. This value must be between 1 and 8, inclusively, where 1 represents the first key in the array.


Return for GetInfoCS

Return Value

None.


Return for GetInfoDS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hNet Parameter For GetIntegrityAlgorithmTLS

hNet

A DICOM Network handle.


Return for GetIntegrityAlgorithmTLS

Return value

Message authentication code type. Possible values are:

Value | Meaning
DICOM_MAC_SHA1 | [0x10] Secure Hash Algorithm (New and improved algorithm)


nCipher Parameter For GetIntegrityAlgorithmTLS

nCipher

The ciphersuite for which to get the message authentication mode or algorithm.


hPDU Parameter For GetInvokedOperationsCount

hPDU

A DICOM Associate handle.


Return for GetInvokedOperationsCount

Return Value

The number of Asynchronous Operations that may be invoked for the specified DICOM Associate connection.


hNet Parameter For GetKeyExchangeAlgorithmTLS

hNet

A DICOM Network handle.


Return for GetKeyExchangeAlgorithmTLS

Return Value

The key exchange algorithm. Possible values are:

Value | Meaning
DICOM_KEYEXCHANGE_RSA_SIGNED_DHE | [0x40] RSA signed Diffie-Hellman ephemereal.


nCipher Parameter For GetKeyExchangeAlgorithmTLS

nCipher

The ciphersuite for which to get the key exchange algorithm.


Return for GetKeyValue

Return Value

The key element type of the specified key element. Possible values are:

Value | Meaning
"PATIENT" | Patient key element
"STUDY" | Study key element
"SERIES" | Series key element
"IMAGE" | Image key element
"OVERLAY" | Overlay key element
"MODALITY LUT" | Modality-LUT key element
"VOI LUT" | VOI-LUT key element
"CURVE" | Curve key element
"STORED PRINT" | Stored print key element
"RT DOSE" | RT dose key element
"RT STRUCTURE SET" | RT structure set key element
"RT PLAN" | RT plan key element
"RT TREAT RECORD" | RT treatment record key element
"TOPIC" | Topic key element
"VISIT" | Visit key element
"RESULTS" | Results key element
"INTERPRETATION" | Interpretation key element
"STUDY COMPONENT" | Study Component key element
"PRESENTATION" | Presentation key element
"WAVEFORM" | Waveform key element
"SR DOCUMENT" | Structured Reporting Document key element
"PRIVATE" | Private key element


lCount Parameter For GetLongValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetLongValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetLongValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hPDU Parameter For GetMaxLength

hPDU

A DICOM Associate handle.


Return for GetMaxLength

Return Value

The Maximum Length for data transfer, in bytes.


Return for GetModuleCount

Return Value

The number of modules in the entire Data Set.


hNet Parameter For GetMutualAuthKeyLengthTLS

hNet

A DICOM Network handle.


Return for GetMutualAuthKeyLengthTLS

Return value

The effective length of the mutual authentication key.


nCipher Parameter For GetMutualAuthKeyLengthTLS

nCipher

The current ciphersuite for which to get the length of the mutual authentication key.


Return for GetPeerAddress

Return Value

String that contains the peer address for the specified DICOM Network connection.


hNet Parameter For GetPeerAddress

hNet

A DICOM Network handle.


hNet Parameter For GetPeerAuthDataISCL

hNet

A DICOM Network handle.


nLength Parameter For GetPeerAuthDataISCL

nLength

Address of the long integer variable that gets updated with the actual size of the peer authentication data.

In C++, you declare the variable and pass its address. In most other languages, you pass the variable by reference. The method updates the value of the variable.


Return for GetPeerAuthDataISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


vBuffer Parameter For GetPeerAuthDataISCL

vBuffer

Buffer to be updated with the authentication data of the peer computer. This buffer could be up to 128 bytes long, which is the longest possible authentication data.


hNet Parameter For GetPeerEncryptionISCL

hNet

A DICOM Network handle.


Return for GetPeerEncryptionISCL

Return value

The current encryption mode used by the sender. Possible values are:

Value | Meaning
DICOM_ISCL_ENCRYPT_NONE | The data is transmitted without encryption.
DICOM_ISCL_ENCRYPT_DESCBC | The data is transmitted encrypted using the DES algorithm in cipher block chaining mode.


hNet Parameter For GetPeerMACISCL

hNet

A DICOM Network handle.


Return for GetPeerMACISCL

Return value

The current MAC type used by the sender. Possible values are:

Value | Meaning
DICOM_ISCL_MAC_NONE | No message authentication code was used.
DICOM_ISCL_MAC_MD5 | A 128 bit MD5 message authentication code was transmitted with the message.
DICOM_ISCL_MAC_DESMAC | A 64 bit DESMAC authentication code was transmitted with the message.


hNet Parameter For GetPeerPort

hNet

A DICOM Network handle.


Return for GetPeerPort

Return Value

The peer port value for the specified DICOM Network connection.


hNet Parameter For GetPeerRequestedMessageLengthISCL

hNet

A DICOM Network handle.


Return for GetPeerRequestedMessageLengthISCL

Return value

Size of the message that was refused, in bytes.


hPDU Parameter For GetPerformedOperationsCount

hPDU

A DICOM Associate handle.


Return for GetPerformedOperationsCount

Return Value

The number of Asynchronous Operations that have been completed.


Return for GetPresentationAbstract

Return Value

String that contains the Abstract Syntax for the specified Presentation Context of the specified DICOM Associate.


hPDU Parameter For GetPresentationAbstract

hPDU

A DICOM Associate handle.


nID Parameter For GetPresentationAbstract

nID

Presentation ID of the Presentation Context from which to get the abstract syntax. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


hPDU Parameter For GetPresentationCount

hPDU

A DICOM Associate handle.


Return for GetPresentationCount

Return Value

The number of Presentation Context entries for the specified DICOM Associate.


hPDU Parameter For GetPresentationID

hPDU

A DICOM Associate handle.


lIndex Parameter For GetPresentationID

lIndex

Index of the Presentation Context ID to get.


Return for GetPresentationID

Return Value

The Presentation Context ID for the specified Presentation Context.


hPDU Parameter For GetPresentationResult

hPDU

A DICOM Associate handle.


nID Parameter For GetPresentationResult

nID

Presentation ID of the Presentation Context from which to get the result. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


Return for GetPresentationResult

Return Value

The result of the specified Presentation Context of the specified DICOM Associate. Possible values are:

Value | Meaning
PDU_ACCEPT_RESULT_SUCCESS | [0] Success
PDU_ACCEPT_RESULT_USER_REJECT | [1] User rejection
PDU_ACCEPT_RESULT_PROVIDER_REJECT | [2] No reason (provider rejection)
PDU_ACCEPT_RESULT_ABSTRACT_SYNTAX | [3] Abstract Syntax not supported. (provider rejection)
PDU_ACCEPT_RESULT_TRANSFER_SYNTAX | [4] Transfer Syntax not supported. (provider rejection)


hPDU Parameter For GetProviderRole

hPDU

A DICOM Associate handle.


nID Parameter For GetProviderRole

nID

Presentation ID of the Presentation Context from which to retrieve the Provider Role. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


Return for GetProviderRole

Return Value

The value for the Provider Role of the specified Presentation Context of the specified DICOM Associate. Possible values are:

Value | Meaning
PDU_ROLE_NON_SUPPORT | [0] User role not supported.
PDU_ROLE_SUPPORT | [1] User role supported.


hNet Parameter For GetSendQueueSize

hNet

A DICOM Network handle.


Return for GetSendQueueSize

Return Value

The number of bytes in the send queue.


hNet Parameter For GetServer

hNet

A DICOM Network handle.


Return for GetServer

Return Value

The DICOM Network handle of the SCP connected to the specified SCU.


lCount Parameter For GetShortValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetShortValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetShortValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hNet Parameter For GetStatusISCL

hNet

A DICOM Network handle.


Return for GetStatusISCL

Return value

The internal ISCL status. Possible values are:

Value | Meaning
0 | Not connected.
1 | Wait for line connection check request.
2 | Got a line connection check request.
3 | Wait for mutual authentication request.
4 | Got mutual authentication request.
5 | Wait for mutual authentication pass 1.
6 | Got mutual authentication pass 1.
7 | Wait for mutual authentication pass 3.
8 | Got mutual auth pass 3.
11 | Wait for message transmission response.
12 | Encrypt and send message.
14 | Compute, encrypt and send MAC.
16 | Wait for random number for generating session key response.
33 | Wait for line disconnection response.
50 | Wait for line connection response.
51 | Got line connection response, sending mutual authentication request.
52 | Wait for mutual authentication response.
53 | Sending mutual authentication pass 1.
54 | Wait for mutual authentication pass 2.
55 | Got mutual authenticate pass 2, sending mutual authenticate pass 3.
56 | Wait for mutual authentication completion.
57 | Neutral status.
22 | Wait for random number for generating key request.
23 | Computing session key.
24 | Wait for packets with data.
25 | Received all data, wait for MAC code.


lCount Parameter For GetStringValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetStringValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetStringValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for GetTagCount

Return Value

The number of items in the Data Element Tag Table.


lCount Parameter For GetTimeValue

lCount

Value that indicates the number of values to retrieve when more than one value is stored in the Value Field. In most instances you will only retrieve one value so this parameter will be one.


lIndex Parameter For GetTimeValue

lIndex

Index value that indicates which value to retrieve when more than one value is stored in the Value Field. The index is zero-based.


Return for GetTimeValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hPDU Parameter For GetTransferCount

hPDU

A DICOM Associate handle.


Return for GetTransferCount

Return Value

The number of Transfer Syntax entries for the specified Presentation Context.


nID Parameter For GetTransferCount

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


hPDU Parameter For GetTransferSyntax

hPDU

A DICOM Associate handle.


lIndex Parameter For GetTransferSyntax

lIndex

Index of the Transfer Syntax to return.


nID Parameter For GetTransferSyntax

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


Return for GetTransferSyntax

Return Value

The Transfer Syntax of the specified Presentation Context, at the specified index.


Return for GetUIDCount

Return Value

The number of items in the UID Table.


hPDU Parameter For GetUserInfoCount

hPDU

A DICOM Associate handle.


Return for GetUserInfoCount

Return Value

The number of User-defined items in the specified DICOM Associate.


hPDU Parameter For GetUserInfoData

hPDU

A DICOM Associate handle.


lIndex Parameter For GetUserInfoData

lIndex

Index of the User-defined item from which to retrieve the data.


Return for GetUserInfoData

Return Value

The data of the specified User-defined item.


hPDU Parameter For GetUserInfoLength

hPDU

A DICOM Associate handle.


lIndex Parameter For GetUserInfoLength

lIndex

Index of the User-defined item for which the length should be retrieved.


Return for GetUserInfoLength

Return Value

The length of the specified User-defined item.


hPDU Parameter For GetUserInfoType

hPDU

A DICOM Associate handle.


lIndex Parameter For GetUserInfoType

lIndex

Index of the User-defined item from which the type should be retrieved.


Return for GetUserInfoType

Return Value

The type of the specified User-defined item.


hPDU Parameter For GetUserRole

hPDU

A DICOM Associate handle.


nID Parameter For GetUserRole

nID

Presentation ID of the Presentation Context from which to retrieve the User Role. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


Return for GetUserRole

Return Value

The value for the User Role of the specified Presentation Context of the specified DICOM Associate. Possible values are:

Value | Meaning
PDU_ROLE_NON_SUPPORT | [0] User role not supported.
PDU_ROLE_SUPPORT | [1] User role supported.


Return for GetValueCount

Return Value

The number of values stored in the Value Field of the element specified in the CurrentElement property.


hPDU Parameter For GetVersion

hPDU

A DICOM Associate handle.


Return for GetVersion

Return Value

The version of the specified DICOM Associate.


Return for GetVRCount

Return Value

The number of items in the Value Representation Table.


bRequest Parameter For InitCS

bRequest

Flag that indicates whether to create the command set as a request or an a response. Possible values are:

Value | Meaning
TRUE | Create the command set as a request.
FALSE | Create the command set as a response.


nCommand Parameter For InitCS

nCommand

Type of command to create. Possible values are:

Value | Meaning
COMMAND_C_STORE | [0x0001] Composite Store Command
COMMAND_C_FIND | [0x0020] Composite Find Command
COMMAND_C_GET | [0x0010] Composite Get Command
COMMAND_C_MOVE | [0x0021] Composite Move Command
COMMAND_C_CANCEL | [0x0FFF] Composite Cancel Command
COMMAND_C_ECHO | [0x0030] Composite Echo Command
COMMAND_N_REPORT | [0x0100] Normalized Report Command
COMMAND_N_GET | [0x0110] Normalized Get Command
COMMAND_N_SET | [0x0120] Normalized Set Command
COMMAND_N_ACTION | [0x0130] Normalized Action Command
COMMAND_N_CREATE | [0x0140] Normalized Create Command
COMMAND_N_DELETE | [0x0150] Normalized Delete Command


Return for InitCS

Return Value

None.


lClass Parameter For InitDS

lClass

Value that specifies the class. For a list of default values, refer to the IOD Class Constants.


nFlags Parameter For InitDS

nFlags

Transfer Syntax flag that indicates the organization of the data set and the type of image compression used. Possible values and combinations are:

Value | Meaning
0 | [0x0000] Use the default combination of: DS_LITTLE_ENDIAN | DS_EXPLICIT_VR | DS_COMPRESSION_NONE
DS_LITTLE_ENDIAN | [0x0004] Byte order is Little Endian.
DS_BIG_ENDIAN | [0x0008] Byte order is Big Endian.

DS_IMPLICIT_VR | [0x0010] The Value Representation is implicit.
DS_EXPLICIT_VR | [0x0020] The Value Representation is explicit.

DS_LITTLE_ENDIAN | DS_IMPLICIT_VR

DS_LITTLE_ENDIAN | DS_EXPLICIT_VR

DS_BIG_ENDIAN | DS_EXPLICIT_VR


Return for InitDS

Return Value

None.


hBitmapList Parameter For InsertBitmapListValue

hBitmapList

The bitmap list to be inserted. The bitmap list to insert can be obtained from the BitmapList property.


lCompression Parameter For InsertBitmapListValue

lCompression

Value that indicates the type of compression to use. Possible values are:

Value | Meaning
DICOM_IMAGE_COMPRESSION_NONE | [0x00] No compression.
DICOM_IMAGE_COMPRESSION_RLE | [0x01] RLE compression.
DICOM_IMAGE_COMPRESSION_JPEG_LOSSLESS | [0x02] JPEG LossLess compression.
DICOM_IMAGE_COMPRESSION_JPEG_LOSSY | [0x03] JPEG Lossy compression.
DICOM_IMAGE_COMPRESSION_J2K_LOSSLESS | [0x06] JPEG 2000 lossless compression.
DICOM_IMAGE_COMPRESSION_J2K_LOSSY | [0x07] JPEG 2000 lossy compression.


lFlags Parameter For InsertBitmapListValue

lFlags

Flags which control the behaviour of this function.

Value | Meaning
DICOM_SETIMAGE_AUTO_SAVE_OVERLAYS | [0x0001]If set, the function will automatically insert the overlays associated with the input bitmap into the dataset.
DICOM_SETIMAGE_AUTO_SET_VOI_LUT | [0x0002]If set, the function will automatically add a VOI LUT to the dataset.
DICOM_SETIMAGE_MINIMIZE_JPEG_SIZE | [0x0004] If set, and the nCompression parameter is IMAGE_COMPRESSION_JPEG_LOSSLESS or IMAGE_COMPRESSION_JPEG_LOSSY, the JPEG compression engine will use optimized Huffman tables, which results in better compression, but slower speed.


lIndex Parameter For InsertBitmapListValue

lIndex

Index value that indicates the position at which the bitmap list will be inserted. This is a zero-based index. For example, if lIndex is 0, the new images will be inserted starting with the first position in the Pixel Data Element.


lPhotometric Parameter For InsertBitmapListValue

lPhotometric

Photometric constant. Possible values are:

Value | Meaning
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2 | [0x01] 8- or 16-bits per pixel, grayscale image.
DICOM_IMAGE_PHOTOMETRIC_PALETTE_COLOR | [0x02] 8-bits per pixel, palettized color image.
DICOM_IMAGE_PHOTOMETRIC_RGB | [0x03] 24-bits per pixel, RGB color image.


nBitsPerPixel Parameter For InsertBitmapListValue

nBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 to 8 | The specified bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap.
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


nQFactor Parameter For InsertBitmapListValue

nQFactor

The quality factor (Q factor) is a number that determines the degree of loss in the compression process. You can set a value from 2 to 255, where 2 is the highest quality and 255 is the most compression.


Return for InsertBitmapListValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Bitmap Parameter For InsertBitmapValue

Bitmap

The bitmap to be inserted. The bitmap to insert can be obtained from the Bitmap property.


lCompression Parameter For InsertBitmapValue

lCompression

Value that indicates the type of compression to use. Possible values are:

Value | Meaning
DICOM_IMAGE_COMPRESSION_NONE | [0x00] No compression.
DICOM_IMAGE_COMPRESSION_RLE | [0x01] RLE compression.
DICOM_IMAGE_COMPRESSION_JPEG_LOSSLESS | [0x02] JPEG LossLess compression.
DICOM_IMAGE_COMPRESSION_JPEG_LOSSY | [0x03] JPEG Lossy compression.
DICOM_IMAGE_COMPRESSION_J2K_LOSSLESS | [0x06] JPEG 2000 lossless compression.
DICOM_IMAGE_COMPRESSION_J2K_LOSSY | [0x07] JPEG 2000 lossy compression.


lFlags Parameter For InsertBitmapValue

lFlags

Flags which control the behaviour of this function.

Value | Meaning
DICOM_SETIMAGE_AUTO_SAVE_OVERLAYS | [0x0001]If set, the function will automatically insert the overlays associated with the input bitmap into the dataset.
DICOM_SETIMAGE_AUTO_SET_VOI_LUT | [0x0002]If set, the function will automatically add a VOI LUT to the dataset.
DICOM_SETIMAGE_MINIMIZE_JPEG_SIZE | [0x0004] If set, and the nCompression parameter is IMAGE_COMPRESSION_JPEG_LOSSLESS or IMAGE_COMPRESSION_JPEG_LOSSY, the JPEG compression engine will use optimized Huffman tables, which results in better compression, but slower speed.


lIndex Parameter For InsertBitmapValue

lIndex

Index value that indicates the position at which the bitmap will be inserted. This is a zero-based index. For example, if nIndex is 0, the new image will be inserted as the first image in the Pixel Data Element.


lPhotometric Parameter For InsertBitmapValue

lPhotometric

Photometric constant. Possible values are:

Value | Meaning
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2 | [0x01] 8- or 16-bits per pixel, grayscale image.
DICOM_IMAGE_PHOTOMETRIC_PALETTE_COLOR | [0x02] 8-bits per pixel, palettized color image.
DICOM_IMAGE_PHOTOMETRIC_RGB | [0x03] 24-bits per pixel, RGB color image.


nBitsPerPixel Parameter For InsertBitmapValue

nBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 to 8 | The specified bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap.
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


nQFactor Parameter For InsertBitmapValue

nQFactor

The quality factor (Q factor) is a number that determines the degree of loss in the compression process. You can set a value from 2 to 255, where 2 is the highest quality and 255 is the most compression.


Return for InsertBitmapValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hDS Parameter For InsertDS

hDS

A DICOM handle to the data set to be copied (the source data set).


hSrcElement Parameter For InsertDS

hSrcElement

Handle to a Data element within the source data set. All children, grandchildren, etc. of this element will be added to the destination data set.


Return for InsertDS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bChild Parameter For InsertElement

bChild

Flag that indicates where to insert the item. Possible values are:

Value | Meaning
TRUE | The new item will be inserted as the last child of the CurrentElement.
FALSE | The new item will be inserted as the last sibling of CurrentElement.


bSequence Parameter For InsertElement

bSequence

Flag that indicates whether the new item is a sequence. Possible values are:

Value | Meaning
TRUE | The new item is a sequence.
FALSE | The new item is not a sequence.


lIndex Parameter For InsertElement

lIndex

Index value that indicates where to insert a TAG_ITEM data element in a sequence. This parameter is valid only if the data element being inserted has a tag of value TAG_ITEM. If the data element being inserted has any other tag value, this parameter is ignored. The index is zero based, so if you want to insert a TAG_ITEM data element as the first item in the sequence, set this to 0. The value ELEMENT_INDEX_MAX indicates to add the TAG_ITEM data element to the end of the sequence.

A sequence may consist of one or more items. This parameter lets you insert a TAG_ITEM data element as any item within the sequence, not just at the end. In addition, it lets you insert multiple TAG_ITEM data elements within a sequence.

If the CurrentElement property contains an item that is the parent of a sequence and bChild is true, the index will pertain to the children of that item. If the CurrentElement property contains an item that is a member of a sequence and bChild is false, the index pertains to the siblings of that item.


lTag Parameter For InsertElement

lTag

Tag value for the inserted element. For a list of default values, refer to Data Element Tag Constants.


nVR Parameter For InsertElement

nVR

Value representation code that indicates the type of value stored in the data element. For a list of default values supported by DICOM, refer to Value Representation Constants.


Return for InsertElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bChild Parameter For InsertIOD

bChild

Flag that indicates where to insert the item. Possible values are:

Value | Meaning
TRUE | The new item will be inserted as the last child of the item specified in the CurrentIOD property.
FALSE | The new item will be inserted as the last sibling of the item specified in the CurrentIOD property.


lCode Parameter For InsertIOD

lCode

Code value that indicates which Information Object Definition you are inserting. The information object may be a Class, a Module or a Tag. For lists of default values, refer to Data Element Tag Constants, IOD Class Constants, and IOD Module Constants.


nType Parameter For InsertIOD

nType

The type of Information Object Definition you are working with. Possible values are:

Value | Meaning
DICOM_IOD_TYPE_CLASS | [0x00] Class type Information Object Definition.
DICOM_IOD_TYPE_MODULE | [0x01] Module type Information Object Definition.
DICOM_IOD_TYPE_ELEMENT | [0x02] Element type Information Object Definition.


nUsage Parameter For InsertIOD

nUsage

Value that indicates whether the Information Object is mandatory, conditional or optional, and the type of usage. For a list of possible values, refer to IOD Usage Constants. For more information on mandatory, conditional and optional usage, refer to An Overview of Dicom or the DICOM Spec.


pszDescription Parameter For InsertIOD

pszDescription

Character string that contains a description of the inserted Information Object Definition.


pszName Parameter For InsertIOD

pszName

Character string that contains the name of the inserted item.


Return for InsertIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bOptional Parameter For InsertKey

bOptional

Flag that indicates which parts of the key element to insert. Possible values are:

Value | Meaning
TRUE | Insert all parts of the specified key element.
FALSE | Insert only the mandatory parts of the specified key element.


pszKey Parameter For InsertKey

pszKey

String that contains the type of key element to insert. Possible values are:

Value | Meaning
"PATIENT" | Patient key element
"STUDY" | Study key element
"SERIES" | Series key element
"IMAGE" | Image key element
"OVERLAY" | Overlay key element
"MODALITY LUT" | Modality-LUT key element
"VOI LUT" | VOI-LUT key element
"CURVE" | Curve key element
"STORED PRINT" | Stored print key element
"RT DOSE" | RT dose key element
"RT STRUCTURE SET" | RT structure set key element
"RT PLAN" | RT plan key element
"RT TREAT RECORD" | RT treatment record key element
"TOPIC" | Topic key element
"VISIT" | Visit key element
"RESULTS" | Results key element
"INTERPRETATION" | Interpretation key element
"STUDY COMPONENT" | Study Component key element
"PRESENTATION" | Presentation key element
"WAVEFORM" | Waveform key element
"SR DOCUMENT" | Structured Reporting Document key element
"PRIVATE" | Private key element
"KEY OBJECT DOC" | Key Object Document key element


Return for InsertKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bOptional Parameter For InsertModule

bOptional

Flag that indicates which elements of the module to insert. Possible values are:

Value | Meaning
TRUE | Insert all Elements: of the specified module.
FALSE | Insert only the mandatory Elements: of the specified module.


lModule Parameter For InsertModule

lModule

Module constant the indicates the module being inserted. For a list of default values, refer to IOD Module Constants.


Return for InsertModule

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCode Parameter For InsertTag

lCode

Code that indicates the tag. For a list of default values, refer to Data Element Tag Constants.


lDivideVM Parameter For InsertTag

lDivideVM

Value used to divide the value multiplicity. When multiple values are stored in the value field of a data element, the number of values present must be evenly divisible by lDivideVM. For most items lDivideVM will be 1. However, if the values stored in the value field are RGB triplets, for example, you would have to store three values for each triplet. You could store 12 values, since 12 values would be 4 triplets, however, you could not store 13 values. In this case lDivideVM would be 3.


lMask Parameter For InsertTag

lMask

Masking value. Masking allows you to insert multiple elements in the same entry in the table.


lMaxVM Parameter For InsertTag

lMaxVM

Value that indicates the maximum number of values that may be stored in the Value Field of the Data Element.


lMinVM Parameter For InsertTag

lMinVM

Value that indicates the minimum number of values that may be stored in the Value Field of the Data Element.


nVR Parameter For InsertTag

nVR

Value representation code that indicates the type of value stored in the data element. For a list of default values supported by DICOM, refer to Value Representation Constants.


pszName Parameter For InsertTag

pszName

Character string that contains the name of the tag. To see the default values for the Tag Names, refer to the Default Data Element Tag Table.


Return for InsertTag

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


nType Parameter For InsertUID

nType

Type of UID to insert. Possible values are:

Value | Meaning
DICOM_UID_TYPE_OTHER | Unknown
DICOM_UID_TYPE_TRANSFER1 | Transfer Syntax - Uncompressed Image
DICOM_UID_TYPE_TRANSFER2 | Transfer Syntax - Compressed Image
DICOM_UID_TYPE_CLASS | SOP Class
DICOM_UID_TYPE_META_CLASS | Meta SOP Class
DICOM_UID_TYPE_INSTANCE | SOP Instance
DICOM_UID_TYPE_APPLICATION | Application Context Name


pszCode Parameter For InsertUID

pszCode

Unique identifier code. For a list of default values, refer to the UID Table.


pszName Parameter For InsertUID

pszName

Character string that contains the name of the unique identifier. For a list of default values, refer to the UID Table.


Return for InsertUID

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lLength Parameter For InsertVR

lLength

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


nCode Parameter For InsertVR

nCode

Code that indicates the type of value to be stored in the data element. For a list of default values refer to Value Representation Constants.


nRestrict Parameter For InsertVR

nRestrict

Restrictions on the length. Possible values are given below. These values may be combined using the bitwise OR ( | ) operator.

Value | Meaning
VR_FIXED | [0x0000] The length of the stored value is a fixed number of bytes.
VR_MAXIMUM | [0x0001] nLength is the maximum number of bytes allowed.
VR_MAXIMUM_GROUP | [0x0002] nLength is the maximum number of bytes allowed per component group
VR_ANY | [0x0003] Any length is valid.
VR_NOT_APPLICABLE | [0x0004] nLength is not applicable

One of the values above may be combined with one of the values below using the bitwise OR ( | ) operator.

VR_BINARY | [0x0100] Binary value.
VR_STRING | [0x0200] String value (The character '\' is used as the delimiter between values for multiple data elements).
VR_TEXT | [0x0400] Text value. (Data elements with this VR cannot be multi-valued).


nUnitSize Parameter For InsertVR

nUnitSize

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


pszName Parameter For InsertVR

pszName

Character string that contains the name of the value representation. For examples of Value Representation Names, refer to the Default Value Representation Table.


Return for InsertVR

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for IsActivated

Return Value

Value | Meaning
TRUE | The specified connection has been activated.
FALSE | The specified connection has not been activated.


hNet Parameter For IsActivated

hNet

A DICOM Network handle.


Return for IsAssociated

Return Value

Value | Meaning
TRUE | The specified connection has been associated.
FALSE | The specified connection has not been associated.


hNet Parameter For IsAssociated

hNet

A DICOM Network handle.


Return for IsAsyncOperations

Return Value

Value | Meaning
TRUE | The specified DICOM Associate supports Asynchronous Operations.
FALSE | The specified DICOM Associate does not support Asynchronous Operations.


hPDU Parameter For IsAsyncOperations

hPDU

A DICOM Associate handle.


Return for IsConnected

Return Value

Value | Meaning
TRUE | A connection has been established.
FALSE | A connection has not been established.


hNet Parameter For IsConnected

hNet

A DICOM Network handle.


Return for IsImplementClass

Return Value

Value | Meaning
TRUE | Setting the Implementation Class is enabled.
FALSE | Setting the Implementation Class is disabled.


hPDU Parameter For IsImplementClass

hPDU

A DICOM Associate handle.


Return for IsImplementVersion

Return Value

Value | Meaning
TRUE | Setting the Implementation Version is enabled.
FALSE | Setting the Implementation Version is disabled.


hPDU Parameter For IsImplementVersion

hPDU

A DICOM Associate handle.


hNet Parameter For IsISCLQueueEmpty

hNet

A DICOM Network handle.


Return for IsISCLQueueEmpty

Return Value

Boolean value that indicates whether the ISCL transmission queue is empty. Possible values are:

Value | Meaning
TRUE | The ISCL transmission queue is empty.
FALSE | The ISCL transmission queue is not empty.


Return for IsMaxLengthEnabled

Return Value

Value | Meaning
TRUE | The Maximum Length restriction is enabled.
FALSE | The Maximum Length restriction is disabled.


hPDU Parameter For IsMaxLengthEnabled

hPDU

A DICOM Associate handle.


Return for IsRequest

Return Value

Value | Meaning
TRUE | The specified DICOM Associate is of type Associate Request.
FALSE | The specified DICOM Associate is of type Associate Accept.


hPDU Parameter For IsRequest

hPDU

A DICOM Associate handle.


Return for IsRoleSelect

Return Value

Value | Meaning
TRUE | Role Selection is enabled for the specified Presentation Context of the specified DICOM Associate.
FALSE | Role Selection is disabled for the specified Presentation Context of the specified DICOM Associate.


hPDU Parameter For IsRoleSelect

hPDU

A DICOM Associate handle.


nID Parameter For IsRoleSelect

nID

Presentation ID of the Presentation Context for which you wish to check Role Selection. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


Return for J2KSetDefaults

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lPeers Parameter For Listen

lPeers

The maximum number of (SCUs) that may be connected to the server.


lPort Parameter For Listen

lPort

Port number of the host (the SCP's port).


pszHost Parameter For Listen

pszHost

String that contains the IP address of the host computer (the SCP's address).


Return for Listen

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


nFlags Parameter For LoadDSArray

nFlags

Meta-header flags and Transfer Syntax flags that indicate the file characteristics to use when loading the DICOM file from the byte array. Possible values for the Meta-header flags are:

Value | Meaning
0 | [0x0000] LEADTOOLS will automatically determine the presence or absence of the Meta-header.
DS_METAHEADER_PRESENT | [0x0001] The header is present.
DS_METAHEADER_ABSENT | [0x0002] The header is absent.
Possible values and combinations for the Transfer Syntax flags are:
0 | [0x0000] LEADTOOLS will automatically determine the Transfer Syntax.
DS_LITTLE_ENDIAN | [0x0004] Byte order is Little Endian.
DS_BIG_ENDIAN | [0x0008] Byte order is Big Endian.
DS_IMPLICIT_VR | [0x0010] The Value Representation is implicit.
DS_EXPLICIT_VR | [0x0020] The Value Representation is explicit.
DS_LITTLE_ENDIAN | DS_IMPLICIT_VR |
DS_LITTLE_ENDIAN | DS_EXPLICIT_VR |
DS_BIG_ENDIAN | DS_EXPLICIT_VR |


Return for LoadDSArray

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


vMem Parameter For LoadDSArray

vMem

A byte array variant that contains the DICOM file to be loaded.


nFlags Parameter For LoadDS

nFlags

Meta-header flags and Transfer Syntax flags that indicate the file characteristics to use when loading the file. Possible values for the Meta-header flags are:

Value | Meaning
0 | [0x0000] LEADTOOLS will automatically determine the presence or absence of the Meta-header.
DS_METAHEADER_PRESENT | [0x0001] The header is present.
DS_METAHEADER_ABSENT | [0x0002] The header is absent.

Possible values and combinations for the Transfer Syntax flags are:

0 | [0x0000] LEADTOOLS will automatically determine the Transfer Syntax.
DS_LITTLE_ENDIAN | [0x0004] Byte order is Little Endian.
DS_BIG_ENDIAN | [0x0008] Byte order is Big Endian.
DS_IMPLICIT_VR | [0x0010] The Value Representation is implicit.
DS_EXPLICIT_VR | [0x0020] The Value Representation is explicit.

DS_LITTLE_ENDIAN | DS_IMPLICIT_VR

DS_LITTLE_ENDIAN | DS_EXPLICIT_VR

DS_BIG_ENDIAN | DS_EXPLICIT_VR


pszFilename Parameter For LoadDS

pszFilename

Character string that contains the name of the file to load.


Return for LoadDS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lIndex Parameter for LongValues

lIndex

Index into the array of long values. This is a zero-based index.


Return for MoveChildElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveChildIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveChildKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bTree Parameter For MoveFirstElement

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree. Update the CurrentElement property with the first item in the same level and with the same parent as the CurrentElement.
FALSE | Evaluate the Data Set as a list. Update the CurrentElement property with the first item in the Data Set.


Return for MoveFirstElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MoveFirstIOD

bTree

Flag that indicates how the IOD Structure will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the IOD Structure as a tree. Update the CurrentIOD property with the first item in the same level and with the same parent as the CurrentIOD.
FALSE | Evaluate the IOD Structure as a list. Update the CurrentIOD property with the first item in the IOD Structure.


Return for MoveFirstIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MoveFirstKey

bTree

Flag that indicates how the DICOM DirData Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the DICOM Dir Data Set as a tree. Update the CurrentElement property with the first key element in the same level and with the same parent as the CurrentElement.
FALSE | Evaluate the DICOM DirData Set as a list. Update the CurrentElement property with the first key element in the Data Set.


Return for MoveFirstKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


Return for MoveFirstTag

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveFirstUID

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveFirstVR

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MoveLastElement

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree. Update the CurrentElement property with the last item in the same level and with the same parent as the CurrentElement.
FALSE | Evaluate the Data Set as a list. Update the CurrentElement property with the last item in the Data Set.


Return for MoveLastElement

Return Value

Return | Value
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MoveLastIOD

bTree

Flag that indicates how the IOD Structure will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the IOD Structure as a tree. Update the CurrentIOD property with the last item in the same level and with the same parent as the CurrentIOD.
FALSE | Evaluate the IOD Structure as a list. Update the CurrentIOD property with the last item in the IOD Structure.


Return for MoveLastIOD

Return Value

Return | Value
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MoveLastKey

bTree

Flag that indicates how the DICOM Dir Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree. Update the CurrentElement property with the last key element in the same level and with the same parent as the CurrentElement.
FALSE | Evaluate the Data Set as a list. Update the CurrentElement property with the last key element in the Data Set.


Return for MoveLastKey

Return Value

Return | Value
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


Return for MoveLastTag

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveLastUID

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveLastVR

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MoveNextElement

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree. Update the CurrentElement property with the next item in the same level and with the same parent as the CurrentElement.
FALSE | Evaluate the Data Set as a list. Update CurrentElement property with the next item in the Data Set.


Return for MoveNextElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MoveNextIOD

bTree

Flag that indicates how the IOD Structure will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the IOD Structure as a tree. Update the CurrentIOD property with the next item in the same level and with the same parent as the CurrentIOD.
FALSE | Evaluate the IOD Structure as a list. Update the CurrentIOD property with the next item in the IOD Structure.


Return for MoveNextIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MoveNextKey

bTree

Flag that indicates how the DICOM Dir Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree. Update the CurrentElement property with the next key element in the same level and with the same parent as the CurrentElement.
FALSE | Evaluate the Data Set as a list. Update CurrentElement property with the next key element in the Data Set.


Return for MoveNextKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


Return for MoveNextTag

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveNextUID

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveNextVR

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveParentElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveParentIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveParentKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bTree Parameter For MovePrevElement

bTree

Flag that indicates how the Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree. Update the CurrentElement property with the previous item in the same level and with the same parent as the CurrentElement.
FALSE | Evaluate the Data Set as a list. Update the CurrentElement property with the previous item in the Data Set.


Return for MovePrevElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MovePrevIOD

bTree

Flag that indicates how the IOD Structure will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the IOD Structure as a tree. Update the CurrentIOD property with the previous item in the same level and with the same parent as the CurrentIOD.
FALSE | Evaluate the IOD Structure as a list. Update the CurrentIOD property with the previous item in the IOD Structure.


Return for MovePrevIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bTree Parameter For MovePrevKey

bTree

Flag that indicates how the DICOM Dir Data Set will be evaluated. Possible values are:

Value | Meaning
TRUE | Evaluate the Data Set as a tree. Update the CurrentElement property with the previous key element in the same level and with the same parent as the CurrentElement.
FALSE | Evaluate the Data Set as a list. Update the CurrentElement property with the previous key element in the Data Set.


Return for MovePrevKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


Return for MovePrevTag

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MovePrevUID

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MovePrevVR

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveRootElement

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveRootIOD

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for MoveRootKey

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


nStatus Parameter For NetAccept

nStatus

Error code. Refer to DICOM Error Codes.


hNet Parameter For NetClose

hNet

The DICOM Network handle for the local member of the connection.


hPeer Parameter For NetClose

hPeer

The DICOM Network handle for the peer member of the connection.


nStatus Parameter For NetClose

nStatus

Error code. Refer to DICOM Error Codes.


hNet Parameter For NetConnect

hNet

A DICOM Network handle.


nStatus Parameter For NetConnect

nStatus

Error code. Refer to DICOM Error Codes.


hNet Parameter For NetExternalAuthenticateISCL

hNet

A DICOM Network handle.


nChallenge Parameter For NetExternalAuthenticateISCL

nChallenge

A 64-bit value that represents the challenge code sent to the peer computer. This value is similar to a time stamp. The event handler should determine whether the response code in the nResponse parameter is a valid response for this challenge code.

This value is passed as a VARIANT of type Currency.


nParameter Parameter For NetExternalAuthenticateISCL

nParameter

A 64-bit value that indicates the current mutual authentication key.

This value is passed as a VARIANT of type Currency.


nResponse Parameter For NetExternalAuthenticateISCL

nResponse

A 64-bit value that represents the response code generated by the peer computer. This value is similar to a time stamp. The event handler should determine whether this response code is a valid response for the challenge code in the nChallenge parameter.

This value is passed as a VARIANT of type Currency.


hNet Parameter For NetGetChallengeISCL

hNet

A DICOM Network handle.


nChallenge Parameter For NetGetChallengeISCL

nChallenge

A 64-bit variable to be updated with the random number generated in the event handler. This number is similar to a time stamp.

This value is passed as a VARIANT of type Currency.


nParameter Parameter For NetGetChallengeISCL

nParameter

A 64-bit value that indicates the current mutual authentication key.

This value is passed as a VARIANT of type Currency.


hNet Parameter For NetInternalAuthenticateISCL

hNet

A DICOM Network handle.


nChallenge Parameter For NetInternalAuthenticateISCL

nChallenge

A 64-bit value that represents challenge code received by the event. This challenge code will be used in the generation of the response code. This value is similar to a time stamp.

This value is passed as a VARIANT of type Currency.


nParameter Parameter For NetInternalAuthenticateISCL

nParameter

A 64-bit value that indicates the current mutual authentication key.

This value is passed as a VARIANT of type Currency.


nResponse Parameter For NetInternalAuthenticateISCL

nResponse

A 64-bit variable to be updated with the response code generated by the event handler.

This value is passed as a VARIANT of type Currency.


hNet Parameter For NetNonSecureReceivedISCL

hNet

A DICOM Network handle.


nError Parameter For NetNonSecureReceivedISCL

nError

Error code. Refer to DICOM Error Codes.


nLength Parameter For NetNonSecureReceivedISCL

nLength

The length of the received data, in bytes.


vBuffer Parameter For NetNonSecureReceivedISCL

vBuffer

Buffer to be updated with the data received.


hNet Parameter For NetNonSecureSendISCL

hNet

A DICOM Network handle.


nError Parameter For NetNonSecureSendISCL

nError

Error code. Refer to DICOM Error Codes.


nLength Parameter For NetNonSecureSendISCL

nLength

The length of the sent data, in bytes.


nType Parameter For NetNonSecureSendISCL

nType

Type of data transmitted. This can be either the first byte of the DICOM message or 0 if it cannot be identified.


hNet Parameter For NetReceiveAbort

hNet

A DICOM Network handle.


nReason Parameter For NetReceiveAbort

nReason

The reason for the abort. If the source of the abort is PDU_ABORT_SOURCE_USER, the reasons for the abort are not significant. If the source of the abort is PDU_ABORT_SOURCE_PROVIDER, the possible values are:

Value | Meaning
PDU_ABORT_REASON_UNKNOWN | [0] Unknown
PDU_ABORT_REASON_UNRECOGNIZED | [1] Unrecognized PDU
PDU_ABORT_REASON_UNEXPECTED | [2] Unexpected PDU
PDU_ABORT_REASON_UNRECOGNIZED_PARAM | [4] Unrecognized PDU parameter
PDU_ABORT_REASON_UNEXPECTED_PARAM | [5] Unexpected PDU parameter
PDU_ABORT_REASON_INVALID_PARAM | [6] Invalid PDU parameter value


nSource Parameter For NetReceiveAbort

nSource

The source of the abort. Possible values are:

Value | Meaning
PDU_ABORT_SOURCE_USER | [0] Service user. (client)
PDU_ABORT_SOURCE_PROVIDER | [2] Service provider. (server)


hNet Parameter For NetReceiveAssociateAccept

hNet

A DICOM Network handle.


hPDU Parameter For NetReceiveAssociateAccept

hPDU

A DICOM Associate handle.


hNet Parameter For NetReceiveAssociateReject

hNet

A DICOM Network handle.


nReason Parameter For NetReceiveAssociateReject

nReason

Reason for the rejection. This depends on the value of nSource. If nSource is PDU_REJECT_SOURCE_USER, the possible values are:

Value | Meaning
PDU_REJECT_REASON_UNKNOWN | [1] Unknown
PDU_REJECT_REASON_APPLICATION | [2] Application context name not supported.
PDU_REJECT_REASON_CALLING | [3] Calling AE Title not recognized.
PDU_REJECT_REASON_CALLED | [7] Called AE Title not recognized.

If nSource is PDU_REJECT_SOURCE_PROVIDER1, the possible values are:

Value | Meaning
PDU_REJECT_REASON_UNKNOWN | [1] Unknown.
PDU_REJECT_REASON_VERSION | [2] Protocol version not supported.

if nSource is PDU_REJECT_SOURCE_PROVIDER2, the possible vlaues are:

Value | Meaning
PDU_REJECT_REASON_CONGESTION | [1] Temporary congestion.
PDU_REJECT_REASON_LIMIT | [2] Local client limit exceeded.


nResult Parameter For NetReceiveAssociateReject

nResult

Type of rejection. Possible values are:

Value | Meaning
PDU_REJECT_RESULT_PERMANENT | [1] Rejected permanently.
PDU_REJECT_RESULT_TRANSIENT | [2] Rejected transiently.


nSource Parameter For NetReceiveAssociateReject

nSource

The source of the rejection. Possible values are:

Value | Meaning
PDU_REJECT_SOURCE_USER | [1] DICOM Upper Layer Service – User.
PDU_REJECT_SOURCE_PROVIDER1 | [2] DICOM Upper Layer Service – Provider (ASCE related function)
PDU_REJECT_SOURCE_PROVIDER2 | [3] DICOM Upper Layer Service – Provider (Presentation related function)


hNet Parameter For NetReceiveAssociateRequest

hNet

A DICOM Network handle.


hPDU Parameter For NetReceiveAssociateRequest

hPDU

A DICOM Association handle.


hNet Parameter For NetReceiveCCancelRequest

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCCancelRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCCancelRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


hNet Parameter For NetReceiveCEchoRequest

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCEchoRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCEchoRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For NetReceiveCEchoRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


hNet Parameter For NetReceiveCEchoResponse

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCEchoResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCEchoResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveCEchoResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveCEchoResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


hDS Parameter For NetReceiveCFindRequest

hDS

Handle to the data set to be found.


hNet Parameter For NetReceiveCFindRequest

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCFindRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCFindRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nPriority Parameter For NetReceiveCFindRequest

nPriority

The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are:

Value | Meaning
COMMAND_PRIORITY_LOW | [0x0002] Low priority message.
COMMAND_PRIORITY_MEDIUM | [0x0000] Medium priority message.
COMMAND_PRIORTY_HIGH | [0x0001] High priority message.


pszClass Parameter For NetReceiveCFindRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


hDS Parameter For NetReceiveCFindResponse

hDS

Handle to the data set that contains the information found as a result of the call to SendCFindRequest method.


hNet Parameter For NetReceiveCFindResponse

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCFindResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCFindResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveCFindResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveCFindResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


hDS Parameter For NetReceiveCGetRequest

hDS

Handle to the data set to be found.


hNet Parameter For NetReceiveCGetRequest

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCGetRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCGetRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nPriority Parameter For NetReceiveCGetRequest

nPriority

The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are:

Value | Meaning
COMMAND_PRIORITY_LOW | [0x0002] Low priority message.
COMMAND_PRIORITY_MEDIUM | [0x0000] Medium priority message.
COMMAND_PRIORTY_HIGH | [0x0001] High priority message.


pszClass Parameter For NetReceiveCGetRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


hDS Parameter For NetReceiveCGetResponse

hDS

Hendle to the data set that contains the information retrieved as a result of the call to the SendCGetRequest method.


hNet Parameter For NetReceiveCGetResponse

hNet

A DICOM Network handle.


nCompleted Parameter For NetReceiveCGetResponse

nCompleted

Number of instances searched.


nFailed Parameter For NetReceiveCGetResponse

nFailed

Number of instances that failed the search.


nMessageID Parameter For NetReceiveCGetResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCGetResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nRemaining Parameter For NetReceiveCGetResponse

nRemaining

Number of remaining instances to search.


nStatus Parameter For NetReceiveCGetResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


nWarning Parameter For NetReceiveCGetResponse

nWarning

Number of instances in which warnings occurred.


pszClass Parameter For NetReceiveCGetResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


hDS Parameter For NetReceiveCMoveRequest

hDS

Handle to the data set to be moved.


hNet Parameter For NetReceiveCMoveRequest

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCMoveRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCMoveRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nPriority Parameter For NetReceiveCMoveRequest

nPriority

The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are:

Value | Meaning
COMMAND_PRIORITY_LOW | [0x0002] Low priority message.
COMMAND_PRIORITY_MEDIUM | [0x0000] Medium priority message.
COMMAND_PRIORTY_HIGH | [0x0001] High priority message.


pszClass Parameter For NetReceiveCMoveRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszMoveAE Parameter For NetReceiveCMoveRequest

pszMoveAE

String that contains the name of the application entity that originally requested the move. For a simple storage request from a client to a server, this should be "". When the request is a sub-operation of a C-MOVE, this will contain the name of the AE that requested the move.


hDS Parameter For NetReceiveCMoveResponse

hDS

Pointer to the dataset that holds additional information about a non-successful C-MOVE sub-operation.


hNet Parameter For NetReceiveCMoveResponse

hNet

A DICOM Network handle.


nCompleted Parameter For NetReceiveCMoveResponse

nCompleted

Number of instances searched.


nFailed Parameter For NetReceiveCMoveResponse

nFailed

Number of instances that failed the search.


nMessageID Parameter For NetReceiveCMoveResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCMoveResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nRemaining Parameter For NetReceiveCMoveResponse

nRemaining

Number of remaining instances to search.


nStatus Parameter For NetReceiveCMoveResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


nWarning Parameter For NetReceiveCMoveResponse

nWarning

Number of instances in which warnings occurred.


pszClass Parameter For NetReceiveCMoveResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


hDS Parameter For NetReceiveCStoreRequest

hDS

Handle to the data set to be stored.


hNet Parameter For NetReceiveCStoreRequest

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCStoreRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nMoveMessageID Parameter For NetReceiveCStoreRequest

nMoveMessageID

The ID of the original move request message. For a simple storage request from a client to a server, this should be 0. When the request is a sub-operation of a C-MOVE, this will contain the original message ID of the C-MOVE request.


nPresentationID Parameter For NetReceiveCStoreRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nPriority Parameter For NetReceiveCStoreRequest

nPriority

The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are:

Value | Meaning
COMMAND_PRIORITY_LOW | [0x0002] Low priority message.
COMMAND_PRIORITY_MEDIUM | [0x0000] Medium priority message.
COMMAND_PRIORTY_HIGH | [0x0001] High priority message.


pszClass Parameter For NetReceiveCStoreRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveCStoreRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


pszMoveAE Parameter For NetReceiveCStoreRequest

pszMoveAE

String that contains the name of the application entity that originally requested the move. For a simple storage request from a client to a server, this should be "". When the request is a sub-operation of a C-MOVE, this will contain the name of the AE that requested the move.


hNet Parameter For NetReceiveCStoreResponse

hNet

A DICOM Network handle.


nMessageID Parameter For NetReceiveCStoreResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveCStoreResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveCStoreResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveCStoreResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveCStoreResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDicomCS Parameter For NetReceiveData

hDicomCS

A DICOM handle that references the command set that contains the actual command message.


hDicomDS Parameter For NetReceiveData

hDicomDS

A DICOM handle that contains the actual data. This may be NULL if no data set is included.


hNet Parameter For NetReceiveData

hNet

A DICOM Network handle.


nID Parameter For NetReceiveData

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


hNet Parameter For NetReceive

hNet

A DICOM Network handle.


lSize Parameter For NetReceive

lSize

Number of bytes of data in pData.


hDS Parameter For NetReceiveNActionRequest

hDS

Handle to the data set on which the specified action is to be performed.


hNet Parameter For NetReceiveNActionRequest

hNet

A DICOM Network handle to the peer member of the connection.


nAction Parameter For NetReceiveNActionRequest

nAction

An application specific action to be performed on the specified data set.


nMessageID Parameter For NetReceiveNActionRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNActionRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For NetReceiveNActionRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNActionRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDS Parameter For NetReceiveNActionResponse

hDS

Handle to the data set resulting from the specified action. This can be NULL.


hNet Parameter For NetReceiveNActionResponse

hNet

A DICOM Network handle to the peer member of the connection.


nAction Parameter For NetReceiveNActionResponse

nAction

An application specific action to be performed on the specified data set.


nMessageID Parameter For NetReceiveNActionResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNActionResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveNActionResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveNActionResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNActionResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDS Parameter For NetReceiveNCreateRequest

hDS

Handle to the data set with the information to use when creating.


hNet Parameter For NetReceiveNCreateRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For NetReceiveNCreateRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNCreateRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For NetReceiveNCreateRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNCreateRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDS Parameter For NetReceiveNCreateResponse

hDS

Handle to the data set that contains the information to use when creating the new SOP Instance.


hNet Parameter For NetReceiveNCreateResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For NetReceiveNCreateResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNCreateResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveNCreateResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveNCreateResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNCreateResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hNet Parameter For NetReceiveNDeleteRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For NetReceiveNDeleteRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNDeleteRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For NetReceiveNDeleteRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNDeleteRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value specifies an instance.


hNet Parameter For NetReceiveNDeleteResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For NetReceiveNDeleteResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNDeleteResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveNDeleteResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveNDeleteResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNDeleteResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hNet Parameter For NetReceiveNGetRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For NetReceiveNGetRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNGetRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For NetReceiveNGetRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNGetRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDS Parameter For NetReceiveNGetResponse

hDS

Handle to the data set that contains the retrieved elements.


hNet Parameter For NetReceiveNGetResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For NetReceiveNGetResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNGetResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveNGetResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveNGetResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNGetResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDS Parameter For NetReceiveNReportRequest

hDS

Handle to an application specific data set which contains information related to the operation.


hNet Parameter For NetReceiveNReportRequest

hNet

A DICOM Network handle to the peer member of the connection.


nEvent Parameter For NetReceiveNReportRequest

nEvent

An application specific event for which a report is to be generated.


nMessageID Parameter For NetReceiveNReportRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNReportRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For NetReceiveNReportRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNReportRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDS Parameter For NetReceiveNReportResponse

hDS

Handle to an application specific data set which contains information related to the operation.


hNet Parameter For NetReceiveNReportResponse

hNet

A DICOM Network handle to the peer member of the connection.


nEvent Parameter For NetReceiveNReportResponse

nEvent

An application specific event for which a report is to be generated.


nMessageID Parameter For NetReceiveNReportResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNReportResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveNReportResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveNReportResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNReportResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDS Parameter For NetReceiveNSetRequest

hDS

Handle to the data set that contains the new information to set.


hNet Parameter For NetReceiveNSetRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For NetReceiveNSetRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNSetRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For NetReceiveNSetRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNSetRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


hDS Parameter For NetReceiveNSetResponse

hDS

Handle to the data set that contains the retrieved elements.


hNet Parameter For NetReceiveNSetResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For NetReceiveNSetResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For NetReceiveNSetResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For NetReceiveNSetResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For NetReceiveNSetResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For NetReceiveNSetResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


nStatus Parameter For NetReceive

nStatus

Error code. Refer to DICOM Error Codes.


nType Parameter For NetReceive

nType

The type of data that was sent. Possible values are:

Value | Meaning
PDU_UNKNOWN | [0x00] Unknown data sent.
PDU_ASSOCIATE_REQUEST | [0x01] Associate Request message sent
PDU_ASSOCIATE_ACCEPT | [0x02] Associate Accept message sent
PDU_ASSOCIATE_REJECT | [0x03] Associate Reject message sent
PDU_DATA_TRANSFER | [0x04] Data transfer made.
PDU_RELEASE_REQUEST | [0x05] Release Request message sent
PDU_RELEASE_RESPONSE | [0x06] Release Response message sent
PDU_ABORT | [0x07] Abort message sent.


pData Parameter For NetReceive

pData

Buffer that contains all the data that was sent. This includes the command set and any associated data set.


Return for AbortAssociation

Return Value

The method always returns 0.


PatientID Parameter For AddStoredPrintItem

PatientID

(Optional parameter) Character string that contains the Value of the Patient ID (0010,0020). The default value of this parameter is an empty string.


ReferencedSOPInstanceUID Parameter For AddStoredPrintItem

ReferencedSOPInstanceUID

Character string that contains the Value of the Referenced SOP Instance UID (0008,1155).


RetrieveAETitle Parameter For AddStoredPrintItem

RetrieveAETitle

Character string that contains the Value of the Retrieve AE Title (0008,0054).


SeriesInstanceUID Parameter For AddStoredPrintItem

SeriesInstanceUID

Character string that contains the Value of the Series Instance UID (0020,000E).


Return for AddStoredPrintItem

Return Value

Return | Meaning
0 | The information about the Stored Print Storage SOP Instance was added successfully.
<> 0 | An error occurred. Refer to Error Codes.


StudyInstanceUID Parameter For AddStoredPrintItem

StudyInstanceUID

Character string that contains the Value of the Study Instance UID (0020,000D).


lPrintScpPort Parameter For Associate

lPrintScpPort

Port number of the Print SCP.


pszCalledTitle Parameter For Associate

pszCalledTitle

Character string that contains the called AE Title (AE Title of the Print SCP).


pszCallingTitle Parameter For Associate

pszCallingTitle

Character string that contains the calling AE Title (AE Title of the Print SCU).


pszPrintScpIP Parameter For Associate

pszPrintScpIP

Character string that contains the IP address orr DNS name of the Print SCP.


Return for Associate

Return Value

Return | Meaning
0 | The Association was established successfully.
DICOM_ERROR_PRINTSCU_ASSOCIATE_RQ_REJECTED | The Association request was rejected by the Print SCP.
(Otherwise) | An error occurred. Refer to Error Codes.


SupportedClasses Parameter For Associate

SupportedClasses

SupportedClasses: (Optional parameter) Specifies the SOP/Meta SOP Classes supported by the Print SCU. This can be any combination of the following values. However, if none of the three Meta SOP Classes is specified, the Basic Grayscale Print Management Meta SOP Class will be specified automatically.

Value | Meaning
PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS | [0x01] Specifies the Basic Grayscale Print Management Meta SOP Class.
PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS | [0x02] Specifies the Basic Color Print Management Meta SOP Class.
PRNSCU_PULL_STORED_PM_META_SOP_CLASS | [0x04] Specifies the Pull Stored Print Management Meta SOP Class.
PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS | [0x08] Specifies the Basic Annotation Box SOP Class.
PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS | [0x10] Specifies the Basic Print Image Overlay Box SOP Class.
PRNSCU_PRESENTATION_LUT_SOP_CLASS | [0x20] Specifies the Presentation LUT SOP Class.
PRNSCU_PRINT_JOB_SOP_CLASS | [0x40] Specifies the Print Job SOP Class.
PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS | [0x80] Specifies the Printer Configuration Retrieval SOP Class.

The default value of this parameter is PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS.


bColorPrintManagement Parameter For Create

bColorPrintManagement

If either the Basic Grayscale Print Management Meta SOP Class or the Basic Color Print Management Meta SOP Class (but not both) is supported on the Association, then this parameter will be ignored and the request will be to create an Instance of the Basic Film Session SOP Class of the Meta SOP Class supported. If both Meta SOP Classes are supported then:

Value | Meaning
VARIANT_TRUE | The request will be to create an Instance of the Basic Film Session SOP Class of the Basic Color Print Management Meta SOP Class.
VARIANT_FALSE | The request will be to create an Instance of the Basic Film Session SOP Class of the Basic Grayscale Print Management Meta SOP Class.

The default value of this parameter is VARIANT_FALSE.


Return for Create

Return Value

Return | Meaning
0 | The Basic Film Session SOP Instance was created successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code; no Instance was created.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Create

Return Value

Return | Meaning
0 | The Basic Print Image Overlay Box SOP Instance was created successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code; no Instance was created.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Basic Print Image Overlay Box SOP Class is not supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Create

Return Value

Return | Meaning
0 | The Presentation LUT SOP Instance was created successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code; no Instance was created.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Presentation LUT SOP Class is not supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Create

Return Value

Return | Meaning
0 | The Pull Print Request SOP Instance was created successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code; no Instance was created.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Pull Stored Print Management Meta SOP Class is not supported on the Association, and hence the Pull Print Request SOP Class is not supported.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Create

Return Value

Return | Meaning
0 | The Basic Film Box SOP Instance was created successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code; no Instance was created.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for CreateObject2

Return Value

This method returns an IDispatch pointer to the created object.


pszClassID Parameter for CreateObject2

pszClassID

Character string that contains the object/control’s PROGID, for example "LEADDicomKernel.LEADDicomKernel.130". Please note that you can use a version independent value, such as "LEADDicomKernel.LEADDicomKernel".


pszLic Parameter for CreateObject2

pszLic

Character string that contains the license string for the object/control. For LEADTOOLS Version 14, use "LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc.".


Return for CreateObject

Return Value

An IUnknown pointer to the created object.


pszClassID Parameter for CreateObject

pszClassID

Character string that contains the object/control’s PROGID, for example "LEADDicomKernel.LEADDicomKernel.130". Please note that you can use a version independent value, such as "LEADDicomKernel.LEADDicomKernel".


pszLic Parameter for CreateObject

pszLic

Character string that contains the license string for the object/control. For LEADTOOLS Version 14, use "LEADTOOLS OCX Copyright (c) 1991-2004 LEAD Technologies, Inc.".


Overlay Parameter For Create

Overlay

(Optional parameter) Specifies the Overlay data for the Image Overlay Box to be created. This parameter can be either a character string or a long value:

If it is a character string (VT_BSTR), it specifies the name of the Data Set file, which contains the Overlay data.

If it is a long value (VT_I4), it specifies the handle of the Data Set that contains the Overlay data. In this case, the parameter must be set to the handle specified by the hDicomDS property of the LEADTOOLS DICOM DataSet COM Object.

Otherwise, the parameter will be ignored.

The Data Set specified is assumed to contain the Overlay Pixel Data Sequence (2040,0020). If the Sequence is not present, the method will return an error. If this parameter is omitted, the method will assume that the Overlay data is contained in the Data Set file specified by the OverlayFilename property.


PresentationLUT Parameter For Create

PresentationLUT

(Optional parameter) Specifies the data of the Presentation LUT to be created. This parameter can be either a character string or a long value:

If it is a character string (VT_BSTR), it specifies the name of the Data Set file which contains the data of the Presentation LUT.

If it is a long value (VT_I4), it specifies the handle of the Data Set that contains the data of the Presentation LUT. In this case, the parameter must be set to the handle specified by the hDicomDS property of the LEADTOOLS DICOM DataSet COM Object.

Otherwise, the parameter will be ignored.

The Data Set specified is assumed to contain the Presentation LUT Sequence (2050,0010). If this Sequence is not present, the method will return an error. Don’t supply this parameter if the Presentation LUT is to be created by specifying a Presentation LUT Shape using the parameter PresentationLUTShape.


pszPresentationLUTShape Parameter For Create

pszPresentationLUTShape

(Optional parameter) Character string that contains the Presentation LUT Shape (2050,0020) of the Presentation LUT to be created. The parameter will be ignored if a Data Set is specified using the parameter PresentationLUT. The default value of this parameter is "IDENTITY".


Return for Delete

Return Value

Return | Meaning
0 | The Basic Film Box SOP Instance was deleted successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Delete

Return Value

Return | Meaning
0 | The Basic Film Session SOP Instance was deleted successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


pszSOPInstanceUID Parameter For Delete

pszSOPInstanceUID

Character string that contains the SOP Instance UID of the Image Overlay Box to be deleted. The method will return an error if this is NULL or if an empty string is specified.


Return for Delete

Return Value

Return | Meaning
0 | The specified Basic Print Image Overlay Box SOP Instance was deleted successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Basic Print Image Overlay Box SOP Class is not supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


pszSOPInstanceUID Parameter For Delete

pszSOPInstanceUID

Character string that contains the SOP Instance UID of the Presentation LUT to be deleted. The method will return an error if this is NULL or if an empty string is specified.


Return for Delete

Return Value

Return | Meaning
0 | The specified Presentation LUT SOP Instance was deleted successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Presentation LUT SOP Class is not supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Delete

Return Value

Return | Meaning
0 | The Pull Print Request SOP Instance was deleted successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Pull Stored Print Management Meta SOP Class is not supported on the Association, and hence the Pull Print Request SOP Class is not supported.
(Otherwise) | An error occurred. Refer to Error Codes.


lFlags Parameter For DeleteModalityLUT

lFlags

Reserved for future use. Pass 0.


Return for DeleteModalityLUT

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lOverlayIndex Parameter For DeleteOverlay

lOverlayIndex

The index of the overlay to be deleted. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


lFlags Parameter For DeletePaletteColorLUT

lFlags

Reserved for future use. Pass 0.


Return for DeletePaletteColorLUT

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lFlags Parameter For DeleteVOILUT

lFlags

Reserved for future use. Pass 0.


Return for DeleteVOILUT

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lFlags Parameter For DeleteWindow

lFlags

Reserved for future use. Pass 0.


Return for DeleteWindow

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bstrFileName Parameter For DicomFileInsert

bstrFileName

Character string that contains the name of the file being added to the DICOM Directory.


hDicomDS Parameter For DicomFileInsert

hDicomDS

Handle to the Data Set contained by the DICOM file being processed. If the Data Set wasn’t loaded successfully, this parameter is set to 0.


nStatus Parameter For DicomFileInsert

nStatus

The status code. Possible values are:

Value | Meaning
DICOMDIR_INSERTDICOMFILE_PREADD | [20300] The Data Set in the file was loaded successfully and the file is about to be added to the DICOM Directory.
DICOM_SUCCESS | [0] The file has been added successfully to the DICOM Directory.
Any other value | [> 20000] An error occurred. Refer to Error Codes.


pReturnVal Parameter For DicomFileInsert

pReturnVal

Address of an integer variable that can be used to skip adding a file or to abort the addition of all files.


bBasicPrintManagement Parameter For GetInfo

bBasicPrintManagement

(Optional parameter) The parameter is described below. The deafult value is VARIANT_TRUE.


bColorPrintManagement Parameter For GetInfo

bColorPrintManagement

(Optional parameter) The parameter is described below. The deafult value is VARIANT_FALSE.


Return for GetInfo

Return Value

Return | Meaning
0 | The required printer information was retrieved successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | None of the three Meta SOP Classes (the Basic Grayscale Print Management Meta SOP Class, the Basic Color Print Management Meta SOP Class, or the Pull Stored Print Management Meta SOP Class) is supported on the Association, and hence the Printer SOP Class is not supported.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for GetInfo

Return Value

Return | Meaning
0 | The required Print Job information was retrieved successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Print Job SOP Class is not supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


pszSOPInstanceUID Parameter For GetInfo

pszSOPInstanceUID

Character string that contains the SOP Instance UID of the Print Job whose information is to be retrieved. The method will return an error if this is NULL or if an empty string is specified.


lFlags Parameter For GetModalityLUTAttributes

lFlags

Reserved for future use. Pass 0.


Return for GetModalityLUTAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lFlags Parameter For GetModalityLUTData

lFlags

Reserved for future use. Pass 0.


pData Parameter For GetModalityLUTData

pData

Address of the VARIANT variable that will receive the "LUT Data" as a safearray.


Return for GetModalityLUTData

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lFlags Parameter For GetOverlayAttributes

lFlags

Reserved for future use. Pass 0.


lOverlayIndex Parameter For GetOverlayAttributes

lOverlayIndex

The index of the overlay whose attributes are required. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


Return for GetOverlayAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lOverlayIndex Parameter For GetOverlayBitmap

lOverlayIndex

The index of the overlay whose overlay data is required. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


lCount Parameter For GetOverlayBitmapList

lCount

Number of frames to retrieve.


lFlags Parameter For GetOverlayBitmapList

lFlags

Reserved for future use. Pass 0.


lFrameIndex Parameter For GetOverlayBitmapList

lFrameIndex

Position of the first frame to retrieve. Use zero-based indexing. For example, if there are 5 bitmaps in a list, the index of the last one is 4.


lOverlayIndex Parameter For GetOverlayBitmapList

lOverlayIndex

The index of the overlay whose frames are required. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


Return for GetOverlayBitmapList

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lFlags Parameter For GetPaletteColorLUTAttributes

lFlags

Reserved for future use. Pass 0.


Return for GetPaletteColorLUTAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


PaletteColorLUTType Parameter For GetPaletteColorLUTData

PaletteColorLUTType

Type of the "Palette Color Lookup Table Data" to get. Possible values are:

Value | Meaning
DICOM_PALETTE_COLOR_LUT_TYPE_RED | [0] Retrieve the "Red Palette Color Lookup Table Data" (0028,1201).
DICOM_PALETTE_COLOR_LUT_TYPE_GREEN | [1] Retrieve the "Green Palette Color Lookup Table Data" (0028,1202).
DICOM_PALETTE_COLOR_LUT_TYPE_BLUE | [2] Retrieve the "Blue Palette Color Lookup Table Data" (0028,1203).


pData Parameter For GetPaletteColorLUTData

pData

Address of the VARIANT variable that will receive the "Palette Color Lookup Table Data" as a safearray.


Return for Get

Return Value

Return | Meaning
0 | The printer configuration information was retrieved successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Printer Configuration Retrieval SOP Class is not supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for GetSOPInstanceUID

Return Value

The SOP Instance UID of the Image Overlay Box that was last created successfully using the Create method.


Return for GetSOPInstanceUID

Return Value

The SOP Instance UID of the Presentation LUT that was last created successfully using the Create method.


pData Parameter For GetVOILUTAttributes

pData

Address of the VARIANT variable that will receive the "LUT Data" as a safearray.


lFlags Parameter For GetVOILUTAttributes

lFlags

Reserved for future use. Pass 0.


Return for GetVOILUTAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lVOILUTIndex Parameter For GetVOILUTAttributes

lVOILUTIndex

The index to the VOI LUT whose attributes are required. According to the DICOM standard, one or more items could exist under one "VOI LUT Sequence" (0028,3010). Use this index to specify which item to use in order to update the properties specified by the VOILUTAttributes property. The specified index must be a number from 0 to the count specified by the VOILUTCount property minus 1.


lVOILUTIndex Parameter For GetVOILUTData

lVOILUTIndex

The index to the VOI LUT whose LUT Data is required. According to the DICOM standard, one or more items could exist under one "VOI LUT Sequence" (0028,3010). Use this index to specify which item to use in order to fill the LUT Data safearray. The specified index must be a number from 0 to the count specified by the VOILUTCount property minus 1.


lFlags Parameter For GetWindowAttributes

lFlags

Reserved for future use. Pass 0.


lWindowIndex Parameter For GetWindowAttributes

lWindowIndex

The index to the Window Center, Window Width value to be retrieved. According to the DICOM standard, if multiple values are present for the Window Center and Window Width, both attributes shall have the same number of values and shall be considered as pairs. The specified index must be a number from 0 to the count specified by the WindowCount property minus 1.


Return for GetWindowAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


ImageDisplayFormat Parameter For Create

ImageDisplayFormat

Character string that contains the Value of the Attribute Image Display Format (2010,0010). The method will return an error if this is set to NULL or if an empty string is specified. The default value of this parameter is "STANDARD\1,1".


bstrFileName Parameter for InsertDicomDS

bstrFileName

Character string that contains the name of the DICOM file referenced by the DICOM Data Set (hDicomDS).


hDicomDS Parameter for InsertDicomDS

hDicomDS

Handle to the DICOM Data Set to be added to the Dicom Directory. This is typically set to the handle specified by the hDicomDS property of the LEADTOOLS DICOM COM object.


Return for InsertDicomDS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bstrFileName Parameter for InsertDicomFile

bstrFileName

Character string that contains the name of the DICOM file to be added to the Dicom Directory.


Return for InsertDicomFile

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Class Parameter For IsClassSupported

Class

Specifies the SOP/Meta SOP Class. Possible values are:

Value | Meaning
PRNSCU_BASIC_GRAYSCALE_PM_META_SOP_CLASS | [0x01] Specifies the Basic Grayscale Print Management Meta SOP Class.
PRNSCU_BASIC_COLOR_PM_META_SOP_CLASS | [0x02] Specifies the Basic Color Print Management Meta SOP Class.
PRNSCU_PULL_STORED_PM_META_SOP_CLASS | [0x04] Specifies the Pull Stored Print Management Meta SOP Class.
PRNSCU_BASIC_ANNOTATION_BOX_SOP_CLASS | [0x08] Specifies the Basic Annotation Box SOP Class.
PRNSCU_BASIC_PRINT_IMAGE_OVERLAY_BOX_SOP_CLASS | [0x10] Specifies the Basic Print Image Overlay Box SOP Class.
PRNSCU_PRESENTATION_LUT_SOP_CLASS | [0x20] Specifies the Presentation LUT SOP Class.
PRNSCU_PRINT_JOB_SOP_CLASS | [0x40] Specifies the Print Job SOP Class.
PRNSCU_PRINTER_CONFIGURATION_RETRIEVAL_SOP_CLASS | [0x80] Specifies the Printer Configuration Retrieval SOP Class.


Return for IsClassSupported

Return Value

Return | Meaning
VARIANT_TRUE | The specified SOP/Meta SOP Class is supported on the Association.
VARIANT_FALSE | The specified SOP/Meta SOP Class is not supported on the Association.


lFlags Parameter For IsOverlayInDataSet

lFlags

Reserved for future use. Pass 0.


lOverlayIndex Parameter For IsOverlayInDataSet

lOverlayIndex

The index of the overlay. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


Return for IsOverlayInDataSet

Return Value

Return | Meaning
VARIANT_TRUE | The overlay data exists inside this Data Set.
VARIANT_FALSE | The overlay data is in another Data Set.


Return for IsSupportLocked

Return Value

Return | Meaning
TRUE | The optional feature is locked.
FALSE | The optional feature is available in your toolkit.


SupportType Parameter For IsSupportLocked

SupportType

The optional feature to check.

Value | Meaning
L_SUPPORT_BARCODES_1D | Support for reading and writing Linear bar codes. This is available in the LEADTOOLS 1D Module.
L_SUPPORT_BARCODES_1D_SILVER | Support for reading and writing Linear bar codes silver module. This is available in the LEADTOOLS 1D Silver Module.
L_SUPPORT_BARCODES_PDF_READ | Support for reading PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (read).
L_SUPPORT_BARCODES_PDF_WRITE | Support for writing PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (write).
L_SUPPORT_BARCODES_DATAMATRIX_READ | Support for reading Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (read).
L_SUPPORT_BARCODES_DATAMATRIX_WRITE | Support for writing Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (write).
L_SUPPORT_BARCODES_QR_READ | Support for reading QR bar codes. This is available in the LEADTOOLS 2D QR Module (read).
L_SUPPORT_BARCODES_QR_WRITE | Support for writing QR bar codes. This is available in the LEADTOOLS 2D QR Module (write).
L_SUPPORT_BITONAL | Support for Scale to Gray and Favor Black processing.
L_SUPPORT_CMW | Support for the CMW file format, which uses Wavelet CMP compression.
L_SUPPORT_DICOM | DICOM file format support, but not the DICOM Communication support.
L_SUPPORT_DOCUMENT | LEADTOOLS Document features . A LEADTOOLS Document license is required
L_SUPPORT_EXTGRAY | Support for 12 bit grayscale, 16-bit grayscale, 48-bit color and 64-bit color image creation and manipulation.
L_SUPPORT_ICR | Support for the ICR Module within the OCR engine. This supports the recognition of handwritten text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_J2K | Unlocks support for JPEG2000 images. The support needs to be unlocked to read and write both types of JPEG 2000 images (JPEG 2000 stream and JP2 files).
L_SUPPORT_LTPRO | Support for advanced image processing functions only available in the Raster Pro and above toolkits.
L_SUPPORT_MEDICAL | Support for the capabilities unlocked by L_SUPPORT_DICOM and L_SUPPORT_EXTGRAY, plus all Medical features.
L_SUPPORT_MEDICAL_NET | Support for everything unlocked by L_SUPPORT_MEDICAL, plus support for the unsecure DICOM Network Communication for Message Exchange.
L_SUPPORT_OCR | Support for the OCR features. (Document/Medical).
L_SUPPORT_OCR_ASIAN | Support for the OCR engine to recognize Asian text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_OCR_PDF_OUTPUT | Support for saving OCR results as a PDF file. This license is in addition to the cost of the OCR Plugin or Document Imaging Suite.
L_SUPPORT_OMR | Support for the OMR Module within the OCR engine. This supports the recognition of check boxes. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_PDF | Support for the PDF, PS and EPS file formats. Available only in the LEADTOOLS PDF Plug in. If this support is locked, the PDF, PS and EPS files will not be loaded or saved.
L_SUPPORT_PDF_SAVE | Support for saving raster images as a PDF file. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_VECTOR | Support for the Vector Features and Vector file formats. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selection.


Index Parameter For Item

Index

Specifies the index of the LAnnotationBox object to be retrieved. This should be a number from 0 to the count of the objects in the collection (as specified by the Count property) minus 1.


Index Parameter For Item

Index

Specifies the index of the LAttribute object to be retrieved. This should be a number from 0 to the count of the objects in the collection (as specified by the Count property) minus 1.


Index Parameter For Item

Index

Specifies the index of the ILImageBox object to be retrieved. This should be a number from 0 to the count of the objects in the collection (as specified by the Count property) minus 1.


Index Parameter For Item

Index

Specifies the index of the LPrinterConfigurationItem object to be retrieved. This should be a number from 0 to the count of the objects in the collection (as specified by the Count property) minus 1.


Index Parameter For Item

Index

Specifies the index of the LSequenceItem object to be retrieved. This should be a number from 0 to the count of the objects in the collection (as specified by the Count property) minus 1.


Index Parameter For Item

Index

Specifies the index of the LSequence object to be retrieved. This should be a number from 0 to the count of the objects in the collection (as specified by the Count property) minus 1.


bstrFileName Parameter for LoadDicomDir

bstrFileName

Character string that specifies the name of the DICOMDIR File.


nFlags Parameter for LoadDicomDir

nFlags

Meta-header flags and Transfer Syntax flags that indicate the file characteristics to use when loading the file. Possible values for the Meta-header flags are:

Value | Meaning
0 | [0x0000] LEADTOOLS will automatically determine the presence or absence of the Meta-header.
DS_METAHEADER_PRESENT | [0x0001] The header is present.
DS_METAHEADER_ABSENT | [0x0002] The header is absent.

Possible values and combinations for the Transfer Syntax flags are:

0 | [0x0000] LEADTOOLS will automatically determine the Transfer Syntax.
DS_LITTLE_ENDIAN | [0x0004] Byte order is Little Endian.
DS_BIG_ENDIAN | [0x0008] Byte order is Big Endian.
DS_IMPLICIT_VR | [0x0010] The Value Representation is implicit.
DS_EXPLICIT_VR | [0x0020] The Value Representation is explicit.

DS_LITTLE_ENDIAN | DS_IMPLICIT_VR

DS_LITTLE_ENDIAN | DS_EXPLICIT_VR

DS_BIG_ENDIAN | DS_EXPLICIT_VR

DS_LOAD_CLOSE

[0x0200] The file will be loaded and closed.

Any of the available Meta-header flags given above may be combined with any of the available values or combinations of values for the Transfer Syntax flags given above. For example, you may combine DS_METAHEADER_ABSENT with DS_EXPLICIT_VR, or you may combine DS_METAHEADER_PRESENT with DS_LITTLE_ENDIAN | DS_EXPLICIT_VR, etc.


Return for LoadDicomDir

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lFlags Parameter For lOverlayIndex

lFlags

Reserved for future use. Pass 0.


Return for lOverlayIndex

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Data Parameter For lVOILUTIndex

Data

A VARIANT variable that holds the LUT Data as a one-dimensional safearray of long values (VT_ARRAY | VT_I4).


lFlags Parameter For lVOILUTIndex

lFlags

Reserved for future use. Pass 0.


Return for lVOILUTIndex

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


hNet Parameter For NetReceiveReleaseRequest

hNet

A DICOM Network handle.


hNet Parameter For NetReceiveReleaseResponse

hNet

A DICOM Network handle.


hCS Parameter For NetReceiveUnknown

hCS

A DICOM handle that references the command set that contains the actual command message.


hDS Parameter For NetReceiveUnknown

hDS

A DICOM handle that contains the actual data. This may be NULL if no data set is included.


hNet Parameter For NetReceiveUnknown

hNet

A DICOM Network handle to the peer member of the connection.


nPresentationID Parameter For NetReceiveUnknown

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


hNet Parameter For NetSecureLinkReady

hNet

A DICOM Network handle.


nError Parameter For NetSecureLinkReady

nError

Error code. Refer to DICOM Error Codes.


hNet Parameter For NetSend

hNet

A DICOM Network handle.


lBytes Parameter For NetSend

lBytes

Number of bytes of data actually sent.


nStatus Parameter For NetSend

nStatus

Error code. Refer to DICOM Error Codes.


nType Parameter For NetSend

nType

The type of data that was sent. Possible values are:

Value | Meaning
PDU_UNKNOWN | [0x00] Unknown data sent.
PDU_ASSOCIATE_REQUEST | [0x01] Associate Request message sent
PDU_ASSOCIATE_ACCEPT | [0x02] Associate Accept message sent
PDU_ASSOCIATE_REJECT | [0x03] Associate Reject message sent
PDU_DATA_TRANSFER | [0x04] Data transfer made.
PDU_RELEASE_REQUEST | [0x05] Release Request message sent
PDU_RELEASE_RESPONSE | [0x06] Release Response message sent
PDU_ABORT | [0x07] Abort message sent.


EventTypeID Parameter For OnPrinterReport

EventTypeID

Specifies the Event Type ID which indicates normal, warning, or failure conditions. Possible values are:

Value | Meaning
1 | Normal condition (Event Type Name = Normal). In this case, all the rest of the parameters will be NULLs.
2 | Warning condition (Event Type Name = Warning).
3 | Failure condition (Event Type Name = Failure).


FilmDestination Parameter For OnPrinterReport

FilmDestination

Character string that contains the Value of the Attribute Film Destination (2000,0040). This will be NULL if the Attribute is not supplied in the report of the Print SCP. Also, it is always NULL if the EventTypeID parameter is equal to 1 (normal condition).


PrinterName Parameter For OnPrinterReport

PrinterName

Character string that contains the Value of the Attribute Printer Name (2110,0030). This will be NULL if the Attribute is not supplied in the report of the Print SCP. Also, it is always NULL if the EventTypeID parameter is equal to 1 (normal condition).


PrinterStatusInfo Parameter For OnPrinterReport

PrinterStatusInfo

Character string that contains the Value of the Attribute Printer Status Info (2110,0020). This will be NULL if the Attribute is not supplied in the report of the Print SCP. Also, it is always NULL if the EventTypeID parameter is equal to 1 (normal condition).


EventTypeID Parameter For OnPrintJobReport

EventTypeID

Specifies the Event Type ID that indicates the status of the Print Job. Possible values are:

Value | Meaning
1 | Event Type Name = Pending
2 | Event Type Name = Printing
3 | Event Type Name = Done
4 | Event Type Name = Failure


ExecutionStatusInfo Parameter For OnPrintJobReport

ExecutionStatusInfo

Character string that contains the Value of the Attribute Execution Status Info (2100,0030). This will be NULL if the Attribute is not supplied in the report of the Print SCP.


FilmSessionLabel Parameter For OnPrintJobReport

FilmSessionLabel

Character string that contains the Value of the Attribute Film Session Label (2000,0050). This will be NULL if the Attribute is not supplied in the report of the Print SCP.


PrinterName Parameter For OnPrintJobReport

PrinterName

Character string that contains the Value of the Attribute Printer Name (2110,0030). This will be NULL if the Attribute is not supplied in the report of the Print SCP.


PrintJobID Parameter For OnPrintJobReport

PrintJobID

Character string that contains the Value of the Attribute Print Job ID (2100,0010). This will be NULL if the Attribute is not supplied in the report of the Print SCP.


PrintJobSOPInstanceUID Parameter For OnPrintJobReport

PrintJobSOPInstanceUID

Character string that contains the SOP Instance UID of the Print Job SOP Instance for which the status report was sent.


OperationStatus Parameter For OnStatus

OperationStatus

When the parameter Status is one of the PRNSCU_STATUS_xxx_RSP status values, OperationStatus will be either COMMAND_STATUS_SUCCESS (in case a Success or Warning status code is specified in the response of the Print SCP) or the Failure status code specified in the response. In all other values of Status, OperationStatus is meaningless and is always set to 0.


Status Parameter For OnStatus

Status

Specifies the status of the Print SCU. Possible values are:

Value | Meaning
PRNSCU_STATUS_CONNECT | [1] The Print SCU is connecting to the Print SCP.
PRNSCU_STATUS_SEND_ASSOCIATE_RQ | [2] An A-ASSOCIATE-RQ was sent to the Print SCP.
PRNSCU_STATUS_RECEIVE_ASSOCIATE_RJ | [3] An A-ASSOCIATE-RJ was received from the Print SCP.
PRNSCU_STATUS_RECEIVE_ASSOCIATE_AC | [4] An A-ASSOCIATE-AC was received from the Print SCP.
PRNSCU_STATUS_SEND_RELEASE_RQ | [5] An A-RELEASE-RQ was sent to the Print SCP.
PRNSCU_STATUS_CLOSE | [6] The Print SCU closed the connection.
PRNSCU_STATUS_RECEIVE_RELEASE_RP | [7] An A-RELEASE-RP was received from the Print SCP.
PRNSCU_STATUS_RECEIVE_RELEASE_RQ | [8] An A-RELEASE-RQ was received from the Print SCP.
PRNSCU_STATUS_SEND_RELEASE_RP | [9] An A-RELEASE-RP was sent to the Print SCP.
PRNSCU_STATUS_RECEIVE_ABORT | [10] An A-ABORT was received from the Print SCP.
PRNSCU_STATUS_SEND_CREATE_FILM_SESSION_RQ | [11] An N-CREATE-RQ was sent to the Print SCP (Basic Film Session SOP Class).
PRNSCU_STATUS_RECEIVE_CREATE_FILM_SESSION_RSP | [12] An N-CREATE-RSP was received from the Print SCP (Basic Film Session SOP Class).
PRNSCU_STATUS_SEND_UPDATE_FILM_SESSION_RQ | [13] An N-SET-RQ was sent to the Print SCP (Basic Film Session SOP Class).
PRNSCU_STATUS_RECEIVE_UPDATE_FILM_SESSION_RSP | [14] An N-SET-RSP was received from the Print SCP (Basic Film Session SOP Class).
PRNSCU_STATUS_SEND_PRINT_FILM_SESSION_RQ | [15] An N-ACTION-RQ was sent to the Print SCP (Basic Film Session SOP Class).
PRNSCU_STATUS_RECEIVE_PRINT_FILM_SESSION_RSP | [16] An N-ACTION-RSP was received from the Print SCP (Basic Film Session SOP Class).
PRNSCU_STATUS_SEND_DELETE_FILM_SESSION_RQ | [17] An N-DELETE-RQ was sent to the Print SCP (Basic Film Session SOP Class).
PRNSCU_STATUS_RECEIVE_DELETE_FILM_SESSION_RSP | [18] An N-DELETE-RSP was received from the Print SCP (Basic Film Session SOP Class).
PRNSCU_STATUS_SEND_CREATE_FILM_BOX_RQ | [19] An N-CREATE-RQ was sent to the Print SCP (Basic Film Box SOP Class).
PRNSCU_STATUS_RECEIVE_CREATE_FILM_BOX_RSP | [20] An N-CREATE-RSP was received from the Print SCP (Basic Film Box SOP Class).
PRNSCU_STATUS_SEND_UPDATE_FILM_BOX_RQ | [21] An N-SET-RQ was sent to the Print SCP (Basic Film Box SOP Class).
PRNSCU_STATUS_RECEIVE_UPDATE_FILM_BOX_RSP | [22] An N-SET-RSP was received from the Print SCP (Basic Film Box SOP Class).
PRNSCU_STATUS_SEND_PRINT_FILM_BOX_RQ | [23] An N-ACTION-RQ was sent to the Print SCP (Basic Film Box SOP Class).
PRNSCU_STATUS_RECEIVE_PRINT_FILM_BOX_RSP | [24] An N-ACTION-RSP was received from the Print SCP (Basic Film Box SOP Class).
PRNSCU_STATUS_SEND_DELETE_FILM_BOX_RQ | [25] An N-DELETE-RQ was sent to the Print SCP (Basic Film Box SOP Class).
PRNSCU_STATUS_RECEIVE_DELETE_FILM_BOX_RSP | [26] An N-DELETE-RSP was received from the Print SCP (Basic Film Box SOP Class).
PRNSCU_STATUS_SEND_UPDATE_IMAGE_BOX_RQ | [27] An N-SET-RQ was sent to the Print SCP (Basic Grayscale/Color Image Box SOP Class).
PRNSCU_STATUS_RECEIVE_UPDATE_IMAGE_BOX_RSP | [28] An N-SET-RSP was received from the Print SCP (Basic Grayscale/Color Image Box SOP Class).
PRNSCU_STATUS_SEND_UPDATE_ANNOTATION_BOX_RQ | [29] An N-SET-RQ was sent to the Print SCP (Basic Annotation Box SOP Class).
PRNSCU_STATUS_RECEIVE_UPDATE_ANNOTATION_BOX_RSP | [30] An N-SET-RSP was received from the Print SCP (Basic Annotation Box SOP Class).
PRNSCU_STATUS_SEND_GET_PRINTER_INFO_RQ | [31] An N-GET-RQ was sent to the Print SCP (Printer SOP Class).
PRNSCU_STATUS_RECEIVE_GET_PRINTER_INFO_RSP | [32] An N-GET-RSP was received from the Print SCP (Printer SOP Class).
PRNSCU_STATUS_SEND_GET_PRINT_JOB_INFO_RQ | [33] An N-GET-RQ was sent to the Print SCP (Print Job SOP Class).
PRNSCU_STATUS_RECEIVE_GET_PRINT_JOB_INFO_RSP | [34] An N-GET-RSP was received from the Print SCP (Print Job SOP Class).
PRNSCU_STATUS_SEND_GET_PRINTER_CONFIG_RQ | [35] An N-GET-RQ was sent to the Print SCP (Printer Configuration Retrieval SOP Class).
PRNSCU_STATUS_RECEIVE_GET_PRINTER_CONFIG_RSP | [36] An N-GET-RSP was received from the Print SCP (Printer Configuration Retrieval SOP Class).
PRNSCU_STATUS_SEND_CREATE_PRESENTATION_LUT_RQ | [37] An N-CREATE-RQ was sent to the Print SCP (Presentation LUT SOP Class).
PRNSCU_STATUS_RECEIVE_CREATE_PRESENTATION_LUT_RSP | [38] An N-CREATE-RSP was received from the Print SCP (Presentation LUT SOP Class).
PRNSCU_STATUS_SEND_DELETE_PRESENTATION_LUT_RQ | [39] An N-DELETE-RQ was sent to the Print SCP (Presentation LUT SOP Class).
PRNSCU_STATUS_RECEIVE_DELETE_PRESENTATION_LUT_RSP | [40] An N-DELETE-RSP was received from the Print SCP (Presentation LUT SOP Class).
PRNSCU_STATUS_SEND_CREATE_OVERLAY_BOX_RQ | [41] An N-CREATE-RQ was sent to the Print SCP (Basic Print Image Overlay Box SOP Class).
PRNSCU_STATUS_RECEIVE_CREATE_OVERLAY_BOX_RSP | [42] An N-CREATE-RSP was received from the Print SCP (Basic Print Image Overlay Box SOP Class).
PRNSCU_STATUS_SEND_UPDATE_OVERLAY_BOX_RQ | [43] An N-SET-RQ was sent to the Print SCP (Basic Print Image Overlay Box SOP Class).
PRNSCU_STATUS_RECEIVE_UPDATE_OVERLAY_BOX_RSP | [44] An N-SET-RSP was received from the Print SCP (Basic Print Image Overlay Box SOP Class).
PRNSCU_STATUS_SEND_DELETE_OVERLAY_BOX_RQ | [45] An N-DELETE-RQ was sent to the Print SCP (Basic Print Image Overlay Box SOP Class).
PRNSCU_STATUS_RECEIVE_DELETE_OVERLAY_BOX_RSP | [46] An N-DELETE-RSP was received from the Print SCP (Basic Print Image Overlay Box SOP Class).
PRNSCU_STATUS_SEND_CREATE_PULL_PRINT_REQUEST_RQ | [47] An N-CREATE-RQ was sent to the Print SCP (Pull Print Request SOP Calss).
PRNSCU_STATUS_RECEIVE_CREATE_PULL_PRINT_REQUEST_RSP | [48] An N-CREATE-RSP was received from the Print SCP (Pull Print Request SOP Calss).
PRNSCU_STATUS_SEND_PRINT_PULL_PRINT_REQUEST_RQ | [49] An N-ACTION-RQ was sent to the Print SCP (Pull Print Request SOP Calss).
PRNSCU_STATUS_RECEIVE_PRINT_PULL_PRINT_REQUEST_RSP | [50] An N-ACTION-RSP was received from the Print SCP (Pull Print Request SOP Calss).
PRNSCU_STATUS_SEND_DELETE_PULL_PRINT_REQUEST_RQ | [51] An N-DELETE-RQ was sent to the Print SCP (Pull Print Request SOP Calss).
PRNSCU_STATUS_RECEIVE_DELETE_PULL_PRINT_REQUEST_RSP | [52] An N-DELETE-RSP was received from the Print SCP (Pull Print Request SOP Calss).
PRNSCU_STATUS_SEND_ABORT | [53] An A-ABORT was sent to the Print SCP.


lOverlayIndex Parameter For OverlayActivationLayer

lOverlayIndex

The index of the overlay whose Activation Layer is required. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


lFlags Parameter For OverlayGroupNumber

lFlags

Reserved for future use. Pass 0.


lOverlayIndex Parameter For OverlayGroupNumber

lOverlayIndex

The index of the overlay whose group number is required. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


lFlags Parameter For PaletteColorLUTType

lFlags

Reserved for future use. Pass 0.


Return for PaletteColorLUTType

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for PrintBox

Return Value

Return | Meaning
0 | The Film Box was printed successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for PrintSession

Return Value

Return | Meaning
0 | The Film Session was printed successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for PrintSession

Return Value

Return | Meaning
0 | The session of the current Pull Print Request SOP Instance was printed successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Pull Stored Print Management Meta SOP Class is not supported on the Association, and hence the Pull Print Request SOP Class is not supported.
(Otherwise) | An error occurred. Refer to Error Codes.


iPercent Parameter For ProgressStatus

iPercent

The completion percentage of the current LEADTOOLS function.


Return for ReleaseAssociation

Return Value

Return | Meaning
0 | The Association was released (if it was established) successfully and the connection was closed. Also, the method will return 0 if the connection is not established.
<> 0 | An error occurred. Refer to Error Codes.


lIndex Parameter For RequestAttributes

lIndex

Index of the Request Attribute to get or set.


bRequest Parameter For ResetAssociate

bRequest

Flag that indicates the type of Associate to which the specified DICOM Associate should be reset. Possible values are:

Value | Meaning
TRUE | Reset the specified DICOM Associate to type Associate Request.
FALSE | Reset the specified DICOM Associate to type Associate Accept.


hPDU Parameter For ResetAssociate

hPDU

A DICOM Associate handle.


Return for ResetAssociate

Return Value

None.


bstrDICOMDIRDstFolder Parameter for ResetDicomDir

bstrDICOMDIRDstFolder

Character string that contains the name of an existing destination folder in which to save the DICOMDIR File.


Return for ResetDicomDir

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for ResetDS

Return Value

None.


Return for ResetIOD

Return Value

None.


Return for ResetTag

Return Value

None.


Return for ResetUID

Return Value

None.


Return for ResetVR

Return Value

None.


Return for SaveDicomDir

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


nFlags Parameter For SaveDS

nFlags

Meta-header flags, Transfer Syntax flags and other flags that indicate file characteristics to use when saving the file. Possible values for Meta-header flags are.

Value | Meaning
0 | [0x0000] Save the Data Set using the characteristics used when loading the Data Set. This can be used with compressed or uncompressed images.
DS_METAHEADER_PRESENT | [0x0001] The header is present. This can be used with compressed or uncompressed images.
DS_METAHEADER_ABSENT | [0x0002] The header is absent. This can be used only with uncompressed images.

Possible values and combinations for the Transfer Syntax flags are:

0 | [0x0000] Save the Data Set using the characteristics used when loading the Data Set. This can be used with compressed or uncompressed images.
DS_LITTLE_ENDIAN | [0x0004] Byte order is Little Endian. This can be used with compressed or uncompressed images.
DS_BIG_ENDIAN | [0x0008] Byte order is Big Endian. This can be used only with uncompressed images.
DS_IMPLICIT_VR | [0x0010] The Value Representation is implicit. This can be used only with uncompressed images.
DS_EXPLICIT_VR | [0x0020] The Value Representation is explicit. This can be used with compressed or uncompressed images.

The following Transfer Syntax flag combinations can be used only with uncompressed images:

DS_LITTLE_ENDIAN | DS_IMPLICIT_VR

DS_BIG_ENDIAN | DS_EXPLICIT_VR

The following Transfer Syntax flag combination can be used with compressed or uncompressed images:

DS_LITTLE_ENDIAN | DS_EXPLICIT_VR

Possible values and combinations for other flags are:

0 | [0x0000] Save the Data Set using the characteristics used when loading the Data Set.
DS_GROUP_LENGTHS | [0x0040] Include an entry in the file for each group with the group number and the number of elements that group has.
DS_LENGTH_EXPLICIT | [0x0080] The length of a sequence (in bytes) is encoded as a 32-bit integer and no Sequence delimitation item is included at the end of the sequence.

DS_GROUP_LENGTHS | DS_LENGTH_EXPLICIT

Any of the available Meta-header flags options above may be combined with any of the available options for the Transfer Syntax flags and other flags given above, based on whether the images are compressed or uncompressed. For example, you may combine DS_METAHEADER_ABSENT with DS_LITTLE_ENDIAN | DS_IMPLICIT_VR and DS_GROUP_LENGTHS | DS_LENGTH_EXPLICIT when using uncompressed images, or you may combine DS_METAHEADER_PRESENT with DS_LITTLE_ENDIAN | DS_EXPLICIT_VR and DS_GROUP_LENGTHS | DS_LENGTH_EXPLICIT when using compressed images.


pszFilename Parameter For SaveDS

pszFilename

Character string that contains the name of the file in which to save the Data Set.


Return for SaveDS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDicomDS Parameter For SaveExtDS

hDicomDS

Handle to the DICOM Data Set to save.


nFlags Parameter For SaveExtDS

nFlags

Meta-header flags, Transfer Syntax flags and other flags that indicate file characteristics to use when saving the file. Possible values for Meta-header flags are.

Value | Meaning
0 | [0x0000] Save the Data Set using the characteristics used when loading the Data Set. This can be used with compressed or uncompressed images.
DS_METAHEADER_PRESENT | [0x0001] The header is present. This can be used with compressed or uncompressed images.
DS_METAHEADER_ABSENT | [0x0002] The header is absent. This can be used only with uncompressed images.

Possible values and combinations for the Transfer Syntax flags are:

0 | [0x0000] Save the Data Set using the characteristics used when loading the Data Set. This can be used with compressed or uncompressed images.
DS_LITTLE_ENDIAN | [0x0004] Byte order is Little Endian. This can be used with compressed or uncompressed images.
DS_BIG_ENDIAN | [0x0008] Byte order is Big Endian. This can be used only with uncompressed images.
DS_IMPLICIT_VR | [0x0010] The Value Representation is implicit. This can be used only with uncompressed images.
DS_EXPLICIT_VR | [0x0020] The Value Representation is explicit. This can be used with compressed or uncompressed images.

The following Transfer Syntax flag combinations can be used only with uncompressed images:

DS_LITTLE_ENDIAN | DS_IMPLICIT_VR

DS_BIG_ENDIAN | DS_EXPLICIT_VR

The following Transfer Syntax flag combination can be used with compressed or uncompressed images:

DS_LITTLE_ENDIAN | DS_EXPLICIT_VR

Possible values and combinations for other flags are:

0 | [0x0000] Save the Data Set using the characteristics used when loading the Data Set.
DS_GROUP_LENGTHS | [0x0040] Include an entry in the file for each group with the group number and the number of elements that group has.
DS_LENGTH_EXPLICIT | [0x0080] The length of a sequence (in bytes) is encoded as a 32-bit integer and no Sequence delimitation item is included at the end of the sequence.

DS_GROUP_LENGTHS | DS_LENGTH_EXPLICIT

Any of the available Meta-header flags options above may be combined with any of the available options for the Transfer Syntax flags and other flags given above, based on whether the images are compressed or uncompressed. For example, you may combine DS_METAHEADER_ABSENT with DS_LITTLE_ENDIAN | DS_IMPLICIT_VR and DS_GROUP_LENGTHS | DS_LENGTH_EXPLICIT when using uncompressed images, or you may combine DS_METAHEADER_PRESENT with DS_LITTLE_ENDIAN | DS_EXPLICIT_VR and DS_GROUP_LENGTHS | DS_LENGTH_EXPLICIT when using compressed images.


pszFilename Parameter For SaveExtDS

pszFilename

String that contains the name of the file in which to save the specified data set.


Return for SaveExtDS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendAbort

hNet

A DICOM Network handle.


nReason Parameter For SendAbort

nReason

The reason for the abort. If the source of the abort is PDU_ABORT_SOURCE_USER, the reasons for the abort are not significant. If the source of the abort is PDU_ABORT_SOURCE_PROVIDER, the possible values are:

Value | Meaning
PDU_ABORT_REASON_UNKNOWN | [0] Unknown
PDU_ABORT_REASON_UNRECOGNIZED | [1] Unrecognized PDU
PDU_ABORT_REASON_UNEXPECTED | [2] Unexpected PDU
PDU_ABORT_REASON_UNRECOGNIZED_PARAM | [4] Unrecognized PDU parameter
PDU_ABORT_REASON_UNEXPECTED_PARAM | [5] Unexpected PDU parameter
PDU_ABORT_REASON_INVALID_PARAM | [6] Invalid PDU parameter value


nSource Parameter For SendAbort

nSource

The source of the abort. Possible values are:

Value | Meaning
PDU_ABORT_SOURCE_USER | [0] Service user. (client)
PDU_ABORT_SOURCE_PROVIDER | [2] Service provider. (server)


Return for SendAbort

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendAssociateAccept

hNet

A DICOM Network handle.


Return for SendAssociateAccept

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendAssociateReject

hNet

A DICOM Network handle.


nReason Parameter For SendAssociateReject

nReason

Reason for the rejection. This depends on the value of nSource. If nSource is PDU_REJECT_SOURCE_USER, the possible values are:

Value | Meaning
PDU_REJECT_REASON_UNKNOWN | [1] Unknown
PDU_REJECT_REASON_APPLICATION | [2] Application context name not supported.
PDU_REJECT_REASON_CALLING | [3] Calling AE Title not recognized.
PDU_REJECT_REASON_CALLED | [7] Called AE Title not recognized.

If nSource is PDU_REJECT_SOURCE_PROVIDER1, the possible values are:

Value | Meaning
PDU_REJECT_REASON_UNKNOWN | [1] Unknown.
PDU_REJECT_REASON_VERSION | [2] Protocol version not supported.

If nSource is PDU_REJECT_SOURCE_PROVIDER2, the possible values are:

Value | Meaning
PDU_REJECT_REASON_CONGESTION | [1] Temporary congestion.
PDU_REJECT_REASON_LIMIT | [2] Local client limit exceeded.


nResult Parameter For SendAssociateReject

nResult

Type of rejection. Possible values are:

Value | Meaning
PDU_REJECT_RESULT_PERMANENT | [1] Rejected permanently.
PDU_REJECT_RESULT_TRANSIENT | [2] Rejected transiently.


nSource Parameter For SendAssociateReject

nSource

The source of the rejection. Possible values are:

Value | Meaning
PDU_REJECT_SOURCE_USER | [1] DICOM Upper Layer Service – User.
PDU_REJECT_SOURCE_PROVIDER1 | [2] DICOM Upper Layer Service – Provider (ASCE related function)
PDU_REJECT_SOURCE_PROVIDER2 | [3] DICOM Upper Layer Service – Provider (Presentation related function)


Return for SendAssociateReject

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendAssociateRequest

hNet

A DICOM Network handle.


Return for SendAssociateRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendCCancelRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCCancelRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCCancelRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


Return for SendCCancelRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendCEchoRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCEchoRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCEchoRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For SendCEchoRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


Return for SendCEchoRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendCEchoResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCEchoResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCEchoResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendCEchoResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendCEchoResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


Return for SendCEchoResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendCFindRequest

hDS

Handle to the data set to be found.


hNet Parameter For SendCFindRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCFindRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCFindRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nPriority Parameter For SendCFindRequest

nPriority

The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are:

Value | Meaning
COMMAND_PRIORITY_LOW | [0x0002] Low priority message.
COMMAND_PRIORITY_MEDIUM | [0x0000] Medium priority message.
COMMAND_PRIORTY_HIGH | [0x0001] High priority message.


pszClass Parameter For SendCFindRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


Return for SendCFindRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendCFindResponse

hDS

Handle to the data set that contains the information found as a result of the call to the SendCFindRequest method.


hNet Parameter For SendCFindResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCFindResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCFindResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendCFindResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendCFindResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


Return for SendCFindResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendCGetRequest

hDS

Handle to the data set to be found.


hNet Parameter For SendCGetRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCGetRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCGetRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nPriority Parameter For SendCGetRequest

nPriority

The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are:

Value | Meaning
COMMAND_PRIORITY_LOW | [0x0002] Low priority message.
COMMAND_PRIORITY_MEDIUM | [0x0000] Medium priority message.
COMMAND_PRIORTY_HIGH | [0x0001] High priority message.


pszClass Parameter For SendCGetRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


Return for SendCGetRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendCGetResponse

hDS

Handle to the data set that contains the information retrieved as a result of the call to the SendCGetRequest method.


hNet Parameter For SendCGetResponse

hNet

A DICOM Network handle to the peer member of the connection.


nCompleted Parameter For SendCGetResponse

nCompleted

Number of instances searched.


nFailed Parameter For SendCGetResponse

nFailed

Number of instances that failed the search.


nMessageID Parameter For SendCGetResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCGetResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nRemaining Parameter For SendCGetResponse

nRemaining

Number of remaining instances to search.


nStatus Parameter For SendCGetResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


nWarning Parameter For SendCGetResponse

nWarning

Number of instances in which warnings occurred.


pszClass Parameter For SendCGetResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


Return for SendCGetResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendCMoveRequest

hDS

Handle to the data set to be moved.


hNet Parameter For SendCMoveRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCMoveRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCMoveRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nPriority Parameter For SendCMoveRequest

nPriority

The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are:

Value | Meaning
COMMAND_PRIORITY_LOW | [0x0002] Low priority message.
COMMAND_PRIORITY_MEDIUM | [0x0000] Medium priority message.
COMMAND_PRIORTY_HIGH | [0x0001] High priority message.


pszClass Parameter For SendCMoveRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszMoveAE Parameter For SendCMoveRequest

pszMoveAE

String that contains the name of the application entity to which to move the data.


Return for SendCMoveRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendCMoveResponse

hDS

Pointer to the dataset used for sending additional information about a non-successful C-MOVE sub-operation. This may be NULL.


hNet Parameter For SendCMoveResponse

hNet

A DICOM Network handle to the peer member of the connection.


nCompleted Parameter For SendCMoveResponse

nCompleted

Number of instances searched.


nFailed Parameter For SendCMoveResponse

nFailed

Number of instances that failed the search.


nMessageID Parameter For SendCMoveResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCMoveResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nRemaining Parameter For SendCMoveResponse

nRemaining

Number of remaining instances to search.


nStatus Parameter For SendCMoveResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


nWarning Parameter For SendCMoveResponse

nWarning

Number of instances in which warnings occurred.


pszClass Parameter For SendCMoveResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


Return for SendCMoveResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendCStoreRequest

hDS

Handle to the data set to be stored.


hNet Parameter For SendCStoreRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCStoreRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nMoveMessageID Parameter For SendCStoreRequest

nMoveMessageID

The ID of the original move request message. For a simple storage request from a client to a server, this should be 0. When the request is a sub-operation of a C-MOVE, this will contain the original message ID of the C-MOVE request.


nPresentationID Parameter For SendCStoreRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nPriority Parameter For SendCStoreRequest

nPriority

The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are:

Value | Meaning
COMMAND_PRIORITY_LOW | [0x0002] Low priority message.
COMMAND_PRIORITY_MEDIUM | [0x0000] Medium priority message.
COMMAND_PRIORTY_HIGH | [0x0001] High priority message.


pszClass Parameter For SendCStoreRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendCStoreRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


pszMoveAE Parameter For SendCStoreRequest

pszMoveAE

String that contains the name of the application entity that originally requested the move. For a simple storage request from a client to a server, this should be "". When the request is a sub-operation of a C-MOVE, this will contain the name of the AE that requested the move.


Return for SendCStoreRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendCStoreResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendCStoreResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendCStoreResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendCStoreResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendCStoreResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendCStoreResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendCStoreResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDicomCS Parameter For SendData

hDicomCS

A DICOM handle that references the command set that contains the actual command message.


hDicomDS Parameter For SendData

hDicomDS

A DICOM handle that contains the actual data. This may be NULL if no data set is included.


hNet Parameter For SendData

hNet

A DICOM Network handle.


nID Parameter For SendData

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


Return for SendData

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendNActionRequest

hDS

Handle to the data set on which the specified action is to be performed.


hNet Parameter For SendNActionRequest

hNet

A DICOM Network handle to the peer member of the connection.


nAction Parameter For SendNActionRequest

nAction

An application specific action to be performed on the specified data set.


nMessageID Parameter For SendNActionRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNActionRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For SendNActionRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNActionRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNActionRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendNActionResponse

hDS

Data set resulting from the specified action.


hNet Parameter For SendNActionResponse

hNet

A DICOM Network handle to the peer member of the connection.


nAction Parameter For SendNActionResponse

nAction

An application specific action that was performed on the specified data set.


nMessageID Parameter For SendNActionResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNActionResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendNActionResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendNActionResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNActionResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNActionResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendNCreateRequest

hDS

Data set with the information to use when creating.


hNet Parameter For SendNCreateRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendNCreateRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNCreateRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For SendNCreateRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNCreateRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNCreateRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendNCreateResponse

hDS

Data set that contains the information to use when creating the new SOP Instance.


hNet Parameter For SendNCreateResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendNCreateResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNCreateResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendNCreateResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendNCreateResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNCreateResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNCreateResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendNDeleteRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendNDeleteRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNDeleteRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For SendNDeleteRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNDeleteRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value specifies an instance.


Return for SendNDeleteRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendNDeleteResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendNDeleteResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNDeleteResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendNDeleteResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendNDeleteResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNDeleteResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNDeleteResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendNGetRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendNGetRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNGetRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For SendNGetRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNGetRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNGetRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendNGetResponse

hDS

Handle to the data set that contains the retrieved elements.


hNet Parameter For SendNGetResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendNGetResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNGetResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendNGetResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendNGetResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNGetResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNGetResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendNonSecureISCL

hNet

A DICOM Network handle.


nBytes Parameter For SendNonSecureISCL

nBytes

Size, in bytes, of the data to be sent.


vBuffer Parameter For SendNonSecureISCL

vBuffer

Byte array that contains the data to be sent.


hDS Parameter For SendNReportRequest

hDS

Handle toan application specific data set which contains information related to the operation.


hNet Parameter For SendNReportRequest

hNet

A DICOM Network handle to the peer member of the connection.


nEvent Parameter For SendNReportRequest

nEvent

An application specific event for which a report is to be generated.


nMessageID Parameter For SendNReportRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNReportRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For SendNReportRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNReportRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNReportRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendNReportResponse

hDS

Handle to an application specific data set which contains information related to the operation.


hNet Parameter For SendNReportResponse

hNet

A DICOM Network handle to the peer member of the connection.


nEvent Parameter For SendNReportResponse

nEvent

An application specific event for which a report is to be generated.


nMessageID Parameter For SendNReportResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNReportResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendNReportResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendNReportResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNReportResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNReportResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendNSetRequest

hDS

Handle to a data set that contains the new information to set.


hNet Parameter For SendNSetRequest

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendNSetRequest

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNSetRequest

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszClass Parameter For SendNSetRequest

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNSetRequest

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNSetRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDS Parameter For SendNSetResponse

hDS

Handle to a data set that contains the retrieved elements.


hNet Parameter For SendNSetResponse

hNet

A DICOM Network handle to the peer member of the connection.


nMessageID Parameter For SendNSetResponse

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.


nPresentationID Parameter For SendNSetResponse

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


nStatus Parameter For SendNSetResponse

nStatus

The status of the original request. For a list of possible values, refer to Status Constants.


pszClass Parameter For SendNSetResponse

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.


pszInstance Parameter For SendNSetResponse

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.


Return for SendNSetResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendReleaseRequest

hNet

A DICOM Network handle.


Return for SendReleaseRequest

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SendReleaseResponse

hNet

A DICOM Network handle.


Return for SendReleaseResponse

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lCount Parameter For SetAgeValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetAgeValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hPDU Parameter For SetApplication

hPDU

A DICOM Associate handle.


pszUID Parameter For SetApplication

pszUID

String that contains the new Application Context to set. This parameter cannot exceed PDU_MAX_UID_SIZE + 1, including the null character at the end.


Return for SetApplication

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bEnabled Parameter For SetAsyncOperations

bEnabled

Flag that indicates whether to enable or disable Asynchronous Operations. Possible values are:

Value | Meaning
TRUE | Enable Asynchronous Operations.
FALSE | Disable Asynchronous Operations.


hPDU Parameter For SetAsyncOperations

hPDU

A DICOM Associate handle.


nInvoked Parameter For SetAsyncOperations

nInvoked

The number of operations (messages) that can be sent without a response.


nPerformed Parameter For SetAsyncOperations

nPerformed

The number of Asynchronous Operations performed.


Return for SetAsyncOperations

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SetAuthDataISCL

hNet

A DICOM Network handle.


nLength Parameter For SetAuthDataISCL

nLength

Length of the authentication data, in bytes. Valid range is 1 – 128.


Return for SetAuthDataISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hBuffer Parameter For SetAuthDataISCL

vBuffer

An array of bytes containing the authentication data.


lLength Parameter For SetBinaryValue

lLength

Length, in bytes, of the binary values to set.


Return for SetBinaryValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCompression Parameter For SetBitmapListValue

lCompression

Value that indicates the type of compression to use. Possible values are:

Value | Meaning
DICOM_IMAGE_COMPRESSION_NONE | [0x00] No compression.
DICOM_IMAGE_COMPRESSION_RLE | [0x01] RLE compression.
DICOM_IMAGE_COMPRESSION_JPEG_LOSSLESS | [0x02] JPEG LossLess compression.
DICOM_IMAGE_COMPRESSION_JPEG_LOSSY | [0x03] JPEG Lossy compression.
DICOM_IMAGE_COMPRESSION_J2K_LOSSLESS | [0x06] JPEG 2000 lossless compression.
DICOM_IMAGE_COMPRESSION_J2K_LOSSY | [0x07] JPEG 2000 lossy compression.


lFlags Parameter For SetBitmapListValue

lFlags

Flags which control the behaviour of this function.

Value | Meaning
DICOM_SETIMAGE_AUTO_SAVE_OVERLAYS | [0x0001]If set, the function will automatically insert the overlays associated with the input bitmap into the dataset.
DICOM_SETIMAGE_AUTO_SET_VOI_LUT | [0x0002]If set, the function will automatically add a VOI LUT to the dataset.
DICOM_SETIMAGE_MINIMIZE_JPEG_SIZE | [0x0004] If set, and the nCompression parameter is IMAGE_COMPRESSION_JPEG_LOSSLESS or IMAGE_COMPRESSION_JPEG_LOSSY, the JPEG compression engine will use optimized Huffman tables, which results in better compression, but slower speed.


lPhotometric Parameter For SetBitmapListValue

lPhotometric

Photometric constant. Possible values are:

Value | Meaning
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2 | [0x01] 8- or 16-bits per pixel, grayscale image.
DICOM_IMAGE_PHOTOMETRIC_PALETTE_COLOR | [0x02] 8-bits per pixel, palettized color image.
DICOM_IMAGE_PHOTOMETRIC_RGB | [0x03] 24-bits per pixel, RGB color image.


nBitsPerPixel Parameter For SetBitmapListValue

nBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 to 8 | The specified bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap.
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


nQFactor Parameter For SetBitmapListValue

nQFactor

The quality factor (Q factor) is a number that determines the degree of loss in the compression process. You can set a value from 2 to 255, where 2 is the highest quality and 255 is the most compression.


Return for SetBitmapListValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lCompression Parameter For SetBitmapValue

lCompression

Value that indicates the type of compression to use. Possible values are:

Value | Meaning
DICOM_IMAGE_COMPRESSION_NONE | [0x00] No compression.
DICOM_IMAGE_COMPRESSION_RLE | [0x01] RLE compression.
DICOM_IMAGE_COMPRESSION_JPEG_LOSSLESS | [0x02] JPEG LossLess compression.
DICOM_IMAGE_COMPRESSION_JPEG_LOSSY | [0x03] JPEG Lossy compression.
DICOM_IMAGE_COMPRESSION_J2K_LOSSLESS | [0x06] JPEG 2000 lossless compression.
DICOM_IMAGE_COMPRESSION_J2K_LOSSY | [0x07] JPEG 2000 lossy compression.


lFlags Parameter For SetBitmapValue

lFlags

Flags which control the behaviour of this function.

Value | Meaning
DICOM_SETIMAGE_AUTO_SAVE_OVERLAYS | [0x0001]If set, the function will automatically insert the overlays associated with the input bitmap into the dataset.
DICOM_SETIMAGE_AUTO_SET_VOI_LUT | [0x0002]If set, the function will automatically add a VOI LUT to the dataset.
DICOM_SETIMAGE_MINIMIZE_JPEG_SIZE | [0x0004] If set, and the nCompression parameter is IMAGE_COMPRESSION_JPEG_LOSSLESS or IMAGE_COMPRESSION_JPEG_LOSSY, the JPEG compression engine will use optimized Huffman tables, which results in better compression, but slower speed.


lPhotometric Parameter For SetBitmapValue

lPhotometric

Photometric constant. Possible values are:

Value | Meaning
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2 | [0x01] 8- or 16-bits per pixel, grayscale image.
DICOM_IMAGE_PHOTOMETRIC_PALETTE_COLOR | [0x02] 8-bits per pixel, palettized color image.
DICOM_IMAGE_PHOTOMETRIC_RGB | [0x03] 24-bits per pixel, RGB color image.


nBitsPerPixel Parameter For SetBitmapValue

nBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 to 8 | The specified bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap.
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


nQFactor Parameter For SetBitmapValue

nQFactor

The quality factor (Q factor) is a number that determines the degree of loss in the compression process. You can set a value from 2 to 255, where 2 is the highest quality and 255 is the most compression.


Return for SetBitmapValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For SetCalled

hPDU

A DICOM Associate handle.


pszName Parameter For SetCalled

pszName

String that contains the name of the called Application Entity to set for the specified DICOM Associate. This parameter cannot exceed PDU_MAX_TITLE_SIZE + 1, including the null character at the end.


Return for SetCalled

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For SetCalling

hPDU

A DICOM Associate handle.


pszName Parameter For SetCalling

pszName

String that contains tha name of the calling Application Entity to set for the specified DICOM Associate. This parameter cannot exceed PDU_MAX_TITLE_SIZE + 1, including the null character at the end.


Return for SetCalling

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lCount Parameter For SetCharValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetCharValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hNet Parameter For SetCipherToIndexTLS

hNet

A DICOM Network handle.


nCipher Parameter For SetCipherToIndexTLS

nCipher

The ciphersuite to set at the specified index. For a list of possible values, refer to Supported Ciphersuites.


nIndex Parameter For SetCipherToIndexTLS

nIndex

Position in an array in which to set the specified ciphersuite. The ciphersuites in this array are those known by the client and should be ordered by preference.


Return for SetCipherToIndexTLS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SetClientCertificateTLS

hNet

A DICOM Network handle.


nCertType Parameter For SetClientCertificateTLS

nCertType

Flag that indicates whether the certificate is binary or text. Possible values are:

Value | Meaning
L_TLS_FILETYPE_PEM | Text certificate.
L_TLS_FILETYPE_ASN1 | Binary certificate.


pszPathToCertificateFile Parameter For SetClientCertificateTLS

pszPathToCertificateFile

Character string that contains the path to the file that contains the certificate.


pszPathToKeyFile Parameter For SetClientCertificateTLS

pszPathToKeyFile

Character string that contains the path to the file containing the private key. This parameter is used if the private key is available in raw mode.


Return for SetClientCertificateTLS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hDicomDS Parameter For SetCommandSet

hDicomDS

Handle to a DICOM Command Set.


Return for SetCommandSet

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


Return for SetConvertValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for SetCurrentElement

Return Value

Return | Meaning
TRUE | The CurrentElement has been set.
FALSE | The hElement specified does not exist.


hElement Parameter For SetCurrentElement

hElement

Memory handle of the Data Set item to which to set the CurrentElement property.


Return for SetCurrentIOD

Return Value

Return | Meaning
TRUE | The CurrentIOD has been set.
FALSE | The hIOD specified does not exist.


hIOD Parameter For SetCurrentIOD

hIOD

Memory handle of the IOD Structure item to which to set the CurrentIOD property.


lCount Parameter For SetDateTimeValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetDateTimeValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For SetDateValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetDateValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hNet Parameter For SetDefaultEncryptionISCL

hNet

A DICOM Network handle.


nEncryptionMode Parameter For SetDefaultEncryptionISCL

nEncryptionMode

Flag that specifies the encryption mode. Possible values are:

Value | Meaning
DICOM_ISCL_ENCRYPT_NONE | [0x00000000]The data is transmitted without encryption.
DICOM_ISCL_ENCRYPT_DESCBC | [0x00001212] The data is transmitted encrypted using the DES algorithm in cipher block chaining mode.

If any other value is used, the encryption mode will be set to DICOM_ISCL_ENCRYPT_NONE.


Return for SetDefaultEncryptionISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNetParameter For SetDefaultSigningISCL

hNet

A DICOM Network handle.


nSignMode Parameter For SetDefaultSigningISCL

nSignMode

Flag that indicates the type of message authentication code to be used. Possible values are:

Value | Meaning
DICOM_ISCL_MAC_NONE | [0x00000000]No message authentication code will be used.
DICOM_ISCL_MAC_MD5 | [0x00001441]A 128 bit MD5 message authentication code is transmitted with the message.
DICOM_ISCL_MAC_DESMAC | [0x00004001]A 64 bit DESMAC authentication code is transmitted with the message.

If a wrong value is passed, the message authentication code will be of type DICOM_ISCL_MAC_MD5.


Return for SetDefaultSigningISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bstrCharSet Parameter for SetDescriptorFile

bstrCharSet

Character string that contains the name of the character set used in the descriptor file. For information on the possible character set names, refer to "Specific Character Set of File-set Descriptor File" (0004, 1142) element in the DICOM Standard.


bstrFileName Parameter for SetDescriptorFile

bstrFileName

Character string that contains the name of the file-set descriptor file.


Return for bstrCharSet

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For SetDoubleValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetDoubleValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


Return for SetDSPreamble

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


AuthKey Parameter For SetEncryptKeyISCL

AuthKey

A 64-bit integer, in little endian byte order, that represents an encryption key.

This value is passed as a VARIANT of type Currency.


hNet Parameter For SetEncryptKeyISCL

hNet

A DICOM Network handle.


nIndex Parameter For SetEncryptKeyISCL

nIndex

Index into the array of encryption keys. This index is 1-based. Possible values for this index are between 1 and 8, inclusive.


Return for SetEncryptKeyISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For SetExtendedData

hPDU

A DICOM Associate handle.


lLengthParameter For SetExtendedData

lLength

Length of pData.


nID Parameter For SetExtendedData

nID

Presentation ID of the Presentation Context from which to retrieve the extended data. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


pData Parameter For SetExtendedData

pData

Buffer that contains the data to set.


Return for SetExtendedData

Return Value

The extended data of the specified Presentation Context of the specified DICOM Associate.


bstrFileSetID Parameter for SetFileSetID

bstrFileSetID

Character string that contains the ID of the file-set.


Return for SetFileSetID

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For SetFloatValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetFloatValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


bEnabled Parameter For SetImplementClass

bEnabled

Flag that indicates whether to enable or disable setting the Implementation Class. Possible values are:

Value | Meaning
TRUE | Enable setting the Implementation Class.
FALSE | Disable setting the Implementation Class.


hPDU Parameter For SetImplementClass

hPDU

A DICOM Associate handle.


pszUID Parameter For SetImplementClass

pszUID

String that contains the new name for the Implementation Class. This parameter cannot exceed PDU_MAX_UID_SIZE + 1, including the null character at the end.


Return for SetImplementClass

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bEnabled Parameter For SetImplementVersion

bEnabled

Flag that indicates whether to enable or disable setting the Implementation Version. Possible values are:

Value | Meaning
TRUE | Enable setting the Implementation Version.
FALSE | Disable setting the Implementation Version.


hPDU Parameter For SetImplementVersion

hPDU

A DICOM Associate handle.


pszVersion Parameter For SetImplementVersion

pszVersion

String that contains the new Implementation Version. This parameter cannot exceed PDU_MAX_VERSION_SIZE + 1, including the null character at the end.


Return for SetImplementVersion

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SetIndexForEncryptISCL

hNet

A DICOM Network handle.


nIndex Parameter For SetIndexForEncryptISCL

nIndex

Index of the encryption key to be used. Possible values for this index are 1 through 8 and DIC_ISCL_UNIQUE_SESSION_KEYS.


Return for SetIndexForEncryptISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SetIndexForMutualAuthISCL

hNet

A DICOM Network handle.


nIndex Parameter For SetIndexForMutualAuthISCL

nIndex

Index of the key to be used for mutual authentication. Possible values for this index are between 1 and 8, inclusive.


Return for SetIndexForMutualAuthISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


pszDescription Parameter For SetIODDescription

pszDescription

Character string that contains the description to be set.


Return for SetIODDescription

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


pszName Parameter For SetIODName

pszName

Character string that contains the name to be set.


Return for SetIODName

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For SetLongValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetLongValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hNet Parameter For SetMaxCommBlockLengthISCL

hNet

A DICOM Network handle.


nCommBlockLength Parameter For SetMaxCommBlockLengthISCL

nCommBlockLength

Size of the communication block length.

If the nMaxCommBlockLength is too small for the maximum standard packet size (168 bytes), the method usually fails.


Return for SetMaxCommBlockLengthISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bEnabled Parameter For SetMaxLength

bEnabled

Flag that indicates whether to enable or disable the Maximum Length restriction. Possible values are:

Value | Meaning
TRUE | Enable the Maximum Length restriction for data transfer.
FALSE | Disable the Maximum Length restriction for data transfer.


hPDU Parameter For SetMaxLength

hPDU

A DICOM Associate handle.


lLength Parameter For SetMaxLength

lLength

The maximum length value to set. This value is only valid if bEnabled is TRUE.


Return for SetMaxLength

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SetMaxMessageLengthISCL

hNet

A DICOM Network handle.


nMsgLength Parameter For SetMaxMessageLengthISCL

nMsgLength

The maximum message length to set.

If this value is smaller than 136, the method will likely fail. (136 bytes is the maximum size of data in mutual authentication request packet.)


Return for SetMaxMessageLengthISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


Data Parameter For SetModalityLUT

Data

(Optional parameter) A VARIANT variable that holds the LUT Data as a one-dimensional safearray of long values (VT_ARRAY | VT_I4). This parameter can be omitted if you are not trying to set the "LUT Data" (0028,3006) under the "Modality LUT Sequence" (0028,3000).


lFlags Parameter For SetModalityLUT

lFlags

Reserved for future use. Pass 0.


Return for SetModalityLUT

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


hNet Parameter For SetMutualAuthAlgISCL

hNet

A DICOM Network handle.


nMutualAuthMode Parameter For SetMutualAuthAlgISCL

nMutualAuthMode

Flag that indicates the mutual authentication mode to use. Currently, only DICOM_ISCL_MUTUAL_AUTH_3P4W is supported, and passing any other value will cause the mutual authentication mode to be DICOM_ISCL_MUTUAL_AUTH_3P4W.


Return for SetMutualAuthAlgISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


AuthKey Parameter For SetMutualAuthKeyISCL

AuthKey

A 64-bit integer, in little endian byte order, that represents an authentication key used during the mutual authentication process.

This value is passed as a VARIANT of type Currency.


hNet Parameter For SetMutualAuthKeyISCL

hNet

A DICOM Network handle.


nIndex Parameter For SetMutualAuthKeyISCL

nIndex

Index into the array of authentication keys. This index is 1-based. Possible values for this index are between 1 and 8, inclusive.


Return for SetMutualAuthKeyISCL

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lFlags Parameter For SetOverlayAttributes

lFlags

Binary flags that determine the behavior of the function. You can specify one or more of the following values:

Value | Meaning
DICOM_SET_OVERLAY_ATTRIB_NO_OVERRIDE | [0x0001] Set this flag if you don’t want to update an overlay, which already exists in the Data Set.


lOverlayIndex Parameter For SetOverlayAttributes

lOverlayIndex

The index of the overlay being affected. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


Return for SetOverlayAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lFlags Parameter For SetOverlayBitmap

lFlags

Reserved for future use. Pass 0.


lFlags Parameter For SetOverlayBitmapList

lFlags

Reserved for future use. Pass 0.


lOverlayIndex Parameter For SetOverlayBitmapList

lOverlayIndex

The index of the overlay being affected. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


Return for SetOverlayBitmapList

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lOverlayIndex Parameter For SetOverlayBitmap

lOverlayIndex

The index of the overlay being affected. This should be a number from 0 to the count specified by the OverlayCount property minus 1.


Return for SetOverlayBitmap

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lFlags Parameter For SetPaletteColorLUTAttributes

lFlags

Reserved for future use. Pass 0.


Return for SetPaletteColorLUTAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Data Parameter For SetPaletteColorLUTData

Data

A VARIANT variable that holds the "Palette Color Lookup Table Data" as a one-dimensional safearray of long values.


lFlags Parameter For SetPaletteColorLUTData

lFlags

Reserved for future use. Pass 0.


PaletteColorLUTType Parameter For SetPaletteColorLUTData

PaletteColorLUTType

Type of the "Palette Color Lookup Table Data" to set. Possible values are:

Value | Meaning
DICOM_PALETTE_COLOR_LUT_TYPE_RED | [0] Set the "Red Palette Color Lookup Table Data" (0028,1201).
DICOM_PALETTE_COLOR_LUT_TYPE_GREEN | [1] Set the "Green Palette Color Lookup Table Data" (0028,1202).
DICOM_PALETTE_COLOR_LUT_TYPE_BLUE | [2] Set the "Blue Palette Color Lookup Table Data" (0028,1203).


Return for SetPaletteColorLUTData

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


hPDU Parameter For SetPresentationAbstract

hPDU

A DICOM Associate handle.


nID Parameter For SetPresentationAbstract

nID

Presentation ID of the Presentation Context to which to set the abstract syntax. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


pszUID Parameter For SetPresentationAbstract

pszUID

String that contains the Abstract Syntax to set. For a list of possible values, refer to Abstract Syntax Values. This parameter cannot exceed PDU_MAX_UID_SIZE + 1, including the null character at the end.


Return for SetPresentationAbstract

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For SetPresentationID

hPDU

A DICOM Associate handle.


lIndex Parameter For SetPresentationID

lIndex

Index of the Presentation Context to set.


nID Parameter For SetPresentationID

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It must be unique. It should start at 1 and it must be odd. (1, 3, 5, …)


Return for SetPresentationID

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For SetPresentationResult

hPDU

A DICOM Associate handle.


nID Parameter For SetPresentationResult

nID

Presentation ID of the Presentation Context in which to set the result. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


nResult Parameter For SetPresentationResult

nResult

The result to set. Possible values are:

Value | Meaning
PDU_ACCEPT_RESULT_SUCCESS | [0] Success
PDU_ACCEPT_RESULT_USER_REJECT | [1] User rejection
PDU_ACCEPT_RESULT_PROVIDER_REJECT | [2] No reason (provider rejection)
PDU_ACCEPT_RESULT_ABSTRACT_SYNTAX | [3] Abstract Syntax not supported. (provider rejection)
PDU_ACCEPT_RESULT_TRANSFER_SYNTAX | [4] Transfer Syntax not supported. (provider rejection)


Return for SetPresentationResult

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


bRequest Parameter For SetRequest

bRequest

Flag that indicates the type of DICOM Associate to set. Possible values are:

Value | Meaning
TRUE | Sets the DICOM Associate to Associate Request.
FALSE | Sets the DICOM Associate to Associate Accept.


hPDU Parameter For SetRequest

hPDU

A DICOM Associate handle.


Return for SetRequest

Return Value

None.


bEnabled Parameter For SetRoleSelect

bEnabled

Flag that indicates whether to enable or disable Role Selection. Possible values are:

Value | Meaning
TRUE | Enable Role Selection.
FALSE | Disable Role Selection.


hPDU Parameter For SetRoleSelect

hPDU

A DICOM Associate handle.


nID Parameter For SetRoleSelect

nID

Presentation ID of the Presentation Context in which to set the User Role and Provider Role. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.


nProvider Parameter For SetRoleSelect

nProvider

Flag that indicates whether or not to support the Provider Role for the specified Presentation Context. Possible values are:

Value | Meaning
PDU_ROLE_NON_SUPPORT | [0] Do not support the Provider Role.
PDU_ROLE_SUPPORT | [1] Support the Provider Role.


nUser Parameter For SetRoleSelect

nUser

Flag that indicates whether or not to support the User Role for the specified Presentation Context. Possible values are:

Value | Meaning
PDU_ROLE_NON_SUPPORT | [0] Do not support the User Role.
PDU_ROLE_SUPPORT | [1] Support the User Role.


Return for SetRoleSelect

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hNet Parameter For SetServerCertificateTLS

hNet

A DICOM Network handle.


nCertType Parameter For SetServerCertificateTLS

nCertType

Flag that indicates whether the certificate is binary or text. Possible values are:

Value | Meaning
L_TLS_FILETYPE_PEM | Text certificate
L_TLS_FILETYPE_ASN1 | Binary certificate


pszPathToCertificateFile Parameter For SetServerCertificateTLS

pszPathToCertificateFile

Character string that contains the path to the file that contains the certificate.


pszPathToKeyFile Parameter For SetServerCertificateTLS

pszPathToKeyFile

Character string that contains the path to the file containing the private key. This parameter is used if the private key is available in raw mode.


Return for SetServerCertificateTLS

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lCount Parameter For SetShortValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetShortValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For SetStringValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetStringValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


pszName Parameter For SetTagName

pszName

Character string that contains the name to be set.


Return for SetTagName

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lCount Parameter For SetTimeValue

lCount

Value that indicates the number of values to set in the Value Field. If you want to set multiple values in the Value Field.


Return for SetTimeValue

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hPDU Parameter For SetTransferSyntax

hPDU

A DICOM Associate handle.


lIndex Parameter For SetTransferSyntax

lIndex

Index of the Transfer Syntax to set.


nID Parameter For SetTransferSyntax

nID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.


pszUID Parameter For SetTransferSyntax

pszUID

String that contains the new Transfer Syntax to set. For a list of possible values, refer to Transfer Syntax Values. This parameter cannot exceed PDU_MAX_UID_SIZE + 1, including the null character at the end.


Return for SetTransferSyntax

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


pszName Parameter For SetUIDName

pszName

Character string that contains the name to be set.


Return for SetUIDName

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


hPDU Parameter For SetUserInfo

hPDU

A DICOM Associate handle.


lIndex Parameter For SetUserInfo

lIndex

Index of the User-defined item to be set.


nLength Parameter For SetUserInfo

nLength

Length of the specified User-defined item.


nType Parameter For SetUserInfo

nType

Type of the User-defined item.


pData Parameter For SetUserInfo

pData

Buffer that contains the data for the specified User-defined item.


Return for SetUserInfo

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


hPDU Parameter For SetVersion

hPDU

A DICOM Associate handle.


nVersion Parameter For SetVersion

nVersion

The version number to set.


Return for SetVersion

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lVOILUTIndex Parameter For SetVOILUT

lVOILUTIndex

The index to the VOI LUT to be set. According to the DICOM standard, one or more items could exist under one "VOI LUT Sequence" (0028,3010). Use this index to specify which item to update. This index is zero-based.


pszName Parameter For SetVRName

pszName

Character string that contains the name to be set.


Return for SetVRName

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to Error Codes.


lFlags Parameter For SetWindowAttributes

lFlags

Reserved for future use. Pass 0.


lWindowIndex Parameter For SetWindowAttributes

lWindowIndex

The index to the Window Center, Window Width value to be updated. According to the DICOM standard, if multiple values are present for the Window Center and Window Width, both attributes shall have the same number of values and shall be considered as pairs. The index is zero-based.


Return for SetWindowAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lIndex Parameter for ShortValues

lIndex

Index into the array of short values. This is a zero-based index.


Return for ShutDown

Return Value

None.


Return for StartUp

Return Value

Return | Meaning
0 | The function was successful.
<>0 | An error occurred. Refer to DICOM Error Codes.


lIndex Parameter for StringValues

lIndex

Index into the array of string values. This is a zero-based index.


lIndex Parameter for TimeValues

lIndex

Index into the array of time values. This is a zero-based index.


pszKey Parameter For UnlockSupport

pszKey

The key to unlock the feature.


SupportType Parameter For UnlockSupport

SupportType

The optional feature to unlock.

Value | Meaning
L_SUPPORT_BARCODES_1D | Support for reading and writing Linear bar codes. This is available in the LEADTOOLS 1D Module.
L_SUPPORT_BARCODES_1D_SILVER | Support for reading and writing Linear bar codes silver module. This is available in the LEADTOOLS 1D Silver Module.
L_SUPPORT_BARCODES_PDF_READ | Support for reading PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (read).
L_SUPPORT_BARCODES_PDF_WRITE | Support for writing PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (write).
L_SUPPORT_BARCODES_DATAMATRIX_READ | Support for reading Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (read).
L_SUPPORT_BARCODES_DATAMATRIX_WRITE | Support for writing Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (write).
L_SUPPORT_BARCODES_QR_READ | Support for reading QR bar codes. This is available in the LEADTOOLS 2D QR Module (read).
L_SUPPORT_BARCODES_QR_WRITE | Support for writing QR bar codes. This is available in the LEADTOOLS 2D QR Module (write).
L_SUPPORT_BITONAL | Support for Scale to Gray and Favor Black processing.
L_SUPPORT_CMW | Support for the CMW file format, which uses Wavelet CMP compression.
L_SUPPORT_DICOM | DICOM file format support, but not the DICOM Communication support.
L_SUPPORT_DOCUMENT | LEADTOOLS Document features . A LEADTOOLS Document license is required
L_SUPPORT_EXTGRAY | Support for 12 bit grayscale, 16-bit grayscale, 48-bit color and 64-bit color image creation and manipulation.
L_SUPPORT_ICR | Support for the ICR Module within the OCR engine. This supports the recognition of handwritten text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_J2K | Unlocks support for JPEG2000 images. The support needs to be unlocked to read and write both types of JPEG 2000 images (JPEG 2000 stream and JP2 files).
L_SUPPORT_LTPRO | Support for advanced image processing functions only available in the Raster Pro and above toolkits.
L_SUPPORT_MEDICAL | Support for the capabilities unlocked by L_SUPPORT_DICOM and L_SUPPORT_EXTGRAY, plus all Medical features.
L_SUPPORT_MEDICAL_NET | Support for everything unlocked by L_SUPPORT_MEDICAL, plus support for the unsecure DICOM Network Communication for Message Exchange.
L_SUPPORT_OCR | Support for the OCR features. (Document/Medical).
L_SUPPORT_OCR_ASIAN | Support for the OCR engine to recognize Asian text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_OCR_PDF_OUTPUT | Support for saving OCR results as a PDF file. This license is in addition to the cost of the OCR Plugin or Document Imaging Suite.
L_SUPPORT_OMR | Support for the OMR Module within the OCR engine. This supports the recognition of check boxes. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_PDF | Support for the PDF, PS and EPS file formats. Available only in the LEADTOOLS PDF Plug in. If this support is locked, the PDF, PS and EPS files will not be loaded or saved.
L_SUPPORT_PDF_SAVE | Support for saving raster images as a PDF file. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_VECTOR | Support for the Vector Features and Vector file formats. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selection.


bUpdateTextString Parameter For Update

bUpdateTextString

(Optional parameter) Specifies whether to update the Text String of the Annotation Box:

Value | Meaning
VARIANT_TRUE | The Text String will be updated as specified by the TextString property.
VARIANT_FALSE | The Attribute will not be included in the request to the Print SCP and hence will not be updated.

The default value of this parameter is VARIANT_TRUE.


Return for Update

Return Value

Return | Meaning
0 | The Annotation Box was updated successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Basic Annotation Box SOP Class is not supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Update

Return Value

Return | Meaning
0 | The Basic Film Box SOP Instance was updated successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Update

Return Value

Return | Meaning
0 | The Basic Film Session SOP Instance was updated successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Update

Return Value

Return | Meaning
0 | The Image Box was updated successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for Update

Return Value

Return | Meaning
0 | The specified Basic Print Image Overlay Box SOP Instance was updated successfully.
DICOM_ERROR_PRINTSCU_FAILURE_STATUS | The response of the Print SCP specifies a Failure status code.
DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED | The Basic Print Image Overlay Box SOP Class is not supported on the Association.
(Otherwise) | An error occurred. Refer to Error Codes.


Image Parameter For Update

Image

(Optional parameter) Specifies the image to be printed in the Image Box. This parameter can be either a character string or a long value:

If it is a character string (VT_BSTR), it specifies the name of the Data Set file, which contains the image to be printed in the Image Box.

If it is a long value (VT_I4), it specifies the handle of the Data Set that contains the image to be printed in the Image Box. In this case, the parameter must be set to the handle specified by the hDicomDS property of the LEADTOOLS DICOM DataSet COM Object.

Otherwise, the parameter will be ignored.


Overlay Parameter For Update

Overlay

(Optional parameter) Specifies the Overlay data for the Image Overlay Box. This parameter can be either a character string or a long value:

If it is a character string (VT_BSTR), it specifies the name of the Data Set file, which contains the Overlay data.

If it is a long value (VT_I4), it specifies the handle of the Data Set that contains the Overlay data. In this case, the parameter must be set to the handle specified by the hDicomDS property of the LEADTOOLS DICOM DataSet COM Object.

Otherwise, the parameter will be ignored.

The Data Set specified is assumed to contain the Overlay Pixel Data Sequence (2040,0020). If the Sequence is not present, the method will return an error. The Overlay data can also be specified using the OverlayFilename property as described below.


pszSOPInstanceUID Parameter For Update

pszSOPInstanceUID

Character string that contains the SOP Instance UID of the Image Overlay Box to be updated. The method will return an error if this is NULL or if an empty string is specified.


Return for Add

Return Value

A pointer to the newly added DicomWaveformAnnotation object.


Return for Add

Return Value

A pointer to the newly added DicomWaveformChannel object.


bstrSOPInstanceUID Parameter For AddLayerImageRef

bstrSOPInstanceUID

String that contains the SOP Instance UID of the Image SOP Instance to be referenced.


Return for AddLayerImageRef

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


FrameNumbers Parameter For AddPresStateImageRef

FrameNumbers

FrameNumbers: (Optional parameter) A VARIANT variable that holds the frame numbers within the referenced SOP Instance as a one-dimensional safearray of short values (VT_ARRAY | VT_I2) or long values (VT_ARRAY | VT_I4).


Image Parameter For AddPresStateImageRef

Image

Image: Specifies the SOP Instance to be referenced. This parameter can be either a character string or a long value:

If it is a character string (VT_BSTR), it specifies the name of the Data Set file which contains the image to be referenced.

If it is a long value (VT_I4), it specifies the handle to the Data Set that contains the image to be referenced.


Return for AddPresStateImageRef

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lIndex Parameter for AddWaveformGroup

lIndex

(Optional parameter) Zero-based index of the new waveform group. The default value of this parameter is ELEMENT_INDEX_MAX, which adds the new group at the end.


nFlags Parameter for AddWaveformGroup

nFlags

(Optional parameter) Reserved for future use. This must be set to 0, which is the default value.


pWaveformGroup Parameter for AddWaveformGroup

pWaveformGroup

A DicomWaveformGroup object that specifies the waveform group to be added to the dataset.


Return for AddWaveformGroup

Return Value

Return | Meaning
DICOM_SUCCESS | The method was successful.
<> DICOM_SUCCESS | An error occurred. Refer to Error Codes.


lIndex Parameter for ChannelSamples

lIndex

Index into the array of samples. Valid values range from 0 to NumberOfSamples property minus 1.


bConvertGraphicObject Parameter For ConvertDicomAnnObjToLEADAnnObj

bConvertGraphicObject

Specifies whether to convert the graphic annotation object described by the GraphicObjectAttributes property or to convert the text annotation object described by the TextObjectAttributes property. Possible values are:

Value | Meaning
VARIANT_TRUE | Convert the graphic annotation object described by the properties specified by the GraphicObjectAttributes property.
VARIANT_FALSE | Convert the text annotation object described by the properties specified by the TextObjectAttributes property.


Return for ConvertDicomAnnObjToLEADAnnObj

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


hLEADAnnObject Parameter For ConvertLEADAnnObjToDicomAnnObjs

hLEADAnnObject

Handle to the LEAD annotation object to be converted. The method will return an error if this is set to 0.


lFlags Parameter For ConvertLEADAnnObjToDicomAnnObjs

lFlags

Reserved for future use. Pass 0.


Return for ConvertLEADAnnObjToDicomAnnObjs

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bstrLayerName Parameter For CreateGraphicAnnItem

bstrLayerName

String that contains the value of the "Graphic Layer" (0070,0002) element under the new Item.


lIndex Parameter For CreateGraphicAnnItem

lIndex

Index value that specifies where to insert the new Item in the "Graphic Annotation Sequence". The index is zero based; if the new Item is to be made the first one, set this to 0. Use the value ELEMENT_INDEX_MAX to add the new Item at the end of the sequence.


Return for CreateGraphicAnnItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bCheckLayer Parameter For CreateGraphicObject

bCheckLayer

(Optional parameter) Indicates whether to verify the existenece of the layer as given by the LayerName property (which is specified by the GraphicObjectAttributes property). Possible values are:

Value | Meaning
VARIANT_TRUE | Verify the existence of the layer to which the object will be added. If the layer doesn’t exist, the method will return an error.
VARIANT_FALSE | Add the object without checking the existence of the layer.

The default value of this parameter is VARIANT_FALSE.


Return for CreateGraphicObject

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for CreateLayer

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bElementsToSign Parameter For CreateSignature

bElementsToSign

(Optional parameter) Boolean value that specifies whether the array of long values specified by the LongValues property contains the Tags of the Data Elements to be signed. Possible values are:

Value | Meaning
VARIANT_TRUE | The Tags of the Data Elements to be signed are contained in the array specified by the LongValues property and their count is given by the LongValueCount property. The array must be filled before calling the method. If the Digital Signature is being created in the main Data Set, only Data Elements on the root of the Data Set may be referenced by the Tags. Similarly, if the Digital Signature is being created in an Item of a Sequence of Items, only Data Elements under this Item may be referenced by the Tags.
VARIANT_FALSE | No Tags are specified.

See the Remarks for more details. The default value of this parameter is VARIANT_FALSE.


bstrCertificateFile Parameter For CreateSignature

bstrCertificateFile

Character string that contains the name of the file that stores the digital certificate of the signer. This will be the Certificate of Signer (0400,0115). The method accepts X.509 digital certificates from files in any of the following formats:

PEM | (usually .pem, .cer, or .crt)
DER | (usually .cer or .crt)
PKCS#7 PEM | (usually .pem)
PKCS#7 DER | (usually .p7b or .spc)
PKCS#12 | (usually .pfx or .p12)

If more than one digital certificate is stored in the file, the first one will be used.

For the last format (PKCS#12), use the bstrPassword parameter to specify the password if the digital certificate is stored encrypted. This parameter is ignored for the rest of the formats.

The method will fail if the specified private key doesn’t match the public key of the digital certificate.


bstrMacTransferSyntax Parameter For CreateSignature

bstrMacTransferSyntax

(Optional parameter) Character string that contains the MAC Calculation Transfer Syntax UID (0400,0010). This is the Transfer Syntax in which the Data Elements included in the MAC calculation should be encoded. This parameter can be set to NULL or to an empty string. See the Remarks for more details. The default value of this parameter is an empty string.


bstrPassword Parameter For CreateSignature

bstrPassword

Character string that contains the password to be used if the private key is stored encrypted. The password will also be used for the PKCS#12 digital certificates. Set this parameter to NULL or to an empty string if no password is required.


bstrPrivateKeyFile Parameter For CreateSignature

bstrPrivateKeyFile

Character string that contains the name of the file that stores the private key which will be used to encrypt the Message Authentication Code (MAC). The method accepts private keys from files in any of the following formats:

Privacy Enhanced Mail (PEM)

Distinguished Encoding Rules (DER)

Public Key Cryptography Standard (PKCS) #8 PEM

PKCS#8 DER

PKCS#12

Use the parameter bstrPassword to specify the password if the private key is stored encrypted.


MacAlgorithm Parameter For CreateSignature

MacAlgorithm

(Optional parameter) Value that specifies the MAC Algorithm (0400,0015). This is the algorithm which should be used in generating the MAC. Possible values are:

Value | Meaning
DICOM_MAC_ALGORITHM_RIPEMD160 | [0] Use the RACE Integrity Primitives Evaluation (RIPEMD-160) hash function (recommended).
DICOM_MAC_ALGORITHM_SHA1 | [1] Use the Secure Hash Algorithm (SHA-1) hash function.
DICOM_MAC_ALGORITHM_MD5 | [2] Use the Message Digest – 5 (MD5) hash function.

The default value of this parameter is DICOM_MAC_ALGORITHM_RIPEMD160.


nReserved Parameter For CreateSignature

nReserved

(Optional parameter) Reserved for future use. This must be set to 0, which is the default value.


SecurityProfile Parameter For CreateSignature

SecurityProfile

(Optional parameter) Value that specifies the Digital Signature Security Profile with which to conform when creating the Digital Signature. Possible values are:

Value | Meaning
DICOM_SECURITY_PROFILE_NONE | [0] Don’t conform to any Digital Signature Security Profile.
DICOM_SECURITY_PROFILE_BASE_RSA | [1] Conform to the Base Rivest-Shamir-Adleman (RSA) Digital Signature Profile.
DICOM_SECURITY_PROFILE_CREATOR_RSA | [2] Conform to the Creator RSA Digital Signature Profile.
DICOM_SECURITY_PROFILE_AUTHORIZATION_RSA | [3] Conform to the Authorization RSA Digital Signature Profile.

See the Remarks for more details. The default value of this parameter is DICOM_SECURITY_PROFILE_NONE.


Return for CreateSignature

Return Value

Return | Meaning
DICOM_SUCCESS | The method was successful.
<> DICOM_SUCCESS | An error occurred. Refer to Error Codes.


bCheckLayer Parameter For CreateTextObject

bCheckLayer

(Optional parameter) Indicates whether to verify the existenece of the layer as given by the LayerName (which is specified by the TextObjectAttributes). Possible values are:

Value | Meaning
VARIANT_TRUE | Verify the existenece of the layer to which the object will be added. If the layer doesn’t exist, the method will return an error.
VARIANT_FALSE | Add the obejct without checking the existenece of the layer.

The default value of this parameter is VARIANT_FALSE.


Return for CreateTextObject

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bDefaultAll Parameter for DefaultContextGroup

bDefaultAll

(Optional parameter) Possible values are:

Value | Meaning
VARIANT_TRUE | The method will restore all the Context Groups in the Context Group Table.
VARIANT_FALSE | The method will restore only the Context Group specified by the CurrentContextGroup property.

The default value of this parameter is VARIANT_FALSE.


Return for DefaultContextGroup

Return Value

Return | Meaning
0 | The method was successful.
DICOM_ERROR_MEMORY | The method failed to allocate memory.


Return for DeleteCodedConcept

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentCodedConcept property was updated with an adjacent Coded Concept in the same Context Group. This Concept is the one immediately following the Concept being deleted or the one immediately preceding it if no Concepts follow the Concept being deleted.
VARIANT_FALSE | No Coded Concepts are left in the Context Group of the deleted Coded Concept.


Return for DeleteContextGroup

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentContextGroup property was updated with an adjacent Context Group in the Context Group Table. This Group is the one immediately following the Group being deleted or the one immediately preceding it if no Groups follow the Group being deleted.
VARIANT_FALSE | No Context Groups are left in the Context Group Table.


Return for DeleteSignature

Return Value

None.


lIndex Parameter for DeleteWaveformGroup

lIndex

Zero-based index of the waveform group to be deleted. Valid values are from 0 to GetWaveformGroupCount method minus 1.


nReserved Parameter for DeleteWaveformGroup

nReserved

(Optional parameter) Reserved for future use. This must be set to 0, which is the default value.


Return for DeleteWaveformGroup

Return Value

Return | Meaning
DICOM_SUCCESS | The method was successful.
<> DICOM_SUCCESS | An error occurred. Refer to Error Codes.


nReturnValue Parameter For EndConversion

nReturnValue

The error code to be returned by the ConvertLEADAnnObjToDicomAnnObjs method. If this is set to 0, the method will do nothing (i.e., the conversion will not be stopped).


Return for EndConversion

Return Value

None.


bstrCodeValue Parameter for FindCodedConcept

bstrCodeValue

Character string that contains the Code Value (0008,0100) of the Coded Concept to be found.


bstrCodingSchemeDesignator Parameter for FindCodedConcept

bstrCodingSchemeDesignator

Character string that contains the Coding Scheme Designator (0008,0102) of the Coded Concept to be found.


Return for FindCodedConcept

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentCodedConcept property was updated with the Coded Concept, in the Context Group specified by the CurrentContextGroup property, which has the specified Coding Scheme Designator and Code Value.
VARIANT_FALSE | The Context Group specified by the CurrentContextGroup property doesn’t contain a Coded Concept with the specified Coding Scheme Designator and Code Value.


bstrContextID Parameter for FindContextGroup

bstrContextID

Character string that contains a Context Identifier (CID). The method will update the CurrentContextGroup property with the Context Group in the Context Group Table which has this Context ID.


Return for FindContextGroup

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentContextGroup property was updated with the Context Group, in the Context Group Table, which has the specified Context ID.
VARIANT_FALSE | None of the Context Groups in the Context Group Table has the specified Context ID.


Return for FindFirstGraphicAnnItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | No Items were found.


Return for FindFirstPresStateRefSeriesItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | No Items were found.


lGraphicObjectIndex Parameter For FindGraphicObjectItem

lGraphicObjectIndex

Index of the graphic annotation object whose Item is required. This should be a number from 0 to the count of the graphic annotation objects defined by the same "Graphic Annotation Sequence" Item minus 1. The count is returned by the GetGraphicObjectCount method.


Return for FindGraphicObjectItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | The Item couldn’t be found or an error occurred (refer to Error Codes).


lIndex Parameter for FindIndexCodedConcept

lIndex

The index of the required Coded Concept in the Context Group specified by the CurrentContextGroup property. This should be a number from 0 to the count of Coded Concepts in the Context Group minus 1. This count is returned by the GetCodedConceptCount method.


Return for FindIndexCodedConcept

Return Value

Return | Meaning
0 | The method was successful.
DICOM_ERROR_PARAMETER | The index specified is invalid.


lIndex Parameter for FindIndexContextGroup

lIndex

The index of the required Context Group. This should be a number from 0 to the count of Context Groups in the table minus 1. This count is returned by the GetContextGroupCount method.


Return for FindIndexContextGroup

Return Value

Return | Meaning
0 | The method was successful.
DICOM_ERROR_PARAMETER | The index specified is invalid.


LayerNameOrIndex Parameter For FindLayerItem

LayerNameOrIndex

This is either a string or a number:

If it is a string, it specifies the name of the layer whose Item is required.

If it is a number, it specifies the index of the layer whose Item is required. The number should be from 0 to the count specified by the LayerCount property minus 1.


Return for FindLayerItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | The Item couldn’t be found or an error occurred (refer to Error Codes).


bstrSOPInstanceUID Parameter For FindLayerRefImageItem

bstrSOPInstanceUID

String that contains the SOP Instance UID of the referenced Image SOP Instance.


Return for FindLayerRefImageItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | The Item couldn’t be found.


bstrSOPInstanceUID Parameter For FindPresStateRefImageItem

bstrSOPInstanceUID

String that contains the SOP Instance UID of the referenced image.


Return for FindPresStateRefImageItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | The Item couldn’t be found.


bstrSignatureUID Parameter For FindSignature

bstrSignatureUID

Character string that contains the Digital Signature UID of the Digital Signature for which to search.


Return for FindSignature

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentElement property was updated with the Digital Signatures Sequence Item which corresponds to the Digital Signature with the specified Digital Signature UID.
VARIANT_FALSE | No Digital Signature with the specified Digital Signature UID was found in the Data Set.


lTextObjectIndex Parameter For FindTextObjectItem

lTextObjectIndex

Index of the text annotation object whose Item is required. This should be a number from 0 to the count of the text annotation objects defined by the same "Graphic Annotation Sequence" Item minus 1. The count is returned by the GetTextObjectCount method.


Return for FindTextObjectItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | The Item couldn’t be found or an error occurred (refer to Error Codes).


Return for GetCodedConceptCount

Return Value

The number of Coded Concepts in the Context Group specified by the CurrentContextGroup property.


Return for GetContextGroupCount

Return Value

The number of Context Groups in the Context Group Table.


lGraphicObjectIndex Parameter For GetGraphicObjectAttributes

lGraphicObjectIndex

Index of the graphic annotation object whose attributes are to be retrieved. This should be a number from 0 to the count of the graphic annotation objects defined by the same "Graphic Annotation Sequence" Item minus 1. The count is returned by the GetGraphicObjectCount method.


Return for GetGraphicObjectAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for GetGraphicObjectCount

Return Value

The count of the graphic annotation objects defined by the "Graphic Annotation Sequence" Item. The method will return a negative value in case of failure.


lLayerIndex Parameter For GetLayerAttributes

lLayerIndex

Index of the layer whose attributes are to be retrieved. This should be a number from 0 to the count specified by the LayerCount property minus 1.


Return for GetLayerAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for GetLayerGraphicObjectCount

Return Value

The count of the graphic annotation objects. The method will return a negative value in case of failure.


Return for GetLayerImageRefCount

Return Value

The number of Image SOP Instances that are referenced in the "Graphic Annotation Sequence" Item. The method will return a negative value in case of failure.


Return for GetLayerImageRefInstanceUID

Return Value

The required SOP Instance UID. The method will return an empty string in case of failure.


lImageIndex Parameter for GetLayerImageRefInstanceUID

lImageIndex

Index of the Image SOP Instance. This should be a number from 0 to the number returned by the GetLayerImageRefCount method (for the same "Graphic Annotation Sequence" Item) minus 1.


bstrLayerName Parameter For GetLayerIndex

bstrLayerName

String that contains the name of the layer whose index is required.


Return for GetLayerIndex

Return Value

The index of the layer. The method will return a negative value in case of failure.


Return for GetLayerName

Return Value

The name of the layer. The method will return an empty string in case of failure.


Return for GetLayerTextObjectCount

Return Value

The count of the text annotation objects. The method will return a negative value in case of failure.


Return for GetMacAlgorithm

Return Value

Return | Meaning
DICOM_SUCCESS | After the method returns, if the StringValueCount property is not 0, the Message Authentication Code (MAC) Algorithm is the first string value in the array specified by the StringValues property. Currently, the possible values are:
 | Value | Meaning
 | RIPEMD160 | The MAC Algorithm used is the RACE Integrity Primitives Evaluation (RIPEMD160) algorithm, a 160-bit cryptographic hash function.
 | SHA1 | The MAC Algorithm used is the Secure Hash Algorithm (SHA1), a 160-bit cryptographic hash function.
 | MD5 | The MAC Algorithm used is the Message Digest – 5 (MD5) algorithm, which takes as input a message of arbitrary length and produces a 128-bit "message digest".
DICOM_ERROR_MEMORY | Failed to allocate memory.


Return for GetMacTransferSyntax

Return Value

Return | Meaning
DICOM_SUCCESS | After the method returns, if the StringValueCount property is not 0, the MAC Calculation Transfer Syntax UID is the first string value in the array specified by the StringValues property.
DICOM_ERROR_MEMORY | Failed to allocate memory.


lFlags Parameter for GetPresStateAttributes

lFlags

Reserved for future use. Pass 0.


Return for GetPresStateAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for GetPresStateImageRefCount

Return Value

The number of Image SOP Instances that are referenced in an Item under the "Referenced Series Sequence" in the "Presentation State Module". The method will return a negative value in case of failure.


Return for GetPresStateImageRefInstanceUID

Return Value

The required SOP Instance UID. The method will return an empty string in case of failure.


lImageIndex Parameter For GetPresStateImageRefInstanceUID

lImageIndex

Index of the Image SOP Instance. This should be a number from 0 to the count returned by the GetPresStateImageRefCount method (for the same "Referenced Series Sequence" Item) minus 1.


Return for GetSignatureDateTime

Return Value

Return | Meaning
DICOM_SUCCESS | After the method returns, if the DateTimeValueCount property is not 0, the Digital Signature DateTime is the first date-time value in the array specified by the DateTimeValues property.
DICOM_ERROR_MEMORY | Failed to allocate memory.


Return for GetSignaturesCount

Return Value

The number of Digital Signatures in the main Data Set or in an Item of a Sequence of Items.


Return for GetSignatureUID

Return Value

Return | Meaning
DICOM_SUCCESS | After the method returns, if the StringValueCount property is not 0, the Digital Signature UID is the first string value in the array specified by the StringValues property.
DICOM_ERROR_MEMORY | Failed to allocate memory.


Return for GetSignedElementsCount

Return Value

The number of Data Elements covered by the Digital Signature specified by the CurrentElement property.


lTextObjectIndex Parameter For GetTextObjectAttributes

lTextObjectIndex

Index of the text annotation object whose attributes are to be retrieved. This should be a number from 0 to the count of the text annotation objects defined by the same "Graphic Annotation Sequence" Item minus 1. The count is returned by the GetTextObjectCount method.


Return for GetTextObjectAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for GetTextObjectCount

Return Value

The count of the text annotation objects defined by the "Graphic Annotation Sequence" Item. The method will return a negative value in case of failure.


Return for GetWaveformGroupCount

Return Value

The number of waveform multiplex groups that are included in the dataset.


lIndex Parameter for GetWaveformGroup

lIndex

Zero-based index of the waveform group to be retrieved. As an example, if there are three waveform groups, use an index of 2 to retrieve the third group. Valid values are from 0 to GetWaveformGroupCount method minus 1.


pWaveformGroup Parameter for GetWaveformGroup

pWaveformGroup

Pointer to a DicomWaveformGroup object. The method will update this object with the extracted waveform group.


Return for GetWaveformGroup

Return Value

Return | Meaning
DICOM_SUCCESS | The method was successful.
<> DICOM_SUCCESS | An error occurred. Refer to Error Codes.


bContextGroupLocalVersion Parameter for InsertCodedConcept

bContextGroupLocalVersion

(Optional parameter) Possible values are:

Value | Meaning
VARIANT_TRUE | The Context Group Local Version (0008,0107) of the new Coded Concept is specified by the DateTimeValues property as described below.
VARIANT_FALSE | No Context Group Local Version is defined for the new Coded Concept.

The default value of this parameter is VARIANT_FALSE.


bstrCodeMeaning Parameter for InsertCodedConcept

bstrCodeMeaning

Character string that contains the Code Meaning (0008,0104) of the new Coded Concept.


bstrCodeValue Parameter for InsertCodedConcept

bstrCodeValue

Character string that contains the Code Value (0008,0100) of the new Coded Concept.


bstrCodingSchemeDesignator Parameter for InsertCodedConcept

bstrCodingSchemeDesignator

Character string that contains the Coding Scheme Designator (0008,0102) of the new Coded Concept.


bstrCodingSchemeVersion Parameter for InsertCodedConcept

bstrCodingSchemeVersion

Character string that contains the Coding Scheme Version (0008,0103) of the new Coded Concept. Set the parameter to NULL or specify an empty string if you don’t want to define a Coding Scheme Version for the new Coded Concept.


bstrContextGroupExtensionCreatorUID Parameter for InsertCodedConcept

bstrContextGroupExtensionCreatorUID

(Optional parameter) Character string that contains the Context Group Extension Creator UID (0008,010D) of the new Coded Concept. Set the parameter to NULL or specify an empty string if you don’t want to define a Context Group Extension Creator UID for the new Coded Concept.


nFlags Parameter for InsertCodedConcept

nFlags

(Optional parameter) This can be set to 0 or:

Value | Meaning
DICOM_CONTEXTGROUP_DISALLOW_DUPLICATES | [0x01] The method should fail if a Coded Concept with the same specified Coding Scheme Designator and Code Value already exists in the Context Group specified by the CurrentContextGroup property.

The default value of this parameter is 0.


Return for InsertCodedConcept

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bExtensible Parameter for InsertContextGroup

bExtensible

Specifies whether the new Context Group is Extensible. Possible values are:

Value | Meaning
VARIANT_TRUE | The new Context Group is Extensible.
VARIANT_FALSE | The new Context Group is Non-extensible.


bstrContextIdentifier Parameter for InsertContextGroup

bstrContextIdentifier

Character string that contains the Context Identifier (0008,010F) of the new Context Group.


bstrName Parameter for InsertContextGroup

bstrName

Character string that contains the name of the new Context Group.


nFlags Parameter for InsertContextGroup

nFlags

(Optional parameter) This can be set to 0 or:

Value | Meaning
DICOM_CONTEXTGROUP_DISALLOW_DUPLICATES | [0x01] The method should fail if a Context Group with the same specified Context Identifier already exists in the Context Group Table.

The default value of this parameter is 0.


Return for InsertContextGroup

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for Item

Return Value

A pointer to the DicomWaveformAnnotation object at the specified index.


Return for Item

Return Value

A pointer to the DicomWaveformChannel object at the specified index.


lIndex Parameter for Item

lIndex

Index of the DicomWaveformAnnotation object to be retrieved. Valid values are from 0 to the Count property (lDicomWaveformAnnotations) minus 1.


lIndex Parameter for Item

lIndex

Index of the DicomWaveformChannel object to be retrieved. Valid values are from 0 to Count property (IDicomWaveformChannels) minus 1.


bstrFilename Parameter for LoadAudio

nFlags

(Optional parameter) Reserved for future use. This must be set to 0, which is the default value.


nFlags Parameter for LoadAudio

bstrFilename

Character string that contains the name of the audio file to load.


Return for LoadAudio

Return Value

Return | Meaning
DICOM_SUCCESS | The method was successful.
<> DICOM_SUCCESS | An error occurred. Refer to Error Codes.


bstrContextID Parameter for LoadContextGroup

bstrContextID

(Optional parameter) Character string that contains the Context Identifier (CID) of the Context Group to be loaded from the internal table. For a list of possible values, refer to Context Identifiers. If this parameter is set to NULL or if an empty string is specified, the method will load all the Context Groups that are currently unloaded. The default value of the parameter is an empty string.


Return for LoadContextGroup

Return Value

Return | Meaning
0 | The method was successful.
DICOM_ERROR_PARAMETER | The internal table doesn’t contain a Context Group with the specified Context ID.
(Otherwise) | An error occurred. Refer to Error Codes.


Return for MoveCodedConceptGroup

Return Value

None


Return for MoveFirstCodedConcept

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentCodedConcept property was updated with the first Coded Concept in the Context Group specified by the CurrentContextGroup property.
VARIANT_FALSE | No Coded Concepts are contained by the Context Group specified by the CurrentContextGroup property.


Return for MoveFirstContextGroup

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentContextGroup property was updated with the first Context Group in the Context Group Table.
VARIANT_FALSE | The Context Group Table is empty.


Return for MoveLastCodedConcept

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentCodedConcept property was updated with the last Coded Concept in the Context Group specified by the CurrentContextGroup property.
VARIANT_FALSE | No Coded Concepts are contained by the Context Group specified by the CurrentContextGroup property.


Return for MoveLastContextGroup

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentContextGroup property was updated with the last Context Group in the Context Group Table.
VARIANT_FALSE | The Context Group Table is empty.


Return for MoveNextCodedConcept

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentCodedConcept property was updated with the Coded Concept that immediately follows the Concept specified by the property.
VARIANT_FALSE | The Coded Concept specified by the CurrentCodedConcept property is the last one in its Context Group.


Return for MoveNextContextGroup

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentContextGroup property was updated with the Context Group, in the Context Group Table, that immediately follows the Context Group specified by the property.
VARIANT_FALSE | The Context Group specified by the CurrentContextGroup property is the last one in the Context Group Table.


Return for MoveNextGraphicAnnItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | No Items were found.


Return for MoveNextPresStateRefSeriesItem

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | No Items were found.


Return for MovePrevCodedConcept

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentCodedConcept property was updated with the Coded Concept that immediately precedes the Concept specified by the property.
VARIANT_FALSE | The Coded Concept specified by the CurrentCodedConcept property is the first one in its Context Group.


Return for MovePrevContextGroup

Return Value

Return | Meaning
VARIANT_TRUE | The CurrentContextGroup property was updated with the Context Group, in the Context Group Table, that immediately precedes the Context Group specified by the property.
VARIANT_FALSE | The Context Group specified by the CurrentContextGroup property is the first one in the Context Group Table.


lIndex Parameter For MoveSignature

lIndex

The index of the required Digital Signature. This should be a number from 0 to the count returned by the GetSignaturesCount method minus 1.


Return for MoveSignature

Return Value

Return | Meaning
DICOM_SUCCESS | The CurrentElement property was updated with the Digital Signatures Sequence Item which corresponds to the required Digital Signature.
DICOM_ERROR_PARAMETER | The specified index is invalid.


lIndex Parameter For MoveSignedElement

lIndex

The index of the required signed Data Element. This should be a number from 0 to the count returned by the GetSignedElementsCount method minus 1.


Return for MoveSignedElement

Return Value

Return | Meaning
DICOM_SUCCESS | The CurrentElement property was updated with the required signed Data Element.
DICOM_ERROR_PARAMETER | The CurrentElement property was not updated (e.g., because the specified index is invalid).


lIndex Parameter for NumericValue

lIndex

Index into the array of numeric values. Valid values range from 0 to the umericValueCount property minus 1.


bGraphicObject Parameter For OnConvertLEADAnnObjToDicomAnnObj

bGraphicObject

Specifies whether the resulted DICOM annotation object, for which the event is being fired, is a graphic object or a text object. Possible values are:

Value | Meaning
VARIANT_TRUE | The resulted object is a graphic annotation object. In this case, the attributes of the object can be obtained by accessing the properties specified by the GraphicObjectAttributes property.
VARIANT_FALSE | The resulted object is a text annotation object. In this case, the attributes of the object can be obtained by accessing the properties specified by the TextObjectAttributes property.


lIndex Parameter For PointsX

lIndex

Index of the point whose x-coordinate is to be set or obtained. This should be a number from 0 to the count specified by the PointCount property.


lIndex Parameter For PointsY

lIndex

Index of the point whose y-coordinate is to be set or obtained. This should be a number from 0 to the count specified by the PointCount property.


lIndex Parameter for RefDatetime

lIndex

Index into the array date-time values. If the TemporalPointsType property is set to TYPE_DATETIME, valid values are from 0 to TemporalPointCount property minus 1; otherwise, the array is empty and it should not be used.


lIndex Parameter for RefSamplePositions

lIndex

Index into the array of sample position values. If the TemporalPointsType property is set to TYPE_SAMPLE_POSITIONS, valid values are from 0 to TemporalPointCount property minus 1; otherwise, the array contains no values and should not be used.


lIndex Parameter for RefTimeOffsets

lIndex

Index into the array of time offset values. If the TemporalPointsType property is set to TYPE_TIME_OFFSETS, valid values are from 0 to TemporalPointCount property minus 1; otherwise, the array contains no values and it should not be used.


Return for RemoveAllGraphicObjects

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for RemoveAllLayerImageRefs

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bRemoveAnnSeqItems Parameter For RemoveAllLayers

bRemoveAnnSeqItems

(Optional parameter) Specifies whether to remove the Items under the "Graphic Annotation Sequence" which correspond to the layers. Possible values are:

Value | Meaning
VARIANT_TRUE | Remove the Items under the "Graphic Annotation Sequence" which correspond to the layers.
VARIANT_FALSE | Only remove the layers.

The default value of this parameter is VARIANT_FALSE.


Return for RemoveAllLayersImageRefs

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for RemoveAllLayers

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for RemoveAllPresStateImageRefs

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for RemoveAllTextObjects

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lGraphicObjectIndex Parameter For RemoveGraphicObject

lGraphicObjectIndex

Index of the graphic annotation object to be removed. This should be a number from 0 to the count of the graphic annotation objects defined by the same "Graphic Annotation Sequence" Item minus 1. The count is returned by the GetGraphicObjectCount method.


Return for RemoveGraphicObject

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bRemoveAnnSeqItems Parameter For RemoveLayer

bRemoveAnnSeqItems

(Optional parameter) Specifies whether to remove the Items under the "Graphic Annotation Sequence" which correspond to the layer specified. Possible values are:

Value | Meaning
VARIANT_TRUE | Remove the Items under the "Graphic Annotation Sequence" which correspond to the layer.
VARIANT_FALSE | Only remove the layer.

The default value of this parameter is VARIANT_FALSE.


Return for RemoveLayerGraphicObjects

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bstrSOPInstanceUID Parameter For RemoveLayerImageRef

bstrSOPInstanceUID

String that contains the SOP Instance UID of the Image SOP Instance whose reference is to be removed.


Return for RemoveLayerImageRef

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


LayerNameOrIndex Parameter For RemoveLayer

LayerNameOrIndex

This is either a string or a number:
If it is a string, it specifies the name of the layer to be removed.
If it is a number, it specifies the index of the layer to be removed. The number should be from 0 to the count specified by the LayerCount property minus 1.


Return for RemoveLayer

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for RemoveLayerTextObjects

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lIndex Parameter for Remove

lIndex

Index of the DicomWaveformAnnotation object to be removed from the collection. Valid values are from 0 to Count property (lDicomWaveformAnnotations) minus 1.


lIndex Parameter for Remove

lIndex

Index of the DicomWaveformChannel object to be removed from the collection. Valid values are from 0 to Count property (IDicomWaveformChannels) minus 1.


bstrSOPInstanceUID Parameter For RemovePresStateImageRef

bstrSOPInstanceUID

String that contains the SOP Instance UID of the image whose reference is to be removed.


Return for RemovePresStateImageRef

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lTextObjectIndex Parameter For RemoveTextObject

lTextObjectIndex

Index of the text annotation object to be removed. This should be a number from 0 to the count of the text annotation objects defined by the same "Graphic Annotation Sequence" Item minus 1. The count is returned by the GetTextObjectCount method.


Return for RemoveTextObject

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


Return for ResetContextGroup

Return Value

None


Return for Reset

Return Value

None


bstrFilename Parameter for SaveAudio

bstrFilename

Character string that contains the name of the audio file to be created.


nFlags Parameter for SaveAudio

nFlags

(Optional parameter) Reserved for future use. This must be set to 0, which is the default value.


Return for SaveAudio

Return Value

Return | Meaning
DICOM_SUCCESS | The method was successful.
<> DICOM_SUCCESS | An error occurred. Refer to Error Codes.


bstrFilename Parameter For SaveCertificate

bstrFilename

Character string that contains the name of the file to which the digital certificate should be saved. If the file already exists, it will be overwritten.


Format Parameter For SaveCertificate

Format

(Optional parameter) The format in which the digital certificate should be saved. Possible values are:

Value | Meaning
DICOM_CERTIFICATE_FORMAT_PEM | [0] Base-64 encoded X.509 Privacy Enhanced Mail (PEM).
DICOM_CERTIFICATE_FORMAT_DER | [1] Distinguished Encoding Rules (DER) encoded binary X.509.

The default value of the parameter is DICOM_CERTIFICATE_FORMAT_PEM.


Return for SaveCertificate

Return Value

Return | Meaning
DICOM_SUCCESS | The method was successful.
<> DICOM_SUCCESS | An error occurred. Refer to Error Codes.


Return for SetChannelSamples

Return Value

Return | Meaning
The number of samples set | The method was successful.
A negative value | An error occurred. Refer to Error Codes.


Samples Parameter for SetChannelSamples

Samples

A safearray that contains the values of the channel samples. These values can be 8-bit, 16-bit, or 32-bit values.


bstrCodeMeaning Parameter for SetCodedConceptCodeMeaning

bstrCodeMeaning

Character string that contains the new Code Meaning (0008,0104).


Return for SetCodedConceptCodeMeaning

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lGraphicObjectIndex Parameter For SetGraphicObjectAttributes

lGraphicObjectIndex

Index of the graphic annotation object to be updated. This should be a number from 0 to the count of the graphic annotation objects defined by the same "Graphic Annotation Sequence" Item minus 1. The count is returned by the GetGraphicObjectCount method.


Return for SetGraphicObjectAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lLayerIndex Parameter For SetLayerAttributes

lLayerIndex

Index of the layer to be updated. This should be a number from 0 to the count specified by the LayerCount property minus 1.


Return for SetLayerAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


bstrNewLayerName Parameter For SetLayerName

bstrNewLayerName

String that contains the new layer name.


Return for SetLayerName

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lNumberOfSamples Parameter for SetNumberOfSamplesPerChannel

lNumberOfSamples

New number of samples for a channel included in this waveform group.


Return for SetNumberOfSamplesPerChannel

Return Value

Return | Meaning
DICOM_SUCCESS | The method was successful.
<> DICOM_SUCCESS | An error occurred. Refer to Error Codes.


Return for SetPresStateAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


lTextObjectIndex Parameter For SetTextObjectAttributes

lTextObjectIndex

Index of the text annotation object to be updated. This should be a number from 0 to the count of the text annotation objects defined by the same "Graphic Annotation Sequence" Item minus 1. The count is returned by the GetTextObjectCount method.


Return for SetTextObjectAttributes

Return Value

Return | Meaning
0 | The method was successful.
<> 0 | An error occurred. Refer to Error Codes.


hNet Parameter For SSLPrivateKeyPasswordEvent

hNet

A DICOM Network handle.


nFlag Parameter For SSLPrivateKeyPasswordEvent

nFlag

Flag specifying whether the SSLPrivateKeyPassword property is being used for decryption or encryption. Possible values are:

Value | Meaning
0 | The SSLPrivateKeyPassword property is being used for decryption.
1 | The SSLPrivateKeyPassword property is being used for encryption.


Value Parameter for ValueDefined

Value

Index into the array of Boolean values that indicate which properties contain valid data for the annotation. Possible values are:

Value | Meaning
MEASUREMENT_UNITS | [1] If ValueDefined(MEASUREMENT_UNITS) is VARIANT_TRUE, then the MeasurementUnits property contains valid data for the annotation; otherwise the MeasurementUnits property does not contain valid data for the annotation.
ANNOTATION_GROUP_NUMBER | [2] If ValueDefined(ANNOTATION_GROUP_NUMBER) is VARIANT_TRUE, then the AnnotationGroupNumber property contains valid data for the annotation; otherwise the AnnotationGroupNumber property does not contain valid data for the annotation.


Value Parameter for ValueDefined

Value

Index into the array of Boolean values that indicates which properties contain valid data for the waveform channel. Possible values are:

Value | Meaning
CHANNEL_SENSITIVITY | [1] If ValueDefined(CHANNEL_SENSITIVITY) is VARIANT_TRUE, then the ChannelSensitivity property, the ChannelSensitivityUnits property, the ChannelSensitivityCF property, and the ChannelBaseline property all contain valid data for the channel;otherwise, these properties do not contain valid data for the channel.
CHANNEL_STATUS | [2] If ValueDefined(CHANNEL_STATUS) is VARIANT_TRUE, then the ChannelStatus property contains valid data for the channel; otherwise, this property does not contain valid data for the channel.
CHANNEL_TIME_SKEW | [3] If ValueDefined(CHANNEL_TIME_SKEW) is VARIANT_TRUE, then the ChannelTimeSkew property contains valid data for the channel; otherwise the ChannelTimeSkew property does not contain valid data for the channel.
CHANNEL_SAMPLE_SKEW | [4] If ValueDefined(CHANNEL_SAMPLE_SKEW) is VARIANT_TRUE, then the ChannelSampleSkew property contains valid data for the channel; otherwise the ChannelSampleSkew property does not contain valid data for the channel.
WAVEFORM_CHANNEL_NUMBER | [5] If ValueDefined(WAVEFORM_CHANNEL_NUMBER) is VARIANT_TRUE, then the WaveformChannelNumber property contains valid data for the channel; otherwise, the WaveformChannelNumber property does not contain valid data for the channel.
CHANNEL_LABEL | [6] If ValueDefined(CHANNEL_LABEL) is VARIANT_TRUE, then the ChannelLabel property contains valid data for the channel; otherwise, the ChannelLabel property does not contain valid data for the channel.
CHANNEL_OFFSET | [7] If ValueDefined(CHANNEL_OFFSET) is VARIANT_TRUE, then the ChannelOffset property contains valid data for the channel; otherwise, the ChannelOffset property does not contain valid data for the channel.
FILTER_LOW_FREQUENCY | [8] If ValueDefined(FILTER_LOW_FREQUENCY) is VARIANT_TRUE, then the FilterLowFrequency property contains valid data for the channel; otherwise, the FilterLowFrequency property does not contain valid data for the channel.
FILTER_HIGH_FREQUENCY | [9] If ValueDefined(FILTER_HIGH_FREQUENCY) is VARIANT_TRUE, then the FilterHighFrequency property contains valid data for the channel; otherwise, the FilterHighFrequency property does not contain valid data for the channel.
NOTCH_FILTER_FREQUENCY | [10] If ValueDefined(NOTCH_FILTER_FREQUENCY) is VARIANT_TRUE, then the NotchFilterFrequency property contains valid data for the channel; otherwise, the NotchFilterFrequency property does not contain valid data for the channel.
NOTCH_FILTER_BANDWIDTH | [11] If ValueDefined(NOTCH_FILTER_BANDWIDTH) is VARIANT_TRUE, then the NotchFilterBandwidth property contains valid data for the channel; otherwise, the NotchFilterBandwidth property does not contain valid data for the channel.
CHANNEL_MINIMUM_VALUE | [12] If ValueDefined(CHANNEL_MINIMUM_VALUE) is VARIANT_TRUE, then the ChannelMinimumValue property contains valid data for the channel; otherwise, the ChannelMinimumValue property does not contain valid data for the channel.
CHANNEL_MAXIMUM_VALUE | [13] If ValueDefined(CHANNEL_MAXIMUM_VALUE) is VARIANT_TRUE, then the ChannelMaximumValue property contains valid data for the channel; otherwise, the ChannelMaximumValue property does not contain valid data for the channel.


Value Parameter for ValueDefined

Value

Index into the array of Boolean values that indicate which properties contain valid data for the waveform group. Possible values are:

Value | Meaning
MULTIPLEX_GROUP_TIME_OFFSET | [1] If ValueDefined(MULTIPLEX_GROUP_TIME_OFFSET) is VARIANT_TRUE, then the MultiplexGroupTimeOffset property contains valid data for the waveform group; otherwise the MultiplexGroupTimeOffset property does not contain valid data for the waveform group.
TRIGGER_TIME_OFFSET | [2] If ValueDefined(TRIGGER_TIME_OFFSET) is VARIANT_TRUE, then the TriggerTimeOffset property contains valid data for the waveform group; otherwise the TriggerTimeOffset property does not contain valid data for the waveform group.
TRIGGER_SAMPLE_POSITION | [3] If ValueDefined(TRIGGER_SAMPLE_POSITION) is VARIANT_TRUE, then the TriggerSamplePosition property contains valid data for the waveform group; otherwise the TriggerSamplePosition property does not contain valid data for the waveform group.
MULTIPLEX_GROUP_LABEL | [4] If ValueDefined(MULTIPLEX_GROUP_LABEL) is VARIANT_TRUE, then the MultiplexGroupLabel property contains valid data for the waveform group; otherwise the MultiplexGroupLabel property does not contain valid data for the waveform group.
WAVEFORM_PADDING_VALUE | [5] If ValueDefined(WAVEFORM_PADDING_VALUE) is VARIANT_TRUE, then the WaveformPaddingValue property contains valid data for the waveform group; otherwise the WaveformPaddingValue property does not contain valid data for the waveform group.


nReserved Parameter For VerifySignature

nReserved

(Optional parameter) Reserved for future use. This must be set to 0, which is the default value.


Return for VerifySignature

Return Value

Return | Meaning
DICOM_SUCCESS | The Digital Signature(s) was/were verified successfully.
DICOM_ERROR_INVALID_SIGNATURE | The Digital Signature is invalid or at least one of the Digital Signatures is invalid.
(Otherwise) | An error occurred. Refer to Error Codes.