Introduction

The LEADTOOLS Medical Image Viewer Control Class Library provides functions to let you incorporate the ability to work with Image Viewer Control files in your applications. The Image Viewer Control provides support for displaying one or more images and for the real-time manipulation of one or more images. Also it supports several standard or "built-in" actions and custom or "user-defined" actions.

This help file contains only the documentation for the functions in the LEADTOOLS Medical Image Viewer Control Class Library.

The toolkit comes in WIN32 editions so that it can support development of software applications for any of the following environments:

Windows 3.x NT
Windows 4.x NT
Windows 95
Windows 98
Windows 2000

Summary of All Supported Image File Formats

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.


Example Programs

The following example program is in separate EXAMPLES subdirectories (such as C:\LEAD14\EXAMPLES\CLASSLIB). The executable files for these examples were compiled with Document/Medical capabilities. To get Document/Medical capabilities, you must buy a LEADTOOLS Document/Medical edition toolkit. Otherwise, if you recompile the examples, the resulting executable files will not have the Document/Medical capabilities.

Note:

You can run the example programs on your system by clicking the appropriate buttons in online help. If you try to run an example program that is not on your system, an error message will appear.

ImageViewer

Demonstrates the LEADTOOLS Image Viewer features in one application.


Version History

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

Version 14.5


Version 14.5

Version 14.5 is the first version of LEADTOOLS Image Viewer Class Library:

The rest of this topic lists the functions in version 14.5:

LImageViewer::LImageViewer

LImageViewer::~LImageViewer

LImageViewer::AddAction

LImageViewer::Create

LImageViewer::Destroy

LImageViewer::FreezeCell

LImageViewer::GetActionCount

LImageViewer::GetActionProperties

LImageViewer::GetBounds

LImageViewer::GetCellBitmapList

LImageViewer::GetCellBounds

LImageViewer::GetCellPosition

LImageViewer::GetCellProperties

LImageViewer::GetCellsCount

LImageViewer::GetCellWindowHandle

LImageViewer::GetFirstVisibleRow

LImageViewer::GetKeyboardAction

LImageViewer::GetProperties

LImageViewer::GetWindowHandle

LImageViewer::InsertCell

LImageViewer::IsActionActive

LImageViewer::IsCellFrozen

LImageViewer::IsCellSelected

LImageViewer::RemoveAction

LImageViewer::RemoveCell

LImageViewer::RepositionCell

LImageViewer::SelectCell

LImageViewer::SetAction

LImageViewer::SetActionProperties

LImageViewer::SetBounds

LImageViewer::SetCellBitmapList

LImageViewer::SetCellProperties

LImageViewer::SetCellTag

LImageViewer::SetFirstVisibleRow

LImageViewer::SetKeyboardAction

LImageViewer::SetProperties

Call Back Functions

LImageViewer::ActionCallBack

LImageViewer::EnableTagCallBack

LImageViewer::EnableActionCallBack

LImageViewer::TagCallBack

Structures

DISPCONTAINERPROPERTIES

DISPCELLPROPERTIES

DISPCONTAINERACTIONPROPS

DISPWLEVELACTIONPROPS

DISPALPHAACTIONPROPS

DISPMAGACTIONPROPS

DISPOFFSETACTIONPROPS

DISPSCALEACTIONPROPS

DISPSTACKACTIONPROPS

DISPOWNERACTIONPROPS


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 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
Technical support: (704) 372-9681 or Support@Leadtools.com
Home page: http://www.leadtools.com


Programming with LEADTOOLS Image Viewer Functions

Using the Image Viewer

Image Viewer Cells

Applying Actions


Applying Actions

Actions are processes that can be applied to the images attached to cells within the container/image viewer. LEADTOOLS supports several standard or "built-in" actions and custom or "user-defined" actions. The built-in actions LEADTOOLS supports are listed below:

Window Leveling: Maps grayscale intensities using a user defined color map (LUT).

Alpha: A window-leveling factor used when the window leveling lookup table is not linear.

Scale: Increases or decreases the size of the image in the cell.

Offset: Changes the offset of the image within the cell.

Magnifying Glass: Magnifies the image in the cell.

Stack: Scrolls the images within the cell.

Custom actions are completely controlled by the user, including any mouse movement and keystroke association. The user handles these custom actions through a DISPCONTAINERACTIONCALLBACK callback function. This callback function must be set by setting LImageViewer::EnableActionCallback to TRUE.

Regardless of whether the action is built-in or custom, any action must be added to a container before it can be used. To add an action to a container, call LImageViewer::AddAction. Since the Image Viewer supports custom actions, there is no limit on how many actions a container can have. However, an action cannot be added to a container twice. To determine how many actions are currently in a particular container, call LImageViewer::GetActionCount.

Once the action has been added, assign it to a mouse button using LImageViewer::SetAction. An action can be assigned to more than one mouse button. If an action has been assigned to a mouse button, it is considered "active". To determine whether a specific action is active, call LImageViewer::IsActionActive. The LImageViewer::SetAction function also lets the user decide whether the applied action will affect one cell, selected cells, or all cells in the container, and whether the action is applied during mouse movement or after mouse button release.

In addition to assigning an action to a mouse button, an action can also be assigned to a keystroke combination. To set the keystroke combination for an action, call LImageViewer::SetKeyboardAction. To get the current keystroke combination associated with a specific action, call LImageViewer::GetKeyboardAction.

Each action has both general and specific properties. The general properties, like the cursor, are common to all cells within the container. These are applied at the container level. Specific properties, such as the width used by the window level action, are used to manually change values used by the action. These are applied at the cell level. The properties used by each action are contained in an action-specific structure. Action properties that apply to the entire container can be found in the DISPCONTAINERACTIONPROPS structure. Each of the action-specific structures contains a DISPCONTAINERACTIONPROPS structure, as well as other properties, related to the specific action. Some of the additional properties related to the specific properties are also applied at the container level and are therefore "general" properties, while others are applied at the cell level and are therefore "specific" properties. For more information on the properties of the various actions, refer to the structures listed below:

DISPWLEVELACTIONPROPS

DISPALPHAACTIONPROPS

DISPMAGACTIONPROPS

DISPOFFSETACTIONPROPS

DISPSCALEACTIONPROPS

DISPSTACKACTIONPROPS

DISPOWNERACTIONPROPS

The current properties associated with a specific action can be retrieved by calling LImageViewer::GetActionProperties. To change the properties for a specific action, call LImageViewer::SetActionProperties.

When an action is no longer needed in a container, it can be removed by calling LImageViewer::RemoveAction.


Image Viewer Cells

General

A container, or Image Viewer, may contain a number of child windows called cells. These cells may contain images, tags or rulers. Cells are resized to fit within the "blocks" that make up the rows and columns in the container. The number of rows and columns can be altered programmatically by calling LImageViewer::SetProperties to set the container properties. The number of rows and columns can be altered dynamically by the user positioning more "splitters" within the container.

When a container is created, it is empty. To add a cell to a container, call LImageViewer::InsertCell. This function automatically creates a window for the cell when it inserts the cell into the container. A handle to that window can be retrieved by calling LImageViewer::GetCellWindowHandle. The number of cells that can be added to a container is limited only by the available memory. To get the current number of cells in a container, call LImageViewer::GetCellCount

Cells are positioned within a container from left to right and top to bottom. When a cell is inserted in the container, any cells to the right of the inserted cell will be moved to the right one block, wrapping to the next row as each row is filled. The row and column position of each cell can be retrieved by calling LImageViewer::GetCellPosition. A cell can be repositioned, based on the index, by calling LImageViewer::RepositionCell.

Each cell in the container has certain properties associated with it. The current properties for a cell can be retrieved by calling LImageViewer::GetCellProperties. To change the properties of a single cell, or to give all cells in the container the same properties, call LImageViewer::SetCellProperties. There are certain properties that apply to all cells within a container. These properties can be retrieved and set using LImageViewer::GetProperties and LImageViewer::SetProperties.

Each cell in a container has boundaries, which are dictated by the splitters separating the rows and the columns. These boundaries cannot actually be reset programmatically, although you could change the number of rows and columns in the container. The boundaries can be obtained however, by calling LImageViewer::GetCellBounds.

Actions may be applied to the images attached to the cells in the container. For more information about the available actions and the functions associated with them, refer to Applying Actions to a Container. As the Applying Actions to a Container topic describes, actions can be assigned to mouse buttons and keystroke combinations. These actions are then applied to one or more cells when the mouse button is pressed/dragged or the keystroke combination is pressed. To prevent the mouse or keyboard from being used to apply an action to a cell, that cell can be frozen. To "freeze" a cell, call LImageViewer::FreezeCell with the bFreeze parameter set to TRUE. A frozen cell cannot be handled using the mouse or the keyboard, but it can be changed manually using either LImageViewer::SetCellProperties, or LImageViewer::SetActionProperties. To unfreeze a frozen cell, call LImageViewer::FreezeCell with the bFreeze parameter set to FALSE. To determine whether a cell is frozen, call LImageViewer::IsCellFrozen.

Cells within a container may be selected or deselected. In fact, when applying actions to cells the user has the option to apply the action on one cell, all cells, or only selected cells. To select or deselect a cell, call LImageViewer::SelectCell. When selecting cells dynamically, selecting one cell by clicking on it will deselect all other cells. To select more than one cell, hold the CTRL key while clicking on the cells. To determine whether a cell is currently selected, call LImageViewer::IsCellSelected

What a Cell Contains

A cell can have one or more images attached to it by calling LImageViewer::SetCellBitmapList. If a bitmap list having multiple images is added, scroll bars will appear to allow scrolling through the images. To get the current list attached to a cell, call LImageViewer::GetCellBitmapList. It is best not to modify an existing bitmap list attached to a specific cell. However, if it is necessary to modify an attached bitmap list, certain steps should be taken. For more information on this procedure, refer to LImageViewer::SetCellBitmapList.

Cells may also contain rulers. Horizontal and vertical rulers are used to measure the actual size of the image in centimeters. These rulers are updated automatically if the image is resized. They are displayed or hidden, depending on the cell properties set using LImageViewer::SetCellProperties . The style and colors used to draw the rulers are set for the container using LImageViewer::SetProperties .

In addition to images and rulers, cells may also contain tags. Tags are text that is spread along the sides of the cell, and provide information about the image. A cell may have no tags, one tag, or more than one tag. Each tag is added by calling LImageViewer::SetCellTag.

There are three types of tags:

Built-in tags (hot tags): internally written tags that contain information about the image, such as the scale. These tags change immediately, if the image properties associated with the tag change. Therefore, if the image is scaled to 300, the scale tag changes to 300.

User tags: tags that contain text entered by the user.

Owner tags: tags that are handled through the DISPCONTAINERTAGCALLBACK callback function. Each time a cell is drawn that contains an owner tag, this callback function is called, if EnableTagCallBack has been set to TRUE.

Sub-Cells

Cells can sometimes act like mini containers. They can be divided into equivalent blocks based on the number of rows and columns set using the LImageViewer::SetCellProperties function. Splitters are not used to separate rows and columns in cells. Therefore, the number of cells and the size of each cell is set when LImageViewer::SetCellProperties is called. Each block within the cell contains one page of the bitmap list attached to the cell. Scrolling is also supported within the cell, although it is a little different from the container scrolling. In cell scrolling, the pages shift up by one page. Therefore, if the cell has pages 0, 1, 2, and 3, and the pages are scrolled down by one, page 0 will disappear and page 1 will take its place.

There is very little independence for sub-cells. For most actions, such as scaling, if one sub-cell is scaled, all sub cells are scaled. However, the window leveling and alpha actions can be applied to individual sub-cells, without being applied to all sub-cells.

While sub-cells can be selected, only one-sub cell per cell can be selected at a time.

Dynamically, left double clicking on a sub-cell causes the cell to enter an "exploded" mode in which the sub-cell expands to cover the entire cell. Left double-clicking the cell a second time returns the sub-cell to its regular state.

Removing a Cell

When a cell is no longer needed in a container it can be removed by calling LImageViewer::RemoveCell. If a cell is removed, any cells to the right of the removed cell will be shifted left. Cells will wrap to the preceding row as needed. All cells in a container can be removed by calling LImageViewer::RemoveCell with the nCellIndex parameter set to –1.


Using the Image Viewer

The LEADTOOLS 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:

calling LImageViewer::Create

Each container created has a window handle. To get the handle to the window, call LImageViewer::GetWindowHandle. Each container also has a bounding rectangle, which defines its area. To set the bounding rectangle for a container, call LImageViewer::SetBounds. To get the current bounding rectangle for a container, call LImageViewer::GetBounds.

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 set by calling LImageViewer::SetProperties. Therefore, if the number of rows and columns for a container are both set 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 may 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 LImageViewer::GetProperties.

To the right and to the bottom of the image viewer/container, there are two splitters. These are the 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 LImageViewer::SetProperties for the container, with the number of rows and columns set to the current number of visible rows and columns.

While a container can have a maximum of 4 rows and 8 columns, the number of cells in a container is limited 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 LImageViewer::SetFirstVisibleRow. To determine the current first visible row, call LImageViewer::GetFirstVisibleRow.

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


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 distribute the header files with your application, and you may not provide software development capabilities in your application.

The following table summarizes the files you must include on your distribution diskettes to support the LEADTOOLS functions. These files are referred to as "Redistributables" in the License Agreement.

Please note that LTKRN and LTWVC is required for ALL Class library applications. For more information on LTKRN, LTWVC and other files for the Main Class Library, refer to Files To Be Included With Your Application .

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.

Redistributables: | Explanation: | If you are using a standard release without Unicode, the files to use are: | If you are using a standard release with Unicode, the files to use are: | If you are using an evaluation release without Unicode, the files to use are: | If you are using an evaluation release with Unicode, the files to use are:
LTIVW | LEADTOOLS Medical Image Viewer support. | DLL: LTIVW14N.DLL Library: LTIVW_N.LIB | DLL: LTIVW14NU.DLL Library: LTIVW_NU.LIB | DLL: LTIVW14E.DLL Library: LTIVW_E.LIB | DLL: LTIVW14EU.DLL Library: LTIVW_EU.LIB


Installation Directory

