fabio.binaryimage.binaryimage

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

# Class binaryimage

source code

               object --+
                        |
    fabioimage.fabioimage --+
                            |
                           binaryimage

This simple library has been made for manipulating exotic/unknown files format.

Binary files images are simple none-compressed 2D images only defined by their : data-type, dimensions, byte order and offset

Instance Methods | [hide private]
__init__(self, *args, **kwargs) Set up initial values | source code
read(self, fname, dim1, dim2, offset=0, bytecode=`'``int32``'`, endian=`'``<``'`) Read a binary image Parameters : fname, dim1, dim2, offset, bytecode, endian fname : file name : str dim1,dim2 : image dimensions : int offset : size of the : int bytecode among : "int8","int16","int32","int64","uint8","uint16","uint32","uint64","float32","float64",... | source code
estimate_offset_value(self, fname, dim1, dim2, bytecode=`'``int32``'`) Estimates the size of a file | source code
write(self, fname) To be overwritten - write the file | source code
Inherited from `fabioimage.fabioimage`: `add`, `convert`, `getclassname`, `getframe`, `getheader`, `getmax`, `getmean`, `getmin`, `getstddev`, `integrate_area`, `load`, `make_slice`, `next`, `previous`, `readROI`, `readheader`, `rebin`, `resetvals`, `save`, `toPIL16`, `update_header` Inherited from `fabioimage.fabioimage` (private): `_compressed_stream`, `_open`, `_readheader` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Static Methods | [hide private]
swap_needed(endian) Decide if we need to byteswap | source code
Inherited from `fabioimage.fabioimage`: `checkData`, `checkHeader`

Class Variables | [hide private]
Inherited from `fabioimage.fabioimage` (private): `_need_a_real_file`, `_need_a_seek_to_read`

Properties | [hide private]
Inherited from `fabioimage.fabioimage`: `classname` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, *args, **kwargs) (Constructor) | source code
Set up initial values Overrides: object.__init__ (inherited documentation)

### read(self, fname, dim1, dim2, offset=0, bytecode=`'``int32``'`, endian=`'``<``'`) | source code
Read a binary image Parameters : fname, dim1, dim2, offset, bytecode, endian fname : file name : str dim1,dim2 : image dimensions : int offset : size of the : int bytecode among : "int8","int16","int32","int64","uint8","uint16","uint32","uint64","float32","float64",... endian among short or long endian ("<" or ">") Overrides: fabioimage.fabioimage.read

### write(self, fname) | source code
To be overwritten - write the file Overrides: fabioimage.fabioimage.write (inherited documentation)