#include "ltwrappr.h"
virtual L_TCHAR * LImageViewerCell::BuiltInTagCallBack(hCellWnd, nSubCellIndex, uTagType, pString);
HWND hCellWnd; |
handle to the cell window |
L_INT nSubCellIndex; |
index of the sub-cell |
L_UINT uTagType; |
built-in tag type |
L_TCHAR * pString; |
string containing the built-in tag text |
This callback is called before printing any built-in tag text.
| Parameter | Description | |
| hCellWnd | A handle to the window that represents the Medical Viewer Cell. | |
| 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. | |
| 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. | |
| pString | A string containing the built-in tag text, the user can update this value to display instead. | |
| SUCCESS | The function was successful. |
| 1 | An error occurred. Refer to Return Codes. |
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
| 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. |
This example converts the annotation object (rectangle, ellipse and hilite) into a region once the user draws them.
#ifdef LImageViewerChildclass LImageViewerChild :public LImageViewerCell{virtual L_TCHAR * BuiltInTagCallBack(L_HWND hCellWnd,L_INT nSubCellIndex,L_UINT uTagType,L_TCHAR * pString);};#endifLImageViewerCell * 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;}elsereturn pString;}L_INT LImageViewer_BuiltInTagCallBackExample(LImageViewerCell& ImageViewerCell){gImageViewerCell = &ImageViewerCell;ImageViewerCell.EnableBuiltInTagCallBack(TRUE);return SUCCESS;}