The installation procedure creates a directory tree for the LEADTOOLS files, demonstration programs and online help. 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.
EXAMPLES\CLASSLIB | One subdirectory for each example Class Library 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 4.0.
LIB | Library files.
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.


LImageViewer

Description

The LImageViewer class is derived from the LBase class. This class contains base functionality for handling the Image Viewer Control. This class provides support for displaying one or more images and for the real-time manipulation of one or more images.

Required DLLs and Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Class Members, Class Hierarchy Chart , Parent Class


LImageViewer::Class Members

Member Functions

Return to LImageViewer


LImageViewer::Member Functions

Constructors / Destructors

Handling the Container

Applying Actions

Overridables

Image Viewer Cells

Return to LImageViewer

Constructors / Destructors

LImageViewer::~LImageViewer

LImageViewer::LImageViewer

Handling the Container

LImageViewer::Create

LImageViewer::Destroy

LImageViewer::GetBounds

LImageViewer::GetFirstVisibleRow

LImageViewer::GetProperties

LImageViewer::GetWindowHandle

LImageViewer::SetBounds

LImageViewer::SetFirstVisibleRow

LImageViewer::SetProperties

Applying Actions

LImageViewer::AddAction

LImageViewer::EnableActionCallBack

LImageViewer::EnableTagCallBack

LImageViewer::GetActionCount

LImageViewer::GetActionProperties

LImageViewer::GetKeyboardAction

LImageViewer::IsActionActive

LImageViewer::RemoveAction

LImageViewer::SetAction

LImageViewer::SetActionProperties

LImageViewer::SetKeyboardAction

Overridables

LImageViewer::TagCallBack

LImageViewer::ActionCallBack

Image Viewer Cells

LImageViewer::Create

LImageViewer::FreezeCell

LImageViewer::GetCellBitmapList

LImageViewer::GetCellBounds

LImageViewer::GetCellCount

LImageViewer::GetCellPosition

LImageViewer::GetCellProperties

LImageViewer::GetCellWindowHandle

LImageViewer::InsertCell

LImageViewer::IsCellFrozen

LImageViewer::IsCellSelected

LImageViewer::RemoveCell

LImageViewer::RepositionCell

LImageViewer::SelectCell

LImageViewer::SetCellBitmapList

LImageViewer::SetCellProperties

LImageViewer::SetCellTag


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
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.


Window Control/Image Viewer Functions

Applying Actions

Image Viewer Cells

Using the Image Viewer


Window Control/Image Viewer Functions: Applying Actions

Window Control/Image Viewer Functions:
Applying Actions

LImageViewer::AddAction

LImageViewer::EnableActionCallBack

LImageViewer::EnableTagCallBack

LImageViewer::GetActionCount

LImageViewer::GetActionProperties

LImageViewer::GetKeyboardAction

LImageViewer::IsActionActive

LImageViewer::RemoveAction

LImageViewer::SetAction

LImageViewer::SetActionProperties

LImageViewer::SetKeyboardAction


Window Control/Image Viewer Functions: Image Viewer Cells

Window Control/Image Viewer Functions:
Image Viewer Cells

LImageViewer::Create

LImageViewer::FreezeCell

LImageViewer::GetCellBitmapList

LImageViewer::GetCellBounds

LImageViewer::GetCellCount

LImageViewer::GetCellPosition

LImageViewer::GetCellProperties

LImageViewer::GetCellWindowHandle

LImageViewer::InsertCell

LImageViewer::IsCellFrozen

LImageViewer::IsCellSelected

LImageViewer::RemoveCell

LImageViewer::RepositionCell

LImageViewer::SelectCell

LImageViewer::SetCellBitmapList

LImageViewer::SetCellProperties

LImageViewer::SetCellTag


Window Control/Image Viewer Functions: Using the Image Viewer

Window Control/Image Viewer Functions:
Using the Image Viewer

LImageViewer::Create

LImageViewer::Destroy

LImageViewer::GetBounds

LImageViewer::GetFirstVisibleRow

LImageViewer::GetProperties

LImageViewer::GetWindowHandle

LImageViewer::SetBounds

LImageViewer::SetFirstVisibleRow

LImageViewer::SetProperties


Data Types

Basic Data Types and Keywords

LEADTOOLS Basic Data Types

Keywords Used in Declarations

Image Viewer Data Types

DISPCONTAINERPROPERTIES

DISPCELLPROPERTIES

DISPCONTAINERACTIONPROPS

DISPWLEVELACTIONPROPS

DISPALPHAACTIONPROPS

DISPMAGACTIONPROPS

DISPOFFSETACTIONPROPS

DISPSCALEACTIONPROPS

DISPSTACKACTIONPROPS

DISPOWNERACTIONPROPS


LEADTOOLS Basic Data Types

LEADTOOLS has defined the following basic data types for portability:

Data Type | Definition and Usage
L_BITFIELD | Defined as L_UINT; used as a bit field.
L_BOOL | Defined as L_UINT; used as a boolean value.
L_CHAR | Defined as char; used as a signed 8-bit integer.
L_DOUBLE | Defined as double; used as a double precision floating point number.
L_FLOAT | Defined as float; used as a floating point number.
L_INT | Defined as int; used as a signed integer, 16-bits or larger.
L_INT16 | Defined as short; used as a signed 16-bit integer.
L_INT32 | Defined as long; used as a signed 32-bit integer.
L_UCHAR | Defined as unsigned char; used as an unsigned 8-bit integer.
L_UINT | Defined as unsigned; used as an unsigned integer, 16-bits or larger.
L_UINT16 | Defined as unsigned short; used as an unsigned 16-bit integer.
L_UINT32 | Defined as unsigned long; used as an unsigned 32-bit integer.
L_VOID | Defined as void; used as a void.
L_COMP | Defined as L_UINT; used as a handle to a computer
L_MEDIA | Defined as L_VOID L_FAR *; used as a void pointer
L_TCHAR | Defined as either char or TCHAR. If FOR_UNICODE is defined, then L_TCHAR will be defined as TCHAR.
L_HANDLE | Defined as L_VOID *; used as a void pointer.


Keywords Used in Declarations

LEADTOOLS uses the following keywords in declarations of functions, structures, and datatypes:

Keyword | Definition and Usage
L_FAR | Defined as nothing; used as a placeholder.
L_HUGE | Defined as nothing; used as a placeholder.
L_EXPORT | Defined as nothing; used as a placeholder.
L_PASCAL | Defined as nothing; used as a placeholder.
EXT_FUNCTION | Defined as WINAPI; used as an attribute for all toolkit functions.
pEXT_FUNCTION | Defined as EXT_FUNCTION L_FAR *; used as an attribute when defining pointers to toolkit functions.
EXT_CALLBACK | Defined as _cdecl L_FAR; used as an attribute for all toolkit callback functions.
pEXT_CALLBACK | Defined as EXT_CALLBACK L_FAR *; used as an attribute when defining pointers to toolkit callback functions.


DISPWLEVELACTIONPROPS

typedef struct tagDISPWLEVELACTIONPROPS
{
DISPCONTAINERACTIONPROPS DispContainerActionProps;
COLORREF rgbColorStart;
COLORREF rgbColorEnd;
L_INT nWidth;
L_INT nCenter;
L_UINT uFillType;
} DISPWLEVELACTIONPROPS, L_FAR * pDISPWLEVELACTIONPROPS;

The DISPWLEVELACTIONPROPS structure contains the properties for controlling the Window Level action. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
DispContainerActionProps | A structure that contains the general action properties.
rgbColorStart | Starting color value for the gradient. This member is applied on the container level. Default is black
rgbColorEnd | Ending color value for the gradient. This member is applied on the container level. Default is white.
nWidth | The width of the window level gradient. This member is applied on the sub cell level.
nCenter | The center of the window level gradient. This member is applied on the sub cell level.
uFillType | A flag that indicates the LUT type. This member is applied on the sub cell level. Possible values are:
 | Value | Meaning
 | FILLLUT_LINEAR | [0x0010] LUT is linear.
 | FILLLUT_EXPONENTIAL | [0x0020] LUT is exponential.
 | FILLLUT_LOGARITHMIC | [0x0030] LUT is logarithmic.
 | FILLLUT_SIGMOID | [0x0040] LUT is sigmoid.

Comments

For each action supported by the image viewer, there are general properties and specific properties. The general properties are those that are common to all actions and are applied at the container level. Each structure specific for an action contains a member that is a DISPCONTAINERACTIONPROPS structure and one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties".

To get or set the general action properties and any "Container-level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CONTAINERLEVEL.

To get or set the specific action properties, "Cell-level" or "Sub-cell level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CELLLEVEL.


DISPSTACKACTIONPROPS

typedef struct tagDISPSTACKACTIONPROPS
{
DISPCONTAINERACTIONPROPS DispContainerActionProps;
L_INT nScrollValue;
L_INT nActiveSubCell;
} DISPSTACKACTIONPROPS, L_FAR * pDISPSTACKACTIONPROPS;

The DISPSTACKACTIONPROPS structure contains the properties for controlling the Stack action. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
DispContainerActionProps | A structure that contains the general action properties. This member is applied on the container level.
nScrollValue | The current scroll value. This value represents the image within the image list. Every step of the scroll advances 1 image in the list. This member is applied on the cell level. Default is 0.
nActiveSubCell | Index of the current active sub cell. This member is applied on the cell level. Default is 0.

Comments

For each action supported by the image viewer, there are general properties and specific properties. The general properties are those that are common to all actions and are applied at the container level. Each structure specific for an action contains a member that is a DISPCONTAINERACTIONPROPS structure and one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties".

To get or set the general action properties and any "Container-level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CONTAINERLEVEL.

To get or set the specific action properties, "Cell-level" or "Sub-cell level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CELLLEVEL.


DISPSCALEACTIONPROPS

typedef struct tagDISPSCALEACTIONPROPS
{
DISPCONTAINERACTIONPROPS DispContainerActionProps;
L_UINT uScale;
} DISPSCALEACTIONPROPS, L_FAR * pDISPSCALEACTIONPROPS;

The DISPSCALEACTIONPROPS structure contains the properties for controlling the Scale action. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
DispContainerActionProps | A structure that contains the general action properties. This member is applied on the container level.
uScale | Scaling factor, given in percentage. This member is applied on the cell level. Default is 100%.

Comments

For each action supported by the image viewer, there are general properties and specific properties. The general properties are those that are common to all actions and are applied at the container level. Each structure specific for an action contains a member that is a DISPCONTAINERACTIONPROPS structure and one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties".

To get or set the general action properties and any "Container-level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CONTAINERLEVEL.

To get or set the specific action properties, "Cell-level" or "Sub-cell level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CELLLEVEL.


DISPOWNERACTIONPROPS

typedef struct tagDISPOWNERACTIONPROPS
{
DISPCONTAINERACTIONPROPS DispContainerActionProps;
} DISPOWNERACTIONPROPS, L_FAR * pDISPOWNERACTIONPROPS;

The DISPOWNERACTIONPROPS structure contains the properties for controlling a Custom action. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
DispContainerActionProps | A structure that contains the general action properties. This member is applied on the container level.

Comments

For each action supported by the image viewer, there are general properties and specific properties. The general properties are those that are common to all actions and are applied at the container level. Each structure specific for an action contains a member that is a DISPCONTAINERACTIONPROPS structure and one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties".

To get or set the general action properties and any "Container-level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CONTAINERLEVEL.


DISPOFFSETACTIONPROPS

typedef struct tagDISPOFFSETACTIONPROPS
{
DISPCONTAINERACTIONPROPS DispContainerActionProps;
L_INT nXOffset;
L_INT nYOffset;
} DISPOFFSETACTIONPROPS, L_FAR * pDISPOFFSETACTIONPROPS;

The DISPOFFSETACTIONPROPS structure contains the properties for controlling the Offset action. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
DispContainerActionProps | A structure that contains the general action properties. This member is applied on the container
nXOffset | The X offset of the image. This value is given pixels and is with respect to the center of the cell. This member is applied on the cell level. Default is 0.
nYOffset | The Y offset of the image. This value is given pixels and is with respect to the center of the cell. This member is applied on the cell level. Default is 0.

Comments

For each action supported by the image viewer, there are general properties and specific properties. The general properties are those that are common to all actions and are applied at the container level. Each structure specific for an action contains a member that is a DISPCONTAINERACTIONPROPS structure and one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties".

To get or set the general action properties and any "Container-level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CONTAINERLEVEL.

To get or set the specific action properties, "Cell-level" or "Sub-cell level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CELLLEVEL.


DISPMAGACTIONPROPS

typedef struct tagDISPMAGACTIONPROPS
{
DISPCONTAINERACTIONPROPS DispContainerActionProps;
L_INT nWidth;
L_INT nHeight;
L_INT nZoom;
COLORREF clrPen;
L_BOOL bEllipse;
L_INT nBorderSize;
L_BOOL b3D;
L_INT nCrosshair;
} DISPMAGACTIONPROPS, L_FAR * pDISPMAGACTIONPROPS;

The DISPMAGACTIONPROPS structure contains the properties for controlling the Magnifying Glass action. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
DispContainerActionProps | A structure that contains the general action properties. This member is applied on the container level.
nWidth | The width of the magnifying glass. Minimum size is 10 pixels. This member is applied on the container level. Default is 200.
nHeight | The height of the magnifying glass. Minimum size is 10 pixels. This member is applied on the container level. Default is 200.
nZoom | The zoom factor for the magnification, in percent. This value must be >= 100. For example, to zoom the image 2X, specify 200 for nZoom; for 3X, specify 300, etc. This member is applied on the container level. Default is 200.
clrPen | The color of the border of the magnifying glass. This is ignored when bEllipse = FALSE and b3D = TRUE. This member is applied on the container level. Default is black.
bEllipse | Flag that indicates the shape of the magnifying glass. This member is applied on the container level. Possible values are:
 | Value | Meaning
 | TRUE | The magnifying glass is an ellipse.
 | FALSE | The magnifying glass is a rectangle. (Default)
