ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Move rectange by selection box
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

MartinR

Czech Republic
3 Posts

Posted - Apr 07 2024 :  15:50:26  Show Profile  Reply
Hello,

I am just starting with this great library, and I find some things which I have to solve.

I have a background image and I created several small rectangles on it. I need to change the dimensions of the rectangles and move them to different positions either by using the mouse or arrow keys. When I click on a rectangle, a selection box appears, which allows me to change the dimensions of the rectangle. However, there is a bigger problem when it comes to moving the rectangle. It is difficult to precisely select the thin boundary of the selection rectangle to be able to move the rectangle.

Is there any way how to change the selection mode to move mode? Like for example press ctrl+click anywhere inside the selection box.

Thank you for your help

Martin

xequte

38610 Posts

Posted - Apr 07 2024 :  19:46:36  Show Profile  Reply
Hi Martin

It sounds like you are doing just a selection, rather than using a shape layer. Please try the demo:

\Demos\LayerEditing\Layers_AllTypes\Layers.dpr

And let us know if you need some help with it.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

MartinR

Czech Republic
3 Posts

Posted - Apr 08 2024 :  02:00:43  Show Profile  Reply
Hi Nigel,

Thank you for your response. I would like to clarify the two concepts in your library: layers objects and vector objects. I have a large image of a Petri dish with small worms on it, and I need to create a simple app to label each worm on the dish.

To do this, I load the main image as the background and allow the user to zoom in to the appropriate size to recognize the worm. The user then uses a predefined size of the rectangle and clicks on the image at the centre of each worm. I use the addObject function to display the rectangle with the predefined size and record it in my internal structure, like the type of worm, along with the centre point and coordinates of the bounding rectangle. Sometimes it is necessary to adjust the size or position of the bounding rectangle to optimize the coverage of the worm.

This is a relatively simple task. In your library, it seems there are two different possibilities: layers and simple vector objects. I could create a layer for each bounding box or a simple rectangle for the bounding box. These worms (bounding rectangles) could be thousands on a single Petri dish image.

When using a simple drawing object (rectangle), there is a slight problem with moving it. The rectangle can be selected easily, but it is difficult to move the mouse exactly to the line of the rectangle to change its mode for moving it. So is it possible in some easy way to start moving rectangles like hold shift and move or something similar?

What is your suggestion for this type of usage?
Use a simple vector object for each bounding box, or use a new layer object for each bounding box? I forgot to mention that the bounding boxes can be overlapped.

Thank you very much for the help

Best regards
Martin

Go to Top of Page

xequte

38610 Posts

Posted - Apr 08 2024 :  16:12:06  Show Profile  Reply
Hi Martin

TImageEnVect objects is our legacy class. Please use layers for all new applications:

http://www.imageen.com/help/TImageEnVect_vs_TIELayers.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: