## Concept

mrcImage.h

## Data Structure

## Member Function

- Momory Control for mrcImage
  - mrcInit
  - mrcImageFree
- File Control for mrcImage-formatted file
  - mrcFileRead
      mrcHeaderRead and mrcImageRead
      No initialization is required.
      - mrcImageRead
      Read image following header information
      - mrcHeaderRead
  - mrcFileWrite
- Subtration : in lmrcImageSubtraction.c
  lmrcImageSubtraction(mrcImage* out, mrcImage* in, double value);
    out := in - value
  lmrcImageMeanSubtraction(mrcImage* out, mrcImage* in);
    out := in - mean of in
  lmrcImageMinSubtraction(mrcImage* out, mrcImage* in);
    out := in - min of in
  lmrcImageMaxSubtraction(mrcImage* out, mrcImage* in);
    out := in - max of in
  lmrcImageSubtractionCalc(mrcImage* out, mrcImage* in1, mrcImage* in2);
    out := in1 - in2
- Rotation : in lmrcImageRotation.c : mrcImage.h
  3D: lmrcImageRotation3DFollowingEulerAngle
    Rotation of a 3D image
  3D: lmrcImageRotation3DZXY
    Rotation ZXY of a 3D image
  2D: lmrcImageRotation2D
    Rotation of a 2D image
  2D: lmrcImageRotationPeriodicBoundary
    Rotation of a 2D image
- Correlation : in lmrcImageCorrelation
  double lmrcImageEuclidDistanceCalc(mrcImage* in1, mrcImage* in2, int mode)
    return Euclid Distnce
    - 0: sigmai(in1i - in2i)2
    - 1: sqrt(sigmai(in1i - in2i)2)
    - 2: the above number / pixelNumber;
  lmrcImageCorralation(mrcImage* out, mrcImage* in, mrcImage* ref, long mode);
  void lmrcImageCorrelationRefinement(mrcImage* out, mrcImage* shift, mrcImage* in, mrcImage* ref, lmrcImageCorrelationRefinementInfo* info, long mode)
    While two images are shifted in Fourier space, i.e. phase shift, the best match is searched.
  double lmrcImageLinearCorrelation(mrcImage* in1, mrcImage* in2, long mode)
    Calculate the linear correlation, i.e. statistical correlation
  void lmrcImageAutoRotationCorrelation(mrcImage* out, mrcImage* cor, mrcImage* in, mrcImage* ref, lmrcImageAutoRotationCorrelationInfo* linfo, int mode)
    While a reference image is rotated, lmrcImageCorrelation is used.
  void lmrcImageAutoRotationCorrelationRotationalCrossCorrelationFunction( mrcImage* out, mrcImage* cor, mrcImage* in, mrcImage* ref, lmrcImageAutoRotationCorrelationInfo* linfo, int mode)
    After two images are tranformed from Descartes into Polar coordinates, lmrcImageCorrelation is used.
  void lmrcImageAutoRotationCorretionForManyReferences(mrcImage* in, mrcImage* ref, lmrcImageAutoRotationCorrelationForManyReferencesInfo* info, lmrcImageAutoRotationCorrelationInfo* linfo, int mode)
    Auto Rotational correlation for many references.
- Classifilcation
  - ClusterAnalysis
    - lmrcImageClusterAnalysis
    - lmrcImageClusterAnalysisByIteration
    - lmrcImageDistanceCalc
      - lmrcImageDistanceCalc0
          Interface method for DistanceCalc
          - lmrcImageDistanceCalc
          - lmrcImageDistanceCalcWithAutoRotation
          - lmrcImageDistanceCalcByWardMethod
          - lmrcImageDistanceCalcByWardMethodWithAutoRotation
      - lmrcImageClusterMerge
      - lmrcImageClusterAnalysisDistanceToLog(FILE* fpt, ...);
          Output the log file during analysis