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 : Thursday, March 7, 2013 7:30:52 PM(UTC)
Jerome76

Groups: Registered
Posts: 13


Hello there,

I’m making the Image viewer program using the C++ Class Library of the PACS Imaging SDK V17.
Actually, I need to get two functions like the cropping function and the annotation function.

The cropping function is used to crop some image by user.
And below is explain for the annotation function.
1. Display some image in the image viewing area.
2. Type some TEXT or LABEL on the image.
3. Save (Write) them onto the Image.

However, I’m afraid that I could not find any sample code regarding these.
Is it possible to do? If so, what should I do for these?

Please kindly let me know with some sample code or some manual.

I look forward to getting your feedback as soon as possible you can.

Thanks and have a good day!

Best regards,
Jerome
 

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, March 10, 2013 7:55:24 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


Jerome,

About cropping an Image you may use "LBitmapBase::Trim" method, see the following help topic:
http://www.leadtools.com/help/leadtools/v18/main/clib/LBbase/LBitmapBase__Trim.htm
About saving the annotation text object into the image data, you can use the "LAnnContainer::Realize" method. See the following help topic: http://www.leadtools.com...nncontainer__realize.htm
Please note that the Realize method will use the color depth of the image itself if it is supported. For grayscale images, 8-bit images are supported, but 10-bit to 16-bit gray are not supported directly.

Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Sunday, March 10, 2013 8:28:13 PM(UTC)
Jerome76

Groups: Registered
Posts: 13


Thanks for your quick reply.

By the way, it slipped my mind about one thing.
Actually we're using Mideical Imaging engine(libraies) in order to handle the DICOM Image.
Even in this case, your answer is the same?
In other words, is it possible to use the cropping and Annotation burring function?

If not, please kindly let me know more information.
I need to get your help ASAP.

Thanks.
 
#4 Posted : Monday, March 11, 2013 4:10:46 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


Yes, my answer also applies to medical images.
However, DICOM images can either be supported directly (color or 8-bit gray) or they could be unsupported by the burning (realizing) function if they are 10 to 16 bit grayscale.

If you are trying to burn text or label to extended grayscale image (10-16 bit grayscale), you need to do the following:
1. Create an empty (temporary) image that's 24-bit color and has the same size as your main image.
2. Fill the temp image with a suitable background color that doesn't exist in the annotations you want to burn (either black or white).
3. Burn the annotations on the temp image.
4. Convert the temp image to grayscale similar to the main image.
5. Combine the 2 images into one to move the annotations to the main image. When doing that, make sure to combine in a way that does not copy the background area.

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