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 : Sunday, December 6, 2009 5:35:16 PM(UTC)

k3nn  
k3nn

Groups: Registered
Posts: 17


hi, i'm trying wpf with annotation thru your documents and i'm having trouble deciding which is the way to go. I need to implement a custom non editable (but draggable) text type annotation. the samples I have evaluated are:

non-automated annotation - seems the way to go but have trouble implementing dragging/positioning the obj

automated annotation - has the design mode so i can switch between drag mode or not, but i'm having trouble adding the AnnNoteObject that I got in the 1st sample above to be attached to the AnnManager.Object. annmanager object needs annautomationobject but my annnoteobject is not.

user-defined annotation - i don't know what this is

can u explain which one i should choose? thanks
 

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 : Sunday, December 6, 2009 6:15:38 PM(UTC)

k3nn  
k3nn

Groups: Registered
Posts: 17


additional finds:

i tried these codes to add annnoteobject into annautomatonmanager.object.


annAutomationManager.UserMode = AnnUserMode.Design;
AnnAutomationObject annObj = new AnnAutomationObject();
annObj.Name = "test";
annObj.Object = CreateAnnNoteObject(new Rect(50, 50, 200, 100));
annObj.Id = 27;

annAutomationManager.Objects.Add(annObj);

but it's a no go. i see null values on the object when i create annautomationobject() can u give example on how i can attach a non-automated object to an automated manager?or more specifically -- how i can use automation mode(design / drag ) with pre-defined annotation objects? thanks again.
 
#3 Posted : Sunday, December 6, 2009 8:33:11 PM(UTC)

k3nn  
k3nn

Groups: Registered
Posts: 17


this doesn't help:

http://www.leadtools.com/Help/LEADTOOLS/v16/DH/TO/Leadtools.Topics~Leadtools.Topics.WpfImplementUserDefinedObjectsWithLeadtoolsAnnotations.html

it is missing some codes, i.e., how it uses the defined objects and put them in AnnAutomatedManager.Object...:(
 
#4 Posted : Monday, December 7, 2009 8:24:40 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


What you were trying to do with the automated annotations should work, you're just adding the AnnObject into the wrong collection.

The AnnAutomationManager.Objects collection is for the AnnAutomationObjects, which create the toolbar items and default annotations when you draw them.  To add a physical AnnObject it must go in the AnnContainer.Objects collection.  If you're using automated annotations this would be the AnnAutomation.Container.Objects collection or AnnAutomation.Container.Children if you're using the WPF annotations.
 
#5 Posted : Monday, December 7, 2009 2:57:31 PM(UTC)

k3nn  
k3nn

Groups: Registered
Posts: 17


Thanks Greg, I got it. Now I'm checking it out, seems fine. but i have a question. if i have a list of images on my left side, which i can select into the right bitmapsourceviewer, then i add an annotation. would that annotation be stuck into that image when i click another image on my left side loading it into the same bitmapsourceviewer? or is the annotation some kind of a layer that is always on top (so to speak)? do I need to have some kind of annotation manager (my own code) to support changing images on the fly with their corresponding annotations or do you have something built into leadtools already like that?
 
#6 Posted : Monday, December 7, 2009 4:16:25 PM(UTC)

k3nn  
k3nn

Groups: Registered
Posts: 17


can I merge the annotations to the images? or can I use a separate file for them? what file format are they in? thanks
 
#7 Posted : Tuesday, December 8, 2009 3:36:01 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


The annotations are in a layer on top of the images and are not directly tied to them. 

You can permanently burn the annotations into the bitmap data with the AnnAutomation.Realize method.

You can use the AnnCodecs.Load and Save methods to load and save annotation files.  We have several formats and you can get more details on them in the documentation for the AnnCodecs.Save method.  Check out the example in the forum post http://support.leadtools...orums/9513/ShowPost.aspx .  It shows how to maintain separate annotations for each page in a multipage file.  You could implement something similar for each image in the RasterImageList control.  It's written in v15 for the winforms annotations, but the code shouldn't be much different, just change the reference paths and use Leadtools.Windows.Annotations rather than Leadtools.Annotations if you're using WPF.
 
#8 Posted : Tuesday, December 8, 2009 10:31:22 AM(UTC)

k3nn  
k3nn

Groups: Registered
Posts: 17


thanks for the fast reply and link sample. unfortunately, i'm not using multi image file. i'm literally using many files in a directory,say, and my left side is a thumblist using imagelist. anyway, i guess i have to implement my own then, and code an annotation manager for specifically showing/hiding annotations depending on the current image that is showing in rasterviewer. many thanks at least this gives me a direction to go.
 
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-2020, Yet Another Forum.NET
This page was generated in 0.068 seconds.