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 : Monday, November 26, 2012 10:14:17 AM(UTC)
tbecker82

Groups: Registered
Posts: 37


Hello

I was wondering if the filters in .net have an option preview dialog like they have in the  C++ class library version of LeadTools?

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 : Monday, November 26, 2012 11:56:26 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

I'm afraid I did not fully understand what you mean. Which preview dialog are you referring to exactly?
Please send me a screenshot image that shows the preview dialog in our C++ class library.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Tuesday, November 27, 2012 5:16:33 AM(UTC)
tbecker82

Groups: Registered
Posts: 37


Maen

I have included a screenshot of the dialog.  In the code I use the following to create the dialog;

LDialogImageEffect DlgImageEffect;
LDialogImageEffect::Initialize(0);
DlgImageEffect.SetBitmap(&m_LAnnoWnd);

SHARPENDLGPARAMS DlgParams;

There are other filters that have this feature like median, unsharp mask.

Thanks
tbecker82 attached the following image(s):
ShaprenDialog.png
 
#4 Posted : Tuesday, November 27, 2012 11:00:46 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

LEADTOOLS .Net interface doesn't contain many common dialogs. It contains the RasterWindowLevelDialog and File loading and saving dialogs (RasterOpenDialog and RasterSaveDialog).

The main raster demo (Examples\DotNet\[CS or VB]\MainDemo) has some dialogs for many of the image processing functions so you may find what you need in that demo.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Wednesday, November 28, 2012 6:57:15 AM(UTC)
tbecker82

Groups: Registered
Posts: 37


Thanks Maen.  I will check it out.
 
#6 Posted : Monday, June 17, 2013 11:17:10 AM(UTC)
tbecker82

Groups: Registered
Posts: 37


Maen,

I had a question about how the RasterWindowLevelDialog works.
Does the dialog maintain a separate copy of the image for itself to apply the effects?

I looked at the main demo and it does provide an interface for the values of a filter that can be modified,
but what I want to include is a preview of how those settings for a particular filter will effect the image.

From what I understand, I would need 2 copies of the original image.  One a baseline copy so that if a filter is already been
applied, I can apply the new filter settings to the original data and not have the effect of stacking filters every time a user changes a value.
The 2nd copy being the actual image to preview the effects.

Any thoughts on this approach?

Thanks
 
#7 Posted : Tuesday, June 18, 2013 5:18:13 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


You actually need only one new copy for the "After" image in the preview. The "Before" image can be a reference of the original image you're going to process, since the dialog will not be modifying this image.
This means it will be painted in the dialog, but it should NOT be freed when you exit the dialog because it will be the same image from the form that originally showed the dialog.

 
#8 Posted : Tuesday, June 18, 2013 7:24:42 AM(UTC)
tbecker82

Groups: Registered
Posts: 37


So would I need to do a dispose on the "after" Image and then .Clone() on the "before" Image each time the user changes a setting for the filter?

My only concern is that some of my images may be large, and doing a bunch of deallocation/reallocations may cause performance issues.

Thanks
 
#9 Posted : Wednesday, June 19, 2013 5:44:05 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Yes, you have to dispose the image and re-run the effect on a new copy every time the user changes the setting.
And yes, this could be slow if the image is very large or the function is complex and performs a lot of processing.
For this reason, some of our C DLL image processing dialogs do not apply the effect directly when the user changes the slider. Instead, they contain a button labeled "Apply" that the user must click to see the preview change such as the attached screenshot.

What you can do to enhance performance, is either clone a portion of the image and display it in the "After" image then apply the effect to it, or resize both images to a small size in the preview window, but in this case, you must clone both, not only the "After" because you don't want to resize the original "Before" image.

Daoud attached the following image(s):
MaxDlgWithApply.png
 
#10 Posted : Wednesday, June 19, 2013 8:38:16 AM(UTC)
tbecker82

Groups: Registered
Posts: 37


Thank you Daoud, your reply has given me some things to consider.
 
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.120 seconds.