Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smartpen Milestone-1 #526

Merged
merged 3 commits into from
Jun 29, 2021
Merged

Smartpen Milestone-1 #526

merged 3 commits into from
Jun 29, 2021

Conversation

r7rohan
Copy link
Contributor

@r7rohan r7rohan commented Jun 13, 2021

Smartpen Milestone 1 #523

Contains

  • A simple version of smartpen feature, contains 2 working modes and a good UI, also contains other functions like undo, settings.
  • Improvements for enhance feature (increase in speed to within a sec)

I have added the feature to annotations and preset label. This can be extended to anyother tab easily. I tested it, it works well. It supports any kind of annotations (freestyle, rectangles etc).

2021-06-11-13-21-49-online-video-cuttercom_LwYa89D7_RAjt

Code details

Written the edge detection in enhance.js. Written the smartpen class in autoalign.js, autoalign.css. Integrated the code in openseadragon-canvas-draw-overlay, added it to viewer in uicallbacks.js

To dos

  • Increase accuracy
  • Increase speed

Feel free to provide suggestions, improvements, contributions related to the implementation or UI. And please review

Menu, Both modes, undo align
To do: Better heuristics
@r7rohan r7rohan changed the title smartpen milestone-1 Smartpen Milestone-1 Jun 13, 2021
apps/viewer/uicallbacks.js Outdated Show resolved Hide resolved
@birm birm self-requested a review June 20, 2021 02:51
Copy link
Member

@birm birm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have an observation and a question. Good work :)

@@ -155,6 +155,12 @@
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>

<!-- Smartpen -->
<script type="text/javascript" src="../../common/enhance.js"></script>
<script type="text/javascript" src="../../common/smartpen/autoalign.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand why you've added this here, I couldn't notice anything in the heatmap app. Is this coming functionality?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the smartpen is a part of openseadragon-canvas-draw-overlay. Currently, even if not used, the file has to be included with it. Haven't explored the heatmaps section, but if there is any need, smartpen can be activated with a line of code.

Comment on lines -1775 to +1780
saveAnnotation();
$CAMIC.viewer.canvasDrawInstance.isOn = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that this looks like it changes the behavior of the pencil in single draw mode to not save automatically. I'm ok with this, but @nanli-emory may have the same/different opionion.

@birm birm merged commit 670cf71 into camicroscope:develop Jun 29, 2021
This was referenced Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants