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

Go to the source code of this file.

Functions

EMData * real2FH (float OverSamplekB)
 $Id$
EMData * copy_empty_head () const
 copy header but not set size for the image
EMData * FH2F (int Size, float OverSamplekB, int IntensityFlag=0)
 returns the fourier version of the image from the FH version.
EMData * FH2Real (int Size, float OverSamplekB, int IntensityFlag=0)
 returns the real version of the image from the FH version.
EMData * rotavg ()
 Create a (1-D) rotationally averaged image.
EMData * rotavg_i ()
 Create a 2-D or 3-D rotationally averaged image.
EMData * mult_radial (EMData *radial)
 Multiply radially a 2-D or 3-D image by a 1-D image.
vector< float > cog ()
 Calculates the Center of Gravity and the Radius of Gyration of the image.
vector< float > calc_fourier_shell_correlation (EMData *with, float w=1.0f)
 Calculate CCF in Fourier space as a function of spatial frequency between a pair of 2-3D images (corners not included).
vector< float > scale_factors (EMData *with, int beg, int end)
 Calculate normalization factors in Fourier space as a function of spatial frequency between a pair of 2-3D images (corners not included).
EMData * average_circ_sub () const
 Subtract average outside of a circle.
void onelinenn (int j, int n, int n2, EMData *wptr, EMData *bi, const Transform &tf)
 Helper function for method nn.
void onelinenn_mult (int j, int n, int n2, EMData *wptr, EMData *bi, const Transform &tf, float mult)
void nn (EMData *wptr, EMData *myfft, const Transform &tf, float mult=1)
 Nearest Neighbor interpolation.
void insert_rect_slice (EMData *w, EMData *myfft, const Transform &trans, int sizeofprojection, float xratio, float yratio, float zratio, int npad, float mult)
void nn_SSNR (EMData *wptr, EMData *wptr2, EMData *myfft, const Transform &tf, float mult=1)
 Nearest Neighbor interpolation, meanwhile return necessary data such as Kn, sum_k(F_k^n) ans sum_k(|F_k^n|^2) Modifies the current object.
void nn_SSNR_ctf (EMData *wptr, EMData *wptr2, EMData *wptr3, EMData *myfft, const Transform &tf, float mult=1)
 Nearest Neighbor interpolation, meanwhile return necessary data such as Kn, sum_k(F_k^n) ans sum_k(|F_k^n|^2) Modifies the current object.
void symplane0 (EMData *norm)
 Calculate Spectrum signal noise ratio (SSNR) accounting CTF correction a.
void symplane1 (EMData *norm, EMData *norm2)
 Symmetrize plane 0 Modifies the current object.
void symplane2 (EMData *norm, EMData *norm2, EMData *norm3)
 Symmetrize plane 0 Modifies the current object.
void onelinenn_ctf (int j, int n, int n2, EMData *w, EMData *bi, const Transform &tf, float mult)
 Helper function for method nn4_ctf.
void onelinenn_ctfw (int j, int n, int n2, EMData *w, EMData *bi, EMData *sigmasq2, const Transform &tf, float weight)
 Helper function for method nn4_ctfw.
void nn_ctf (EMData *w, EMData *myfft, const Transform &tf, float mult)
 Nearest Neighbor interpolation.
void insert_rect_slice_ctf (EMData *w, EMData *myfft, const Transform &trans, int sizeofprojection, float xratio, float yratio, float zratio, int npad, float mult)
 helper function to insert rectangualr slice for ctf rect case
void insert_rect_slice_ctf_applied (EMData *w, EMData *myfft, const Transform &trans, int sizeofprojection, float xratio, float yratio, float zratio, int npad, float mult)
void onelinenn_ctf_applied (int j, int n, int n2, EMData *w, EMData *bi, const Transform &tf, float mult)
 Helper function for method nn4_ctf.
void nn_ctf_applied (EMData *w, EMData *myfft, const Transform &tf, float mult)
 Nearest Neighbor interpolation.
void symplane0_ctf (EMData *w)
 Symmetrize plane 0 Modifies the current object.
void symplane0_rect (EMData *w)
void nn_ctfw (EMData *w, EMData *myfft, EMData *sigmasq2, const Transform &tf, float weight)
 Helper functions for method nn4_ctf.
EMData * symvol (string symmetry)
 Symmetrize volume in real space.
