updateDisplay

Description

updateDisplay is a nifty tool that is used to visually inspect images, bigmaps, and shape models. from lithos, register, and autoregister

It is part of the "spc_tools" suite.

It uses the standard, unmodified output from SPC, encloses it within a GUI built in javascript.

It allows accurate positional analysis.

Set Up

You must be running a webserver.

Apache is installed by default on Mac OS X.

You must start it manually.

sudo apachectl start

You must identify the webserver path.

Mac OS

/Library/WebServer/Documents

Mac OSX server

/Library/Server/Web/Data/Sites/Default

Linux

/var/html

The spc_tools needs to be installed in the web server's root directory.

It should be called "static".

You need to make a "data" directory in the web server's root directory.

You must have write permissions to that directory.

If multiple people are running spc_tools, then you may need to create a subdirectory within data, such as ep, tc, dl, jw.

ls /Library/WebServer/Documents data/ index.html static/

Put the updateDisplay script in the directory above your working directory. Then type the following into the working directory:

cd Bennu chmod a+x ../updateDisplay-eep nohup ../updateDisplay-eep & tail -f nohup

updateDisplay-eep

The file updateDisplay-eep should look like this. It is usually best to name the updateDisplay with your initials to help deconflict your process from other people's processes when running on the same server.

#path="/Library/Server/Web/Data/Sites/Default/data/"#path="/Library/Server/Web/Data/Sites/Default/data/ep/"path="/Library/WebServer/Documents/data"while [ 1 ]do convert LMRK_DISPLAY1.pgm landmarks.jpg /bin/mv -f $path/landmarks.jpg $path/old-landmarks.jpg /bin/mv -f landmarks.jpg $path/landmarks.jpg convert LMRK_DISPLAY1.pgm autoregister.jpg /bin/mv -f $path/autoregister.jpg $path/old-autoregister.jpg /bin/mv -f autoregister.jpg $path/autoregister.jpg convert TEMPFILE.pgm $path/register.jpg convert TEMPFILE.ppm $path/registerC.jpg cp 1.jpg $path/1.jpg sleep 5done

index.html

The index.html file: (Note, you may need to update the hash links (the long string of seemingly random characters)

<htdoc><head><title>SPC Tools</title></head><body><hr>SPC Tools</hr>Here are some tools that make aligning things in SPC easier.<H2>Landmarks</H2><BR><a href=static/landmarks/en/8eeab8f3d8effb709050e5f13a0f95a219438e80>landmarks</a><BR><BR>This is designed to use LMRK_DISPLAY1.pgm to aid alignment in lithos. You click on a keyfeature, then for all the other images, you click and drag the feature to the red dot.The text will tell you the x and y to type into lithos, option 1, 1, \<Img#\><BR>You need to convert the pgm file into a jpg and place it in the server path<BR><BR>convert LMRK_DISPLAY.pgm /Library/WebServer/Documents/data/landmarks.jpg<H2>Register</H2><a href=static/register/en/f97d644ccc0a7d42ec2fa1ddfb7a298c6fa60507>register</a><BR><BR>Here you just click on the same feature in both images. The red dot is forthe source image, while the green dot is for the shape model. The texttells you what to type in for register<BR><BR>convert TEMPFILE.pgm /Library/WebServer/Documents/data/register.jpg<H2>Autoregister</H2><a href=static/autoregister/en/be03f6665da7358d033396e85df4a4b71468bb98>autoregister</a><BR><BR>Here you just click on the same feature in both images. The red dot is forthe source image, while the green dot is for the shape model. The texttells you what to type in for register<BR><BR>convert LMRK_DISPLAY.pgm /Library/WebServer/Documents/data/autoregister.jpg<BR><BR><H4>Helpful script</H4>You can run this script in the background when you are doing a lot of work.Every second, it will update the images used in the programs from your directory.<BR><UL>Note - if your internet connection is slow, you might need to increase thesleep delay</UL><pre>#!/bin/bashwhile [ 1 ]do convert LMRK_DISPLAY1.pgm /Library/WebServer/Documents/data/landmarks.jpg convert LMRK_DISPLAY1.pgm /Library/WebServer/Documents/data/autoregister.jpg convert LE.pgm /Library/WebServer/Documents/data/register.jpg sleep 5done</pre></body></htdoc>