Files
image-sequencer/index.html
Chinmay Pandhare (CCD) 38a569b958 Fix for Issue9 : Error while adding a new step from HTML UI, A small fix for #7 (#16)
* Fix : add a step in the demo

* Change global variable to document.sequencer_image

* Change global variable to document.sequencer_image

* Small fix for FireFox; Ref: Issue #7

* Change document.sequencer_image to options.image

* Change document.sequencer_image to options.initial_image

* Completed the addStep issue.

* Completed the addStep issue.

* Change options.initial_image to options.initialImage

* Added Crop Module

* lowercase parameters

* Merging Crop.js

* Merging Crop.js

* Merging Crop.js
2017-03-14 16:33:55 -04:00

88 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Image Sequencer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=UTF8">
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="dist/image-sequencer.css" rel="stylesheet">
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="dist/image-sequencer.js"></script>
</head>
<body>
<div class="header">
<h1>Image Sequencer</h1>
<h3>
<a href="https://github.com/jywarren/image-sequencer"><i class="fa fa-github"></i></a>
</h3>
</div>
<p style="display:none;" class="spinner"><i class="fa fa-spinner fa-spin"></i></p>
<div class="panels">
<div class="panel ismod-image-select">
<div class="mod-drop">Drag image here</div>
<p class="instructions">Select or drop an image here to begin.</p>
<input id="file-select" type="file" />
</div>
</div>
<div class="mod-new-panel">
<form class="mod-new-panel">
<p class="instructions">Add a new step</p>
<select class="select-module form-control" style="margin-bottom:6px;">
<option value="ndvi-red">NDVI with red filter</option>
<option value="green-channel">Green channel</option>
<option value="plot">Plot with colorbar</option>
<option value="image-threshold">Threshold image</option>
</select>
<p><button class="btn btn-default add-step">Add step</button></p>
</form>
</div>
<div class="log">
<h4>Log</h4>
</div>
<script>
var sequencer;
jQuery(document).ready(function($) {
sequencer = ImageSequencer();
sequencer.loadImage('examples/grid.png');
sequencer.addStep('ndvi-red');
sequencer.addStep('image-threshold');
sequencer.addStep('crop');
//sequencer.addStep('plot');
$('.add-step').click(function(e) {
e.preventDefault();
sequencer.addStep($('.select-module').val());
sequencer.run(sequencer.options.initialImage); // later we might only run this step, if we can fetch the image output from the previous
});
});
</script>
</body>
</html>