1 | ----------------------------------------------------- |
---|
2 | |
---|
3 | FILE VIEWER FOR SAGE |
---|
4 | |
---|
5 | ----------------------------------------------------- |
---|
6 | Author: Ratko Jagodic |
---|
7 | Last Update: April 12, 2008 |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | PREREQUISITES: |
---|
13 | ---------------------------------------------------- |
---|
14 | |
---|
15 | - python 2.3 or later |
---|
16 | - wxPython 2.6 or later |
---|
17 | - for ImageViewer: ImageMagick development libraries (if not already installed, these can probably |
---|
18 | be found on your linux distribution discs) |
---|
19 | - SAGE must be installed already and the $SAGE_DIRECTORY environment variable set up |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | HOW TO INSTALL: |
---|
24 | ---------------------------------------------------- |
---|
25 | |
---|
26 | - type "make install" from this directory |
---|
27 | - this will: |
---|
28 | - compile ImageViewer and imgToDxt |
---|
29 | - copy imageviewer to $SAGE_DIRECTORY/bin, file_server.py, file_server.conf, imgToDxt and dirToDxt.py to $SAGE_DIRECTORY/bin/file_server |
---|
30 | |
---|
31 | - make an entry in the $SAGE_DIRECTORY/appLauncher/sage.conf for ImageViewer, for example (this should work in most cases): |
---|
32 | |
---|
33 | imageviewer { |
---|
34 | configName images |
---|
35 | nodeNum 1 |
---|
36 | Init 100 100 500 500 |
---|
37 | exec 127.0.0.1 imageviewer 127.0.0.1 |
---|
38 | nwProtocol tvTcpModule.so |
---|
39 | } |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | HOW TO RUN: |
---|
45 | ---------------------------------------------------- |
---|
46 | |
---|
47 | - make sure the FileServer is checked in the SageLauncher and click START (it's checked by default) |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | HOW TO SHOW FILES: |
---|
52 | ---------------------------------------------------- |
---|
53 | |
---|
54 | There are three ways to show files: |
---|
55 | (1) drag and drop onto the SAGE UI |
---|
56 | (2) drag and drop onto the SAGE UI's File Library interface (press F2 or Options->File Library) |
---|
57 | (3) from the File Library interface click "Browse" and select a file from your local file system |
---|
58 | |
---|
59 | - by default, the file server will store all the files in the "file_library" directory that's relative to where |
---|
60 | the file_server.py is located. This can be changed in the file_server.conf |
---|
61 | |
---|
62 | - take a look at file_server.conf for more information on how to add other file viewers to support other |
---|
63 | file types. There you can also change file associations and change the default directory where the files are stored |
---|
64 | - you have to have file viewers registered with the file server (in file_server.conf) in order to view those types of files. |
---|
65 | By default images are supported with the ImageViewer that you compiled above. Also, you can download and |
---|
66 | install mplayer from the SAGE website to view a wide variety of movies. |
---|
67 | |
---|
68 | - the ImageViewer will work with images up to roughly 10000 x 10000 pixels and for anything much larger than that, use Magicarpet. |
---|
69 | Actually, there is no theoretical limit on the image size besides the amount of memory but things will get really slow. |
---|
70 | |
---|
71 | |
---|
72 | |
---|
73 | COMPRESSION: |
---|
74 | ---------------------------------------------------- |
---|
75 | |
---|
76 | - Imageviewer now compresses all images into DXT1 format which is 1/8 of the size of the original RGBA data. This makes |
---|
77 | the memory usage much smaller and allows for faster manipulation of image windows. Imageviewer by default checks whether |
---|
78 | a dxt version of the file already exists in the same directory and it loads that instead. If it doesn't exist it converts |
---|
79 | the input image to DXT, saves it to the current directory and streams it to SAGE. If you would like to show the original file |
---|
80 | instead of the DXT version, run Imageviewer with "-show_original" flag. |
---|
81 | |
---|
82 | - if you have a file_library already with a bunch of original files in it, you can run dirToDxt.py and it will make DXT files |
---|
83 | out of all the images in the input directory. Make sure that imgToDxt is compiled and in the same directory as the dirToDxt.py. |
---|
84 | |
---|
85 | Run with something like: |
---|
86 | python dirToDxt.py image_dir |
---|
87 | |
---|