LImageViewerCell::FlipAnnotationContainer

#include "ltwrappr.h"

L_INT LImageViewerCell::FlipAnnotationContainer(nSubCellIndex, uFlags)

Flips the annotation container.

Parameters

L_INT nSubCellIndex

A zero-based index into the image list attached to the cell. This sub-cell contains the image that contains the annotation container. Pass -2 to refer to the selected sub-cell.

L_UINT uFlags

Reserved for future use. Pass 0.

Returns

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

Comments

This function only flips the annotation container. It does not flip the image itself.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will flip the image along with the annotation container if the user click on the image using the left mouse button, and will reserve on the right mouse button, and will rotate on the middle mouse button.

class LImageViewerChild3 :public LImageViewerCell 
{ 
   virtual L_INT MouseCallBack(L_UINT                 uMessage, 
                                 pDISPCONTAINERCELLINFO pCellInfo); 
}; 
 
L_INT LImageViewerChild3::MouseCallBack(L_UINT                 uMessage, 
                                       pDISPCONTAINERCELLINFO pCellInfo) 
{ 
   UNREFERENCED_PARAMETER(pCellInfo); 
   BITMAPHANDLE Bitmap; 
   LBitmap BitmapHandle; 
   pBITMAPHANDLE pBitmap; 
 
   switch(uMessage) 
   { 
   case WM_LBUTTONUP: 
      { 
         GetBitmapHandle(pCellInfo->nSubCellIndex, &Bitmap, 0); 
         BitmapHandle.SetHandle(&Bitmap); 
         BitmapHandle.Flip(); 
         pBitmap = BitmapHandle.GetHandle(); 
         SetBitmapHandle(pCellInfo->nSubCellIndex, pBitmap, TRUE, 0); 
         BitmapHandle.SetHandle(NULL, FALSE); 
         FlipAnnotationContainer(pCellInfo->nSubCellIndex, 0); 
      } 
      break; 
   case WM_MBUTTONUP: 
         GetBitmapHandle(pCellInfo->nSubCellIndex, &Bitmap, 0); 
         BitmapHandle.SetHandle(&Bitmap); 
         BitmapHandle.Reverse(); 
         pBitmap = BitmapHandle.GetHandle(); 
         SetBitmapHandle(pCellInfo->nSubCellIndex, pBitmap, TRUE, 0); 
         BitmapHandle.SetHandle(NULL, FALSE); 
         ReverseAnnotationContainer(pCellInfo->nSubCellIndex, 0); 
      break; 
   case WM_RBUTTONUP: 
         L_INT    nAngle; 
         RotateBitmapPerspective(pCellInfo->nSubCellIndex, 90, 0); 
         GetRotateBitmapPerspectiveAngle(pCellInfo->nSubCellIndex, &nAngle, 0); 
         RotateAnnotationContainer(pCellInfo->nSubCellIndex, nAngle, 0); 
      break; 
   } 
 
   return SUCCESS; 
} 
 
L_INT LImageViewer_FlipAnnotationContainerExample(LImageViewerCell& ImageViewerCell) 
{ 
   ImageViewerCell.EnableMouseCallBack(TRUE); 
 
   return SUCCESS; 
} 

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

LEADTOOLS Medical Image Viewer C++ Class Library Help