Package fabio :: Module cbfimage :: Class cbfimage
[hide private]
[frames] | no frames]

Class cbfimage

source code

           object --+    
                    |    
fabioimage.fabioimage --+
                        |
                       cbfimage

Read the Cif Binary File data format

Instance Methods [hide private]
 
__init__(self, fname=None)
Constructor of the class CIF Binary File reader.
source code
 
_readheader(self, inStream)
Read in a header in some CBF format from a string representing binary stuff
source code
 
read(self, fname)
Read in header into self.header and...
source code
numpy array
_readbinary_byte_offset(self, inStream)
Read in a binary part of an x-CBF_BYTE_OFFSET compressed image
source code

Inherited from fabioimage.fabioimage: add, getframe, getheader, getmax, getmean, getmin, getstddev, integrate_area, make_slice, next, previous, readheader, rebin, resetvals, toPIL16, update_header, write

Inherited from fabioimage.fabioimage (private): _compressed_stream, _open

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
numpy.ndarrays
analysePython(stream, size)
Analyze a stream of char with any length of exception (2,4, or 8 bytes integers)
source code
numpy.ndarray
analyseWeave(stream, size)
Analyze a stream of char with any length of exception (2,4, or 8 bytes integers)
source code
 
analyseNumpy(stream, size=None)
Analyze a stream of char with any length of exception: 2, 4, or 8 bytes integers
source code
Class Variables [hide private]
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, fname=None)
(Constructor)

source code 

Constructor of the class CIF Binary File reader.

Parameters:
  • fname (string) - the name of the file to open
Overrides: object.__init__

_readheader(self, inStream)

source code 

Read in a header in some CBF format from a string representing binary stuff

Parameters:
  • inStream (opened file.) - file containing the Cif Binary part.
Overrides: fabioimage.fabioimage._readheader

read(self, fname)

source code 

Read in header into self.header and
    the data   into self.data

Overrides: fabioimage.fabioimage.read

analysePython(stream, size)
Static Method

source code 

Analyze a stream of char with any length of exception (2,4, or 8 bytes integers)

Parameters:
  • stream - string representing the compressed data
  • size - the size of the output array (of longInts)
Returns: numpy.ndarrays
data decompressed

analyseWeave(stream, size)
Static Method

source code 

Analyze a stream of char with any length of exception (2,4, or 8 bytes integers)

Returns: numpy.ndarray
data decompressed

analyseNumpy(stream, size=None)
Static Method

source code 

Analyze a stream of char with any length of exception: 
            2, 4, or 8 bytes integers

@return: data decompressed 
@rtype: numpy.ndarrays

_readbinary_byte_offset(self, inStream)

source code 

Read in a binary part of an x-CBF_BYTE_OFFSET compressed image

Parameters:
  • inStream (python string.) - the binary image (without any CIF decorators)
Returns: numpy array
a linear numpy array without shape and dtype set