Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN Namespace Reference

df3 file format (http://www.povray.org/documentation/view/3.6.1/374) Header: The df3 format consists of a 6 byte header of three 16-bit integers with high order byte first. More...


Classes

class  EMAN::Aligner
 Aligner class defines image alignment method. More...
class  EMAN::TranslationalAligner
 Translational 2D Alignment using cross correlation. More...
class  EMAN::RotationalAligner
 rotational alignment using angular correlation More...
class  EMAN::RotationalAlignerIterative
 rotational alignment using the iterative method (in this case we only do one iteration b/c we are not doing a translation. More...
class  EMAN::RotatePrecenterAligner
 rotational alignment assuming centers are correct More...
class  EMAN::RotateTranslateAligner
 rotational, translational alignment More...
class  EMAN::RotateTranslateAlignerIterative
 Iterative rotational, translational alignment. More...
class  EMAN::RotateTranslateAlignerPawel
 Rotational, translational alignment by resampling to polar coordinates. More...
class  EMAN::RotateTranslateBestAligner
 rotational, translational alignment More...
class  EMAN::RotateFlipAligner
 rotational and flip alignment More...
class  EMAN::RotateFlipAlignerIterative
 rotational and flip alignment, iterative style More...
class  EMAN::RotateTranslateFlipAligner
 rotational, translational and flip alignment More...
class  EMAN::RotateTranslateFlipAlignerIterative
 rotational, translational and flip alignment, iterative style More...
class  EMAN::RotateTranslateFlipAlignerPawel
 Rotational, translational alignment by resampling to polar coordinates. More...
class  EMAN::RTFExhaustiveAligner
 rotational, translational and flip alignment using real-space methods. More...
class  EMAN::RTFSlowExhaustiveAligner
 rotational, translational and flip alignment using exhaustive search. More...
class  EMAN::RefineAligner
 refine alignment. More...
class  EMAN::Refine3DAlignerGrid
 Refine alignment. More...
class  EMAN::Refine3DAlignerQuaternion
 Refine alignment. More...
class  EMAN::RT3DGridAligner
 rotational and translational alignment using a square qrid of Altitude and Azimuth values (the phi range is specifiable) This aligner is ported from the original tomohunter.py - it is less efficient than searching on the sphere (RT3DSphereAligner). More...
class  EMAN::RT3DSphereAligner
 3D rotational and translational alignment using spherical sampling, can reduce the search space based on symmetry. More...
class  EMAN::RT3DSymmetryAligner
 3D rotational symmetry aligner. More...
class  EMAN::FRM2DAligner
class  EMAN::CUDA_Aligner
class  EMAN::CUDA_multiref_aligner
class  EMAN::AmiraIO
 Amira file = ASCII header + binary data. More...
class  EMAN::Analyzer
 Analyzer class defines a way to take a List of images as input, and returns a new List of images. More...
class  EMAN::KMeansAnalyzer
 KMeansAnalyzer Performs k-means classification on a set of input images (shape/size arbitrary) returned result is a set of classification vectors. More...
class  EMAN::SVDAnalyzer
 Singular Value Decomposition from GSL. More...
class  EMAN::Averager
 Averager class defines a way to do averaging on a set of images. More...
class  EMAN::ImageAverager
 ImageAverager averages a list of images. More...
class  EMAN::TomoAverager
 TomoAverager averages a list of volumes in Fourier space. More...
class  EMAN::MinMaxAverager
 ImageAverager averages a list of images. More...
class  EMAN::IterationAverager
 IterationAverager averages images by doing the smoothing iteration. More...
class  EMAN::CtfAverager
 CtfAverager is the base Averager class for CTF correction or SNR weighting. More...
class  EMAN::WeightingAverager
 WeightingAverager averages the images with SNR weighting, but no CTF correction. More...
class  EMAN::CtfCAverager
 CtfCAverager averages the images with CTF correction. More...
class  EMAN::CtfCWAverager
 CtfCWAverager averages the images with CTF correction. More...
class  EMAN::CtfCAutoAverager
 CtfCWautoAverager averages the images with CTF correction with a Wiener filter. More...
class  EMAN::CtfCWautoAverager
 CtfCWautoAverager averages the images with CTF correction with a Wiener filter. More...
class  EMAN::BoxingTools
 BoxingTools is class for encapsulating common boxing operations that may become expensive if they are implemented in python. More...
class  EMAN::BoxSVDClassifier
class  EMAN::ByteOrder
 ByteOrder defines functions to work on big/little endian byte orders. More...
class  EMAN::Cmp
 Cmp class defines image comparison method. More...
class  EMAN::CccCmp
 Compute the cross-correlation coefficient between two images. More...
class  EMAN::LodCmp
class  EMAN::SqEuclideanCmp
 Squared Euclidean distance normalized by n between 'this' and 'with'. More...
class  EMAN::DotCmp
 Use dot product of 2 same-size images to do the comparison. More...
class  EMAN::TomoCccCmp
 This implements the technique of Mike Schmid where by the cross correlation is normalized in an effort to remove the effects of the missing wedge. More...
class  EMAN::QuadMinDotCmp
 This will calculate the dot product for each quadrant of the image and return the worst value. More...
class  EMAN::OptVarianceCmp
 Variance between two data sets after various modifications. More...
class  EMAN::PhaseCmp
 Amplitude weighted mean phase difference (radians) with optional SNR weight. More...
class  EMAN::FRCCmp
 FRCCmp returns a quality factor based on FRC between images. More...
class  EMAN::Ctf
 Ctf is the base class for all CTF model. More...
class  EMAN::EMAN1Ctf
 EMAN1Ctf is the CTF model used in EMAN1. More...
class  EMAN::EMAN2Ctf
 EMAN2Ctf is the default CTF model used in EMAN2. More...
class  EMAN::Df3IO
class  EMAN::DM3IO
 Gatan DM3 file is a hierarchical binary image format. More...
class  EMAN::EMCache< T >
 EMCache is a generic cache that can cache anything defined by 'T'. More...
class  EMAN::GlobalCache
 GlobalCache is a Singleton class that handles cache across EMAN. More...
class  EMAN::EMData
 EMData stores an image's data and defines core image processing routines. More...
class  EMAN::EMData::ClipInplaceVariables
class  EMAN::EMFTGL
 EMFTGL is an interface for rendering fonts in EMAN2 using FTGL. More...
class  EMAN::EMFTGL::EMFTGLFontInstance
 A class for encapsulatiing a particular instance of an FTFont (pointer) Each FTFont is characterised by 5 parameters, them being the font mode, the font file name, the face size, whether or not display lists are being used, and depth (which is redundant, except when the font mode is EXTRUDE). More...
class  EMAN::EMFTGL::EMFTGLManager
 A class for managing multiple instances of EMFTGLFontInstances, in particular for caching them, for constructing news ones if they don't exist, and for returning appropriate instances. More...
class  EMAN::EmimIO
 EMIM image format = 1 EmimFileHeader + n x (EmimImageHeader + data). More...
struct  EMAN::EmimIO::EmimFileHeader
struct  EMAN::EmimIO::EmimImageHeader
class  EMAN::EmIO
 EmIO defines I/O operations on EM image format. More...
struct  EMAN::EmIO::EMHeader
class  EMAN::EMConsts
class  EMAN::EMObject
 EMObject is a wrapper class for types including int, float, double, etc as defined in ObjectType. More...
class  EMAN::TypeDict
 TypeDict is a dictionary to store <string, EMObject::ObjectType> pair. More...
class  EMAN::Dict
 Dict is a dictionary to store <string, EMObject> pair. More...
class  EMAN::Dict::iterator
 Non const iterator support for the Dict object This is just a wrapper, everything is inherited from the map<string,EMObject>::iterator so the interface is the same as you would expect i.e for ( Dict::iterator it = params.begin(); it != params.end(); ++it ). More...
class  EMAN::Dict::const_iterator
 Const iterator support for the Dict object This is just a wrapper, everything is inherited from the map<string,EMObject>::cons_iterator so the interface is the same as you would expect i.e for ( Dict::const_iterator it = params.begin(); it != params.end(); ++it ). More...
class  EMAN::Factory< T >
 Factory is used to store objects to create new instances. More...
class  EMAN::FactoryBase
 A class one may inherit from to ensure that the responsibilities of being incorporated into an EMAN2::Factory are met. More...
class  EMAN::EMUtil
struct  EMAN::ImageScore
class  EMAN::ImageSort
class  EMAN::E2Exception
 E2Exception class is the parent class of all EMAN2 E2Exceptions. More...
class  EMAN::_NotExistingObjectException
 Used when an object type, like an EMObject type, doesn't exist. More...
class  EMAN::_ImageFormatException
 Used when an image is not in the expected format. More...
class  EMAN::_ImageDimensionException
 Used when an image is not in the expected dimension. More...
class  EMAN::_FileAccessException
 Used when a file access error occurs. More...
class  EMAN::_ImageReadException
 Used when an error occurs at image reading time. More...
class  EMAN::_ImageWriteException
 Used when an error occurs at image writing time. More...
class  EMAN::_NullPointerException
 Used when a NULL is given to a pointer that should not be NULL. More...
class  EMAN::_TypeException
 Used when a type cast error occurs. More...
class  EMAN::_InvalidValueException
 Used when an invalid integer value is given. More...
class  EMAN::_InvalidStringException
 Used when an invalid (format) string is given. More...
class  EMAN::_OutofRangeException
 Used when the given value is out of range. More...
class  EMAN::_InvalidCallException
class  EMAN::_InvalidParameterException
class  EMAN::_EmptyContainerException
 Used when an argument container is empty, such as a vector. More...
class  EMAN::_BadAllocException
 Used when memory allocation goes wrong... More...
class  EMAN::_UnexpectedBehaviorException
 Used when internal behavior is unexpected A generic kind of exception. More...
class  EMAN::FitsIO
 MRC file = header + data (nx x ny x nz). More...
class  EMAN::Gatan2IO
 Gatan2 Image file = header + data. More...
struct  EMAN::Gatan2IO::Gatan2Header
class  EMAN::IntSize
 IntSize is used to describe a 1D, 2D or 3D rectangular size in integers. More...
class  EMAN::FloatSize
 FloatSize is used to describe a 1D, 2D or 3D rectangular size in floating numbers. More...
class  EMAN::IntPoint
 IntPoint defines an integer-coordinate point in a 1D/2D/3D space. More...
class  EMAN::FloatPoint
 FloatPoint defines a float-coordinate point in a 1D/2D/3D space. More...
class  EMAN::Pixel
 Pixel describes a 3D pixel's coordinates and its intensity value. More...
class  EMAN::Region
 Region defines a 2D or 3D rectangular region specified by its origin coordinates and all edges' sizes. More...
class  EMAN::GLUtil
class  EMAN::PriorityQueue< ValueT, KeyT >
 Template class for a priority queue. More...
class  EMAN::IcosIO
 ICOS file = header + data. More...
struct  EMAN::IcosIO::IcosHeader
class  EMAN::ImageIO
 ImageIO classes are designed for reading/writing various electron micrography image formats, including MRC, IMAGIC, SPIDER, PIF, etc. More...
class  EMAN::ImagicIO
 IMAGIC-5 Header File Format. More...
struct  EMAN::ImagicIO::ImagicHeader
class  EMAN::ImagicIO2
 IMAGIC-5 Header File Format. More...
struct  EMAN::ImagicIO2::Imagic4D
 IMAGIC-4D file format http://www.imagescience.de/formats/formats.htm. More...
class  EMAN::Interp
 Interp defines the interpolation function used to generate a e^-x^4 function in real space. More...
class  EMAN::Isosurface
class  EMAN::Log
 Log defines a way to output logging information. More...
class  EMAN::LstFastIO
 A LSX file is a high performance ASCII file that contains a list of image numbers and file names. More...
class  EMAN::LstIO
 A LST file is an ASCII file that contains a list of image file names. More...
class  EMAN::CustomVector< type >
 CustomVector has some trivial optimizations of the STL vector. More...
class  EMAN::MarchingCubes
class  EMAN::U3DWriter
 A work in progress by David Woolford. More...
class  EMAN::MrcIO
 MRC file = header + data (nx x ny x nz). More...
struct  EMAN::MrcIO::MrcHeader
struct  EMAN::MrcIO::FeiMrcHeader
 Extended MRC format for tomography As used by Fei; original definition of extended header by Dave Agard and Bram Koster Contact Dustin Morado <Dustin.Morado@uth.tmc.edu> for details. More...
struct  EMAN::MrcIO::FeiMrcExtHeader
 The extended header used by Fei MRC image. More...
class  EMAN::OmapIO
 DSN6 MAP is composed of a series of records which are all 512 bytes long. More...
struct  EMAN::OmapIO::OmapHeader
 The data in the header is composed of 256 short integers. More...
class  EMAN::PDBReader
 PointArray defines a double array of points with values in a 3D space. More...
class  EMAN::PgmIO
 A PGM file = header + data. More...
class  EMAN::PifIO
 PIF(Portable Image Format for EM Data) is an image format from Purdue University. More...
struct  EMAN::PifIO::PifFileHeader
struct  EMAN::PifIO::PifColorMap
struct  EMAN::PifIO::PifImageHeader
class  EMAN::XYZAligner
 XYZAligner is an aligner template for defining new aligners. More...
class  EMAN::XYZAverager
 XYZAverager is an averager template for defining new averagers. More...
class  EMAN::XYZCmp
 XYZCmp is a cmp template for defining new cmps. More...
class  EMAN::XYZIO
 XYZIO is a sample Image IO class. More...
class  EMAN::XYZProcessor
 XYZProcessor is a processor template for defining new processors. More...
class  EMAN::XYZProjector
 XYZProjector is an projector template for defining new projectors. More...
class  EMAN::XYZReconstructor
 XYZReconstructor is a reconstructor template for defining new reconstructors. More...
class  EMAN::PointArray
 PointArray defines a double array of points with values in a 3D space. More...
class  EMAN::UnevenMatrix
 a general data structure for a matrix with variable x dim size for different y More...
struct  EMAN::UnevenMatrix::Xdim
 struct to define x dimension size for each y, x0 is inclusive, x1 is one after the maximum, [x0, x1), so the corresponding x dim size is (x1-x0) More...
class  EMAN::PolarData
 a specialized image class for storing the results of a transform from EMData to polar coordinates, currently support 2D only. More...
class  EMAN::Processor
 Typical usage of Processors are as follows:. More...
class  EMAN::ImageProcessor
class  EMAN::FourierProcessor
 base class for Fourier filters More...
class  EMAN::FourierAnlProcessor
 Same as FourierProcessor, except first computes the current image radial power spectrum and passes it to the processor (no radial oversampling, number of elements = radius). More...
class  EMAN::SNREvalProcessor
 Evaluate individual particle images using a tenchique similar to that used for CTF evaluation. More...
class  EMAN::AmpweightFourierProcessor
 Multiplies each Fourier pixel by its amplitude. More...
class  EMAN::ConvolutionProcessor
 This processor performs fast convolution in Fourier space. More...
class  EMAN::XGradientProcessor
 Determines the partial derivatives in the x direction Does this by constructing edge kernels in real space but convoluting in Fourier space. More...
class  EMAN::YGradientProcessor
class  EMAN::ZGradientProcessor
class  EMAN::Wiener2DAutoAreaProcessor
 Automatically determines the background for the image then uses this to perform Wiener filters on overlapping subregions of the image, which are then combined using linear interpolation. More...
class  EMAN::DistanceSegmentProcessor
 Segment a volume about:homeinto subvolumes based on a center separation value. More...
class  EMAN::KmeansSegmentProcessor
 Segment a volume into ~n subvolumes using K-means classification. More...
class  EMAN::Wiener2DFourierProcessor
 Wiener filter based on a Ctf object either in the image header. More...
class  EMAN::LinearRampFourierProcessor
class  EMAN::LowpassAutoBProcessor
 processor radial function: if lowpass > 0, f(x) = exp(-x*x/(lowpass*lowpass)); else f(x) = exp(x*x/(lowpass*lowpass)) More...
class  EMAN::HighpassAutoPeakProcessor
 This processor attempts to remove the low resolution peak present in all cryoEM data. More...
class  EMAN::LinearRampProcessor
 processor radial function: f(x) = slope * x + intercept More...
class  EMAN::LoGFourierProcessor
 processor radial function: f(x) = ((x^2 - s^2)/s^4)e^-(x^2/2s^2) More...
class  EMAN::DoGFourierProcessor
 processor radial function: f(x) = 1/sqrt(2*pi)*[1/sigma1*exp-(x^2/2*sigma1^2) - 1/sigma2*exp-(x^2/2*sigma2^2)] More...
class  EMAN::RealPixelProcessor
 The base class for real space processor working on individual pixels. More...
class  EMAN::AbsoluateValueProcessor
 f(x) = |x| More...
class  EMAN::FloorValueProcessor
 f(x) = floor(x) More...
class  EMAN::BooleanProcessor
 f(x) = 0 if x = 0; f(x) = 1 if x != 0 More...
class  EMAN::InvertCarefullyProcessor
 Invert image as if f(x) != 0: f(x) = 1/f(x) else: f(x) = zero_to. More...
class  EMAN::ValuePowProcessor
 Do a math power operation on image, f(x) = x ^ pow;. More...
class  EMAN::ValueSquaredProcessor
 Do a square operation on image, f(x) = x * x;. More...
class  EMAN::ValueSqrtProcessor
 f(x) = sqrt(x) More...
class  EMAN::ToZeroProcessor
 f(x) = x if x >= minval; f(x) = 0 if x < minval More...
class  EMAN::Rotate180Processor
 Rotate by 180 using pixel swapping, works for 2D only. More...
class  EMAN::TransformProcessor
 Transform the image using a Transform object. More...
class  EMAN::IntTranslateProcessor
 Translate the image an integer amount Uses EMData::clip_inplace (inplace) and EMData::get_clip (out of place) to do the translation. More...
class  EMAN::ApplySymProcessor
 Applies a symmetry to a 3D model. More...
class  EMAN::SymAlignProcessor
 Aligns a particle with the specified symmetry into the standard orientation for that symmetry. More...
class  EMAN::ScaleTransformProcessor
 Scale the image with control over the output dimensions. More...
class  EMAN::ClampingProcessor
 f(x) = maxval if f(x) > maxval; f(x) = minval if f(x) < minval More...
class  EMAN::NSigmaClampingProcessor
 This function clamps the min and max vals in the image at minval and maxval at mean-n*sigma and mean+n*sigma, respectively. More...
class  EMAN::ToMinvalProcessor
 f(x) = x if x >= minval; f(x) = minval if x < minval More...
class  EMAN::CutToZeroProcessor
 f(x) = x-minval if x >= minval; f(x) = 0 if x < minval More...
class  EMAN::BinarizeProcessor
 f(x) = 0 if x < value; f(x) = 1 if x >= value. More...
class  EMAN::BinarizeFourierProcessor
 A thresholding processor for Fourier images based on the amplitude component. More...
class  EMAN::CollapseProcessor
 f(x): if v-r<x<v+r -> v; if x>v+r -> x-r; if x<v-r -> x+r More...
class  EMAN::LinearXformProcessor
 linear transform processor: f(x) = x * scale + shift More...
class  EMAN::ExpProcessor
 f(x) = exp( x / low - high) More...
class  EMAN::FiniteProcessor
 f(x) = f(x) if f(x) is finite | to if f(x) is not finite More...
class  EMAN::RangeThresholdProcessor
 f(x) = 1 if (low <= x <= high); else f(x) = 0 More...
class  EMAN::SigmaProcessor
 f(x) = mean if x<(mean-v2*sigma) or x>(mean+v1*sigma); else f(x) = x; More...
class  EMAN::LogProcessor
 f(x) = log10(x) if x > 0; else f(x) = 0 More...
class  EMAN::CoordinateProcessor
 CoordinateProcessor applies processing based on a pixel's value and it coordinates. More...
class  EMAN::CircularMaskProcessor
 CircularMaskProcessor applies a circular mask to the data.This is the base class for specific circular mask processors.Its subclass must implement process_dist_pixel(). More...
class  EMAN::MaskSharpProcessor
 step cutoff to a user-given value in both inner and outer circles. More...
class  EMAN::MaskEdgeMeanProcessor
 A step cutoff to the the mean value in a ring centered on the outer radius. More...
class  EMAN::MaskNoiseProcessor
 fills masked region More...
class  EMAN::MaskGaussProcessor
 a gaussian falloff to zero, radius is the 1/e of the width. More...
class  EMAN::MaskGaussNonuniformProcessor
 a gaussian falloff to zero, with nonisotropic widths along x,y,z More...
class  EMAN::MaskGaussInvProcessor
 f(x) = f(x) / exp(-radius*radius * gauss_width / (ny*ny)) More...
class  EMAN::LinearPyramidProcessor
 Multiplies image by a 'linear pyramid' 1-(|x-xsize/2|*|y-ysize/2|*4/(xsize*ysize)) This is useful in averaging together boxed out regions with 50% overlap. More...
class  EMAN::MakeRadiusSquaredProcessor
 overwrites input, f(x) = radius * radius More...
class  EMAN::MakeRadiusProcessor
 overwrites input, f(x) = radius More...
class  EMAN::ComplexPixelProcessor
 The base class for fourier space processor working on individual pixels. More...
class  EMAN::ComplexNormPixel
 Each Fourier pixel will be normalized. More...
class  EMAN::AreaProcessor
 AreaProcessor use pixel values and coordinates of a real-space square area. More...
class  EMAN::LaplacianProcessor
 Discrete approximation to Laplacian. More...
class  EMAN::ZeroConstantProcessor
 Contraction of data, if any nearest neighbor is 0, value -> 0, generally used iteratively. More...
class  EMAN::BoxStatProcessor
 BoxStatProcessor files are a kind of neighborhood processors. More...
class  EMAN::BoxMedianProcessor
 A processor for noise reduction. More...
class  EMAN::BoxSigmaProcessor
 pixel = standard deviation of values surrounding pixel. More...
class  EMAN::BoxMaxProcessor
 peak processor: pixel = max of values surrounding pixel. More...
class  EMAN::MinusPeakProcessor
 peak processor: pixel = pixel - max of values surrounding pixel. More...
class  EMAN::PeakOnlyProcessor
 peak processor -> if npeaks or more surrounding values >= value, value->0 More...
class  EMAN::DiffBlockProcessor
 averages over cal_half_width, then sets the value in a local block More...
class  EMAN::CutoffBlockProcessor
 Block processor, val1 is dx/dy, val2 is lp freq cutoff in pixels. More...
class  EMAN::BooleanShrinkProcessor
 BooleanShrinkProcessor encapsulates code common to MaxShrinkProcessor and MinShrinkProcessor - the processors use more or less identical code, the main difference being the logical operator. More...
class  EMAN::MaxShrinkProcessor
 MaxShrinkProcessors shrinks an image by in an integer amount, keeping the maximum pixel value - useful when constructing binary search trees in the marching cubes algorithm. More...
struct  EMAN::MaxShrinkProcessor::GreaterThan
class  EMAN::MinShrinkProcessor
 MinShrinkProcessor shrinks an image by in an integer amount, keeping the minimum pixel value - useful when constructing binary search trees in the marching cubes algorithm. More...
struct  EMAN::MinShrinkProcessor::LessThan
class  EMAN::MeanShrinkProcessor
 MeanShrinkProcessor shrinks an image by in an integer amount (and optionally by 1.5) taking the mean of the pixel neighbourhood. More...
class  EMAN::MedianShrinkProcessor
 MeanShrinkProcessor shrinks an image by in an integer amount taking the median of the pixel neighbourhood. More...
class  EMAN::FFTResampleProcessor
 FFTResampleProcessor resamples an image by clipping the Fourier Transform This is the same as multipyling the FT by a box window, in real space this is a convolution that will induce rippling. More...
class  EMAN::GradientRemoverProcessor
 Gradient remover, does a rough plane fit to find linear gradients. More...
class  EMAN::GradientPlaneRemoverProcessor
 Gradient removed by least square plane fit. More...
class  EMAN::FlattenBackgroundProcessor
 Flattens the background by subtracting the local mean. More...
class  EMAN::RampProcessor
 Ramp processor -- Fits a least-squares plane to the picture, and subtracts the plane from the picture. More...
class  EMAN::VerticalStripeProcessor
 Tries to fix images scanned on the zeiss for poor ccd normalization. More...
class  EMAN::RealToFFTProcessor
 This will replace the image with a full-circle 2D fft amplitude rendering. More...
class  EMAN::SigmaZeroEdgeProcessor
 Fill zeroes at edges with nearest horizontal/vertical value. More...
class  EMAN::BeamstopProcessor
 Try to eliminate beamstop in electron diffraction patterns. More...
class  EMAN::MeanZeroEdgeProcessor
 Fill zeroes at edges with nearest horizontal/vertical value damped towards Mean2. More...
class  EMAN::AverageXProcessor
 Average along Y and replace with average. More...
class  EMAN::DecayEdgeProcessor
 Decay edges of image to zero. More...
class  EMAN::ZeroEdgeRowProcessor
 zero edges of image on top and bottom, and on left and right. More...
class  EMAN::ZeroEdgePlaneProcessor
 zero edges of volume on all sides More...
class  EMAN::BilateralProcessor
 Bilateral processing on 2D or 3D volume data. More...
class  EMAN::NormalizeProcessor
 Base class for normalization processors. More...
class  EMAN::NormalizeUnitProcessor
 Normalize an image so its vector length is 1.0. More...
class  EMAN::NormalizeUnitSumProcessor
 Normalize an image so its elements sum to 1.0 (fails if mean=0). More...
class  EMAN::NormalizeStdProcessor
 do a standard normalization on an image. More...
class  EMAN::NormalizeMaskProcessor
 Uses a 1/0 mask defining a region to use for the zero-normalization.if no_sigma is 1, standard deviation not modified. More...
class  EMAN::NormalizeRampNormVar
 Normalize the image whilst also removing any ramps. More...
class  EMAN::NormalizeByMassProcessor
 Normalize the mass of the image assuming a density of 1.35 g/ml (0.81 Da/A^3). More...
class  EMAN::NormalizeEdgeMeanProcessor
 normalizes an image, mean value equals to edge mean. More...
class  EMAN::NormalizeCircleMeanProcessor
 normalizes an image, mean value equals to mean of 2 pixel circular border. More...
class  EMAN::NormalizeLREdgeMeanProcessor
 normalizes an image, uses 2 pixels on left and right edge More...
class  EMAN::NormalizeMaxMinProcessor
 normalizes an image. More...
class  EMAN::NormalizeRowProcessor
 normalizes each row in the image individually More...
class  EMAN::NormalizeToLeastSquareProcessor
 use least square method to normalize More...
class  EMAN::RotationalAverageProcessor
 makes image circularly symmetric. More...
class  EMAN::RotationalSubstractProcessor
 subtracts circularly symmetric part of an image. More...
class  EMAN::TransposeProcessor
 Transpose a 2D image. More...
class  EMAN::FlipProcessor
 flip an image around an axis More...
class  EMAN::AddNoiseProcessor
 add noise to an image More...
class  EMAN::AddSigmaNoiseProcessor
 add sigma noise, multiply image's sigma value to noise More...
class  EMAN::AddRandomNoiseProcessor
 add spectral noise to a complex image More...
class  EMAN::FourierToCornerProcessor
 Undo the effects of the FourierToCenterProcessor. More...
class  EMAN::FourierToCenterProcessor
 Translates the origin in Fourier space from the corner to the center in y and z Handles 2D and 3D, and handles all combinations of even and oddness Typically you call this function after Fourier transforming a real space image. More...
class  EMAN::Phase180Processor
 This class is abstract. More...
class  EMAN::PhaseToCenterProcessor
 Translates a cornered image to the center Undoes the PhaseToCornerProcessor. More...
class  EMAN::PhaseToCornerProcessor
 Translates a centered image to the corner works for 1D, 2D and 3D images, for all combinations of even and oddness. More...
class  EMAN::AutoMask2DProcessor
 Attempts to automatically mask out the particle, excluding other particles in the box, etc. More...
class  EMAN::AutoMaskAsymUnit
 Tries to mask out only interesting density. More...
class  EMAN::AutoMask3DProcessor
 Tries to mask out only interesting density. More...
class  EMAN::AutoMask3D2Processor
 Tries to mask out only interesting density. More...
class  EMAN::AddMaskShellProcessor
 Add additional shells/rings to an existing 1/0 mask image. More...
class  EMAN::PhaseToMassCenterProcessor
 ToMassCenterProcessor centers image at center of mass, ignores old dx, dy. More...
class  EMAN::ToMassCenterProcessor
 ToMassCenterProcessor centers image at center of mass, ignores old dx, dy. More...
class  EMAN::ACFCenterProcessor
 Center image using auto convolution with 180 degree rotation. More...
class  EMAN::SNRProcessor
 Processor the images by the estimated SNR in each image.if parameter 'wiener' is 1, then wiener processor the images using the estimated SNR with CTF amplitude correction. More...
class  EMAN::FileFourierProcessor
 A fourier processor specified in a 2 column text file. More...
class  EMAN::SymSearchProcessor
 Identifiy the best symmetry in the given symmetry list for each pixel and then apply the best symmetry to each pixel. More...
class  EMAN::LocalNormProcessor
 This processor attempts to perform a 'local normalization' so low density and high density features will be on a more even playing field in an isosurface display. More...
class  EMAN::IndexMaskFileProcessor
 Multiplies the image by the specified file using pixel indices. More...
class  EMAN::CoordinateMaskFileProcessor
 Multiplies the image by the specified file using pixel coordinates instead of pixel indices. More...
class  EMAN::PaintProcessor
 'paints' a circle into the image at x,y,z with values inside r1 set to v1, values between r1 and r2 will be set to a value between v1 and v2, and values outside r2 will be unchanged More...
class  EMAN::DirectionalSumProcessor
 Does a projection in one the axial directions Doesn't support process_inplace (because the output has potentially been compressed in one dimension). More...
class  EMAN::WatershedProcessor
 'paints' a circle into the image at x,y,z with values inside r1 set to v1, values between r1 and r2 will be set to a value between v1 and v2, and values outside r2 will be unchanged More...
class  EMAN::BinaryOperateProcessor< Type >
 Operates on two images, returning an image containing the maximum/minimum/multiplied pixel (etc, you choose) at each location The actual operation depends on what template argument you use. More...
class  EMAN::MaxPixelOperator
class  EMAN::MinPixelOperator
class  EMAN::MatchSFProcessor
 Sets the structure factor To match a second provided image/volume. More...
class  EMAN::SetSFProcessor
 Sets the structure factor based on a 1D s/intensity curve as an XYData object. More...
class  EMAN::SmartMaskProcessor
 Smart mask processor. More...
class  EMAN::IterBinMaskProcessor
 Iterative expansion of a binary mask, val1 is number of pixels to expand, if val2!=0 will make a soft Gaussian edge starting after val2 pixels. More...
class  EMAN::TestImageProcessor
 Base class for a group of 'processor' used to create test image. More...
class  EMAN::TestImagePureGaussian
 Replace a source image as a strict Gaussian. More...
class  EMAN::TestImageFourierNoiseGaussian
 Replace a source image as a strict Gaussian. More...
class  EMAN::TestImageFourierNoiseProfile
class  EMAN::CTFSNRWeightProcessor
class  EMAN::TestImageLineWave
 Treats the pixels as though they are 1D (even if the image is 2D or 3D), inserting a sine wave of pixel period extracted from the parameters (default is 10). More...
class  EMAN::TestTomoImage
 Make an image useful for tomographic reconstruction testing this is a 3D phantom image based on the 2D phantom described in Delaney and Bresler, "Globally convergent edge-preserving regularized reconstruction: An application to limited-angle tomography". More...
class  EMAN::TestImageGradient
 Put a gradient in the image of the form y = mx+b : "x" is a string indicating any of the image axes, i.e., x,y or z. More...
class  EMAN::TestImageAxes
 Make an image consisting of a single cross, with lines going in the axial directions, intersecting at the origin. More...
class  EMAN::TestImageGaussian
 Replace a source image as a Gaussian Blob. More...
class  EMAN::TestImageScurve
 Replace a source image with a lumpy S-curve used for alignment testing. More...
class  EMAN::TestImageSphericalWave
 Replace a source image as a sine wave in specified wave length. More...
class  EMAN::TestImageSinewave
 Replace a source image as a sine wave in specified wave length. More...
class  EMAN::TestImageSinewaveCircular
 Replace a source image as a circular sine wave in specified wave length. More...
class  EMAN::TestImageSquarecube
 Replace a source image as a square or cube depends on 2D or 3D of the source image. More...
class  EMAN::TestImageEllipse
 Generate an ellipse or ellipsoid image. More...
class  EMAN::TestImageHollowEllipse
 Generate an ellipse/ellipsoid image with an inner hollow ellipse/ellipsoid. More...
class  EMAN::TestImageCirclesphere
 Replace a source image as a circle or sphere depends on 2D or 3D of the source image. More...
class  EMAN::TestImageNoiseUniformRand
 Replace a source image as a uniform random noise, random number generated from gsl_rng_mt19937, the pixel value is from 0 to 1, [0, 1). More...
class  EMAN::TestImageNoiseGauss
 Replace a source image with gaussian distributed random noise If you don't provide a seed at all, it should be seeded using the best available source of randomness( time(0) in this implementation). More...
class  EMAN::TestImageCylinder
 Replace a source image with a cylinder. More...
class  EMAN::CCDNormProcessor
 Try to normalize the 4 quadrants of a CCD image. More...
class  EMAN::WaveletProcessor
 Perform a Wavelet transform using GSL. More...
class  EMAN::TomoTiltEdgeMaskProcessor
 A processor designed specifically for tomographic tilt series data. More...
class  EMAN::TomoTiltEdgeMaskProcessor::GaussianFunctoid
class  EMAN::TomoTiltAngleWeightProcessor
 A processor that can be used to weight an image by 1/cos(angle) This processor evolved originally as an experimental tool for weighting tomographic data by the width of its cross section relative to the electron beam. More...
class  EMAN::FFTProcessor
 Perform a FFT transform by calling EMData::do_fft() and EMData::do_ift(). More...
class  EMAN::RadialProcessor
 Perform a multiplication of real image with a radial table. More...
class  EMAN::HistogramBin
 Bins pixel values, similar to calculating a histogram. More...
class  EMAN::ModelHelixProcessor
class  EMAN::ModelEMCylinderProcessor
class  EMAN::ApplyPolynomialProfileToHelix
class  EMAN::BinarySkeletonizerProcessor
class  EMAN::ConvolutionKernelProcessor
class  EMAN::Projector
 Projector class defines a method to generate 2D projections from a 3D model. More...
class  EMAN::GaussFFTProjector
 Gaussian FFT 3D projection. More...
class  EMAN::FourierGriddingProjector
 Fourier gridding projection routine. More...
class  EMAN::PawelProjector
 Pawel Penczek's optimized projection routine. More...
struct  EMAN::PawelProjector::IPCube
class  EMAN::StandardProjector
 Fast real-space 3D projection. More...
class  EMAN::ChaoProjector
 Fast real space projection using Bi-Linear interpolation. More...
class  EMAN::Quaternion
 Quaternion is used in Rotation and Transformation to replace Euler angles. More...
class  EMAN::Randnum
 The wrapper class for gsl's random number generater. More...
class  EMAN::Reconstructor
 Reconstructor class defines a way to do 3D recontruction. More...
class  EMAN::ReconstructorVolumeData
 This is a Mixin class A class object encapsulating the volume data required by Reconstructors It basically stores two (pointers) to EMData objectsd stores the dimensions of the image volume. More...
class  EMAN::FourierReconstructorSimple2D
 This class originally added for 2D experimentation and prototying. More...
class  EMAN::FourierReconstructor
 Fourier space 3D reconstruction The Fourier reconstructor is designed to work in an iterative fashion, where similarity ("quality") metrics are used to determine if a slice should be inserted into the 3D in each subsequent iteration. More...
class  EMAN::WienerFourierReconstructor
 Fourier space 3D reconstruction This is a modified version of the normal FourierReconstructor which is aware of the SSNR information stored in individual class-average headers as "ctf_snr_total" and "ctf_wiener_filtered". More...
class  EMAN::BackProjectionReconstructor
 Real space 3D reconstruction using back projection. More...
class  EMAN::nn4Reconstructor
class  EMAN::nn4_rectReconstructor
 Direct Fourier inversion Reconstructor for extremly rectangular object. More...
class  EMAN::nnSSNR_Reconstructor
class  EMAN::nn4_ctfReconstructor
 nn4_ctf Direct Fourier Inversion Reconstructor More...
class  EMAN::nn4_ctf_rectReconstructor
 nn4_ctf_rectDirect Fourier Inversion Reconstructor More...
class  EMAN::nnSSNR_ctfReconstructor
struct  EMAN::point_t
class  EMAN::newfile_store
class  EMAN::file_store
class  EMAN::FourierPixelInserter3D
 FourierPixelInserter3D class defines a way a continuous pixel in 3D is inserted into the discrete 3D volume - there are various schemes for doing this including simply finding the nearest neighbor to more elaborate schemes that involve interpolation using the nearest 8 voxels and so on. More...
class  EMAN::FourierInserter3DMode1
 FourierPixelInserter3DMode1 - encapsulates "method 1" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  EMAN::FourierInserter3DMode2
 FourierPixelInserter3DMode2 - encapsulates "method 2" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  EMAN::FourierInserter3DMode3
 FourierPixelInserter3DMode3 - encapsulates "method 3" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  EMAN::FourierInserter3DMode5
 FourierPixelInserter3DMode5 - encapsulates "method 5" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  EMAN::FourierInserter3DMode6
 FourierPixelInserter3DMode6 - encapsulates "method 6" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  EMAN::FourierInserter3DMode7
 FourierPixelInserter3DMode7 - encapsulates "method 7" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  EMAN::FourierInserter3DMode8
 FourierPixelInserter3DMode8 - encapsulates "method 8" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  EMAN::SalIO
 A SAL image is an image from Perkin Elmer PDS Microdensitometer. More...
class  EMAN::PCAsmall
 Principal component analysis. More...
class  EMAN::PCAlarge
class  EMAN::varimax
class  EMAN::EMArray< T >
 EMArray -- 1-, 2-, or 3-D array of types T. More...
class  EMAN::PCA
class  EMAN::MirrorProcessor
 mirror an image More...
class  EMAN::NewFourierProcessor
class  EMAN::NewLowpassTopHatProcessor
 Lowpass top-hat filter processor applied in Fourier space. More...
class  EMAN::NewHighpassTopHatProcessor
 Highpass top-hat filter applied in Fourier NewLowpassGaussProcessorspace. More...
class  EMAN::NewBandpassTopHatProcessor
 Bandpass top-hat filter processor applied in Fourier space. More...
class  EMAN::NewHomomorphicTopHatProcessor
 Homomorphic top-hat filter processor applied in Fourier space. More...
class  EMAN::NewLowpassGaussProcessor
 Lowpass Gauss filter processor applied in Fourier space. More...
class  EMAN::NewHighpassGaussProcessor
 Highpass Gauss filter processor applied in Fourier space. More...
class  EMAN::NewBandpassGaussProcessor
 Bandpass Gauss filter processor applied in Fourier space. More...
class  EMAN::NewHomomorphicGaussProcessor
 Homomorphic Gauss filter processor applied in Fourier space. More...
class  EMAN::NewInverseGaussProcessor
 Divide by a Gaussian in Fourier space. More...
class  EMAN::SHIFTProcessor
 Shift by phase multiplication in Fourier space. More...
class  EMAN::InverseKaiserI0Processor
 Divide by a Kaiser-Bessel I0 func in Fourier space. More...
class  EMAN::InverseKaiserSinhProcessor
 Divide by a Kaiser-Bessel Sinh func in Fourier space. More...
class  EMAN::NewRadialTableProcessor
 Filter with tabulated data in Fourier space. More...
class  EMAN::NewLowpassButterworthProcessor
 Lowpass Butterworth filter processor applied in Fourier space. More...
class  EMAN::NewHighpassButterworthProcessor
 Highpass Butterworth filter processor applied in Fourier space. More...
class  EMAN::NewHomomorphicButterworthProcessor
 Homomorphic Butterworth filter processor applied in Fourier space. More...
class  EMAN::NewLowpassTanhProcessor
 Lowpass tanh filter processor applied in Fourier space. More...
class  EMAN::NewHighpassTanhProcessor
 Highpass tanh filter processor applied in Fourier space. More...
class  EMAN::NewHomomorphicTanhProcessor
 Homomorphic Tanh processor applied in Fourier space. More...
class  EMAN::NewBandpassTanhProcessor
 Bandpass tanh processor applied in Fourier space. More...
class  EMAN::CTF_Processor
class  EMAN::SpiderIO
 SPIDER: (System for Processing Image Data from Electron microscopy and Related fields) is an image processing system for electron microscopy. More...
struct  EMAN::SpiderIO::SpiderHeader
class  EMAN::SingleSpiderIO
 Single Spider Image I/O class. More...
class  EMAN::Symmetry3D
 Symmetry3D - A base class for 3D Symmetry objects. More...
class  EMAN::CSym
 An encapsulation of cyclic 3D symmetry. More...
class  EMAN::DSym
 An encapsulation of dihedral 3D symmetry. More...
class  EMAN::HSym
 An encapsulation of helical 3D symmetry. More...
class  EMAN::PlatonicSym
 A base (or parent) class for the Platonic symmetries. More...
class  EMAN::TetrahedralSym
 An encapsulation of tetrahedral symmetry Doctor Phil has this to say about tetrahedral symmetry: " Each Platonic Solid has 2E symmetry elements. More...
class  EMAN::OctahedralSym
 An encapsulation of octahedral symmetry Doctor Phil has this to say about the octahedral symmetry: "Each Platonic Solid has 2E symmetry elements. More...
class  EMAN::IcosahedralSym
 An encapsulation of icosahedral symmetry Doctor Phil has this to say about icosahedral symmetry: "Each Platonic Solid has 2E symmetry elements. More...
class  EMAN::OrientationGenerator
 An orientation generator is a kind of class that will generate orientations for a given symmetry If one needs to generate orientations in the unit sphere, one simply uses the C1 symmetry. More...
class  EMAN::EmanOrientationGenerator
 EmanOrientationGenerator generates orientations quasi-evenly distributed in the asymmetric unit. More...
class  EMAN::RandomOrientationGenerator
 Random Orientation Generator - carefully generates uniformly random orientations in any asymmetric unit. More...
class  EMAN::EvenOrientationGenerator
 Sparx even orientation generator - see util_sparx.cpp - Util::even_angles(...) This orientation generator is based on work presented in Penczek et al., 1994 P.A. More...
class  EMAN::SaffOrientationGenerator
 Saff orientation generator - based on the work of Saff and Kuijlaars, 1997 E.B. More...
class  EMAN::OptimumOrientationGenerator
 Optimum orientation generator. More...
class  EMAN::TestUtil
class  EMAN::Transform
 A Transform object is a somewhat specialized object designed specifically for EMAN2/Sparx storage of alignment parameters and euler orientations. More...
class  EMAN::Util
 Util is a collection of utility functions. More...
class  EMAN::Util::sincBlackman
class  EMAN::Util::KaiserBessel
 1-D Kaiser-Bessel window function class. More...
class  EMAN::Util::KaiserBessel::kbsinh_win
 Sinh window function object. More...
class  EMAN::Util::KaiserBessel::kbi0_win
 I0 window function object. More...
class  EMAN::Util::FakeKaiserBessel
class  EMAN::Util::Gaussian
 Gaussian function class. More...
struct  EMAN::Util::tmpstruct
class  EMAN::V4L2IO
 Read-only. More...
class  EMAN::Vec3< Type >
 The Vec3 object is a templated object, intended to instantiated with basic types such as int, float, double etc. More...
class  EMAN::Vec2< Type >
 The Vec2 is precisely the same as Vec3 except it works exclusively in 2D Note there are convenient typedef so one needn't bother about using template terminology typedef Vec2<float> Vec2f; typedef Vec2<int> Vec2i; typedef Vec2double> Vec2d; // Not recommended for use unless precision is addressed in this class. More...
class  EMAN::ScreenVector
class  EMAN::ScreenPoint
class  EMAN::Vector3
class  EMAN::Point3
class  EMAN::Matrix3
class  EMAN::Vector4
class  EMAN::Matrix4
class  EMAN::VtkIO
 VtkIO reads/writes VTK image file. More...
class  EMAN::XplorIO
 XPLOR image format is in ASCII:. More...
class  EMAN::XYData
 XYData defines a 1D (x,y) data set. More...
struct  EMAN::XYData::Pair

Typedefs

typedef boost::multi_array_ref<
float, 2 > 
MArray2D
typedef boost::multi_array_ref<
float, 3 > 
MArray3D
typedef boost::multi_array_ref<
std::complex< float >, 2 > 
MCArray2D
typedef boost::multi_array_ref<
std::complex< float >, 3 > 
MCArray3D
typedef boost::multi_array<
int, 2 > 
MIArray2D
typedef boost::multi_array<
int, 3 > 
MIArray3D
typedef Vec3< float > Vec3f
typedef Vec3< int > Vec3i
typedef Vec3< double > Vec3d
typedef Vec2< float > Vec2f
typedef Vec2< int > Vec2i
typedef Vec2< double > Vec2d

Enumerations

enum  MapInfoType {
  NORMAL, ICOS2F_FIRST_OCTANT, ICOS2F_FULL, ICOS2F_HALF,
  ICOS3F_HALF, ICOS3F_FULL, ICOS5F_HALF, ICOS5F_FULL,
  ICOS_UNKNOWN
}
enum  fp_flag {
  CIRCULANT = 1, CIRCULANT_NORMALIZED = 2, PADDED = 3, PADDED_NORMALIZED = 4,
  PADDED_LAG = 5, PADDED_NORMALIZED_LAG = 6
}
 Fourier Product processing flag. More...
enum  fp_type { CORRELATION, CONVOLUTION, SELF_CORRELATION, AUTOCORRELATION }
enum  kernel_shape { BLOCK = 1, CIRCULAR = 2, CROSS = 3 }
enum  morph_type { BINARY = 1, GRAYLEVEL = 2 }
 Median filter. More...

Functions

void dump_aligners ()
map< string, vector< string > > dump_aligners_list ()
void dump_analyzers ()
map< string, vector< string > > dump_analyzers_list ()
void dump_averagers ()
map< string, vector< string > > dump_averagers_list ()
void dump_cmps ()
map< string, vector< string > > dump_cmps_list ()
EMDataoperator+ (const EMData &em, float n)
EMDataoperator- (const EMData &em, float n)
EMDataoperator * (const EMData &em, float n)
EMDataoperator/ (const EMData &em, float n)
EMDataoperator+ (float n, const EMData &em)
EMDataoperator- (float n, const EMData &em)
EMDataoperator * (float n, const EMData &em)
EMDataoperator/ (float n, const EMData &em)
EMDatarsub (const EMData &em, float n)
EMDatardiv (const EMData &em, float n)
EMDataoperator+ (const EMData &a, const EMData &b)
EMDataoperator- (const EMData &a, const EMData &b)
EMDataoperator * (const EMData &a, const EMData &b)
EMDataoperator/ (const EMData &a, const EMData &b)
bool operator== (const EMObject &e1, const EMObject &e2)
bool operator!= (const EMObject &e1, const EMObject &e2)
bool operator== (const Dict &d1, const Dict &d2)
bool operator!= (const Dict &d1, const Dict &d2)
template<class T>
void dump_factory ()
template<class T>
map< string, vector< string > > dump_factory_list ()
IntPoint operator- (const IntPoint &p)
bool operator< (const Pixel &p1, const Pixel &p2)
bool operator== (const Pixel &p1, const Pixel &p2)
bool operator!= (const Pixel &p1, const Pixel &p2)
int multi_processors (EMData *image, vector< string > processornames)
void dump_processors ()
map< string, vector< string > > dump_processors_list ()
map< string, vector< string > > group_processors ()
void dump_projectors ()
map< string, vector< string > > dump_projectors_list ()
Quaternion operator+ (const Quaternion &q1, const Quaternion &q2)
Quaternion operator- (const Quaternion &q1, const Quaternion &q2)
Quaternion operator * (const Quaternion &q1, const Quaternion &q2)
Quaternion operator * (const Quaternion &q, float s)
Quaternion operator * (float s, const Quaternion &q)
Quaternion operator/ (const Quaternion &q1, const Quaternion &q2)
bool operator== (const Quaternion &q1, const Quaternion &q2)
bool operator!= (const Quaternion &q1, const Quaternion &q2)
EMDatapadfft_slice (const EMData *const slice, const Transform &t, int npad)
 Direct Fourier inversion Reconstructor.
void dump_reconstructors ()
map< string, vector< string > > dump_reconstructors_list ()
EMDataperiodogram (EMData *f)
EMDatafourierproduct (EMData *f, EMData *g, fp_flag flag, fp_type ptype, bool center)
 Fourier product of two images.
EMDatacorrelation (EMData *f, EMData *g, fp_flag myflag, bool center)
 Correlation of two images.
EMDataconvolution (EMData *f, EMData *g, fp_flag myflag, bool center)
 Convolution of two images.
EMDatarsconvolution (EMData *f, EMData *K)
 Real-space convolution of two images.
EMDatarscp (EMData *f)
 Real-space convolution with the K-B window.
EMDataautocorrelation (EMData *f, fp_flag myflag, bool center)
 Image autocorrelation.
EMDataself_correlation (EMData *f, fp_flag myflag, bool center)
 Image self-correlation.
EMDatafilt_median_ (EMData *f, int nxk, int nyk, int nzk, kernel_shape myshape)
EMDatafilt_dilation_ (EMData *f, EMData *K, morph_type mydilation)
EMDatafilt_erosion_ (EMData *f, EMData *K, morph_type myerosion)
 Dilation filter.
void dump_symmetries ()
 dump symmetries, useful for obtaining symmetry information
map< string, vector< string > > dump_symmetries_list ()
 dump_symmetries_list, useful for obtaining symmetry information
void dump_orientgens ()
 Dumps useful information about the OrientationGenerator factory.
map< string, vector< string > > dump_orientgens_list ()
 Can be used to get useful information about the OrientationGenerator factory.
Transform operator * (const Transform &M2, const Transform &M1)
 Matrix times Matrix, a pure mathematical operation.
template<typename Type>
Vec3f operator * (const Transform &M, const Vec3< Type > &v)
 Matrix times Vector, a pure mathematical operation.
template<typename Type>
Vec2f operator * (const Transform &M, const Vec2< Type > &v)
 Matrix times Vector, a pure mathematical operation.
template<typename Type>
Vec3f operator * (const Vec3< Type > &v, const Transform &M)
 Vector times a matrix.
template<typename Type, typename Type2>
Vec3< Type > operator+ (const Vec3< Type > &v1, const Vec3< Type2 > &v2)
template<typename Type, typename Type2>
Vec3< Type > operator+ (const Vec3< Type > &v, const Type2 &n)
template<typename Type, typename Type2>
Vec3< Type > operator- (const Vec3< Type > &v1, const Vec3< Type2 > &v2)
template<typename Type, typename Type2>
Vec3< Type > operator- (const Vec3< Type > &v, const Type2 &n)
template<typename Type>
Vec3< Type > operator- (const Vec3< Type > &v)
template<typename Type, typename Type2>
Type operator * (const Vec3< Type > &v1, const Vec3< Type2 > &v2)
template<typename Type, typename Type2>
Vec3< Type2 > operator * (const Type &d, const Vec3< Type2 > &v)
template<typename Type, typename Type2>
Vec3< Type > operator * (const Vec3< Type > &v, const Type2 &d)
template<typename Type, typename Type2>
Vec3< Type2 > operator/ (const Type &d, const Vec3< Type2 > &v)
template<typename Type, typename Type2>
Vec3< Type > operator/ (const Vec3< Type > &v, const Type2 &d)
template<typename Type, typename Type2>
bool operator== (const Vec3< Type > &v1, const Vec3< Type2 > &v2)
template<typename Type, typename Type2>
bool operator!= (const Vec3< Type > &v1, const Vec3< Type2 > &v2)
template<typename Type, typename Type2>
Vec2< Type > operator+ (const Vec2< Type > &v1, const Vec2< Type2 > &v2)
template<typename Type, typename Type2>
Vec2< Type > operator+ (const Vec2< Type > &v, const Type2 &n)
template<typename Type, typename Type2>
Vec2< Type > operator- (const Vec2< Type > &v1, const Vec2< Type2 > &v2)
template<typename Type, typename Type2>
Vec2< Type > operator- (const Vec2< Type > &v, const Type2 &n)
template<typename Type>
Vec2< Type > operator- (const Vec2< Type > &v)
template<typename Type, typename Type2>
Type operator * (const Vec2< Type > &v1, const Vec2< Type2 > &v2)
template<typename Type, typename Type2>
Vec2< Type2 > operator * (const Type &d, const Vec2< Type2 > &v)
template<typename Type, typename Type2>
Vec2< Type > operator * (const Vec2< Type > &v, const Type2 &d)
template<typename Type, typename Type2>
Vec2< Type2 > operator/ (const Type &d, const Vec2< Type2 > &v)
template<typename Type, typename Type2>
Vec2< Type > operator/ (const Vec2< Type > &v, const Type2 &d)
template<typename Type, typename Type2>
bool operator== (const Vec2< Type > &v1, const Vec2< Type2 > &v2)
template<typename Type, typename Type2>
bool operator!= (const Vec2< Type > &v1, const Vec2< Type2 > &v2)
bool isZero (double in_d, double in_dEps=1e-16)
ScreenVector operator * (const double s, const ScreenVector &v)
std::ostream & operator<< (std::ostream &os, const ScreenVector &v)
std::ostream & operator<< (std::ostream &os, const ScreenPoint &p)
Vector3 operator * (const double s, const Vector3 &v)
double dot (const Vector3 &w, const Vector3 &v)
Vector3 cross (const Vector3 &w, const Vector3 &v)
double length (const Vector3 &v)
Vector3 unit (const Vector3 &v)
std::ostream & operator<< (std::ostream &os, const Vector3 &v)
Point3 lerp (const Point3 &p0, const Point3 &p1, double dT)
std::ostream & operator<< (std::ostream &os, const Point3 &p)
Vector3 operator * (const Vector3 &v, const Matrix3 &m)
Point3 operator * (const Point3 &p, const Matrix3 &m)
std::ostream & operator<< (std::ostream &os, const Matrix3 &m)
Vector4 operator * (const double s, const Vector4 &v)
double length (const Vector4 &v)
Vector4 unit (const Vector4 &v)
std::ostream & operator<< (std::ostream &os, const Vector4 &v)
std::ostream & operator<< (std::ostream &os, const Matrix4 &m)

Variables

const int MAXFFT = 32768


Detailed Description

df3 file format (http://www.povray.org/documentation/view/3.6.1/374) Header: The df3 format consists of a 6 byte header of three 16-bit integers with high order byte first.

These three values give the x,y,z size of the data in pixels (or more appropriately called voxels ). Data: The header is followed by x*y*z unsigned integer bytes of data with a resolution of 8, 16 or 32 bit. The data are written with high order byte first (big-endian). The resolution of the data is determined by the size of the df3-file. That is, if the file is twice (minus header, of course) as long as an 8 bit file then it is assumed to contain 16 bit ints and if it is four times as long 32 bit ints.


Typedef Documentation

typedef boost::multi_array_ref<float, 2> EMAN::MArray2D
 

Definition at line 74 of file emdata.h.

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

typedef boost::multi_array_ref<float, 3> EMAN::MArray3D
 

Definition at line 75 of file emdata.h.

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

typedef boost::multi_array_ref<std::complex<float>, 2> EMAN::MCArray2D
 

Definition at line 76 of file emdata.h.

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

typedef boost::multi_array_ref<std::complex<float>, 3> EMAN::MCArray3D
 

Definition at line 77 of file emdata.h.

Referenced by EMAN::EMData::get_3dcview(), and EMAN::EMData::get_3dcviewptr().

typedef boost::multi_array<int, 2> EMAN::MIArray2D
 

Definition at line 78 of file emdata.h.

typedef boost::multi_array< int, 3 > EMAN::MIArray3D
 

Definition at line 79 of file emdata.h.

typedef Vec2<double> EMAN::Vec2d
 

Definition at line 868 of file vec3.h.

typedef Vec2<float> EMAN::Vec2f
 

Definition at line 866 of file vec3.h.

Referenced by EMAN::RTFExhaustiveAligner::align(), EMAN::Transform::get_pre_trans_2d(), EMAN::Transform::get_trans_2d(), EMAN::EMData::insert_rect_slice(), EMAN::EMData::insert_rect_slice_ctf(), EMAN::EMData::insert_rect_slice_ctf_applied(), operator *(), padfft_slice(), EMAN::Util::point_is_in_convex_polygon_2d(), EMAN::Util::point_is_in_triangle_2d(), EMAN::BackProjectionReconstructor::preprocess_slice(), EMAN::StandardProjector::project3d(), EMAN::Transform::set_trans(), EMAN::Transform::transform(), EMAN::TransformProcessor::transform(), and EMAN::Transform::translate().

typedef Vec2<int> EMAN::Vec2i
 

Definition at line 867 of file vec3.h.

typedef Vec3<double> EMAN::Vec3d
 

Definition at line 490 of file vec3.h.

Referenced by EMAN::EMUtil::process_region_io().

typedef Vec3<float> EMAN::Vec3f
 

Definition at line 488 of file vec3.h.

Referenced by ali3d_d(), EMAN::TranslationalAligner::align(), EMAN::PointArray::align_2d(), EMAN::PointArray::align_trans_2d(), EMAN::PawelProjector::backproject3d(), EMAN::Util::calc_bilinear_least_square(), EMAN::EMData::cut_slice(), EMAN::WienerFourierReconstructor::do_compare_slice_work(), EMAN::FourierReconstructor::do_compare_slice_work(), EMAN::WienerFourierReconstructor::do_insert_slice_work(), EMAN::FourierReconstructor::do_insert_slice_work(), EMAN::Util::KaiserBessel::dump_table(), EMAN::Util::equation_of_plane(), EMAN::EMData::extract_plane(), EMAN::EMData::extract_plane_rect(), EMAN::EMData::extract_plane_rect_fast(), EMAN::TetrahedralSym::get_asym_unit_points(), EMAN::PlatonicSym::get_asym_unit_points(), EMAN::HSym::get_asym_unit_points(), EMAN::DSym::get_asym_unit_points(), EMAN::CSym::get_asym_unit_points(), EMAN::DSym::get_asym_unit_triangles(), EMAN::CSym::get_asym_unit_triangles(), EMAN::BoxingTools::get_color(), EMAN::Transform::get_hflip_transform(), EMAN::Transform::get_matrix3_row(), EMAN::Transform::get_params(), EMAN::Transform::get_params_inverse(), EMAN::Transform::get_pre_trans(), EMAN::EMData::get_rotated_clip(), EMAN::Symmetry3D::get_touching_au_transforms(), EMAN::Transform::get_trans(), EMAN::PointArray::get_vector_at(), EMAN::Transform::get_vflip_transform(), EMAN::Symmetry3D::in_which_asym_unit(), EMAN::EMData::insert_rect_slice(), EMAN::EMData::insert_rect_slice_ctf(), EMAN::EMData::insert_rect_slice_ctf_applied(), EMAN::TestTomoImage::insert_rectangle(), EMAN::EMData::max_3D_pixel_error(), operator *(), EMAN::OptimumOrientationGenerator::optimize_distances(), EMAN::Symmetry3D::point_in_which_asym_unit(), EMAN::TestImageEllipse::process_inplace(), EMAN::TestImageHollowEllipse::process_inplace(), EMAN::AutoMaskAsymUnit::process_inplace(), EMAN::StandardProjector::project3d(), EMAN::PawelProjector::project3d(), EMAN::GaussFFTProjector::project3d(), EMAN::Quaternion::Quaternion(), refalin3d_perturbquat(), EMAN::PointArray::replace_by_summation(), EMAN::PointArray::right_transform(), EMAN::PDBReader::right_transform(), EMAN::EMData::rot_scale_trans(), EMAN::EMData::rot_scale_trans_background(), EMAN::Quaternion::rotate(), EMAN::EMData::rotate_translate(), EMAN::PointArray::set_from(), EMAN::Transform::set_rotation(), EMAN::Transform::set_trans(), set_translation(), EMAN::PointArray::set_vector_at(), EMAN::MarchingCubes::surface_face_z(), EMAN::TestUtil::test_Vec3f(), EMAN::Quaternion::to_angle(), EMAN::Quaternion::to_axis(), EMAN::Transform::transform(), EMAN::TransformProcessor::transform(), EMAN::PointArray::transform(), EMAN::Transform::translate(), EMAN::EMData::translate(), EMAN::EMData::uncut_slice(), EMAN::Quaternion::unreal(), and verify().

typedef Vec3<int> EMAN::Vec3i
 

Definition at line 489 of file vec3.h.

Referenced by ali3d_d(), AlignOptions::AlignOptions(), EMAN::PawelProjector::backproject3d(), EMAN::ChaoProjector::backproject3d(), EMAN::ChaoProjector::bckpj3(), bckpj3(), bckpj3_Cart(), EMAN::ChaoProjector::cb2sph(), cb2sph(), CleanStack(), CleanStack_Cart(), fcalc(), fgcalc(), EMAN::WatershedProcessor::find_region(), find_region(), EMAN::ChaoProjector::fwdpj3(), fwdpj3(), fwdpj3_Cart(), EMAN::EMUtil::get_region_dims(), getcb2sph(), EMAN::ChaoProjector::getnnz(), getnnz(), LBD_Cart(), main(), EMAN::EMData::mask_contig_region(), EMAN::PawelProjector::prepcubes(), EMAN::WatershedProcessor::process_inplace(), EMAN::EMUtil::process_region_io(), EMAN::ChaoProjector::project3d(), EMAN::StandardProjector::project3d(), EMAN::PawelProjector::project3d(), recons3d_CGLS_mpi_Cart(), recons3d_HyBR_mpi_Cart(), recons3d_sirt_mpi(), recons3d_sirt_mpi_Cart(), EMAN::ChaoProjector::sph2cb(), sph2cb(), EMAN::TestUtil::test_Vec3i(), EMAN::EMData::translate(), unified(), and EMAN::WatershedProcessor::watershed().


Enumeration Type Documentation

enum fp_flag
 

Fourier Product processing flag.

Should the Fourier data be treated as manifestly periodic (CIRCULANT), padded with zeros (PADDED), or padded with a lag (PADDED_LAG). Also, in each of these cases the product may be normalized or not. Pick one, as there is no default.

Enumeration values:
CIRCULANT 
CIRCULANT_NORMALIZED 
PADDED 
PADDED_NORMALIZED 
PADDED_LAG 
PADDED_NORMALIZED_LAG 

Definition at line 66 of file fundamentals.h.

00066                      {
00067                 CIRCULANT = 1,
00068                 CIRCULANT_NORMALIZED = 2,
00069                 PADDED = 3,
00070                 PADDED_NORMALIZED = 4,
00071                 PADDED_LAG = 5,
00072                 PADDED_NORMALIZED_LAG = 6
00073         };

enum fp_type
 

Enumeration values:
CORRELATION 
CONVOLUTION 
SELF_CORRELATION 
AUTOCORRELATION 

Definition at line 76 of file fundamentals.h.

00076                      {
00077                 CORRELATION,
00078                 CONVOLUTION,
00079                 SELF_CORRELATION,
00080                 AUTOCORRELATION
00081         };

enum kernel_shape
 

Enumeration values:
BLOCK 
CIRCULAR 
CROSS 

Definition at line 227 of file fundamentals.h.

00227                           {
00228                 BLOCK = 1,
00229                 CIRCULAR = 2,
00230                 CROSS = 3
00231         };

enum MapInfoType
 

Enumeration values:
NORMAL 
ICOS2F_FIRST_OCTANT 
ICOS2F_FULL 
ICOS2F_HALF 
ICOS3F_HALF 
ICOS3F_FULL 
ICOS5F_HALF 
ICOS5F_FULL 
ICOS_UNKNOWN 

Definition at line 97 of file emobject.h.

00097                          {
00098                 NORMAL,
00099                 ICOS2F_FIRST_OCTANT,
00100                 ICOS2F_FULL,
00101                 ICOS2F_HALF,
00102                 ICOS3F_HALF,
00103                 ICOS3F_FULL,
00104                 ICOS5F_HALF,
00105                 ICOS5F_FULL,
00106                 ICOS_UNKNOWN
00107         };

enum morph_type
 

Median filter.

Purpose: Calculate the median filtered image.
Parameters:
[in] f First real-space image object. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in] nxk,nyk,nzk Size of the kernel on each dimension Note: For CIRCULAR kernel, we currently only consider circle or sphere kernel, i.e., nxk==nyk for 2 dimensional image and nxk==nyk==nzk for 3 dimensional image.
[in] myshape Shape of the kernal BLOCK is for block kernal; CIRCULAR is for circular kernel; CROSS is for cross kernal; Note: For 1-dimensional image, these three kernels degenerate into the same shape.
Returns:
Median filtered image.
Enumeration values:
BINARY 
GRAYLEVEL 

Definition at line 254 of file fundamentals.h.

00254                         {
00255                 BINARY = 1,
00256                 GRAYLEVEL = 2
00257         };


Function Documentation

EMData* autocorrelation EMData *  f,
fp_flag  myflag,
bool  center
[inline]
 

Image autocorrelation.

Purpose: Calculate the autocorrelation of a 1-, 2-,
or 3-dimensional image.
Method: This function calls fourierproduct.
Parameters:
[in] f Image object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in] myflag Processing flag (see above).
[in] center 
Returns:
Real-space autocorrelation image.

Definition at line 187 of file fundamentals.h.

References AUTOCORRELATION, and fourierproduct().

00187                                                                                {
00188                 return fourierproduct(f, NULL, myflag, AUTOCORRELATION, center);
00189         }

EMData* convolution EMData *  f,
EMData *  g,
fp_flag  myflag,
bool  center
[inline]
 

Convolution of two images.

Purpose: Calculate the convolution of two 1-, 2-,
or 3-dimensional images.
Method: This function calls fourierproduct.
Parameters:
[in] f First image object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in] g Second image object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. The size of g must be the same as the size of f. Image g is not changed.
[in] myflag Processing flag (see above).
[in] center 
Returns:
Real-space convolution image.

