EMAN2
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
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...

Namespaces

namespace  Gatan
namespace  GatanDM4

Classes

class  Aligner
 Aligner class defines image alignment method. More...
class  ScaleAlignerABS
 This is an ABS for use in constructing, rt_scale, rt_flip, etc scale aligners. More...
class  ScaleAligner
 Scale aligner. More...
class  TranslationalAligner
 Translational 2D Alignment using cross correlation. More...
class  RotationalAligner
 rotational alignment using angular correlation More...
class  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  RotatePrecenterAligner
 rotational alignment assuming centers are correct More...
class  RotateTranslateAligner
 rotational, translational alignment More...
class  RotateTranslateScaleAligner
 rotational, translational, scaling alignment More...
class  RotateTranslateAlignerIterative
 Iterative rotational, translational alignment. More...
class  RotateTranslateScaleAlignerIterative
 Iterative rotational, translational alignment with scaling. More...
class  RotateTranslateAlignerPawel
 Rotational, translational alignment by resampling to polar coordinates. More...
class  RotateTranslateBestAligner
 rotational, translational alignment More...
class  RotateFlipAligner
 rotational and flip alignment More...
class  RotateFlipAlignerIterative
 rotational and flip alignment, iterative style More...
class  RotateTranslateFlipAligner
 rotational, translational and flip alignment More...
class  RotateTranslateFlipScaleAligner
 rotational, translational, flip, scaling alignment More...
class  RotateTranslateFlipAlignerIterative
 rotational, translational and flip alignment, iterative style More...
class  RotateTranslateFlipScaleAlignerIterative
 Iterative rotational, translational alignment with flipping and scaling. More...
class  RotateTranslateFlipAlignerPawel
 Rotational, translational alignment by resampling to polar coordinates. More...
class  RTFExhaustiveAligner
 rotational, translational and flip alignment using real-space methods. More...
class  RTFSlowExhaustiveAligner
 rotational, translational and flip alignment using exhaustive search. More...
class  SymAlignProcessor
 Aligns a particle with the specified symmetry into the standard orientation for that symmetry. More...
class  RefineAligner
 refine alignment. More...
class  RefineAlignerCG
 Conjugate gradient refine alignment. More...
class  SymAlignProcessorQuat
 Aligns a particle with a specified symetry to its symmetry axis using the simplex multidimensional minimization algorithm. More...
class  Refine3DAlignerGrid
 Refine alignment. More...
class  Refine3DAlignerQuaternion
 Refine alignment. More...
class  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  RT3DSphereAligner
 3D rotational and translational alignment using spherical sampling, can reduce the search space based on symmetry. More...
class  RT3DSymmetryAligner
 3D rotational symmetry aligner. More...
class  FRM2DAligner
class  CUDA_Aligner
class  CUDA_multiref_aligner
class  AmiraIO
 Amira file = ASCII header + binary data. More...
class  Analyzer
 Analyzer class defines a way to take a List of images as input, and returns a new List of images. More...
class  InertiaMatrixAnalyzer
 Inertia Matrix computer Computes the Inertia Matrix for a 3-D volume. More...
class  ShapeAnalyzer
 Shape characterization Computes a set of values characteristic of the shape of a volume. More...
class  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  SVDAnalyzer
 Singular Value Decomposition from GSL. More...
class  Averager
 Averager class defines a way to do averaging on a set of images. More...
class  ImageAverager
 ImageAverager averages a list of images. More...
class  FourierWeightAverager
 FourierWeightAverager makes an average of a set of images in Fourier space using a per-image radial weight. More...
class  TomoAverager
 TomoAverager averages a list of volumes in Fourier space. More...
class  MinMaxAverager
 ImageAverager averages a list of images. More...
class  AbsMaxMinAverager
 AbsMaxMinAverager averages a list of images to the maximum(or minimum of the absolute pixel value) It optionally makes a sigma image. More...
class  IterationAverager
 IterationAverager averages images by doing the smoothing iteration. More...
class  CtfCAutoAverager
 CtfCWautoAverager averages the images with CTF correction with a Wiener filter. More...
class  CtfCWautoAverager
 CtfCWautoAverager averages the images with CTF correction with a Wiener filter. More...
class  BoxingTools
 BoxingTools is class for encapsulating common boxing operations that may become expensive if they are implemented in python. More...
class  BoxSVDClassifier
class  ByteOrder
 ByteOrder defines functions to work on big/little endian byte orders. More...
class  Cmp
 Cmp class defines image comparison method. More...
class  CccCmp
 Compute the cross-correlation coefficient between two images. More...
class  LodCmp
class  SqEuclideanCmp
 Squared Euclidean distance normalized by n between 'this' and 'with'. More...
class  DotCmp
 Use dot product of 2 same-size images to do the comparison. More...
class  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  TomoFscCmp
 This is a FSC comparitor for tomography. More...
class  QuadMinDotCmp
 This will calculate the dot product for each quadrant of the image and return the worst value. More...
class  OptSubCmp
 Uses math.sub.optimal to remove the density of the reference from the image as much as possible. More...
class  OptVarianceCmp
 Variance between two data sets after various modifications. More...
class  PhaseCmp
 Amplitude weighted mean phase difference (radians) with optional SNR weight. More...
class  FRCCmp
 FRCCmp returns a quality factor based on FRC between images. More...
class  Ctf
 Ctf is the base class for all CTF model. More...
class  EMAN1Ctf
 EMAN1Ctf is the CTF model used in EMAN1. More...
class  EMAN2Ctf
 EMAN2Ctf is the default CTF model used in EMAN2. More...
class  Df3IO
class  DM3IO
 Gatan DM3 file is a hierarchical binary image format. More...
class  DM4IO
 Gatan DM$ was introduced with the GMS 2.0 release. More...
class  EMData
 EMData stores an image's data and defines core image processing routines. More...
class  EMFTGL
 EMFTGL is an interface for rendering fonts in EMAN2 using FTGL. More...
class  EmIO
 EmIO defines I/O operations on EM image format. More...
class  EMConsts
class  EMObject
 EMObject is a wrapper class for types including int, float, double, etc as defined in ObjectType. More...
class  TypeDict
 TypeDict is a dictionary to store <string, EMObject::ObjectType> pair. More...
class  Dict
 Dict is a dictionary to store <string, EMObject> pair. More...
class  Factory
 Factory is used to store objects to create new instances. More...
class  FactoryBase
 A class one may inherit from to ensure that the responsibilities of being incorporated into an EMAN2::Factory are met. More...
class  EMUtil
struct  ImageScore
class  ImageSort
class  E2Exception
 E2Exception class is the parent class of all EMAN2 E2Exceptions. More...
class  _NotExistingObjectException
 Used when an object type, like an EMObject type, doesn't exist. More...
class  _ImageFormatException
 Used when an image is not in the expected format. More...
class  _ImageDimensionException
 Used when an image is not in the expected dimension. More...
class  _FileAccessException
 Used when a file access error occurs. More...
class  _ImageReadException
 Used when an error occurs at image reading time. More...
class  _ImageWriteException
 Used when an error occurs at image writing time. More...
class  _NullPointerException
 Used when a NULL is given to a pointer that should not be NULL. More...
class  _TypeException
 Used when a type cast error occurs. More...
class  _InvalidValueException
 Used when an invalid integer value is given. More...
class  _InvalidStringException
 Used when an invalid (format) string is given. More...
class  _OutofRangeException
 Used when the given value is out of range. More...
class  _InvalidCallException
class  _InvalidParameterException
class  _EmptyContainerException
 Used when an argument container is empty, such as a vector. More...
class  _BadAllocException
 Used when memory allocation goes wrong... More...
class  _UnexpectedBehaviorException
 Used when internal behavior is unexpected A generic kind of exception. More...
class  FitsIO
 MRC file = header + data (nx x ny x nz). More...
class  Gatan2IO
 Gatan2 Image file = header + data. More...
class  IntSize
 IntSize is used to describe a 1D, 2D or 3D rectangular size in integers. More...
class  FloatSize
 FloatSize is used to describe a 1D, 2D or 3D rectangular size in floating numbers. More...
class  IntPoint
 IntPoint defines an integer-coordinate point in a 1D/2D/3D space. More...
class  FloatPoint
 FloatPoint defines a float-coordinate point in a 1D/2D/3D space. More...
class  Pixel
 Pixel describes a 3D pixel's coordinates and its intensity value. More...
class  Region
 Region defines a 2D or 3D rectangular region specified by its origin coordinates and all edges' sizes. More...
class  GLUtil
class  PriorityQueue
 Template class for a priority queue. More...
class  IcosIO
 ICOS file = header + data. More...
class  ImageIO
 ImageIO classes are designed for reading/writing various electron micrography image formats, including MRC, IMAGIC, SPIDER, PIF, etc. More...
class  ImagicIO
 IMAGIC-5 Header File Format. More...
class  ImagicIO2
 IMAGIC-5 Header File Format. More...
class  Interp
 Interp defines the interpolation function used to generate a e^-x^4 function in real space. More...
class  Isosurface
class  Log
 Log defines a way to output logging information. More...
class  LstFastIO
 A LSX file is a high performance ASCII file that contains a list of image numbers and file names. More...
class  LstIO
 A LST file is an ASCII file that contains a list of image file names. More...
class  CustomVector
 CustomVector has some trivial optimizations of the STL vector. More...
class  ColorRGBGenerator
 Class to encapsulate an RGB color generator for marching cubes isosurface generator For now you can only color by radius, but in the near future you will be able to color by map, etc. More...
class  MarchingCubes
class  U3DWriter
 Most commonly used constructor calls set_data(em) More...
class  MrcIO
 MRC file = header + data (nx x ny x nz). More...
class  OmapIO
 DSN6 MAP is composed of a series of records which are all 512 bytes long. More...
class  PDBReader
 PointArray defines a double array of points with values in a 3D space. More...
class  PgmIO
 A PGM file = header + data. More...
class  PifIO
 PIF(Portable Image Format for EM Data) is an image format from Purdue University. More...
class  XYZAligner
 XYZAligner is an aligner template for defining new aligners. More...
class  XYZAverager
 XYZAverager is an averager template for defining new averagers. More...
class  XYZCmp
 XYZCmp is a cmp template for defining new cmps. More...
class  XYZIO
 XYZIO is a sample Image IO class. More...
class  XYZProcessor
 XYZProcessor is a processor template for defining new processors. More...
class  XYZProjector
 XYZProjector is an projector template for defining new projectors. More...
class  XYZReconstructor
 XYZReconstructor is a reconstructor template for defining new reconstructors. More...
class  PointArray
 PointArray defines a double array of points with values in a 3D space. More...
class  UnevenMatrix
 a general data structure for a matrix with variable x dim size for different y More...
class  PolarData
 a specialized image class for storing the results of a transform from EMData to polar coordinates, currently support 2D only. More...
class  Processor
 Typical usage of Processors are as follows: More...
class  ImageProcessor
class  FourierProcessor
 base class for Fourier filters More...
class  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  SNREvalProcessor
 Evaluate individual particle images using a tenchique similar to that used for CTF evaluation. More...
class  Axis0FourierProcessor
 Zeroes the values on the X=0 and y=0 Fourier axes (except x=y=0) More...
class  AmpweightFourierProcessor
 Multiplies each Fourier pixel by its amplitude. More...
class  ConvolutionProcessor
 This processor performs fast convolution in Fourier space. More...
class  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  YGradientProcessor
class  ZGradientProcessor
class  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  DistanceSegmentProcessor
 Segment a volume about:homeinto subvolumes based on a center separation value. More...
class  KmeansSegmentProcessor
 Segment a volume into ~n subvolumes using K-means classification. More...
class  CtfSimProcessor
 CTF simulation processor. More...
class  Wiener2DFourierProcessor
 Wiener filter based on a Ctf object either in the image header. More...
class  LinearRampFourierProcessor
class  LowpassRandomPhaseProcessor
 Lowpass Phase Randomization processor applied in Fourier space. More...
class  LowpassAutoBProcessor
 processor radial function: if lowpass > 0, f(x) = exp(-x*x/(lowpass*lowpass)); else f(x) = exp(x*x/(lowpass*lowpass)) More...
class  HighpassAutoPeakProcessor
 This processor attempts to remove the low resolution peak present in all cryoEM data. More...
class  LinearRampProcessor
 processor radial function: f(x) = slope * x + intercept More...
class  LoGFourierProcessor
 processor radial function: f(x) = ((x^2 - s^2)/s^4)e^-(x^2/2s^2) More...
class  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  RealPixelProcessor
 The base class for real space processor working on individual pixels. More...
class  AbsoluateValueProcessor
 f(x) = |x| More...
class  FloorValueProcessor
 f(x) = floor(x) More...
class  BooleanProcessor
 f(x) = 0 if x = 0; f(x) = 1 if x != 0 More...
class  RecipCarefullyProcessor
 Reciprocal image as if f(x) != 0: f(x) = 1/f(x) else: f(x) = zero_to. More...
class  ValuePowProcessor
 Do a math power operation on image, f(x) = x ^ pow;. More...
class  ValueSquaredProcessor
 Do a square operation on image, f(x) = x * x;. More...
class  ValueSqrtProcessor
 f(x) = sqrt(x) More...
class  ToZeroProcessor
 f(x) = x if x >= minval; f(x) = 0 if x < minval More...
class  AboveToZeroProcessor
 f(x) = x if x <= maxval; f(x) = 0 if x > maxval More...
class  AddShapeProcessor
 Rotate by 180 using pixel swapping, works for 2D only. More...
class  Rotate180Processor
 Rotate by 180 using pixel swapping, works for 2D only. More...
class  TransformProcessor
 Transform the image using a Transform object. More...
class  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  ApplySymProcessor
 Applies a symmetry to a 3D model. More...
class  ScaleTransformProcessor
 Scale the image with control over the output dimensions. More...
