Available in LEADTOOLS Medical Imaging toolkits. |
LImageViewer::FlipAnnotationContainer
#include "ltwrappr.h"
L_INT LImageViewer::FlipAnnotationContainer(nCellIndex, nSubCellIndex, uFlags)
L_INT nCellIndex; |
/* index of the cell */ |
L_INT nSubCellIndex; |
/* index into the image list attached to the cell */ |
L_UINT uFlags; |
/* reserved for future */ |
Flips the annotation container.
Parameter |
Description |
nCellIndex |
A zero-based index of the cell to flip its annotation container. Pass -1 to flip the annotation container of all the cells in the container. Pass -2 to flip the annotation container of all the selected cells. |
nSubCellIndex |
A zero-based index into the image list attached to the cell specified in nCellIndex. This sub-cell contains the image that contains the annotation container. Pass -2 to refer to the selected sub-cell. |
uFlags |
Reserved for future use. Pass 0. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function only flips the annotation container. It doesn't flip the image itself.
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
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 reservse on the right mouse button, and will rotate on the middle mouse button.
class LImageViewerChild3 :public LImageViewer { 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->nCellIndex, pCellInfo->nSubCellIndex, &Bitmap, 0); BitmapHandle.SetHandle(&Bitmap); BitmapHandle.Flip(); pBitmap = BitmapHandle.GetHandle(); SetBitmapHandle( pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, pBitmap, TRUE, 0); BitmapHandle.SetHandle(NULL, FALSE); FlipAnnotationContainer( pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, 0); } break; case WM_MBUTTONUP: GetBitmapHandle( pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, &Bitmap, 0); BitmapHandle.SetHandle(&Bitmap); BitmapHandle.Reverse(); pBitmap = BitmapHandle.GetHandle(); SetBitmapHandle( pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, pBitmap, TRUE, 0); BitmapHandle.SetHandle(NULL, FALSE); ReverseAnnotationContainer( pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, 0); break; case WM_RBUTTONUP: L_INT nAngle; RotateBitmapPerspective( pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, 90, 0); GetRotateBitmapPerspectiveAngle( pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, &nAngle, 0); RotateAnnotationContainer( pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, nAngle, 0); break; } return SUCCESS; } L_INT LImageViewer_FlipAnnotationContainerExample(LImageViewer& ImageViewer) { ImageViewer.EnableMouseCallBack(TRUE); return SUCCESS; }