Differences between revisions 10 and 12 (spanning 2 versions)
Revision 10 as of 2016-08-08 19:46:11
Size: 4640
Editor: EricPalmer
Revision 12 as of 2016-08-08 20:12:41
Size: 4675
Editor: EricPalmer
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
   chmod a+x ../updateDisplay-eep
Line 80: Line 81:
<a href=static/landmarks/en/c060a58b6cfa20b0061596da81e39ba44613fc7f>landmarks</a> <a href=static/landmarks/en/8eeab8f3d8effb709050e5f13a0f95a219438e80>landmarks</a>
Line 91: Line 92:
<a href=static/register/en/a170d2c69cc3c075f0b19b8e637e8616cefa4fd6>register</a> <a href=static/register/en/f97d644ccc0a7d42ec2fa1ddfb7a298c6fa60507>register</a>
Line 100: Line 101:
<a href=static/autoregister/en/0e54b8496c154e89464d2dda0274662cf1235735>autoregister</a> <a href=static/autoregister/en/be03f6665da7358d033396e85df4a4b71468bb98>autoregister</a>



  • 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


      Mac OSX server




  • 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


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.


while [ 1 ]
        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


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

SPC Tools
<hr>SPC Tools</hr>

Here are some tools that make aligning things in SPC easier.

<a href=static/landmarks/en/8eeab8f3d8effb709050e5f13a0f95a219438e80>landmarks</a>
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, \<Img#\>
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

<a href=static/register/en/f97d644ccc0a7d42ec2fa1ddfb7a298c6fa60507>register</a>
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<BR><BR>

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

<a href=static/autoregister/en/be03f6665da7358d033396e85df4a4b71468bb98>autoregister</a>
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<BR><BR>

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

<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.
<UL>Note - if your internet connection is slow, you might need to increase the
sleep delay</UL>


while [ 1 ]
        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


updateDisplay (last edited 2016-08-08 20:12:41 by EricPalmer)