class  ClampingProcessor
 f(x) = maxval if f(x) > maxval; f(x) = minval if f(x) < minval More...
class  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  ToMinvalProcessor
 f(x) = x if x >= minval; f(x) = minval if x < minval More...
class  CutToZeroProcessor
 f(x) = x-minval if x >= minval; f(x) = 0 if x < minval More...
class  BinarizeProcessor
 f(x) = 0 if x < value; f(x) = 1 if x >= value. More...
class  BinarizeFourierProcessor
 A thresholding processor for Fourier images based on the amplitude component. More...
class  CollapseProcessor
 f(x): if v-r<x<v+r -> v; if x>v+r -> x-r; if x<v-r -> x+r More...
class  LinearXformProcessor
 linear transform processor: f(x) = x * scale + shift More...
class  ExpProcessor
 f(x) = exp( x / low - high) More...
class  FiniteProcessor
 f(x) = f(x) if f(x) is finite | to if f(x) is not finite More...
class  RangeThresholdProcessor
 f(x) = 1 if (low <= x <= high); else f(x) = 0 More...
class  SigmaProcessor
 f(x) = mean if x<(mean-v2*sigma) or x>(mean+v1*sigma); else f(x) = x; More...
class  LogProcessor
 f(x) = log10(x) if x > 0; else f(x) = 0 More...
class  CoordinateProcessor
 CoordinateProcessor applies processing based on a pixel's value and it coordinates. More...
class  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  MaskSharpProcessor
 step cutoff to a user-given value in both inner and outer circles. More...
class  MaskSoftProcessor
 step cutoff to a user-given value in both inner and outer circles. More...
class  MaskEdgeMeanProcessor
 A step cutoff to the the mean value in a ring centered on the outer radius. More...
class  MaskNoiseProcessor
 fills masked region More...
class  MaskGaussProcessor
 a gaussian falloff to zero, radius is the 1/e of the width. More...
class  MaskGaussNonuniformProcessor
 a gaussian falloff to zero, with nonisotropic widths along x,y,z More...
class  MaskGaussInvProcessor
 f(x) = f(x) / exp(-radius*radius * gauss_width / (ny*ny)) More...
class  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  MakeRadiusSquaredProcessor
 overwrites input, f(x) = radius * radius More...
class  MakeRadiusProcessor
 overwrites input, f(x) = radius More...
class  ComplexPixelProcessor
 The base class for fourier space processor working on individual pixels. More...
class  ComplexNormPixel
 Each Fourier pixel will be normalized. More...
class  AreaProcessor
 AreaProcessor use pixel values and coordinates of a real-space square area. More...
class  LaplacianProcessor
 Discrete approximation to Laplacian. More...
class  ZeroConstantProcessor
 Contraction of data, if any nearest neighbor is 0, value -> 0, generally used iteratively. More...
class  BoxStatProcessor
 BoxStatProcessor files are a kind of neighborhood processors. More...
class  BoxMedianProcessor
 A processor for noise reduction. More...
class  BoxSigmaProcessor
 pixel = standard deviation of values surrounding pixel. More...
class  BoxMaxProcessor
 peak processor: pixel = max of values surrounding pixel. More...
class  MinusPeakProcessor
 peak processor: pixel = pixel - max of values surrounding pixel. More...
class  PeakOnlyProcessor
 peak processor -> if npeaks or more surrounding values >= value, value->0 More...
class  DiffBlockProcessor
 averages over cal_half_width, then sets the value in a local block More...
class  CutoffBlockProcessor
 Block processor, val1 is dx/dy, val2 is lp freq cutoff in pixels. More...
class  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  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...
class  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...
class  MeanShrinkProcessor
 MeanShrinkProcessor shrinks an image by in an integer amount (and optionally by 1.5) taking the mean of the pixel neighbourhood. More...
class  MedianShrinkProcessor
 MeanShrinkProcessor shrinks an image by in an integer amount taking the median of the pixel neighbourhood. More...
class  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  GradientRemoverProcessor
 Gradient remover, does a rough plane fit to find linear gradients. More...
class  GradientPlaneRemoverProcessor
 Gradient removed by least square plane fit. More...
class  NonConvexProcessor
 Make a curve or surface non-convex (planar or concave), iteratively. More...
class  FlattenBackgroundProcessor
 Flattens the background by subtracting the local mean. More...
class  RampProcessor
 Ramp processor -- Fits a least-squares plane to the picture, and subtracts the plane from the picture. More...
class  VerticalStripeProcessor
 Tries to fix images scanned on the zeiss for poor ccd normalization. More...
class  RealToFFTProcessor
 This will replace the image with a full-circle 2D fft amplitude rendering. More...
class  SigmaZeroEdgeProcessor
 Fill zeroes at edges with nearest horizontal/vertical value. More...
class  BeamstopProcessor
 Try to eliminate beamstop in electron diffraction patterns. More...
class  MeanZeroEdgeProcessor
 Fill zeroes at edges with nearest horizontal/vertical value damped towards Mean2. More...
class  AverageXProcessor
 Average along Y and replace with average. More...
class  DecayEdgeProcessor
 Decay edges of image to zero. More...
class  ZeroEdgeRowProcessor
 zero edges of image on top and bottom, and on left and right. More...
class  ZeroEdgePlaneProcessor
 zero edges of volume on all sides More...
class  BilateralProcessor
 Bilateral processing on 2D or 3D volume data. More...
class  NormalizeProcessor
 Base class for normalization processors. More...
class  NormalizeUnitProcessor
 Normalize an image so its vector length is 1.0. More...
class  NormalizeUnitSumProcessor
 Normalize an image so its elements sum to 1.0 (fails if mean=0) More...
class  NormalizeStdProcessor
 do a standard normalization on an image. More...
class  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  NormalizeRampNormVar
 Normalize the image whilst also removing any ramps. More...
class  NormalizeByMassProcessor
 Normalize the mass of the image assuming a density of 1.35 g/ml (0.81 Da/A^3). More...
class  NormalizeEdgeMeanProcessor
 normalizes an image, mean value equals to edge mean. More...
class  NormalizeCircleMeanProcessor
 normalizes an image, mean value equals to mean of 2 pixel circular border. More...
class  NormalizeLREdgeMeanProcessor
 normalizes an image, uses 2 pixels on left and right edge More...
class  NormalizeMaxMinProcessor
 normalizes an image. More...
class  NormalizeRowProcessor
 normalizes each row in the image individually More...
class  SubtractOptProcessor
 Sorry for the pun. More...
class  NormalizeToLeastSquareProcessor
 use least square method to normalize More...
class  RotationalAverageProcessor
 makes image circularly symmetric. More...
class  RotationalSubstractProcessor
 subtracts circularly symmetric part of an image. More...
class  TransposeProcessor
 Transpose a 2D image. More...
class  FlipProcessor
 flip an image around an axis More...
class  AddNoiseProcessor
 add noise to an image More...
class  AddSigmaNoiseProcessor
 add sigma noise, multiply image's sigma value to noise More...
class  AddRandomNoiseProcessor
 add spectral noise to a complex image More...
class  FourierToCornerProcessor
 Undo the effects of the FourierToCenterProcessor. More...
class  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  Phase180Processor
 This class is abstract. More...
class  PhaseToCenterProcessor
 Translates a cornered image to the center Undoes the PhaseToCornerProcessor. More...
class  PhaseToCornerProcessor
 Translates a centered image to the corner works for 1D, 2D and 3D images, for all combinations of even and oddness. More...
class  AutoMask2DProcessor
 Attempts to automatically mask out the particle, excluding other particles in the box, etc. More...
class  AutoMaskAsymUnit
 Tries to mask out only interesting density. More...
class  AutoMaskDustProcessor
 A "dust removal" filter which will remove above threshold densities smaller than a given size. More...
class  AutoMask3DProcessor
 Tries to mask out only interesting density. More...
class  AutoMask3D2Processor
 Tries to mask out only interesting density. More...
class  IterMultiMaskProcessor
 This expands a multilevel mask volume so inter-mask boundaries are preserved. More...
class  AddMaskShellProcessor
 Add additional shells/rings to an existing 1/0 mask image. More...
class  PhaseToMassCenterProcessor
 ToMassCenterProcessor centers image at center of mass, ignores old dx, dy. More...
class  ToMassCenterProcessor
 ToMassCenterProcessor centers image at center of mass, ignores old dx, dy. More...
class  ACFCenterProcessor
 Center image using auto convolution with 180 degree rotation. More...
class  FSCFourierProcessor
 This processor will apply a Wiener filter to a volume based on a provided FSC curve. More...
class  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  FileFourierProcessor
 A fourier processor specified in a 2 column text file. More...
class  SymSearchProcessor
 Identifiy the best symmetry in the given symmetry list for each pixel and then apply the best symmetry to each pixel. More...
class  StripeXYProcessor
 This processor will remove localized 'striping' along the x/y axes, caused by issues with CCD/CMOS readout. More...
class  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  IndexMaskFileProcessor
 Multiplies the image by the specified file using pixel indices. More...
class  CoordinateMaskFileProcessor
 Multiplies the image by the specified file using pixel coordinates instead of pixel indices. More...
class  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  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  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  BinaryOperateProcessor
 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  MaxPixelOperator
class  MinPixelOperator
class  MatchSFProcessor
 Sets the structure factor To match a second provided image/volume. More...
class  SetSFProcessor
 Sets the structure factor based on a 1D s/intensity curve as an XYData object. More...
class  SmartMaskProcessor
 Smart mask processor. More...
class  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  TestImageProcessor
 Base class for a group of 'processor' used to create test image. More...
class  TestImagePureGaussian
 Replace a source image as a strict Gaussian. More...
class  TestImageFourierNoiseGaussian
 Replace a source image as a strict Gaussian. More...
class  TestImageFourierNoiseProfile
class  CTFSNRWeightProcessor
class  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  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  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  TestImageAxes
 Make an image consisting of a single cross, with lines going in the axial directions, intersecting at the origin. More...
class  TestImageGaussian
 Replace a source image as a Gaussian Blob. More...
class  TestImageScurve
 Replace a source image with a lumpy S-curve used for alignment testing. More...
class  TestImageSphericalWave
 Replace a source image as a sine wave in specified wave length. More...
class  TestImageSinewave
 Replace a source image as a sine wave in specified wave length. More...
class  TestImageSinewaveCircular
 Replace a source image as a circular sine wave in specified wave length. More...
class  TestImageSquarecube
 Replace a source image as a square or cube depends on 2D or 3D of the source image. More...
class  TestImageEllipse
 Generate an ellipse or ellipsoid image. More...
class  TestImageHollowEllipse
 Generate an ellipse/ellipsoid image with an inner hollow ellipse/ellipsoid. More...
class  TestImageCirclesphere
 Replace a source image as a circle or sphere depends on 2D or 3D of the source image. More...
class  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  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  TestImageCylinder
 Replace a source image with a cylinder. More...
class  CCDNormProcessor
 Try to normalize the 4 quadrants of a CCD image. More...
class  WaveletProcessor
 Perform a Wavelet transform using GSL. More...
class  TomoTiltEdgeMaskProcessor
 A processor designed specifically for tomographic tilt series data. More...
class  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  FFTProcessor
 Perform a FFT transform by calling EMData::do_fft() and EMData::do_ift() More...
class  RadialProcessor
 Perform a multiplication of real image with a radial table. More...
class  HistogramBin
 Bins pixel values, similar to calculating a histogram. More...
class  ModelHelixProcessor
class  ModelEMCylinderProcessor
class  ApplyPolynomialProfileToHelix
class  BinarySkeletonizerProcessor
class  ConvolutionKernelProcessor
class  RotateInFSProcessor
class  Projector
 Projector class defines a method to generate 2D projections from a 3D model. More...
class  GaussFFTProjector
 Gaussian FFT 3D projection. More...
class  FourierGriddingProjector
 Fourier gridding projection routine. More...
class  PawelProjector
 Pawel Penczek's optimized projection routine. More...
class  MaxValProjector
 Real-space projection which computes the maximum value along each line projection rather than a sum. More...
class  StandardProjector
 Fast real-space 3D projection. More...
class  ChaoProjector
 Fast real space projection using Bi-Linear interpolation. More...
class  Quaternion
 Quaternion is used in Rotation and Transformation to replace Euler angles. More...
class  Randnum
 The wrapper class for gsl's random number generater. More...
class  Reconstructor
 Reconstructor class defines a way to do 3D recontruction. More...
class  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  FourierReconstructorSimple2D
 This class originally added for 2D experimentation and prototying. More...
class  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  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  FourierPlaneReconstructor
 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  BackProjectionReconstructor
 Real space 3D reconstruction using back projection. More...
class  nn4Reconstructor
class  nn4_rectReconstructor
 Direct Fourier inversion Reconstructor for extremly rectangular object. More...
class  nnSSNR_Reconstructor
class  nn4_ctfReconstructor
 nn4_ctf Direct Fourier Inversion Reconstructor More...
class  nn4_ctfwReconstructor
 nn4_ctfw Direct Fourier Weighted Inversion Reconstructor More...
class  nn4_ctf_rectReconstructor
 nn4_ctf_rectDirect Fourier Inversion Reconstructor More...
class  nnSSNR_ctfReconstructor
struct  point_t
class  newfile_store
class  file_store
class  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  FourierInserter3DMode1
 FourierPixelInserter3DMode1 - encapsulates "method 1" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  FourierInserter3DMode2
 FourierPixelInserter3DMode2 - encapsulates "method 2" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  FourierInserter3DMode3
 FourierPixelInserter3DMode3 - encapsulates "method 3" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  FourierInserter3DMode5
 FourierPixelInserter3DMode5 - encapsulates "method 5" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  FourierInserter3DMode6
 FourierPixelInserter3DMode6 - encapsulates "method 6" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  FourierInserter3DMode7
 FourierPixelInserter3DMode7 - encapsulates "method 7" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  FourierInserter3DMode8
 FourierPixelInserter3DMode8 - encapsulates "method 8" for inserting a 2D Fourier slice into a 3D volume See comments in FourierPixelInserter3D for explanations. More...
