Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, October 10, 2017 12:23:29 AM(UTC)

tksong  
tksong

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:06:27 PM(UTC)  | Reason: Added syntax highlighting

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, October 12, 2017 4:05:32 PM(UTC)

Walter  
Walter

Groups: Tech Support, Administrators
Posts: 368

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
 
#3 Posted : Friday, October 13, 2017 1:18:39 AM(UTC)

tksong  
tksong

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:28:20 PM(UTC)

Walter  
Walter

Groups: Tech Support, Administrators
Posts: 368

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

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.127 seconds.