LEADTOOLS Medical (Leadtools.Dicom assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
UpdateImageBox Method
See Also 
Leadtools.Dicom Namespace > DicomPrintScu Class : UpdateImageBox Method



imageBoxInstanceUid
The SOP Instance UID of the Image Box to be updated. The method will fail if this is a null reference (Nothing in Visual Basic) or if an empty string is specified. The method GetImageBoxInstanceUid returns the SOP Instance UID of a particular Image Box.
image
A DicomDataSet object that contains the image to be printed in the specified Image Box. If this is set to a null reference (Nothing in Visual Basic), the Print SCP will be instructed to erase the image (if there is one) in the specified Image Box.
parameters
A DicomImageBoxParameters object that specifies the Image Box parameters to be updated. The method will fail if this parameter is set to a null reference (Nothing in Visual Basic) or if the Image Position specified is less than 1.
refImageOverlayBoxInstanceUid
The SOP Instance UID of a previously created Basic Print Image Overlay Box SOP Instance to be referenced by the Image Box. This can be set to a null reference (Nothing in Visual Basic) if the reference is not to be updated; in this case, the corresponding Attribute will not be included in the request to the Print SCP. If an empty string is specified and the Image Box already references an Image Overlay Box, then the update will remove that reference. Refer to the method Leadtools.Dicom.DicomPrintScu.CreateOverlayBox for creating Image Overlay Boxes.
refPresentationLutInstanceUid
The SOP Instance UID of a previously created Presentation LUT SOP Instance to be referenced by the Image Box. This can be set to a null reference (Nothing in Visual Basic) if the reference is not to be updated; in this case, the corresponding Attribute will not be included in the request to the Print SCP. If an empty string is specified 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, the method ignores this parameter for Color Image Boxes. Refer to the method CreatePresentationLut for creating Presentation LUTs.
imageBoxInstanceUid
The SOP Instance UID of the Image Box to be updated. The method will fail if this is a null reference (Nothing in Visual Basic) or if an empty string is specified. The method GetImageBoxInstanceUid returns the SOP Instance UID of a particular Image Box.
image
A DicomDataSet object that contains the image to be printed in the specified Image Box. If this is set to a null reference (Nothing in Visual Basic), the Print SCP will be instructed to erase the image (if there is one) in the specified Image Box.
parameters
A DicomImageBoxParameters object that specifies the Image Box parameters to be updated. The method will fail if this parameter is set to a null reference (Nothing in Visual Basic) or if the Image Position specified is less than 1.
refImageOverlayBoxInstanceUid
The SOP Instance UID of a previously created Basic Print Image Overlay Box SOP Instance to be referenced by the Image Box. This can be set to a null reference (Nothing in Visual Basic) if the reference is not to be updated; in this case, the corresponding Attribute will not be included in the request to the Print SCP. If an empty string is specified and the Image Box already references an Image Overlay Box, then the update will remove that reference. Refer to the method Leadtools.Dicom.DicomPrintScu.CreateOverlayBox for creating Image Overlay Boxes.
refPresentationLutInstanceUid
The SOP Instance UID of a previously created Presentation LUT SOP Instance to be referenced by the Image Box. This can be set to a null reference (Nothing in Visual Basic) if the reference is not to be updated; in this case, the corresponding Attribute will not be included in the request to the Print SCP. If an empty string is specified 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, the method ignores this parameter for Color Image Boxes. Refer to the method CreatePresentationLut for creating Presentation LUTs.
Requests the Print SCP to update the specified Basic Grayscale/Color Image Box SOP Instance.

Syntax

Visual Basic (Declaration) 
Public Sub UpdateImageBox( _
   ByVal imageBoxInstanceUid As String, _
   ByVal image As DicomDataSet, _
   ByVal parameters As DicomImageBoxParameters, _
   ByVal refImageOverlayBoxInstanceUid As String, _
   ByVal refPresentationLutInstanceUid As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As DicomPrintScu
Dim imageBoxInstanceUid As String
Dim image As DicomDataSet
Dim parameters As DicomImageBoxParameters
Dim refImageOverlayBoxInstanceUid As String
Dim refPresentationLutInstanceUid As String
 
instance.UpdateImageBox(imageBoxInstanceUid, image, parameters, refImageOverlayBoxInstanceUid, refPresentationLutInstanceUid)

Parameters

imageBoxInstanceUid
The SOP Instance UID of the Image Box to be updated. The method will fail if this is a null reference (Nothing in Visual Basic) or if an empty string is specified. The method GetImageBoxInstanceUid returns the SOP Instance UID of a particular Image Box.
image
A DicomDataSet object that contains the image to be printed in the specified Image Box. If this is set to a null reference (Nothing in Visual Basic), the Print SCP will be instructed to erase the image (if there is one) in the specified Image Box.
parameters
A DicomImageBoxParameters object that specifies the Image Box parameters to be updated. The method will fail if this parameter is set to a null reference (Nothing in Visual Basic) or if the Image Position specified is less than 1.
refImageOverlayBoxInstanceUid
The SOP Instance UID of a previously created Basic Print Image Overlay Box SOP Instance to be referenced by the Image Box. This can be set to a null reference (Nothing in Visual Basic) if the reference is not to be updated; in this case, the corresponding Attribute will not be included in the request to the Print SCP. If an empty string is specified and the Image Box already references an Image Overlay Box, then the update will remove that reference. Refer to the method Leadtools.Dicom.DicomPrintScu.CreateOverlayBox for creating Image Overlay Boxes.
refPresentationLutInstanceUid
The SOP Instance UID of a previously created Presentation LUT SOP Instance to be referenced by the Image Box. This can be set to a null reference (Nothing in Visual Basic) if the reference is not to be updated; in this case, the corresponding Attribute will not be included in the request to the Print SCP. If an empty string is specified 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, the method ignores this parameter for Color Image Boxes. Refer to the method CreatePresentationLut for creating Presentation LUTs.

Example

For an example, refer to DicomPrintScu.Associate.

Remarks

Two of the exceptions that can be thrown by this method are:
Exception Type Condition
DicomExceptionCode.PrintSCUFailureStatus The response of the Print SCP specifies a Failure status code.
DicomExceptionCode.PrintSCUClassNotSupported Neither the Basic Grayscale Print Management Meta SOP Class nor the Basic Color Print Management Meta SOP Class is supported on the Association.

When the Print SCP is requested to create a Film Box, it will also create one or more Image Boxes, based on the Image Display Format. This method updates a particular Image Box. The Image Box specified (by the SOP Instance UID) must belong to the current (last created) Film 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 method Leadtools.Dicom.DicomPrintScu.CreateFilmSession for more information.

The method will not return until it receives the response of the Print SCP, or an error occurs. The method GetLastOperationStatus can be used to obtain the status code specified in the response of the Print SCP. If the method Leadtools.Dicom.DicomPrintScu.UpdateImageBox is successful, the Image Box was updated successfully, with either a Success or Warning status code in the response of the Print SCP.

The parameter parameters specifies the Image Box parameters to be updated. In the passed object, if a string property is a null reference (Nothing in Visual Basic), then the corresponding Attribute will not be included in the request to the Print SCP and hence will not be updated. Similarly, if a numeric property is negative, the corresponding Attribute will not be included in the request 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 ignore the following properties of the DicomImageBoxParameters class for Color Image Boxes:

DicomImageBoxParameters.MinDensity

DicomImageBoxParameters.MaxDensity

DicomImageBoxParameters.ConfigurationInformation

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

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