class  SalIO
 A SAL image is an image from Perkin Elmer PDS Microdensitometer. More...
class  SerIO
 SER (Series File Format) is a file format created by Dr. More...
class  SitusIO
 situs is a a Situs-specific format on a cubic lattice. More...
class  PCAsmall
 Principal component analysis. More...
class  PCAlarge
class  varimax
class  EMArray
 EMArray -- 1-, 2-, or 3-D array of types T. More...
class  PCA
class  MirrorProcessor
 mirror an image More...
class  NewFourierProcessor
 Base class for Fourier processors. More...
class  NewLowpassTopHatProcessor
 Lowpass top-hat filter processor applied in Fourier space. More...
class  NewHighpassTopHatProcessor
 Highpass top-hat filter applied in Fourier NewLowpassGaussProcessorspace. More...
class  NewBandpassTopHatProcessor
 Bandpass top-hat filter processor applied in Fourier space. More...
class  NewHomomorphicTopHatProcessor
 Homomorphic top-hat filter processor applied in Fourier space. More...
class  NewLowpassGaussProcessor
 Lowpass Gauss filter processor applied in Fourier space. More...
class  NewHighpassGaussProcessor
 Highpass Gauss filter processor applied in Fourier space. More...
class  NewBandpassGaussProcessor
 Bandpass Gauss filter processor applied in Fourier space. More...
class  NewHomomorphicGaussProcessor
 Homomorphic Gauss filter processor applied in Fourier space. More...
class  NewInverseGaussProcessor
 Divide by a Gaussian in Fourier space. More...
class  SHIFTProcessor
 Shift by phase multiplication in Fourier space. More...
class  InverseKaiserI0Processor
 Divide by a Kaiser-Bessel I0 func in Fourier space. More...
class  InverseKaiserSinhProcessor
 Divide by a Kaiser-Bessel Sinh func in Fourier space. More...
class  NewRadialTableProcessor
 Filter with tabulated data in Fourier space. More...
class  NewLowpassButterworthProcessor
 Lowpass Butterworth filter processor applied in Fourier space. More...
class  NewHighpassButterworthProcessor
 Highpass Butterworth filter processor applied in Fourier space. More...
class  NewHomomorphicButterworthProcessor
 Homomorphic Butterworth filter processor applied in Fourier space. More...
class  NewLowpassTanhProcessor
 Lowpass tanh filter processor applied in Fourier space. More...
class  NewHighpassTanhProcessor
 Highpass tanh filter processor applied in Fourier space. More...
class  NewHomomorphicTanhProcessor
 Homomorphic Tanh processor applied in Fourier space. More...
class  NewBandpassTanhProcessor
 Bandpass tanh processor applied in Fourier space. More...
class  CTF_Processor
class  SpiderIO
 SPIDER: (System for Processing Image Data from Electron microscopy and Related fields) is an image processing system for electron microscopy. More...
class  SingleSpiderIO
 Single Spider Image I/O class. More...
class  Symmetry3D
 Symmetry3D - A base class for 3D Symmetry objects. More...
class  CSym
 An encapsulation of cyclic 3D symmetry. More...
class  DSym
 An encapsulation of dihedral 3D symmetry. More...
class  HSym
 An encapsulation of helical 3D symmetry. More...
class  PlatonicSym
 A base (or parent) class for the Platonic symmetries. More...
class  TetrahedralSym
 An encapsulation of tetrahedral symmetry Doctor Phil has this to say about tetrahedral symmetry: " Each Platonic Solid has 2E symmetry elements. More...
class  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  IcosahedralSym
 An encapsulation of icosahedral symmetry Doctor Phil has this to say about icosahedral symmetry: "Each Platonic Solid has 2E symmetry elements. More...
class  Icosahedral2Sym
 An encapsulation of icosahedral symmetry 222. More...
class  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  EmanOrientationGenerator
 EmanOrientationGenerator generates orientations quasi-evenly distributed in the asymmetric unit. More...
class  RandomOrientationGenerator
 Random Orientation Generator - carefully generates uniformly random orientations in any asymmetric unit. More...
class  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  SaffOrientationGenerator
 Saff orientation generator - based on the work of Saff and Kuijlaars, 1997 E.B. More...
class  OptimumOrientationGenerator
 Optimum orientation generator. More...
class  TestUtil
class  Transform
 A Transform object is a somewhat specialized object designed specifically for EMAN2/Sparx storage of alignment parameters and euler orientations. More...
class  Util
 Util is a collection of utility functions. More...
class  V4L2IO
 Read-only. More...
class  Vec4
 The Vec4 object is a templated object, intended to instantiated with basic types such as int, float, double etc. More...
class  Vec3
 The Vec3 object is a templated object, intended to instantiated with basic types such as int, float, double etc. More...
class  Vec2
 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  ScreenVector
class  ScreenPoint
class  Vector3
class  Point3
class  Matrix3
class  Vector4
class  Matrix4
class  VtkIO
 VtkIO reads/writes VTK image file. More...
class  XplorIO
 XPLOR image format is in ASCII: More...
class  XYData
 XYData defines a 1D (x,y) data set. More...

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 Vec4< float > Vec4f
typedef Vec4< int > Vec4i
typedef Vec4< double > Vec4d
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 }

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 myflag, fp_type mytype, 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)
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

static 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.

$Id$

E2Exception class.

Id:
aligner.h,v 1.130 2013/02/06 21:02:20 stevel Exp
Id:
amiraio.h,v 1.14 2009/05/15 23:30:13 gtang Exp
Id:
byteorder.h,v 1.18 2008/09/08 22:56:36 gtang Exp
Id:
cmp.h,v 1.73 2014/10/12 17:34:11 stevel Exp
Id:
df3io.h,v 1.1 2010/08/11 19:44:58 gtang Exp

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.

Id:
dm4io.h,v 1.5 2014/02/26 23:09:29 vern Exp
Id:
emio.h,v 1.17 2008/03/24 01:22:22 gtang Exp

E2Exception class is a subclass of std::exception; All EMAN2 exception classes are subclass of E2Exception class.

A XYZ Exception class is defined in the following way: 0) It will extend E2Exception class. 1) The class is named _XYZException. 2) The class has a function to return its name "XYZException". 3) A macro called "XYZException" is defined to simplify the usage of _XYZException class. So that filename, function name, and line number can be handled automatically.

How to use XYZException:

1) To throw exception, use "throw XYZException(...)"; 2) To catch exception, use "catch (_XYZException & e) ...".

Id:
fitsio.h,v 1.3 2008/03/24 01:22:22 gtang Exp
Id:
gatan2io.h,v 1.14 2008/03/24 01:22:22 gtang Exp
Id:
icosio.h,v 1.15 2008/03/24 01:22:22 gtang Exp
Id:
imagicio.h,v 1.22 2008/11/05 00:06:03 gtang Exp
Id:
imagicio2.h,v 1.2 2011/03/02 21:52:05 gtang Exp
Id:
interp.h,v 1.11 2006/10/31 21:20:29 gtang Exp
Id:
isosurface.h,v 1.13 2011/12/27 19:27:51 john Exp
Id:
lstfastio.h,v 1.3 2008/03/24 01:22:22 gtang Exp
Id:
lstio.h,v 1.15 2008/03/24 01:22:22 gtang Exp
Id:
mrcio.h,v 1.35 2014/08/14 23:30:04 vern Exp
Id:
omapio.h,v 1.2 2012/03/06 15:47:25 gtang Exp
Id:
pdbreader.h,v 1.4 2009/08/04 19:17:02 muthu Exp
Id:
pgmio.h,v 1.16 2008/03/24 01:22:22 gtang Exp
Id:
pifio.h,v 1.18 2012/10/09 01:09:11 stevel Exp
Id:
pointarray.h,v 1.42 2014/07/08 15:48:26 muyuanc Exp
Id:
quaternion.h,v 1.9 2008/03/24 01:22:22 gtang Exp
Id:
randnum.h,v 1.11 2012/05/24 21:51:55 gtang Exp
Id:
salio.h,v 1.13 2008/03/24 01:22:22 gtang Exp
Id:
serio.h,v 1.2 2012/07/27 20:24:07 gtang Exp
Id:
situsio.h,v 1.1 2011/07/26 16:36:55 gtang Exp
Id:
processor_sparx.h,v 1.32 2012/04/20 17:45:32 john Exp
Id:
spiderio.h,v 1.27 2008/05/28 00:15:19 gtang Exp
Id:
sspiderio.h,v 1.18 2008/03/24 01:22:22 gtang Exp
Id:
transform.h,v 1.180 2012/12/12 21:33:32 cailin Exp
Id:
v4l2io.h,v 1.9 2008/03/24 01:22:22 gtang Exp
Id:
vtkio.h,v 1.16 2008/03/24 01:22:22 gtang Exp
Id:
xplorio.h,v 1.17 2008/03/24 01:22:22 gtang Exp

Typedef Documentation

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

Definition at line 73 of file emdata.h.

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

Definition at line 76 of file emdata.h.

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

Definition at line 77 of file emdata.h.

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

Definition at line 78 of file emdata.h.

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

Definition at line 79 of file emdata.h.

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

Definition at line 80 of file emdata.h.

typedef Vec2<double> EMAN::Vec2d

Definition at line 1077 of file vec3.h.

typedef Vec2<float> EMAN::Vec2f

Definition at line 1075 of file vec3.h.

typedef Vec2<int> EMAN::Vec2i

Definition at line 1076 of file vec3.h.

typedef Vec3<double> EMAN::Vec3d

Definition at line 699 of file vec3.h.

typedef Vec3<float> EMAN::Vec3f

Definition at line 697 of file vec3.h.

typedef Vec3<int> EMAN::Vec3i

Definition at line 698 of file vec3.h.

typedef Vec4<double> EMAN::Vec4d

Definition at line 258 of file vec3.h.

typedef Vec4<float> EMAN::Vec4f

Definition at line 256 of file vec3.h.

typedef Vec4<int> EMAN::Vec4i

Definition at line 257 of file vec3.h.


Enumeration Type Documentation

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.

Enumerator:
CIRCULANT 
CIRCULANT_NORMALIZED 
PADDED 
PADDED_NORMALIZED 
PADDED_LAG 
PADDED_NORMALIZED_LAG 

Definition at line 66 of file fundamentals.h.

Enumerator:
CORRELATION 
CONVOLUTION 
SELF_CORRELATION 
AUTOCORRELATION 

Definition at line 76 of file fundamentals.h.

Enumerator:
NORMAL 
ICOS2F_FIRST_OCTANT 
ICOS2F_FULL 
ICOS2F_HALF 
ICOS3F_HALF 
ICOS3F_FULL 
ICOS5F_HALF 
ICOS5F_FULL 
ICOS_UNKNOWN 

Definition at line 98 of file emobject.h.


Function Documentation

EMData* EMAN::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]fImage object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in]myflagProcessing flag (see above).
[in]center
Returns:
Real-space autocorrelation image.

Definition at line 187 of file fundamentals.h.

References AUTOCORRELATION, and fourierproduct().

                                                                               {
                return fourierproduct(f, NULL, myflag, AUTOCORRELATION, center);
        }
EMData* EMAN::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]fFirst 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]gSecond 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]myflagProcessing 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().

                                                                                      {
                return fourierproduct(f, g, myflag, CONVOLUTION, center);
        }
EMData* EMAN::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]fFirst 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]gSecond 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]myflagProcessing 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(), and EMAN::Util::constrained_helix_exhaustive().

                                                                                      {
                return fourierproduct(f, g, myflag, CORRELATION, center);
        }
Vector3 EMAN::cross ( const Vector3 &  w,
const Vector3 &  v 
) [inline]

Definition at line 313 of file vecmath.h.

References v.

Referenced by EMAN::PointArray::remove_helix_from_map().

                                                                   {
            return w ^ v;
        }
double EMAN::dot ( const Vector3 &  w,
const Vector3 &  v 
) [inline]
void EMAN::dump_aligners ( )

Definition at line 3670 of file aligner.cpp.

{
        dump_factory < Aligner > ();
}
map< string, vector< string > > EMAN::dump_aligners_list ( )

Definition at line 3675 of file aligner.cpp.

{
        return dump_factory_list < Aligner > ();
}
void EMAN::dump_analyzers ( )

Definition at line 903 of file analyzer.cpp.

{
        dump_factory < Analyzer > ();
}
map< string, vector< string > > EMAN::dump_analyzers_list ( )

Definition at line 908 of file analyzer.cpp.

{
        return dump_factory_list < Analyzer > ();
}
void EMAN::dump_averagers ( )

Definition at line 1073 of file averager.cpp.

{
        dump_factory < Averager > ();
}
map< string, vector< string > > EMAN::dump_averagers_list ( )

Definition at line 1078 of file averager.cpp.

{
        return dump_factory_list < Averager > ();
}
void EMAN::dump_cmps ( )

Definition at line 1473 of file cmp.cpp.

{
        dump_factory < Cmp > ();
}
map< string, vector< string > > EMAN::dump_cmps_list ( )

Definition at line 1478 of file cmp.cpp.

{
        return dump_factory_list < Cmp > ();
}
template<class T >
void EMAN::dump_factory ( )

Definition at line 849 of file emobject.h.

        {
                vector < string > item_names = Factory < T >::get_list();

                for (size_t i = 0; i < item_names.size(); i++) {
                        T *item = Factory < T >::get(item_names[i]);
                        printf("%s :  %s\n", item->get_name().c_str(),item->get_desc().c_str());
                        TypeDict td = item->get_param_types();
                        td.dump();
                }
        }