EMData * rot_scale_trans2D (float ang, float delx=0.0f, float dely=0.0f, float scale=1.0f)
 Rotate-Shift-Scale-Circulantly image.
EMData * rot_scale_trans2D_background (float ang, float delx=0.0f, float dely=0.0f, float scale=1.0f)
 Rotate-Shift-Scale image.
EMData * rot_scale_trans (const Transform &RA)
 Rotate-Shift-Scale-Circulantly image.
EMData * rot_scale_trans_background (const Transform &RA)
 Rotate-Shift-Scale image.
static float restrict1 (float x, int nx)
static float restrict2 (float x, int nx)
float cm_euc (EMData *sinoj, int n1, int n2)
 euclidean distance between two line
EMData * rot_scale_conv (float ang, float delx, float dely, Util::KaiserBessel &kb, float scale=1.0)
 Rotate-Shift-Scale-Circulantly image using convolution.
EMData * downsample (Util::sincBlackman &kb, float scale=1.0)
EMData * rot_scale_conv7 (float ang, float delx, float dely, Util::KaiserBessel &kb, float scale_input)
EMData * rot_scale_conv_new (float ang, float delx, float dely, Util::KaiserBessel &kb, float scale=1.0)
EMData * rot_scale_conv_new_background (float ang, float delx, float dely, Util::KaiserBessel &kb, float scale=1.0)
EMData * rot_scale_conv_new_3D (float phi, float theta, float psi, float delx, float dely, float delz, Util::KaiserBessel &kb, float scale=1.0, bool wrap=false)
EMData * rot_scale_conv_new_background_3D (float phi, float theta, float psi, float delx, float dely, float delz, Util::KaiserBessel &kb, float scale=1.0, bool wrap=false)
float get_pixel_conv (float delx, float dely, float delz, Util::KaiserBessel &kb)
 Get pixel value image using convolution.
float get_pixel_filtered (float delx, float dely, float delz, Util::sincBlackman &kb)
float get_pixel_conv7 (float delx, float dely, float delz, Util::KaiserBessel &kb)
float getconvpt2d_kbi0 (float x, float y, Util::KaiserBessel::kbi0_win win, int size=7)
 Value of 2-D analytic masking (or 2-D convolution) at off-grid point.
void fft_shuffle ()
 2-D rotation using gridding convolution.
void pad_corner (float *pad_image)
void shuffle_pad_corner (float *pad_image)
std::complex< float > extractpoint (float xin, float yin, Util::KaiserBessel &kb)
 extractpoint -- Gridding convolution
EMData * extract_plane (const Transform &tf, Util::KaiserBessel &kb)
 extractplane -- Gridding convolution in 3D along a plane
EMData * extract_plane_rect (const Transform &tf, Util::KaiserBessel &kbx, Util::KaiserBessel &kby, Util::KaiserBessel &kbz)
EMData * extract_plane_rect_fast (const Transform &tf, Util::KaiserBessel &kbx, Util::KaiserBessel &kby, Util::KaiserBessel &kbz)
EMData * fouriergridrot2d (float ang, float scale, Util::KaiserBessel &kb)
EMData * fouriergridrot_shift2d (float ang, float sx, float sy, Util::KaiserBessel &kb)
void divkbsinh (const Util::KaiserBessel &kb)
 divkbsinh -- Divide image by a Kaiser-Bessel sinh window.
void divkbsinh_rect (const Util::KaiserBessel &kbx, const Util::KaiserBessel &kby, const Util::KaiserBessel &kbz)
vector< float > peak_search (int ml, float invert)
 masked_stats -- Compute image statistics under a mask
vector< float > phase_cog ()
 Calculate the Phase approximation to center of gravity This operations works for 1-2-3-d images.
float find_3d_threshold (float mass, float pixel_size)
vector< float > peak_ccf (float hf_p)
 Peak (with a radius of hf_p) search for particle picking:
EMData * get_pow (float n_pow)
EMData * conjg ()
static bool peakcmp (const Pixel &p1, const Pixel &p2)
EMData * extractline (Util::KaiserBessel &kb, float nuxnew, float nuynew)
EMData * delete_disconnected_regions (int ix=0, int iy=0, int iz=0)
 Delete disconnected regions in a binary image.
EMData * helicise (float pixel_size, float dp, float dphi, float section_use=1.0f, float radius=-1.0f, float minrad=-1.0f)
 Apply helical symmetry.
