L_DispContainerRemoveCobbAngle

#include "ltivw.h"

L_LTIVW_API L_INT L_DispContainerRemoveCobbAngle(hCellWnd, nSubCellIndex, hLine)

L_HWND hCellWnd;

handle to the cell window

L_INT nSubCellIndex;

index into the image list attached to the cell

HANNOBJECT hLine;

handle for one of the cobb angle annotation lines

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

Parameter Description
hCellWnd A handle to the window that represents the Medical Viewer Cell.
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.
hLine Handle to the one of the two annotation lines that creates the cobb angle.

Returns

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 L_DispContainerAddCobbAngle.

To get the cobb angle value, please refer to the function L_DispContainerGetCobbAngleValue.

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
Functions: L_DispContainerAddCobbAngle, L_DispContainerGetCobbAngleValue, L_DispContainerSetActionProperties, L_DispContainerGetActionProperties, L_DispContainerGetActionCount, L_DispContainerSetKeyboardAction, L_DispContainerGetKeyboardAction, L_DispContainerIsActionActive, L_DispContainerGetActionCallBack, L_DispContainerSetActionCallBack
Topics: Image Viewer Cells
Image Viewer Functions: Image Viewer Cells

Example

This function removes the cobb-angle attached to the specified line.

L_INT nLineCounter = 0; 
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[nLineCounter] = hObject; 
      nLineCounter++; 
   } 
   return SUCCESS; 
} 
L_DOUBLE L_DispContainerRemoveCobbAngleExample(HWND hCellWnd) 
{ 
   L_INT nSubCellIndex; 
   L_DispContainerGetActiveSubCell(hCellWnd, &nSubCellIndex, 0); 
   HANNOBJECT hAnnContainer; 
   L_DispContainerGetAnnotationContainer(hCellWnd, nSubCellIndex, &hAnnContainer, 0); 
   HANNOBJECT hLinesObjects[256]; 
   memset(hLinesObjects, 0, sizeof(HANNOBJECT) * 256); 
   nLineCounter = 0; 
   L_AnnEnumerate(hAnnContainer, FindLines, hLinesObjects, ANNFLAG_RECURSE, NULL); 
   if (nLineCounter < 2) 
   { 
      MessageBox(hCellWnd, TEXT("You have to have two lines on the cell to create the cobb angle"), TEXT("Error"), MB_OK); 
      return 0.0; 
   } 
   L_INT nRet = L_DispContainerAddCobbAngle(hCellWnd, nSubCellIndex, hLinesObjects[nLineCounter - 1], hLinesObjects[nLineCounter - 2]); 
   L_DOUBLE dAngle; 
   nRet = L_DispContainerGetCobbAngleValue(hCellWnd, 0, hLinesObjects[nLineCounter - 1], &dAngle); 
   if (nRet != SUCCESS) 
   { 
      MessageBox(hCellWnd, TEXT("The line you sent is not attached to any cobb angle"), TEXT("Error"), MB_OK); 
   } 
   return dAngle; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Medical Image Viewer C API Help