Definition at line 144 of file fundamentals.h.

References CONVOLUTION, and fourierproduct().

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

00144                                                                                       {
00145                 return fourierproduct(f, g, myflag, CONVOLUTION, center);
00146         }

EMData* correlation EMData *  f,
EMData *  g,
fp_flag  myflag,
bool  center
[inline]
 

Correlation of two images.

Purpose: Calculate the correlation of two 1-, 2-,
or 3-dimensional images.
Method: This function calls fourierproduct.
Parameters:
[in] f First image object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in] g Second image object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. The size of g must be the same as the size of f. Image g is not changed.
[in] myflag Processing flag (see above).
[in] center 
Returns:
Real-space correlation image.

Definition at line 123 of file fundamentals.h.

References CORRELATION, and fourierproduct().

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

00123                                                                                       {
00124                 return fourierproduct(f, g, myflag, CORRELATION, center);
00125         }

Vector3 cross const Vector3 &  w,
const Vector3 &  v
[inline]
 

Definition at line 313 of file vecmath.h.

00313                                                                    {
00314             return w ^ v;
00315         }

double dot const Vector3 &  w,
const Vector3 &  v
[inline]
 

Definition at line 309 of file vecmath.h.

00309                                                                 {
00310             return w * v;
00311         }

void EMAN::dump_aligners  ) 
 

