Creating Thumbnails and Icons

There are 2 methods within DicomObjects that can be used to create a Thumbnail image (PrinterImage and SubImage). If you want to create an icon for the purpose of inclusion into the embedded icon sequence attribute (&H88,&H200) of an image then use the PrinterImage method. The reason for using PrinterImage is that the resultant image only contains minimalist image information (the &H28 group) and the icon sequence attribute only permits attributes from the &H28 group to be included. SubImage on the other hand adds all attributes from the original image to the resultant image.

To create a thumbnail with the PrinterImage method use the following code:

Dim ModifiedImage as new DicomImage
Set ModifiedImage = MyDicomImage.PrinterImage(Bits, Planes, ShowAnnotations, Zoom, Left, Right, Top, Bottom) 
Bit depth of final image (must be 8-16, but always 8 when Planes=3)
1 for monochrome and 3 for colour
Boolean controls whether DicomLabels are “burnt-in” to the new image
Zoom factor to apply to new image
Left, Right, Top and Bottom 
Edges of the original image to use. So printer Image could be a cropped version of the original.
Note - When using the printerImage function only minimal Dicom data( DicomAttribute data) is copied to the new image - no pre-windowing data values are copied into the new image - ideal for an icon sequence attribute.

The SubImage method provides and easy way of creating a small thumbnail representation of the original Dicom Image. The difference between sub image and printer image is that subimage copies all attributes to the new image. The parameters of SubImage are (XOffset, YOffset, XSize, YSize, Magnification, Frame)

To create a thumbnail with the SubImage method use the following code:

DicomImage.SubImage(XOffset, YOffset, XSize, YSize, Magnification, Frame) 
XOffset , YOffset
Top left corner of the original image to use.
XSize , YSize
Size of the final image.
Magnification to apply before cropping to size given by XSize and YSize.
The Frame to copy.

Thumbnails can be added to an Image under the Icon Sequence Attribute (&H88, &H200). See Adding_Sequence_Items using DicomObjects

Follow this link for information on how to retrieve the Image Icon - Query_Image_Icon