EMAN2
Functions
emdata_transform.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

EMData * do_fft () const
 $Id$
void do_fft_inplace ()
 Do FFT inplace.
EMData * do_ift ()
 return the inverse fourier transform (IFT) image of the current image.
void do_ift_inplace ()
std::string render_amp8 (int x, int y, int xsize, int ysize, int bpl, float scale, int min_gray, int max_gray, float min_render, float max_render, float gamma, int flags)
 Render the image into an 8-bit image.
std::string render_ap24 (int x, int y, int xsize, int ysize, int bpl, float scale, int min_gray, int max_gray, float min_render, float max_render, float gamma, int flags)
 Render the image into an 8-bit image.
void render_amp24 (int x, int y, int xsize, int ysize, int bpl, float scale, int min_gray, int max_gray, float min_render, float max_render, void *ref, void cmap(void *, int coord, unsigned char *tri))
 Render the image into a 24-bit image.
void ri2ap ()
 convert the complex image from real/imaginary to amplitude/phase
void ap2ri ()
 convert the complex image from amplitude/phase to real/imaginary
void ri2inten ()
 convert the complex image from real/imaginary to Intensity/0.
EMData * bispecRotTransInvN (int N, int NK)
 This computes the rotational and translational bispectral invariants of an image.
EMData * bispecRotTransInvDirect (int type=0)
 This computes the rotational and translational bispectral invariants of an image.
void insert_clip (const EMData *const block, const IntPoint &origin)
 Insert a clip into this image.
void insert_scaled_sum (EMData *block, const FloatPoint &center, float scale=1.0, float mult_factor=1.0)
 Add a scaled image into another image at a specified location.

Function Documentation

void ap2ri ( )

convert the complex image from amplitude/phase to real/imaginary

Referenced by EMAN::EMData::ap2ri(), EMAN::EMData::do_ift(), EMAN::EMData::do_ift_inplace(), and EMAN::EMData::ri2inten().

EMData* bispecRotTransInvDirect ( int  type = 0)

This computes the rotational and translational bispectral invariants of an image.

the output is a single 3d Volume whose x,y labels are lengths, corresponding to the two lengths of sides of a triangle the z label is for the angle

EMData* bispecRotTransInvN ( int  N,
int  NK 
)

This computes the rotational and translational bispectral invariants of an image.

The invariants are labelled by the Fourier Harmonic label given by N. fVec is the real input image NK is the number of Fourier components one wishes to use in calculating this bispectrum the output is a single 2D image whose x,y labels are lengths, corresponding to the two lengths of sides of a triangle

EMData* do_fft ( ) const

$Id$

This file is a part of "emdata.h", to use functions in this file, you should "#include "emdata.h", NEVER directly include this file. return the fast fourier transform (FFT) image of the current image. the current image is not changed. The result is in real/imaginary format.

Returns:
The FFT of the current image in real/imaginary format.

Referenced by EMAN::EMData::bispecRotTransInvDirect(), EMAN::EMData::bispecRotTransInvN(), EMAN::EMData::FourInterpol(), and EMAN::EMData::FourTruncate().

void do_fft_inplace ( )

Do FFT inplace.

And return the FFT image.

Returns:
The FFT of the current image in real/imaginary format.
EMData* do_ift ( )

return the inverse fourier transform (IFT) image of the current image.

the current image may be changed if it is in amplitude/phase format as opposed to real/imaginary format - if this change is performed it is not undone.

Exceptions:
ImageFormatExceptionIf the image is not a complex image.
Returns:
The current image's inverse fourier transform image.
void do_ift_inplace ( )
void insert_scaled_sum ( EMData *  block,
const FloatPoint &  center,
float  scale = 1.0,
float  mult_factor = 1.0 
)

Add a scaled image into another image at a specified location.

This is used, for example, to accumulate gaussians in programs like pdb2mrc.py. The center of 'block' will be positioned at 'center' with scale factor 'scale'. Densities will be interpolated in 'block' and multiplied by 'mult'.

Parameters:
blockThe image to inserted.
centerThe center of the inserted block in 'this'.
scaleScale factor.
mult_factorNumber used to multiply the block's densities.
Exceptions:
ImageDimensionExceptionIf 'this' image is not 2D/3D.
void render_amp24 ( int  x,
int  y,
int  xsize,
int  ysize,
int  bpl,
float  scale,
int  min_gray,
int  max_gray,
float  min_render,
float  max_render,
void *  ref,
void   cmapvoid *, int coord, unsigned char *tri 
)

Render the image into a 24-bit image.

2D image only.

Parameters:
x
y
xsize
ysize
bpl
scale
min_gray
max_gray
min_render
max_render
ref
cmap
Exceptions:
ImageDimensionExceptionIf the image is not 2D.
std::string render_amp8 ( int  x,
int  y,
int  xsize,
int  ysize,
int  bpl,
float  scale,
int  min_gray,
int  max_gray,
float  min_render,
float  max_render,
float  gamma,
int  flags 
)

Render the image into an 8-bit image.

2D images only. flags provide a way to do unusual things with this function, such as calculating a histogram of the rendered area.

Parameters:
xorigin of the area to render
y
xsizesize of the area to render in output pixels
ysize
bplbytes per line, if asrgb remember *3
scalescale factor for rendering
min_grayminimum gray value to render (0-255)
max_graymaximum gray value to render (0-255)
min_renderfloat image density corresponding to min_gray
max_renderfloat image density corresponding to max_gray
gamma
flags1-duplicate each output pixel 3x for RGB rendering,2-add a 256 int greyscale histogram to the end of the image array,4-invert y axis,8-render 32 bit 0xffRRGGBB
Exceptions:
ImageDimensionExceptionIf the image is not 2D.
std::string render_ap24 ( int  x,
int  y,
int  xsize,
int  ysize,
int  bpl,
float  scale,
int  min_gray,
int  max_gray,
float  min_render,
float  max_render,
float  gamma,
int  flags 
)

Render the image into an 8-bit image.

2D images only. flags provide a way to do unusual things with this function, such as calculating a histogram of the rendered area.

Parameters:
xorigin of the area to render
y
xsizesize of the area to render in output pixels
ysize
bplbytes per line, if asrgb remember *3
scalescale factor for rendering
min_grayminimum gray value to render (0-255)
max_graymaximum gray value to render (0-255)
min_renderfloat image density corresponding to min_gray
max_renderfloat image density corresponding to max_gray
gamma
flags1-duplicate each output pixel 3x for RGB rendering,2-add a 256 int greyscale histogram to the end of the image array,4-invert y axis,8-render 32 bit 0xffRRGGBB
Exceptions:
ImageDimensionExceptionIf the image is not 2D.
void ri2ap ( )

convert the complex image from real/imaginary to amplitude/phase

Referenced by EMAN::EMData::render_amp24(), and EMAN::EMData::render_ap24().

void ri2inten ( )

convert the complex image from real/imaginary to Intensity/0.

This conversion cannot be reversed, and the image remains marked as R/I