Definition at line 3088 of file aligner.cpp.

03089 {
03090         dump_factory < Aligner > ();
03091 }

map< string, vector< string > > EMAN::dump_aligners_list  ) 
 

Definition at line 3093 of file aligner.cpp.

03094 {
03095         return dump_factory_list < Aligner > ();
03096 }

void EMAN::dump_analyzers  ) 
 

Definition at line 816 of file analyzer.cpp.

00817 {
00818         dump_factory < Analyzer > ();
00819 }

map< string, vector< string > > EMAN::dump_analyzers_list  ) 
 

Definition at line 821 of file analyzer.cpp.

00822 {
00823         return dump_factory_list < Analyzer > ();
00824 }

void EMAN::dump_averagers  ) 
 

Definition at line 1534 of file averager.cpp.

01535 {
01536         dump_factory < Averager > ();
01537 }

map< string, vector< string > > EMAN::dump_averagers_list  ) 
 

Definition at line 1539 of file averager.cpp.

01540 {
01541         return dump_factory_list < Averager > ();
01542 }

void EMAN::dump_cmps  ) 
 

Definition at line 1302 of file cmp.cpp.

01303 {
01304         dump_factory < Cmp > ();
01305 }

map< string, vector< string > > EMAN::dump_cmps_list  ) 
 

