markummitchell / engauge-digitizer

Extracts data points from images of graphs
GNU General Public License v2.0
1.24k stars 213 forks source link

Feature request: adding slidable guidelines #352

Open k1moradi opened 5 years ago

k1moradi commented 5 years ago

I think having guidelines similar to what is implemented in gimp will be useful for manual digitization, visual detection of skewness in images and comparing two different locations on it.

markummitchell commented 5 years ago

I tried out that feature in Gimp, and see that it could be useful. Since Engauge does not have the rulers that Gimp uses for guidelines, maybe it could work like this:

  1. The existing user interface is mostly unchanged
  2. Putting the cursor within N pixels of top/bottom/left/right sides brings up a new constant-Y/constant-Y/constant-X/constant-X guideline respectively
  3. A guideline can be clicked on and dragged for moving, with the current coordinate displayed in the status bar
  4. Dragging a guideline offscreen deletes it
  5. A new MainWindow setting could disable this functionality for people who do not want it
k1moradi commented 5 years ago

About the fifth item, I think it might be better to have show/hide ruler item in the "view" menu if you agree. Then whenever the ruler is visible, the user can click and drag on the ruler to make a guideline. What do you think?

markummitchell commented 5 years ago

Setting up real rulers would take a massive amount of work, since there are linear/log/cartesian/polar coordinates to worry about. Setting up major/minor tic marks with lettering that is nicely spaced when numbers can be very long (like '1.234567E-89') would be part of that work. I would like to start without using rulers. Regarding the View menu suggestion - I agree that makes a lot more sense than creating a MainWindow setting.

k1moradi commented 5 years ago

Makes sense. All I want is the guidelines, not the ruler. Thank you very much.

k1moradi commented 5 years ago

I accidentally pressed close comment

markummitchell commented 5 years ago

You can try out a Windows 64 bit pre-release with guidelines, available at https://ci.appveyor.com/project/markummitchell/engauge-digitizer/branch/master/job/56fqtlj6y4i86r8n/artifacts. I will be adding several unit tests over the new few days, and incorporate suggestions, before closing this.

k1moradi commented 5 years ago

I tried the new guidelines and I loved it. Thanks for adding this feature.

k1moradi commented 5 years ago

I was wondering did you have a reason to make guidelines appear and disappear at the edge of the figure not the inner edge of the program window?

k1moradi commented 5 years ago

When I was deleting a group of digitized points, the guidelines were deleted as well. I pressed ctrl + z, which did not return the guidelines. I think undoing should return them.

I also think saving guidelines is a time-saving feature to have.

markummitchell commented 5 years ago

Great, I will add your suggestions

k1moradi commented 4 years ago

I found a bug, changing the scalebar the location of guideline changes.

markummitchell commented 4 years ago

This took a lot of work, but seems to be working well.

You can test this using https://github.com/markummitchell/engauge-digitizer/blob/master/README_windows_preview.md

k1moradi commented 4 years ago

I love the new guidelines. They are so cool. 💯 Thanks for the implementation! :)

k1moradi commented 4 years ago

I liked guidelines angles change with the modification of axis scales and the shape of buttons. I have one feedback but it is not important at all. It was strange for me to see four buttons to add vertical and horizontal guidelines, while two should be sufficient. Also, the position of buttons seemed strange. If the users suppose to use buttons, then maybe the buttons should be in the toolbar next to other buttons and without occupying the workspace. However, reading your earlier comments, I have a feeling you have not abandoned the idea of adding rulers and this style is just a start for that path.

What you did for this program has been exemplary. I am almost done with my Ph.D. project and this tool was an essential part of it. Thanks again! I have added a link to the tool I made and I suggested users of my tool use this digitizer. https://github.com/k1moradi/SynapseModelersWorkshop

markummitchell commented 4 years ago

Congratulations on your upcoming Ph.D. project completion. Impressive.

I experimented with a toolbar-solution, but realized that there is probably an easier way using a new 'digitize state' that is added to 'select', 'axis', 'curve' and other states. This solution would be as simple as:

There will be some feedback when dragging to indicate direction.

k1moradi commented 4 years ago

Congratulations on your upcoming Ph.D. project completion. Impressive.

I experimented with a toolbar-solution, but realized that there is probably an easier way using a new 'digitize state' that is added to 'select', 'axis', 'curve' and other states. This solution would be as simple as:

  • New 'Guidelines' state
  • A 'Guidelines on/off' checkbox in the View menu
  • While in the Guidelines state, click on empty space to create a new guideline, then drag to indicate direction (along X or Y)
  • While in the Guidelines state, click on an existing guidelines to move it, or drag it offscreen to delete

There will be some feedback when dragging to indicate direction.

Sounds good to me!

gerritnowald commented 2 years ago

I don't know if this warrants its one feature request: Instead of guidelines, a cross which fully extends to the edges of the screen would greatly help me defining the coordinate system. Thank you for the very nice tool, I used a Matlab tool for this task in the past and was looking for an open source and free replacement. https://de.mathworks.com/matlabcentral/fileexchange/928-digitize2-m