#1
Posted
:
Tuesday, October 10, 2017 12:18:29 AM(UTC)
Groups: Registered
Posts: 10
Thanks: 1 times
in MFC, LEADTOOL v19.
I am working on the project with reference to the ImageViewer example.
I needed to rotate each Annotation Object inside the ImageViewerCell.
So I updated the RotateOption using the L_AnnSetRotateOption function, but it did not work.
Below is the code I used.
Code:void CMainView::OnShowRotateHandle()
{
HANNOBJECT pContainer;
HANNOBJECT pSelObject;
L_INT nRet;
m_MainCell->GetAnnotationContainer(0, &pContainer, 0);
L_AnnGetSelectItems(pContainer, &pSelObject);
ANNROTATEOPTIONS RotateOptions;
memset(&RotateOptions, 0, sizeof(ANNROTATEOPTIONS));
RotateOptions.uStructSize = sizeof(ANNROTATEOPTIONS);
RotateOptions.uFlags = ANNROTATE_SHOW_ROTATE_HANDLES;
RotateOptions.nReserved = 0;
nRet = L_AnnGetRotateOptions(pSelObject, &RotateOptions, sizeof(ANNROTATEOPTIONS));
RotateOptions.bShowRotateHandles = TRUE;
nRet = L_AnnSetRotateOptions(pSelObject, &RotateOptions, 0);
}
How do I make the Rotate handle visible?
Thank you for your help.
Edited by moderator Thursday, October 12, 2017 4:01:27 PM(UTC)
| Reason: Added syntax highlighting
#2
Posted
:
Thursday, October 12, 2017 4:00:32 PM(UTC)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Hello,
I am slightly confused about your goal here. You note your goal is to "rotate each Annotation Object inside the ImageViewerCell," but your code deals with showing the rotate handles for the user to do the rotation. So I am slightly confused about whether you are looking to manually rotate the annotations or not.
In your code, you are setting the uFlags before calling L_AnnGetRotateOption(). It's possible the flags property is being overwritten when you do that. Have you tried your code like this?
Code:ANNROTATEOPTIONS RotateOptions;
memset(&RotateOptions, 0, sizeof(ANNROTATEOPTIONS));
RotateOptions.uStructSize = sizeof(ANNROTATEOPTIONS);
nRet = L_AnnGetRotateOptions(pSelObject, &RotateOptions, sizeof(ANNROTATEOPTIONS));
RotateOptions.uFlags = ANNROTATE_SHOW_ROTATE_HANDLES;
RotateOptions.bShowRotateHandles = TRUE;
RotateOptions.nReserved = 0;
nRet = L_AnnSetRotateOptions(pSelObject, &RotateOptions, 0);
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
#3
Posted
:
Friday, October 13, 2017 1:13:39 AM(UTC)
Groups: Registered
Posts: 10
Thanks: 1 times
It's my fault.
As you have explained, the goal is to display the Rotate handle so that the user can rotate the Annotation object.
I applied your code and it did not work.
I think the problem is that it is a non-automated annotation object.
Is there a way to replace a specific Ann Object with an Automated Ann Object?
#4
Posted
:
Monday, October 16, 2017 3:23:20 PM(UTC)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Hello,
Are you looking to enable the rotate handles for the LEADTOOLS (specific) annotations or the DICOM Annotations? This question may seem odd since they're both implemented by us, but there is a distinction. In the main MedicalViewer demo, it only illustrates how to add/manipulate the annotations specific to DICOM with LEADTOOLS. There's no note object (for example) in DICOM, so this demo does not show that. This is similarly shown in the C++ DICOM Annotations demo (no C sample project).
I think you are correct about this having to do with annotation automation. The ImageViewer/MedicalViewer does not provide any access to the annotation automation control being used by the viewer. I think this has to do with the fact that the MedicalViewer can have many sub-cells to display which are all logically different as opposed to one image viewer with only a single frame to display. The automation object would be the one to display the edit designer, which would include the rotation handle. Since there is no designer to interact with here, this may not be supported as currently written. To rotate individual annotation, you may need to give the user a button to push and then translate the annotation to do the rotation. As far as I'm aware, there's no limitation from DICOM with respect to rotated annotation. All of the objects are just geometric shapes, so displaying a rotated ellipse/rectangle shouldn't be an issue.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.