LImageViewerCell::RemoveCobbAngle

#include "ltwrappr.h"

L_INT LImageViewerCell::RemoveCobbAngle(nSubCellIndex, hAttachedLine);

Removes the cobb-angle value using one of the two lines that is used to create the cobb angle.

Parameters

L_INT nSubCellIndex

A zero-based index into the image list attached to the cell specified in nCellIndex. This sub-cell is the one where that the cobb-angle is placed. Pass -2 to refer to the selected sub-cell. If the cell contains 1 frame then the nSubCellIndex should be 0.

HANNOBJECT hAttachedLine

Reserved for future use. Pass 0.

Returns

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

Comments

To create a cobb angle, add two lines to the sub-cell / cell, then pass them to the function LImageViewerCell::AddCobbAngle.

To get the cobb angle value, use the function LImageViewerCell::GetCobbAngleValue.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example adds a cobb angle then removes it.

L_INT nRemoveCounter; 
 
L_INT CALLBACK FindLines(HANNOBJECT hObject, L_VOID * pUserData) 
{ 
   pHANNOBJECT hLinesObjects = (pHANNOBJECT)pUserData; 
   L_UINT      uType; 
 
   L_AnnGetType(hObject, &uType); 
   if (uType == ANNOBJECT_LINE) 
   { 
      hLinesObjects[nRemoveCounter] = hObject; 
      nRemoveCounter++; 
   } 
 
   return SUCCESS; 
} 
 
 
L_INT LImageViewerCell_RemoveCobbAngleValueExample(LImageViewerCell& ImageViewerCell) 
{ 
   HANNOBJECT hAnnContainer; 
 
   ImageViewerCell.GetAnnotationContainer(-2, &hAnnContainer, 0); 
 
   HANNOBJECT hLinesObjects[256]; 
   memset(hLinesObjects, 0, sizeof(HANNOBJECT) * 256); 
   nRemoveCounter = 0; 
 
   L_AnnEnumerate(hAnnContainer, FindLines, hLinesObjects, ANNFLAG_RECURSE, NULL); 
 
   if (nRemoveCounter < 2) 
   { 
      MessageBox(NULL, TEXT("You have to have two lines on the cell to create the cobb angle"), TEXT("Error"), MB_OK); 
      return 0; 
   } 
 
   ImageViewerCell.AddCobbAngle(0, hLinesObjects[nRemoveCounter - 1], hLinesObjects[nRemoveCounter - 2]); 
 
   ImageViewerCell.RemoveCobbAngle (0, hLinesObjects[nRemoveCounter - 1]); 
 
   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