nBorderSize | The size of the magnifying glass border in pixels. This value is ignored when bEllipse = FALSE and b3D = TRUE. In this case the magnifying glass appears as a rectangle with a 3D border. The 3D border has a thickness of 2 pixels, one pixel for the highlight color and one for the shadow color. Default is 1. This member is applied on the container level.
b3D | Flag that indicates whether the border of a rectangular magnifying glass appears as 3D or flat. This member is applied on the container level. This value is valid only if bEllipse is FALSE. Possible values are:
 | Value | Meaning
 | TRUE | The rectangular magnifying glass appears with a 3D border.
 | FALSE | The rectangular magnifying glass appears with a flat border. (Default)

nCrosshair | Flag that indicates the type of crosshair This member is applied on the container level. Possible values are:
 | Value | Meaning
 | CROSSHAIR_NONE | [0] No Crosshair
 | CROSSHAIR_FINE | [1] The crosshair is one pixel wide and uses the color in clrPen. (Default)
 | CROSSHAIR_INVERTPEN | [2] The crosshair is three pixels wide. The center pixel uses the color in clrPen. The outer pixels use the inverse of the color in clrPen.
 | CROSSHAIR_INVERTSCREEN | [3] The crosshair is three pixels wide. The center pixel uses the color in clrPen. The outer pixels use the inverse of the screen color.

Comments

For each action supported by the image viewer, there are general properties and specific properties. The general properties are those that are common to all actions and are applied at the container level. Each structure specific for an action contains a member that is a DISPCONTAINERACTIONPROPS structure and one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties".

To get or set the general action properties and any "Container-level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CONTAINERLEVEL.

To get or set the specific action properties, "Cell-level" or "Sub-cell level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CELLLEVEL.


DISPCONTAINERPROPERTIES

typedef struct tagDISPCONTAINERPROPERTIES
{
L_UINT uStructSize;
L_UINT uMask;
L_UINT uMask1;
L_UINT uNumRows;
L_UINT uNumCols;
COLORREF crEmptyCellBackGroundColor;
COLORREF crBackground;
COLORREF crText;
COLORREF crShadow;
COLORREF crRulerIn;
COLORREF crRulerout;
COLORREF crActiveBorderColor;
COLORREF crNonActiveBorderColor;
COLORREF crActiveSubCellBorderColor;
HCURSOR hDefaultCursor;
HCURSOR hRszVertCursor;
HCURSOR hRszHorzCursor;
HCURSOR hRszBothCursor;
L_BOOL bAutoScroll;
L_UINT uRulerStyle;
L_UINT uCellsMaintenance;
L_BOOL bShowFreezeText;
L_UINT uBorderStyle;
L_UINT uTextQuality;
} DISPCONTAINERPROPERTIES, L_FAR * pDISPCONTAINERPROPERTIES;

The DISPCONTAINERPROPERTIES structure contains the options for controlling the behavior of the container. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
uStructSize | Size of this structure in bytes, for versioning. Use the sizeof() macro to calculate this value.
uMask | Value that indicates which members contain valid data for setting or which members should be updated. Flags can be combined using the bitwise OR. Possible values are:
 | Value | Meaning
 | DCPF_ALL | [0x001FFFFF] All members must be valid or must be filled in.
 | DCPF_NUMROWS | [0x00000001] The uNumRows member is valid or must be filled in.
 | DCPF_NUMCOLS | [0x00000002] The uNumCols member is valid or must be filled in.
 | DCPF_EMPTYCELLBACKGROUNDCOLOR | [0x00000004] The crEmptyCellBackGroundColor member is valid or must be filled in.
 | DCPF_BACKGROUNDCOLOR | [0x00000008] The crBackGroundColor member is valid or must be filled in.
 | DCPF_TEXTCOLOR | [0x00000010] The crText member is valid or must be filled in.
 | DCPF_SHADOWCOLOR | [0x00000020] The crShadow member is valid or must be filled in.
 | DCPF_RULERINCOLOR | [0x00000040] The crRulerIn member is valid or must be filled in.
 | DCPF_RULEROUTCOLOR | [0x00000080] The rcRulerOut member is valid or must be filled in.
 | DCPF_ACTIVEBORDERCOLOR | [0x00000100] The crActiveBorderColor member is valid or must be filled in.
 | DCPF_NONACTIVEBORDERCOLOR | [0x00000200] The crNonActiveBorderColor member is valid or must be filled in.
 | DCPF_ACTIVESUBCELLBORDERCOLOR | [0x00000400] The crActiveSubCellBorderColor member is valid or must be filled in.
 | DCPF_DEFAULTCURSOR | [0x00000800] The hDefaultCursor member is valid or must be filled in.
 | DCPF_VERTCURSOR | [0x00001000] The hRszVertCursor is valid or must be filled in.
 | DCPF_HORZCURSOR | [0x00002000] The hRszHorzCursor is valid or must be filled in.
 | DCPF_BOTHCURSOR | [0x00004000] The hRszBothCursor is valid or must be filled in.
 | DCPF_AUTOSCROLL | [0x00008000] The bAutoScroll member is valid or must be filled in.
 | DCPF_CELLSMAINTENANCE | [0x00010000] The uCellsMaintenance is valid or must be filled in.
 | DCPF_SHOWFREEZETEXT | [0x00020000] The bShowFreezText is valid or must be filled in.
 | DCPF_BORDERSTYLE | [0x00040000] The uBorderStyle member is valid or must be filled in.
 | DCPF_TEXTQUALITY | [0x00080000] The uTextQuality member is valid or must be filled in.
 | DCPF_RULERSTYLE | [0x00100000] The uRulerStyle member is valid or must be filled in.
uMask1 | Reserved for future use. Must be zero.
uNumRows | Number of rows in the container. Default value is 1.
uNumCols | Number of columns in the container. Default value is 1.
crEmptyCellBackGroundColor | Background color to display in empty cells. Default color is black.
crBackground | Background color to display in non-empty cells. Default color is black.
crText | Text color. Default color is white.
crShadow | Shadow’s color. Default color is black.
CrRulerin | Ruler-in color. Default color is white.
crRulerout | Ruler-out color. Default color is blue.
crActiveBorderColor | Color of the border used to designate a selected cell. Default color is RGB(255, 192, 0).
crNonActiveBorderColor | Color of the border used to designate an unselected cell. Default color is white.
crActiveSubCellBorderColor | Color of the border used to designate a selected sub cell. Default color is yellow.
hDefaultCursor | Default cursor for the container. Default is IDC_ARROW.
hRszVertCursor | Default cursor for resizing vertically. Default is IDC_SIZENS.
hRszHorzCursor | Default cursor for resizing horizontally. Default is IDC_SIZEWE.
hRszBothCursor | Default cursor for resizing horizontally and vertically. Default is IDC_SIZEBOTH.
uRulerStyle | Flag that indicates the style of the rulers in the cells of the container. Possible values are:
 | Value | Meaning
 | DCPF_RULERSTYLE_INVERT | [0x00000000] The ruler is drawn using an inverted pen Default.
 | DCPF_RULERSTYLE_BORDERED | [0x00000001] The ruler is drawn using both the pen specified in crRulerout and crRulerin.
uCellsMaintenance | Flag that indicates whether to maintain, if possible, cell size or cell position. Possible values are:
 | Value | Meaning
 | DCPF_CELLSMAINTENANCE_SIZE | [0x00000000] Maintain cell size, if possible. Default.
 | DCPF_CELLSMAINTENANCE_POS | [0x00000001] Maintain cell position.
bShowFreezText | Flag that indicates whether to display the word "Freeze" on frozen cells. Possible values are:
 | Value | Meaning
 | TRUE | Display the word "Freeze" on frozen cells. (Default)
 | FALSE | Do not display the word "Freeze" on frozen cells.
uBorderStyle | Flags that determine the style of the border. Possible values are:
 | Value | Meaning
 | PS_SOLID | [0x00000000] Solid border.
 | PS_DASH | [0x00000001] Dashed border.
 | PS_DOT | [0x00000002] Dotted border (Default).
 | PS_DASHDOT | [0x00000003] Dash and dot border.
 | PS_DASHDOTDOT | [0x00000004] Dash and two dots border.
uTextQuality | Flags that determine the quality of the text and whether it is anti-aliased. Possible values are:
 | Value | Meaning
 | DEFAULT_QUALITY | [0x00000000] Default quality.
 | DRAFT_QUALITY | [0x00000001] Draft quality.
 | PROOF_QUALITY | [0x00000002] Proof quality.
 | NONANTIALIASED_QUALITY | [0x00000003] Forces use of draft quality.
 | ANTIALIASED_QUALITY | [0x00000004] Enables anti-aliasing for the font.

Comments

This structure is used by the LImageViewer::SetProperties and the LImageViewer::GetProperties functions.


DISPCONTAINERACTIONPROPS

typedef struct tagDISPCONTAINERACTIONPROPS
{
L_UINT uStructSize;
HCURSOR hCursor;
L_INT nChange;
L_BOOL bCircularMouseMove;
} DISPCONTAINERACTIONPROPS, *pDISPCONTAINERACTIONPROPS;

The DISPCONTAINERACTIONPROPS structure contains the "general properties" for controlling the behavior of various actions. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
uStructSize | The size of the action structure. You have to set the value of this member to the size of the structure that holds DISPCONTAINERACTIONPROPS. For example DISPWLEVELACTIONPROPS contain the structure member DISPCONTAINERACTIONPROPS so the uStructSize must be = sizeof(DISPWLEVELACTIONPROPS).
hCursor | Default cursor for the action. This parameter is applied at the container level. Default is the arrow cursor.
nChange | Percentage value that represents the mouse sensitivity. Possible values are >= 0. Default is 100. A value of 100 indicates that the amount of change in the action is equal to the amount of movement of the mouse. For example, if the mouse is moved 1 pixel, the action changes by 1 unit. A value of 50 indicates that the amount of change in the action is 50% of the amount of mouse movement. For example, if the mouse is moved 2 pixels, the action only changes by one unit. This parameter is applied on the container level.
bCircularMouseMove | Boolean flag that indicates whether the mouse resets when it reaches the side of the container. If the mouse is reset, then when it is dragged to one side of the container, it will disappear from that side and reappear on the opposite side of the container. This also applies to the top and bottom of the container. This parameter is applied on the container level. Possible values are:
 | Value | Meaning
 | TRUE | Reset the mouse when it reaches the side(any side, top or bottom) of the container. This is the default value.
 | FALSE | The cursor will act normally. It will not disappear when it reached one side and reappear on the opposite side.

Comments

For each action supported by the image viewer, there are general properties and specific properties. The general properties are those that are common to all actions and are applied at the container level. Each structure specific for an action contains a member that is a DISPCONTAINERACTIONPROPS structure and one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties". For example, if the LImageViewer::GetActionProperties function is called to get the scale action properties, a variable of type DISPSCALEACTIONPROPS should be declared. Pass a pointer to the DISPSCALEACTIONPROPS structure for the pActionProperties parameter. To get only the general properties, set uFlags to CONTAINER_ACTION_CONTAINERLEVEL. To get the specific properties, set uFlags to CONTAINER_ACTION_CELLLEVEL.

To get only the general action properties for the container, call LImageViewer::GetActionProperties with the uFlags parameter set to CONTAINER_ACTION_CONTAINERLEVEL. To set only the general action properties for the container, call LImageViewer::SetActionProperties with the uFlags parameter set to CONTAINER_ACTION_CONTAINERLEVEL.


DISPCELLPROPERTIES

typedef struct tagDISPCELLPROPERTIES
{
L_UINT uStructSize;
L_UINT uMask;
L_UINT uShowRuler;
L_UINT uShowTags;
L_UINT uNumRows;
L_UINT uNumCols;
L_BOOL bOnMove;
L_BOOL bIndividual;
L_BOOL bIsFit;
} DISPCELLPROPERTIES, * pDISPCELLPROPERTIES;

The DISPCELLPROPERTIES structure contains the options for controlling the behavior of the container's cells. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
uStructSize | Size of this structure in bytes, for versioning. Use the sizeof() macro to calculate this value.
uMask | Set of flags that specify which members of this structure contain data to be set or which members are being requested. This member can have one or more of the following flags set:
 | Value | Meaning
 | DCCELLPF_ALL | [0x0000007F] All members are valid or must be filled in.
 | DCCELLPF_SHOWRULER | [0x00000001] The uShowRuler member is valid or must be filled in.
 | DCCELLPF_SHOWTAGS | [0x00000002] The uShowTags member is valid or must be filled in.
 | DCCELLPF_ROW | [0x00000004] The uNumRows member is valid or must be filled in.
 | DCCELLPF_COLS | [0x00000008] The uNumCols member is valid or must be filled in.
 | DCCELLPF_APPLYONMOVE | [0x00000010] The bOneMove member is valid or must be filled in.
 | DCCELLPF_ALLOWINDIVIDUALWINDOWLEVEL | [0x00000020] The bIndividual member is valid or must be filled in.
 | DCCELLPF_IMAGE_FIT | [0x00000040] The bIsFit member is valid or must be filled in.
uShowRuler | Flags that indicate which ruler to display. Possible values are:
 | Value | Meaning
 | DCCELLPF_SHOWRULER_NONE | [0x00000000] Display no ruler.
 | DCCELLPF_SHOWRULER_BOTH | [0x00000001] Display the horizontal and vertical rulers. This is the default value.
 | DCCELLPF_SHOWRULER_VERT | [0x00000002] Display the vertical ruler.
 | DCCELLPF_SHOWRULER_HORZ | [0x00000003] Display the horizontal ruler.
uShowTags | Flag that indicates whether to display the tags. Possible values are:
 | Value | Meaning
 | DCCELLPF_SHOWTAGS_SHOW | [0x00000000] Show tags. This is the default value.
 | DCCELLPF_SHOWTAGS_HIDE | [0x00000001] Hide tags.

uNumRows | Number of rows within the cell. The default value is 1.
uNumCols | Number of columns within the cell. The default value is 1.
bOnMove | Flag that indicates whether the action is applied when the user drags the mouse. This parameter is ignored if bIndividual is TRUE. Possible values are:
 | Value | Meaning
 | TRUE | Apply the action when the user drags the mouse.
 | FALSE | Apply the action after the user releases the mouse button. This is the default value.
