This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
EMData * | copy () const |
Make a copy of this image including both data and header. | |
EMData * | copy_head () const |
Make an image with a copy of the current image's header. | |
void | add (float f, int keepzero=0) |
add a number to each pixel value of the image. | |
void | add (const EMData &image) |
add a same-size image to this image pixel by pixel. | |
void | addsquare (const EMData &image) |
add the squared value of each pixel from a same-size image to this image. | |
void | sub (float f) |
subtract a float number to each pixel value of the image. | |
void | sub (const EMData &image) |
subtract a same-size image from this image pixel by pixel. | |
void | subsquare (const EMData &image) |
subtract the squared value of each pixel from a same-size image to this image. | |
void | mult (int n) |
multiply an integer number to each pixel value of the image. | |
void | mult (float f) |
multiply a float number to each pixel value of the image. | |
void | mult (const EMData &image, bool prevent_complex_multiplication=false) |
multiply each pixel of this image with each pixel of some other same-size image. | |
void | mult_complex_efficient (const EMData &em, const int radius) |
void | div (float f) |
make each pixel value divided by a float number. | |
void | div (const EMData &image) |
make each pixel value divided by pixel value of another same-size image. | |
void | to_zero () |
Set all the pixel value = 0. | |
void | to_one () |
set all the pixel values = 1. | |
void | to_value (const float &value) |
set all the pixel values to a value. | |
float | dot (EMData *with) |
Dot product 2 images. | |
EMData * | get_row (int row_index) const |
Get one row of a 1D/2D image. | |
void | set_row (const EMData *data, int row_index) |
Set one row of a 1D/2D image. | |
EMData * | get_col (int col_index) const |
Get one column of a 2D images. | |
void | set_col (const EMData *data, int col_index) |
Set one column of a 2D image. | |
float | get_value_at (int x, int y, int z) const |
Get the pixel density value at coordinates (x,y,z). | |
float | get_value_at (int x, int y) const |
Get the pixel density value at coordinates (x,y). | |
float | get_value_at (size_t i) const |
Get the pixel density value given an index 'i' assuming the pixles are stored in a 1D array. | |
std::complex< float > | get_complex_at (const int &x, const int &y) const |
Get complex<float> value at x,y. | |
std::complex< float > | get_complex_at (const int &x, const int &y, const int &z) const |
Get complex<float> value at x,y,z. | |
size_t | get_complex_index (const int &x, const int &y, const int &z) const |
Get complex<float> index for coords x,y,z. | |
size_t | get_complex_index (int x, int y, int z, const int &subx0, const int &suby0, const int &subz0, const int &fullnx, const int &fullny, const int &fullnz) const |
size_t | get_complex_index_fast (const int &x, const int &y, const int &z) const |
void | set_complex_at (const int &x, const int &y, const std::complex< float > &val) |
Set complex<float> value at x,y. | |
void | set_complex_at (const int &x, const int &y, const int &z, const std::complex< float > &val) |
Set complex<float> value at x,y,z. | |
size_t | add_complex_at (const int &x, const int &y, const int &z, const std::complex< float > &val) |
Add complex<float> value at x,y,z. | |
size_t | add_complex_at_fast (const int &x, const int &y, const int &z, const std::complex< float > &val) |
size_t | add_complex_at (int x, int y, int z, const int &subx0, const int &suby0, const int &subz0, const int &fullnx, const int &fullny, const int &fullnz, const std::complex< float > &val) |
Add complex<float> value at x,y,z assuming that 'this' is a subvolume from a larger virtual volume. | |
float | get_value_at_wrap (int x, int y, int z) const |
Get the pixel density value at coordinates (x,y,z). | |
float | get_value_at_wrap (int x, int y) const |
Get the pixel density value at coordinates (x,y). | |
float | get_value_at_wrap (int x) const |
Get the pixel density value at coordinates (x). | |
float | sget_value_at (int x, int y, int z) const |
A safer, slower way to get the pixel density value at coordinates (x,y,z). | |
float | sget_value_at (int x, int y) const |
A safer, slower way to get the pixel density value at coordinates (x,y). | |
float | sget_value_at (size_t i) const |
A safer, slower way to get the pixel density value given an index 'i' assuming the pixles are stored in a 1D array. | |
float | sget_value_at_interp (float x, float y) const |
Get pixel density value at interpolation of (x,y). | |
float | sget_value_at_interp (float x, float y, float z) const |
Get the pixel density value at interpolation of (x,y,z). | |
void | set_value_at (int x, int y, int z, float v) |
Set the pixel density value at coordinates (x,y,z). | |
void | set_value_at_fast (int x, int y, int z, float v) |
Set the pixel density value at coordinates (x,y,z). | |
void | set_value_at (int x, int y, float v) |
Set the pixel density value at coordinates (x,y). | |
void | set_value_at_fast (int x, int y, float v) |
Set the pixel density value at coordinates (x,y). | |
void | set_value_at (int x, float v) |
Set the pixel density value at coordinate (x). | |
void | set_value_at_fast (int x, float v) |
Set the pixel density value at coordinate (x). | |
void | free_memory () |
Free memory associated with this EMData Called in destructor and in assignment operator. | |
EMData & | operator+= (float n) |
EMData & | operator-= (float n) |
EMData & | operator *= (float n) |
EMData & | operator/= (float n) |
EMData & | operator+= (const EMData &em) |
EMData & | operator-= (const EMData &em) |
EMData & | operator *= (const EMData &em) |
EMData & | operator/= (const EMData &em) |
bool | operator== (const EMData &that) const |
float & | operator() (const int ix, const int iy, const int iz) const |
Overload operator() for array indexing. | |
float & | operator() (const int ix, const int iy) const |
float & | operator() (const int ix) const |
void | set_array_offsets (const int xoff_=0, const int yoff_=0, const int zoff_=0) |
Set the array offsets. | |
void | set_array_offsets (vector< int > offsets) |
vector< int > | get_array_offsets () |
std::complex< float > & | cmplx (const int ix, const int iy, const int iz) |
Return reference to complex elements. | |
std::complex< float > & | cmplx (const int ix, const int iy) |
std::complex< float > & | cmplx (const int ix) |
EMData * | power (int n) const |
return a image to the power of n | |
EMData * | sqrt () const |
return square root of current image | |
EMData * | log () const |
return natural logarithm image for a image | |
EMData * | log10 () const |
return base 10 logarithm image for a image | |
EMData * | real () const |
return real part of a complex image as a real image format, if this image is a real image, return a copy of this image. | |
EMData * | imag () const |
return imaginary part of a complex image as a real image format. | |
EMData * | absi () const |
For a real image, it returns a same size image with abs() of each pixel. | |
EMData * | amplitude () const |
return amplitude part of a complex image as a real image format | |
EMData * | phase () const |
return phase part of a complex image as a real image format | |
EMData * | real2complex (float img=0.0f) const |
create a complex image from a real image, this complex image is in real/imaginary format |
|
For a real image, it returns a same size image with abs() of each pixel. For a complex image, it returns a image in size (nx/2,ny,nz), the pixel value output[i]=sqrt(input[i]*input[i]+input[i+1]*input[i+1])
|
|
add a same-size image to this image pixel by pixel.
|
|
add a number to each pixel value of the image. Image may be real or complex.
|
|
Add complex<float> value at x,y,z assuming that 'this' is a subvolume from a larger virtual volume. Requires that parameters often stored in the header as: subvolume_x0,y0,z0 and subvolume_full_nx,ny,nz be passed in as parameters. Otherwise similar to add_complex_at. It will return the index into the subvolume float array at which the complex began, or nx*ny*nz if out of range
|
|
Add complex<float> value at x,y,z. This assumes the image is a standard real/imaginary image with the complex origin in the first memory location. If you take the fft of a real nx x ny x nz image, a nx+2 x ny x nz image will be produced, and values using this function can go from -nx/2 to nx/2 and -ny/2 to ny/2. It will automatically deal with wraparound and complex conjugate issues for -x. It will return the index into the float array at which the complex began, or nx*ny*nz if out of range
|
|
Definition at line 330 of file emdata_core.h. 00330 { 00331 //if (x>=nx/2 || y>ny/2 || z>nz/2 || x<=-nx/2 || y<-ny/2 || z<-nz/2) return nxyz; 00332 00333 size_t idx; 00334 if (x<0) { 00335 idx=-x*2+(y<=0?-y:ny-y)*(size_t)nx+(z<=0?-z:nz-z)*(size_t)nxy; 00336 rdata[idx]+=(float)val.real(); 00337 rdata[idx+1]-=(float)val.imag(); 00338 return idx; 00339 } 00340 00341 idx=x*2+(y<0?ny+y:y)*(size_t)nx+(z<0?nz+z:z)*(size_t)nxy; 00342 rdata[idx]+=(float)val.real(); 00343 rdata[idx+1]+=(float)val.imag(); 00344 00345 return idx; 00346 }
|
|
add the squared value of each pixel from a same-size image to this image.
|
|
return amplitude part of a complex image as a real image format
|
|
Definition at line 669 of file emdata_core.h. References get_data(), nx, ny, and OutofRangeException. 00669 { 00670 ptrdiff_t pos = 2*(ix-xoff); 00671 #ifdef BOUNDS_CHECKING 00672 if (pos < 0 || pos >= nx*ny*nz) 00673 throw OutofRangeException(0, nx*ny*nz-1, pos, "EMData"); 00674 #endif // BOUNDS_CHECKING 00675 float* begin = get_data() + pos; 00676 return *(reinterpret_cast<std::complex<float>* >(begin)); 00677 }
|
|
Definition at line 658 of file emdata_core.h. References get_data(), nx, ny, and OutofRangeException. 00658 { 00659 ptrdiff_t pos = 2*(ix-xoff)+(iy-yoff)*nx; 00660 #ifdef BOUNDS_CHECKING 00661 if (pos < 0 || pos >= nx*ny*nz) 00662 throw OutofRangeException(0, nx*ny*nz-1, pos, "EMData"); 00663 #endif // BOUNDS_CHECKING 00664 float* begin = get_data() + pos; 00665 return *(reinterpret_cast<std::complex<float>* >(begin)); 00666 }
|
|
Return reference to complex elements.
Definition at line 647 of file emdata_core.h. References get_data(), nx, ny, and OutofRangeException. 00647 { 00648 ptrdiff_t pos = 2*(ix-xoff)+((iy-yoff)+(iz-zoff)*ny)*nx; 00649 #ifdef BOUNDS_CHECKING 00650 if (pos < 0 || pos >= nx*ny*nz) 00651 throw OutofRangeException(0, nx*ny*nz-1, pos, "EMData"); 00652 #endif // BOUNDS_CHECKING 00653 float* begin = get_data() + pos; 00654 return *(reinterpret_cast<std::complex<float>* >(begin)); 00655 }
|
|
Make a copy of this image including both data and header.
Referenced by EMAN::CtfCWautoAverager::add_image(), EMAN::Transform::detect_problem_keys(), EMAN::Dict::Dict(), get_data_as_vector(), EMAN::FloatPoint::operator=(), EMAN::Dict::operator=(), EMAN::MedianShrinkProcessor::process_inplace(), EMAN::WatershedProcessor::process_inplace(), EMAN::SpiderIO::write_single_header(), EMAN::RT3DSphereAligner::xform_align_nbest(), and EMAN::RT3DGridAligner::xform_align_nbest(). |
|
Make an image with a copy of the current image's header.
|
|
make each pixel value divided by pixel value of another same-size image.
|
|
make each pixel value divided by a float number.
Referenced by EMAN::Util::calc_least_square_fit(). |
|
Dot product 2 images. The 2 images must be of same size. If 'evenonly' is true, only calculates pixels with even positions assuming all pixels are in a single array. If 'evenonly' is false, calculates all pixels. Shortcut for cmp("dot")
|
|
Free memory associated with this EMData Called in destructor and in assignment operator.
|
|
Definition at line 637 of file emdata_core.h. 00637 { 00638 vector<int> offsets; 00639 offsets.push_back(xoff); 00640 offsets.push_back(yoff); 00641 offsets.push_back(zoff); 00642 return offsets; 00643 }
|
|
Get one column of a 2D images.
Referenced by LBD_Cart(). |
|
Get complex<float> value at x,y,z. This assumes the image is a standard real/imaginary image with the complex origin in the first memory location. If you take the fft of a real nx x ny x nz image, a nx+2 x ny x nz image will be produced, and values using this function can go from -nx/2 to nx/2 and -ny/2 to ny/2. It will automatically deal with wraparound and complex conjugate issues for -x. This function differs from cmplx() which will interpret x,y directly as pixel coordinates
|
|
Get complex<float> value at x,y. This assumes the image is a standard real/imaginary image with the complex origin in the first memory location. If you take the fft of a real nx x ny image, a nx+2 x ny image will be produced, and values using this function can go from -nx/2-1 to nx/2+1 and -ny/2 to ny/2. It will automatically deal with wraparound and complex conjugate issues for -x. This function differs from cmplx() which will interpret x,y directly as pixel coordinates
|
|
|
|
Get complex<float> index for coords x,y,z. This assumes the image is a standard real/imaginary image with the complex origin in the first memory location. If you take the fft of a real nx x ny x nz image, a nx+2 x ny x nz image will be produced, and values using this function can go from -nx/2 to nx/2 and -ny/2 to ny/2. It will automatically deal with wraparound and complex conjugate issues for -x. Note that if a pixel is accessed at this location, a complex conjugate may be required if x<0, and this fact is not returned.
|
|
Definition at line 278 of file emdata_core.h. 00278 { 00279 // if (abs(x)>=nx/2 || abs(y)>ny/2 || abs(z)>nz/2) return nxyz; 00280 if (x<0) { 00281 return (size_t)x*-2+(y<=0?-y:ny-y)*(size_t)nx+(z<=0?-z:nz-z)*(size_t)nxy; 00282 } 00283 return x*2+(y<0?ny+y:y)*(size_t)nx+(z<0?nz+z:z)*(size_t)nxy; 00284 }
|
|
Get one row of a 1D/2D image.
Referenced by recons3d_HyBR_mpi_Cart(). |
|
Get the pixel density value given an index 'i' assuming the pixles are stored in a 1D array. The validity of i is not checked.
Definition at line 230 of file emdata_core.h. References get_data(). 00231 { 00232 return get_data()[i]; 00233 }
|
|
Get the pixel density value at coordinates (x,y). 2D only. The validity of x, y is not checked.
Definition at line 217 of file emdata_core.h. References get_data(), and nx.
|
|
Get the pixel density value at coordinates (x,y,z). The validity of x, y, and z is not checked.
Definition at line 204 of file emdata_core.h. References get_data(), and nx. Referenced by EMAN::Util::svdcmp().
|
|
Get the pixel density value at coordinates (x). Should only be called on 1D images - no errors are thrown Wraps pixel values if they are negative - i.e. is circulant For example, if x = -1, then the pixel at nx-1 is returned
|
|
Get the pixel density value at coordinates (x,y). Should only be called on 2D images - no errors are thrown Wraps pixel values if they are negative - i.e. is circulant For example, if x = -1, then the pixel at nx-1 is returned
|
|
Get the pixel density value at coordinates (x,y,z). Should only be called on 3D images - no errors are thrown Wraps pixel values if they are negative - i.e. is circulant For example, if x = -1, then the pixel at nx-1 is returned
|
|
return imaginary part of a complex image as a real image format.
Referenced by EMAN::fourierproduct(), and EMAN::periodogram(). |
|
return natural logarithm image for a image
Referenced by EMAN::LowpassAutoBProcessor::create_radial_func(), EMAN::Util::Crosrng_e(), EMAN::Util::Crosrng_ew(), EMAN::Util::Crosrng_ms(), EMAN::Util::Crosrng_ms_delta(), EMAN::Util::Crosrng_msg(), EMAN::Util::Crosrng_msg_m(), EMAN::Util::Crosrng_msg_s(), EMAN::Util::Crosrng_msg_vec(), EMAN::Util::Crosrng_ns(), EMAN::Util::Crosrng_psi_0_180(), EMAN::Util::Crosrng_sm_psi(), EMAN::Util::Frngs(), EMAN::Util::Frngs_inv(), EMAN::Randnum::get_gauss_rand(), EMAN::EMData::log(), EMAN::PointArray::pdb2mrc_by_summation(), EMAN::PointArray::projection_by_summation(), EMAN::Util::pw_extract(), EMAN::PointArray::replace_by_summation(), EMAN::PointArray::set_from_density_map(), slaed0_(), slaed6_(), slartg_(), and sstedc_(). |
|
return base 10 logarithm image for a image
Referenced by EMAN::Processor::EMFourierFilterFunc(), EMAN::EMData::log10(), main(), EMAN::SNRProcessor::process_inplace(), and EMAN::LogProcessor::process_pixel(). |
|
multiply each pixel of this image with each pixel of some other same-size image.
|
|
multiply a float number to each pixel value of the image.
|
|
multiply an integer number to each pixel value of the image.
Definition at line 101 of file emdata_core.h. Referenced by EMAN::nnSSNR_ctfReconstructor::insert_slice(), EMAN::nn4_ctfReconstructor::insert_slice(), EMAN::nnSSNR_Reconstructor::insert_slice(), and EMAN::nn4Reconstructor::insert_slice(). 00102 { 00103 mult((float)n); 00104 }
|
|
|
|
|
|
|
|
Definition at line 615 of file emdata_core.h. References get_data(), nx, ny, and OutofRangeException. 00615 { 00616 ptrdiff_t pos = ix - xoff; 00617 #ifdef BOUNDS_CHECKING 00618 if (pos < 0 || pos >= nx*ny*nz) 00619 throw OutofRangeException(0, nx*ny*nz-1, pos, "EMData"); 00620 #endif // BOUNDS_CHECKING 00621 return *(get_data() + pos); 00622 }
|
|
Definition at line 603 of file emdata_core.h. References get_data(), nx, ny, and OutofRangeException. 00603 { 00604 ptrdiff_t pos = (ix - xoff) + (iy-yoff)*nx; 00605 #ifdef BOUNDS_CHECKING 00606 if (pos < 0 || pos >= nx*ny*nz) 00607 { 00608 throw OutofRangeException(0, nx*ny*nz-1, pos, "EMData"); 00609 } 00610 #endif // BOUNDS_CHECKING 00611 return *(get_data() + pos); 00612 }
|
|
Overload operator() for array indexing.
Definition at line 593 of file emdata_core.h. References get_data(), nx, ny, and OutofRangeException. 00593 { 00594 ptrdiff_t pos = (ix-xoff) + ((iy-yoff) + (iz-zoff)*ny)*nx; 00595 #ifdef BOUNDS_CHECKING 00596 if (pos < 0 || pos >= nx*ny*nz) { 00597 throw OutofRangeException(0, nx*ny*nz-1, pos, "EMData"); 00598 } 00599 #endif // BOUNDS_CHECKING 00600 return *(get_data() + pos); 00601 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return phase part of a complex image as a real image format
Referenced by EMAN::TestImageSinewaveCircular::process_inplace(), EMAN::TestImageSinewave::process_inplace(), EMAN::TestImageSphericalWave::process_inplace(), EMAN::TestImageFourierNoiseProfile::process_inplace(), EMAN::TestImageFourierNoiseGaussian::process_inplace(), and EMAN::Util::tf(). |
|
return a image to the power of n
Referenced by EMAN::FourierReconstructor::do_compare_slice_work(), EMAN::Util::pack_complex_to_real(), and EMAN::periodogram(). |
|
return real part of a complex image as a real image format, if this image is a real image, return a copy of this image.
|
|
create a complex image from a real image, this complex image is in real/imaginary format
|
|
Definition at line 632 of file emdata_core.h. References set_array_offsets(). 00632 { 00633 set_array_offsets(offsets[0],offsets[1],offsets[2]); 00634 }
|
|
Set the array offsets.
Definition at line 626 of file emdata_core.h. Referenced by set_array_offsets().
|
|
Set one column of a 2D image.
|
|
Set complex<float> value at x,y,z. This assumes the image is a standard real/imaginary image with the complex origin in the first memory location. If you take the fft of a real nx x ny x nz image, a nx+2 x ny x nz image will be produced, and values using this function can go from -nx/2 to nx/2 and -ny/2 to ny/2. It will automatically deal with wraparound and complex conjugate issues for -x. This function differs from cmplx() which will interpret x,y directly as pixel coordinates
|
|
Set complex<float> value at x,y. This assumes the image is a standard real/imaginary image with the complex origin in the first memory location. If you take the fft of a real nx x ny image, a nx+2 x ny image will be produced, and values using this function can go from -nx/2-1 to nx/2+1 and -ny/2 to ny/2. It will automatically deal with wraparound and complex conjugate issues for -x. This function differs from cmplx() which will interpret x,y directly as pixel coordinates
|
|
Set one row of a 1D/2D image.
|
|
Set the pixel density value at coordinate (x). 1D image only.
Definition at line 547 of file emdata_core.h. References get_data(), nx, and OutofRangeException. 00548 { 00549 if( x>=nx || x<0 ) 00550 { 00551 throw OutofRangeException(0, nx-1, x, "x dimension index"); 00552 } 00553 else 00554 { 00555 get_data()[x] = v; 00556 flags |= EMDATA_NEEDUPD; 00557 changecount++; 00558 } 00559 }
|
|
Set the pixel density value at coordinates (x,y). 2D image only.
Definition at line 506 of file emdata_core.h. References get_data(), nx, ny, and OutofRangeException. 00507 { 00508 if( x>=nx || x<0 ) 00509 { 00510 throw OutofRangeException(0, nx-1, x, "x dimension index"); 00511 } 00512 else if( y>=ny || y<0 ) 00513 { 00514 throw OutofRangeException(0, ny-1, y, "y dimension index"); 00515 } 00516 else 00517 { 00518 get_data()[x + y * nx] = v; 00519 flags |= EMDATA_NEEDUPD; 00520 changecount++; 00521 } 00522 }
|
|
Set the pixel density value at coordinates (x,y,z). This implementation does bounds checking.
Definition at line 458 of file emdata_core.h. References get_data(), nx, ny, and OutofRangeException. 00459 { 00460 if( x>=nx || x<0 ) 00461 { 00462 throw OutofRangeException(0, nx-1, x, "x dimension index"); 00463 } 00464 else if( y>=ny || y<0 ) 00465 { 00466 throw OutofRangeException(0, ny-1, y, "y dimension index"); 00467 } 00468 else if( z>=nz || z<0 ) 00469 { 00470 throw OutofRangeException(0, nz-1, z, "z dimension index"); 00471 } 00472 else 00473 { 00474 get_data()[x + y * nx + z * nxy] = v; 00475 flags |= EMDATA_NEEDUPD; 00476 changecount++; 00477 } 00478 }
|
|
Set the pixel density value at coordinate (x). 1D image only.
Definition at line 567 of file emdata_core.h. References get_data().
|
|
Set the pixel density value at coordinates (x,y). 2D image only. The validity of x, y, is not checked.
Definition at line 532 of file emdata_core.h. References get_data(), and nx. 00533 { 00534 get_data()[x + y * nx] = v; 00535 flags |= EMDATA_NEEDUPD; 00536 changecount++; 00537 }
|
|
Set the pixel density value at coordinates (x,y,z). The validity of x, y, and z is not checked. This implementation has no bounds checking.
Definition at line 490 of file emdata_core.h. References get_data(), and nx. 00491 { 00492 get_data()[x + y * nx + z * nxy] = v; 00493 flags |= EMDATA_NEEDUPD; 00494 changecount++; 00495 }
|
|
A safer, slower way to get the pixel density value given an index 'i' assuming the pixles are stored in a 1D array. The validity of i is checked. If i is out of range, return 0;
|
|
A safer, slower way to get the pixel density value at coordinates (x,y). 2D only. The validity of x, y is checked. If the coordinates are out of range, return 0;
|
|
A safer, slower way to get the pixel density value at coordinates (x,y,z). The validity of x, y, and z is checked. If the coordinates are out of range, return 0;
|
|
Get the pixel density value at interpolation of (x,y,z). The validity of x, y, and z is checked.
|
|
Get pixel density value at interpolation of (x,y). The validity of x, y is checked.2D image only.
|
|
|
subtract a same-size image from this image pixel by pixel.
|
|
subtract a float number to each pixel value of the image.
Referenced by EMAN::FourierReconstructor::setup(), and EMAN::FourierReconstructor::setup_seed(). |
|
subtract the squared value of each pixel from a same-size image to this image.
|
|
set all the pixel values = 1.
|
|
set all the pixel values to a value.
|
|
Set all the pixel value = 0.
|