EMData * helicise_grid (float pixel_size, float dp, float dphi, Util::KaiserBessel &kb, float section_use=1.0f, float radius=-1.0f, float minrad=-1.0f)
void depad ()
 De-pad, and and remove Fourier extension convenience function.
void depad_corner ()
 De-pad, and and remove Fourier extension convenience function.
EMData * norm_pad (bool do_norm, int npad=1, int valtype=0)
 Normalize, pad, and Fourier extend convenience function.
void center_origin ()
void center_origin_yz ()
void center_origin_fft ()
 Multiply a Fourier image by (-1)**(ix+iy+iz) to center it.
EMData * FourInterpol (int nxni, int nyni=0, int nzni=0, bool RetReal=true)
EMData * FourTruncate (int nxni, int nyni=0, int nzni=0, bool RetReal=true)
 Truncate Fourier transform of an image, it will reduce its size.
EMData * Four_ds (int nxni, int nyni=0, int nzni=0, bool RetReal=true)
EMData * Four_shuf_ds_cen_us (int nxni, int nyni=0, int nzni=0, bool RetReal=true)
EMData * filter_by_image (EMData *image, bool RetReal=true)
EMData * replace_amplitudes (EMData *image, bool RetReal=true)

Function Documentation

EMData* average_circ_sub ( ) const

Subtract average outside of a circle.

Returns:
image with sbtracted average outside of a circle.
vector<float> calc_fourier_shell_correlation ( EMData *  with,
float  w = 1.0f 
)

Calculate CCF in Fourier space as a function of spatial frequency between a pair of 2-3D images (corners not included).

The input image 'with' must have the same size to 'this' image. Input images can be either real or Fourier in arbitrary combination.

Parameters:
[in]withThe image used to caculate the fourier shell
[in]wRing/shell width in Fourier space.
Exceptions:
ImageFormatExceptionIf the 2 images are not same size.
NullPointerExceptionif the input image is null
Cannotcalculate FSC for 1D images
Returns:
Vector of 3*k FSC results (frequencies, FSC values, error) k - length of FSC curve, depends on dimensions of the image and ring width 1 column - normalized frequency [0,0.5] 2 column - FSC, 3 column - error of the FSC = 1/sqrt(n), where n is the number of Fourier coefficients within given shell.
void center_origin ( )
void center_origin_fft ( )

Multiply a Fourier image by (-1)**(ix+iy+iz) to center it.

void center_origin_yz ( )
float cm_euc ( EMData *  sinoj,
int  n1,
int  n2 
)

euclidean distance between two line

Parameters:
sinoj
n1
n2
vector<float> cog ( )

Calculates the Center of Gravity and the Radius of Gyration of the image.

Returns:
the mass and the radius as vectors.
EMData* conjg ( )
EMData* copy_empty_head ( ) const

copy header but not set size for the image

EMData* delete_disconnected_regions ( int  ix = 0,
int  iy = 0,
int  iz = 0 
)

Delete disconnected regions in a binary image.

Works only for a volume.

Parameters:
[in]ix,:x coordinate (with respect to the center) from which the search of the compact region begins.
[in]iy,:y coordinate (with respect to the center) from which the search of the compact region begins.
[in]iz,:z coordinate (with respect to the center) from which the search of the compact region begins.
Returns:
New binary image
void depad ( )

De-pad, and and remove Fourier extension convenience function.

Purpose: De-pad, and and remove Fourier extension from a real image.
Method: Remove padding and extension along x for fft,
and return the new image.
Returns:
depadded input image.
void depad_corner ( )

De-pad, and and remove Fourier extension convenience function.

Purpose: De-pad, and and remove Fourier extension from a real image.
Method: Remove padding and extension along x for fft,
and return the new image.
Returns:
depadded input image.
void divkbsinh ( const Util::KaiserBessel &  kb)

divkbsinh -- Divide image by a Kaiser-Bessel sinh window.

Parameters:
[in]kbKaiser-Bessel window object

Note: Ideally this method really should be a "processor" instead, but at the moment a KaiserBessel object cannot be passed as part of a Dict, making the usual EMData::project() interface rather awkward here.