Definition at line 1307 of file cmp.cpp.

01308 {
01309         return dump_factory_list < Cmp > ();
01310 }

template<class T>
void dump_factory  ) 
 

Definition at line 829 of file emobject.h.

References EMAN::TypeDict::dump().

00830         {
00831                 vector < string > item_names = Factory < T >::get_list();
00832 
00833                 for (size_t i = 0; i < item_names.size(); i++) {
00834                         T *item = Factory < T >::get(item_names[i]);
00835                         printf("%s :  %s\n", item->get_name().c_str(),item->get_desc().c_str());
00836                         TypeDict td = item->get_param_types();
00837                         td.dump();
00838                 }
00839         }

template<class T>
map<string, vector<string> > dump_factory_list  ) 
 

Definition at line 841 of file emobject.h.

References EMAN::TypeDict::get_desc(), EMAN::TypeDict::get_type(), EMAN::TypeDict::keys(), and EMAN::TypeDict::size().

00842         {
00843                 vector < string > item_names = Factory < T >::get_list();
00844                 map<string, vector<string> >    factory_list;
00845 
00846                 typename vector<string>::const_iterator p;
00847                 for(p = item_names.begin(); p !=item_names.end(); ++p) {
00848                         T *item = Factory<T>::get(*p);
00849 
00850                         string name = item->get_name();
00851 
00852                         vector<string> content;
00853                         content.push_back(item->get_desc());
00854                         TypeDict td = item->get_param_types();
00855                         vector<string> keys = td.keys();
00856                         for(unsigned int i=0; i<td.size(); ++i) {
00857                                 content.push_back(keys[i]);
00858                                 content.push_back( td.get_type(keys[i]) );
00859                                 content.push_back( td.get_desc(keys[i]) );
00860                         }
00861                         factory_list[name] = content;
00862                 }
00863 
00864                 return factory_list;
00865         }

void EMAN::dump_orientgens  ) 
 

Dumps useful information about the OrientationGenerator factory.

Definition at line 146 of file symmetry.cpp.

00147 {
00148         dump_factory < OrientationGenerator > ();
00149 }

map< string, vector< string > > EMAN::dump_orientgens_list  ) 
 

Can be used to get useful information about the OrientationGenerator factory.

Definition at line 151 of file symmetry.cpp.

00152 {
00153         return dump_factory_list < OrientationGenerator > ();
00154 }

void EMAN::dump_processors  ) 
 

Definition at line 9523 of file processor.cpp.

09524 {
09525         dump_factory < Processor > ();
09526 }

map< string, vector< string > > EMAN::dump_processors_list  ) 
 

Definition at line 9528 of file processor.cpp.

09529 {
09530         return dump_factory_list < Processor > ();
09531 }

void EMAN::dump_projectors  ) 
 

Definition at line 2099 of file projector.cpp.

02100 {
02101         dump_factory < Projector > ();
02102 }

map< string, vector< string > > EMAN::dump_projectors_list  ) 
 

Definition at line 2104 of file projector.cpp.

02105 {
02106         return dump_factory_list < Projector > ();
02107 }

void EMAN::dump_reconstructors  ) 
 

Definition at line 4047 of file reconstructor.cpp.

04048 {
04049         dump_factory < Reconstructor > ();
04050 }

map< string, vector< string > > EMAN::dump_reconstructors_list  ) 
 

Definition at line 4052 of file reconstructor.cpp.

04053 {
04054         return dump_factory_list < Reconstructor > ();
04055 }

void EMAN::dump_symmetries  ) 
 

dump symmetries, useful for obtaining symmetry information

Definition at line 62 of file symmetry.cpp.

00063 {
00064         dump_factory < Symmetry3D > ();
00065 }

map< string, vector< string > > EMAN::dump_symmetries_list  ) 
 

dump_symmetries_list, useful for obtaining symmetry information

Definition at line 67 of file symmetry.cpp.

00068 {
00069         return dump_factory_list < Symmetry3D > ();
00070 }

EMData * EMAN::filt_dilation_ EMData f,
EMData K,
morph_type  mydilation
 

Definition at line 597 of file rsconvolution.cpp.

References EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), ImageDimensionException, EMAN::EMData::set_size(), and EMAN::EMData::to_zero().

00597                                                                         {
00598 
00599                 int nxf = f->get_xsize();
00600                 int nyf = f->get_ysize(); 
00601                 int nzf = f->get_zsize();
00602 
00603                 int nxk = K->get_xsize();
00604                 int nyk = K->get_ysize();
00605                 int nzk = K->get_zsize();
00606         
00607                 if ( nxf < nxk && nyf < nyk && nzf < nzk ) {
00608                         // whoops, f smaller than K
00609                         swap(f,K); swap(nxf,nxk); swap(nyf,nyk); swap(nzf,nzk);
00610                 } else if ( nxk > nxf || nyk > nyf || nzk > nzf ) {
00611                         // Incommensurate sizes
00612                         throw ImageDimensionException("Two input images are incommensurate.");
00613                 }
00614 
00615                 if ( nxk % 2 != 1 || nyk % 2 != 1 || nzk % 2 != 1 ) {
00616                         // Kernel needs to be odd in size
00617                         throw ImageDimensionException("Kernel should have odd nx,ny,nz so that the center is well-defined.");
00618                 }
00619 
00620                 int nxk2 = (nxk-1)/2;
00621                 int nyk2 = (nyk-1)/2;
00622                 int nzk2 = (nzk-1)/2;
00623 
00624                 if ( mydilation == BINARY ) {
00625                         // Check whether two images are truly binary.
00626                         for (int iz = 0; iz <= nzf-1; iz++) {
00627                                 for (int iy = 0; iy <= nyf-1; iy++) {
00628                                         for (int ix = 0; ix <= nxf-1; ix++) {
00629                                                 int fxyz=(int)(*f)(ix,iy,iz);
00630                                                 if ( fxyz != 0 && fxyz != 1 ) {
00631                                                         throw ImageDimensionException("One of the two images is not binary.");
00632                                                 }
00633                                         }
00634                                 }
00635                         }
00636                         for (int iz = 0; iz <= nzk-1; iz++) {
00637                                 for (int iy = 0; iy <= nyk-1; iy++) {
00638                                         for (int ix = 0; ix <= nxk-1; ix++) {
00639                                                 int kxyz=(int)(*K)(ix,iy,iz);
00640                                                 if ( kxyz != 0 && kxyz != 1 ) {
00641                                                         throw ImageDimensionException("One of the two images is not binary.");
00642                                                 }
00643                                         }
00644                                 }
00645                         }
00646                 }
00647 
00648                 EMData* result = new EMData();
00649                 result->set_size(nxf, nyf, nzf);
00650                 result->to_zero();
00651 
00652                 for (int iz = 0; iz <= nzf-1; iz++) {
00653                         for (int iy = 0; iy <= nyf-1; iy++) {
00654                                 for (int ix = 0; ix <= nxf-1; ix++) {
00655 //                                      int kzmin = iz-nzk2 < 0     ?   0   : iz-nzk2 ;
00656 //                                      int kzmax = iz+nzk2 > nzf-1 ? nzf-1 : iz+nzk2 ;
00657 //                                      int kymin = iy-nyk2 < 0     ?   0   : iy-nyk2 ;
00658 //                                      int kymax = iy+nyk2 > nyf-1 ? nyf-1 : iy+nyk2 ;
00659 //                                      int kxmin = ix-nxk2 < 0     ?   0   : ix-nxk2 ;
00660 //                                      int kxmax = ix+nxk2 > nxf-1 ? nxf-1 : ix+nxk2 ;
00661                                         if ( mydilation == BINARY ) {
00662                                                 int fxyz = (int)(*f)(ix,iy,iz);
00663                                                 if ( fxyz == 1 ) {
00664                                                         for (int jz = -nzk2; jz <= nzk2; jz++) {
00665                                                                 for (int jy = -nyk2; jy <= nyk2; jy++) {
00666                                                                         for (int jx= -nxk2; jx <= nxk2; jx++) {
00667                                                                                 if ( (int)(*K)(jx+nxk2,jy+nyk2,jz+nzk2) == 1 ) {
00668                                                                                         int fz = iz+jz;
00669                                                                                         int fy = iy+jy;
00670                                                                                         int fx = ix+jx;
00671                                                                                         if ( fz >= 0 && fz <= nzf-1 && fy >= 0 && fy <= nyf-1 && fx >= 0 && fx <= nxf-1 )
00672                                                                                                 (*result)(fx,fy,fz) = 1;
00673                                                                                         }
00674                                                                                 }
00675                                                                         }
00676                                                                 }
00677                                                         }
00678                                         } else if ( mydilation == GRAYLEVEL ) {
00679                                                         float pmax = (*f)(ix,iy,iz)+(*K)(nxk2,nyk2,nzk2); 
00680                                                         for (int jz = -nzk2; jz <= nzk2; jz++) {
00681                                                                 for (int jy = -nyk2; jy <= nyk2; jy++) {
00682                                                                         for (int jx = -nxk2; jx <= nxk2; jx++) {
00683                                                                                 int fz = iz+jz;
00684                                                                                 int fy = iy+jy;
00685                                                                                 int fx = ix+jx;
00686                                                                                 if ( fz >= 0 && fz <= nzf-1 && fy >= 0 && fy <= nyf-1 && fx >= 0 && fx <= nxf-1 ) {
00687                                                                                         float kxyz = (*K)(jx+nxk2,jy+nyk2,jz+nzk2);
00688                                                                                         float fxyz = (*f)(fx,fy,fz);                                                                                    
00689                                                                                         if ( kxyz+fxyz > pmax )  pmax = kxyz+fxyz;
00690                                                                                 }
00691                                                                         }
00692                                                                 }
00693                                                         }
00694                                                         (*result)(ix,iy,iz) = pmax;
00695                                         } else {
00696                                                 throw ImageDimensionException("Illegal dilation type!");
00697                                         }
00698                                 }
00699                         }
00700                 }               
00701                 return result;
00702     }