template<class T >
map<string, vector<string> > EMAN::dump_factory_list ( )

Definition at line 861 of file emobject.h.

References EMAN::Factory< T >::get(), EMAN::TypeDict::get_desc(), EMAN::TypeDict::get_type(), EMAN::TypeDict::keys(), and EMAN::TypeDict::size().

        {
                vector < string > item_names = Factory < T >::get_list();
                map<string, vector<string> >    factory_list;

                typename vector<string>::const_iterator p;
                for(p = item_names.begin(); p !=item_names.end(); ++p) {
                        T *item = Factory<T>::get(*p);

                        string name = item->get_name();

                        vector<string> content;
                        content.push_back(item->get_desc());
                        TypeDict td = item->get_param_types();
                        vector<string> keys = td.keys();
                        for(unsigned int i=0; i<td.size(); ++i) {
                                content.push_back(keys[i]);
                                content.push_back( td.get_type(keys[i]) );
                                content.push_back( td.get_desc(keys[i]) );
                        }
                        factory_list[name] = content;
                }

                return factory_list;
        }
void EMAN::dump_orientgens ( )

Dumps useful information about the OrientationGenerator factory.

Definition at line 155 of file symmetry.cpp.

{
        dump_factory < OrientationGenerator > ();
}
map< string, vector< string > > EMAN::dump_orientgens_list ( )

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

Definition at line 160 of file symmetry.cpp.

{
        return dump_factory_list < OrientationGenerator > ();
}
void EMAN::dump_processors ( )

Definition at line 10395 of file processor.cpp.

{
        dump_factory < Processor > ();
}
map< string, vector< string > > EMAN::dump_processors_list ( )

Definition at line 10400 of file processor.cpp.

{
        return dump_factory_list < Processor > ();
}
void EMAN::dump_projectors ( )

Definition at line 2127 of file projector.cpp.

{
        dump_factory < Projector > ();
}
map< string, vector< string > > EMAN::dump_projectors_list ( )

Definition at line 2132 of file projector.cpp.

{
        return dump_factory_list < Projector > ();
}
void EMAN::dump_reconstructors ( )

Definition at line 4382 of file reconstructor.cpp.

{
        dump_factory < Reconstructor > ();
}
map< string, vector< string > > EMAN::dump_reconstructors_list ( )

Definition at line 4387 of file reconstructor.cpp.

{
        return dump_factory_list < Reconstructor > ();
}
void EMAN::dump_symmetries ( )

dump symmetries, useful for obtaining symmetry information

Definition at line 64 of file symmetry.cpp.

{
        dump_factory < Symmetry3D > ();
}
map< string, vector< string > > EMAN::dump_symmetries_list ( )

dump_symmetries_list, useful for obtaining symmetry information

Definition at line 69 of file symmetry.cpp.

{
        return dump_factory_list < Symmetry3D > ();
}
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().

                                                                        {

                int nxf = f->get_xsize();
                int nyf = f->get_ysize(); 
                int nzf = f->get_zsize();

                int nxk = K->get_xsize();
                int nyk = K->get_ysize();
                int nzk = K->get_zsize();
        
                if ( nxf < nxk && nyf < nyk && nzf < nzk ) {
                        // whoops, f smaller than K
                        swap(f,K); swap(nxf,nxk); swap(nyf,nyk); swap(nzf,nzk);
                } else if ( nxk > nxf || nyk > nyf || nzk > nzf ) {
                        // Incommensurate sizes
                        throw ImageDimensionException("Two input images are incommensurate.");
                }

                if ( nxk % 2 != 1 || nyk % 2 != 1 || nzk % 2 != 1 ) {
                        // Kernel needs to be odd in size
                        throw ImageDimensionException("Kernel should have odd nx,ny,nz so that the center is well-defined.");
                }

                int nxk2 = (nxk-1)/2;
                int nyk2 = (nyk-1)/2;
                int nzk2 = (nzk-1)/2;

                if ( mydilation == BINARY ) {
                        // Check whether two images are truly binary.
                        for (int iz = 0; iz <= nzf-1; iz++) {
                                for (int iy = 0; iy <= nyf-1; iy++) {
                                        for (int ix = 0; ix <= nxf-1; ix++) {
                                                int fxyz=(int)(*f)(ix,iy,iz);
                                                if ( fxyz != 0 && fxyz != 1 ) {
                                                        throw ImageDimensionException("One of the two images is not binary.");
                                                }
                                        }
                                }
                        }
                        for (int iz = 0; iz <= nzk-1; iz++) {
                                for (int iy = 0; iy <= nyk-1; iy++) {
                                        for (int ix = 0; ix <= nxk-1; ix++) {
                                                int kxyz=(int)(*K)(ix,iy,iz);
                                                if ( kxyz != 0 && kxyz != 1 ) {
                                                        throw ImageDimensionException("One of the two images is not binary.");
                                                }
                                        }
                                }
                        }
                }

                EMData* result = new EMData();
                result->set_size(nxf, nyf, nzf);
                result->to_zero();

                for (int iz = 0; iz <= nzf-1; iz++) {
                        for (int iy = 0; iy <= nyf-1; iy++) {
                                for (int ix = 0; ix <= nxf-1; ix++) {
//                                      int kzmin = iz-nzk2 < 0     ?   0   : iz-nzk2 ;
//                                      int kzmax = iz+nzk2 > nzf-1 ? nzf-1 : iz+nzk2 ;
//                                      int kymin = iy-nyk2 < 0     ?   0   : iy-nyk2 ;
//                                      int kymax = iy+nyk2 > nyf-1 ? nyf-1 : iy+nyk2 ;
//                                      int kxmin = ix-nxk2 < 0     ?   0   : ix-nxk2 ;
//                                      int kxmax = ix+nxk2 > nxf-1 ? nxf-1 : ix+nxk2 ;
                                        if ( mydilation == BINARY ) {
                                                int fxyz = (int)(*f)(ix,iy,iz);
                                                if ( fxyz == 1 ) {
                                                        for (int jz = -nzk2; jz <= nzk2; jz++) {
                                                                for (int jy = -nyk2; jy <= nyk2; jy++) {
                                                                        for (int jx= -nxk2; jx <= nxk2; jx++) {
                                                                                if ( (int)(*K)(jx+nxk2,jy+nyk2,jz+nzk2) == 1 ) {
                                                                                        int fz = iz+jz;
                                                                                        int fy = iy+jy;
                                                                                        int fx = ix+jx;
                                                                                        if ( fz >= 0 && fz <= nzf-1 && fy >= 0 && fy <= nyf-1 && fx >= 0 && fx <= nxf-1 )
                                                                                                (*result)(fx,fy,fz) = 1;
                                                                                        }
                                                                                }
                                                                        }
                                                                }
                                                        }
                                        } else if ( mydilation == GRAYLEVEL ) {
                                                        float pmax = (*f)(ix,iy,iz)+(*K)(nxk2,nyk2,nzk2); 
                                                        for (int jz = -nzk2; jz <= nzk2; jz++) {
                                                                for (int jy = -nyk2; jy <= nyk2; jy++) {
                                                                        for (int jx = -nxk2; jx <= nxk2; jx++) {
                                                                                int fz = iz+jz;
                                                                                int fy = iy+jy;
                                                                                int fx = ix+jx;
                                                                                if ( fz >= 0 && fz <= nzf-1 && fy >= 0 && fy <= nyf-1 && fx >= 0 && fx <= nxf-1 ) {
                                                                                        float kxyz = (*K)(jx+nxk2,jy+nyk2,jz+nzk2);
                                                                                        float fxyz = (*f)(fx,fy,fz);                                                                                    
                                                                                        if ( kxyz+fxyz > pmax )  pmax = kxyz+fxyz;
                                                                                }
                                                                        }
                                                                }
                                                        }
                                                        (*result)(ix,iy,iz) = pmax;
                                        } else {
                                                throw ImageDimensionException("Illegal dilation type!");
                                        }
                                }
                        }
                }               
                return result;
    }
EMData* EMAN::filt_erosion_ ( EMData f,
EMData K,
morph_type  myerosion 
)

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().

                                                                      {

                int nxf = f->get_xsize();
                int nyf = f->get_ysize(); 
                int nzf = f->get_zsize();

                int nxk = K->get_xsize();
                int nyk = K->get_ysize();
                int nzk = K->get_zsize();
        
                if ( nxf < nxk && nyf < nyk && nzf < nzk ) {
                        // whoops, f smaller than K
                        swap(f,K); swap(nxf,nxk); swap(nyf,nyk); swap(nzf,nzk);
                } else if ( nxk > nxf || nyk > nyf || nzk > nzf ) {
                        // Incommensurate sizes
                        throw ImageDimensionException("Two input images are incommensurate.");
                }

                if ( nxk % 2 != 1 || nyk % 2 != 1 || nzk % 2 != 1 ) {
                        // Kernel needs to be odd in size
                        throw ImageDimensionException("Kernel should have odd nx,ny,nz so that the center is well-defined.");
                }

                int nxk2 = (nxk-1)/2;
                int nyk2 = (nyk-1)/2;
                int nzk2 = (nzk-1)/2;

                if ( myerosion == BINARY ) {
                        // Check whether two images are truly binary.
                        for (int iz = 0; iz <= nzf-1; iz++) {
                                for (int iy = 0; iy <= nyf-1; iy++) {
                                        for (int ix = 0; ix <= nxf-1; ix++) {
                                                int fxyz=(int)(*f)(ix,iy,iz);
                                                if ( fxyz != 0 && fxyz != 1 ) {
                                                        throw ImageDimensionException("One of the two images is not binary.");
                                                }
                                        }
                                }
                        }
                        for (int iz = 0; iz <= nzk-1; iz++) {
                                for (int iy = 0; iy <= nyk-1; iy++) {
                                        for (int ix = 0; ix <= nxk-1; ix++) {
                                                int kxyz=(int)(*K)(ix,iy,iz);
                                                if ( kxyz != 0 && kxyz != 1 ) {
                                                        throw ImageDimensionException("One of the two images is not binary.");
                                                }
                                        }
                                }
                        }
                }

                EMData* result = new EMData();
                result->set_size(nxf, nyf, nzf);
                result->to_one();

                for (int iz = 0; iz <= nzf-1; iz++) {
                        for (int iy = 0; iy <= nyf-1; iy++) {
                                for (int ix = 0; ix <= nxf-1; ix++) {
                                        if ( myerosion == BINARY ) {
                                                int fxyz = (int)(*f)(ix,iy,iz);
                                                if ( fxyz == 0 ) {
                                                        for (int jz = -nzk2; jz <= nzk2; jz++) {
                                                                for (int jy = -nyk2; jy <= nyk2; jy++) {
                                                                        for (int jx= -nxk2; jx <= nxk2; jx++) {
                                                                                if ( (int)(*K)(jx+nxk2,jy+nyk2,jz+nzk2) == 1 ) {
                                                                                        int fz = iz+jz;
                                                                                        int fy = iy+jy;
                                                                                        int fx = ix+jx;
                                                                                        if ( fz >= 0 && fz <= nzf-1 && fy >= 0 && fy <= nyf-1 && fx >= 0 && fx <= nxf-1 )
                                                                                                (*result)(fx,fy,fz) = 0;
                                                                                        }
                                                                                }
                                                                        }
                                                                }
                                                        }
                                        } else if ( myerosion == GRAYLEVEL ) {
                                                        float pmin = (*f)(ix,iy,iz)-(*K)(nxk2,nyk2,nzk2); 
                                                        for (int jz = -nzk2; jz <= nzk2; jz++) {
                                                                for (int jy = -nyk2; jy <= nyk2; jy++) {
                                                                        for (int jx = -nxk2; jx <= nxk2; jx++) {
                                                                                int fz = iz+jz;
                                                                                int fy = iy+jy;
                                                                                int fx = ix+jx;
                                                                                if ( fz >= 0 && fz <= nzf-1 && fy >= 0 && fy <= nyf-1 && fx >= 0 && fx <= nxf-1 ) {
                                                                                        float kxyz = (*K)(jx+nxk2,jy+nyk2,jz+nzk2);
                                                                                        float fxyz = (*f)(fx,fy,fz);                                                                                    
                                                                                        if ( fxyz-kxyz < pmin )  pmin = fxyz-kxyz;
                                                                                }
                                                                        }
                                                                }
                                                        }
                                                        (*result)(ix,iy,iz) = pmin;
                                        } else {
                                                throw ImageDimensionException("Illegal dilation type!");
                                        }
                                }
                        }
                }               
                return result;
    }
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, EMAN::EMData::set_size(), and EMAN::EMData::to_zero().

                                                                                     {
                
                int nxf = f->get_xsize();
                int nyf = f->get_ysize(); 
                int nzf = f->get_zsize();
                
                if ( nxk > nxf || nyk > nyf || nzk > nzf ) {
                        // Kernel should be smaller than the size of image
                        throw ImageDimensionException("Kernel should be smaller than the size of image.");
                }       

                if ( nxk % 2 != 1 || nyk % 2 != 1 || nzk % 2 != 1 ) {
                        // Kernel needs to be odd in size
                        throw ImageDimensionException("Real-space kernel must have odd size so that the center is well-defined.");
                }

                if ( myshape == CIRCULAR ) {
                        // For CIRCULAR kernal, size must be same on all dimensions
                        if ( (nzf != 1 && ( nxk != nyk || nxk != nzk )) || (nzf == 1 && nyf != 1 && nxk != nyk) ) {
                                throw ImageDimensionException("For CIRCULAR kernal, size must be same on all dimensions.");
                        }
                }

                EMData* result = new EMData();
                result->set_size(nxf, nyf, nzf);
                result->to_zero();

                for (int iz = 0; iz <= nzf-1; iz++) {
                        for (int iy = 0; iy <= nyf-1; iy++) {
                                for (int ix = 0; ix <= nxf-1; ix++) {
                                        (*result)(ix,iy,iz) = median (*f, nxk, nyk, nzk, myshape, iz, iy, ix);                                  
                                }
                        }
                }
                
                return result;
        }
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]fFirst 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]gSecond 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]myflagProcessing flag (see above).
[in]mytypeType of Fourier product to perform. (see above).
[in]center
Returns:
1-, 2-, or 3-dimensional real fourier product image.

