Project

General

Profile

Redux » History » Revision 8

Revision 7 (Anchi Cheng, 02/23/2012 10:51 AM) → Revision 8/12 (Anchi Cheng, 07/10/2012 10:28 AM)

h1. redux 

 redux is a library for loading an image, doing some basic processing and generating a viewable image. 

 !redux_basic_idea.png! 

 h2. Goals 

 * simple to use python library 
 * simple to use network daemon that can answer requests for an image and the pipeline of processing to do on it 
 * simple to use command line client that uses either the network daemon or locally imported python library to do processing 
 * complex behind-the-scenes result caching 

 h2. Potential uses 

 * a command line program like xv or imagemagick to view myami images and generate publication quality results 
 * preparing image for display in Leginon, including contrast adjustments, binning, power spectrum, etc 
 * any functions in leginon/appion where you need to either bin or calculate power spectrum 
 * 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 

 h2. Current design as of 5/12/2011 

 !redux_more_detail.png! 

 h2. New Ideas as of 7/13/2011 

 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": 
 <pre>gst-launch filesrc location=example.png ! pngdec ! jpegenc ! filesink location=test.jpg</pre> 

 h2. README file: 

 <pre> 
 INTRODUCTION 
 Redux is a utility for running a pipeline of simple image processing routines. 
 The main purpose is to produce display worthy images (JPEG, PNG, etc) from 
 raw MRC images.    It includes a caching mechanism to reduce processing time at 
 the expence of disk or memory usage. 

 INSTALL: 
 prerequisites: python2.6 and above, numpy, scipy, pyfilesystem, pyami, numextension, gdbm,fftw3 numextension 
	 Install using "python setup.py install" or just use a local sandbox and just 
 make sure redux is in your pythonpath 

 [[Using Redux to serve images on myamiweb]] 

 USING IT: 
 There are two basic ways to use redux.    The first is to use it directly as a 
 python package.    You import redux and do processing in your python script. 
 The second is to start a redux server, which can be located elsewhere on your 
 network.    You then make requests to the server using the client of your choice 
 (python, php, etc.). 

 TRY IT: 
	 Run the stand-alone redux script (bin/redux).    Without any options or 
 arguments, it will print out a help message. 

 To Do: 
	 cache management, clean up old files, etc. 
	 server and client config scripts 
	 security 
 </pre>