-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #450 from camicroscope/develop
For 3.8.1
- Loading branch information
Showing
11 changed files
with
88 additions
and
21 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,24 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../../core/Store.js"></script> | ||
<script src="./port.js"></script> | ||
<script src="./xml2geo.js"></script> | ||
<link rel="stylesheet" href="./style.css"> | ||
<title>Import and Export [caMicroscope]</title> | ||
</head> | ||
<body> | ||
<h1>Convert Annotations from XML</h1> | ||
<h1>Import Annotations</h1> | ||
<h3>Info</h3> | ||
<div class="form"> | ||
<label for="slide_id">Slide Id:</label> | ||
<input type="text" id="slide_id" name="slide_id"><br> | ||
<label for="annot_name">Annotation Name:</label> | ||
<input type="text" id="annot_name" name="annot_name"><br> | ||
<h3>File Contents</h3> | ||
<label for="annot_name">XML Contents:</label> | ||
<textarea id="xml_in" name="input" rows="10" cols="30"></textarea><br> | ||
<button id="convert_btn" onclick="xml2geo()" type="button">Convert</button> | ||
<label for="annot_name">Input:</label> | ||
<textarea id="input" name="input" rows="10" cols="30"></textarea><br> | ||
<button id="convert_btn" onclick="xml2geo()" type="button">Convert from XML</button> | ||
<button id="prepare_btn" onclick="prepareAnnot()" type="button">Prepare JSON</button> | ||
</div> | ||
<br><br> | ||
<h3>Output</h3> | ||
<textarea id="output" rows="10" cols="30"></textarea> | ||
<br> | ||
<button id="post_btn" onclick="saveAnnot()" type="button">Post</button> | ||
</body> | ||
</html> |
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,22 @@ | ||
const store = new Store('../../data'); | ||
|
||
function prepareAnnot() { | ||
try { | ||
let output = JSON.parse(document.getElementById('input')); | ||
output['provenance']['image']['slide'] = document.getElementById('slide_id').value; | ||
output['provenance']['analysis']['execution'] = document.getElementById('annot_name').value; | ||
output['properties']['annotations']['name'] = document.getElementById('annot_name').value; | ||
} catch (e) { | ||
alert(e); | ||
} | ||
document.getElementById('output').innerHTML = JSON.stringify(output); | ||
} | ||
|
||
function saveAnnot() { | ||
try { | ||
let doc = JSON.parse(document.getElementById('output')); | ||
} catch (e) { | ||
alert(e); | ||
} | ||
store.addMark(doc).then((x)=>alert('done!')).catch((e)=>alert(e)); | ||
} |
File renamed without changes.
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
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