openflexure-microscope-server/openflexure_microscope/api/templates/index_v1.html
2019-01-22 13:46:46 +00:00

105 lines
3.9 KiB
HTML

<html>
<head>
<title>OpenFlexure Microscope API Demo</title>
<link rel= "stylesheet" type= "text/css" href="{{url_for('static', filename='style_v1.css')}}">
<script type="text/javascript" src="{{url_for('static', filename='main_v1.js')}}"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui, maximum-scale=1.0, user-scalable=0">
</head>
<body>
<div class="row">
<div class="column left" id="left-sb">
<h2>Settings</h2>
Host: <input type="text" id="microscopeHostInput" value="localhost"><br>
Port: <input type="number" id="microscopePortInput" value=5000><br>
<button type="button" onclick="setHostFromInput();">Connect</button>
<h3>Position</h3>
<p>
x: <input type="number" id="x_abs"><br>
y: <input type="number" id="y_abs"><br>
z: <input type="number" id="z_abs"><br>
</p>
<p>
<button type="button" onclick="setStagePositionsFromInput();">GO</button>
<button type="button" onclick="getStagePositions();">Update</button>
</p>
<p>
Doubleclick to position: <input type="checkbox" id="clickPositionCheck" checked><br>
</p>
<h3>Move</h3>
<p>
<b>Up/down/left/right:</b> <br>
Move stage in x-y. <br>
<b>PgUp/PgDn: </b> <br>
Move stage in z/focus.
</p>
<h4>Velocity:</h4>
<div class="flexbox">
<div class="flexgrow">x-y:</div>
<div>
<input type="range" id="stageVelocityInput" min="50" max="200" oninput="clientStageParams.velocityXY = Number(this.value); updateClientValues();">
<input type="text" id="stageVelocityText" size="3" disabled>
</div>
</div>
<div class="flexbox">
<div class="flexgrow">z:</div>
<div>
<input type="range" id="focusVelocityInput" min="10" max="100" oninput="clientStageParams.velocityZ = Number(this.value); updateClientValues();">
<input type="text" id="focusVelocityText" size="3" disabled>
</div>
</div>
<p>Scroll to focus: <input type="checkbox" id="scrollFocusCheck" checked></p>
</div>
<div class="column middle">
<div id="left-sb-btn" class="sb-btn">
<button type="button" onclick="toggleClassToDiv('left-sb', 'hidden');">
<img src="{{url_for('static', filename='icons/baseline-settings-20px.svg')}}">
</button>
</div>
<div id="right-sb-btn" class="sb-btn">
<button type="button" onclick="toggleClassToDiv('right-sb', 'hidden');">
<img src="{{url_for('static', filename='icons/baseline-camera_alt-24px.svg')}}">
</button>
</div>
<div class="scrolltarget" id="streambox">No active stream</div>
</div>
<div class="column right" id="right-sb">
<h2>Capture</h2>
Filename: <br>
<input type="text" id="captureFilenameInput" placeholder="Leave blank for default"><br>
Temporary: <input type="checkbox" id="captureTemporaryCheck"><br>
Full resolution: <input type="checkbox" id="captureFullResolutionCheck"><br>
Keep raw data: <input type="checkbox" id="captureBayerCheck"><br>
Resize capture: <input type="checkbox" id="captureResizeCheck" onclick="newCaptureResizeToggle(this);"><br>
<input type="number" id="captureWidthInput" value="640" style="width: 7em" disabled>
<input type="number" id="captureHeightInput" value="480" style="width: 7em" disabled><br>
<button type="button" onclick="newCaptureFromInput();">Capture</button>
<h2>Captures</h2>
<button type="button" onclick="updateCaptures();">Update</button>
<button type="button" onclick="deleteAllCaptures();">Delete all</button>
<div id="captures"></div>
</div>
</div>
</body>
</html>