Definition at line 181 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::div(), EMAN::EMData::do_fft_inplace(), EMAN::EMData::do_ift_inplace(), 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, SELF_CORRELATION, EMAN::EMData::set_array_offsets(), and EMAN::EMData::update().

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

                                                                                       {
                //std::complex<float> phase_mult;
                // Not only does the value of "flag" determine how we handle
                // periodicity, but it also determines whether or not we should
                // normalize the results.  Here's some convenience bools:
                bool donorm = (0 == flag%2) ? true : false;
                // the 2x padding is hardcoded for now
                int  npad  = (flag >= 3) ? 2 : 1;  // amount of padding used
                // g may be NULL.  If so, have g point to the same object as f.  In that
                // case we need to be careful later on not to try to delete g's workspace
                // as well as f's workspace, since they will be the same.
                bool  gexists = true;
                if (!g) { g = f; gexists = false; }
                if ( f->is_complex() || g->is_complex() ) {
                        // Fourier input only allowed for circulant
                        if (CIRCULANT != flag) {
                                LOGERR("Cannot perform normalization or padding on Fourier type.");
                                throw InvalidValueException(flag, "Cannot perform normalization or padding on Fourier type.");
                        }
                }
                // These are actual dimensions of f (and real-space sizes for ny and nz)
                int nx  = f->get_xsize();
                int ny  = f->get_ysize();
                int nz  = f->get_zsize();
                // We manifestly assume no zero-padding here, just the 
                // necessary extension along x for the fft
                if (!f->is_real()) nx = (nx - 2 + (f->is_fftodd() ? 1 : 0)); 

                // these are padded dimensions
                const int nxp = npad*nx;
                const int nyp = (ny > 1) ? npad*ny : 1; // don't pad y for 1-d image
                const int nzp = (nz > 1) ? npad*nz : 1; // don't pad z for 2-d image

                // now one half of the padded, fft-extended size along x
                const int lsd2 = (nxp + 2 - nxp%2) / 2; 

                EMData* fp = NULL;
                if (f->is_complex()) { 
                        // If f is already a fourier object then fp is a copy of f.
                        // (The fp workspace is modified, so we copy f to keep f pristine.)
                        fp=f->copy();
                } else {
                        //  [normalize] [pad] compute fft
                        fp = f->norm_pad(donorm, npad);
                        if (donorm) {
                                fp->div( sqrtf(nx) * sqrtf(ny) * sqrtf(nz) );
                        }
                        fp->do_fft_inplace();
                }
                // The [padded] fft-extended version of g is gp.
                EMData* gp = NULL;
                if(f==g) {
                        // g is an alias for f, so gp should be an alias for fp
                        gp=fp;
                } else if (g->is_complex()) {
                        // g is already a Fourier object, so gp is just an alias for g
                        // (The gp workspace is not modified, so we don't need a copy.)
                        gp = g;
                } else {
                        // normal case: g is real and different from f, so compute gp
                        gp = g->norm_pad(donorm, npad);
                        if (donorm) {
                                gp->div( sqrtf(nx) * sqrtf(ny) * sqrtf(nz) );
                        }
                        gp->do_fft_inplace();
                }
                // Get complex matrix views of fp and gp; matrices start from 1 (not 0)
                fp->set_array_offsets(1,1,1);
                gp->set_array_offsets(1,1,1);

                // If the center flag is true, put the center of the correlation in the middle
                // If it is false, put it in (0,0), this approach saves time, but it is diffcult to manage the result
                if (center) {
                        //  Multiply two functions (the real work of this routine)
                        int itmp = nx/2;
                        //float sx  = float(-twopi*float(itmp)/float(nxp));
                        float sxn = 2*float(itmp)/float(nxp);
                        float sx = -M_PI*sxn;
                        itmp = ny/2;
                        //float sy  = float(-twopi*float(itmp)/float(nyp));
                        float syn = 2*float(itmp)/float(nyp);
                        float sy = -M_PI*syn;
                        itmp = nz/2;
                        //float sz  = float(-twopi*float(itmp)/float(nzp));
                        float szn = 2*float(itmp)/float(nzp);
                        float sz = -M_PI*szn;
                        if ( (flag > 2) || (nx%2==0 && (ny%2==0 || ny==1) && (nz%2==0 || nz==1)) ) {  // padded images have always even size:  if ( (padded) || (even) ) ...
                                switch (ptype) {
                                        case AUTOCORRELATION:
                                        // fpmat := |fpmat|^2
                                        // Note nxp are padded dimensions
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        float fpr = real(fp->cmplx(ix,iy,iz));
                                                                        float fpi = imag(fp->cmplx(ix,iy,iz));
                                                                        fp->cmplx(ix,iy,iz) = complex<float>(fpr*fpr+fpi*fpi, 0.0f);
                                                                }
                                                        }
                                                }
                                                break;
                                        case SELF_CORRELATION:
                                        // fpmat:=|fpmat|
                                        // Note nxp are padded dimensions
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        fp->cmplx(ix,iy,iz) = complex<float>(abs(fp->cmplx(ix,iy,iz)), 0.0f);
                                                                }
                                                        }
                                                }
                                                break;
                                        case CORRELATION:
                                        // fpmat:=fpmat*conjg(gpmat)
                                        // Note nxp are padded dimensions
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        fp->cmplx(ix,iy,iz) *= conj(gp->cmplx(ix,iy,iz));
                                                                }
                                                        }
                                                }
                                        break;
                                        case CONVOLUTION:
                                        // fpmat:=fpmat*gpmat
                                        // Note nxp are padded dimensions
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        fp->cmplx(ix,iy,iz) *= gp->cmplx(ix,iy,iz);
                                                                }
                                                        }
                                                }
                                                break;
                                        default:
                                                LOGERR("Illegal option in Fourier Product");
                                                throw InvalidValueException(ptype, "Illegal option in Fourier Product");
                                }                                       
                                for (int iz = 1; iz <= nzp; iz++) {
                                        for (int iy = 1; iy <= nyp; iy++) {
                                                for (int ix = (iz+iy+1)%2+1; ix <= lsd2; ix+=2) {
                                                        fp->cmplx(ix,iy,iz) = -fp->cmplx(ix,iy,iz);
                                                }
                                        }
                                }
                        } else {
                                switch (ptype) {
                                        case AUTOCORRELATION:
                                        // fpmat := |fpmat|^2
                                        // Note nxp are padded dimensions
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                        int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        int jx=ix-1; float arg=sx*jx+argy;
                                                                        float fpr = real(fp->cmplx(ix,iy,iz));
                                                                        float fpi = imag(fp->cmplx(ix,iy,iz));
                                                                        fp->cmplx(ix,iy,iz)= (fpr*fpr + fpi*fpi) *std::complex<float>(cos(arg),sin(arg));
                                                                }
                                                        }
                                                }
                                                break;
                                        case SELF_CORRELATION:
                                        // fpmat:=|fpmat|
                                        // Note nxp are padded dimensions
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                        int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        int jx=ix-1; float arg=sx*jx+argy;
                                                                        fp->cmplx(ix,iy,iz) = abs(fp->cmplx(ix,iy,iz)) *std::complex<float>(cos(arg),sin(arg));
                                                                }
                                                        }
                                                }
                                                break;
                                        case CORRELATION:
                                        // fpmat:=fpmat*conjg(gpmat)
                                        // Note nxp are padded dimensions
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                        int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        int jx=ix-1; float arg=sx*jx+argy;
                                                                        fp->cmplx(ix,iy,iz) *= conj(gp->cmplx(ix,iy,iz)) *std::complex<float>(cos(arg),sin(arg));
                                                                }
                                                        }
                                                }
                                        break;
                                        case CONVOLUTION:
                                        // fpmat:=fpmat*gpmat
                                        // Note nxp are padded dimensions
                                                if(npad == 1) {
                                                        sx -= 4*(nx%2)/float(nx);
                                                        sy -= 4*(ny%2)/float(ny);
                                                        sz -= 4*(nz%2)/float(nz);
                                                }
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                        int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                                int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        int jx=ix-1; float arg=sx*jx+argy;
                                                                        fp->cmplx(ix,iy,iz) *= gp->cmplx(ix,iy,iz) *std::complex<float>(cos(arg),sin(arg));
                                                                }
                                                        }
                                                }
                                                break;
                                        default:
                                                LOGERR("Illegal option in Fourier Product");
                                                throw InvalidValueException(ptype, "Illegal option in Fourier Product");
                                }
                        }
                } else {
                        // If the center flag is false, then just do basic multiplication
                        // Here I aterd the method of complex calculation. This method is much faster than the previous one.
                        switch (ptype) {
                                case AUTOCORRELATION:
                                        for (int iz = 1; iz <= nzp; iz++) {
                                                for (int iy = 1; iy <= nyp; iy++) {
                                                        for (int ix = 1; ix <= lsd2; ix++) {
                                                                float fpr = real(fp->cmplx(ix,iy,iz));
                                                                float fpi = imag(fp->cmplx(ix,iy,iz));
                                                                fp->cmplx(ix,iy,iz) = complex<float>(fpr*fpr+fpi*fpi, 0.0f);
                                                        }
                                                }
                                        }
                                        break;
                                case SELF_CORRELATION:
                                        for (int iz = 1; iz <= nzp; iz++) {
                                                for (int iy = 1; iy <= nyp; iy++) {
                                                        for (int ix = 1; ix <= lsd2; ix++) {
                                                                fp->cmplx(ix,iy,iz) = complex<float>(abs(fp->cmplx(ix,iy,iz)), 0.0f);
                                                        }
                                                }
                                        }
                                        break;
                                case CORRELATION:
                                        //phase_mult = 1;
                                        for (int iz = 1; iz <= nzp; iz++) {
                                                for (int iy = 1; iy <= nyp; iy++) {
                                                        for (int ix = 1; ix <= lsd2; ix++) {
                                                                fp->cmplx(ix,iy,iz)*= conj(gp->cmplx(ix,iy,iz));
                                                        }
                                                }
                                        }
                                        break;
                                case CONVOLUTION:
                                        if(npad == 1) {
                                                float sx = -M_PI*2*(nx%2)/float(nx);
                                                float sy = -M_PI*2*(ny%2)/float(ny);
                                                float sz = -M_PI*2*(nz%2)/float(nz);
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                        int jz=iz-1; if(jz>nzp/2) jz=jz-nzp; float argz=sz*jz;
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                                int jy=iy-1; if(jy>nyp/2) jy=jy-nyp; float argy=sy*jy+argz;
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        int jx=ix-1; float arg=sx*jx+argy;
                                                                        fp->cmplx(ix,iy,iz) *= gp->cmplx(ix,iy,iz) *std::complex<float>(cos(arg),sin(arg));
                                                                }
                                                        }
                                                }
                                        } else {
                                                for (int iz = 1; iz <= nzp; iz++) {
                                                        for (int iy = 1; iy <= nyp; iy++) {
                                                                for (int ix = 1; ix <= lsd2; ix++) {
                                                                        fp->cmplx(ix,iy,iz)*= gp->cmplx(ix,iy,iz);
                                                                }
                                                        }
                                                }
                                        }
                                        break;
                                default:
                                        LOGERR("Illegal option in Fourier Product");
                                        throw InvalidValueException(ptype, "Illegal option in Fourier Product");
                        }
                }
                // 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);
                if (gexists && (f != g) && (!g->is_complex())) {
                        if( gp ) {
                                delete gp;
                                gp = 0;
                        }
                }
                // back transform
                fp->do_ift_inplace();
                if(center && npad ==2)  fp->depad();
                else                    fp->depad_corner();

                //vector<int> saved_offsets = fp->get_array_offsets();  I do not know what the meaning of it was, did not work anyway PAP
                fp->set_array_offsets(1,1,1);

                // Lag normalization
                if(flag>4)  {
                        int nxc=nx/2+1, nyc=ny/2+1, nzc=nz/2+1;
                        for (int iz = 1; iz <= nz; iz++) {
                                const float lagz = float(nz) / (nz-abs(iz-nzc));
                                for (int iy = 1; iy <= ny; iy++) {
                                        const float lagyz = lagz * (float(ny) / (ny-abs(iy-nyc)));
                                        for (int ix = 1; ix <= nx; ix++) {
                                                (*fp)(ix,iy,iz) *= lagyz * (float(nx) / (nx-abs(ix-nxc)));
                                        }
                                }
                        }
                }
                //OVER AND OUT
                //fp->set_array_offsets(saved_offsets);  This was strange and did not work, PAP
                fp->set_array_offsets(0,0,0);
                fp->update();
                return fp;
        }
map< string, vector< string > > EMAN::group_processors ( )

Definition at line 10405 of file processor.cpp.

References EMAN::Processor::get_name().

