LImageViewerCell::AnnotationCreatedCallBack

Summary

This callback function is called every time the user creates on an annotation object.

Syntax

#include "ltwrappr.h"

virtual L_INT LImageViewerCell::AnnotationCreatedCallBack(nCellIndex, nSubCellIndex, uAnnotationType)

Parameters

L_INT nCellIndex

A zero-based index of the cell that contains the annotation object.

L_INT nSubCellIndex

A zero-based index of the sub-cell that contains that annotation object.

L_UINT uAnnotationType

Flag that determines the type of the currently selected annotation object. Possible values are:

Value Meaning
ANNOBJECT_TEXT [15] Text annotation object.
ANNOBJECT_RECT [12] Rectangle annotation object.
ANNOBJECT_ELLIPSE [4] Ellipse annotation object.
ANNOBJECT_HILITE [6] Highlight annotation object.
ANNOBJECT_PROTRACTOR [20] Protractor annotation object.
ANNOBJECT_RULER [17] Ruler annotation object.

Returns

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

Comments

In order to use this callback function, it must first be set by calling the LImageViewerCell::EnableAnnotationCreatedCallBack 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_INT AnnotationCreatedCallBack(L_INT    nCellIndex, 
                                           L_INT    nSubCellIndex, 
                                           L_UINT   uAnnotationType); 
}; 
#endif 
 
L_INT LImageViewerChild::AnnotationCreatedCallBack(L_INT    nCellIndex, 
                                L_INT    nSubCellIndex, 
                                L_UINT   uAnnotationType) 
{ 
   UNREFERENCED_PARAMETER(nCellIndex); 
   switch(uAnnotationType) 
   { 
   case ANNOBJECT_RECT: 
   case ANNOBJECT_ELLIPSE: 
   case ANNOBJECT_HILITE: 
      AnnToRgn(nSubCellIndex, L_RGN_OR, TRUE, 0); 
      break; 
   } 
 
   return SUCCESS; 
} 
 
L_INT LImageViewer_AnnotationCreatedCallbacksExample(LImageViewerCell& ImageViewerCell) 
{ 
   ImageViewerCell.EnableAnnotationCreatedCallBack(TRUE); 
 
   return SUCCESS; 
} 

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

LEADTOOLS Medical Image Viewer C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.