New features request for version 2.2 of VintaSoftImaging.NET

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

New features request for version 2.2 of VintaSoftImaging.NET

Post by Alex » Mon Mar 16, 2009 2:25 pm

Version 2.2 of VintaSoftImaging.NET Library will have the following features:
  • Anti-aliasing preview mode for the image viewer.
  • New image processing functions.
If you have some idea or suggestion, please write it here.

mvockerodt
Posts: 2
Joined: Mon Mar 16, 2009 5:23 pm

Re: New features request for version 2.2 of VintaSoftImaging.NET

Post by mvockerodt » Mon Mar 16, 2009 6:35 pm

Hello.

1) It would be nice to have the viewer (optionally) use some type of interpolation when zooming below 1:1 size, This will reduce jaggies and improve the appearance. For 1-bit images, this is usually called "scale to grey" but the same can be said of colour images as well. It's probably equivlent to using the GDI+ Graphics.DrawImage method with a higher-quality InterpolationMode selected, though for 1-bit images a custom implementation would probably be better & faster.

2)I would like to be able to change the Cursor that a selection (or maybe: any visual tool) uses at any time, so I can indicate visually that a different operation will be performed. For example: pressing CTRL might change to a magnifier with a minus sign in it whereas without CTRL it display a magnifier with a + sign, just like Adobe Acrobat reader.

3) An event that fires when the user releases the button after making a selection would be great.

4) Following on from 3): ZoomSelection might have an option so that the zoom happens immediately on releasing the button instead of when you click in the region.

5) Being able to programatically set/clear the section rectangle would be great. Currently I can only clear it by changing CurrentTool.

Regards,
Martin

Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

Re: New features request for version 2.2 of VintaSoftImaging.NET

Post by Alex » Tue Mar 17, 2009 3:37 pm

Hello Martin,

Thank you for your suggestions. Please see comments below.
1) It would be nice to have the viewer (optionally) use some type of interpolation when zooming below 1:1 size, This will reduce jaggies and improve the appearance. For 1-bit images, this is usually called "scale to grey" but the same can be said of colour images as well. It's probably equivlent to using the GDI+ Graphics.DrawImage method with a higher-quality InterpolationMode selected, though for 1-bit images a custom implementation would probably be better & faster.
2) I would like to be able to change the Cursor that a selection (or maybe: any visual tool) uses at any time, so I can indicate visually that a different operation will be performed. For example: pressing CTRL might change to a magnifier with a minus sign in it whereas without CTRL it display a magnifier with a + sign, just like Adobe Acrobat reader.
Ok, we will add these features to new version of library.
3) An event that fires when the user releases the button after making a selection would be great.
Please see the SelectionChanged event of the SelectionBase class in documentation.
4) Following on from 3): ZoomSelection might have an option so that the zoom happens immediately on releasing the button instead of when you click in the region.
Please see the Zoom method of the ZoomSelection class in documentation. Zoom process can be controlled programmatically.
5) Being able to programatically set/clear the section rectangle would be great. Currently I can only clear it by changing CurrentTool.
Please see the Rectangle property of the SelectionBase class in documentation. This property can be changed
since version 2.1 of library.

Best regards, Alexander

mvockerodt
Posts: 2
Joined: Mon Mar 16, 2009 5:23 pm

Re: New features request for version 2.2 of VintaSoftImaging.NET

Post by mvockerodt » Tue Mar 17, 2009 6:45 pm

Hello.

I appreciate the speed at which you guys respond to these queries. It's very much appreciated.

Regarding your comments:

> Please see the Zoom method of the ZoomSelection class in documentation. Zoom process can be controlled programmatically.

This is just a zoom factor. There is still a lot of calculation involved to convert resolutions, calculate the required factor and then reposition the viewer etc. You already have the code to do this when the user clicks in the selected area. We just need a way of enabling that bit of code also execute when the mouse button goes up instead i.e. without requiring the 2nd click.

While on the subject, a ZoomSelection(Rectangle r) method might also be nice, where I can pass in a Rectangle (in screen or image coordinates?) and it'll try zoom to that rectangle. Again, that's based on that same code you already have for the ZoomSelection tool, but can be invoked completely programatically without using visual tools or me calculating zoom factors etc.

I assume you have methods to convert points and rectangles in screen coordinates (pixels) to/from image coordinates (taking into account things such as the current AutoscrollPosition, Zoom and DPI's)...? Can you guys possibly expose some of these so we can do those mappings easily as well?


> Please see the SelectionChanged event of the SelectionBase class in documentation.

This fires each time the mouse moves while the button is still down, not when the mouse is released and the selection is thereby "fixed". Maybe just needs an event fired in the Mouse Up event where you'd presumably also be changing some status to stop the selection tracking.


>Please see the Rectangle property of the SelectionBase class in documentation. This property can be changed
>since version 2.1 of library.

I did try that: the debugger shows it's accepting the new Rectangle value but the selection in the viewer is still displaying the old rectangle (must I do something to make it "catch up"?). I also presume the idea is one should assign Rectangle.Empty to clear it completely?

Regards,
Martin

Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

Re: New features request for version 2.2 of VintaSoftImaging.NET

Post by Alex » Thu Mar 19, 2009 5:24 pm

Hello Martin,

Thank you for your suggestions. Please see comments below.
While on the subject, a ZoomSelection(Rectangle r) method might also be nice, where I can pass in a Rectangle (in screen or image coordinates?) and it'll try zoom to that rectangle. Again, that's based on that same code you already have for the ZoomSelection tool, but can be invoked completely programatically without using visual tools or me calculating zoom factors etc.
You can use the following code instead of ZoomSelection(Rectangle r) method:

Code: Select all

ZoomSelection selection = imageViewer1.CurrentTool as ZoomSelection;
if (selection != null)
{
  selection.Rectangle = new Rectangle(100, 100, 50, 50);
  selection.Zoom();
}
I assume you have methods to convert points and rectangles in screen coordinates (pixels) to/from image coordinates (taking into account things such as the current AutoscrollPosition, Zoom and DPI's)...? Can you guys possibly expose some of these so we can do those mappings easily as well?
Please give me an example how do you plan to use this.
This fires each time the mouse moves while the button is still down, not when the mouse is released and the selection is thereby "fixed". Maybe just needs an event fired in the Mouse Up event where you'd presumably also be changing some status to stop the selection tracking.
Event occurs when selection rectangle is changed. Mouse Up event does not change selection rectangle.
I did try that: the debugger shows it's accepting the new Rectangle value but the selection in the viewer is still displaying the old rectangle (must I do something to make it "catch up"?).
What code do you use? Please try to use this:

Code: Select all

SelectionBase selection = imageViewer1.CurrentTool as SelectionBase;
if (selection != null)
{
  selection.Rectangle = new Rectangle(100, 100, 200, 300);				
}
I also presume the idea is one should assign Rectangle.Empty to clear it completely?
Yes, selection will be cleared if you set value of the Rectangle property to Rectangle.Empty.

Best regards, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests