EMAN2
|
Go to the source code of this file.
Functions | |
EMData * | do_fft () const |
This file is a part of "emdata.h", to use functions in this file, you should "#include "emdata.h", NEVER directly include this file. More... | |
void | do_fft_inplace () |
Do FFT inplace. More... | |
EMData * | do_ift () |
return the inverse fourier transform (IFT) image of the current image. More... | |
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. More... | |
EMBytes | 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. More... | |
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. More... | |
void | ri2ap () |
convert the complex image from real/imaginary to amplitude/phase More... | |
void | ap2ri () |
convert the complex image from amplitude/phase to real/imaginary More... | |
void | ri2inten () |
convert the complex image from real/imaginary to Intensity/0. More... | |
EMData * | bispecRotTransInvN (int N, int NK) |
This computes the rotational and translational bispectral invariants of an image. More... | |
EMData * | bispecRotTransInvDirect (int type=0) |
This computes the rotational and translational bispectral invariants of an image. More... | |
void | insert_clip (const EMData *const block, const IntPoint &origin) |
Insert a clip into this image. More... | |
void | insert_scaled_sum (EMData *block, const FloatPoint ¢er, float scale=1.0, float mult_factor=1.0) |
Add a scaled image into another image at a specified location. More... | |
void ap2ri | ( | ) |
convert the complex image from amplitude/phase to real/imaginary
Referenced by EMAN::EMData::apply_radial_func(), do_ift(), do_ift_inplace(), and ri2inten().
EMData * 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
Definition at line 1332 of file emdata_transform.cpp.
References do_fft(), EMAN::EMData::EMData(), get_value_at(), get_xsize(), set_value_at(), sqrt(), write_image(), and x.
EMData * 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
Definition at line 1034 of file emdata_transform.cpp.
References calc_bessel(), do_fft(), EMAN::EMData::EMData(), get_value_at(), get_xsize(), set_size(), set_value_at(), sqrt(), and write_image().
EMData * EMData::do_fft | ( | ) | const |
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.
Definition at line 55 of file emdata_transform.cpp.
References copy(), copy_head(), ENTERFUNC, EXITFUNC, get_data(), ImageFormatException, is_complex(), is_fftodd(), is_fftpadded(), LOGERR, EMAN::EMData::nx, EMAN::EMData::nxyz, EMAN::EMData::ny, and EMAN::EMData::nz.
Referenced by bispecRotTransInvDirect(), bispecRotTransInvN(), EMAN::EMData::calc_mutual_correlation(), EMAN::EMData::convolute(), and EMAN::EMData::make_footprint().
void EMData::do_fft_inplace | ( | ) |
Do FFT inplace.
And return the FFT image.
Definition at line 118 of file emdata_transform.cpp.
References ENTERFUNC, EXITFUNC, get_data(), ImageFormatException, is_complex(), is_fftodd(), is_fftpadded(), LOGERR, EMAN::EMData::nx, EMAN::EMData::ny, EMAN::EMData::nz, EMAN::EMData::rdata, set_complex(), set_complex_x(), set_fftodd(), set_fftpad(), set_ri(), set_size(), and update().
EMData * 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.
ImageFormatException | If the image is not a complex image. |
Definition at line 330 of file emdata_transform.cpp.
References ap2ri(), copy_head(), ENTERFUNC, EXITFUNC, get_data(), get_ndim(), ImageFormatException, is_complex(), is_fftodd(), is_ri(), LOGERR, LOGWARN, EMAN::EMData::nx, EMAN::EMData::ny, EMAN::EMData::nz, EMAN::EMData::rdata, and EMAN::EMData::scale().
void EMData::do_ift_inplace | ( | ) |
Definition at line 392 of file emdata_transform.cpp.
References ap2ri(), ENTERFUNC, EXITFUNC, get_data(), ImageFormatException, is_complex(), is_fftodd(), is_ri(), LOGERR, LOGWARN, mult(), EMAN::EMData::nx, EMAN::EMData::ny, EMAN::EMData::nz, EMAN::EMData::scale(), set_complex(), set_complex_x(), set_fftpad(), set_ri(), and update().
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'.
block | The image to inserted. |
center | The center of the inserted block in 'this'. |
scale | Scale factor. |
mult_factor | Number used to multiply the block's densities. |
ImageDimensionException | If 'this' image is not 2D/3D. |
void EMData::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.
x | |
y | |
xsize | |
ysize | |
bpl | |
scale | |
min_gray | |
max_gray | |
min_render | |
max_render | |
ref | |
cmap |
ImageDimensionException | If the image is not 2D. |
Definition at line 705 of file emdata_transform.cpp.
References ENTERFUNC, EXITFUNC, get_data(), get_ndim(), ImageDimensionException, is_complex(), EMAN::EMData::nx, EMAN::EMData::ny, ri2ap(), and EMAN::EMData::scale().
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.
x | origin of the area to render |
y | |
xsize | size of the area to render in output pixels |
ysize | |
bpl | bytes per line, if asrgb remember *3 |
scale | scale factor for rendering |
min_gray | minimum gray value to render (0-255) |
max_gray | maximum gray value to render (0-255) |
min_render | float image density corresponding to min_gray |
max_render | float image density corresponding to max_gray |
gamma | |
flags | 1-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 |
ImageDimensionException | If the image is not 2D. |
EMBytes EMData::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.
x | origin of the area to render |
y | |
xsize | size of the area to render in output pixels |
ysize | |
bpl | bytes per line, if asrgb remember *3 |
scale | scale factor for rendering |
min_gray | minimum gray value to render (0-255) |
max_gray | maximum gray value to render (0-255) |
min_render | float image density corresponding to min_gray |
max_render | float image density corresponding to max_gray |
gamma | |
flags | 1-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 |
ImageDimensionException | If the image is not 2D. |
Definition at line 429 of file emdata_transform.cpp.
References ENTERFUNC, EXITFUNC, EMAN::EMData::flags, get_data(), get_ndim(), ImageDimensionException, is_complex(), EMAN::EMData::nx, EMAN::EMData::ny, ri2ap(), EMAN::EMData::scale(), x, and y.
void EMData::ri2ap | ( | ) |
convert the complex image from real/imaginary to amplitude/phase
Definition at line 999 of file emdata_transform.cpp.
References ENTERFUNC, EXITFUNC, get_data(), is_complex(), is_ri(), EMAN::EMData::nx, EMAN::EMData::ny, EMAN::EMData::nz, set_ri(), and update().
Referenced by EMAN::EMData::add_incoherent(), get_fft_amplitude(), get_fft_phase(), render_amp24(), and render_ap24().
void EMData::ri2inten | ( | ) |
convert the complex image from real/imaginary to Intensity/0.
This conversion cannot be reversed, and the image remains marked as R/I. Also sets the is_intensity flag, which is used by routines like calc_radial_dist to avoid returning intensity squared.
Definition at line 979 of file emdata_transform.cpp.
References ap2ri(), ENTERFUNC, EXITFUNC, get_data(), is_complex(), is_ri(), EMAN::EMData::nx, EMAN::EMData::ny, EMAN::EMData::nz, set_attr(), and update().