fabio.GEimage
index
/usr/lib/pymodules/python2.6/fabio/GEimage.py

# Reads the header from a GE a-Si Angio Detector
# Using version 8001 of the header from file:
#     c:\adept\core\DefaultImageInfoConfig.csv
#
#  Antonino Miceli
#  Thu Jan  4 13:46:31 CST 2007
#

 
Modules
       
fabio
logging
numpy
struct

 
Classes
       
fabio.fabioimage.fabioimage
GEimage

 
class GEimage(fabio.fabioimage.fabioimage)
     Methods defined here:
getframe(self, num)
Returns a frame as a new fabioimage object
next(self)
Get the next image in a series as a fabio image
previous(self)
Get the previous image in a series as a fabio image
read(self, fname, frame=0)
Read in header into self.header and
the data   into self.data
write(self, fname, force_type=<type 'numpy.uint16'>)
Not yet implemented

Methods inherited from fabio.fabioimage.fabioimage:
__init__(self, data=None, header=None)
Set up initial values
add(self, other)
Add another Image - warnign, does not clip to 16 bit images by default
getheader(self)
returns self.header
getmax(self)
Find max value in self.data, caching for the future
getmean(self)
return the mean
getmin(self)
Find min value in self.data, caching for the future
getstddev(self)
return the standard deviation
integrate_area(self, coords)
Sums up a region of interest 
if len(coords) == 4 -> convert coords to slices
if len(coords) == 2 -> use as slices
floor -> ? removed as unused in the function.
make_slice(self, coords)
Convert a len(4) set of coords into a len(2) 
tuple (pair) of slice objects
the latter are immutable, meaning the roi can be cached
readheader(self, filename)
Call the _readheader function...
rebin(self, x_rebin_fact, y_rebin_fact)
Rebin the data and adjust dims
resetvals(self)
Reset cache - call on changing data
toPIL16(self, filename=None)
Convert to Python Imaging Library 16 bit greyscale image
 
FIXME - this should be handled by the libraries now
update_header(self, **kwds)
update the header entries
by default pass in a dict of key, values.

 
Functions
       
demo()

 
Data
        GE_HEADER_INFO = [('ImageFormat', 10, None), ('VersionOfStandardHeader', 2, '=H'), ('StandardHeaderSizeInBytes', 4, '=L'), ('VersionOfUserHeader', 2, '=H'), ('UserHeaderSizeInBytes', 4, '=L'), ('NumberOfFrames', 2, '=H'), ('NumberOfRowsInFrame', 2, '=H'), ('NumberOfColsInFrame', 2, '=H'), ('ImageDepthInBits', 2, '=H'), ('AcquisitionDate', 20, None), ('AcquisitionTime', 20, None), ('DUTID', 20, None), ('Operator', 50, None), ('DetectorSignature', 20, None), ('TestSystemName', 20, None), ('TestStationRevision', 20, None), ('CoreBundleRevision', 20, None), ('AcquisitionName', 40, None), ('AcquisitionParameterRevision', 20, None), ('OriginalNumberOfRows', 2, '=H'), ...]