{
        map<string, vector<string> > processor_groups;

        vector <string> processornames = Factory<Processor>::get_list();

        for (size_t i = 0; i < processornames.size(); i++) {
                Processor * f = Factory<Processor>::get(processornames[i]);
                if (dynamic_cast<RealPixelProcessor*>(f) != 0) {
                        processor_groups["RealPixelProcessor"].push_back(f->get_name());
                }
                else if (dynamic_cast<BoxStatProcessor*>(f)  != 0) {
                        processor_groups["BoxStatProcessor"].push_back(f->get_name());
                }
                else if (dynamic_cast<ComplexPixelProcessor*>(f)  != 0) {
                        processor_groups["ComplexPixelProcessor"].push_back(f->get_name());
                }
                else if (dynamic_cast<CoordinateProcessor*>(f)  != 0) {
                        processor_groups["CoordinateProcessor"].push_back(f->get_name());
                }
                else if (dynamic_cast<FourierProcessor*>(f)  != 0) {
                        processor_groups["FourierProcessor"].push_back(f->get_name());
                }
                else if (dynamic_cast<NewFourierProcessor*>(f)  != 0) {
                        processor_groups["FourierProcessor"].push_back(f->get_name());
                }
                else if (dynamic_cast<NormalizeProcessor*>(f)  != 0) {
                        processor_groups["NormalizeProcessor"].push_back(f->get_name());
                }
                else {
                        processor_groups["Others"].push_back(f->get_name());
                }
        }

        return processor_groups;
}
bool EMAN::isZero ( double  in_d,
double  in_dEps = 1e-16 
) [inline]
double EMAN::length ( const Vector3 &  v) [inline]
double EMAN::length ( const Vector4 &  v) [inline]

Definition at line 688 of file vecmath.h.

References EMAN::Vector4::length().

{ return v.length(); }
Point3 EMAN::lerp ( const Point3 &  p0,
const Point3 &  p1,
double  dT 
) [inline]

Definition at line 406 of file vecmath.h.

        {
            const double dTMinus = 1.0 - dT;
            return Point3( dTMinus * p0[0] + dT * p1[0], dTMinus * p0[1] + dT * p1[1], dTMinus * p0[2] + dT * p1[2] ); 
        }
int EMAN::multi_processors ( EMData image,
vector< string >  processornames 
)

Definition at line 8920 of file processor.cpp.

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

{
        Assert(image != 0);
        Assert(processornames.size() > 0);

        for (size_t i = 0; i < processornames.size(); i++) {
                image->process_inplace(processornames[i]);
        }
        return 0;
}
bool EMAN::operator!= ( const Pixel p1,
const Pixel p2 
)

Definition at line 62 of file geometry.cpp.

{
        return !(p1 == p2);
}
template<typename Type , typename Type2 >
bool EMAN::operator!= ( const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2 
) [inline]

Definition at line 690 of file vec3.h.

                                                                             {
                if (v1[0] != v2[0] || v1[1] != v2[1] || v1[2] != v2[2]) {
                        return true;
                }
                return false;
        }
bool EMAN::operator!= ( const Quaternion q1,
const Quaternion q2 
)

Definition at line 370 of file quaternion.cpp.

{
        return (!(q1 == q2));
}
template<typename Type , typename Type2 >
bool EMAN::operator!= ( const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2 
) [inline]

Definition at line 1068 of file vec3.h.

                                                                             {
                if (v1[0] != v2[0] || v1[1] != v2[1] ) {
                        return true;
                }
                return false;
        }
bool EMAN::operator!= ( const EMObject e1,
const EMObject e2 
)

Definition at line 944 of file emobject.cpp.

{
        return !(e1 == e2);
}
bool EMAN::operator!= ( const Dict d1,
const Dict d2 
)

Definition at line 1098 of file emobject.cpp.

{
        return !(d1 == d2);
}
Transform EMAN::operator* ( const Transform M2,
const Transform M1 
)

Matrix times Matrix, a pure mathematical operation.

Definition at line 1306 of file transform.cpp.

{
        Transform result;
        for (int i=0; i<3; i++) {
                for (int j=0; j<4; j++) {
                        result[i][j] = M2[i][0] * M1[0][j] +  M2[i][1] * M1[1][j] + M2[i][2] * M1[2][j];
                }
                result[i][3] += M2[i][3];
        }

        return result;
}
template<typename Type >
Vec3f EMAN::operator* ( const Transform &  M,
const Vec3< Type > &  v 
)

Matrix times Vector, a pure mathematical operation.

Definition at line 534 of file transform.h.

References EMAN::Transform::transform().

        {
                return M.transform(v);
        }
template<typename Type >
Vec2f EMAN::operator* ( const Transform &  M,
const Vec2< Type > &  v 
)

Matrix times Vector, a pure mathematical operation.

Definition at line 541 of file transform.h.

References EMAN::Transform::transform().

        {
                return M.transform(v);
        }
template<typename Type >
Vec3f EMAN::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 550 of file transform.h.

References x, and y.

        {
                float x = v[0] * M[0][0] + v[1] * M[1][0] + v[2] * M[2][0] ;
                float y = v[0] * M[0][1] + v[1] * M[1][1] + v[2] * M[2][1];
                float z = v[0] * M[0][2] + v[1] * M[1][2] + v[2] * M[2][2];
                return Vec3f(x, y, z);
        }
template<typename Type , typename Type2 >
Type EMAN::operator* ( const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2 
) [inline]

Definition at line 642 of file vec3.h.

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

        {
                return v1.dot(v2);
        }
template<typename Type , typename Type2 >
Vec3<Type2> EMAN::operator* ( const Type &  d,
const Vec3< Type2 > &  v 
) [inline]

Definition at line 648 of file vec3.h.

        {
                // Preserve the vector type
                Vec3<Type2> v1(v);
                v1 *= d;
                return v1;
        }
template<typename Type , typename Type2 >
Vec3<Type> EMAN::operator* ( const Vec3< Type > &  v,
const Type2 &  d 
) [inline]

Definition at line 657 of file vec3.h.

                                                                          {
                // Preserve the vector type
                Vec3<Type> v1(v);
                v1 *= d;
                return v1;
        }
EMData * EMAN::operator* ( const EMData a,
const EMData b 
)

Definition at line 3118 of file emdata.cpp.

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

{
        EMData * r = a.copy();
        r->mult(b);
        return r;
}
Quaternion EMAN::operator* ( const Quaternion q1,
const Quaternion q2 
)

Definition at line 323 of file quaternion.cpp.

References q.

{
        Quaternion q = q1;
        q *= q2;
        return q;
}
Quaternion EMAN::operator* ( const Quaternion q,
float  s 
)

Definition at line 330 of file quaternion.cpp.

References q.

{
        Quaternion q1 = q;
        q1 *= s;
        return q1;
}
Quaternion EMAN::operator* ( float  s,
const Quaternion q 
)

Definition at line 337 of file quaternion.cpp.

References q.

{
        Quaternion q1 = q;
        q1 *= s;
        return q1;
}
template<typename Type , typename Type2 >
Vec2<Type> EMAN::operator* ( const Vec2< Type > &  v,
const Type2 &  d 
) [inline]

Definition at line 1035 of file vec3.h.

                                                                          {
        // Preserve the vector type
                Vec2<Type> v1(v);
                v1 *= d;
                return v1;
        }
EMData * EMAN::operator* ( const EMData em,
float  n 
)

Definition at line 3047 of file emdata.cpp.

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

{
        EMData* r = em.copy();
        r ->mult(n);
        return r;
}
ScreenVector EMAN::operator* ( const double  s,
const ScreenVector &  v 
) [inline]

Definition at line 133 of file vecmath.h.

                                                                               {
            return ScreenVector( (int)(v[0] * s), (int)(v[1] * s) );
        }
Vector3 EMAN::operator* ( const double  s,
const Vector3 &  v 
) [inline]

Definition at line 305 of file vecmath.h.

                                                                     {
            return Vector3( v[0] * s, v[1] * s, v[2] * s );
        }
template<typename Type , typename Type2 >
Type EMAN::operator* ( const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2 
) [inline]

Definition at line 1020 of file vec3.h.

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

        {
                return v1.dot(v2);
        }
Vector3 EMAN::operator* ( const Vector3 &  v,
const Matrix3 &  m 
) [inline]

Definition at line 571 of file vecmath.h.

                                                                     {
            return Vector3(m(0,0) * v[0] + m(1,0) * v[1] + m(2,0) * v[2],
                           m(0,1) * v[0] + m(1,1) * v[1] + m(2,1) * v[2],
                           m(0,2) * v[0] + m(1,2) * v[1] + m(2,2) * v[2]);
        }
Vector4 EMAN::operator* ( const double  s,
const Vector4 &  v 
) [inline]

Definition at line 684 of file vecmath.h.

                                                                     {
            return Vector4( v[0] * s, v[1] * s, v[2] * s, v[3] * s );
        }
Point3 EMAN::operator* ( const Point3 &  p,
const Matrix3 &  m 
) [inline]

Definition at line 578 of file vecmath.h.

                                                                   {
            return Point3(m(0,0) * p[0] + m(1,0) * p[1] + m(2,0) * p[2],
                          m(0,1) * p[0] + m(1,1) * p[1] + m(2,1) * p[2],
                          m(0,2) * p[0] + m(1,2) * p[1] + m(2,2) * p[2]);
        }
template<typename Type , typename Type2 >
Vec2<Type2> EMAN::operator* ( const Type &  d,
const Vec2< Type2 > &  v 
) [inline]

Definition at line 1026 of file vec3.h.

        {
                // Preserve the vector type
                Vec2<Type2> v1(v);
                v1 *= d;
                return v1;
        }
EMData * EMAN::operator* ( float  n,
const EMData em 
)

Definition at line 3077 of file emdata.cpp.

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

{
        EMData * r = em.copy();
        r->mult(n);
        return r;
}
template<typename Type , typename Type2 >
Vec3<Type> EMAN::operator+ ( const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2 
) [inline]

Definition at line 590 of file vec3.h.

        {

                return Vec3<Type>(static_cast<Type>(v1[0] + v2[0]), static_cast<Type>(v1[1] + v2[1]),static_cast<Type>(v1[2] + v2[2]));;
        }
template<typename Type , typename Type2 >
Vec3<Type> EMAN::operator+ ( const Vec3< Type > &  v,
const Type2 &  n 
) [inline]

Definition at line 597 of file vec3.h.

        {
                Vec3<Type> v1(v);
                v1 += n;
                return v1;
        }
EMData * EMAN::operator+ ( const EMData em,
float  n 
)

Definition at line 3033 of file emdata.cpp.

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

{
        EMData * r = em.copy();
        r->add(n);
        return r;
}
EMData * EMAN::operator+ ( const EMData a,
const EMData b 
)

Definition at line 3104 of file emdata.cpp.

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

{
        EMData * r = a.copy();
        r->add(b);
        return r;
}
Quaternion EMAN::operator+ ( const Quaternion q1,
const Quaternion q2 
)

Definition at line 308 of file quaternion.cpp.

References q.

{
        Quaternion q = q1;
        q += q2;
        return q;
}
template<typename Type , typename Type2 >
Vec2<Type> EMAN::operator+ ( const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2 
) [inline]

Definition at line 985 of file vec3.h.

        {
                return Vec2<Type>(static_cast<Type>(v1[0] + v2[0]), static_cast<Type>(v1[1] + v2[1]));;
        }
template<typename Type , typename Type2 >
Vec2<Type> EMAN::operator+ ( const Vec2< Type > &  v,
const Type2 &  n 
) [inline]

Definition at line 991 of file vec3.h.

        {
                Vec2<Type> v1(v);
                v1 += n;
                return v1;
        }
EMData * EMAN::operator+ ( float  n,
const EMData em 
)

Definition at line 3062 of file emdata.cpp.

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

{
        EMData * r = em.copy();
        r->add(n);
        return r;
}
template<typename Type , typename Type2 >
Vec2<Type> EMAN::operator- ( const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2 
) [inline]

Definition at line 999 of file vec3.h.

        {
                return Vec2<Type>(static_cast<Type>(v1[0] - v2[0]),     static_cast<Type>(v1[1] - v2[1]));
        }
template<typename Type , typename Type2 >
Vec3<Type> EMAN::operator- ( const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2 
) [inline]

Definition at line 613 of file vec3.h.

        {
                return Vec3<Type>(static_cast<Type>(v1[0] - v2[0]),
                                                  static_cast<Type>(v1[1] - v2[1]),
                                                  static_cast<Type>(v1[2] - v2[2]));
        }
template<typename Type , typename Type2 >
Vec3<Type> EMAN::operator- ( const Vec3< Type > &  v,
const Type2 &  n 
) [inline]

Definition at line 621 of file vec3.h.

        {
                Vec3<Type> v1(v);
                v1 -= n;
                return v1;
        }
EMData * EMAN::operator- ( const EMData em,
float  n 
)

Definition at line 3040 of file emdata.cpp.

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

Referenced by rsub().

{
        EMData* r = em.copy();
        r->sub(n);
        return r;
}
template<typename Type >
Vec3<Type> EMAN::operator- ( const Vec3< Type > &  v) [inline]

Definition at line 628 of file vec3.h.

        {
                return Vec3<Type>(-v[0],-v[1],-v[2]);
        }
template<typename Type , typename Type2 >
Vec2<Type> EMAN::operator- ( const Vec2< Type > &  v,
const Type2 &  n 
) [inline]

Definition at line 1005 of file vec3.h.

        {
                Vec2<Type> v1(v);
                v1 -= n;
                return v1;
        }
EMData * EMAN::operator- ( const EMData a,
const EMData b 
)

Definition at line 3111 of file emdata.cpp.

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

{
        EMData * r = a.copy();
        r->sub(b);
        return r;
}
Quaternion EMAN::operator- ( const Quaternion q1,
const Quaternion q2 
)

Definition at line 315 of file quaternion.cpp.

References q.

{
        Quaternion q = q1;
        q -= q2;
        return q;
}
template<typename Type >
Vec2<Type> EMAN::operator- ( const Vec2< Type > &  v) [inline]

Definition at line 1013 of file vec3.h.

        {
                return Vec2<Type>(-v[0],-v[1]);
        }
EMData * EMAN::operator- ( float  n,
const EMData em 
)

Definition at line 3069 of file emdata.cpp.

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

