= updateDisplay = === Description === * updateDisplay is a nifty tool that is used to visually inspect images, bigmaps, and shape models. from [[lithos]], [[register|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. {{{ #!/bin/bash #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 5 done }}} ==== index.html ==== The index.html file: (Note, you may need to update the hash links (the long string of seemingly random characters) {{{ SPC Tools
SPC Tools Here are some tools that make aligning things in SPC easier.

Landmarks


landmarks

This is designed to use LMRK_DISPLAY1.pgm to aid alignment in lithos. You click on a key feature, 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, \
You need to convert the pgm file into a jpg and place it in the server path

convert LMRK_DISPLAY.pgm /Library/WebServer/Documents/data/landmarks.jpg

Register

register

Here you just click on the same feature in both images. The red dot is for the source image, while the green dot is for the shape model. The text tells you what to type in for register

convert TEMPFILE.pgm /Library/WebServer/Documents/data/register.jpg

Autoregister

autoregister

Here you just click on the same feature in both images. The red dot is for the source image, while the green dot is for the shape model. The text tells you what to type in for register

convert LMRK_DISPLAY.pgm /Library/WebServer/Documents/data/autoregister.jpg

Helpful script

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.
#!/bin/bash

while [ 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 5
done
}}}