void divkbsinh_rect ( const Util::KaiserBessel &  kbx,
const Util::KaiserBessel &  kby,
const Util::KaiserBessel &  kbz 
)
EMData* downsample ( Util::sincBlackman &  kb,
float  scale = 1.0 
)
EMData* extract_plane ( const Transform &  tf,
Util::KaiserBessel &  kb 
)

extractplane -- Gridding convolution in 3D along a plane

Note: Expected to be used in combination with fourier gridding projections.

Parameters:
[in]tftransform matrix defining the intended plane.
[in]kbKaiser-Bessel window
Returns:
Complex gridding plane
See also:
P.A. Penczek, R. Renka, and H. Schomberg, J. Opt. Soc. Am. A _21_, 499-509 (2004)
EMData* extract_plane_rect ( const Transform &  tf,
Util::KaiserBessel &  kbx,
Util::KaiserBessel &  kby,
Util::KaiserBessel &  kbz 
)
EMData* extract_plane_rect_fast ( const Transform &  tf,
Util::KaiserBessel &  kbx,
Util::KaiserBessel &  kby,
Util::KaiserBessel &  kbz 
)
EMData* extractline ( Util::KaiserBessel &  kb,
float  nuxnew,
float  nuynew 
)
std::complex<float> extractpoint ( float  xin,
float  yin,
Util::KaiserBessel &  kb 
)

extractpoint -- Gridding convolution

Note: Expected to be used in combination with fouriergridrot2d.

Parameters:
[in]xinx-position
[in]yiny-position
[in]kbKaiser-Bessel window
Returns:
Complex gridding result
See also:
P.A. Penczek, R. Renka, and H. Schomberg, J. Opt. Soc. Am. A _21_, (2004)
void fft_shuffle ( )

2-D rotation using gridding convolution.

The only requirement for the window function object is that it overload operator()(const float) and return a float.

This routine does _not_ deconvolve out the window function after rotation.

Parameters:
[in]xx-value of the desired (potentially off-grid) point
[in]yy-value of the desired (potentially off-grid) point
[in]winWindow (mask/kernel) function object.
[in]sizeSize of real-space kernel/mask.
Exceptions:
ImageDimensionExceptiononly support 2D image
Returns:
Rotated/convolved EMData image. fft_shuffle -- Shuffle a Fourier image to put the origin at (0,ny/2)

Our usual FFT convention puts the origin at (0,0), but then grid points corresponding to iy > ny/2 correspond to (unnormalized) frequencies iy-ny. This routine rearranges the columns of the Fourier image so that iy varies from -ny/2 to ny/2 (or ny/2 - 1 for ny even). This method acts as a toggle, so to unshuffle a Fourier image just call this method a second time.

Referenced by EMAN::EMData::fouriergridrot2d(), and EMAN::EMData::fouriergridrot_shift2d().

EMData* FH2F ( int  Size,
float  OverSamplekB,
int  IntensityFlag = 0 
)

returns the fourier version of the image from the FH version.

The current image is not changed. The result is in real/imaginary format. The FH switch is set off.

Parameters:
Sizeis the size of the image to be returned
OverSamplekBis a parameter controlling the fineness of the Fourier sampling
IntensityFlag=0 is the usual; =1 means that the input was an intensity
Returns:
the shuffled version of the FFT

Referenced by EMAN::EMData::FH2Real().

EMData* FH2Real ( int  Size,
float  OverSamplekB,
int  IntensityFlag = 0 
)

returns the real version of the image from the FH version.

The current image is not changed. The result is in real format.

Parameters:
Sizeis the size of the image to be returned
OverSamplekBis a parameter controlling the fineness of the Fourier sampling
IntensityFlag=0 is the usual; =1 means that the input was an intensity
Returns:
the real version of the data
EMData* filter_by_image ( EMData *  image,
bool  RetReal = true 
)
float find_3d_threshold ( float  mass,
float  pixel_size 
)
EMData* Four_ds ( int  nxni,
int  nyni = 0,
int  nzni = 0,
bool  RetReal = true 
)
EMData* Four_shuf_ds_cen_us ( int  nxni,
int  nyni = 0,
int  nzni = 0,
bool  RetReal = true 
)
EMData* fouriergridrot2d ( float  ang,
float  scale,
Util::KaiserBessel &  kb 
)
EMData* fouriergridrot_shift2d ( float  ang,
float  sx,
float  sy,
Util::KaiserBessel &  kb 
)
EMData* FourInterpol ( int  nxni,
int  nyni = 0,
int  nzni = 0,
bool  RetReal = true 
)
EMData* FourTruncate ( int  nxni,
int  nyni = 0,
int  nzni = 0,
bool  RetReal = true 
)

