Using the Medical Image Viewer Control

Features of Version 16 and above:

When working with 8-bit viewing systems, first set the uFlags parameter of the L_DispContainerCreate function to CONTAINER_DONTHANDLEPALETTE. Then use the L_DispContainerHandlePalette function to access an interface with the viewer that allows it to receive messages that inform the control that the palette has been changed.

Use the L_DispContainerBeginUpdate function to stop the viewer from refreshing after each change is applied. Refresh is suspended until the  L_DispContainerEndUpdate function is called. At that point the viewer will repaint to show all of the changes that have been made.

Call the L_DispContainerCalibrateCell function to calibrate a cell or sub-cell without having to use the annotation ruler. To calibrate a cell or sub-cell using the annotation ruler call the L_DispContainerCalibrateRuler function.

Take advantage of the viewers low memory usage feature by calling the L_DispContainerEnableCellLowMemoryUsage function. When enabled, the viewer only loads those frames that are currently visible on the cell at runtime, instead of all of the frames. Call the L_DispContainerGetLowMemoryUsageCallBack function to get a callback function which will be fired every time the control requests a new frame when the low memory usage feature is enabled. When frames are requested, send them to the control by using the L_DispContainerSetRequestedImage function. Call the  L_DispContainerSetLowMemoryUsageCallBack function to set the current frames request callback function.

Call the L_DispContainerGetRotateBitmapPerspectiveAngle function to get the perspective rotation angle of the specified cell or sub-cell and set it by using the L_DispContainerRotateBitmapPerspective function.

Call the L_DispContainerUpdateCellView function to recalculate the cells internal values in order to update the view according to the changes made to the image. This function will also repaint the cell. To repaint the cell only with the recalculated internal data, use the L_DispContainerRepaintCell function.

Use the L_DispContainerPrintCell function to obtain a printable version of the specified cell or sub-cell.

Containers can have a maximum of 8 rows and 8 columns.

Features of Version 15 and above:

The LEADTOOLS Medical Image Viewer Control provides support for displaying one or more images and for the real-time manipulation of one or more images. Support for this control is provided by the LTIVW.DLL. When the LTIVW.DLL loads, it registers the LTCONTAINERCLASS window class. Windows of this class can then be created in any of the following ways:

If a window of this class is created using the CreateWindow function or in the application's .RC file, make sure the LTIVW.DLL is loaded in the application's InitInstance function by calling the L_UseContainerControl function within the InitInstance function.

Creating the Container

Each container created has both a window handle and a handle to the container itself. To get the handle to the window, call the L_DispContainerGetWindowHandle function. To get a handle to the container itself, call the  L_DispContainerGetHandle function.  Each container also has a bounding rectangle, which defines it area. To set the bounding rectangle for a container, call the L_DispContainerSetBounds function. To get the current bounding rectangle for a container, call the L_DispContainerGetBounds function.

Container Cells

To view images, at least one cell must be added to the medical viewer container. For more information, see Image Viewer Cells.

While a container can have a maximum of 4 rows and 8 columns, the number of cells in a container is limited only by the amount of available memory. If the container contains more cells than it does blocks in which to display those cells, a vertical scroll bar appears to control which rows of cells to display. The first visible row of cells can be set programmatically by calling the  L_DispContainerSetFirstVisibleRow function. To determine the current first visible row, call the L_DispContainerGetFirstVisibleRow function.

Container Splitters

A container has a number of properties that govern the appearance of the container and the cells, including the number of rows and columns in which cells are viewed. These properties are sets by calling the L_DispContainerSetProperties function. For example, if the number of rows and columns for a container are both sets to 3, there will be 9 areas in which the cells will be viewed.

Each two adjacent rows or columns are separated by a thick line, called a splitter, which can be moved in order to change the height of the rows or the width of the columns. These splitters can be dragged using the left mouse button. Once the splitter is released in its new position the size and position of the surrounding cells will be adjusted automatically. To get the current properties for a container, call the  L_DispContainerGetProperties function.

To the right and to the bottom of the image viewer/container, there are two splitters. These are extra splitters, which allow the user to change the number of rows and/or columns in the container dynamically. To increase the number of rows or columns, drag an extra splitter over from either the bottom or right side of the container. To decrease the number of rows or columns, drag a splitter currently in the container over to where the extra splitter is currently located. The maximum number of rows and columns allowed in a container is 4 X 8. Once the maximum number of rows or columns has been set in the container, the extra splitter disappears. For example, if the user sets the maximum number of rows in the container, the extra bottom splitter will disappear, indicating that no more rows can be added.

Changing the position of one splitter may affect other splitters, depending on whether the container was set to maintain cell size or maintain cell position. If the container was set to maintain cell size, then if one splitter is moved, the other splitters parallel to it will move the same amount, as long as possible, to maintain the size of the cells.

If the container has been set to maintain cell position, then moving splitters may result in cells of various sizes. To make all cells the same size, call the L_DispContainerSetProperties function for the container, with the number of rows and columns set to the current number of visible rows and columns.

Destroying the Container

When a container is no longer needed it should be destroyed, by calling the L_DispContainerDestroy function. This function destroys the container, any cells managed by the container, any actions added to the container, any bitmap lists attached to the cells of the container, and any other internal data allocated for the container.

Working with the LEADTOOLS Medical Image Viewer Control

Using the Medical Image Viewer Control

Image Viewer Cells

Applying Actions

Creating a Bitmap Region Inside the Image Viewer

Implementing Animation

Working with Annotations

Customizeable Title Bar

For more information, refer to:


Example Programs

Summary of All Supported Image File Formats

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Medical Image Viewer C API Help