{
        EMData * r = em.copy();
        r->mult(-1.0f);
        r->add(n);
        return r;
}
IntPoint EMAN::operator- ( const IntPoint p)

Definition at line 41 of file geometry.cpp.

{
        return IntPoint(-p[0],-p[1],-p[2]);
}
template<typename Type , typename Type2 >
Vec2<Type> EMAN::operator/ ( const Vec2< Type > &  v,
const Type2 &  d 
) [inline]

Definition at line 1052 of file vec3.h.

                                                                          {
                // Preserve the vector type
                Vec2<Type> v1(v);
                v1 /= d;
                return v1;
        }
EMData * EMAN::operator/ ( float  n,
const EMData em 
)

Definition at line 3084 of file emdata.cpp.

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

{
        EMData * r = em.copy();
        r->to_one();
        r->mult(n);
        r->div(em);

        return r;
}
EMData * EMAN::operator/ ( const EMData em,
float  n 
)

Definition at line 3054 of file emdata.cpp.

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

Referenced by rdiv().

{
        EMData * r = em.copy();
        r->div(n);
        return r;
}
template<typename Type , typename Type2 >
Vec3<Type2> EMAN::operator/ ( const Type &  d,
const Vec3< Type2 > &  v 
) [inline]

Definition at line 665 of file vec3.h.

        {
                // Preserve the vector type
                Vec3<Type2> v1(v);
                v1 /= d;
                return v1;
        }
EMData * EMAN::operator/ ( const EMData a,
const EMData b 
)

Definition at line 3125 of file emdata.cpp.

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

{
        EMData * r = a.copy();
        r->div(b);
        return r;
}
template<typename Type , typename Type2 >
Vec3<Type> EMAN::operator/ ( const Vec3< Type > &  v,
const Type2 &  d 
) [inline]

Definition at line 674 of file vec3.h.

                                                                          {
                // Preserve the vector type
                Vec3<Type> v1(v);
                v1 /= d;
                return v1;
        }
Quaternion EMAN::operator/ ( const Quaternion q1,
const Quaternion q2 
)

Definition at line 344 of file quaternion.cpp.

References q.

{
        Quaternion q = q1;
        q /= q2;
        return q;
}
template<typename Type , typename Type2 >
Vec2<Type2> EMAN::operator/ ( const Type &  d,
const Vec2< Type2 > &  v 
) [inline]

Definition at line 1043 of file vec3.h.

        {
        // Preserve the vector type
                Vec2<Type2> v1(v);
                v1 /= d;
                return v1;
        }
bool EMAN::operator< ( const Pixel p1,
const Pixel p2 
)

Definition at line 46 of file geometry.cpp.

References EMAN::Pixel::value.

{
        if (p1.value < p2.value) {
                return true;
        }
        return false;
}
std::ostream& EMAN::operator<< ( std::ostream &  os,
const Vector3 &  v 
) [inline]

Definition at line 320 of file vecmath.h.

                                                                        {
            os << "(" << v[0] << ", " << v[1] << ", " << v[2] << ")";
            return os;
        }
std::ostream& EMAN::operator<< ( std::ostream &  os,
const ScreenVector &  v 
) [inline]

Definition at line 137 of file vecmath.h.

                                                                             {
            os << "(" << v[0] << ", " << v[1] << ")";
            return os;
        }
std::ostream& EMAN::operator<< ( std::ostream &  os,
const Point3 &  p 
) [inline]

Definition at line 412 of file vecmath.h.

                                                                       {
            os << "(" << p[0] << ", " << p[1] << ", " << p[2] << ")";
            return os;
        }
std::ostream& EMAN::operator<< ( std::ostream &  os,
const ScreenPoint &  p 
) [inline]

Definition at line 200 of file vecmath.h.

                                                                            {
            os << "(" << p[0] << ", " << p[1] << ")";
            return os;
        }
std::ostream& EMAN::operator<< ( std::ostream &  os,
const Matrix3 &  m 
) [inline]

Definition at line 584 of file vecmath.h.

References EMAN::Matrix3::row().

                                                                        {
            os << m.row(0) << std::endl;
            os << m.row(1) << std::endl;
            os << m.row(2) << std::endl;
            return os;
        }
std::ostream& EMAN::operator<< ( std::ostream &  os,
const Vector4 &  v 
) [inline]

Definition at line 690 of file vecmath.h.

                                                                        {
            os << "(" << v[0] << ", " << v[1] << ", " << v[2] << ", " << v[3] << ")";
            return os;
        }
std::ostream& EMAN::operator<< ( std::ostream &  os,
const Matrix4 &  m 
) [inline]

Definition at line 952 of file vecmath.h.

References EMAN::Matrix4::row().

                                                                        {
            os << m.row(0) << std::endl;
            os << m.row(1) << std::endl;
            os << m.row(2) << std::endl;
            os << m.row(3) << std::endl;
            return os;
        }
bool EMAN::operator== ( const Quaternion q1,
const Quaternion q2 
)

Definition at line 352 of file quaternion.cpp.

References EMAN::Quaternion::as_list().

{
        bool result = true;
        const float err_limit = 0.00001f;
        
        vector < float >v1 = q1.as_list();
        vector < float >v2 = q2.as_list();

        for (size_t i = 0; i < v1.size(); i++) {
                if (fabs(v1[i] - v2[i]) > err_limit) {
                        result = false;
                        break;
                }
        }

        return result;
}
template<typename Type , typename Type2 >
bool EMAN::operator== ( const Vec3< Type > &  v1,
const Vec3< Type2 > &  v2 
) [inline]

Definition at line 682 of file vec3.h.

                                                                             {
                if (v1[0] == v2[0] && v1[1] == v2[1] && v1[2] == v2[2]) {
                        return true;
                }
                return false;
        }
bool EMAN::operator== ( const EMObject e1,
const EMObject e2 
)

Definition at line 841 of file emobject.cpp.

References EMAN::EMObject::b, EMAN::EMObject::BOOL, EMAN::EMObject::CTF, EMAN::EMObject::d, EMAN::EMObject::DOUBLE, EMAN::EMObject::emdata, EMAN::EMObject::EMDATA, EMAN::EMObject::f, EMAN::EMObject::farray, EMAN::EMObject::FLOAT, EMAN::EMObject::FLOAT_POINTER, EMAN::EMObject::FLOATARRAY, EMAN::EMObject::fp, EMAN::EMObject::iarray, EMAN::EMObject::INT, EMAN::EMObject::INT_POINTER, EMAN::EMObject::INTARRAY, EMAN::EMObject::ip, EMAN::EMObject::n, EMAN::EMObject::SHORT, EMAN::EMObject::si, EMAN::EMObject::str, EMAN::EMObject::strarray, EMAN::EMObject::STRING, EMAN::EMObject::STRINGARRAY, EMAN::EMObject::TRANSFORM, EMAN::EMObject::transformarray, EMAN::EMObject::TRANSFORMARRAY, EMAN::EMObject::type, EMAN::EMObject::ui, EMAN::EMObject::UNKNOWN, EMAN::EMObject::UNSIGNEDINT, EMAN::EMObject::VOID_POINTER, EMAN::EMObject::vp, EMAN::EMObject::xydata, and EMAN::EMObject::XYDATA.

{

        if (e1.type != e2.type) {
                return false;
        }

        switch (e1.type) {
        case  EMObject::BOOL:
                return (e1.b == e2.b);
        break;
        case EMObject::SHORT:
                return (e1.si == e2.si);
        break;
        case  EMObject::INT:
                return (e1.n == e2.n);
        break;
        case  EMObject::UNSIGNEDINT:
                return (e1.ui == e2.ui);
        break;
        case  EMObject::FLOAT:
                return (e1.f == e2.f);
        break;
        case  EMObject::DOUBLE:
                return (e1.d == e2.d);
        break;
        case EMObject::CTF:
        case  EMObject::STRING:
                return (e1.str == e2.str);
        break;
        case  EMObject::FLOAT_POINTER:
                return (e1.fp == e2.fp);
        break;
        case  EMObject::INT_POINTER:
                return (e1.ip == e2.ip);
        break;
        case  EMObject::VOID_POINTER:
                return (e1.vp == e2.vp);
        break;
        case  EMObject::EMDATA:
                return (e1.emdata == e2.emdata);
        break;
        case  EMObject::XYDATA:
                return (e1.xydata == e2.xydata);
        break;
        case  EMObject::TRANSFORM:
        case  EMObject::FLOATARRAY:
                if (e1.farray.size() == e2.farray.size()) {
                        for (size_t i = 0; i < e1.farray.size(); i++) {
                                if (e1.farray[i] != e2.farray[i]) {
                                        return false;
                                }
                        }
                        return true;
                }
                else {
                        return false;
                }
        break;
        case  EMObject::INTARRAY:
                if (e1.iarray.size() == e2.iarray.size()) {
                        for (size_t i = 0; i < e1.iarray.size(); i++) {
                                if (e1.iarray[i] != e2.iarray[i]) {
                                        return false;
                                }
                        }
                        return true;
                }
        break;
        case  EMObject::STRINGARRAY:
                if (e1.strarray.size() == e2.strarray.size()) {
                        for (size_t i = 0; i < e1.strarray.size(); i++) {
                                if (e1.strarray[i] != e2.strarray[i]) {
                                        return false;
                                }
                        }
                        return true;
                }
                else {
                        return false;
                }
        break;
        case EMObject::TRANSFORMARRAY:
                if (e1.transformarray.size() == e2.transformarray.size()) {
                        for (size_t i = 0; i < e1.transformarray.size(); i++) {
                                if (e1.transformarray[i] != e2.transformarray[i]) {
                                        return false;
                                }
                        }
                }
        break;
        case  EMObject::UNKNOWN:
                // UNKNOWN really means "no type" and if two objects both have
                // type UNKNOWN they really are the same
                return (e1.type == e2.type);
        break;
        default:
                return false;
        break;
        }
        return false;
}
template<typename Type , typename Type2 >
bool EMAN::operator== ( const Vec2< Type > &  v1,
const Vec2< Type2 > &  v2 
) [inline]

Definition at line 1060 of file vec3.h.

                                                                             {
                if (v1[0] == v2[0] && v1[1] == v2[1] ) {
                        return true;
                }
                return false;
        }
bool EMAN::operator== ( const Dict d1,
const Dict d2 
)

Definition at line 1092 of file emobject.cpp.

References EMAN::Dict::dict.

{
        // Just make use of map's version of operator==
        return (d1.dict == d2.dict);
}
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.

{
        if (p1.x == p2.x && p1.y == p2.y && p1.z == p2.z && p1.value == p2.value) {
                return true;
        }
        return false;
}
EMData * EMAN::padfft_slice ( const EMData *const  slice,
const Transform t,
int  npad 
)

Direct Fourier inversion Reconstructor.

Definition at line 1985 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(), and EMAN::EMData::set_attr().

Referenced by EMAN::file_store::add_image(), EMAN::newfile_store::add_image(), EMAN::nnSSNR_ctfReconstructor::insert_slice(), EMAN::nn4_ctf_rectReconstructor::insert_slice(), EMAN::nn4_ctfwReconstructor::insert_slice(), EMAN::nn4_ctfReconstructor::insert_slice(), EMAN::nnSSNR_Reconstructor::insert_slice(), EMAN::nn4_rectReconstructor::insert_slice(), and EMAN::nn4Reconstructor::insert_slice().

