LImageViewerCell::BuiltInTagCallBack

#include "ltwrappr.h"

virtual L_TCHAR * LImageViewerCell::BuiltInTagCallBack(hCellWnd, nSubCellIndex, uTagType, pString);

This callback is called before printing any built-in tag text.

Parameters

HWND hCellWnd

A handle to the window that represents the Medical Viewer Cell.

L_INT nSubCellIndex

A zero-based index of the sub-cell. This sub-cell contains the image that contains the region changed. Pass -2 to refer to the selected sub-cell.

L_UINT uTagType

The built-in tag that is about to be printed on the cell/sub-cell. Possible values are:

Value Meaning
DISPWIN_TYPE_SCALE [1] Scale tag.
DISPWIN_TYPE_WLCENTERWIDTH [2] Window level tag.
DISPWIN_TYPE_FIELDOFVIEW [3] Field of view tag.
DISPWIN_TYPE_OWNERDRAW [4] Owner draw tag.
DISPWIN_TYPE_FRAME [5] Frame tag.
DISPWIN_TYPE_RULERUNIT [6] The ruler unit.
DISPWIN_TYPE_LEFTORIENTATION [7] Reserved for future.
DISPWIN_TYPE_RIGHTORIENTATION [8] Reserved for future.
DISPWIN_TYPE_TOPORIENTATION [9] Reserved for future.
DISPWIN_TYPE_BOTTOMORIENTATION [10] Reserved for future.
DISPWIN_TYPE_OFFSET [11] Image Offset tag.
DISPWIN_TYPE_ALPHA [12] Alpha value tag.

L_TCHAR * pString

A string containing the built-in tag text, the user can update this value to display instead.

Returns

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

Comments

This callback is called before printing any built-in tag text.

To enable or disable the callback function for built-tags of the cell, call the LImageViewerCell::EnableBuiltInTagCallBack function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example converts the annotation object (rectangle, ellipse and hilite) into a region once the user draws them.

#ifdef LImageViewerChild  
class LImageViewerChild :public LImageViewerCell 
{ 
   virtual L_TCHAR * BuiltInTagCallBack(L_HWND hCellWnd, 
                                    L_INT nSubCellIndex, 
                                    L_UINT      uTagType, 
                                    L_TCHAR *      pString); 
}; 
#endif 
 
 
LImageViewerCell * gImageViewerCell; 
 
L_TCHAR * szOutput = NULL; 
L_TCHAR * LImageViewerChild::BuiltInTagCallBack(L_HWND hCellWnd, 
                                    L_INT nSubCellIndex, 
                                    L_UINT      uTagType, 
                                    L_TCHAR *      pString) 
{ 
   UNREFERENCED_PARAMETER(nSubCellIndex); 
   UNREFERENCED_PARAMETER(hCellWnd); 
 
   if (uTagType == DISPWIN_TYPE_SCALE) 
   { 
      L_DOUBLE dScale; 
      gImageViewerCell->GetCellScale(0, &dScale, 0); 
      //L_DispContainerGetCellScale(hCellWnd, nSubCellIndex, &dScale, 0); 
 
      if (szOutput == NULL) 
         szOutput = (L_TCHAR *)malloc(sizeof(L_TCHAR) * 100); 
 
       
      wsprintf(szOutput, TEXT("Scale Value is = %f4"), dScale); 
      return szOutput; 
   } 
   else 
      return pString; 
} 
 
L_INT LImageViewer_BuiltInTagCallBackExample(LImageViewerCell& ImageViewerCell) 
{ 
   gImageViewerCell = &ImageViewerCell; 
   ImageViewerCell.EnableBuiltInTagCallBack(TRUE); 
 
   return SUCCESS; 
} 

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

LEADTOOLS Medical Image Viewer C++ Class Library Help