hcidicomdefgen

This command generates site-level LDL definition files based on an input DICOM message.

hcidicomdefgen -V version -v variant -s service_name 
-c transfer_syntax input_message 
  • -V version is the DICOM version.
  • -v variant is the DICOM variant.
  • -s service_name is the DICOM service name.

    For example: C_STORE_RQ, C_FIND_RSP,...

  • -c transfer_syntax is the transfer syntax of the DICOM message.
  • input_message is the input DICOM message.

This command:

  • Creates a variant under $HCISITEDIR/formats/ldl/version/.
  • Creates a segment named service_name_dataset, and generates the content according to the input message parsing result.
  • Creates service_name_MSG under $HCISITEDIR/formats/ldl/version/variant/messages, which contains:
    • service_name_DIMSE: This should already be defined under $HCIROOT/formats/ldl/version/variant/segments. This command does not generate the definition file for the DIMSE header part.
    • service_name_dataset: Content is generated based on the dataset part of the input DICOM message. This file is located under $HCISITEDIR/formats/ldl/version/variant/segments.

Example:

hcidicomdefgen –V 2014 –v test –s C_STORE_RQ –c “{TransferSyntax 1.2.840.10008.1.2.4.91}” c_store.dat

Reusing the LDL file

You can create a variant using hcidicomdefgen. For example:

hcidicomdefgen -V version -v variant -s service_name -c transfersyntax input_message

This creates a variant specifying the service_name C_STORE and transfersyntax 1.2.840.1008.1.2 [ Little Endian ].

With this usage, you can receive C_STORE_RQ messages that have a different transfer syntax for Big Endian.

You can also reuse the same variant to handle different transfer syntaxes.

For example, you can create two variants first, then combine them into one variant.

In this example, there are two C_STORE_RQ messages:

  • message1 uses transfersyntax 1.2.840.1008.1.2.
  • message2 uses transfersyntax 1.2.840.1008.1.2.4.91.

The command is:

hcidicomdefgen -V 2014 -v test1 -s C_STORE_RQ -c "{TransferSyntax 1.2.840.10008.1.2}" message1
hcidicomdefgen -V 2014 -v test2 -s C_STORE_RQ -c "{TransferSyntax 1.2.840.10008.1.2.4.91}" message2

This generates variant test1 for message1 and variant test2 for message2.

To use variant test1 for message1 and message2, merge the directory test2 to directory test1.