Truncate Fourier transform of an image, it will reduce its size.

(It is a form of decimation).

Parameters:
[in]nxninew x size (has to be larger/equal than the original x size)
[in]nyninew y size (has to be larger/equal than the original y size)
[in]nzninew z size (has to be larger/equal than the original z size)
RetReal
Returns:
New truncated up image.
float get_pixel_conv ( float  delx,
float  dely,
float  delz,
Util::KaiserBessel &  kb 
)

Get pixel value image using convolution.

If the image is a volume, then all slices are rotated/translated/scaled.

Parameters:
[in]delxAmount to shift rotation origin along x
[in]delyAmount to shift rotation origin along y
[in]delzAmount to shift rotation origin along z
[in]kbconvolution kernel
Exceptions:
ImageDimensionExceptioncan not rotate 1 D image
Returns:
New rotated/shifted/scaled image
float get_pixel_conv7 ( float  delx,
float  dely,
float  delz,
Util::KaiserBessel &  kb 
)
float get_pixel_filtered ( float  delx,
float  dely,
float  delz,
Util::sincBlackman &  kb 
)
EMData* get_pow ( float  n_pow)
float getconvpt2d_kbi0 ( float  x,
float  y,
Util::KaiserBessel::kbi0_win  win,
int  size = 7 
)

Value of 2-D analytic masking (or 2-D convolution) at off-grid point.

The only requirement for the window function object is that it overload operator()(const float) and return a float.

Parameters:
[in]xx-value of the desired (potentially off-grid) point
[in]yy-value of the desired (potentially off-grid) point
[in]winWindow (mask/kernel) function object.
[in]sizeSize of real-space kernel/mask.
Returns:
Value of masked/convolved image at (x,y)
EMData* helicise ( float  pixel_size,
float  dp,
float  dphi,
float  section_use = 1.0f,
float  radius = -1.0f,
float  minrad = -1.0f 
)

Apply helical symmetry.

Works only for a volume.

Parameters:
[in]pixel_size,:pixel size in Angstroms.
[in]dp,:repeat in z direction in Angstroms.
[in]dphi,:angular repeat in degrees.
[in]section_use,:how much of z section to use for symmetrization (between zero and one).
[in]radius,:radius of the structure (default nx/2-1).
Returns:
New image
EMData* helicise_grid ( float  pixel_size,
float  dp,
float  dphi,
Util::KaiserBessel &  kb,
float  section_use = 1.0f,
float  radius = -1.0f,
float  minrad = -1.0f 
)
void insert_rect_slice ( EMData *  w,
EMData *  myfft,
const Transform &  trans,
int  sizeofprojection,
float  xratio,
float  yratio,
float  zratio,
int  npad,
float  mult 
)
void insert_rect_slice_ctf ( EMData *  w,
EMData *  myfft,
const Transform &  trans,
int  sizeofprojection,
float  xratio,
float  yratio,
float  zratio,
int  npad,
float  mult 
)

helper function to insert rectangualr slice for ctf rect case

void insert_rect_slice_ctf_applied ( EMData *  w,
EMData *  myfft,
const Transform &  trans,
int  sizeofprojection,
float  xratio,
float  yratio,
float  zratio,
int  npad,
float  mult 
)
EMData* mult_radial ( EMData *  radial)

Multiply radially a 2-D or 3-D image by a 1-D image.

Parameters:
radialthe 1-D image multiply to
Exceptions:
ImageDimensionExceptionIf 'this' image is 1D.
Returns:
2-D or 3-D radially multiplied image
void nn ( EMData *  wptr,
EMData *  myfft,
const Transform &  tf,
float  mult = 1 
)
void nn_ctf ( EMData *  w,
EMData *  myfft,
const Transform &  tf,
float  mult 
)

Nearest Neighbor interpolation.

Modifies the current object.

Parameters:
wNormalization data.
myfftFFT data.
tfTransform reference
mult
void nn_ctf_applied ( EMData *  w,
EMData *  myfft,
const Transform &  tf,
float  mult 
)

Nearest Neighbor interpolation.

Modifies the current object. here it is assumed the projection data was already multiplied by the ctf...

