LImageViewerCell::SelectCell

Summary

Selects or deselects the cell at the specified index.

Syntax

#include "ltwrappr.h"

L_INT LImageViewerCell::SelectCell (bSelect, uFlags);

Parameters

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

L_UINT uFlags

Flags that determine whether to apply the feature on the one cell only, or more than one cell. This value can only be used when the cell is attached to the LImageViewer through the function LImageViewer::InsertCell. Possible values are:

Value Meaning
CELL_APPLYTOTHIS [0x00000000] Apply the feature to this cell only.
CELL_APPLYTOALL [0x10000000] Apply the feature to all the cells in the Image Viewer.
CELL_APPLYTOSELECTED [0x20000000] Apply the feature to the selected cells in the Image Viewer.

Returns

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

Required DLLs and Libraries

See Also

Functions

Topics

Example

The following example toggles the selection state:

L_INT LImageViewer_SelectCellExample(LImageViewer& ImageViewer)  
{ 
   // Get the cell count 
 
   L_INT nCount = ImageViewer.GetCellCount(0);  
   L_INT nI;  
   L_INT nRet = 0 ;  
   LImageViewerCell * imageViewerCell; 
 
   // if there is a selected cell, make it unselected and vice versa 
 
   for (nI = 0; nI < nCount; nI++) 
   { 
      imageViewerCell = ImageViewer.GetCellHandle(nI, 0); 
      nRet = imageViewerCell->SelectCell(!imageViewerCell->IsCellSelected(0), 0);  
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   return SUCCESS; 
} 

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Medical Image Viewer C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.