EMData * EMAN::filt_erosion_ EMData f,
EMData K,
morph_type  myerosion
 

Dilation filter.

Purpose: Calculate the Minkowski addition of the two images
Parameters:
[in] f First real-space image object. Image may be 2- or 3-dimensional. Image f is not changed. K Second real-space image object Image may be 2- or 3-dimentional. Image K is not changed. mydilation Type of dilation BINARY is for binary dilation. GRAYLEVEL is for graylevel dilation.
K 
myerosion 
Returns:
Dilation filtered image.

Definition at line 704 of file rsconvolution.cpp.

References EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), ImageDimensionException, EMAN::EMData::set_size(), and EMAN::EMData::to_one().

00704                                                                       {
00705 
00706                 int nxf = f->get_xsize();
00707                 int nyf = f->get_ysize(); 
00708                 int nzf = f->get_zsize();
00709 
00710                 int nxk = K->get_xsize();
00711                 int nyk = K->get_ysize();
00712                 int nzk = K->get_zsize();
00713         
00714                 if ( nxf < nxk && nyf < nyk && nzf < nzk ) {
00715                         // whoops, f smaller than K
00716                         swap(f,K); swap(nxf,nxk); swap(nyf,nyk); swap(nzf,nzk);
00717                 } else if ( nxk > nxf || nyk > nyf || nzk > nzf ) {
00718                         // Incommensurate sizes
00719                         throw ImageDimensionException("Two input images are incommensurate.");
00720                 }
00721 
00722                 if ( nxk % 2 != 1 || nyk % 2 != 1 || nzk % 2 != 1 ) {
00723                         // Kernel needs to be odd in size
00724                         throw ImageDimensionException("Kernel should have odd nx,ny,nz so that the center is well-defined.");
00725                 }
00726 
00727                 int nxk2 = (nxk-1)/2;
00728                 int nyk2 = (nyk-1)/2;
00729                 int nzk2 = (nzk-1)/2;
00730 
00731                 if ( myerosion == BINARY ) {
00732                         // Check whether two images are truly binary.
00733                         for (int iz = 0; iz <= nzf-1; iz++) {
00734                                 for (int iy = 0; iy <= nyf-1; iy++) {
00735                                         for (int ix = 0; ix <= nxf-1; ix++) {
00736                                                 int fxyz=(int)(*f)(ix,iy,iz);
00737                                                 if ( fxyz != 0 && fxyz != 1 ) {
00738                                                         throw ImageDimensionException("One of the two images is not binary.");
00739                                                 }
00740                                         }
00741                                 }
00742                         }
00743                         for (int iz = 0; iz <= nzk-1; iz++) {
00744                                 for (int iy = 0; iy <= nyk-1; iy++) {
00745                                         for (int ix = 0; ix <= nxk-1; ix++) {
00746                                                 int kxyz=(int)(*K)(ix,iy,iz);
00747                                                 if ( kxyz != 0 && kxyz != 1 ) {
00748                                                         throw ImageDimensionException("One of the two images is not binary.");
00749                                                 }
00750                                         }
00751                                 }
00752                         }
00753                 }
00754 
00755                 EMData* result = new EMData();
00756                 result->set_size(nxf, nyf, nzf);
00757                 result->to_one();
00758 
00759                 for (int iz = 0; iz <= nzf-1; iz++) {
00760                         for (int iy = 0; iy <= nyf-1; iy++) {
00761                                 for (int ix = 0; ix <= nxf-1; ix++) {
00762                                         if ( myerosion == BINARY ) {
00763                                                 int fxyz = (int)(*f)(ix,iy,iz);
00764                                                 if ( fxyz == 0 ) {
00765                                                         for (int jz = -nzk2; jz <= nzk2; jz++) {
00766                                                                 for (int jy = -nyk2; jy <= nyk2; jy++) {
00767                                                                         for (int jx= -nxk2; jx <= nxk2; jx++) {
00768                                                                                 if ( (int)(*K)(jx+nxk2,jy+nyk2,jz+nzk2) == 1 ) {
00769                                                                                         int fz = iz+jz;
00770                                                                                         int fy = iy+jy;
00771                                                                                         int fx = ix+jx;
00772                                                                                         if ( fz >= 0 && fz <= nzf-1 && fy >= 0 && fy <= nyf-1 && fx >= 0 && fx <= nxf-1 )
00773                                                                                                 (*result)(fx,fy,fz) = 0;
00774                                                                                         }
00775                                                                                 }
00776                                                                         }
00777                                                                 }
00778                                                         }
00779                                         } else if ( myerosion == GRAYLEVEL ) {
00780                                                         float pmin = (*f)(ix,iy,iz)-(*K)(nxk2,nyk2,nzk2); 
00781                                                         for (int jz = -nzk2; jz <= nzk2; jz++) {
00782                                                                 for (int jy = -nyk2; jy <= nyk2; jy++) {
00783                                                                         for (int jx = -nxk2; jx <= nxk2; jx++) {
00784                                                                                 int fz = iz+jz;
00785                                                                                 int fy = iy+jy;
00786                                                                                 int fx = ix+jx;
00787                                                                                 if ( fz >= 0 && fz <= nzf-1 && fy >= 0 && fy <= nyf-1 && fx >= 0 && fx <= nxf-1 ) {
00788                                                                                         float kxyz = (*K)(jx+nxk2,jy+nyk2,jz+nzk2);
00789                                                                                         float fxyz = (*f)(fx,fy,fz);                                                                                    
00790                                                                                         if ( fxyz-kxyz < pmin )  pmin = fxyz-kxyz;
00791                                                                                 }
00792                                                                         }
00793                                                                 }
00794                                                         }
00795                                                         (*result)(ix,iy,iz) = pmin;
00796                                         } else {
00797                                                 throw ImageDimensionException("Illegal dilation type!");
00798                                         }
00799                                 }
00800                         }
00801                 }               
00802                 return result;
00803     }

EMData * EMAN::filt_median_ EMData f,
int  nxk,
int  nyk,
int  nzk,
kernel_shape  myshape
 

Definition at line 559 of file rsconvolution.cpp.

References EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), ImageDimensionException, median(), EMAN::EMData::set_size(), and EMAN::EMData::to_zero().

00559                                                                                      {
00560                 
00561                 int nxf = f->get_xsize();
00562                 int nyf = f->get_ysize(); 
00563                 int nzf = f->get_zsize();
00564                 
00565                 if ( nxk > nxf || nyk > nyf || nzk > nzf ) {
00566                         // Kernel should be smaller than the size of image
00567                         throw ImageDimensionException("Kernel should be smaller than the size of image.");
00568                 }       
00569 
00570                 if ( nxk % 2 != 1 || nyk % 2 != 1 || nzk % 2 != 1 ) {
00571                         // Kernel needs to be odd in size
00572                         throw ImageDimensionException("Real-space kernel must have odd size so that the center is well-defined.");
00573                 }
00574 
00575                 if ( myshape == CIRCULAR ) {
00576                         // For CIRCULAR kernal, size must be same on all dimensions
00577                         if ( (nzf != 1 && ( nxk != nyk || nxk != nzk )) || (nzf == 1 && nyf != 1 && nxk != nyk) ) {
00578                                 throw ImageDimensionException("For CIRCULAR kernal, size must be same on all dimensions.");
00579                         }
00580                 }
00581 
00582                 EMData* result = new EMData();
00583                 result->set_size(nxf, nyf, nzf);
00584                 result->to_zero();
00585 
00586                 for (int iz = 0; iz <= nzf-1; iz++) {
00587                         for (int iy = 0; iy <= nyf-1; iy++) {
00588                                 for (int ix = 0; ix <= nxf-1; ix++) {
00589                                         (*result)(ix,iy,iz) = median (*f, nxk, nyk, nzk, myshape, iz, iy, ix);                                  
00590                                 }
00591                         }
00592                 }
00593                 
00594                 return result;
00595         }

EMData * EMAN::fourierproduct EMData f,
EMData g,
fp_flag  myflag,
fp_type  mytype,
bool  center
 

Fourier product of two images.

Purpose: Calculate the correlation or convolution of
two images, or the autocorrelation or self-correlation of one image.
Parameters:
[in] f First image object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in] g Second image object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. The size of g must be the same as the size of f. Image g is not changed.
[in] myflag Processing flag (see above).
[in] mytype Type of Fourier product to perform. (see above).
[in] center 
Returns:
1-, 2-, or 3-dimensional real fourier product image.

Definition at line 184 of file fundamentals.cpp.

References abs, AUTOCORRELATION, CIRCULANT, EMAN::EMData::cmplx(), CONVOLUTION, EMAN::EMData::copy(), CORRELATION, EMAN::EMData::depad(), EMAN::EMData::depad_corner(), EMAN::EMData::do_fft_inplace(), EMAN::EMData::do_ift_inplace(), flag, EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), imag(), InvalidValueException, EMAN::EMData::is_complex(), EMAN::EMData::is_fftodd(), EMAN::EMData::is_real(), LOGERR, EMAN::EMData::norm_pad(), nx, ny, real(), SELF_CORRELATION, EMAN::EMData::set_array_offsets(), and EMAN::EMData::update().

Referenced by autocorrelation(), convolution(), correlation(), EMAN::ConvolutionProcessor::process_inplace(), and self_correlation().

00184                                                                                        {
00185                 size_t normfact;
00186                 //std::complex<float> phase_mult;
00187                 // Not only does the value of "flag" determine how we handle
00188                 // periodicity, but it also determines whether or not we should
00189                 // normalize the results.  Here's some convenience bools:
00190                 bool donorm = (0 == flag%2) ? true : false;
00191                 // the 2x padding is hardcoded for now
00192                 int  npad  = (flag >= 3) ? 2 : 1;  // amount of padding used
00193                 // g may be NULL.  If so, have g point to the same object as f.  In that
00194                 // case we need to be careful later on not to try to delete g's workspace
00195                 // as well as f's workspace, since they will be the same.
00196                 bool  gexists = true;
00197                 if (!g) { g = f; gexists = false; }
00198                 if ( f->is_complex() || g->is_complex() ) {
00199                         // Fourier input only allowed for circulant
00200                         if (CIRCULANT != flag) {
00201                                 LOGERR("Cannot perform normalization or padding on Fourier type.");
00202                                 throw InvalidValueException(flag, "Cannot perform normalization or padding on Fourier type.");
00203                         }
00204                 }
00205                 // These are actual dimensions of f (and real-space sizes for ny and nz)
00206                 int nx  = f->get_xsize();
00207                 int ny  = f->get_ysize();
00208                 int nz  = f->get_zsize();
00209                 // We manifestly assume no zero-padding here, just the 
00210                 // necessary extension along x for the fft
00211                 if (!f->is_real()) nx = (nx - 2 + (f->is_fftodd() ? 1 : 0)); 
00212 
00213                 // these are padded dimensions
00214                 const int nxp = npad*nx;
00215                 const int nyp = (ny > 1) ? npad*ny : 1; // don't pad y for 1-d image
00216                 const int nzp = (nz > 1) ? npad*nz : 1; // don't pad z for 2-d image
00217 
00218                 // now one half of the padded, fft-extended size along x
00219                 const int lsd2 = (nxp + 2 - nxp%2) / 2; 
00220 
00221                 EMData* fp = NULL;
00222                 if (f->is_complex()) { 
00223                         // If f is already a fourier object then fp is a copy of f.
00224                         // (The fp workspace is modified, so we copy f to keep f pristine.)
00225                         fp=f->copy();
00226                 } else {
00227                         //  [normalize] [pad] compute fft
00228                         fp = f->norm_pad(donorm, npad);
00229                         fp->do_fft_inplace();
00230                 }
00231                 // The [padded] fft-extended version of g is gp.
00232                 EMData* gp = NULL;
00233                 if(f==g) {
00234                         // g is an alias for f, so gp should be an alias for fp
00235                         gp=fp;
00236                 } else if (g->is_complex()) {
00237                         // g is already a Fourier object, so gp is just an alias for g
00238                         // (The gp workspace is not modified, so we don't need a copy.)
00239                         gp = g;
00240                 } else {
00241                         // normal case: g is real and different from f, so compute gp
00242                         gp = g->norm_pad(donorm, npad);
00243                         gp->do_fft_inplace();
00244                 }
00245                 // Get complex matrix views of fp and gp; matrices start from 1 (not 0)
00246                 fp->set_array_offsets(1,1,1);
00247                 gp->set_array_offsets(1,1,1);
00248                 
00249                 // If the center flag is true, put the center of the correlation in the middle
00250                 // If it is false, put it in (0,0), this approach saves time, but it is diffcult to manage the result
00251                 if (center) {
00252                         //  Multiply two functions (the real work of this routine)
00253                         int itmp = nx/2;
00254                         //float sx  = float(-twopi*float(itmp)/float(nxp));
00255                         float sxn = 2*float(itmp)/float(nxp);
00256                         float sx = -M_PI*sxn;
00257                         itmp = ny/2;
00258                         //float sy  = float(-twopi*float(itmp)/float(nyp));
00259                         float syn = 2*float(itmp)/float(nyp);
00260                         float sy = -M_PI*syn;
00261                         itmp = nz/2;
00262                         //float sz  = float(-twopi*float(itmp)/float(nzp));
00263                         float szn = 2*float(itmp)/float(nzp);
00264                         float sz = -M_PI*szn;
00265                         if ( nx%2==0 && (ny%2==0 || ny==1 ) && (nz%2==0 || nz==1 ) ) {
00266                                 switch (ptype) {
00267                                         case AUTOCORRELATION:
00268                                         // fpmat := |fpmat|^2
00269                                         // Note nxp are padded dimensions
00270                                                 for (int iz = 1; iz <= nzp; iz++) {
00271                                                         for (int iy = 1; iy <= nyp; iy++) {
00272                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00273                                                                         float fpr = real(fp->cmplx(ix,iy,iz));
00274                                                                         float fpi = imag(fp->cmplx(ix,iy,iz));
00275                                                                         fp->cmplx(ix,iy,iz) = complex<float>(fpr*fpr+fpi*fpi, 0.0f);
00276                                                                 }
00277                                                         }
00278                                                 }
00279                                                 break;
00280                                         case SELF_CORRELATION:
00281                                         // fpmat:=|fpmat|
00282                                         // Note nxp are padded dimensions
00283                                                 for (int iz = 1; iz <= nzp; iz++) {
00284                                                         for (int iy = 1; iy <= nyp; iy++) {
00285                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00286                                                                         fp->cmplx(ix,iy,iz) = complex<float>(abs(fp->cmplx(ix,iy,iz)), 0.0f);
00287                                                                 }
00288                                                         }
00289                                                 }
00290                                                 break;
00291                                         case CORRELATION:
00292                                         // fpmat:=fpmat*conjg(gpmat)
00293                                         // Note nxp are padded dimensions
00294                                                 for (int iz = 1; iz <= nzp; iz++) {
00295                                                         for (int iy = 1; iy <= nyp; iy++) {
00296                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00297                                                                         fp->cmplx(ix,iy,iz) *= conj(gp->cmplx(ix,iy,iz));
00298                                                                 }
00299                                                         }
00300                                                 }
00301                                         break;
00302                                         case CONVOLUTION:
00303                                         // fpmat:=fpmat*gpmat
00304                                         // Note nxp are padded dimensions
00305                                                 for (int iz = 1; iz <= nzp; iz++) {
00306                                                         for (int iy = 1; iy <= nyp; iy++) {
00307                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00308                                                                         fp->cmplx(ix,iy,iz) *= gp->cmplx(ix,iy,iz);
00309                                                                 }
00310                                                         }
00311                                                 }
00312                                                 break;
00313                                         default:
00314                                                 LOGERR("Illegal option in Fourier Product");
00315                                                 throw InvalidValueException(ptype, "Illegal option in Fourier Product");
00316                                 }                                       
00317                                 for (int iz = 1; iz <= nzp; iz++) {
00318                                         for (int iy = 1; iy <= nyp; iy++) {
00319                                                 for (int ix = (iz+iy+1)%2+1; ix <= lsd2; ix+=2) {
00320                                                         fp->cmplx(ix,iy,iz) = -fp->cmplx(ix,iy,iz);
00321                                                 }
00322                                         }
00323                                 }
00324                         } else {                        
00325                                 switch (ptype) {
00326                                         case AUTOCORRELATION:
00327                                         // fpmat := |fpmat|^2
00328                                         // Note nxp are padded dimensions
00329                                                 for (int iz = 1; iz <= nzp; iz++) {
00330                                                 int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
00331                                                         for (int iy = 1; iy <= nyp; iy++) {
00332                                                         int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
00333                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00334                                                                         int jx=ix-1; float arg=sx*jx+argy;
00335                                                                         float fpr = real(fp->cmplx(ix,iy,iz));
00336                                                                         float fpi = imag(fp->cmplx(ix,iy,iz));
00337                                                                         fp->cmplx(ix,iy,iz)= (fpr*fpr + fpi*fpi) *std::complex<float>(cos(arg),sin(arg));
00338                                                                 }
00339                                                         }
00340                                                 }
00341                                                 break;
00342                                         case SELF_CORRELATION:
00343                                         // fpmat:=|fpmat|
00344                                         // Note nxp are padded dimensions
00345                                                 for (int iz = 1; iz <= nzp; iz++) {
00346                                                 int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
00347                                                         for (int iy = 1; iy <= nyp; iy++) {
00348                                                         int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
00349                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00350                                                                         int jx=ix-1; float arg=sx*jx+argy;
00351                                                                         fp->cmplx(ix,iy,iz) = abs(fp->cmplx(ix,iy,iz)) *std::complex<float>(cos(arg),sin(arg));
00352                                                                 }
00353                                                         }
00354                                                 }
00355                                                 break;
00356                                         case CORRELATION:
00357                                         // fpmat:=fpmat*conjg(gpmat)
00358                                         // Note nxp are padded dimensions
00359                                                 for (int iz = 1; iz <= nzp; iz++) {
00360                                                 int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
00361                                                         for (int iy = 1; iy <= nyp; iy++) {
00362                                                         int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
00363                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00364                                                                         int jx=ix-1; float arg=sx*jx+argy;
00365                                                                         fp->cmplx(ix,iy,iz) *= conj(gp->cmplx(ix,iy,iz)) *std::complex<float>(cos(arg),sin(arg));
00366                                                                 }
00367                                                         }
00368                                                 }
00369                                         break;
00370                                         case CONVOLUTION:
00371                                         // fpmat:=fpmat*gpmat
00372                                         // Note nxp are padded dimensions
00373                                                 if(npad == 1) {
00374                                                         sx -= 4*(nx%2)/float(nx);
00375                                                         sy -= 4*(ny%2)/float(ny);
00376                                                         sz -= 4*(nz%2)/float(nz);
00377                                                 }
00378                                                 for (int iz = 1; iz <= nzp; iz++) {
00379                                                         int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
00380                                                         for (int iy = 1; iy <= nyp; iy++) {
00381                                                                 int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
00382                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00383                                                                         int jx=ix-1; float arg=sx*jx+argy;
00384                                                                         fp->cmplx(ix,iy,iz) *= gp->cmplx(ix,iy,iz) *std::complex<float>(cos(arg),sin(arg));
00385                                                                 }
00386                                                         }
00387                                                 }
00388                                                 break;
00389                                         default:
00390                                                 LOGERR("Illegal option in Fourier Product");
00391                                                 throw InvalidValueException(ptype, "Illegal option in Fourier Product");
00392                                 }
00393                         }
00394                 } else {
00395                         // If the center flag is false, then just do basic multiplication
00396                         // Here I aterd the method of complex calculation. This method is much faster than the previous one.
00397                         switch (ptype) {
00398                                 case AUTOCORRELATION:
00399                                         for (int iz = 1; iz <= nzp; iz++) {
00400                                                 for (int iy = 1; iy <= nyp; iy++) {
00401                                                         for (int ix = 1; ix <= lsd2; ix++) {
00402                                                                 float fpr = real(fp->cmplx(ix,iy,iz));
00403                                                                 float fpi = imag(fp->cmplx(ix,iy,iz));
00404                                                                 fp->cmplx(ix,iy,iz) = complex<float>(fpr*fpr+fpi*fpi, 0.0f);
00405                                                         }
00406                                                 }
00407                                         }
00408                                         break;
00409                                 case SELF_CORRELATION:
00410                                         for (int iz = 1; iz <= nzp; iz++) {
00411                                                 for (int iy = 1; iy <= nyp; iy++) {
00412                                                         for (int ix = 1; ix <= lsd2; ix++) {
00413                                                                 fp->cmplx(ix,iy,iz) = complex<float>(abs(fp->cmplx(ix,iy,iz)), 0.0f);
00414                                                         }
00415                                                 }
00416                                         }
00417                                         break;
00418                                 case CORRELATION:
00419                                         //phase_mult = 1;
00420                                         for (int iz = 1; iz <= nzp; iz++) {
00421                                                 for (int iy = 1; iy <= nyp; iy++) {
00422                                                         for (int ix = 1; ix <= lsd2; ix++) {
00423                                                                 fp->cmplx(ix,iy,iz)*= conj(gp->cmplx(ix,iy,iz));
00424                                                         }
00425                                                 }
00426                                         }
00427                                         break;
00428                                 case CONVOLUTION:
00429                                         if(npad == 1) {
00430                                                 float sx = -M_PI*2*(nx%2)/float(nx);
00431                                                 float sy = -M_PI*2*(ny%2)/float(ny);
00432                                                 float sz = -M_PI*2*(nz%2)/float(nz);
00433                                                 for (int iz = 1; iz <= nzp; iz++) {
00434                                                         int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
00435                                                         for (int iy = 1; iy <= nyp; iy++) {
00436                                                                 int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
00437                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00438                                                                         int jx=ix-1; float arg=sx*jx+argy;
00439                                                                         fp->cmplx(ix,iy,iz) *= gp->cmplx(ix,iy,iz) *std::complex<float>(cos(arg),sin(arg));
00440                                                                 }
00441                                                         }
00442                                                 }
00443                                         } else {
00444                                                 for (int iz = 1; iz <= nzp; iz++) {
00445                                                         for (int iy = 1; iy <= nyp; iy++) {
00446                                                                 for (int ix = 1; ix <= lsd2; ix++) {
00447                                                                         fp->cmplx(ix,iy,iz)*= gp->cmplx(ix,iy,iz);
00448                                                                 }
00449                                                         }
00450                                                 }
00451                                         }
00452                                         break;
00453                                 default:
00454                                         LOGERR("Illegal option in Fourier Product");
00455                                         throw InvalidValueException(ptype, "Illegal option in Fourier Product");
00456                         }
00457                 }
00458                 // Now done w/ gp, so let's get rid of it (if it's not an alias of fp or simply g was complex on input);
00459                 if (gexists && (f != g) && (!g->is_complex())) {
00460                         if( gp ) {
00461                                 delete gp;
00462                                 gp = 0;
00463                         }
00464                 }
00465                 // back transform
00466                 fp->do_ift_inplace();
00467                 if(center && npad ==2)  fp->depad();
00468                 else                    fp->depad_corner();
00469 
00470                 //vector<int> saved_offsets = fp->get_array_offsets();  I do not know what the meaning of it was, did not work anyway PAP
00471                 fp->set_array_offsets(1,1,1);
00472 
00473                 normfact = (size_t)(nxp/nx)*(nyp/ny)*(nzp/nz);  // Normalization factor for the padded operations
00474                 if(normfact>1) {
00475                         for (int iz = 1; iz <= nz; iz++) for (int iy = 1; iy <= ny; iy++) for (int ix = 1; ix <= nx; ix++) (*fp)(ix,iy,iz) *= normfact;
00476                 }
00477                 // Lag normalization
00478                 if(flag>4)  {
00479                         normfact = (size_t)nx*ny*nz;  // Normalization factor
00480                         int nxc=nx/2+1, nyc=ny/2+1, nzc=nz/2+1;
00481                         for (int iz = 1; iz <= nz; iz++) {
00482                                 float lagz=float(normfact/(nz-abs(iz-nzc)));
00483                                 for (int iy = 1; iy <= ny; iy++) {
00484                                         float lagyz=lagz/(ny-abs(iy-nyc));
00485                                         for (int ix = 1; ix <= nx; ix++) {
00486                                                 (*fp)(ix,iy,iz) *= lagyz/(nx-abs(ix-nxc));
00487                                         }
00488                                 }
00489                         }       
00490                 }
00491                 //OVER AND OUT
00492                 //fp->set_array_offsets(saved_offsets);  This was strange and did not work, PAP
00493                 fp->set_array_offsets(0,0,0);
00494                 fp->update();
00495                 return fp;
00496         }

