LImageViewerCell::RemoveCobbAngle

#include "ltwrappr.h"

L_INT LImageViewerCell::RemoveCobbAngle(nSubCellIndex, hLine);

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
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 Reserved for future use. Pass 0.

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 LImageViewerCell::AddCobbAngle.

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

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: LImageViewerCell::GetCobbAngleValue, LImageViewerCell::AddCobbAngle, LImageViewerCell::AddAction, LImageViewerCell::SetAction, LImageViewerCell::SetActionProperties, LImageViewerCell::GetActionProperties, LImageViewerCell::GetActionCount, LImageViewerCell::SetKeyboardAction, LImageViewerCell::GetKeyboardAction, LImageViewerCell::IsActionActive, LImageViewerCell::EnableActionCallBack, Class Members
Topics: Image Viewer Cells
Window Control/Image Viewer Functions: Image Viewer Cells

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Medical Image Viewer C++ Class Library Help