Shamim1977 / iplab

Automatically exported from code.google.com/p/iplab
Other
0 stars 0 forks source link

Preview Window does not work with parameterized two source filters [resolved] #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open two different images of same size 
2. Apply Filters->Two Source Filters->Morph, then select second image when 
asked.
3. Try changing the Source Percentage "Bar" value, the preview will not change.

What is the expected output? What do you see instead?
- Expected is that the preview window applies the filter and show the output 
preview, but it just shows the source Image. 

Reason:
On applying a two source filter via Preview, preview makes the source image  
cropped to the size of preview window. While the Overlay image remains the same 
size. Now the two source filter matches the size of two images and rejects 
filtering finding the overlay image bigger than the Source image.

Solution:
I've tried resolving the problem without any changes in the code preview class 
or the filter itself. Before using the filterPreview.RefreshFilter(), change 
the filter.OverlayImage to a preview window sized overlay image. Refresh the 
Filter, then again revert back the filter.OverlayImage to the original overlay 
Image.
A sample for one paramterized two source filter (Morph) is edited and attached. 

Hope it helps.

- Regards
Abhishek Johri

Original issue reported on code.google.com by absolute...@gmail.com on 15 Dec 2010 at 1:54

Attachments:

GoogleCodeExporter commented 8 years ago
Issue is fixed in revision 80.

However provided solution is not accepted. The fix is wrong because:
1) Preview window will not be useful with fix like this. To make it useful, it 
is required to take care of the feature which allows user to move image region 
in preview window.
2) It is not generic. Proper fix would be in preview control itself (which is 
what was done revision 80).

Original comment by andrew.k...@gmail.com on 26 Mar 2012 at 8:13

GoogleCodeExporter commented 8 years ago

Original comment by andrew.k...@gmail.com on 26 Mar 2012 at 8:48