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

Add an annotation registry. #616

Merged
merged 2 commits into from
Sep 28, 2016
Merged

Add an annotation registry. #616

merged 2 commits into from
Sep 28, 2016

Conversation

manthey
Copy link
Contributor

@manthey manthey commented Sep 23, 2016

Let renderers be selected based on the annotations that will be used.

Also, there were a bunch of TODO statements asking to send a warning if items were re-registered. These have been addressed.

Let renderers be selected based on the annotations that will be used.

Also, there were a bunch of TODO statements asking to send a warning if items were re-registered.  These have been addressed.
@codecov-io
Copy link

codecov-io commented Sep 23, 2016

Current coverage is 82.80% (diff: 94.33%)

Merging #616 into master will increase coverage by 0.07%

@@             master       #616   diff @@
==========================================
  Files            85         85          
  Lines          7966       8019    +53   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           6590       6640    +50   
- Misses         1376       1379     +3   
  Partials          0          0          

Powered by Codecov. Last update c15bcee...e004ec0

@manthey manthey mentioned this pull request Sep 26, 2016
Copy link
Member

@aashish24 aashish24 left a comment

Choose a reason for hiding this comment

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

Most looks good to me, just has a minor suggestion.

@@ -309,6 +311,8 @@ var rectangleAnnotation = function (args) {
};
inherit(rectangleAnnotation, annotation);

registerAnnotation('rectangle', rectangleAnnotation, {polygon: true});
Copy link
Member

Choose a reason for hiding this comment

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

+1

@@ -598,6 +605,8 @@ var pointAnnotation = function (args) {
};
inherit(pointAnnotation, annotation);

registerAnnotation('point', pointAnnotation, {point: true});
Copy link
Member

Choose a reason for hiding this comment

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

My only suggestion would is that features (keys) are not visible anywhere else. Should we create a list of it somewhere at the top may be? then you can say annotation.point: true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure having another list aids much here. There is no strict reason why an annotation should need to use the same feature that any other annotation used (I don't know what a heatmap annotation would look like, but we could have one).

I think if we wanted to make this more based on definitions, then we should probably add a general key to each base feature's capabilities map which contains the plain feature's name. Then we would import the base feature (not the renderer-specific feature) so that we could specify one of its capabilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just pushed a change which does this.

Copy link

@kotfic kotfic Sep 28, 2016

Choose a reason for hiding this comment

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

@manthey Just as a side note, heatmap annotations look like the old-school MS Paint spray can tool. I've seen papers where this is used to allow users to generate distributions over vernacular geographic entities (e.g. downtown). There might actually be some useful applications of an annotation type like this (especially in medical imaging?)

@aashish24
Copy link
Member

I just pushed a change which does this.

Looks great!

@manthey manthey merged commit 24d0bb1 into master Sep 28, 2016
@manthey manthey deleted the annotaton-registry branch September 28, 2016 15:59
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.

4 participants