Redux » History » Version 8
Anchi Cheng, 07/10/2012 10:28 AM
1 | 3 | Jim Pulokas | h1. redux |
---|---|---|---|
2 | 2 | Jim Pulokas | |
3 | 3 | Jim Pulokas | redux is a library for loading an image, doing some basic processing and generating a viewable image. |
4 | 1 | Jim Pulokas | |
5 | 3 | Jim Pulokas | !redux_basic_idea.png! |
6 | |||
7 | 4 | Jim Pulokas | h2. Goals |
8 | |||
9 | 1 | Jim Pulokas | * simple to use python library |
10 | * simple to use network daemon that can answer requests for an image and the pipeline of processing to do on it |
||
11 | * simple to use command line client that uses either the network daemon or locally imported python library to do processing |
||
12 | * complex behind-the-scenes result caching |
||
13 | |||
14 | 4 | Jim Pulokas | h2. Potential uses |
15 | |||
16 | 1 | Jim Pulokas | * a command line program like xv or imagemagick to view myami images and generate publication quality results |
17 | * preparing image for display in Leginon, including contrast adjustments, binning, power spectrum, etc |
||
18 | * any functions in leginon/appion where you need to either bin or calculate power spectrum |
||
19 | * preparing image for display on web pages. web server can contact redux server. this can replace php-mrc module which no longer compiles with php > 5.2 |
||
20 | 4 | Jim Pulokas | |
21 | h2. Current design as of 5/12/2011 |
||
22 | 3 | Jim Pulokas | |
23 | !redux_more_detail.png! |
||
24 | 5 | Jim Pulokas | |
25 | h2. New Ideas as of 7/13/2011 |
||
26 | |||
27 | Investigating "gstreamer":http://gstreamer.freedesktop.org as a framework on which to build redux. gstreamer allows plugins called "elements" to be connected together to form a pipeline or graph that does multimedia processing. Here is an example application built using the command line program "gst-launch": |
||
28 | <pre>gst-launch filesrc location=example.png ! pngdec ! jpegenc ! filesink location=test.jpg</pre> |
||
29 | 6 | Neil Voss | |
30 | h2. README file: |
||
31 | |||
32 | <pre> |
||
33 | INTRODUCTION |
||
34 | Redux is a utility for running a pipeline of simple image processing routines. |
||
35 | The main purpose is to produce display worthy images (JPEG, PNG, etc) from |
||
36 | raw MRC images. It includes a caching mechanism to reduce processing time at |
||
37 | the expence of disk or memory usage. |
||
38 | |||
39 | INSTALL: |
||
40 | 8 | Anchi Cheng | prerequisites: python2.6 and above, numpy, scipy, pyfilesystem, pyami, numextension, gdbm,fftw3 |
41 | 6 | Neil Voss | Install using "python setup.py install" or just use a local sandbox and just |
42 | 1 | Jim Pulokas | make sure redux is in your pythonpath |
43 | 8 | Anchi Cheng | |
44 | [[Using Redux to serve images on myamiweb]] |
||
45 | 6 | Neil Voss | |
46 | USING IT: |
||
47 | There are two basic ways to use redux. The first is to use it directly as a |
||
48 | python package. You import redux and do processing in your python script. |
||
49 | The second is to start a redux server, which can be located elsewhere on your |
||
50 | network. You then make requests to the server using the client of your choice |
||
51 | (python, php, etc.). |
||
52 | |||
53 | TRY IT: |
||
54 | Run the stand-alone redux script (bin/redux). Without any options or |
||
55 | arguments, it will print out a help message. |
||
56 | |||
57 | To Do: |
||
58 | cache management, clean up old files, etc. |
||
59 | server and client config scripts |
||
60 | security |
||
61 | </pre> |