/Users/bernard/b20/bsoft/src/rwimg/rwimg.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/rwimg/rwimg.cpp - Library for 2D and 3D image I/O.

SYNOPSIS

#include 'rwimg.h'
#include 'file_util.h'
#include 'UnitCell.h'
#include 'Complex.h'
#include 'Vector3.h'
#include 'utilities.h'
#include 'rwRAW.h'
#include 'rwASCII.h'
#include 'rwBCR.h'
#include 'rwBIORAD.h'
#include 'rwBRIX.h'
#include 'rwBrookhavenSTEM.h'
#include 'rwCCP4.h'
#include 'rwDI.h'
#include 'rwDM.h'
#include 'rwDSN6.h'
#include 'rwDX.h'
#include 'rwEM.h'
#include 'rwGOODFORD.h'
#include 'rwGRD.h'
#include 'rwHKL.h'
#include 'rwIMAGIC.h'
#include 'rwIP.h'
#include 'rwJPEG.h'
#include 'rwkernel.h'
#include 'rwMFF.h'
#include 'rwMIFF.h'
#include 'rwMRC.h'
#include 'rwPIC.h'
#include 'rwPIF.h'
#include 'rwPNG.h'
#include 'rwPNM.h'
#include 'rwPostScript.h'
#include 'rwSER.h'
#include 'rwSitus.h'
#include 'rwSPE.h'
#include 'rwSPIDER.h'
#include 'rwSUPRIM.h'
#include 'rwTGA.h'
#include 'rwTIFF.h'
#include 'rwXPLOR.h'

  Functions
Bimage * read_img (char *filename, int readdata, int img_select)
General driver function to read multiple image formats.
Bimage * read_img (Bstring filename, int readdata, int img_select)
Bimage * read_img (string filename, int readdata, int img_select)
int write_img (const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
int write_img (Bstring filename, Bimage *p, int compression)
int write_img (string filename, Bimage *p, int compression)
int img_convert_fourier_one (Bimage *p, Complex< float > *nufdata, int n, long hermx, long friedel, long oldx, long nux, long xo1, long xo2, long yo1, long yo2, long zo1, long zo2, int z_even, int y_even)
int img_convert_fourier (Bimage *p, FourierType nutransform)
Converts Fourier transform types.

  Variables
int verbose
const char * month []

Detailed Description

Library for 2D and 3D image I/O.

Author:
    Bernard Heymann

Date:
    Created: 19990321

    Modified: 20180330

Definition in file rwimg.cpp.

Function Documentation

  int img_convert_fourier (Bimage * p, FourierType nutransform)

Converts Fourier transform types.

Parameters:
    *p the image.
    nutransform new transform type.

Returns:
    int error code (<0 means failure). Fourier transform classification: 0=NoTransform: No transform: Just a complex data set 1=Standard: Standard transform with origin = (0,0,0) (Suprim) 2=Centered: Centered transform with origin = (nx/2,ny/2,nz/2) (Imagic) 3=Hermitian: Hermitian transform with origin = (0,0,0) and size (nx/2+1,ny,nz) (Spider, EM) 4=CentHerm: Centered hermitian transform with origin = (0,ny/2,nz/2) and size (nx/2+1,ny,nz) (MRC) Assumption: The correct dimensions for a standard transform is stored in the x, y, and z fields.

Definition at line 556 of file rwimg.cpp.

  int img_convert_fourier_one (Bimage * p, Complex< float > * nufdata, int n, long hermx, long friedel, long oldx, long nux, long xo1, long xo2, long yo1, long yo2, long zo1, long zo2, int z_even, int y_even)

Definition at line 462 of file rwimg.cpp.

  Bimage* read_img (char * filename, int readdata, int img_select)

General driver function to read multiple image formats.

Parameters:
    filename file name (plus any tags for the RAW format).
    readdata flag to activate reading of image data.
    img_select image selection in multi-image file (-1 = all images).

Returns:
    Bimage* the image structure, NULL if reading failed. This is the only image reading function that should be called from programs. A Bimage structure is initialized with default values. The file format is deduced from the file name extension. Every file format has its own funtion to read the file. The selection argument is used to read only one image from a multi-image file if it is greater than -1. This selection must be handled within each format to ensure the correct allocation of the sub-image structure. If the requested selection is equal or larger than the number of images, the selection is set to the last image.

Definition at line 76 of file rwimg.cpp.

  Bimage* read_img (Bstring filename, int readdata, int img_select)

Definition at line 82 of file rwimg.cpp.

  Bimage* read_img (string filename, int readdata, int img_select)

Definition at line 87 of file rwimg.cpp.

  int write_img (const char * filename, Bimage * p, int compression)

General driver function to write multiple image formats.

Parameters:
    filename file name (plus any tags for the RAW format).
    *p the image structure.
    compression compression type: 0=none, 5=LZW(Tiff)

Returns:
    int error code (<0 means failure). This is the only image writing function that should be called from programs. The file format is deduced from the file name extension. Every file format has its own funtion to write the file.

Definition at line 280 of file rwimg.cpp.

  int write_img (Bstring filename, Bimage * p, int compression)

Definition at line 287 of file rwimg.cpp.

  int write_img (string filename, Bimage * p, int compression)

Definition at line 292 of file rwimg.cpp.

Variable Documentation

  const char* month[]
Initial value:

= {"Jan","Feb","Mar","Apr","May","Jun",
                    "Jul","Aug","Sep","Oct","Nov","Dec"}

Definition at line 55 of file rwimg.cpp.

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.