{
        int nx = slice->get_xsize();
        int ny = slice->get_ysize();
        int ndim = (ny==1) ? 1 : 2;

        if( ndim==2 && nx!=ny )
        {
                // FIXME: What kind of exception should we throw here?
                throw std::runtime_error("Tried to padfft a 2D slice which is not square.");
        }

        // process 2D slice or 1D line -- subtract the average outside of the circle, zero-pad, fft extend, and fft
        EMData* temp = slice->average_circ_sub();

        Assert( temp != NULL );
        EMData* zeropadded = temp->norm_pad( false, npad );
        Assert( zeropadded != NULL );
        checked_delete( temp );

    zeropadded->do_fft_inplace();
        EMData* padfftslice = zeropadded;

        // shift the projection
        Vec2f trans = t.get_trans_2d();
        float sx = -trans[0];
        float sy = -trans[1];
        if(sx != 0.0f || sy != 0.0)
                padfftslice->process_inplace("filter.shift", Dict("x_shift", sx, "y_shift", sy, "z_shift", 0.0f));

        int remove = slice->get_attr_default("remove", 0);
        padfftslice->set_attr( "remove", remove );

        padfftslice->center_origin_fft();
        return padfftslice;
}
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(), EMAN::EMData::set_array_offsets(), EMAN::EMData::set_attr(), EMAN::EMData::set_size(), and EMAN::EMData::update().

                       {
        // These are actual dimensions
        int nx  = f->get_xsize();
        int ny  = f->get_ysize();
        int nz  = f->get_zsize();

                // We manifestly assume no zero-padding here, just the
                // necessary extension along x for the fft

        if (f->is_complex()) nx = (nx - 2 + f->is_fftodd()); // nx is the real-space size of the input image
        int lsd2 = (nx + 2 - nx%2) / 2; // Extended x-dimension of the complex image

//  Process f if real
        EMData* fp = NULL;
        if(f->is_complex()) fp = f->copy(); // we need to make a full copy so that we don't damage the original
        else {
                
                fp = f->norm_pad(false, 1); // Extend and do the FFT if f is real
                fp->do_fft_inplace();


        }
        fp->set_array_offsets(1,1,1);

        //  Periodogram: fp:=|fp|**2
        for (int iz = 1; iz <= nz; iz++) {
                for (int iy = 1; iy <= ny; iy++) {
                        for (int ix = 1; ix <= lsd2; ix++) {
                                float fpr = real(fp->cmplx(ix,iy,iz));
                                float fpi = imag(fp->cmplx(ix,iy,iz));
                                fp->cmplx(ix,iy,iz) = fpr*fpr + fpi*fpi;
                        }
                }
        }
        //  Create power as a 3D array (-n/2:n/2+n%2-1)
        int nyt, nzt;
        int nx2 = nx/2;
        int ny2 = ny/2; if(ny2 == 0) nyt =0; else nyt=ny;
        int nz2 = nz/2; if(nz2 == 0) nzt =0; else nzt=nz;
        int nx2p = nx2+nx%2;
        int ny2p = ny2+ny%2;
        int nz2p = nz2+nz%2;
        EMData& power = *(new EMData()); // output image
        power.set_size(nx, ny, nz);
        power.set_array_offsets(-nx2,-ny2,-nz2);
//If instead of preservation of the norm one would prefer to have peak of a PW of a single sine wave equal one
//                             multiply power by the scale below, or the other way around.
        float scale = 4.0f/float (nx*nx)/float (ny*ny)/float (nz*nz);
        for (int iz = 1; iz <= nz; iz++) {
                int jz=iz-1; 
                if(jz>=nz2p) jz=jz-nzt;
                for (int iy = 1; iy <= ny; iy++) {
                        int jy=iy-1; 
                        if(jy>=ny2p) jy=jy-nyt;
                        for (int ix = 1; ix <= lsd2; ix++) {
                                int jx=ix-1;
                                if(jx>=nx2p) jx=jx-nx;
                                power(jx,jy,jz) = real(fp->cmplx(ix,iy,iz)) * scale;
                        }
                }
        }

//  Create the Friedel related half
        int  nzb, nze, nyb, nye, nxb, nxe;
        nxb =-nx2+(nx+1)%2;
        nxe = nx2-(nx+1)%2;
        if(ny2 == 0) {nyb =0; nye = 0;} else {nyb =-ny2+(ny+1)%2; nye = ny2-(ny+1)%2;}
        if(nz2 == 0) {nzb =0; nze = 0;} else {nzb =-nz2+(nz+1)%2; nze = nz2-(nz+1)%2;}
        for (int iz = nzb; iz <= nze; iz++) {
                for (int iy = nyb; iy <= nye; iy++) {
                        for (int ix = 1; ix <= nxe; ix++) { // Note this loop begins with 1 - FFT should create correct Friedel related 0 plane
                                power(-ix,-iy,-iz) = power(ix,iy,iz);
                        }
                }
        }
        if(ny2 != 0)  {
                if(nz2 != 0)  {
                        if(nz%2 == 0) {  //if nz even, fix the first slice
                                for (int iy = nyb; iy <= nye; iy++) {
                                        for (int ix = nxb; ix <= -1; ix++) {
                                                power(ix,iy,-nz2) = power(-ix,-iy,-nz2);
                                        }
                                }
                                if(ny%2 == 0) {  //if ny even, fix the first line
                                        for (int ix = nxb; ix <= -1; ix++) {
                                                power(ix,-ny2,-nz2) = power(-ix,-ny2,-nz2);
                                        }
                                }
                        }
                }
                if(ny%2 == 0) {  //if ny even, fix the first column
                        for (int iz = nzb; iz <= nze; iz++) {
                                for (int ix = nxb; ix <= -1; ix++) {
                                        power(ix,-ny2,-iz) = power(-ix,-ny2,iz);
                                }
                        }
                }
                
        }

        if( fp ) {
                delete fp; // avoid a memory leak!
                fp = 0;
        }
        //power[0][0][0]=power[1][0][0];  //Steve requested the original origin.
        
        int sz[3];
        sz[0] = nx;
        sz[1] = ny;
        sz[2] = nz;
        int max_size = *std::max_element(&sz[0],&sz[3]);
        // set the pixel size for the power spectrum, only ration of the frequency pixel size is considered     
        power.set_attr("apix_x", float(max_size)/nx);
        if(ny2 > 0) power.set_attr("apix_y", float(max_size)/ny);
        if(nz2 > 0) power.set_attr("apix_z", float(max_size)/nz);
        
        power.update();
        power.set_array_offsets(0,0,0);
        return &power;
//OVER AND OUT
}
EMData * EMAN::rdiv ( const EMData em,
float  n 
)

Definition at line 3099 of file emdata.cpp.

References operator/().

{
        return EMAN::operator/(n, em);
}
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]fFirst real-space image object. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in]KSecond 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, EMAN::EMData::set_array_offsets(), EMAN::EMData::set_size(), EMAN::EMData::to_zero(), and EMAN::EMData::update().

                                                {//Does not work properly in 3D, corners are not done, PAP 07/16/09
                // Kernel should be the smaller image
                int nxf=f->get_xsize(); int nyf=f->get_ysize(); int nzf=f->get_zsize();
                int nxK=K->get_xsize(); int nyK=K->get_ysize(); int nzK=K->get_zsize();
                if ((nxf<nxK)&&(nyf<nyK)&&(nzf<nzK)) {
                        // whoops, f smaller than K
                        swap(f,K); swap(nxf,nxK); swap(nyf,nyK); swap(nzf,nzK);
                } else if ((nxK<=nxf)&&(nyK<=nyf)&&(nzK<=nzf)) {
                        // that's what it should be, so do nothing
                        ;
                } else {
                        // incommensurate sizes
                        throw ImageDimensionException("input images are incommensurate");
                }
                // Kernel needs to be _odd_ in size
                if ((nxK % 2 != 1) || (nyK % 2 != 1) || (nzK % 2 != 1))
                        throw ImageDimensionException("Real-space convolution kernel"
                                " must have odd nx,ny,nz (so the center is well-defined).");
                EMData* result = new EMData();
                result->set_size(nxf, nyf, nzf);
                result->to_zero();
                // kernel corners, need to check for degenerate case
                int kxmin = -nxK/2; int kymin = -nyK/2; int kzmin = -nzK/2;
                int kxmax = (1 == nxK % 2) ? -kxmin : -kxmin - 1;
                int kymax = (1 == nyK % 2) ? -kymin : -kymin - 1;
                int kzmax = (1 == nzK % 2) ? -kzmin : -kzmin - 1;
                vector<int> K_saved_offsets = K->get_array_offsets();
                K->set_array_offsets(kxmin,kymin,kzmin);
                // interior boundaries, need to check for degenerate cases
                int izmin = 0, izmax = 0, iymin = 0, iymax = 0, ixmin = 0, ixmax = 0;
                if (1 != nzf) {
                        izmin = -kzmin;
                        izmax = nzf - 1 - kzmax;
                }
                if (1 != nyf) {
                        iymin = -kymin;
                        iymax = nyf - 1 - kymax;
                }
                if (1 != nxf) {
                        ixmin = -kxmin;
                        ixmax = nxf - 1 - kxmax;
                }
                // interior (no boundary condition issues here)
                for (int iz = izmin; iz <= izmax; iz++) {
                        for (int iy = iymin; iy <= iymax; iy++) {
                                for (int ix = ixmin; ix <= ixmax; ix++) {
                                        (*result)(ix,iy,iz) =
                                                mult_internal(*K, *f, 
                                                                      kzmin, kzmax, kymin, kymax, kxmin, kxmax,
                                                                          iz, iy, ix);
                                }
                        }
                }
                // corners
                // corner sizes, with checking for degenerate cases
                int sz = (1 == nzK) ? 1 : -kzmin + kzmax;
                int sy = (1 == nyK) ? 1 : -kymin + kymax;
                int sx = (1 == nxK) ? 1 : -kxmin + kxmax;
                // corner starting locations, with checking for degenerate cases
                int zstart = (0 == izmin) ? 0 : izmin - 1;
                int ystart = (0 == iymin) ? 0 : iymin - 1;
                int xstart = (0 == ixmin) ? 0 : ixmin - 1;
                // corners
                for (int cz = 0; cz < sz; cz++) {
                        int iz = (zstart - cz) % nzf;
                        if (iz < 0) iz += nzf;
                        for (int cy = 0; cy < sy; cy++) {
                                int iy = (ystart - cy) % nyf;
                                if (iy < 0) iy += nyf;
                                for (int cx=0; cx < sx; cx++) {
                                        int ix = (xstart - cx) % nxf;
                                        if (ix < 0) ix += nxf;
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, 
                                                                 kymax, kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                // remaining stripes -- should use a more elegant (non-3D-specific) method here
                // ix < ixmin
                for (int ix = 0; ix < ixmin; ix++) {
                        for (int iy = iymin; iy <= iymax; iy++) {
                                for (int iz = izmin; iz <= izmax; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                // ix > ixmax
                for (int ix = ixmax+1; ix < nxf; ix++) {
                        for (int iy = iymin; iy <= iymax; iy++) {
                                for (int iz = izmin; iz <= izmax; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                // iy < iymin
                for (int iy = 0; iy < iymin; iy++) {
                        for (int ix = ixmin; ix <= ixmax; ix++) {
                                for (int iz = izmin; iz <= izmax; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                // iy > iymax
                for (int iy = iymax+1; iy < nyf; iy++) {
                        for (int ix = ixmin; ix <= ixmax; ix++) {
                                for (int iz = izmin; iz <= izmax; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                // iz < izmin
                for (int iz = 0; iz < izmin; iz++) {
                        for (int ix = ixmin; ix <= ixmax; ix++) {
                                for (int iy = iymin; iy <= iymax; iy++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                // iz > izmax
                for (int iz = izmax+1; iz < nzf; iz++) {
                        for (int ix = ixmin; ix <= ixmax; ix++) {
                                for (int iy = iymin; iy <= iymax; iy++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                
                
                // ix < ixmin, iy < iymin
                for (int ix = 0; ix < ixmin; ix++) {
                        for (int iy = 0; iy < iymin; iy++) {
                                for (int iz = izmin; iz <= izmax; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                
                // ix < ixmin, iy > iymax
                for (int ix = 0; ix < ixmin; ix++) {
                        for (int iy = iymax+1; iy < nyf; iy++) {
                                for (int iz = izmin; iz <= izmax; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }

        // ix > ixmax, iy < iymin
                for (int ix = ixmax+1; ix < nxf; ix++) {
                        for (int iy = 0; iy < iymin; iy++) {
                                for (int iz = izmin; iz <= izmax; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                
                // ix > ixmax, iy > iymax
                for (int ix = ixmax+1; ix < nxf; ix++) {
                        for (int iy = iymax+1; iy < nyf; iy++) {
                                for (int iz = izmin; iz <= izmax; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }


                
        // ix < ixmin, iz < izmin
                for (int ix = 0; ix < ixmin; ix++) {
                        for (int iy = iymin; iy <= iymax; iy++) {
                                for (int iz = 0; iz < izmin; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                
                 // ix < ixmin, iz > izmax
                for (int ix = 0; ix < ixmin; ix++) {
                        for (int iy = iymin; iy <= iymax; iy++) {
                                for (int iz = izmax+1; iz < nzf; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }


         // ix > ixmin, iz < izmin
                for (int ix = ixmax+1; ix < nxf; ix++) {
                        for (int iy = iymin; iy <= iymax; iy++) {
                                for (int iz = 0; iz < izmin; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                
                 // ix > ixmin, iz > izmax
                for (int ix = ixmax+1; ix < nxf; ix++) {
                        for (int iy = iymin; iy <= iymax; iy++) {
                                for (int iz = izmax+1; iz < nzf; iz++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }

                

       // iy < iymin, iz < izmin
           
           for (int iz = 0; iz < izmin; iz++) {
                        for (int ix = ixmin; ix <= ixmax; ix++) {
                                for (int iy = 0; iy < iymin; iy++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }


       // iy < iymin, iz > izmax
           
           for (int iz = izmax+1; iz < nzf; iz++) {
                        for (int ix = ixmin; ix <= ixmax; ix++) {
                                for (int iy = 0; iy < iymin; iy++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }
                
                
                // iy > iymax, iz < izmin
           
           for (int iz = 0; iz < izmin; iz++) {
                        for (int ix = ixmin; ix <= ixmax; ix++) {
                                for (int iy = iymax+1; iy < nyf; iy++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }


       // iy > iymax, iz > izmax
           
           for (int iz = izmax+1; iz < nzf; iz++) {
                        for (int ix = ixmin; ix <= ixmax; ix++) {
                                for (int iy = iymax+1; iy < nyf; iy++) {
                                        (*result)(ix,iy,iz) =
                                                mult_circ(*K, *f, kzmin, kzmax, kymin, kymax, 
                                                                 kxmin, kxmax,
                                                                 nzf, nyf, nxf, iz, iy, ix);
                                }
                        }
                }

                
                K->set_array_offsets(K_saved_offsets);
                result->update();
                return result;
        }
EMData* EMAN::rscp ( EMData *  f)

Real-space convolution with the K-B window.

Purpose: Calculate the convolution with the K-B window.
Parameters:
[in]fFirst 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 3094 of file emdata.cpp.

References operator-().

Referenced by main().

{
        return EMAN::operator-(n, em);
}
EMData* EMAN::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]fImage object, either a real-space image or a Fourier image. Image may be 1-, 2-, or 3-dimensional. Image f is not changed.
[in]myflagProcessing flag (see above).
[in]center
Returns:
Real-space self-correlation image.

Definition at line 206 of file fundamentals.h.

References fourierproduct(), and SELF_CORRELATION.

                                                                                {
                return fourierproduct(f, NULL, myflag, SELF_CORRELATION, center);
        }
Vector3 EMAN::unit ( const Vector3 &  v) [inline]

Definition at line 318 of file vecmath.h.

References EMAN::Vector3::length().

{ const double len = v.length(); return v / len; }
Vector4 EMAN::unit ( const Vector4 &  v) [inline]

Definition at line 689 of file vecmath.h.

References EMAN::Vector4::length().

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

Variable Documentation

const int EMAN::MAXFFT = 32768 [static]

Definition at line 49 of file polardata.h.

Referenced by alprbs(), and Numrinit().