map< string, vector< string > > EMAN::group_processors  ) 
 

Definition at line 9533 of file processor.cpp.

References EMAN::Factory< T >::get(), EMAN::Factory< T >::get_list(), and EMAN::Processor::get_name().

09534 {
09535         map<string, vector<string> > processor_groups;
09536 
09537         vector <string> processornames = Factory<Processor>::get_list();
09538 
09539         for (size_t i = 0; i < processornames.size(); i++) {
09540                 Processor * f = Factory<Processor>::get(processornames[i]);
09541                 if (dynamic_cast<RealPixelProcessor*>(f) != 0) {
09542                         processor_groups["RealPixelProcessor"].push_back(f->get_name());
09543                 }
09544                 else if (dynamic_cast<BoxStatProcessor*>(f)  != 0) {
09545                         processor_groups["BoxStatProcessor"].push_back(f->get_name());
09546                 }
09547                 else if (dynamic_cast<ComplexPixelProcessor*>(f)  != 0) {
09548                         processor_groups["ComplexPixelProcessor"].push_back(f->get_name());
09549                 }
09550                 else if (dynamic_cast<CoordinateProcessor*>(f)  != 0) {
09551                         processor_groups["CoordinateProcessor"].push_back(f->get_name());
09552                 }
09553                 else if (dynamic_cast<FourierProcessor*>(f)  != 0) {
09554                         processor_groups["FourierProcessor"].push_back(f->get_name());
09555                 }
09556                 else if (dynamic_cast<NewFourierProcessor*>(f)  != 0) {
09557                         processor_groups["FourierProcessor"].push_back(f->get_name());
09558                 }
09559                 else if (dynamic_cast<NormalizeProcessor*>(f)  != 0) {
09560                         processor_groups["NormalizeProcessor"].push_back(f->get_name());
09561                 }
09562                 else {
09563                         processor_groups["Others"].push_back(f->get_name());
09564                 }
09565         }
09566 
09567         return processor_groups;
09568 }

bool isZero double  in_d,
double  in_dEps = 1e-16
[inline]
 

Definition at line 48 of file vecmath.h.

Referenced by EMAN::Matrix4::approxEqual(), EMAN::Vector4::approxEqual(), EMAN::Matrix3::approxEqual(), EMAN::Point3::approxEqual(), EMAN::Vector3::approxEqual(), EMAN::Matrix4::inverse(), EMAN::Matrix3::inverse(), and EMAN::Matrix4::operator *().

00049         { 
00050             return (in_d < in_dEps && in_d > -in_dEps)? true : false; 
00051         }

double length const Vector4 &  v  )  [inline]
 

Definition at line 688 of file vecmath.h.

References EMAN::Vector4::length(), and v.

Referenced by EMAN::Vector4::normalize(), EMAN::Vec2< Type >::normalize(), and EMAN::Vec3< int >::normalize().

00688 { return v.length(); }

double length const Vector3 &  v  )  [inline]
 

Definition at line 317 of file vecmath.h.

References EMAN::Vector3::length(), and v.

Referenced by EMAN::TestImageFourierNoiseProfile::process_inplace(), EMAN::CTFSNRWeightProcessor::process_inplace(), and EMAN::TestImageFourierNoiseGaussian::process_inplace().

00317 { return v.length(); }

Point3 lerp const Point3 &  p0,
const Point3 &  p1,
double  dT
[inline]
 

Definition at line 406 of file vecmath.h.

00407         {
00408             const double dTMinus = 1.0 - dT;
00409             return Point3( dTMinus * p0[0] + dT * p1[0], dTMinus * p0[1] + dT * p1[1], dTMinus * p0[2] + dT * p1[2] ); 
00410         }

int EMAN::multi_processors EMData image,
vector< string >  processornames
 

Definition at line 8243 of file processor.cpp.

References Assert, and EMAN::EMData::process_inplace().

08244 {
08245         Assert(image != 0);
08246         Assert(processornames.size() > 0);
08247 
08248         for (size_t i = 0; i < processornames.size(); i++) {
08249                 image->process_inplace(processornames[i]);
08250         }
08251         return 0;
08252 }

Vector4 operator * const double  s,
const Vector4 &  v
[inline]
 

Definition at line 684 of file vecmath.h.

References v.

00684                                                                      {
00685             return Vector4( v[0] * s, v[1] * s, v[2] * s, v[3] * s );
00686         }

Point3 operator * const Point3 &  p,
const Matrix3 &  m
[inline]
 

Definition at line 578 of file vecmath.h.

00578                                                                    {
00579             return Point3(m(0,0) * p[0] + m(1,0) * p[1] + m(2,0) * p[2],
00580                           m(0,1) * p[0] + m(1,1) * p[1] + m(2,1) * p[2],
00581                           m(0,2) * p[0] + m(1,2) * p[1] + m(2,2) * p[2]);
00582         }

Vector3 operator * const Vector3 &  v,
const Matrix3 &  m
[inline]
 

Definition at line 571 of file vecmath.h.

References v.

00571                                                                      {
00572             return Vector3(m(0,0) * v[0] + m(1,0) * v[1] + m(2,0) * v[2],
00573                            m(0,1) * v[0] + m(1,1) * v[1] + m(2,1) * v[2],
00574                            m(0,2) * v[0] + m(1,2) * v[1] + m(2,2) * v[2]);
00575         }

Vector3 operator * const double  s,
const Vector3 &  v
[inline]
 

Definition at line 305 of file vecmath.h.

References v.

00305                                                                      {
00306             return Vector3( v[0] * s, v[1] * s, v[2] * s );
00307         }

ScreenVector operator * const double  s,
const ScreenVector &  v
[inline]
 

Definition at line 133 of file vecmath.h.

References v.

00133                                                                                {
00134             return ScreenVector( (int)(v[0] * s), (int)(v[1] * s) );
00135         }

template<typename Type, typename Type2>
Vec2<Type> operator * const Vec2< Type > &  v,
const Type2 &  d
[inline]
 

Definition at line 826 of file vec3.h.

References v.

00826                                                                           {
00827         // Preserve the vector type
00828                 Vec2<Type> v1(v);
00829                 v1 *= d;
00830                 return v1;
00831         }

template<typename Type, typename Type2>
Vec2<Type2> operator * const Type &  d,
const Vec2< Type2 > &  v
[inline]
 

Definition at line 817 of file vec3.h.

References v.

00818         {
00819                 // Preserve the vector type
00820                 Vec2<Type2> v1(v);
00821                 v1 *= d;
00822                 return v1;
00823         }

template<typename Type, typename Type2>
Type operator * const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2
[inline]
 

Definition at line 811 of file vec3.h.

References EMAN::Vec2< Type >::dot().

00812         {
00813                 return v1.dot(v2);
00814         }

template<typename Type, typename Type2>
Vec3<Type> operator * const Vec3< Type > &  v,
const Type2 &  d
[inline]
 

Definition at line 448 of file vec3.h.

References v.

00448                                                                           {
00449                 // Preserve the vector type
00450                 Vec3<Type> v1(v);
00451                 v1 *= d;
00452                 return v1;
00453         }

template<typename Type, typename Type2>
Vec3<Type2> operator * const Type &  d,
const Vec3< Type2 > &  v
[inline]
 

Definition at line 439 of file vec3.h.

References v.

00440         {
00441                 // Preserve the vector type
00442                 Vec3<Type2> v1(v);
00443                 v1 *= d;
00444                 return v1;
00445         }

template<typename Type, typename Type2>
Type operator * const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2
[inline]
 

Definition at line 433 of file vec3.h.

References EMAN::Vec3< Type >::dot().

00434         {
00435                 return v1.dot(v2);
00436         }

template<typename Type>
Vec3f operator * const Vec3< Type > &  v,
const Transform &  M
 

Vector times a matrix.

Highly specialized. Useful when the upper 3x3 only contains rotations and you want to quickly multiply by the rotation matrix inverse (transpose)

Definition at line 523 of file transform.h.

References v, Vec3f, x, and y.

00524         {
00525                 float x = v[0] * M[0][0] + v[1] * M[1][0] + v[2] * M[2][0] ;
00526                 float y = v[0] * M[0][1] + v[1] * M[1][1] + v[2] * M[2][1];
00527                 float z = v[0] * M[0][2] + v[1] * M[1][2] + v[2] * M[2][2];
00528                 return Vec3f(x, y, z);
00529         }

template<typename Type>
Vec2f operator * const Transform &  M,
const Vec2< Type > &  v
 

Matrix times Vector, a pure mathematical operation.

Definition at line 514 of file transform.h.

References EMAN::Transform::transform(), v, and Vec2f.

00515         {
00516                 return M.transform(v);
00517         }

template<typename Type>
Vec3f operator * const Transform &  M,
const Vec3< Type > &  v
 

Matrix times Vector, a pure mathematical operation.

Definition at line 507 of file transform.h.

References EMAN::Transform::transform(), v, and Vec3f.

00508         {
00509                 return M.transform(v);
00510         }

Transform EMAN::operator * const Transform M2,
const Transform M1
 

Matrix times Matrix, a pure mathematical operation.

Definition at line 1227 of file transform.cpp.

01228 {
01229         Transform result;
01230         for (int i=0; i<3; i++) {
01231                 for (int j=0; j<4; j++) {
01232                         result[i][j] = M2[i][0] * M1[0][j] +  M2[i][1] * M1[1][j] + M2[i][2] * M1[2][j];
01233                 }
01234                 result[i][3] += M2[i][3];
01235         }
01236 
01237         return result;
01238 }

Quaternion EMAN::operator * float  s,
const Quaternion q
 

Definition at line 337 of file quaternion.cpp.

00338 {
00339         Quaternion q1 = q;
00340         q1 *= s;
00341         return q1;
00342 }

Quaternion EMAN::operator * const Quaternion q,
float  s
 

Definition at line 330 of file quaternion.cpp.

00331 {
00332         Quaternion q1 = q;
00333         q1 *= s;
00334         return q1;
00335 }

Quaternion EMAN::operator * const Quaternion q1,
const Quaternion q2
 

Definition at line 323 of file quaternion.cpp.

References q.

00324 {
00325         Quaternion q = q1;
00326         q *= q2;
00327         return q;
00328 }

EMData * EMAN::operator * const EMData a,
const EMData b
 

Definition at line 3054 of file emdata.cpp.

References b, EMAN::EMData::copy(), and EMAN::EMData::mult().

03055 {
03056         EMData * r = a.copy();
03057         r->mult(b);
03058         return r;
03059 }

EMData * EMAN::operator * float  n,
const EMData em
 

Definition at line 3013 of file emdata.cpp.

References EMAN::EMData::copy(), and EMAN::EMData::mult().

03014 {
03015         EMData * r = em.copy();
03016         r->mult(n);
03017         return r;
03018 }

EMData * EMAN::operator * const EMData em,
float  n
 

Definition at line 2983 of file emdata.cpp.

References EMAN::EMData::copy(), and EMAN::EMData::mult().

02984 {
02985         EMData* r = em.copy();
02986         r ->mult(n);
02987         return r;
02988 }

template<typename Type, typename Type2>
bool operator!= const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2
[inline]
 

Definition at line 859 of file vec3.h.

00859                                                                              {
00860                 if (v1[0] != v2[0] || v1[1] != v2[1] ) {
00861                         return true;
00862                 }
00863                 return false;
00864         }

template<typename Type, typename Type2>
bool operator!= const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2
[inline]
 

Definition at line 481 of file vec3.h.

00481                                                                              {
00482                 if (v1[0] != v2[0] || v1[1] != v2[1] || v1[2] != v2[2]) {
00483                         return true;
00484                 }
00485                 return false;
00486         }

bool EMAN::operator!= const Quaternion q1,
const Quaternion q2
 

Definition at line 370 of file quaternion.cpp.

00371 {
00372         return (!(q1 == q2));
00373 }

bool EMAN::operator!= const Pixel p1,
const Pixel p2
 

Definition at line 62 of file geometry.cpp.

00063 {
00064         return !(p1 == p2);
00065 }

bool EMAN::operator!= const Dict d1,
const Dict d2
 

Definition at line 1047 of file emobject.cpp.

01048 {
01049         return !(d1 == d2);
01050 }

bool EMAN::operator!= const EMObject e1,
const EMObject e2
 

Definition at line 896 of file emobject.cpp.

00897 {
00898         return !(e1 == e2);
00899 }

template<typename Type, typename Type2>
Vec2<Type> operator+ const Vec2< Type > &  v,
const Type2 &  n
[inline]
 

Definition at line 782 of file vec3.h.

References v.

00783         {
00784                 Vec2<Type> v1(v);
00785                 v1 += n;
00786                 return v1;
00787         }

template<typename Type, typename Type2>
Vec2<Type> operator+ const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2
[inline]
 

Definition at line 776 of file vec3.h.

00777         {
00778                 return Vec2<Type>(static_cast<Type>(v1[0] + v2[0]), static_cast<Type>(v1[1] + v2[1]));;
00779         }

template<typename Type, typename Type2>
Vec3<Type> operator+ const Vec3< Type > &  v,
const Type2 &  n
[inline]
 

Definition at line 388 of file vec3.h.

References v.

00389         {
00390                 Vec3<Type> v1(v);
00391                 v1 += n;
00392                 return v1;
00393         }

template<typename Type, typename Type2>
Vec3<Type> operator+ const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2
[inline]
 

Definition at line 381 of file vec3.h.

00382         {
00383 
00384                 return Vec3<Type>(static_cast<Type>(v1[0] + v2[0]), static_cast<Type>(v1[1] + v2[1]),static_cast<Type>(v1[2] + v2[2]));;
00385         }

Quaternion EMAN::operator+ const Quaternion q1,
const Quaternion q2
 

Definition at line 308 of file quaternion.cpp.

References q.

00309 {
00310         Quaternion q = q1;
00311         q += q2;
00312         return q;
00313 }

