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

Atlas plugins #16

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
12cbc64
webpack development config
louis-aiherd Nov 19, 2021
5a4107a
wip:keypointsa-atlas plugin
louis-aiherd Nov 19, 2021
e78b517
WIP: add capacity to navigate through image patches
camilledupont Nov 29, 2021
bc381c2
wip:keypointsa-atlas plugin
louis-aiherd Nov 19, 2021
01051ff
Add default settings for keypoints-atlas
camilledupont Dec 1, 2021
ccc99af
small fixes
louis-aiherd Dec 10, 2021
9a84450
bugfix: undo
louis-aiherd Dec 14, 2021
5e18a7d
bugfix: redo
louis-aiherd Dec 14, 2021
e96b750
bugfix: undo on last frame
louis-aiherd Dec 14, 2021
73e1a1f
bugfix: undo/redo buttons
louis-aiherd Dec 14, 2021
8473505
feat: change modified points opacity
louis-aiherd Dec 14, 2021
1e10a6b
bugfix: resize canvas on window resize
louis-aiherd Dec 14, 2021
4b5458b
bugfix: keypoints default colors
louis-aiherd Dec 15, 2021
4f42a57
bugfix: image skip; feat: go to prev / next image using shortcuts
louis-aiherd Dec 15, 2021
862fd9b
bugfix: setNextImageIndex between 0 and imagesPerAtlas - 1
louis-aiherd Dec 17, 2021
b422060
bugfix: moved onActivate() body to firstUpdated() body
louis-aiherd Dec 17, 2021
7a9e610
feat: start validation with image index 0
louis-aiherd Dec 17, 2021
814117c
bugfix: reset imageIndex in newData()
louis-aiherd Dec 20, 2021
3a18501
bugfix: prevent the counter from exceeding the total count of images …
louis-aiherd Dec 21, 2021
3a1d412
feat: brightness controls
louis-aiherd Jan 4, 2022
c0c69c8
labels atlas plugin
louis-aiherd Dec 13, 2021
7b471df
feat: brightness controls
louis-aiherd Jan 24, 2022
6dcc785
feat: skip image
louis-aiherd Jan 24, 2022
c813852
fixes
louis-aiherd Jan 26, 2022
549ae38
bugfix: initial image index in validation mode
louis-aiherd Feb 3, 2022
269af67
bugfix: keyup event listener set more than once
louis-aiherd Feb 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
build/
package-lock.json
.DS_Store
Binary file added data-test/atlases/test 2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data-test/atlases/test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data-test/db.ldb/000005.ldb
Binary file not shown.
Binary file added data-test/db.ldb/000006.log
Binary file not shown.
1 change: 1 addition & 0 deletions data-test/db.ldb/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000004
Empty file added data-test/db.ldb/LOCK
Empty file.
5 changes: 5 additions & 0 deletions data-test/db.ldb/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2022/01/26-09:33:01.620917 30c337000 Recovering log #3
2022/01/26-09:33:01.622020 30c337000 Level-0 table #5: started
2022/01/26-09:33:01.623138 30c337000 Level-0 table #5: 212670 bytes OK
2022/01/26-09:33:01.623511 30c337000 Delete type=0 #3
2022/01/26-09:33:01.623641 30c337000 Delete type=3 #2
1 change: 1 addition & 0 deletions data-test/db.ldb/LOG.old
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022/01/26-08:59:31.154986 30bc39000 Delete type=3 #1
Binary file added data-test/db.ldb/MANIFEST-000004
Binary file not shown.
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"copyindex": "shx cp src/index.html ../build",
"copyimage": "shx cp -r images ../build/",
"copywc": "shx cp node_modules/@webcomponents/webcomponentsjs/webcomponents-* ../build/",
"build": "shx rm -rf ../build && shx mkdir ../build && npm run copyindex && npm run copyimage && npm run copywc && webpack --config webpack.config.js",
"build": "shx rm -rf ../build && shx mkdir ../build && npm run copyindex && npm run copyimage && npm run copywc && webpack --config webpack.config.prod.js",
"dev": "shx rm -rf ../build && shx mkdir ../build && npm run copyindex && npm run copyimage && npm run copywc && webpack --config webpack.config.dev.js --watch",
"clean": "shx rm -rf node_modules",
"installLocalElements": "shx rm -rf node_modules/@pixano ; shx rm -rf package-lock.json ; npm i ${npm_config_path}/packages/core ; npm i ${npm_config_path}/packages/ai ; npm i ${npm_config_path}/packages/graphics-2d; npm i ${npm_config_path}/packages/graphics-3d"
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/helpers/attribute-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export class AttributePicker extends LitElement {

get renderDetail() {
return html`
<div id="updateEditor" style="width: 100%;" ?hidden=${this.showDetail}>
<div id="updateEditor" style="width: 100%;" ?hidden=${!this.showDetail}>
<h3><label>Selected label</label></h3>
${
this.schema.category.map((category, idx) => {
Expand All @@ -383,7 +383,7 @@ export class AttributePicker extends LitElement {

get renderSimple() {
return html`
<div ?hidden=${!this.showDetail}>
<div ?hidden=${this.showDetail}>
<h3><label>Label for creation</label></h3>
${
this.schema.category.map((category, idx) => {
Expand Down
53 changes: 53 additions & 0 deletions frontend/src/plugins/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* @copyright CEA-LIST/DIASI/SIALV/LVA (2019)
* @author CEA-LIST/DIASI/SIALV/LVA <[email protected]>
* @license CECILL-C
*/

import { LitElement, html } from 'lit-element';
import { setAnnotations } from '../actions/annotations';
import { store, getState, getAnnotations } from '../store';

export class PluginCustom extends LitElement {

/**
* Invoked after the element’s template has been created.
*/
firstUpdated() {
this.dispatchEvent(new Event('ready'));
}

/**
* Invoked when the plugin is launched.
* Trigger display of data from the redux store.
*/
onActivate() {
this.newData();
// Test saving and retrieving annotations
this.saveAnnotations();
this.getAnnotation();
}

/**
* Handle new media to display
*/
newData() {
const media = getState('media');
const path = media.info.path;
console.log('Image path: ', path);
}

saveAnnotations() {
store.dispatch(setAnnotations({annotations: [{stuff: "1"}]}));
}

getAnnotation() {
const annotations = getAnnotations().annotations;
console.log('annotations', annotations);
}

get editor() {
return html`Insert your code`;
}
}
customElements.define('plugin-custom', PluginCustom);
Loading