Parameters:
wNormalization data.
myfftFFT data.
tfTransform reference
mult
void nn_ctfw ( EMData *  w,
EMData *  myfft,
EMData *  sigmasq2,
const Transform &  tf,
float  weight 
)

Helper functions for method nn4_ctf.

Parameters:
jy fourier index (frequency)
nnumber of real elements.
n2Number of complex elements.
wNormalization matrix [0:n2][1:n][1:n]
biFourier transform matrix [0:n2][1:n]
tfTransform reference
mult
void nn_SSNR ( EMData *  wptr,
EMData *  wptr2,
EMData *  myfft,
const Transform &  tf,
float  mult = 1 
)

Nearest Neighbor interpolation, meanwhile return necessary data such as Kn, sum_k(F_k^n) ans sum_k(|F_k^n|^2) Modifies the current object.

Parameters:
wptrNormalization data.
wptr2
myfftFFT data.
tfTransform reference
mult
void nn_SSNR_ctf ( EMData *  wptr,
EMData *  wptr2,
EMData *  wptr3,
EMData *  myfft,
const Transform &  tf,
float  mult = 1 
)

Nearest Neighbor interpolation, meanwhile return necessary data such as Kn, sum_k(F_k^n) ans sum_k(|F_k^n|^2) Modifies the current object.

Parameters:
wptrNormalization data.
wptr2
wptr3
myfft
tfTransform reference
mult
EMData* norm_pad ( bool  do_norm,
int  npad = 1,
int  valtype = 0 
)

Normalize, pad, and Fourier extend convenience function.

Purpose: Create a new [normalized] [zero-padded] Fourier image.
Method: Normalize (if requested), pad with zeros (if
requested), extend along x for fft, and return the new image.
Parameters:
[in]do_normIf true then perform normalization.
[in]npadAmount of zero-padding to use (defaults to 2 if do_pad is true).
valtype
Returns:
[normalized,] [zero-padded,] [ft-extended] input image.

Referenced by EMAN::EMData::filter_by_image(), and EMAN::EMData::replace_amplitudes().

void onelinenn ( int  j,
int  n,
int  n2,
EMData *  wptr,
EMData *  bi,
const Transform &  tf 
)

Helper function for method nn.

Parameters:
jy fourier index (frequency)
nnumber of real elements.
n2Number of complex elements.
wptrNormalization matrix [0:n2][1:n][1:n]
biFourier transform matrix [0:n2][1:n]
tfTransform reference

Referenced by EMAN::EMData::nn().

void onelinenn_ctf ( int  j,
int  n,
int  n2,
EMData *  w,
EMData *  bi,
const Transform &  tf,
float  mult 
)

Helper function for method nn4_ctf.

Parameters:
jy fourier index (frequency)
nnumber of real elements.
n2Number of complex elements.
wNormalization matrix [0:n2][1:n][1:n]
biFourier transform matrix [0:n2][1:n]
tfTransform reference
mult

Referenced by EMAN::EMData::nn_ctf().

void onelinenn_ctf_applied ( int  j,
int  n,
int  n2,
EMData *  w,
EMData *  bi,
const Transform &  tf,
float  mult 
)

Helper function for method nn4_ctf.

here it is assumed the projection data was already multiplied by the ctf...

Parameters:
jy fourier index (frequency)
nnumber of real elements.
n2Number of complex elements.
wNormalization matrix [0:n2][1:n][1:n]
biFourier transform matrix [0:n2][1:n]
tfTransform reference
mult

Referenced by EMAN::EMData::nn_ctf_applied().

void onelinenn_ctfw ( int  j,
int  n,
int  n2,
EMData *  w,
EMData *  bi,
EMData *  sigmasq2,
const Transform &  tf,
float  weight 
)

Helper function for method nn4_ctfw.

Parameters:
jy fourier index (frequency)
nnumber of real elements.
n2Number of complex elements.
wNormalization matrix [0:n2][1:n][1:n]
biFourier transform matrix [0:n2][1:n]
tfTransform reference
mult

Referenced by EMAN::EMData::nn_ctfw().

void onelinenn_mult ( int  j,
int  n,
int  n2,
EMData *  wptr,
EMData *  bi,
const Transform &  tf,
float  mult 
)

Referenced by EMAN::EMData::nn().

void pad_corner ( float *  pad_image)
vector<float> peak_ccf ( float  hf_p)