EMData * EMAN::operator+ const EMData a,
const EMData b
 

Definition at line 3040 of file emdata.cpp.

References EMAN::EMData::add(), b, and EMAN::EMData::copy().

03041 {
03042         EMData * r = a.copy();
03043         r->add(b);
03044         return r;
03045 }

EMData * EMAN::operator+ float  n,
const EMData em
 

Definition at line 2998 of file emdata.cpp.

References EMAN::EMData::add(), and EMAN::EMData::copy().

02999 {
03000         EMData * r = em.copy();
03001         r->add(n);
03002         return r;
03003 }

EMData * EMAN::operator+ const EMData em,
float  n
 

Definition at line 2969 of file emdata.cpp.

References EMAN::EMData::add(), and EMAN::EMData::copy().

02970 {
02971         EMData * r = em.copy();
02972         r->add(n);
02973         return r;
02974 }

template<typename Type>
Vec2<Type> operator- const Vec2< Type > &  v  )  [inline]
 

Definition at line 804 of file vec3.h.

References v.

00805         {
00806                 return Vec2<Type>(-v[0],-v[1]);
00807         }

template<typename Type, typename Type2>
Vec2<Type> operator- const Vec2< Type > &  v,
const Type2 &  n
[inline]
 

Definition at line 796 of file vec3.h.

References v.

00797         {
00798                 Vec2<Type> v1(v);
00799                 v1 -= n;
00800                 return v1;
00801         }

template<typename Type, typename Type2>
Vec2<Type> operator- const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2
[inline]
 

Definition at line 790 of file vec3.h.

00791         {
00792                 return Vec2<Type>(static_cast<Type>(v1[0] - v2[0]),     static_cast<Type>(v1[1] - v2[1]));
00793         }

template<typename Type>
Vec3<Type> operator- const Vec3< Type > &  v  )  [inline]
 

Definition at line 419 of file vec3.h.

References v.

00420         {
00421                 return Vec3<Type>(-v[0],-v[1],-v[2]);
00422         }

template<typename Type, typename Type2>
Vec3<Type> operator- const Vec3< Type > &  v,
const Type2 &  n
[inline]
 

Definition at line 412 of file vec3.h.

References v.

00413         {
00414                 Vec3<Type> v1(v);
00415                 v1 -= n;
00416                 return v1;
00417         }

template<typename Type, typename Type2>
Vec3<Type> operator- const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2
[inline]
 

Definition at line 404 of file vec3.h.

00405         {
00406                 return Vec3<Type>(static_cast<Type>(v1[0] - v2[0]),
00407                                                   static_cast<Type>(v1[1] - v2[1]),
00408                                                   static_cast<Type>(v1[2] - v2[2]));
00409         }

Quaternion EMAN::operator- const Quaternion q1,
const Quaternion q2
 

Definition at line 315 of file quaternion.cpp.

References q.

00316 {
00317         Quaternion q = q1;
00318         q -= q2;
00319         return q;
00320 }

IntPoint EMAN::operator- const IntPoint p  ) 
 

Definition at line 41 of file geometry.cpp.

00042 {
00043         return IntPoint(-p[0],-p[1],-p[2]);
00044 }

EMData * EMAN::operator- const EMData a,
const EMData b
 

Definition at line 3047 of file emdata.cpp.

References b, EMAN::EMData::copy(), and EMAN::EMData::sub().

03048 {
03049         EMData * r = a.copy();
03050         r->sub(b);
03051         return r;
03052 }

EMData * EMAN::operator- float  n,
const EMData em
 

Definition at line 3005 of file emdata.cpp.

References EMAN::EMData::add(), EMAN::EMData::copy(), and EMAN::EMData::mult().

03006 {
03007         EMData * r = em.copy();
03008         r->mult(-1.0f);
03009         r->add(n);
03010         return r;
03011 }

EMData * EMAN::operator- const EMData em,
float  n
 

Definition at line 2976 of file emdata.cpp.

References EMAN::EMData::copy(), and EMAN::EMData::sub().

Referenced by rsub().

02977 {
02978         EMData* r = em.copy();
02979         r->sub(n);
02980         return r;
02981 }

template<typename Type, typename Type2>
Vec2<Type> operator/ const Vec2< Type > &  v,
const Type2 &  d
[inline]
 

Definition at line 843 of file vec3.h.

References v.

00843                                                                           {
00844                 // Preserve the vector type
00845                 Vec2<Type> v1(v);
00846                 v1 /= d;
00847                 return v1;
00848         }

template<typename Type, typename Type2>
Vec2<Type2> operator/ const Type &  d,
const Vec2< Type2 > &  v
[inline]
 

Definition at line 834 of file vec3.h.

References v.

00835         {
00836         // Preserve the vector type
00837                 Vec2<Type2> v1(v);
00838                 v1 /= d;
00839                 return v1;
00840         }

template<typename Type, typename Type2>
Vec3<Type> operator/ const Vec3< Type > &  v,
const Type2 &  d
[inline]
 

Definition at line 465 of file vec3.h.

References v.

00465                                                                           {
00466                 // Preserve the vector type
00467                 Vec3<Type> v1(v);
00468                 v1 /= d;
00469                 return v1;
00470         }

template<typename Type, typename Type2>
Vec3<Type2> operator/ const Type &  d,
const Vec3< Type2 > &  v
[inline]
 

Definition at line 456 of file vec3.h.

References v.

00457         {
00458                 // Preserve the vector type
00459                 Vec3<Type2> v1(v);
00460                 v1 /= d;
00461                 return v1;
00462         }

Quaternion EMAN::operator/ const Quaternion q1,
const Quaternion q2
 

Definition at line 344 of file quaternion.cpp.

References q.

00345 {
00346         Quaternion q = q1;
00347         q /= q2;
00348         return q;
00349 }

EMData * EMAN::operator/ const EMData a,
const EMData b
 

Definition at line 3061 of file emdata.cpp.

References b, EMAN::EMData::copy(), and EMAN::EMData::div().

03062 {
03063         EMData * r = a.copy();
03064         r->div(b);
03065         return r;
03066 }

EMData * EMAN::operator/ float  n,
const EMData em
 

Definition at line 3020 of file emdata.cpp.

References EMAN::EMData::copy(), EMAN::EMData::div(), EMAN::EMData::mult(), and EMAN::EMData::to_one().

03021 {
03022         EMData * r = em.copy();
03023         r->to_one();
03024         r->mult(n);
03025         r->div(em);
03026 
03027         return r;
03028 }

EMData * EMAN::operator/ const EMData em,
float  n
 

Definition at line 2990 of file emdata.cpp.

References EMAN::EMData::copy(), and EMAN::EMData::div().

Referenced by rdiv().

02991 {
02992         EMData * r = em.copy();
02993         r->div(n);
02994         return r;
02995 }

bool EMAN::operator< const Pixel p1,
const Pixel p2
 

Definition at line 46 of file geometry.cpp.

References EMAN::Pixel::value.

00047 {
00048         if (p1.value < p2.value) {
00049                 return true;
00050         }
00051         return false;
00052 }

std::ostream& operator<< std::ostream &  os,
const Matrix4 &  m
[inline]
 

Definition at line 952 of file vecmath.h.

References EMAN::Matrix4::row().

00952                                                                         {
00953             os << m.row(0) << std::endl;
00954             os << m.row(1) << std::endl;
00955             os << m.row(2) << std::endl;
00956             os << m.row(3) << std::endl;
00957             return os;
00958         }

std::ostream& operator<< std::ostream &  os,
const Vector4 &  v
[inline]
 

Definition at line 690 of file vecmath.h.

References v.

00690                                                                         {
00691             os << "(" << v[0] << ", " << v[1] << ", " << v[2] << ", " << v[3] << ")";
00692             return os;
00693         }

std::ostream& operator<< std::ostream &  os,
const Matrix3 &  m
[inline]
 

Definition at line 584 of file vecmath.h.

References EMAN::Matrix3::row().

00584                                                                         {
00585             os << m.row(0) << std::endl;
00586             os << m.row(1) << std::endl;
00587             os << m.row(2) << std::endl;
00588             return os;
00589         }

std::ostream& operator<< std::ostream &  os,
const Point3 &  p
[inline]
 

Definition at line 412 of file vecmath.h.

00412                                                                        {
00413             os << "(" << p[0] << ", " << p[1] << ", " << p[2] << ")";
00414             return os;
00415         }

std::ostream& operator<< std::ostream &  os,
const Vector3 &  v
[inline]
 

Definition at line 320 of file vecmath.h.

References v.

00320                                                                         {
00321             os << "(" << v[0] << ", " << v[1] << ", " << v[2] << ")";
00322             return os;
00323         }

std::ostream& operator<< std::ostream &  os,
const ScreenPoint &  p
[inline]
 

Definition at line 200 of file vecmath.h.

00200                                                                             {
00201             os << "(" << p[0] << ", " << p[1] << ")";
00202             return os;
00203         }

std::ostream& operator<< std::ostream &  os,
const ScreenVector &  v
[inline]
 

Definition at line 137 of file vecmath.h.

References v.

00137                                                                              {
00138             os << "(" << v[0] << ", " << v[1] << ")";
00139             return os;
00140         }

template<typename Type, typename Type2>
bool operator== const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2
[inline]
 

Definition at line 851 of file vec3.h.

00851                                                                              {
00852                 if (v1[0] == v2[0] && v1[1] == v2[1] ) {
00853                         return true;
00854                 }
00855                 return false;
00856         }

template<typename Type, typename Type2>
bool operator== const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2
[inline]
 

Definition at line 473 of file vec3.h.

00473                                                                              {
00474                 if (v1[0] == v2[0] && v1[1] == v2[1] && v1[2] == v2[2]) {
00475                         return true;
00476                 }
00477                 return false;
00478         }

bool EMAN::operator== const Quaternion q1,
const Quaternion q2
 

Definition at line 352 of file quaternion.cpp.

References EMAN::Quaternion::as_list().

00353 {
00354         bool result = true;
00355         const float err_limit = 0.00001f;
00356         
00357         vector < float >v1 = q1.as_list();
00358         vector < float >v2 = q2.as_list();
00359 
00360         for (size_t i = 0; i < v1.size(); i++) {
00361                 if (fabs(v1[i] - v2[i]) > err_limit) {
00362                         result = false;
00363                         break;
00364                 }
00365         }
00366 
00367         return result;
00368 }

bool EMAN::operator== const Pixel p1,
const Pixel p2
 

Definition at line 54 of file geometry.cpp.

References EMAN::Pixel::value, EMAN::Pixel::x, EMAN::Pixel::y, and EMAN::Pixel::z.

00055 {
00056         if (p1.x == p2.x && p1.y == p2.y && p1.z == p2.z && p1.value == p2.value) {
00057                 return true;
00058         }
00059         return false;
00060 }

bool EMAN::operator== const Dict d1,
const Dict d2
 

Definition at line 1041 of file emobject.cpp.

References EMAN::Dict::dict.

01042 {
01043         // Just make use of map's version of operator==
01044         return (d1.dict == d2.dict);
01045 }

bool EMAN::operator== const EMObject e1,
const EMObject e2
 

Definition at line 796 of file emobject.cpp.

References EMAN::EMObject::b, EMAN::EMObject::d, EMAN::EMObject::emdata, EMAN::EMObject::f, EMAN::EMObject::farray, EMAN::EMObject::fp, EMAN::EMObject::iarray, EMAN::EMObject::ip, EMAN::EMObject::n, EMAN::EMObject::str, EMAN::EMObject::strarray, EMAN::EMObject::transformarray, EMAN::EMObject::type, EMAN::EMObject::ui, EMAN::EMObject::vp, and EMAN::EMObject::xydata.

00797 {
00798 
00799         if (e1.type != e2.type) {
00800                 return false;
00801         }
00802 
00803         switch (e1.type) {
00804         case  EMObject::BOOL:
00805                 return (e1.b == e2.b);
00806         break;
00807         case  EMObject::INT:
00808                 return (e1.n == e2.n);
00809         break;
00810         case  EMObject::UNSIGNEDINT:
00811                 return (e1.ui == e2.ui);
00812         break;
00813         case  EMObject::FLOAT:
00814                 return (e1.f == e2.f);
00815         break;
00816         case  EMObject::DOUBLE:
00817                 return (e1.d == e2.d);
00818         break;
00819         case EMObject::CTF:
00820         case  EMObject::STRING:
00821                 return (e1.str == e2.str);
00822         break;
00823         case  EMObject::FLOAT_POINTER:
00824                 return (e1.fp == e2.fp);
00825         break;
00826         case  EMObject::INT_POINTER:
00827                 return (e1.ip == e2.ip);
00828         break;
00829         case  EMObject::VOID_POINTER:
00830                 return (e1.vp == e2.vp);
00831         break;
00832         case  EMObject::EMDATA:
00833                 return (e1.emdata == e2.emdata);
00834         break;
00835         case  EMObject::XYDATA:
00836                 return (e1.xydata == e2.xydata);
00837         break;
00838         case  EMObject::TRANSFORM:
00839         case  EMObject::FLOATARRAY:
00840                 if (e1.farray.size() == e2.farray.size()) {
00841                         for (size_t i = 0; i < e1.farray.size(); i++) {
00842                                 if (e1.farray[i] != e2.farray[i]) {
00843                                         return false;
00844                                 }
00845                         }
00846                         return true;
00847                 }
00848                 else {
00849                         return false;
00850                 }
00851         break;
00852         case  EMObject::INTARRAY:
00853                 if (e1.iarray.size() == e2.iarray.size()) {
00854                         for (size_t i = 0; i < e1.iarray.size(); i++) {
00855                                 if (e1.iarray[i] != e2.iarray[i]) {
00856                                         return false;
00857                                 }
00858                         }
00859                         return true;
00860                 }
00861         break;
00862         case  EMObject::STRINGARRAY:
00863                 if (e1.strarray.size() == e2.strarray.size()) {
00864                         for (size_t i = 0; i < e1.strarray.size(); i++) {
00865                                 if (e1.strarray[i] != e2.strarray[i]) {
00866                                         return false;
00867                                 }
00868                         }
00869                         return true;
00870                 }
00871                 else {
00872                         return false;
00873                 }
00874         break;
00875         case EMObject::TRANSFORMARRAY:
00876                 if (e1.transformarray.size() == e2.transformarray.size()) {
00877                         for (size_t i = 0; i < e1.transformarray.size(); i++) {
00878                                 if (e1.transformarray[i] != e2.transformarray[i]) {
00879                                         return false;
00880                                 }
00881                         }
00882                 }
00883         break;
00884         case  EMObject::UNKNOWN:
00885                 // UNKNOWN really means "no type" and if two objects both have
00886                 // type UNKNOWN they really are the same
00887                 return (e1.type == e2.type);
00888         break;
00889         default:
00890                 return false;
00891         break;
00892         }
00893         return false;
00894 }

EMData * EMAN::padfft_slice const EMData *const   slice,
const Transform t,
int  npad
 

Direct Fourier inversion Reconstructor.

Definition at line 1941 of file reconstructor.cpp.

References Assert, EMAN::EMData::average_circ_sub(), EMAN::EMData::center_origin_fft(), checked_delete(), EMAN::EMData::do_fft_inplace(), EMAN::EMData::get_attr_default(), EMAN::Transform::get_trans_2d(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::norm_pad(), nx, ny, EMAN::EMData::process_inplace(), EMAN::EMData::set_attr(), t, and Vec2f.

Referenced by EMAN::file_store::add_image(), and EMAN::newfile_store::add_image().

01942 {
01943         int nx = slice->get_xsize();
01944         int ny = slice->get_ysize();
01945         int ndim = (ny==1) ? 1 : 2;
01946 
01947         if( ndim==2 && nx!=ny )
01948         {
01949                 // FIXME: What kind of exception should we throw here?
01950                 throw std::runtime_error("Tried to padfft a 2D slice which is not square.");
01951         }
01952 
01953         // process 2D slice or 1D line -- subtract the average outside of the circle, zero-pad, fft extend, and fft
01954         EMData* temp = slice->average_circ_sub();
01955 
01956         Assert( temp != NULL );
01957         EMData* zeropadded = temp->norm_pad( false, npad );
01958         Assert( zeropadded != NULL );
01959         checked_delete( temp );
01960 
01961         zeropadded->do_fft_inplace();
01962         EMData* padfftslice = zeropadded;
01963 
01964         // shift the projection
01965         Vec2f trans = t.get_trans_2d();
01966         float sx = -trans[0];
01967         float sy = -trans[1];
01968         if(sx != 0.0f || sy != 0.0)
01969                 padfftslice->process_inplace("filter.shift", Dict("x_shift", sx, "y_shift", sy, "z_shift", 0.0f));
01970 
01971         int remove = slice->get_attr_default("remove", 0);
01972         padfftslice->set_attr( "remove", remove );
01973 
01974 
01975 
01976         padfftslice->center_origin_fft();
01977         return padfftslice;
01978 }

EMData * EMAN::periodogram EMData f  ) 
 

Definition at line 40 of file fundamentals.cpp.

References EMAN::EMData::cmplx(), EMAN::EMData::copy(), EMAN::EMData::do_fft_inplace(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), imag(), EMAN::EMData::is_complex(), EMAN::EMData::is_fftodd(), EMAN::EMData::norm_pad(), nx, ny, power(), real(), EMAN::EMData::set_array_offsets(), EMAN::EMData::set_attr(), EMAN::EMData::set_size(), and EMAN::EMData::update().

