-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement basic review annotation candidate view
- Loading branch information
Showing
9 changed files
with
137 additions
and
10 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* A variant of the image grid used for the selection of MAIA annotation candidates. | ||
* | ||
* @type {Object} | ||
*/ | ||
biigle.$component('maia.components.acImageGrid', { | ||
mixins: [biigle.$require('volumes.components.imageGrid')], | ||
components: { | ||
imageGridImage: biigle.$require('maia.components.acImageGridImage'), | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* A variant of the image grid image used for the selection of MAIA annotation candidates. | ||
* | ||
* @type {Object} | ||
*/ | ||
biigle.$component('maia.components.acImageGridImage', { | ||
mixins: [biigle.$require('volumes.components.imageGridImage')], | ||
template: '<figure class="image-grid__image" :class="classObject" :title="title">' + | ||
'<div v-if="showIcon" class="image-icon">' + | ||
'<i class="fas fa-3x" :class="iconClass"></i>' + | ||
'</div>' + | ||
'<img @click="toggleSelect" :src="url || emptyUrl">' + | ||
'<div v-if="showAnnotationLink" class="image-buttons">' + | ||
'<a :href="showAnnotationLink" target="_blank" class="image-button" title="Show the annotation in the annotation tool">' + | ||
'<span class="fa fa-external-link-square-alt" aria-hidden="true"></span>' + | ||
'</a>' + | ||
'</div>' + | ||
'</figure>', | ||
computed: { | ||
showAnnotationLink: function () { | ||
return false; | ||
}, | ||
selected: function () { | ||
return this.image.selected; | ||
}, | ||
title: function () { | ||
return this.selected ? 'Remove selected label' : 'Assign selected label'; | ||
}, | ||
}, | ||
methods: { | ||
getBlob: function () { | ||
return biigle.$require('maia.api.maiaAnnotation').getFile({id: this.image.id}); | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* The review annotation candidates tab | ||
* | ||
* @type {Object} | ||
*/ | ||
biigle.$component('maia.components.reviewAcTab', { | ||
props: { | ||
// | ||
}, | ||
data: function () { | ||
return { | ||
// | ||
}; | ||
}, | ||
computed: { | ||
// | ||
}, | ||
methods: { | ||
// | ||
}, | ||
created: function () { | ||
// | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<ac-image-grid | ||
v-show="hasAnnotationCandidates" | ||
:images="annotationCandidates" | ||
empty-url="{{ asset(config('thumbnails.empty_url')) }}" | ||
:width="{{config('thumbnails.width')}}" | ||
:height="{{config('thumbnails.height')}}" | ||
:initial-offset="reviewAcOffset" | ||
:selectable="isInAnnotationCandidateState" | ||
selected-icon="check" | ||
v-on:select="handleSelectedAnnotationCandidate" | ||
v-on:scroll="updateReviewAcOffset"></ac-image-grid> | ||
<div v-if="!loading && !hasAnnotationCandidates" class="maia-content-message"> | ||
<div class="text-warning"> | ||
There are no annotation candidates. | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<review-ac-tab inline-template> | ||
<div class="sidebar-tab__content"> | ||
review ac | ||
|
||
</div> | ||
</review-ac-tab> |