Peak (with a radius of hf_p) search for particle picking:

Parameters:
hf_p
vector<float> peak_search ( int  ml,
float  invert 
)

masked_stats -- Compute image statistics under a mask

Specifically, compute the average and standard deviation under the mask. Return the average, the standard deviation, and the number of pixels under the mask.

Parameters:
[in]maskMask image
Returns:
dictionary containing "avg", "sigma", and "nmask" keys Search specified number peaks in 1D, 2D, or 3D real images. and output the peaks in descendent order: The numbers coming out are: image dimension, then 1D: pixel value, x coord, relative peak value, x coord( NX/2 center), ... 2D: pixel value, x coord, y coord, realative peak value, x coord(NX/2 center) y coord(NY/2 center) ... 3D pixel value, x coord, y coord, z coord, realative peak value, x coord(NX/2 center) y coord(NY/2 center) z coord(NZ/2 center) The function is supposed to return 0 dimension and first pixel value (0,0,0) when the image is constant. ...
Parameters:
[in]ml
[in]invert
static bool peakcmp ( const Pixel &  p1,
const Pixel &  p2 
) [static, private]
vector<float> phase_cog ( )

Calculate the Phase approximation to center of gravity This operations works for 1-2-3-d images.

Returns:
both the center of gravity and the phase approximated center of gravity values.
EMData* real2FH ( float  OverSamplekB)

$Id$

returns the fourier harmonic transform (FH) image of the current image (in real space). The current image is not changed. The result is in real/imaginary format. The FH switch is set on.

Parameters:
OverSamplekBis a parameter controlling the fineness of the Fourier sampling
Returns:
the Fourier Harmonic image

Referenced by EMAN::Util::TwoDTestFunc().

EMData* replace_amplitudes ( EMData *  image,
bool  RetReal = true 
)
static float restrict1 ( float  x,
int  nx 
) [inline, static]

Definition at line 375 of file emdata_sparx.h.

References nx, and x.

Referenced by EMAN::Util::get_pixel_conv_new(), EMAN::Util::get_pixel_conv_new_background(), EMAN::EMData::rot_scale_conv(), EMAN::EMData::rot_scale_conv7(), and EMAN::EMData::rot_scale_trans().

                                               {
        while ( x < 0.0f )          x += nx;
        while ( x >= (float)(nx) )  x -= nx;
        return x;
}
static float restrict2 ( float  x,
int  nx 
) [inline, static]
EMData* rot_scale_conv ( float  ang,
float  delx,
float  dely,
Util::KaiserBessel &  kb,
float  scale = 1.0 
)

Rotate-Shift-Scale-Circulantly image using convolution.

If the image is a volume, then all slices are rotated/translated/scaled.

Parameters:
[in]angRotation angle in degrees.
[in]delxAmount to shift rotation origin along x
[in]delyAmount to shift rotation origin along y
[in]kbconvolution kernel
[in]scaleScaling factor (default=1.0)
Exceptions:
ImageDimensionExceptioncan not rotate 1 D image
ImageDimensionExceptioncan not rotate 3 D image
Returns:
New rotated/shifted/scaled image
EMData* rot_scale_conv7 ( float  ang,
float  delx,
float  dely,
Util::KaiserBessel &  kb,
float  scale_input 
)
EMData* rot_scale_conv_new ( float  ang,
float  delx,
float  dely,
Util::KaiserBessel &  kb,
float  scale = 1.0 
)
EMData* rot_scale_conv_new_3D ( float  phi,
float  theta,
float  psi,
float  delx,
float  dely,
float  delz,
Util::KaiserBessel &  kb,
float  scale = 1.0,
bool  wrap = false 
)
EMData* rot_scale_conv_new_background ( float  ang,
float  delx,
float  dely,
Util::KaiserBessel &  kb,
float  scale = 1.0 
)
EMData* rot_scale_conv_new_background_3D ( float  phi,
float  theta,
float  psi,
float  delx,
float  dely,
float  delz,
Util::KaiserBessel &  kb,
float  scale = 1.0,
bool  wrap = false 
)
EMData* rot_scale_trans ( const Transform &  RA)

Rotate-Shift-Scale-Circulantly image.

If the image is a volume, then all slices are rotated/translated/scaled.

Parameters:
[in]RATransform object
Exceptions:
ImageDimensionExceptioncan not rotate 1 D image
Returns:
New rotated/shifted/scaled image

