Available in LEADTOOLS Medical Imaging toolkits. |
LImageViewerCell::UpdateCellView
#include "ltwrappr.h"
L_INT LImageViewerCell::UpdateCellView(uFlags)
L_UINT uFlags; |
/* reserved for future use */ |
Recalculates the cell's internal values in order to update the view according to the new change made on the image.
Parameter |
Description |
uFlags |
Reserved for future use. Pass 0. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function is useful when the user applies a certain effect on the cell image that causes the image dimensions to change.
This function will also repaint the cell. To repaint the cell only with recalculated internal data, use the LImageViewerCell::RepaintCell function.
To stop repainting while applying a series of effects without refreshing each time an effect is applied, use the function LImageViewerCell::BeginUpdate to stop the cell from repainting, and then use the function LImageViewerCell::BeginUpdate to repaint everything.
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 resizes the first frame of the first cell.
#if defined LTV17_CONFIG L_INT LImageViewer_UpdateCellViewExample(LImageViewerCell& ImageViewerCell) { L_INT nRet; BITMAPHANDLE Bitmap; LBitmap BitmapHandle; nRet = ImageViewerCell.GetBitmapHandle(0, &Bitmap, 0); if (nRet != SUCCESS) return nRet; BitmapHandle.SetHandle(&Bitmap); BitmapHandle.Size(BitmapHandle.GetWidth() * 2, BitmapHandle.GetHeight(), SIZE_BICUBIC); pBITMAPHANDLE pBitmap = BitmapHandle.GetHandle(); ImageViewerCell.SetBitmapHandle(0, pBitmap, TRUE, 0); BitmapHandle.SetHandle(0, 0); ImageViewerCell.UpdateCellView(0); return SUCCESS; } #else L_INT ImageViewer_UpdateCellViewExample(LImageViewer& ImageViewer) { L_INT nRet; BITMAPHANDLE Bitmap; LBitmap BitmapHandle; nRet = ImageViewer.GetBitmapHandle( 0, 0, &Bitmap, 0); if (nRet != SUCCESS) return nRet; BitmapHandle.SetHandle(&Bitmap); BitmapHandle.Size(BitmapHandle.GetWidth() * 2, BitmapHandle.GetHeight(), SIZE_BICUBIC); pBITMAPHANDLE pBitmap = BitmapHandle.GetHandle(); ImageViewer.SetBitmapHandle( 0, 0, pBitmap, TRUE, 0); BitmapHandle.SetHandle(0, 0); ImageViewer.UpdateCellView( 0, 0, 0); return SUCCESS; } #endif // LTV17_CONFIG