bIndividual | A Boolean flag that indicates whether the window level and alpha actions will be applied on each sub image separately. Possible values are:
 | Value | Meaning
 | TRUE | Apply the window level and alpha actions on each sub image separately.
 | FALSE | Apply the window level and alpha actions on every image in the list, after it has been applied to one image on the list. This is the default value.
bIsFit | A Boolean flag that indicates whether the image is scaled to fit the window size. Possible values are:
 | Value | Meaning
 | TRUE | The image is scaled to fit the window size.
 | FALSE | The image is displayed at its normal size. This is the default value.

Comments

This structure is used by the LImageViewer::SetCellProperties and the LImageViewer::GetCellProperties functions.


DISPALPHAACTIONPROPS

typedef struct tagDISPALPHAACTIONPROPS
{
DISPCONTAINERACTIONPROPS DispContainerActionProps;
L_INT nFactor;
} DISPALPHAACTIONPROPS, L_FAR * pDISPALPHAACTIONPROPS;

The DISPALPHAACTIONPROPS structure contains additional properties for controlling the Window Level action. This structure is available only in the Medical Imaging Suite toolkits.

Member | Description
DispContainerActionProps | A structure that contains the general action properties. This member is applied on the container level.
nFactor | Value that indicates the factor used in the function operation specified in the uFillType member of the DISPWLEVELACTIONPROPS. This nFactor member is used only if uFillType is FILLLUT_EXPONENTIAL, FILLLUT_LOGARITHMIC or FILLLUT_SIGMOID. If FILLLUT_EXPONENTIAL or FILLLUT_SIGMOID flag is selected, the value of nFactor can be any integer (+/-). If FILLLUT_LOGARITHMIC flag is selected its value should be >= 0. If nFactor = 0, the lookup table will be filled linearly. This member is applied on the sub cell level.

Comments

For each action supported by the image viewer, there are general properties and specific properties. The general properties are those that are common to all actions and are applied at the container level. Each structure specific for an action contains a member that is a DISPCONTAINERACTIONPROPS structure and one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties".

To get or set the general action properties and any "Container-level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CONTAINERLEVEL.

To get or set the specific action properties, "Cell-level" or "Sub-cell level" properties in this structure, call LImageViewer::GetActionProperties or LImageViewer::SetActionProperties with uFlags to CONTAINER_ACTION_CELLLEVEL.


Return Codes

For a list of all possible return codes for LEADTOOLS Image Viewer Class Library functions, refer to LEADTOOLS Class Library Return Codes in the Main Class Library help file.


LImageViewer::ActionCallBack

#include "ltwrappr.h"

L_INT LImageViewer::ActionCallBack (phBitmapList, uCount, nAction, uMessage, wParam, ptMousePos);

HBITMAPLIST L_FAR * phBitmapList; | /* array of bitmap lists */
L_UINT uCount; | /* number of bitmap lists */
L_INT nAction; | /* action ID */
L_UINT uMessage; | /* message */
WPARAM wParam; | /* extended parameter of the message */
POINT L_FAR * ptMousePos; | /* mouse position */

This callback function is called each time the user clicks or drags the mouse, rotates the mouse wheel, or presses a keyboard button, if the mouse or keyboard event is associated with a user-defined action. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
phBitmapList | An array of bitmap lists that represent all the bitmap lists of all cells selected by the user.
uCount | The number of bitmap lists referenced by phBitmapList.
nAction | Value that indicates the action associated with the mouse or keyboard event. Since this callback is used for user-defined actions, this value should be >= 100.
uMessage | Value that represents the message from either the mouse or the keyboard. Possible values are: WM_KEYDOWN WM_KEYUP WM_LBUTTONDOWN WM_LBUTTONUP WM_MBUTTONDOWN WM_MBUTTONUP WM_MOUSEMOVE WM_MOUSEWHEEL WM_RBUTTONDOWN WM_RBUTTONUP
wParam | Additional message information.
ptMousePos | A point that represents the position of the cursor.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

A user-defined action is added to a container by calling LImageViewer::SetAction. If a mouse or keyboard event that is associated with a user-defined action occurs, this callback function is called to allow the user to handle the action.

In order to use this callback function, it must first be set by calling EnableActionCallBack.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::EnableTagCallBack, LImageViewer::EnableActionCallBack, LImageViewer::TagCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::Create.


LImageViewer::EnableActionCallBack

#include "ltwrappr.h"

L_BOOL LImageViewer::EnableActionCallBack (bEnable);

L_BOOL bEnable;

/* flag */

Enables or disables the LImageViewer::ActionCallback function. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
bEnable | Flag that indicates whether to enable or disable the LImageViewer::ActionCallback function. Possible values are:
 | Value | Meaning
 | TRUE | Enable the LImageViewer::ActionCallBack function.
 | FALSE | Disable the LImageViewer::ActionCallback function.

Returns

The previous setting.

Comments

Call this function to enable or disable the Action callback overridable function for your class object. This will enable or disable the callback functions, which exist in the calling object.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::EnableTagCallBack, LImageViewer::ActionCallBack, LImageViewer::TagCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::Create.


LImageViewer::EnableTagCallBack

#include "ltwrappr.h"

L_BOOL LImageViewer::EnableTagCallBack (bEnable);

L_BOOL bEnable;

/* flag */

Enables or disables the LImageViewer::TagCallBack function. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
bEnable | Flag that indicates whether to enable or disable the tag callback function. Possible values are:
 | Value | Meaning
 | TRUE | Enable the LImageViewer::TagCallBack function.
 | FALSE | Disable the LImageViewer::TagCallBack function.

Returns

The previous setting.

Comments

Call this function to enable or disable the Tag callback overridable function for your class object. This will enable or disable the callback function, which exist in the calling object.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::EnableActionCallBack, LImageViewer::ActionCallBack, LImageViewer::TagCallBack, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::Create.


LImageViewer::TagCallBack

#include "ltwrappr.h"

L_INT LImageViewer::TagCallBack (nCellIndex, hDC, lpRect);

L_INT nCellIndex; | /* index of the cell that called the callback */
HDC hDC; | /* memory DC for painting */
RECT L_FAR * lpRect; | /* pointer to a structure */

This callback function is called before the window control paints a cell that contains an owner draw tag. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | Index of the cell, which has the owner draw tag.
HDC | Memory DC that is used to paint the cell.
lpRect | Pointer to a RECT structure that contains the area of the owner draw tag in the Memory DC.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

When the window control paints a cell that contains an "owner draw" tag, this callback function is called to allow the user to draw a custom tag. This callback function is only called however, if it has been set by calling LImageViewer::EnableTagCallBack.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::EnableTagCallBack, LImageViewer::EnableActionCallBack, LImageViewer::ActionCallBack, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::Create.


LImageViewer::LImageViewer

#include "ltwrappr.h"

L_VOID LImageViewer::LImageViewer(L_VOID);

Constructs and initializes the member variables of the LImageViewer object. This function is available only in the Medical Imaging Suite toolkits.

Returns

None.

Comments

This is the constructor for the LImageViewer class.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::~LImageViewer, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

L_VOID TestConstructor()
{
// this will call the default constructor and destructor when it is out of scope
LImageViewer LeadImageViewer ;

//...
}


LImageViewer::~LImageViewer

#include "ltwrappr.h"

L_VOID LImageViewer::~LImageViewer(L_VOID);

Destroys the object and frees any resources associated with it. This function is available only in the Medical Imaging Suite toolkits.

Returns

None.

Comments

This is the destructor for the LImageViewer class.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::LImageViewer, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

For an example, refer to LImageViewer::LImageViewer.


LImageViewer::AddAction

#include "ltwrappr.h"

L_INT LImageViewer::AddAction (nAction, uFlags);

L_INT nAction; | /* action to be added */
L_UINT uFlags; | /* reserved for future use */

Adds a new action to the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nAction | Value that indicates the action to be added. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it should be one of these predefined actions:
 | Value | Meaning
 | CONTAINER_ACTION_WINDOWLEVEL | [1] Window leveling
 | CONTAINER_ACTION_SCALE | [2] Scaling
 | CONTAINER_ACTION_OFFSET | [3] Offset
 | CONTAINER_ACTION_STACK | [4] Stacking
 | CONTAINER_ACTION_MAG | [5] Magnifying glass
 | CONTAINER_ACTION_ALPHA | [6] Alpha
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The same action cannot be added to a container twice.

To set or get the properties of a specific action, use LImageViewer::SetActionProperties and LImageViewer::GetActionProperties.

Once an action has been added to the container, it can be associated with a particular mouse movement, a keystroke combination, or both. To associate an action with the mouse, call LImageViewer::SetAction. To associate an action with a keystroke combination, call LImageViewer::SetKeyboardAction.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::GetActionCount, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::Create.


LImageViewer::Create

#include "ltwrappr.h"

L_INT LImageViewer::Create (hWndParent, lpRect, uFlags);

HWND hWndParent; | /* handle to the parent window */
RECT L_FAR * lpRect; | /* pointer to a structure */
L_UINT uFlags; | /* reserved for future use */

Creates a container, which is a window that contains a number of child windows (cells). Each cell can hold a single image or a list of images. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
hWndParent | Handle to the parent or owner window of the container window being created.
lpRect | Pointer to a RECT structure that contains the initial bounds of the container window. The values in this structure are specified in pixels and are relative to the parent window.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will create a window that will hold the container. This container window serves as the "image viewer".

Each container has numerous characteristics, such as the number of rows, the number of columns, border colors, background colors, cursors, etc. that can be set programmatically using LImageViewer::SetProperties. To get the current characteristics of a specific container, call LImageViewer::GetProperties.

A container can also have certain actions, either standard or user-defined, associated with it. These actions are applied either through the mouse or through keystroke combinations. For more information, refer to Applying Actions.

When a container window is viewed in an application, 3-dimensional thick dark lines called splitters are visible to the right of the container window and at the bottom of the container window. In an application, these allow the user to dynamically change the number of rows and columns used to display the images, by dragging an extra splitter into position. The size of the cells can also be modified by moving existing splitters.

While the user drags the splitter using the left mouse button, an inverted line appears showing the new position. If the user clicks the right mouse button while dragging the splitter, this will cancel the dragging.

The maximum number of rows allowed is 4. The maximum number of columns is 8. If the image viewer contains the maximum number of rows, the extra splitter at the bottom of the image viewer will disappear. Likewise, if the image viewer contains the maximum number of columns, the extra splitter to the right of the image viewer will disappear.

When the container created by this function is no longer needed, free the container and any associated memory by calling LImageViewer::Destroy. For every call to LImageViewer::Create there must be a call to LImageViewer::Destroy.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::GetWindowHandle, LImageViewer::Destroy, LImageViewer::SetProperties, LImageViewer::GetProperties, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

#define RECT_HEIGHT(lpRect) ((lpRect)->bottom - (lpRect)->top)
#define SELECT_FONT(hDC, hFont) ((HFONT) SelectObject((hDC), (HGDIOBJ)(HFONT)(hFont)))
class LImageViewerChild :public LImageViewer
{
L_INT ActionCallBack(HBITMAPLIST L_FAR * phBitmapList,
L_UINT uCount,
L_INT nAction,
L_UINT uMessage,
WPARAM wParam,
POINT L_FAR * ptMousePos);

virtual L_INT TagCallBack(L_INT nCellIndex,
HDC hDC,
RECT L_FAR * lpRect);
} ;
L_INT LImageViewerChild::TagCallBack(L_INT nCellIndex, HDC hDC, RECT L_FAR * lpRect)
{
if (nCellIndex == 0)
{
// draw an overlay with italic font
static LOGFONT lf;
HFONT hFont, hOldFont;
lf.lfHeight = RECT_HEIGHT(lpRect);
lf.lfItalic = TRUE;
wsprintf(lf.lfFaceName, TEXT("Times new Roman\0"));
SetTextAlign(hDC, TA_BOTTOM | TA_RIGHT);
SetTextColor(hDC, RGB(255, 255, 255));
hFont = CreateFontIndirect(&lf);
hOldFont = SELECT_FONT(hDC, hFont);
TextOut(hDC, lpRect->right, lpRect->bottom, TEXT("Owner Text"), 10);
}
return TRUE;
}

