From 2d9541e09a8cbb90be662d3bd96ee6bc0d3322a8 Mon Sep 17 00:00:00 2001 From: Andreas Schenk <andreas_schenk@hms.harvard.edu> Date: Mon, 18 Jun 2012 13:12:10 -0400 Subject: [PATCH] added more detailed image format documentation --- modules/io/doc/image_formats.rst | 126 ++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) diff --git a/modules/io/doc/image_formats.rst b/modules/io/doc/image_formats.rst index 3219b231a..0764bb573 100644 --- a/modules/io/doc/image_formats.rst +++ b/modules/io/doc/image_formats.rst @@ -11,6 +11,12 @@ Format used by the ccp4 software package * File import: *yes* * File export: *yes* +.. class:: ost.io.CCP4(normalize_on_save=false, endianess_on_save=OST_LOCAL_ENDIAN) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + :param endianess_on_save: Byte order for saving. + :type endianess_on_save: ost.io.Endianess DAT @@ -23,6 +29,16 @@ Simple binary format for square images * File import: *yes* * File export: *yes* +.. class:: ost.io.DAT(normalize_on_save=false, format=OST_DEFAULT_FORMAT, signed=false, endianess=OST_LOCAL_ENDIAN) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + :param format: Data format for loading and saving. + :type format: ost.io.Format + :param signed: Determines wether data is interpreted as signed or unsigned values during loading and saving. + :type signed: bool + :param endianess: Byte order for loading and saving. + :type endianess: ost.io.Endianess DF3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -34,6 +50,12 @@ PovRay Density file format * File import: *no* * File export: *yes* +.. class:: ost.io.DF3(normalize_on_save=false) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + + DM3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -44,6 +66,8 @@ Format used by Gatan Inc.'s Digital Micrograph software * File import: *yes* * File export: *no* +.. class:: ost.io.DM3( ) + DX ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -54,6 +78,12 @@ Format used by the OpenDX software package * File import: *yes* * File export: *yes* +.. class:: ost.io.DX(normalize_on_save=false) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + + IPL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -64,6 +94,13 @@ Ditabis Micron Image Plate Scanner Format * File import: *yes* * File export: *yes* +.. class:: ost.io.IPL(normalize_on_save=false, format=OST_DEFAULT_FORMAT) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + :param format: Data format for loading and saving. + :type format: ost.io.Format + JPK ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -74,6 +111,21 @@ Format used by JPK Instruments AG's software (Customized Tiff format) * File import: *yes* * File export: *yes* + + +.. class:: ost.io.JPK(normalize_on_save=indeterminate, format=OST_DEFAULT_FORMAT, signed=false, phasecolor=false, subimage=-1) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: tribool + :param format: Data format for loading and saving. + :type format: ost.io.Format + :param signed: Determines wether data is interpreted as signed or unsigned values during loading and saving. + :type signed: bool + :param phasecolor: Determines wether the phases of complex values are encoded as color information. + :type phasecolor: bool + :param subimage: Determines which subimage is read from a multi-image jpk (-1 = default image). + :type subimage: int + MRC ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -84,7 +136,22 @@ Format used by the MRC software package * File import: *yes* * File export: *yes* -NanoScope +.. class:: ost.io.MRC(normalize_on_save=false, subformat=MRC_NEW_FORMAT, endianess_on_save=OST_LOCAL_ENDIAN) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + :param subformat: Determines wether old style or new style mrc files should be saved. + :type subformat: ost.io.Subformat + :param endianess_on_save: Byte order for saving. + :type endianess_on_save: ost.io.Endianess + +.. py:class:: ost.io.Subformat + + .. py:attribute:: MRC_AUTO_FORMAT + .. py:attribute:: MRC_OLD_FORMAT + .. py:attribute:: MRC_NEW_FORMAT + +Nanoscope ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Format used by software from Veeco @@ -94,6 +161,12 @@ Format used by software from Veeco * File import: *yes* * File export: *yes* +.. class:: ost.io.Nanoscope(subimage=-1) + + :param subimage: Determines which subimage is read from a multi-image nanoscope file (-1 = default image). + :type subimage: int + + PNG ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -104,6 +177,11 @@ Portable Network Graphic image format * File import: *yes* * File export: *yes* +.. class:: ost.io.PNG(normalize_on_save=false) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + Situs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -114,6 +192,11 @@ Format used by the Situs software package * File import: *yes* * File export: *yes* +.. class:: ost.io.Situs(normalize_on_save=false) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + Spider ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -124,7 +207,14 @@ Format used by the Spider software package * File import: *yes* * File export: *yes* -TIFF +.. class:: ost.io.Spider(normalize_on_save=false, endianess_on_save=OST_LOCAL_ENDIAN) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: bool + :param endianess_on_save: Byte order for saving. + :type endianess_on_save: ost.io.Endianess + +TIF ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Tagged Image File Format @@ -134,3 +224,35 @@ Tagged Image File Format * File import: *yes* * File export: *yes* +.. class:: ost.io.TIF(normalize_on_save=indeterminate, format=OST_DEFAULT_FORMAT, signed=false, phasecolor=false, subimage=-1) + + :param normalize_on_save: Determines wether to renormalize image upon saving. + :type normalize_on_save: tribool + :param format: Data format for loading and saving. + :type format: ost.io.Format + :param signed: Determines wether data is interpreted as signed or unsigned values during loading and saving. + :type signed: bool + :param phasecolor: Determines wether the phases of complex values are encoded as color information. + :type phasecolor: bool + :param subimage: Determines which subimage is read from a multi-image tif (-1 = default image). + :type subimage: int + +Common parameters +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. py:class:: ost.io.Endianess + + .. py:attribute:: OST_BIG_ENDIAN + .. py:attribute:: OST_LITTLE_ENDIAN + .. py:attribute:: OST_VAX_DATA + .. py:attribute:: OST_LOCAL_ENDIAN + +.. py:class:: ost.io.Format + + .. py:attribute:: OST_BIT8_FORMAT + .. py:attribute:: OST_BIT16_FORMAT + .. py:attribute:: OST_BIT32_FORMAT + .. py:attribute:: OST_FLOAT_FORMAT + .. py:attribute:: OST_DOUBLE_FORMAT + .. py:attribute:: OST_DEFAULT_FORMAT + -- GitLab