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



Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, April 24, 2012 8:57:47 AM(UTC)


Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Attached is an example project which saves and loads annotation to a custom database through the MedicalWorkstationViewer. The "custom database" in this example is actually just a text file that gets created in C:\mockDatabase. The reason I implemented the example this way was to demonstrate (in a generic way) what information needs to be stored and retrieved from your database in order to use your own database with the WorkstationViewer.

Here is a general overview of what is going on:

*NOTE* the use of the word "annotations" (plural) in the context of this description is referring to annotation files (which can
contain multiple annotation objects) -- not individual annotation objects on the image.

The annotation load button of the workstation will not be activated if the workstation does not find that there are annotations to be
loaded. In order to notify the workstation that there are annotations to be loaded (when you are not using our default database), you must
implement the IWorkstationDataAccessAgent interface. This interface declares many methods (a bunch of which you do not need actually
implement for our purposes, but that you do need to declare in order for this to work). The methods from this interface that you do need
to implement are:

---This is where you store the location of an annotation file to your database, along with the associated sopInstanceUID and a description
of the annotations.

---This is where you return the location of the annotation file associated with an AnnotationId. The AnnotationID object has 3 members:
a sopInstanceUID, a description, and an object number. The description is what is used to populate the list of available annotations
that can be loaded. The object number specifies that this AnnotationId is the "i'th" annotation for this sopInstanceUID. **NOTE** The
object number needs to be updated (incremented when saving and decremented when deleting from the middle or beginning) for each
sopInstanceUID whenever a save or delete is performed. Also note that this example does not implement the delete method (in your application you would want to implement the delete method such that it removes the specified entry from your custom database).

---This method needs to return the number of annotations associated with sopInstanceUID (provided as an argument to the method).

---This is not implemented in the example. Therefore clicking "Delete" or "Delete All" in the annotations menu will result in
unexpected behavior. (To be precise, what will happen is the Workstation will delete the annotation file, but the entry in our textfile
based database will not be deleted). You will want to implement this method so that it removes the relevant information from your

All of the other methods for this interface need to be declared.
File Attachment(s):
Workstation_Custom_Ann_Save_Load.zip (23kb) downloaded 365 time(s).

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 : Monday, October 9, 2017 9:48:57 AM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

Updated to LEADTOOLS v19 with Visual Studio 2017. Also changed project to automatically select dll's for running in 32-bit and 64-bit.
Extract folder to "C:\LEADTOOLS 19\Examples\DotNet\CS\" to use the example.

To get a DICOMDIR example file, download this zip file: ftp://ftp.leadtools.com/pub/3d/Chest%20CT-Compressed%20subset%20for%203D%20Tutorial/
File Attachment(s):
CS_WorkstationAnnotations.zip (15kb) downloaded 199 time(s).
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

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-2024, Yet Another Forum.NET
This page was generated in 0.084 seconds.