L_INT LImageViewerChild::ActionCallBack(HBITMAPLIST L_FAR * phBitmapList, L_UINT uCount,
L_INT nAction, L_UINT uMessage, WPARAM wParam,
POINT L_FAR * ptMousePos)
{
L_INT nRet = 0 ;
L_UINT uRow = 0 ;
switch(uMessage)
{
case WM_LBUTTONDOWN:
{
// The user clicks the left button so the container scroll bar will scroll one step down
nRet = GetFirstVisibleRow(&uRow, 0);
nRet = SetFirstVisibleRow(uRow + 1, 0);
}
break;

case WM_RBUTTONDOWN:
{
// The user clicks the right button so the container scroll bar will scroll one step up.
nRet = GetFirstVisibleRow(&uRow, 0);
nRet = SetFirstVisibleRow(uRow - 1, 0);
}
break;
}
return TRUE;
}
// This function will create a container, add cells with image lists, and add some tags.
// Then the function will add some actions to the container.
void CreateContainerExample(CWnd* pwndParent, LImageViewerChild& ImageViewer)
{
DISPCONTAINERPROPERTIES DispContainerProp;
DISPCELLPROPERTIES DispCellProp;
RECT rcRect;
L_INT nRet;
L_INT nCellIndex;

// Create a container equal in size to its parent window.
pwndParent->GetClientRect(&rcRect);

ImageViewer.Create(pwndParent->GetSafeHwnd(), &rcRect, 0);

ImageViewer.EnableActionCallBack(TRUE) ;
ImageViewer.EnableTagCallBack(TRUE) ;

// load a bitmap list.
nRet = BitmapList.Load(TEXT("Image1.dic"), 0, ORDER_BGRORGRAY);

// if the image is corrupted or not found the program will destroy the container and terminate
if (nRet != SUCCESS)
{
ImageViewer.Destroy(FALSE, 0);
return;
}

// Insert a new cell at the end of the container cell queue.
nCellIndex = ImageViewer.InsertCell(-1, 0);

// Attach the loaded bitmaplist to the newly inserted cell.
nRet = ImageViewer.SetCellBitmapList(nCellIndex, BitmapList.GetHandle(),TRUE,0);

// Add some tags to the cell
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_TOPLEFT , 0, ("Image1 Text 1"), 0);
ImageViewer.SetCellTag(nCellIndex, 1, DISPWIN_ALIGN_TOPLEFT , 0, ("Image1 Text 2"), 0);
ImageViewer.SetCellTag(nCellIndex, 2, DISPWIN_ALIGN_TOPLEFT , 0, ("Image1 Text 3"), 0);
ImageViewer.SetCellTag(nCellIndex, 3, DISPWIN_ALIGN_TOPLEFT , 0, ("Image1 Text 4"), 0);
ImageViewer.SetCellTag(nCellIndex, 1, DISPWIN_ALIGN_LEFTCENTER , 0, ("L"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_BOTTOMLEFT , 0, ("Image1 Text 5"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_TOPCENTER , 0, ("Top"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_BOTTOMCENTER, 0, ("Bottom"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_TOPRIGHT , 0, ("Image1 Text 6"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_RIGHTCENTER , 0, ("R"), 0);
ImageViewer.SetCellTag(nCellIndex, 8, DISPWIN_ALIGN_TOPLEFT , DISPWIN_TYPE_FRAME, NULL, 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_BOTTOMRIGHT , DISPWIN_TYPE_OWNERDRAW, NULL, 0);

BitmapList.SetHandle(NULL,NULL,FALSE);

// load another bitmap list
nRet = BitmapList.Load(TEXT("Image2.dic"), 0, ORDER_BGRORGRAY);

// insert a new cell at the end of the container queue.
nCellIndex = ImageViewer.InsertCell(-1, 0);

// Attach the loaded bitmap list to the newly inserted cell.
nRet = ImageViewer.SetCellBitmapList(nCellIndex, BitmapList.GetHandle(),TRUE,0);

// Add some tags to the cell
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_TOPLEFT , 0, ("Image3 Text 1"), 0);
ImageViewer.SetCellTag(nCellIndex, 2, DISPWIN_ALIGN_TOPLEFT , 0, ("Image3 Text 2"), 0);
ImageViewer.SetCellTag(nCellIndex, 4, DISPWIN_ALIGN_TOPLEFT , 0, ("Image3 Text 3"), 0);
ImageViewer.SetCellTag(nCellIndex, 6, DISPWIN_ALIGN_TOPLEFT , 0, ("Image3 Text 4"), 0);
ImageViewer.SetCellTag(nCellIndex, 1, DISPWIN_ALIGN_LEFTCENTER , 0, ("Image3 Text 5"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_BOTTOMLEFT , 0, ("Image3 Text 6"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_TOPCENTER , 0, ("Image3 Text 7"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_BOTTOMCENTER, 0, ("Image3 Text 8"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_TOPRIGHT , 0, ("Image3 Text 9"), 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_RIGHTCENTER , 0, ("R"), 0);
ImageViewer.SetCellTag(nCellIndex, 7, DISPWIN_ALIGN_TOPLEFT , DISPWIN_TYPE_SCALE, NULL, 0);
ImageViewer.SetCellTag(nCellIndex, 0, DISPWIN_ALIGN_BOTTOMRIGHT, DISPWIN_TYPE_OWNERDRAW, NULL, 0);

// Change the number of rows and columns to show all the inserted cells.
DispContainerProp.uStructSize = sizeof(DISPCONTAINERPROPERTIES);
DispContainerProp.uNumCols = 2;
DispContainerProp.uNumRows = 1;
DispContainerProp.uMask = DCPF_NUMROWS | DCPF_NUMCOLS;
ImageViewer.SetProperties(&DispContainerProp, 0);

// Change the number of sub-rows and sub-columns.
DispCellProp.uStructSize = sizeof(DISPCELLPROPERTIES);
DispCellProp.uNumCols = 3;
DispCellProp.uNumRows = 3;
ImageViewer.SetCellProperties(0, &DispCellProp, 0);

BitmapList.SetHandle(NULL,NULL,FALSE);

// Add some actions to the container.
ImageViewer.AddAction(110, 0);
ImageViewer.SetAction(110, CONTAINER_MOUSE_BUTTON_LEFT, DCACTION_ACTIVEONLY);
ImageViewer.SetAction(110, CONTAINER_MOUSE_BUTTON_RIGHT, DCACTION_ACTIVEONLY);
}


LImageViewer::Destroy

#include "ltwrappr.h"

L_INT LImageViewer::Destroy (bCleanImages, uFlags);

L_BOOL bCleanImages; | /* flag */
L_UINT uFlags; | /* reserved for future use */

Destroys the container and its cells. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
bCleanImages | Flag that indicates whether to free the image(s) attached to each cell of the container. Possible values are:
 | Value | Meaning
 | TRUE | Free the image(s) attached to each cell.
 | FALSE | Do not free the image(s) attached to each cell.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. To get extended error information, call GetLastError, and refer to Return Codes.

Comments

When the container created by the LImageViewer::Create function is no longer needed, call this function to destroy the container and free the associated memory. For every call to LImageViewer::Create there must be a call to LImageViewer::Destroy.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::GetWindowHandle, LImageViewer::SetProperties LImageViewer::GetProperties, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

For an example, refer to LImageViewer::Create.


LImageViewer::FreezeCell

#include "ltwrappr.h"

L_INT LImageViewer::FreezeCell (nCellIndex, bFreeze, uFlags);

L_INT nCellIndex; | /* index of the cell */
L_BOOL bFreeze | /* flag*/
L_UINT uFlags; | /* reserved for future use */

Freezes or un-freezes the specified cell. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell to freeze or un-freeze.
bFreeze | Flag that indicates whether to freeze or unfreeze the specified cell. Possible values are:
 | Value | Meaning
 | TRUE | Freeze the specified cell. No further container actions can be applied to this cell while it is frozen.
 | FALSE | Un-freeze the specified cell. Actions associated with the container can be applied to the specified cell.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Freezing a cell means that no actions using the mouse or the keyboard can be performed on the cell. Some cell properties can still be changed manually however using LImageViewer::SetCellProperties, LImageViewer::SelectCell and LImageViewer::SetProperties. For more information on actions associated with a container, refer to Applying Actions.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::RepositionCell, LImageViewer::GetCellPosition, LImageViewer::SetCellBitmapList, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::GetCellCount.


LImageViewer::GetActionCount

#include "ltwrappr.h"

L_INT LImageViewer::GetActionCount (pnCount, uFlags);

L_INT L_FAR * pnCount; | /* pointer to the variable to be updated */
L_UINT uFlags; | /* reserved for future use */

Gets the number of actions associated with the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
pnCount | Pointer to a variable to be updated with number of actions associated with the container.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Call LImageViewer::AddAction to add an action to a container and call LImageViewer::RemoveAction to remove an action from the container.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::AddAction, LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

// Remove the actions and remove all the cells and the bitmap lists attached.
void GetActionCountExample(LImageViewer& ImageViewer)
{
L_INT uCount;
L_UINT nRet = 0 ;

// Check if there is any action added to the container.
nRet = ImageViewer.GetActionCount(&uCount, 0);

// Remove all the actions.
if (uCount != 0)
nRet = ImageViewer.RemoveAction(-1, 0);

// Check if there is any cell inserted to the container.
uCount = ImageViewer.GetCellCount(0);

// Remove all the cells, along with the attached images.
if (uCount != 0)
nRet = ImageViewer.RemoveCell(-1, TRUE, 0);
}


LImageViewer::GetActionProperties

#include "ltwrappr.h"

L_INT LImageViewer::GetActionProperties (nAction, nCellIndex, nSubCellIndex, pActionProperties, uFlags);

L_INT nAction; | /* action ID */
L_INT nCellIndex; | /* index of a cell */
L_INT nSubCellIndex; | /* index into the image list attached to the cell */
LONG pActionProperties ; | /* pointer to a structure */
L_UINT uFlags ; | /* reserved for future use */

Gets the current properties of a specific action. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nAction | Value that specifies the action for which to get the properties. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it should be one of these predefined actions.
 | Value | Meaning
 | CONTAINER_ACTION_WINDOWLEVEL | [1] Window leveling
 | CONTAINER_ACTION_SCALE | [2] Scaling
 | CONTAINER_ACTION_OFFSET | [3] Offset
 | CONTAINER_ACTION_STACK | [4] Stacking
 | CONTAINER_ACTION_MAG | [5] Magnifying glass
 | CONTAINER_ACTION_ALPHA | [6] Alpha
nCellIndex | A zero-based index of the cell for which to get the action properties. This parameter is only valid when CONTAINER_ACTION_CELLLEVEL is set in uFlags. If uFlags contains CONTAINER_ACTION_CONTAINERLEVEL, this parameter is ignored.
nSubCellIndex | A zero-based index into the image list attached to the cell specified in nCellIndex. This parameter is only valid when CONTAINER_ACTION_CELLLEVEL is set in uFlags. If uFlags contains CONTAINER_ACTION_CONTAINERLEVEL, this parameter is ignored.
pActionProperties | Pointer to a structure to be updated with the action properties. The type of structure pointed to depends on the action specified in the nAction parameter.
 | If nAction contains: | then pActionProperties points to this structure:
 | CONTAINER_ACTION_WINDOWLEVEL | DISPWLEVELACTIONPROPS
 | CONTAINER_ACTION_SCALE | DISPSCALEACTIONPROPS
 | CONTAINER_ACTION_OFFSET | DISPOFFSETACTIONPROPS
 | CONTAINER_ACTION_STACK | DISPSTACKACTIONPROPS
 | CONTAINER_ACTION_MAG | DISPMAGACTIONPROPS
 | CONTAINER_ACTION_ALPHA | DISPALPHAACTIONPROPS
 | Owner Action | DISPOWNERACTIONPROPS
uFlags | Flag that determines which properties to get. Possible values are:
 | Value | Meaning
 | CONTAINER_ACTION_CONTAINERLEVEL | [0x00000000] Get the general properties.
 | CONTAINER_ACTION_CELLLEVEL | [0x00000001] Get the specific properties.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Each of the structures that may be pointed to by pActionProperties contains a member that is a DISPCONTAINERACTIONPROPS structure. Each of these structures also contains one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered may be "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties". For example, if this function is called to get the scale action properties, a variable of type DISPSCALEACTIONPROPS should be declared. Pass a pointer to this structure for the pActionProperties parameter. To get only the general properties, set uFlags to CONTAINER_ACTION_CONTAINERLEVEL. To get the specific properties, set uFlags to CONTAINER_ACTION_CELLLEVEL.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::AddAction, LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::RemoveAction, LImageViewer::GetActionCount, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::Create.


LImageViewer::GetBounds

#include "ltwrappr.h"

L_INT LImageViewer::GetBounds (lpRect, uFlags);

RECT L_FAR * lpRect; | /* pointer to a structure */
L_UINT uFlags; | /* reserved for future use */

Gets the bounding rectangle for the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
lpRect | A pointer to a RECT structure to be updated with the bounding rectangle of the container.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The coordinates of lpRect are relative to the parent window coordinates. If the container window has no parent, the coordinates will be relative to the screen coordinates.

To set the bounding rectangle for the container, call LImageViewer::SetBounds.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::SetBounds, LImageViewer::SetProperties, LImageViewer::GetProperties, LImageViewer::GetWindowHandle, LImageViewer::Destroy, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

#define RECT_HEIGHT(lpRect) ((lpRect)->bottom - (lpRect)->top)
#define RECT_WIDTH(lpRect) ((lpRect)->right - (lpRect)->left)
// This function determines whether the container's client area is different from its parent's.
void GetBoundsExample(LImageViewer& ImageViewer)
{
RECT rcRect;
RECT rcParentRect;
CWnd* pwndParent;
CWnd wndContainer ;
L_INT nRet = 0 ;

// Get the container's bonding rectangle.
nRet = ImageViewer.GetBounds(&rcRect, 0);

nRet = wndContainer.Attach(ImageViewer.GetWindowHandle(0)) ;
// Get the container window's parent
pwndParent = wndContainer.GetParent();

// if the container has no parent then abort.
if (pwndParent == NULL)
return;

pwndParent->GetClientRect(&rcParentRect);

// check if the container's client area is different from the parent's client area.
if ((RECT_WIDTH(&rcRect) != RECT_WIDTH(&rcParentRect)) || (RECT_HEIGHT(&rcRect) != RECT_HEIGHT(&rcParentRect)))
nRet = ImageViewer.SetBounds(&rcParentRect, 0);

wndContainer.Detach() ;
}


LImageViewer::GetCellBitmapList

#include "ltwrappr.h"

L_INT LImageViewer::GetCellBitmapList (nCellIndex, hBitmapList, uFlags);

L_INT nCellIndex; | /* index of the cell */
HBITMAPLIST L_FAR * phBitmapList; | /* pointer to a variable to be updated */
L_UINT uFlags; | /* reserved for future use */

Gets the bitmap list attached to the specified cell. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to get the bitmap list.
phBitmapList | Pointer to the variable to be updated with the cell's bitmap list.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If the cell at the specified index has no image, phBitmapList will be NULL.

Call LImageViewer::SetCellBitmapList to set the bitmap list for a cell.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::RepositionCell, LImageViewer::GetCellPosition, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

// This function removes the specified cell without removing its image list.
void GetCellBitmaplistExample(LImageViewer& ImageViewer)
{
HBITMAPLIST hBitmapList;
L_INT nCellIndex = 0 ;
L_INT nRet = 0 ;
L_INT nCount = ImageViewer.GetCellCount(0);

// Check the validity of the cell index
if ((nCellIndex < 0) || (nCellIndex >= nCount))
return;

// retrieve the bitmap list.
nRet = ImageViewer.GetCellBitmapList(nCellIndex, &hBitmapList, 0);

// remove the cell
nRet = ImageViewer.RemoveCell(nCellIndex, FALSE, 0);
}


LImageViewer::GetCellBounds

#include "ltwrappr.h"

L_INT LImageViewer::GetCellBounds (nCellIndex, lpRect, uFlags);

L_INT nCellIndex; | /* index of the cell */
RECT L_FAR * lpRect; | /* pointer to a structure */
L_UINT uFlags; | /* reserved for future use */

Gets the bounding rectangle for the cell. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to get the bitmap list.
lpRect | Pointer to a RECT structure to be updated with the bounding rectangle of the cell. The values in the structure are measured in pixels and are relative to the container coordinates.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::RepositionCell, LImageViewer::GetCellPosition, LImageViewer::SetCellBitmapList, LImageViewer::GetCellBitmapList, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::GetWindowHandle.


LImageViewer::GetCellPosition

#include "ltwrappr.h"

L_INT LImageViewer::GetCellPosition (nCellIndex, puRow, puCol, uFlags);

L_INT nCellIndex; | /* index of a cell */
L_UINT L_FAR * puRow; | /* pointer to a variable to be updated */
L_UINT L_FAR * puCol; | /* pointer to a variable to be updated */
L_UINT uFlags; | /* reserved for future use */

Retrieves the column and row number for the cell with the specified index. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to get the position.
PuRow | Pointer to a variable to be updated with the vertical position (row) of the specified cell. Row numbering starts with 1.
puCol | Pointer to a variable to be updated with the horizontal position (column) of the specified cell. Column numbering starts with 1.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. To get extended error information, call GetLastError, and refer to Return Codes.

Comments

The row and column numbers obtained by this function are relative to the first cell in the container.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

// This function scrolls down or up in order to make the cell become visible
void GetCellPositionExample(LImageViewer& ImageViewer)
{
L_INT nCellIndex = 0 ;
L_INT nCount;
L_UINT uRow;
L_UINT uCol;
L_UINT nRet;
DISPCONTAINERPROPERTIES DispContainerProp;

// Get Cells Count
nCount = ImageViewer.GetCellCount(0);

if ((nCellIndex < 0) || (nCellIndex >= nCount))
return;

// get the row count of the container
DispContainerProp.uStructSize = sizeof(DISPCONTAINERPROPERTIES);
DispContainerProp.uMask = DCPF_NUMROWS;
nRet = ImageViewer.GetProperties(&DispContainerProp, 0);

// get the row and the col position
nRet = ImageViewer.GetCellPosition(nCellIndex, &uRow, &uCol, 0);

nRet = ImageViewer.SetFirstVisibleRow(max(0, ((L_INT)uRow - (L_INT)DispContainerProp.uNumRows + 1)), 0);
}


LImageViewer::GetCellProperties

#include "ltwrappr.h"

L_INT LImageViewer::GetCellProperties (nCellIndex, pCellProperties, uFlags);

L_INT nCellIndex; | /* index of a cell */
pDISPCELLPROPERTIES pCellProperties; | /* pointer to a cell options structure */
L_UINT uFlags; | /* reserved for future use */

Gets the current properties of the specified cell. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
NCellIndex | A zero-based index of the cell for which to get the properties.
pCellProperties | Pointer to a DISPCELLPROPERTIES structure to be updated with the current cell properties.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. To get extended error information, call GetLastError, and refer to Return Codes.

Comments

Before calling LImageViewer::GetCellProperties,

Declare a variable of type DISPCELLPROPERTIES.

Set DISPCELLPROPERTIES.uStructSize to sizeof(DISPCELLPROPERTIES)

Set DISPCELLPROPERTIES.uMask to indicate the properties to update with current values

Pass a pointer to the DISPCELLPROPERTIES structure to LImageViewer::GetCellProperties as the pCellProperties parameter.

To set new cell properties, call LImageViewer::SetCellProperties.

For more information on the available properties that can be used to control the behavior of the cell, refer to the DISPCELLPROPERTIES structure.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SetBounds, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::Create.


LImageViewer::GetCellCount

#include "ltwrappr.h"

L_INT LImageViewer::GetCellCount (uFlags);

L_UINT uFlags;

/* reserved for future use */

Returns the number of cells managed by the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
uFlags | Reserved for future use. Must be zero.

Returns

>= 0 | The number of cells managed by the container.
< 0 | An error occurred. Refer to Return Codes.

Comments

To add cells to the container, call LImageViewer::InsertCell. To remove one or more cells from the container, call LImageViewer::RemoveCell.

Please note that the maximum number of rows that a container can have is 4 and the maximum number of columns is 8. However, the number of cells that can be added to a container is limited only by the available memory.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::InsertCell, LImageViewer::RemoveCell, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

// This procedure unfreezes any frozen cell
void GetCellCountExample(LImageViewer& ImageViewer)
{
L_INT nRet = 0 ;
// Get the cells count.
L_INT nCount = ImageViewer.GetCellCount(0);

// if there is a Freezed cell make it unfreezed and vice versa
for (L_INT nI = 0; nI < nCount; nI++)
nRet = ImageViewer.FreezeCell(nI, !(ImageViewer.IsCellFrozen(nI, 0)), 0);
}


LImageViewer::GetCellWindowHandle

#include "ltwrappr.h"

HWND LImageViewer::GetCellWindowHandle (nCellIndex,uFlags);

L_INT nCellIndex; | /* index of the cell to remove*/
L_UINT uFlags; | /* reserved for future use */

Returns the window handle for the specified cell. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to get the window handle.
uFlags | Reserved for future use. Must be zero.

Returns

>0 | Handle to the cell window
NULL | An error occurred. To get extended error information, call GetLastError. And then refer to Return Codes.

Comments

Once you get the window handle for the cell, it’s best not to change the size of the window. Changing the size of the window may result in unexpected behavior.

When a cell is inserted into a container, the cell's window is created automatically.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SetBounds, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::GetWindowHandle.


LImageViewer::GetFirstVisibleRow

#include "ltwrappr.h"

L_INT LImageViewer::GetFirstVisibleRow (puRow, uFlags);

L_UINT L_FAR * puRow; | /* pointer to a variable to be updated */
L_UINT uFlags; | /* reserved for future use */

Gets the row number of the first visible row of cells in the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
puRow | Pointer to a variable to be updated with the number of the first visible row of cells in the container. Row numbering starts with the value 1 and is relative to the top of the container.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To set the first visible row in the container, call LImageViewer::SetFirstVisibleRow.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::GetCellCount, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::RepositionCell, LImageViewer::GetCellPosition, LImageViewer::GetCellBounds, LImageViewer::SetBounds, LImageViewer::SetFirstVisibleRow, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

For an example, refer to LImageViewer::Create.


LImageViewer::GetKeyboardAction

#include "ltwrappr.h"

L_INT LImageViewer::GetKeyboardAction (nAction, nMouseDirection, puVk, puModifiers, uFlags);

L_INT nAction; | /* action ID */
L_INT nMouseDirection; | /* mouse direction */
L_UINT L_FAR *puVk; | /* pointer to a variable to be updated */
L_UINT L_FAR * puModifiers; | /* pointer to a variable to be updated */
L_UINT uFlags; | /* reserved for future use */

Gets the keystroke combinations for a specific action. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nAction | Value that represents the action for which to get the keystroke combination. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it should be one of these predefined actions:
 | Value | Meaning
 | CONTAINER_ACTION_WINDOWLEVEL | [1] Window leveling
 | CONTAINER_ACTION_SCALE | [2] Scaling
 | CONTAINER_ACTION_OFFSET | [3] Offset
 | CONTAINER_ACTION_STACK | [4] Stacking
 | CONTAINER_ACTION_MAG | [5] Magnifying glass
 | CONTAINER_ACTION_ALPHA | [6] Alpha
nMouseDirection | Value that represents the mouse direction for which to get the assigned keystroke. Possible values are:
 | Value | Meaning
 | CONTAINER_MOUSEMOVE_UP | [0x00000000] Mouse moving up.
 | CONTAINER_MOUSEMOVE_DOWN | [0x00000001] Mouse moving down.
 | CONTAINER_MOUSEMOVE_LEFT | [0x00000002] Mouse moving left.
 | CONTAINER_MOUSEMOVE_RIGHT | [0x00000003] Mouse moving right.
puVK | Pointer to a variable to be updated with the virtual key code. These are the virtual key codes used by the Microsoft Windows CE operating system. For more information refer to: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/virtualkeycodes.asp.
puModifiers | Pointer to a variable to be updated with the modifier key(s). Possible values are:
 | Value | Meaning
 | CONTAINER_KEY_NONE | [0x00000000] No other key should be pressed.
 | CONTAINER_KEY_SHIFT | [0x00000001] Left or right Shift key must be pressed.
 | CONTAINER_KEY_CTRL | [0x00000002] Left or right Control key must be pressed.
 | CONTAINER_KEY_ALT | [0x00000004] Left or right ALT key must be pressed.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To set the keystroke combination for a specific action, call LImageViewer::SetKeyboardAction.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::AddAction, LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::GetActionCount, LImageViewer::SetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::RemoveAction.


LImageViewer::GetProperties

#include "ltwrappr.h"

L_INT LImageViewer::GetProperties (pDispContainerProp, uFlags);

pDISPCONTAINERPROPERTIES pDispContainerProp; | /* pointer to a container options structure */
L_UINT uFlags; | /* reserved for future use */

Gets the current properties of the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
pDispContainerProp | Pointer to a DISPCONTAINERPROPERTIES options structure to be updated with the current properties used to control the behavior of the container.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. To get extended error information, call GetLastError, and refer to Return Codes.

Comments

Before calling LImageViewer::GetProperties,

Declare a variable of type DISPCONTAINERPROPERTIES.

Set DISPCONTAINERPROPERTIES.uStructSize to sizeof(DISPCONTAINERPROPERTIES)

Set DISPCONTAINERPROPERTIES.uMask to indicate the properties to update with current values

Pass a pointer to the DISPCONTAINERPROPERTIES structure to LImageViewer::GetProperties as the pDispContainerProp parameter.

To set new container properties, call LImageViewer::SetProperties.

For more information on the available properties that can be used to control the behavior of the container, refer to the DISPCONTAINERPROPERTIES structure.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::Destroy, LImageViewer::SetProperties, LImageViewer::GetWindowHandle, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

// This function will give all the cells in the container the same size by resting the position of the cells' splitters, which might have been moved by the user.
void GetPropertiesExample(LImageViewer& ImageViewer)
{
DISPCONTAINERPROPERTIES DispContainerProp;
DispContainerProp.uStructSize = sizeof(DISPCONTAINERPROPERTIES);
DispContainerProp.uMask = DCPF_NUMCOLS | DCPF_NUMROWS;

// Call this function in order to retrieve the rows and columns count.
ImageViewer.GetProperties(&DispContainerProp, 0);
ImageViewer.SetProperties(&DispContainerProp, 0);
}


LImageViewer::GetWindowHandle

#include "ltwrappr.h"

HWND LImageViewer::GetWindowHandle (uFlags);

L_UINT uFlags;

/* reserved for future use */

Returns a handle to the specified container window. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
uFlags | Reserved for future use. Must be zero.

Returns

> 0 | Handle to the container window.
NULL | An error occurred. To get extended error information, call GetLastError, and refer to Return Codes.

Comments

This function gets a handle to the container's window.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Destroy, LImageViewer::SetProperties, LImageViewer::GetProperties, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

// This function returns the bounding rect that specifies the absolute position of the cell.
void GetWindowHandleExample(LImageViewer& ImageViewer, L_INT nCellIndex, RECT L_FAR * lpRect)
{
RECT rcRect1, rcRect2 ;
POINT pt ;
CWnd wndContainer, wndCell ;
int nRet = 0 ;

// Check whether the cell index is valid or not.
L_INT nCount = ImageViewer.GetCellCount(0);
if (nCellIndex < 0 || nCellIndex >= nCount)
{
MessageBox(NULL, TEXT("cell index is not valid!"), NULL, MB_OK) ;
return ;
}

// Get the cell's bounding rectangle,
//the coordinates are relative to the upper left corner of the container window.
nRet = ImageViewer.GetCellBounds(nCellIndex, &rcRect1, 0);
pt.x = rcRect1.left;
pt.y = rcRect1.top;

// Get the container window handle.
nRet = wndContainer.Attach(ImageViewer.GetWindowHandle(0));
wndContainer.ClientToScreen(&pt);

// Get the window handle of the cell
nRet = wndCell.Attach(ImageViewer.GetCellWindowHandle(nCellIndex, 0));

// Get the client rect for the cell.
wndCell.GetClientRect(&rcRect2);

OffsetRect(&rcRect2, pt.x, pt.y);
CopyRect(lpRect, &rcRect2);

wndContainer.Detach() ;
wndCell.Detach() ;
}


LImageViewer::InsertCell

#include "ltwrappr.h"

L_INT LImageViewer::InsertCell (nCellIndex, uFlags);

L_INT nCellIndex; | /* insertion index */
L_UINT uFlags; | /* reserved for future use */

Adds a new empty cell to the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | Zero-based index that specifies where to place the new cell. Pass –1 or a number greater than the cell count to append the cell to the end of the current cell list.
uFlags | Reserved for future use. Must be zero.

Returns

>= 0 | The index of the new cell.
< 0 | An error occurred. Refer to Return Codes.

Comments

When the user passes –1 or a number greater than the cells count in nCellIndex, the function will append the container with the new cell. Otherwise all the cells starting from nCellIndex will be shifted to the right one block in order to add the new cell.

The newly inserted cell will be empty. To add a bitmap list to it, use the function LImageViewer::SetCellBitmapList.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::Create.


LImageViewer::IsActionActive

#include "ltwrappr.h"

L_BOOL LImageViewer::IsActionActive (nAction, uFlags);

L_INT nAction; | /* action ID */
L_UINT uFlags; | /* reserved for future use */

Returns a value that indicates whether the specific action has been added to the container (using the function LImageViewer::AddAction). This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nAction | Value that represents the action for which to get the activation status. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it should be one of these predefined actions:
 | Value | Meaning
 | CONTAINER_ACTION_WINDOWLEVEL | [1] Window leveling
 | CONTAINER_ACTION_SCALE | [2] Scaling
 | CONTAINER_ACTION_OFFSET | [3] Offset
 | CONTAINER_ACTION_STACK | [4] Stacking
 | CONTAINER_ACTION_MAG | [5] Magnifying glass
 | CONTAINER_ACTION_ALPHA | [6] Alpha
uFlags | Reserved for future use. Must be zero.

Returns

TRUE | The action is active. It has been assigned to a mouse button.
FALSE | The action is not active, or an error occurred. To get extended error information, call GetLastError.

Comments

To add an action to the image viewer control, call LImageViewer::SetAction.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::GetActionCount, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::EnableActionCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::RemoveAction.


LImageViewer::IsCellFrozen

#include "ltwrappr.h"

L_BOOL LImageViewer::IsCellFrozen (nCellIndex, uFlags);

L_INT nCellIndex; | /* index of the cell */
L_UINT uFlags; | /* reserved for future use */

Returns a value that indicates whether the specified cell is frozen. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to determine the freeze status.
uFlags | Reserved for future use. Must be zero.

Returns

TRUE | The cell is frozen.
FALSE | The cell is not frozen, or an error occurred. To get extended error information, call GetLastError.

Comments

To freeze or un-freeze a cell, call LImageViewer::FreezeCell.

When a cell is frozen no actions using the mouse or the keyboard can be performed on the cell. Some cell properties can still be changed manually however, using LImageViewer::SetCellProperties, LImageViewer::SelectCell and LImageViewer::SetProperties. For more information on actions associated with a container, refer to Applying Actions.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::Create, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::InsertCell, LImageViewer::RemoveCell, LImageViewer::GetCellProperties, LImageViewer::RepositionCell, LImageViewer::GetCellPosition, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

// This procedure unfreezes any frozen cell
void IsCellFrozenExample(LImageViewer& ImageViewer)
{
// Get the cells count.
L_INT nCount = ImageViewer.GetCellCount(0);
L_INT nI;
L_INT nRet = 0 ;

// if there is a Frozen cell, make it unFrozen and vice versa
for (nI = 0; nI < nCount; nI++)
nRet = ImageViewer.FreezeCell(nI, !ImageViewer.IsCellFrozen(nI, 0), 0);
}


LImageViewer::IsCellSelected

#include "ltwrappr.h"

L_BOOL LImageViewer::IsCellSelected (nCellIndex, uFlags);

L_INT nCellIndex; | /* index of the cell */
L_UINT uFlags; | /* reserved for future use */

Determines whether the cell is selected. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to get the selection status.
uFlags | Reserved for future use. Pass 0.

Returns

TRUE | The cell is selected.
FALSE | The cell is not selected.

Comments

The user must be aware that if this function returns FALSE, either the cell is not selected or an error occurred.

To change the selection status of a specific cell, call LImageViewer::SelectCell.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::InsertCell, LImageViewer::RemoveCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::IsCellFrozen, LImageViewer::SelectCell, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::SelectCell.


LImageViewer::RemoveAction

#include "ltwrappr.h"

L_INT LImageViewer::RemoveAction (nAction, uFlags);

L_INT nAction; | /* action ID */
L_UINT uFlags; | /* reserved for future use */

Removes the specified action from the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nAction | Value that represents the action to be removed. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it should be one of these predefined actions.
 | Value | Meaning
 | CONTAINER_ACTION_WINDOWLEVEL | [1] Window leveling
 | CONTAINER_ACTION_SCALE | [2] Scaling
 | CONTAINER_ACTION_OFFSET | [3] Offset
 | CONTAINER_ACTION_STACK | [4] Stacking
 | CONTAINER_ACTION_MAG | [5] Magnifying glass
 | CONTAINER_ACTION_ALPHA | [6] Alpha
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

When an action is removed from a container, all properties, mouse buttons, and keystroke combinations are also removed.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::AddAction, LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::GetActionCount, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

// This function checks whether the action is active or not, if not the function will remove it.
void RemoveActionExample(LImageViewer& ImageViewer)
{
L_INT nRet;
L_BOOL bActive;
L_INT nAction = CONTAINER_ACTION_OFFSET;
L_UINT uVk1, uVk2, uVk3, uVk4, uModifiers;

// Is the action attached to one of the mouse buttons.
bActive = ImageViewer.IsActionActive( nAction , 0);
if (!bActive)
{
// Check whether a keyboard shortcut is assigned to action or not.
nRet = ImageViewer.GetKeyboardAction(nAction , CONTAINER_MOUSEMOVE_DOWN, &uVk1, &uModifiers, 0);
nRet = ImageViewer.GetKeyboardAction(nAction , CONTAINER_MOUSEMOVE_DOWN, &uVk2, &uModifiers, 0);
nRet = ImageViewer.GetKeyboardAction(nAction , CONTAINER_MOUSEMOVE_DOWN, &uVk3, &uModifiers, 0);
nRet = ImageViewer.GetKeyboardAction(nAction , CONTAINER_MOUSEMOVE_DOWN, &uVk4, &uModifiers, 0);

// If there is no keyboard shortcut assigned to the action the function will remove it.
if ((!uVk1) && (!uVk2) && (!uVk3) && (!uVk4))
nRet = ImageViewer.RemoveAction(nAction , 0);
}
}


LImageViewer::RemoveCell

#include "ltwrappr.h"

L_INT LImageViewer::RemoveCell (nCellIndex, bCleanImages,uFlags);

L_INT nCellIndex; | /* index of the cell to remove*/
L_BOOL bCleanImages | /* flag */
L_UINT uFlags; | /* reserved for future use */

Removes a cell from the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | The zero-based index of the cell to remove. Pass –1 to remove all cells. Removing the cell will not remove the attached image. The value in the bCleanImage parameter determines whether the image(s) associated with the removed cell are also freed.
bCleanImage | Flag that indicates whether to free the image(s) attached to the cell. Possible values are:
 | Value | Meaning
 | TRUE | Free any images attached to the cell specified in the nCellIndex parameter.
 | FALSE | Do not free any images attached to the cell specified in the nCellIndex parameter. If the images are not removed, they will take up memory until the application ends.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

When a cell is removed from the image viewer, any cells to the right or below the removed cell will be automatically shifted to the left, or up, to the end of the preceding row, as needed.

To insert a new cell, call LImageViewer::InsertCell.

When the container itself is no longer needed, the LImageViewer::Destroy function will destroy any cells within the container, any associated bitmaps, and any internal data.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, LImageViewer::Destroy, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::Create.


LImageViewer::RepositionCell

#include "ltwrappr.h"

L_INT LImageViewer::RepositionCell (nCellIndex, nTargetCellIndex, uFlags);

L_INT nCellIndex; | /* index of a cell */
L_INT nTargetCellIndex; | /* the new index of the cell */
L_UINT uFlags; | /* reserved for future use */

Sets the position of the specified cell, based on the index of the cell. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to set the position.
nTargetCellIndex | A zero-based index of the new cell position.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. To get extended error information, call GetLastError, and refer to Return Codes.

Comments

The row and column numbers obtained by this function are relative to the first cell in the container.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetWindowHandle, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SetBounds, LImageViewer::SelectCell, LImageViewer::IsCellSelected, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

// This function shuffle the order of the cells
void RepositionCellExample(LImageViewer& ImageViewer)
{
L_INT nI, nCount;

// Get Cells Count
nCount = ImageViewer.GetCellCount(0) ;

srand((L_INT)GetCurrentTime());

// shuffles all the cells
for (nI = 0; nI < nCount; nI++)
L_INT nRet = ImageViewer.RepositionCell(nI, (rand() % nCount), 0);
}


LImageViewer::SelectCell

#include "ltwrappr.h"

L_INT LImageViewer::SelectCell (nCellIndex, bSelect, uFlags);

L_INT nCellIndex; | /* index of the cell */
L_BOOL bSelect; | /* flag*/
L_UINT uFlags; | /* reserved for future use */

Selects or deselects the cell at the specified index. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to set the selection status. Pass –1 to select or deselect all cells managed by the container.
bSelect | Flag that indicates whether to select or deselect the cell at the specified index. Possible values are:
 | Value | Meaning
 | TRUE | Select the cell at the specified index.
 | FALSE | Deselect the cell at the specified index.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::InsertCell, LImageViewer::RemoveCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::IsCellFrozen, LImageViewer::IsCellSelected, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

// This procedure inverses the selection
void SelectCellExample(LImageViewer& ImageViewer)
{
// Get the cells count
L_INT nCount = ImageViewer.GetCellCount(0);
L_INT nI;
L_INT nRet = 0 ;

// if there is a selected cell make it unselected and vice versa
for (nI = 0; nI < nCount; nI++)
ImageViewer.SelectCell(nI, !ImageViewer.IsCellSelected(nI, 0), 0);
}


LImageViewer::SetAction

#include "ltwrappr.h"

L_INT LImageViewer::SetAction (nAction, nMouseButton, uFlags);

L_INT nAction; | /* action to set */
L_INT nMouseButton; | /* mouse button indicator */
L_UINT uFlags; | /* flag */

Specifies the action for each one of the mouse buttons. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nAction | Value that indicates the action to associate with the specified mouse button. If nAction is equal or greater than 100 then it’s a user-defined action. Otherwise it should be one of these predefined actions.
 | Value | Meaning
 | CONTAINER_ACTION_WINDOWLEVEL | [1] Window leveling
 | CONTAINER_ACTION_SCALE | [2] Scaling
 | CONTAINER_ACTION_OFFSET | [3] Offset
 | CONTAINER_ACTION_STACK | [4] Stacking
 | CONTAINER_ACTION_MAG | [5] Magnifying glass
 | CONTAINER_ACTION_ALPHA | [6] Alpha
nMouseButton | Value that indicates the mouse event to be associated with the specified action. Possible values are:
 | Value | Meaning
 | CONTAINER_MOUSE_BUTTON_NONE | [0x000] No button is attached.
 | CONTAINER_MOUSE_BUTTON_LEFT | [0x001] Left mouse button.
 | CONTAINER_MOUSE_BUTTON_RIGHT | [0x002] Right mouse button.
 | CONTAINER_MOUSE_BUTTON_MIDDLE | [0x003] Middle mouse button.
 | CONTAINER_MOUSE_WHEEL | [0x004] Mouse wheel.
 | CONTAINER_MOUSE_BUTTON_XBUTTON1 | [0x005] X button 1.
 | CONTAINER_MOUSE_BUTTON_XBUTTON2 | [0x006] X button 2.
uFlags | Flags that indicate the cells to which the action is applied and when the action is applied. The following flags indicate the cells to which the action is applied:
 | Value | Meaning
 | DCACTION_ACTIVEONLY | [0x0000] Apply the effect on the active cell window only.
 | DCACTION_ALLCELLS | [0x0001] Apply the effect on all the cells.
 | DCACTION_SELECTED | [0x0002] Apply the effect on the selected cells only.
 | The following flags indicate when the action is applied:
 | DCACTION_REALTIME | [0x0000] Apply the action during the mouse movement. This option is only valid if either DCACTION_ALLCELLS or DCACTION_SELECTED is also set.
 | DCACTION_ONRELEASE | [0x0001] Apply the action after releasing the mouse button. This option is only valid if either DCACTION_ALLCELLS or DCACTION_SELECTED is also set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

An action must be added to a container before it can be assigned to a mouse button. To add an action to a container call LImageViewer::AddAction.

If an action is set to a mouse button that is already used by another action, the new action will overwrite the old one.

Actions can also be associated with keystroke combinations. To assign an action to a keystroke combination, call LImageViewer::SetKeyboardAction.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::AddAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::GetActionCount, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::Create.


LImageViewer::SetActionProperties

#include "ltwrappr.h"

L_INT LImageViewer::SetActionProperties (nAction, nCellIndex, nSubCellIndex, pActionProperties, uFlags);

L_INT nAction; | /* action ID */
L_INT nCellIndex; | /* index of the affected cell */
L_INT nSubCellIndex; | /* index into the image list attached to the cell */
LONG pActionProperties; | /* pointer to a structure */
L_UINT uFlags; | /* type of properties */

Sets the properties of a specific action. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nAction | Value that represents the actions for which to set the properties. If nAction is equal to or greater than 100 it is a user-defined action. Otherwise, it should be one of these predefined actions.
 | Value | Meaning
 | CONTAINER_ACTION_WINDOWLEVEL | [1] Window leveling
 | CONTAINER_ACTION_SCALE | [2] Scaling
 | CONTAINER_ACTION_OFFSET | [3] Offset
 | CONTAINER_ACTION_STACK | [4] Stacking
 | CONTAINER_ACTION_MAG | [5] Magnifying glass
 | CONTAINER_ACTION_ALPHA | [6] Alpha
nCellIndex | A zero-based index of the cell for which to set the action properties. This parameter is only valid when CONTAINER_ACTION_CELLLEVEL is set in uFlags. If uFlags contains CONTAINER_ACTION_CONTAINERLEVEL, this parameter is ignored.
nSubCellIndex | A zero-based index into the image list attached to the cell specified in nCellIndex. This parameter is only valid when CONTAINER_ACTION_CELLLEVEL is set in uFlags. If uFlags contains CONTAINER_ACTION_CONTAINERLEVEL, this parameter is ignored.
pActionProperties | Pointer to a structure that contains the properties to set. The type of structure pointed to depends on the action specified in the nAction parameter.
 | If nAction contains: | then pActionProperties points to this structure:
 | CONTAINER_ACTION_WINDOWLEVEL | DISPWLEVELACTIONPROPS
 | CONTAINER_ACTION_SCALE | DISPSCALEACTIONPROPS
 | CONTAINER_ACTION_OFFSET | DISPOFFSETACTIONPROPS
 | CONTAINER_ACTION_STACK | DISPSTACKACTIONPROPS
 | CONTAINER_ACTION_MAG | DISPMAGACTIONPROPS
 | CONTAINER_ACTION_ALPHA | DISPALPHAACTIONPROPS
 | Owner Action | DISPOWNERACTIONPROPS
uFlags | Flag that determines which properties to set. Possible values are:
 | Value | Meaning
 | CONTAINER_ACTION_CONTAINERLEVEL | [0x00000000] Set the general properties.
 | CONTAINER_ACTION_CELLLEVEL | [0x00000001] Set the specific properties.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Each of the structures that may be pointed to by pActionProperties contains a member that is a DISPCONTAINERACTIONPROPS structure. Each of these structures also contains one or more other members. The DISPCONTAINERACTIONPROPS structure contains "general properties" that are common to all actions. The other members of the structures are considered may be "general properties" or "specific properties", depending on whether they are applied at the container level or the cell level. Those members that are applied at the container level are also considered "general properties". Members that are applied at the cell level or the sub-cell level are considered "specific properties". For example, if this function is called to set the scale action properties, a variable of type DISPSCALEACTIONPROPS should be declared and the members of that structure set to the desired values. Pass a pointer to this structure for the pActionProperties parameter. To set only the general properties, set uFlags to CONTAINER_ACTION_CONTAINERLEVEL. To set the specific properties, set uFlags to CONTAINER_ACTION_CELLLEVEL.

If this function is not called before applying the action to the container/cell, the default values are used. For more information on these default values, refer to the structures associated with each action.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::AddAction, LImageViewer::SetAction, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::GetActionCount, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::Create.


LImageViewer::SetBounds

#include "ltwrappr.h"

L_INT LImageViewer::SetBounds (lpRect, uFlags);

RECT L_FAR * lpRect; | /* pointer to a structure */
L_UINT uFlags; | /* reserved for future use */

Sets the bounding rectangle for the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
lpRect | Pointer to a RECT structure that contains the bounding rectangle to set for the container. This bounding rectangle is relative to the upper left corner of the parent window’s client area.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The coordinates of lpRect are relative to the parent window coordinates. If the container window has no parent, the coordinates will be relative to the screen coordinates.

Call LImageViewer::GetBounds to get the current bounding rectangle for the container.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::GetBounds, LImageViewer::SetProperties, LImageViewer::GetProperties, LImageViewer::GetWindowHandle, LImageViewer::Destroy, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

void ResizeContainerExample( CWnd* pParent, LImageViewer& ImageViewer)
{
// When the user resizes the container parent window,
// the container window will be resized to fit the new size of the parent client area.
RECT rcRect;
pParent->GetClientRect(&rcRect);
ImageViewer.SetBounds(&rcRect, 0);
}


LImageViewer::SetCellBitmapList

#include "ltwrappr.h"

L_INT LImageViewer::SetCellBitmapList (nCellIndex, hBitmapList, bCleanImages,uFlags);

L_INT nCellIndex; | /* index of the cell */
HBITMAPLIST hBitmapList | /* handle to the list of bitmaps */
L_BOOL bCleanImages | /* flag */
L_UINT uFlags; | /* reserved for future use */

Attaches a bitmap list to the cell at the specified index. This function is available only in the Medical Imaging Suite toolkits.

Parameter

Description

nCellIndex

A zero-based index of the cell to which to attach the bitmap list specified in hBitmapList.

hBitmapList

Handle to the list of bitmaps, which will be attached to the cell at the index specified in nCellIndex. Pass NULL to remove the current bitmap list.

Removing the current bitmap list will not free the attached image(s). The value in the bCleanImage parameter determines whether the image(s) associated with the removed bitmap list are also freed.

bCleanImage

Flag that specifies whether to free the bitmap list that was previously attached on the cell. Possible values are:

Value

Meaning

TRUE

Free the bitmap list that was previously attached to the cell.

FALSE

Do not free the bitmap list that was previously attached to the cell.

uFlags

Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

It is best not to modify an existing bitmap list attached to a specific cell. However, if it is necessary to modify an attached bitmap list, follow the steps below:

1. | Get the bitmap list using the function LImageViewer::GetCellBitmapList .
2. | Call LImageViewer::SetCellBitmapList with hBitmapList set to NULL and bCleanImage set to FALSE.
3. | Modify the bitmap list as needed.
4. | Reattach the bitmap using LImageViewer::SetCellBitmapList.

If the cell already has a bitmap list and you call this function with hBitmapList set to another valid list of bitmaps and bCleanImage set to TRUE, this function frees the current attached list and attaches the new list to the cell.

If the cell already has a bitmap list and you call this function with hBitmapList set to another valid list of bitmaps and bCleanImage set to FALSE, this function will just overwrite the current list of bitmap with the new list of bitmaps. and the current list will just take up memory until the application ends.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellTag, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::Create.


LImageViewer::SetCellProperties

#include "ltwrappr.h"

L_INT LImageViewer::SetCellProperties (nCellIndex, pCellProperties, uFlags);

L_INT nCellIndex; | /* index of a cell */
pDISPCELLPROPERTIES pCellProperties; | /* pointer to a cell options structure */
L_UINT uFlags; | /* reserved for future use */

Sets the properties for the specified cell. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | A zero-based index of the cell for which to set the properties. Pass -1 to modify the properties of all cells managed by the container.
pCellProperties | Pointer to the DISPCELLPROPERTIES structure that contains the cell properties to set.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. To get extended error information, call GetLastError, and refer to Return Codes.

Comments

Before calling LImageViewer::SetCellProperties:

Declare a variable of type DISPCELLPROPERTIES.

Set DISPCELLPROPERTIES.uStructSize to sizeof(DISPCELLPROPERTIES)

Set DISPCELLPROPERTIES.uMask to indicate the properties to set (that is, which members of the structure contain valid information)

Specify the new property values in the appropriate members.

Pass a pointer to the DISPCELLPROPERTIES structure to LImageViewer::SetCellProperties as the pCellProperties parameter.

To get the current properties set for a cell, call LImageViewer::GetCellProperties.

For more information on the actual properties that can be set, refer to the DISPCELLPROPERTIES structure.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellTag, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::Create.


LImageViewer::SetCellTag

#include "ltwrappr.h"

L_INT LImageViewer::SetCellTag (nCellIndex, uRow, uAlign, uType, pString, uFlags);

L_INT nCellIndex; | /* index of the cell */
L_UINT uRow; | /* row index */
L_UINT uAlign; | /* flag */
L_UINT uType; | /* tag type */
L_UCHAR L_FAR * pString; | /* string containing a custom tag */
L_UINT uFlags; | /* reserved for future use */

Sets a tag on a specific location in a specific cell. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nCellIndex | Index of the cell in which to place the tag. Pass –1 to set the tag in all cells in the container.
uRow | The number of rows to count before placing the tag. The maximum number of rows and columns that a cell can have is 4 X 8.
uAlign | Value that specifies the origin point from which to count the rows specified in the uRow parameter. For example, if uAlign is DISPWIN_ALIGN_BOTTOMLEFT and uRow is 4, the application will count 4 rows from the bottom and place the tag on that location. Possible values are:
 | Value | Meaning
 | DISPWIN_ALIGN_TOPLEFT | [0x0000] Start counting rows from the top of the cell. The tag will be left justified.
 | DISPWIN_ALIGN_LEFTCENTER | [0x0001] The tag is placed in the center, based on the height of the cell, and is left justified.
 | DISPWIN_ALIGN_BOTTOMLEFT | [0x0002] Start counting rows from the bottom of the cell. The tag will be left justified.
 | DISPWIN_ALIGN_TOPCENTER | [0x0003] The tag is placed in the center, based on the width of the cell, and is top justified.
 | DISPWIN_ALIGN_BOTTOMCENTER | [0x0004] The tag is placed in the center, based on the width of the cell, and is bottom justified.
 | DISPWIN_ALIGN_TOPRIGHT | [0x0005] Start counting rows from the top of the cell. The tag will be right justified.
 | DISPWIN_ALIGN_RIGHTCENTER | [0x0006] The tag is placed in the center, based on the height of the cell, and is right justified.
 | DISPWIN_ALIGN_BOTTOMRIGHT | [0x0007] Start counting rows from the bottom of the cell. The tag will be right justified.
uType | Value that represents the type of tag to be added. Possible values are:
 | Value | Meaning
 | DISPWIN_TYPE_USERDATA | [0x0000] User data tag
 | DISPWIN_TYPE_SCALE | [0x0001] Scale tag
 | DISPWIN_TYPE_WLCENTERWIDTH | [0x0002] Window level tag
 | DISPWIN_TYPE_FIELDOFVIEW | [0x0003] Field of view tag
 | DISPWIN_TYPE_OWNERDRAW | [0x0004] Owner draw tag
 | DISPWIN_TYPE_FRAME | [0x0004] Frame tag.
pString | String containing a custom tag. This parameter is only used if uType is set to DISPWIN_TYPE_USERDATA.
uFlags | Reserved for future use.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If two tags are written to the same location, the second tag written will overwrite the first tag.

To change the quality of the tag text, call LImageViewer::SetProperties .

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::RemoveCell, LImageViewer::InsertCell, LImageViewer::GetCellCount, LImageViewer::GetCellWindowHandle, LImageViewer::SetCellBitmapList, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::GetCellPosition, LImageViewer::RepositionCell, LImageViewer::GetCellBitmapList, LImageViewer::GetCellBounds, LImageViewer::FreezeCell, LImageViewer::SelectCell, LImageViewer::IsCellSelected, LImageViewer::IsCellFrozen, Class Members
Topics: | Image Viewer Cells
 | Window Control/Image Viewer Functions: Image Viewer Cells

Example

For an example, refer to LImageViewer::Create.


LImageViewer::SetFirstVisibleRow

#include "ltwrappr.h"

L_INT LImageViewer::SetFirstVisibleRow (uRow, uFlags);

L_UINT uRow; | /* new first visible row index */
L_UINT uFlags; | /* reserved for future use */

Sets the first visible row of cells in the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
uRow | Index of the row to set as the first visible row in the container. Row numbering is with respect to the top of the container.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is useless if the number of cells in the container is less than the number of rows in the container times the number of columns in the container. To determine the number of cells in the container, call LImageViewer::GetCellCount.

The number of rows and columns in the container can be altered programmatically by calling LImageViewer::SetProperties. The number of rows and columns in the container can be altered dynamically by adding or removing splitters.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::GetCellCount, LImageViewer::SetCellProperties, LImageViewer::GetCellProperties, LImageViewer::RepositionCell, LImageViewer::GetCellPosition, LImageViewer::GetCellBounds, LImageViewer::SetBounds, LImageViewer::GetFirstVisibleRow, LImageViewer::GetBounds, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

For an example, refer to LImageViewer::Create.


LImageViewer::SetKeyboardAction

#include "ltwrappr.h"

L_INT LImageViewer::SetKeyboardAction (nAction, nButton, uKey, uFlags);

L_INT nAction; | /* action ID */
L_INT nButton; | /* mouse direction */
L_UINT uKey; | /* virtual key which will be attach to the mouse direction */
L_UINT uFlags; | /* flag */

Assigns a keystroke to a particular action and a particular mouse movement. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
nAction | Value that represents the action assigned to the keystroke. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it should be one of these predefined actions.
 | Value | Meaning
 | CONTAINER_ACTION_WINDOWLEVEL | [1] Window leveling
 | CONTAINER_ACTION_SCALE | [2] Scaling
 | CONTAINER_ACTION_OFFSET | [3] Offset
 | CONTAINER_ACTION_STACK | [4] Stacking
 | CONTAINER_ACTION_MAG | [5] Magnifying glass
 | CONTAINER_ACTION_ALPHA | [6] Alpha
nButton | Value that represents the mouse direction assigned to the keystroke. Possible values are:
 | Value | Meaning
 | CONTAINER_MOUSEMOVE_UP | [0x00000000] Mouse moving up.
 | CONTAINER_MOUSEMOVE_DOWN | [0x00000001] Mouse moving down.
 | CONTAINER_MOUSEMOVE_LEFT | [0x00000002] Mouse moving left.
 | CONTAINER_MOUSEMOVE_RIGHT | [0x00000003] Mouse moving right.
uKey | Value that represents the virtual key to be set. These are the virtual key codes used by the Microsoft Windows operating system. For more information refer to: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/virtualkeycodes.asp.
uFlags | Flag that indicates which key should be pressed with the key specified in uKey. Possible values are:
 | Value | Meaning
 | CONTAINER_KEY_NONE | [0x00000000] No other key should be pressed.
 | CONTAINER_KEY_SHIFT | [0x00000001] Left or right Shift key must be pressed.
 | CONTAINER_KEY_CTRL | [0x00000002] Left or right Control key must be pressed.
 | CONTAINER_KEY_ALT | [0x00000004] Left or right ALT key must be pressed.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If an action is set to a keystroke combination that is already used by another action, the new action will overwrite the old one.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::AddAction, LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::GetActionCount, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members
Topics: | Applying Actions
 | Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::Create.


LImageViewer::SetProperties

#include "ltwrappr.h"

L_INT LImageViewer::SetProperties (pDispContainerProp, uFlags);

pDISPCONTAINERPROPERTIES pDispContainerProp; | /* pointer to a container options structure */
L_UINT uFlags; | /* reserved for future use */

Sets the properties of the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter | Description
pDispContainerProp | Pointer to a DISPCONTAINERPROPERTIES structure that contains the options for controlling the behavior of the container.
uFlags | Reserved for future use. Must be zero.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. To get extended error information, call GetLastError, and refer to Return Codes.

Comments

This function automatically updates the container window, so the user does not have to redraw the window.

Before calling LImageViewer::SetProperties:

Declare a variable of type DISPCONTAINERPROPERTIES .

Set DISPCONTAINERPROPERTIES.uStructSize to sizeof(DISPCONTAINERPROPERTIES)

Set DISPCONTAINERPROPERTIES.uMask to indicate the properties to set (that is, which members of the structure contain valid information)

Specify the new property values in the appropriate members.

Pass a pointer to the DISPCONTAINERPROPERTIES structure to LimageViewer::SetProperties as the pDispContainerProp parameter.

To get the current properties set for a container, call LImageViewer::GetProperties.

For more information on the actual properties that can be set, refer to the DISPCONTAINERPROPERTIES structure.

If this function is not called before using the container, the following default container properties are used. For information on these default values, refer to DISPCONTAINERPROPERTIES structure.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LImageViewer::Create, LImageViewer::Destroy, LImageViewer::GetProperties, LImageViewer::GetWindowHandle, Class Members
Topics: | Using the Image Viewer
 | Window Control/Image Viewer Functions: Using the Image Viewer

Example

For an example, refer to LImageViewer::Create.


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 LSettings::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 .


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.


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 a new WinHelp session to review the License Agreements governing your use of the software.

Click this button to start a new WinHelp session to review the full line of LEADTOOLS Products.

Click this button to start a new WinHelp session to review the full line of LEADTOOLS Image Categories.


Classes

The following class is provided by the LEADTOOLS Medical Image Viewer Class Library:

LImageViewer