00040                        {
00041         // These are actual dimensions
00042         int nx  = f->get_xsize();
00043         int ny  = f->get_ysize();
00044         int nz  = f->get_zsize();
00045         
00046         
00047                 // We manifestly assume no zero-padding here, just the 
00048                 // necessary extension along x for the fft
00049 
00050         if (f->is_complex()) nx = (nx - 2 + f->is_fftodd()); // nx is the real-space size of the input image
00051         int lsd2 = (nx + 2 - nx%2) / 2; // Extended x-dimension of the complex image
00052 
00053 //  Process f if real
00054         EMData* fp = NULL;
00055         if(f->is_complex()) fp = f->copy(); // we need to make a full copy so that we don't damage the original
00056         else {
00057                 
00058                 fp = f->norm_pad(false, 1); // Extend and do the FFT if f is real
00059                 fp->do_fft_inplace();
00060 
00061                 
00062                 
00063                 
00064         }
00065         fp->set_array_offsets(1,1,1);
00066 
00067         //  Periodogram: fp:=|fp|**2
00068         for (int iz = 1; iz <= nz; iz++) {
00069                 for (int iy = 1; iy <= ny; iy++) {
00070                         for (int ix = 1; ix <= lsd2; ix++) {
00071                                 float fpr = real(fp->cmplx(ix,iy,iz));
00072                                 float fpi = imag(fp->cmplx(ix,iy,iz));
00073                                 fp->cmplx(ix,iy,iz) = fpr*fpr + fpi*fpi;
00074                         }
00075                 }
00076         }
00077         //  Create power as a 3D array (-n/2:n/2+n%2-1)
00078         int nyt, nzt;
00079         int nx2 = nx/2;
00080         int ny2 = ny/2; if(ny2 == 0) nyt =0; else nyt=ny;
00081         int nz2 = nz/2; if(nz2 == 0) nzt =0; else nzt=nz;
00082         int nx2p = nx2+nx%2;
00083         int ny2p = ny2+ny%2;
00084         int nz2p = nz2+nz%2;
00085         EMData& power = *(new EMData()); // output image
00086         power.set_size(nx, ny, nz);
00087         power.set_array_offsets(-nx2,-ny2,-nz2);
00088 //If instead of preservation of the norm one would prefer to have peak of a PW of a single sine wave equal one
00089 //                             multiply power by the scale below, or the other way around.
00090         float scale = 4.0f/float (nx*nx)/float (ny*ny)/float (nz*nz);
00091         for (int iz = 1; iz <= nz; iz++) {
00092                 int jz=iz-1; 
00093                 if(jz>=nz2p) jz=jz-nzt;
00094                 for (int iy = 1; iy <= ny; iy++) {
00095                         int jy=iy-1; 
00096                         if(jy>=ny2p) jy=jy-nyt;
00097                         for (int ix = 1; ix <= lsd2; ix++) {
00098                                 int jx=ix-1; 
00099                                 if(jx>=nx2p) jx=jx-nx;
00100                                 power(jx,jy,jz) = real(fp->cmplx(ix,iy,iz)) * scale;
00101                         }
00102                 }
00103         }
00104 
00105 //  Create the Friedel related half
00106         int  nzb, nze, nyb, nye, nxb, nxe;
00107         nxb =-nx2+(nx+1)%2;
00108         nxe = nx2-(nx+1)%2;
00109         if(ny2 == 0) {nyb =0; nye = 0;} else {nyb =-ny2+(ny+1)%2; nye = ny2-(ny+1)%2;}
00110         if(nz2 == 0) {nzb =0; nze = 0;} else {nzb =-nz2+(nz+1)%2; nze = nz2-(nz+1)%2;}
00111         for (int iz = nzb; iz <= nze; iz++) {
00112                 for (int iy = nyb; iy <= nye; iy++) {
00113                         for (int ix = 1; ix <= nxe; ix++) { // Note this loop begins with 1 - FFT should create correct Friedel related 0 plane
00114                                 power(-ix,-iy,-iz) = power(ix,iy,iz);
00115                         }
00116                 }
00117         }
00118         if(ny2 != 0)  {
00119                 if(nz2 != 0)  {
00120                         if(nz%2 == 0) {  //if nz even, fix the first slice
00121                                 for (int iy = nyb; iy <= nye; iy++) {
00122                                         for (int ix = nxb; ix <= -1; ix++) { 
00123                                                 power(ix,iy,-nz2) = power(-ix,-iy,-nz2);
00124                                         }
00125                                 }
00126                                 if(ny%2 == 0) {  //if ny even, fix the first line
00127                                         for (int ix = nxb; ix <= -1; ix++) { 
00128                                                 power(ix,-ny2,-nz2) = power(-ix,-ny2,-nz2);
00129                                         }
00130                                 }
00131                         }
00132                 }
00133                 if(ny%2 == 0) {  //if ny even, fix the first column
00134                         for (int iz = nzb; iz <= nze; iz++) {
00135                                 for (int ix = nxb; ix <= -1; ix++) {
00136                                         power(ix,-ny2,-iz) = power(-ix,-ny2,iz);
00137                                 }
00138                         }
00139                 }
00140                 
00141         }
00142                 
00143         if( fp ) {
00144                 delete fp; // avoid a memory leak!
00145                 fp = 0;
00146         }
00147         //power[0][0][0]=power[1][0][0];  //Steve requested the original origin.
00148         
00149         int sz[3];
00150         sz[0] = nx;
00151         sz[1] = ny;
00152         sz[2] = nz;
00153         int max_size = *std::max_element(&sz[0],&sz[3]);
00154         // set the pixel size for the power spectrum, only ration of the frequency pixel size is considered     
00155         power.set_attr("apix_x", float(max_size)/nx);
00156         if(ny2 > 0) power.set_attr("apix_y", float(max_size)/ny);
00157         if(nz2 > 0) power.set_attr("apix_z", float(max_size)/nz);
00158         
00159         power.update();
00160         power.set_array_offsets(0,0,0);
00161         return &power;
00162 //OVER AND OUT
00163 }

EMData * EMAN::rdiv const EMData em,
float  n
 

Definition at line 3035 of file emdata.cpp.

References operator/().

03036 {
03037         return EMAN::operator/(n, em);
03038 }

EMData * EMAN::rsconvolution EMData f,
EMData K
 

Real-space convolution of two images.

Purpose: Calculate the convolution of two 1-, 2-,
or 3-dimensional images.
Parameters:
[in] f First real-space image object. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in] K Second real-space image object (the convolution Kernel). Image may be 1-, 2-, or 3-dimensional. Image K is not changed.
Returns:
Real-space convolution image.

Definition at line 249 of file rsconvolution.cpp.

References EMAN::EMData::get_array_offsets(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), ImageDimensionException, mult_circ(), mult_internal(), EMAN::EMData::set_array_offsets(), EMAN::EMData::set_size(), EMAN::EMData::to_zero(), and EMAN::EMData::update().

00249                                                 {//Does not work properly in 3D, corners are not done, PAP 07/16/09
00250                 // Kernel should be the smaller image
00251                 int nxf=f->get_xsize(); int nyf=f->get_ysize(); int nzf=f->get_zsize();
00252                 int nxK=K->get_xsize(); int nyK=K->get_ysize(); int nzK=K->get_zsize();
00253                 if ((nxf<nxK)&&(nyf<nyK)&&(nzf<nzK)) {
00254                         // whoops, f smaller than K
00255                         swap(f,K); swap(nxf,nxK); swap(nyf,nyK); swap(nzf,nzK);
00256                 } else if ((nxK<=nxf)&&(nyK<=nyf)&&(nzK<=nzf)) {
00257                         // that's what it should be, so do nothing
00258                         ;
00259                 } else {
00260                         // incommensurate sizes
00261                         throw ImageDimensionException("input images are incommensurate");
00262                 }
00263                 // Kernel needs to be _odd_ in size
00264                 if ((nxK % 2 != 1) || (nyK % 2 != 1) || (nzK % 2 != 1))
00265                         throw ImageDimensionException("Real-space convolution kernel"
00266                                 " must have odd nx,ny,nz (so the center is well-defined).");
00267                 EMData* result = new EMData();
00268                 result->set_size(nxf, nyf, nzf);
00269                 result->to_zero();
00270                 // kernel corners, need to check for degenerate case
00271                 int kxmin = -nxK/2; int kymin = -nyK/2; int kzmin = -nzK/2;
00272                 int kxmax = (1 == nxK % 2) ? -kxmin : -kxmin - 1;
00273                 int kymax = (1 == nyK % 2) ? -kymin : -kymin - 1;
00274                 int kzmax = (1 == nzK % 2) ? -kzmin : -kzmin - 1;
00275                 vector<int> K_saved_offsets = K->get_array_offsets();
00276                 K->set_array_offsets(kxmin,kymin,kzmin);
00277                 // interior boundaries, need to check for degenerate cases
00278                 int izmin = 0, izmax = 0, iymin = 0, iymax = 0, ixmin = 0, ixmax = 0;
00279                 if (1 != nzf) {
00280                         izmin = -kzmin;
00281                         izmax = nzf - 1 - kzmax;
00282                 }
00283                 if (1 != nyf) {
00284                         iymin = -kymin;
00285                         iymax = nyf - 1 - kymax;
00286                 }
00287                 if (1 != nxf) {
00288                         ixmin = -kxmin;
00289                         ixmax = nxf - 1 - kxmax;
00290                 }
00291                 // interior (no boundary condition issues here)
00292                 for (int iz = izmin; iz <= izmax; iz++) {
00293                         for (int iy = iymin; iy <= iymax; iy++) {
00294                                 for (int ix = ixmin; ix <= ixmax; ix++) {
00295                                         (*result)(ix,iy,iz) =
00296                                                 mult_internal(*K, *f, 
00297                                                                       kzmin, kzmax, kymin, kymax, kxmin, kxmax,
00298                                                                           iz, iy, ix);
00299                                 }
00300                         }
00301                 }
00302                 // corners
00303                 // corner sizes, with checking for degenerate cases
00304                 int sz = (1 == nzK) ? 1 : -kzmin + kzmax;
00305                 int sy = (1 == nyK) ? 1 : -kymin + kymax;
00306                 int sx = (1 == nxK) ? 1 : -kxmin + kxmax;
00307                 // corner starting locations, with checking for degenerate cases
00308                 int zstart = (0 == izmin) ? 0 : izmin - 1;
00309                 int ystart = (0 == iymin) ? 0 : iymin - 1;
00310                 int xstart = (0 == ixmin) ? 0 : ixmin - 1;
00311                 // corners
00312                 for (int cz = 0; cz < sz; cz++) {
00313                         int iz = (zstart - cz) % nzf;
00314                         if (iz < 0) iz += nzf;
00315                         for (int cy = 0; cy < sy; cy++) {
00316                                 int iy = (ystart - cy) % nyf;
00317                                 if (iy < 0) iy += nyf;
00318                                 for (int cx=0; cx < sx; cx++) {
00319                                         int ix = (xstart - cx) % nxf;
00320                                         if (ix < 0) ix += nxf;
00321                                         (*result)(ix,iy,iz) =
00322                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, 
00323                                                                  kymax, kxmin, kxmax,
00324                                                                  nzf, nyf, nxf, iz, iy, ix);
00325                                 }
00326                         }
00327                 }
00328                 // remaining stripes -- should use a more elegant (non-3D-specific) method here
00329                 // ix < ixmin
00330                 for (int ix = 0; ix < ixmin; ix++) {
00331                         for (int iy = iymin; iy <= iymax; iy++) {
00332                                 for (int iz = izmin; iz <= izmax; iz++) {
00333                                         (*result)(ix,iy,iz) =
00334                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00335                                                                  kxmin, kxmax,
00336                                                                  nzf, nyf, nxf, iz, iy, ix);
00337                                 }
00338                         }
00339                 }
00340                 // ix > ixmax
00341                 for (int ix = ixmax+1; ix < nxf; ix++) {
00342                         for (int iy = iymin; iy <= iymax; iy++) {
00343                                 for (int iz = izmin; iz <= izmax; iz++) {
00344                                         (*result)(ix,iy,iz) =
00345                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00346                                                                  kxmin, kxmax,
00347                                                                  nzf, nyf, nxf, iz, iy, ix);
00348                                 }
00349                         }
00350                 }
00351                 // iy < iymin
00352                 for (int iy = 0; iy < iymin; iy++) {
00353                         for (int ix = ixmin; ix <= ixmax; ix++) {
00354                                 for (int iz = izmin; iz <= izmax; iz++) {
00355                                         (*result)(ix,iy,iz) =
00356                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00357                                                                  kxmin, kxmax,
00358                                                                  nzf, nyf, nxf, iz, iy, ix);
00359                                 }
00360                         }
00361                 }
00362                 // iy > iymax
00363                 for (int iy = iymax+1; iy < nyf; iy++) {
00364                         for (int ix = ixmin; ix <= ixmax; ix++) {
00365                                 for (int iz = izmin; iz <= izmax; iz++) {
00366                                         (*result)(ix,iy,iz) =
00367                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00368                                                                  kxmin, kxmax,
00369                                                                  nzf, nyf, nxf, iz, iy, ix);
00370                                 }
00371                         }
00372                 }
00373                 // iz < izmin
00374                 for (int iz = 0; iz < izmin; iz++) {
00375                         for (int ix = ixmin; ix <= ixmax; ix++) {
00376                                 for (int iy = iymin; iy <= iymax; iy++) {
00377                                         (*result)(ix,iy,iz) =
00378                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00379                                                                  kxmin, kxmax,
00380                                                                  nzf, nyf, nxf, iz, iy, ix);
00381                                 }
00382                         }
00383                 }
00384                 // iz > izmax
00385                 for (int iz = izmax+1; iz < nzf; iz++) {
00386                         for (int ix = ixmin; ix <= ixmax; ix++) {
00387                                 for (int iy = iymin; iy <= iymax; iy++) {
00388                                         (*result)(ix,iy,iz) =
00389                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00390                                                                  kxmin, kxmax,
00391                                                                  nzf, nyf, nxf, iz, iy, ix);
00392                                 }
00393                         }
00394                 }
00395                 
00396                 
00397                 // ix < ixmin, iy < iymin
00398                 for (int ix = 0; ix < ixmin; ix++) {
00399                         for (int iy = 0; iy < iymin; iy++) {
00400                                 for (int iz = izmin; iz <= izmax; iz++) {
00401                                         (*result)(ix,iy,iz) =
00402                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00403                                                                  kxmin, kxmax,
00404                                                                  nzf, nyf, nxf, iz, iy, ix);
00405                                 }
00406                         }
00407                 }
00408                 
00409                 // ix < ixmin, iy > iymax
00410                 for (int ix = 0; ix < ixmin; ix++) {
00411                         for (int iy = iymax+1; iy < nyf; iy++) {
00412                                 for (int iz = izmin; iz <= izmax; iz++) {
00413                                         (*result)(ix,iy,iz) =
00414                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00415                                                                  kxmin, kxmax,
00416                                                                  nzf, nyf, nxf, iz, iy, ix);
00417                                 }
00418                         }
00419                 }
00420 
00421         // ix > ixmax, iy < iymin
00422                 for (int ix = ixmax+1; ix < nxf; ix++) {
00423                         for (int iy = 0; iy < iymin; iy++) {
00424                                 for (int iz = izmin; iz <= izmax; iz++) {
00425                                         (*result)(ix,iy,iz) =
00426                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00427                                                                  kxmin, kxmax,
00428                                                                  nzf, nyf, nxf, iz, iy, ix);
00429                                 }
00430                         }
00431                 }
00432                 
00433                 // ix > ixmax, iy > iymax
00434                 for (int ix = ixmax+1; ix < nxf; ix++) {
00435                         for (int iy = iymax+1; iy < nyf; iy++) {
00436                                 for (int iz = izmin; iz <= izmax; iz++) {
00437                                         (*result)(ix,iy,iz) =
00438                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00439                                                                  kxmin, kxmax,
00440                                                                  nzf, nyf, nxf, iz, iy, ix);
00441                                 }
00442                         }
00443                 }
00444 
00445 
00446                 
00447         // ix < ixmin, iz < izmin
00448                 for (int ix = 0; ix < ixmin; ix++) {
00449                         for (int iy = iymin; iy <= iymax; iy++) {
00450                                 for (int iz = 0; iz < izmin; iz++) {
00451                                         (*result)(ix,iy,iz) =
00452                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00453                                                                  kxmin, kxmax,
00454                                                                  nzf, nyf, nxf, iz, iy, ix);
00455                                 }
00456                         }
00457                 }
00458                 
00459                  // ix < ixmin, iz > izmax
00460                 for (int ix = 0; ix < ixmin; ix++) {
00461                         for (int iy = iymin; iy <= iymax; iy++) {
00462                                 for (int iz = izmax+1; iz < nzf; iz++) {
00463                                         (*result)(ix,iy,iz) =
00464                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00465                                                                  kxmin, kxmax,
00466                                                                  nzf, nyf, nxf, iz, iy, ix);
00467                                 }
00468                         }
00469                 }
00470 
00471 
00472          // ix > ixmin, iz < izmin
00473                 for (int ix = ixmax+1; ix < nxf; ix++) {
00474                         for (int iy = iymin; iy <= iymax; iy++) {
00475                                 for (int iz = 0; iz < izmin; iz++) {
00476                                         (*result)(ix,iy,iz) =
00477                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00478                                                                  kxmin, kxmax,
00479                                                                  nzf, nyf, nxf, iz, iy, ix);
00480                                 }
00481                         }
00482                 }
00483                 
00484                  // ix > ixmin, iz > izmax
00485                 for (int ix = ixmax+1; ix < nxf; ix++) {
00486                         for (int iy = iymin; iy <= iymax; iy++) {
00487                                 for (int iz = izmax+1; iz < nzf; iz++) {
00488                                         (*result)(ix,iy,iz) =
00489                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00490                                                                  kxmin, kxmax,
00491                                                                  nzf, nyf, nxf, iz, iy, ix);
00492                                 }
00493                         }
00494                 }
00495 
00496                 
00497 
00498        // iy < iymin, iz < izmin
00499            
00500            for (int iz = 0; iz < izmin; iz++) {
00501                         for (int ix = ixmin; ix <= ixmax; ix++) {
00502                                 for (int iy = 0; iy < iymin; iy++) {
00503                                         (*result)(ix,iy,iz) =
00504                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00505                                                                  kxmin, kxmax,
00506                                                                  nzf, nyf, nxf, iz, iy, ix);
00507                                 }
00508                         }
00509                 }
00510 
00511 
00512        // iy < iymin, iz > izmax
00513            
00514            for (int iz = izmax+1; iz < nzf; iz++) {
00515                         for (int ix = ixmin; ix <= ixmax; ix++) {
00516                                 for (int iy = 0; iy < iymin; iy++) {
00517                                         (*result)(ix,iy,iz) =
00518                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00519                                                                  kxmin, kxmax,
00520                                                                  nzf, nyf, nxf, iz, iy, ix);
00521                                 }
00522                         }
00523                 }
00524                 
00525                 
00526                 // iy > iymax, iz < izmin
00527            
00528            for (int iz = 0; iz < izmin; iz++) {
00529                         for (int ix = ixmin; ix <= ixmax; ix++) {
00530                                 for (int iy = iymax+1; iy < nyf; iy++) {
00531                                         (*result)(ix,iy,iz) =
00532                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00533                                                                  kxmin, kxmax,
00534                                                                  nzf, nyf, nxf, iz, iy, ix);
00535                                 }
00536                         }
00537                 }
00538 
00539 
00540        // iy > iymax, iz > izmax
00541            
00542            for (int iz = izmax+1; iz < nzf; iz++) {
00543                         for (int ix = ixmin; ix <= ixmax; ix++) {
00544                                 for (int iy = iymax+1; iy < nyf; iy++) {
00545                                         (*result)(ix,iy,iz) =
00546                                                 mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
00547                                                                  kxmin, kxmax,
00548                                                                  nzf, nyf, nxf, iz, iy, ix);
00549                                 }
00550                         }
00551                 }
00552 
00553                 
00554                 K->set_array_offsets(K_saved_offsets);
00555                 result->update();
00556                 return result;
00557         }

EMData* rscp EMData *  f  ) 
 

Real-space convolution with the K-B window.

Purpose: Calculate the convolution with the K-B window.
Parameters:
[in] f First real-space image object. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
Returns:
Real-space convolution image.

EMData * EMAN::rsub const EMData em,
float  n
 

Definition at line 3030 of file emdata.cpp.

References operator-().

Referenced by main().

03031 {
03032         return EMAN::operator-(n, em);
03033 }

EMData* self_correlation EMData *  f,
fp_flag  myflag,
bool  center
[inline]
 

Image self-correlation.

Purpose: Calculate the self-correlation of a 1-, 2-,
or 3-dimensional image.
Method: This function calls fourierproduct.
This function actually calls fourierproduct.

Parameters:
[in] f Image object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in] myflag Processing flag (see above).
[in] center 
Returns:
Real-space self-correlation image.

Definition at line 206 of file fundamentals.h.

References fourierproduct(), and SELF_CORRELATION.

00206                                                                                 {
00207                 return fourierproduct(f, NULL, myflag, SELF_CORRELATION, center);
00208         }

Vector4 unit const Vector4 &  v  )  [inline]
 

Definition at line 689 of file vecmath.h.

References EMAN::Vector4::length(), and v.

00689 { const double len = v.length(); return v / len; }

Vector3 unit const Vector3 &  v  )  [inline]
 

Definition at line 318 of file vecmath.h.

References EMAN::Vector3::length(), and v.

00318 { const double len = v.length(); return v / len; }


Variable Documentation

const int EMAN::MAXFFT = 32768 [static]
 

Definition at line 49 of file polardata.h.


Generated on Tue Jul 12 13:50:18 2011 for EMAN2 by  doxygen 1.3.9.1