We developed a simple software tool to speed up the identification of vertex points in an image.  The software was quite simple:  It loaded an image; then whenever the user clicked on a location in the image, the program would log the location of that click.  It accumulated a list of click locations that could be imported into a data-analysis program such as Microsoft Excel.

The tool was written as a Web page using HTML augmented with JavaScript.  It ran within the Mozilla Firefox 3.0 Web browser.  Its code was included within Appendix \ref{[Appropriate Section Reference Here]}.



\begin{verbatim}

<html>
<head>
<title>Image Pos Calc</title>
<script language="JavaScript">
function onImgClick(event) {
  txt = document.getElementById('text_out');
  txt.value += event.layerX + " " + event.layerY + "\n";
  txt.scrollTop = txt.scrollHeight;
}

function onImgMouseover(event) {
  x = document.getElementById('xcoord');
  y = document.getElementById('ycoord');

  x.innerHTML = String(event.layerX);
  y.innerHTML = String(event.layerY);
}

function updatePhoto() {
  document.getElementById('scan_image').src = document.getElementById('target_img_file').value;
}
</script>
</head>
<body style="margin: 0">

<img src="" onclick="onImgClick(event);" onmousemove="onImgMouseover(event);" id="scan_image" />

<br />

<label for="target_img_file">Image to View:</label><input type="textbox" id="target_img_file" /><input type="button" value="Update" onclick="updatePhoto();" />

<br />

(<span id="xcoord">0</span>, <span id="ycoord">0</span>)

<br />

<textarea id="text_out" cols="80" rows="24"></textarea>

</body>
</html>


\end{verbatim}