Referenced by EMAN::EMData::symvol().

EMData* rot_scale_trans2D ( float  ang,
float  delx = 0.0f,
float  dely = 0.0f,
float  scale = 1.0f 
)

Rotate-Shift-Scale-Circulantly image.

If the image is a volume, then all slices are rotated/translated/scaled.

Parameters:
[in]angRotation angle in degrees.
[in]delxAmount to shift rotation origin along x
[in]delyAmount to shift rotation origin along y
[in]scaleScaling factor (default=1.0)
Exceptions:
ImageDimensionExceptioncan not rotate 1 D image
ImageDimensionExceptioncan not rotate 3 D image
Returns:
New rotated/shifted/scaled image
EMData* rot_scale_trans2D_background ( float  ang,
float  delx = 0.0f,
float  dely = 0.0f,
float  scale = 1.0f 
)

Rotate-Shift-Scale image.

In contrast to rot_scale_trans2D, wrap aroud is not done circulantly so as to prevent artifacts from occurring.

If the image is a volume, then all slices are rotated/translated/scaled.

Parameters:
[in]angRotation angle in degrees.
[in]delxAmount to shift rotation origin along x (default=0.0)
[in]delyAmount to shift rotation origin along y (default=0.0)
[in]scaleScaling factor (default=1.0)
Exceptions:
ImageDimensionExceptioncan not rotate 1 D image
ImageDimensionExceptioncan not rotate 3 D image
Returns:
New rotated/shifted/scaled image
EMData* rot_scale_trans_background ( const Transform &  RA)

Rotate-Shift-Scale image.

In contrast to rot_scale_trans, wrap around is not done circulantly so as to prevent artifacts occurring during rotation.

If the image is a volume, then all slices are rotated/translated/scaled.

Parameters:
[in]RATransform object
Exceptions:
ImageDimensionExceptioncan not rotate 1 D image
Returns:
New rotated/shifted/scaled image
EMData* rotavg ( )

Create a (1-D) rotationally averaged image.

Exceptions:
ImageDimensionExceptionIf 'this' image is 1D.
Returns:
1-D rotationally-averaged image

Referenced by EMAN::EMData::rotavg_i().

EMData* rotavg_i ( )

Create a 2-D or 3-D rotationally averaged image.

Exceptions:
ImageDimensionExceptionIf 'this' image is 1D.
Returns:
2-D or 3-D rotationally-averaged image
vector<float> scale_factors ( EMData *  with,
int  beg,
int  end 
)

Calculate normalization factors in Fourier space as a function of spatial frequency between a pair of 2-3D images (corners not included).

The input image 'with' must have the same size to 'this' image. Input images can be either real or Fourier in arbitrary combination.

Returns:
Vector of 2*k results
void shuffle_pad_corner ( float *  pad_image)
void symplane0 ( EMData *  norm)

Calculate Spectrum signal noise ratio (SSNR) accounting CTF correction a.

3D Wiener volume F_3D has been pre-calculated already. F_3D(k) = sum(k)(CTF_k*F_k)/{sum CTF_k^2 + 1/snr} b. Terms calculated : |F_k|^2, |CTF_k|^2*||P^2D->3D*F_3D|^2,2*Re(CTF_k*P^2D->3D*F_3D*F_k^*) Calculate Wiener summation from the inserted 2D slice put the summation into 3D grids using nearest neighbour approximation a. Map the 2D coordinates of the interted slice into 3D grid using 3D transformation b. calculate 2D CTF_K^2 and CTF_K*F_K, and put them on the voxel of 3D volume c. count the number of images entering each boxel wptr3

void symplane0_ctf ( EMData *  w)

Symmetrize plane 0 Modifies the current object.

Parameters:
wNormalization data.
void symplane0_rect ( EMData *  w)
void symplane1 ( EMData *  norm,
EMData *  norm2 
)

Symmetrize plane 0 Modifies the current object.

Parameters:
normNormalization data.
norm2
void symplane2 ( EMData *  norm,
EMData *  norm2,
EMData *  norm3 
)

Symmetrize plane 0 Modifies the current object.

Parameters:
normNormalization data.
norm2
norm3
EMData* symvol ( string  symmetry)

Symmetrize volume in real space.

Parameters:
[in]symmetryPoint group of the target volume.
Returns:
New symmetrized volume object.