class DImageWriter writes DImage objects to files.
More...
Public Member Functions | |
| def | DImageWriter (fileName, format=None) |
Construct a DImageWriter object. More... | |
| def | fileName () |
Return the path to the file where to write to. More... | |
| def | setFileName (fileName) |
Set the path to the file where to write to. More... | |
| def | format () |
Return the image format. More... | |
| def | setFormat (format) |
Set the image format. More... | |
| def | write (image) |
Write image to fileName() with the given format. More... | |
Static Public Member Functions | |
| def | write (image, fileName, format=None) |
| Static convenience function: write image directly to a file given file name and format. More... | |
class DImageWriter writes DImage objects to files.
The written header is based on DImage::optionalData(). In particular all variables DImageOptionalData, that can be accessed via convenience functions will be written to the DECTRIS mini header (See www.dectris.com for details about the DECTRIS mini header). If DImageOptionalData::rawHeader() is consistent, the header of the written file is based on it. Possible file formats are "cbf" and "tif". They are determined either by the filename suffix or by the format string passed as format argument to the constructor or to write(). Float images may be written to tif files only. If format is "cbf" float images are casted to integer images before they are written.
| def dectris.albula.DImageWriter.DImageWriter | ( | fileName, | |
format = None |
|||
| ) |
Construct a DImageWriter object.
| fileName | String type argument that denotes the file where write() writes to. |
| format | Format string. Either None, or "cbf" or "tif". If None format is determined by the suffix of fileName. |
| def dectris.albula.DImageWriter.fileName | ( | ) |
Return the path to the file where to write to.
| def dectris.albula.DImageWriter.format | ( | ) |
Return the image format.
| def dectris.albula.DImageWriter.setFileName | ( | fileName | ) |
Set the path to the file where to write to.
| fileName | String type argument that denotes the file where write() writes to. |
| def dectris.albula.DImageWriter.setFormat | ( | format | ) |
Set the image format.
| format | Format string. Either "cbf" or "tif". |
| def dectris.albula.DImageWriter.write | ( | image | ) |
Write image to fileName() with the given format.
Eventually throws an DException.
| image | DImage. |
|
static |
Static convenience function: write image directly to a file given file name and format.
If format is None try to figure out the format from the file ending.