#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. | |
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
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. |
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;}