OSDN Git Service

Bug fixed:
authorTakuo Yasunaga <yasunaga@bio.kyutech.ac.jp>
Thu, 31 Jul 2014 18:27:55 +0000 (03:27 +0900)
committerTakuo Yasunaga <yasunaga@bio.kyutech.ac.jp>
Thu, 31 Jul 2014 18:27:55 +0000 (03:27 +0900)
Change lmrcImageDevidedByReal to lmrcImageDividedByReal.

modified:   src/Objects/DataManip/transform/src/lmrc2Dto3D.c
modified:   src/Tools/mrcImage/mrcImage3DSymmetryFind/src/mrcImage3DSymmetryFind.c
modified:   src/Tools/mrcImage/mrcImageCorrelation/src/mrcImageCorrelation.c
modified:   src/Tools/mrcImage/mrcImageUnbentROI/src/mrcImageUnbentROI.c

Filename Changed
deleted:    src/Objects/DataManip/mrcImage/src/1
deleted:    src/Objects/DataManip/mrcImage/src/lmrcImagePrevitt.c

26 files changed:
hostdepend/X86MAC64/bin/X86MAC64/mrc2Dto3D
hostdepend/X86MAC64/bin/X86MAC64/mrcImage3DSymmetryFind
hostdepend/X86MAC64/bin/X86MAC64/mrcImageCorrelation
hostdepend/X86MAC64/bin/X86MAC64/mrcImageSymmetryFind
hostdepend/X86MAC64/bin/X86MAC64/mrcImageUnbentROI
hostdepend/X86MAC64/lib/X86MAC64/libEosObjects.a
hostdepend/X86MAC64/lib/X86MAC64/libtransform.a
hostdepend/X86MAC64/lib/X86MAC64/shared/lmrc2Dto3D.sharedo
hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/libtransform.a
hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/libtransform.debug.a
hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/lmrc2Dto3D.sharedo
hostdepend/X86MAC64/src/Tools/mrcImage/mrcImage3DSymmetryFind/src/X86MAC64/mrcImage3DSymmetryFind
hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageCorrelation/src/X86MAC64/mrcImageCorrelation
hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageSymmetryFind/src/X86MAC64/mrcImageSymmetryFind
hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageUnbentROI/src/X86MAC64/mrcImageUnbentROI
hostdepend/X86MAC64/src/Tools/rec3d/mrc2Dto3D/src/X86MAC64/mrc2Dto3D
src/Objects/DataManip/mrcImage/src/1 [deleted file]
src/Objects/DataManip/mrcImage/src/lmrcImagePrevitt.c [deleted file]
src/Objects/DataManip/transform/src/lmrc2Dto3D.c
src/Tools/mrcImage/mrcImage3DSymmetryFind/src/mrcImage3DSymmetryFind.c
src/Tools/mrcImage/mrcImage3DSymmetryFind/src/mrcImage3DSymmetryFind.html
src/Tools/mrcImage/mrcImageCorrelation/src/mrcImageCorrelation.c
src/Tools/mrcImage/mrcImageCorrelation/src/mrcImageCorrelation.html
src/Tools/mrcImage/mrcImageUnbentROI/src/mrcImageUnbentROI.c
src/Tools/mrcImage/mrcImageUnbentROI/src/mrcImageUnbentROI.html
src/Tools/rec3d/mrc2Dto3D/src/mrc2Dto3D.html

index 9f39fd4..883dbfd 100755 (executable)
Binary files a/hostdepend/X86MAC64/bin/X86MAC64/mrc2Dto3D and b/hostdepend/X86MAC64/bin/X86MAC64/mrc2Dto3D differ
index a2f1511..f3bc7b7 100755 (executable)
Binary files a/hostdepend/X86MAC64/bin/X86MAC64/mrcImage3DSymmetryFind and b/hostdepend/X86MAC64/bin/X86MAC64/mrcImage3DSymmetryFind differ
index 2a5c5a7..eb7a3f7 100755 (executable)
Binary files a/hostdepend/X86MAC64/bin/X86MAC64/mrcImageCorrelation and b/hostdepend/X86MAC64/bin/X86MAC64/mrcImageCorrelation differ
index 223497f..3059a61 100755 (executable)
Binary files a/hostdepend/X86MAC64/bin/X86MAC64/mrcImageSymmetryFind and b/hostdepend/X86MAC64/bin/X86MAC64/mrcImageSymmetryFind differ
index c828d2f..b33dc54 100755 (executable)
Binary files a/hostdepend/X86MAC64/bin/X86MAC64/mrcImageUnbentROI and b/hostdepend/X86MAC64/bin/X86MAC64/mrcImageUnbentROI differ
index 67d3646..d4d5e40 100644 (file)
Binary files a/hostdepend/X86MAC64/lib/X86MAC64/libEosObjects.a and b/hostdepend/X86MAC64/lib/X86MAC64/libEosObjects.a differ
index 145a38d..2012717 100644 (file)
Binary files a/hostdepend/X86MAC64/lib/X86MAC64/libtransform.a and b/hostdepend/X86MAC64/lib/X86MAC64/libtransform.a differ
index e3a96c1..f1bfecd 100644 (file)
Binary files a/hostdepend/X86MAC64/lib/X86MAC64/shared/lmrc2Dto3D.sharedo and b/hostdepend/X86MAC64/lib/X86MAC64/shared/lmrc2Dto3D.sharedo differ
index 145a38d..2012717 100644 (file)
Binary files a/hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/libtransform.a and b/hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/libtransform.a differ
index 040b816..fc9fd0c 100644 (file)
Binary files a/hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/libtransform.debug.a and b/hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/libtransform.debug.a differ
index e3a96c1..f1bfecd 100644 (file)
Binary files a/hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/lmrc2Dto3D.sharedo and b/hostdepend/X86MAC64/src/Objects/DataManip/transform/src/X86MAC64/lmrc2Dto3D.sharedo differ
index a2f1511..f3bc7b7 100755 (executable)
Binary files a/hostdepend/X86MAC64/src/Tools/mrcImage/mrcImage3DSymmetryFind/src/X86MAC64/mrcImage3DSymmetryFind and b/hostdepend/X86MAC64/src/Tools/mrcImage/mrcImage3DSymmetryFind/src/X86MAC64/mrcImage3DSymmetryFind differ
index 2a5c5a7..eb7a3f7 100755 (executable)
Binary files a/hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageCorrelation/src/X86MAC64/mrcImageCorrelation and b/hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageCorrelation/src/X86MAC64/mrcImageCorrelation differ
index 223497f..3059a61 100755 (executable)
Binary files a/hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageSymmetryFind/src/X86MAC64/mrcImageSymmetryFind and b/hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageSymmetryFind/src/X86MAC64/mrcImageSymmetryFind differ
index c828d2f..b33dc54 100755 (executable)
Binary files a/hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageUnbentROI/src/X86MAC64/mrcImageUnbentROI and b/hostdepend/X86MAC64/src/Tools/mrcImage/mrcImageUnbentROI/src/X86MAC64/mrcImageUnbentROI differ
index aae17fc..883dbfd 100755 (executable)
Binary files a/hostdepend/X86MAC64/src/Tools/rec3d/mrc2Dto3D/src/X86MAC64/mrc2Dto3D and b/hostdepend/X86MAC64/src/Tools/rec3d/mrc2Dto3D/src/X86MAC64/mrc2Dto3D differ
diff --git a/src/Objects/DataManip/mrcImage/src/1 b/src/Objects/DataManip/mrcImage/src/1
deleted file mode 100755 (executable)
index af75b1d..0000000
+++ /dev/null
@@ -1,836 +0,0 @@
-/*
-# lmrcImageCorrelation : $Revision$  
-# $Date$ 
-# Created by $Author$
-# Usage : lmrcImageCorrelation 
-# Attention
-#   $Loccker$
-#      $State$ 
-#
-*/
-/* $Log$ */
-
-static char __sccs_id[] = "%Z%lmrcImageCorrelation ver%I%; Date:%D% %Z%";
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#undef DEBUG
-#include "genUtil.h"
-#include "../inc/mrcImage.h"       
-#include "./lmrcImageCorrelation.h"
-#include "lDescartesIntoPolar.h"
-#include "./lmrcImageTransformDescartesIntoPolar.h"
-#include "Map2D.h"
-
-/* 
-       $lmrcImageEuclidDistanceCalc:  Calculate Euclid distance between two images $
-               $arg: in1:  input mrcImage1 $
-               $arg: in2:  input mrcImage2 $
-               $arg: mode: input int $
-               $mode: 0 Sum of SQR $
-               $mode: 1 Distance $
-               $mode: 2 normalized by pixel number
-               $return: EuclidDistance $
-*/
-double 
-lmrcImageEuclidDistanceCalc(mrcImage* in1, mrcImage* in2, int mode)
-{
-       double data1, data2;
-       double data;
-       mrcImageParaTypeReal x, y, z;
-       int count;
-       if(in1->HeaderN.x!=in2->HeaderN.x
-        ||in1->HeaderN.y!=in2->HeaderN.y
-        ||in1->HeaderN.z!=in2->HeaderN.z) {
-               fprintf(stderr, "Attention in lmrcImageEuclidDistanceCalc\n");
-               fprintf(stderr, "size is different (%f, %f, %f) != (%f, %f, %f)\n", 
-                       in1->HeaderN.x, in1->HeaderN.y, in1->HeaderN.z,
-                       in2->HeaderN.x, in2->HeaderN.y, in2->HeaderN.z);
-       }
-       data = 0.0;
-       for(z=0; z<in1->HeaderN.z; z++) {
-       for(y=0; y<in1->HeaderN.y; y++) {
-       for(x=0; x<in1->HeaderN.x; x++) {
-                mrcPixelDataGet(in1 ,x ,y ,z ,&data1 ,mrcPixelRePart ,mrcPixelHowNearest);
-                mrcPixelDataGet(in2 ,x ,y ,z ,&data2 ,mrcPixelRePart ,mrcPixelHowNearest);
-                data += SQR(data2-data1);
-       }
-       }
-       }
-       count = in1->HeaderN.x*in1->HeaderN.y*in1->HeaderN.z;
-
-       switch(mode&0x01) {
-               case 0: {
-                       break;
-               }
-               case 1: {
-                       if(data!=0) {
-                               data = sqrt(data);
-                       }
-                       break;
-               }
-       } 
-
-       if(mode&0x02) {
-               data /= count;
-       }
-
-       return data;
-}
-
-/*
-
-*/
-void
-lmrcImageAutoRotationCorrelationRotationalCrossCorrelationFunction(
-       mrcImage* out,  mrcImage* cor, 
-    mrcImage* in, mrcImage* ref, 
-       lmrcImageAutoRotationCorrelationInfo* linfo, int mode)
-{
-       mrcImage inPolar;
-       mrcImage refPolar;
-       mrcImage Cor;
-       lmrcImageTransformDescartesIntoPolarInfo llinfoIn;
-       lmrcImageTransformDescartesIntoPolarInfo llinfoRef;
-       lDescartesIntoPolarInfo                  llinfo2In;
-       lDescartesIntoPolarInfo                  llinfo2Ref;
-
-       llinfoIn.dr     = ref->HeaderLength.x; 
-       llinfoIn.dphi   = 2*M_PI/linfo->nRot;
-       llinfoIn.dtheta = 2*M_PI;
-       llinfoIn.flagImageCentreIsGravityCentre = 1;
-       llinfoIn.flagDescartesIntoPolarInfo    = 0;
-       llinfoIn.flagrWeight                    = 1;
-       llinfoRef = llinfoIn;
-       lmrcImageTransformDescartesIntoPolar(&inPolar,  in,  &llinfoIn,  &llinfo2In, 0);  
-       lmrcImageTransformDescartesIntoPolar(&refPolar, ref, &llinfoRef, &llinfo2Ref, 0);  
-       lmrcImageCorrelation(&Cor, &inPolar, &refPolar, mode);
-       linfo->corInfo.mode = meanOfAll;
-       lmrcImageInformation(&(linfo->corInfo), &Cor);
-       linfo->max      = linfo->corInfo.max;
-       linfo->maxP     = linfo->corInfo.maxCoord;
-       linfo->maxTheta = linfo->maxP.x*llinfoIn.dphi;
-       mrcImageFree(&inPolar, 0);
-       mrcImageFree(&refPolar, 0);
-       mrcImageFree(&Cor, 0);
-}
-
-/*
-       lmrcImageAutoRotationCorrelation
-*/
-
-void
-lmrcImageAutoRotationCorrelation(mrcImage* out,  mrcImage* cor, 
-                                 mrcImage* in, mrcImage* ref, 
-                                                                lmrcImageAutoRotationCorrelationInfo* linfo, int mode)
-{
-       int i;
-       int ntheta;
-       float dtheta;
-       float theta;
-       float minTheta;
-       float maxTheta;
-       float maxOld;
-       double current;
-       mrcImageParaTypeRealCoord currentp;
-       mrcImage rotproj;
-       mrcImage inFFT;
-       mrcImage inImage;
-       double data;
-       mrcImageParaTypeReal x, y, z;
-
-       DEBUGPRINT("Start lmrcImageAutoRotationCorrelation---\n");
-       /* 
-               Real Space to Fourier Space 
-                       Set inImage and inFFT 
-       */
-       if(IsImage(in, "IsImage", 0)) {
-               lmrcImageFFT(&inFFT, in, 0);
-               inImage = *in;
-       } else if(IsFT(in, "IsFT", 0)) {
-               lmrcImageFFT(&inImage, in, 0);
-               inFFT = *in;
-       } else {
-               fprintf(stderr, "Not supported mode: %ld\n", in->HeaderMode);
-       }
-       
-       /* 
-               Calculate corralation between in and rotated ref 
-                       Set search area
-       */
-       if(linfo->flagRestrictionArea == 1) {
-               minTheta = linfo->thetaMin;
-               maxTheta = linfo->thetaMax;
-       } else {
-               minTheta = 0;                       /* minimum theta */  
-               maxTheta = 2.0*M_PI;                            /* maximum theta */
-       }
-       ntheta = linfo->nRot;                     /* Number of Rotation */
-       dtheta = (maxTheta-minTheta)/ntheta;  /* Delta of Rotation */  
-       linfo->corInfo.mode = meanOfAll;
-
-       DEBUGPRINT4("nRot: %d %f<->%f delta %f\n", ntheta, maxTheta, minTheta, dtheta);
-
-       switch(linfo->Method) {
-               case lmrcImageAutoRotationCorrelationMethodRotationAndCorrelation:
-               case lmrcImageAutoRotationCorrelationMethodRotationAndCorrelationSSDA: {
-                       current  = -1e30; linfo->max = maxOld = -1e30; /* Initial */ 
-                       for(i=0; i<linfo->iter; i++) {
-                               for(theta=minTheta; theta<maxTheta; theta+=dtheta) {
-                                       /* Rotate ref to rotproj */ 
-                                       fprintf(stderr, "nRot: %d theta: %f %f<->%f delta %f\n", ntheta, theta*DEGREE, maxTheta*DEGREE, minTheta*DEGREE, dtheta*DEGREE);
-                                       DEBUGPRINT5("nRot: %d theta: %f %f<->%f delta %f\n", ntheta, theta, maxTheta, minTheta, dtheta);
-                                       lmrcImageRotation2DPeriodicBoundary(&rotproj, ref, theta, mrcPixelHowLinear); 
-                                       switch(linfo->Method) {
-                                               case lmrcImageAutoRotationCorrelationMethodRotationAndCorrelation: {
-                                                       lmrcImageCorrelation(cor, &inFFT, &rotproj, mode); 
-                                                       if(linfo->flagXshiftOnly) {
-                                                               current = -1e30;
-                                                               for(x=0; x<cor->HeaderN.x; x++) {
-                                                                       mrcPixelDataGet(cor, x, 0, 0, &data, mrcPixelRePart, mrcPixelHowNearest);
-                                                                       if(current<data) {
-                                                                               current    = data;
-                                                                               currentp.x = x; 
-                                                                               currentp.y = 0.0;
-                                                                               currentp.z = 0.0;
-                                                                       }
-                                                               }
-                                                       } else if(linfo->flagNoShift) {
-                                                               currentp.x = currentp.y = currentp.z = 0.0;
-                                                               mrcPixelDataGet(cor, 0, 0, 0, &data, mrcPixelRePart, mrcPixelHowNearest);
-                                                               current = data;   
-                                                       } else if(linfo->flagShiftRange) {
-                                                               DEBUGPRINT("ShiftRange Restruction\n");
-                                                               mrcPixelDataGet(cor, 0, 0, 0, &current, mrcPixelRePart, mrcPixelHowNearest);
-                                                               for(x=linfo->shiftMinX; x<=linfo->shiftMaxX; x++) {
-                                                               for(y=linfo->shiftMinY; y<=linfo->shiftMaxY; y++) {
-                                                                       mrcPixelDataGet(cor, x, y, 0, &data, mrcPixelRePart, mrcPixelHowNearest);
-                                                                       if(current<data) {
-                                                                               currentp.x = x;
-                                                                               currentp.y = y;
-                                                                               currentp.z = 0.0;
-                                                                               current = data;
-                                                                       }
-                                                               }
-                                                               }
-                                                       } else {
-                                                               lmrcImageInformation(&(linfo->corInfo), cor);
-                                                               current  = linfo->corInfo.max;
-                                                               currentp = linfo->corInfo.maxCoord;
-                                                       }
-                                                       break;
-                                               }
-                                               case lmrcImageAutoRotationCorrelationMethodRotationAndCorrelationSSDA: {
-                                                       lmrcImageSSDAAutomaticThresholdAndFineSearch(&inImage, &rotproj, &linfo->SSDAInfo, mode);
-                                                       current = 1/(1+linfo->SSDAInfo.Error);
-                                                       currentp = linfo->SSDAInfo.optimump;
-                                                       DEBUGPRINT4("Angle: %15.6f Correlation: %15.6g at %15.6f %15.6f :: CurrentMax :: Linear \n", 
-                                                               theta*DEGREE, current, currentp.x, currentp.y);
-                                                       break;
-                                               }
-                                               default: {
-                                                       fprintf(stderr, "Not supported Method in lmrcImageAutoRotationCorrelation: %d\n", 
-                                                               linfo->Method);
-                                                       exit(EXIT_FAILURE);
-                                                       break;
-                                               }
-                                       }
-                                       if(linfo->max<current) { /* When bettern correlation */ 
-                                               linfo->max      = current;
-                                               linfo->maxTheta = theta;
-                                               linfo->maxP     = currentp;
-                                               DEBUGPRINT4("Angle: %15.6f Correlation: %15.6g at %15.6f %15.6f :: CurrentMax :: Linear \n", 
-                                                       theta*DEGREE, current, currentp.x, currentp.y);
-                                               fprintf(stderr, "Angle: %15.6f Correlation: %15.6g at %15.6f %15.6f :: CurrentMax :: Linear \n", 
-                                                       theta*DEGREE, current, currentp.x, currentp.y);
-                                       }
-                                       mrcImageFree(&rotproj, 0);
-                                       mrcImageFree(cor, 0);
-                               }
-                               /*
-                               if(fabs(maxOld+linfo->max)!=0) {
-                                       if(fabs(maxOld-linfo->max)/fabs(maxOld+linfo->max)<1e-6) {
-                                               break;
-                                       } else {
-                                               maxOld = linfo->max;
-                                               minTheta = linfo->maxTheta - dtheta; 
-                                               maxTheta = linfo->maxTheta + dtheta; 
-                                               dtheta  /= 10.0;
-                                       }
-                               } else {
-                                       maxOld = linfo->max;
-                                       minTheta = linfo->maxTheta - dtheta; 
-                                       maxTheta = linfo->maxTheta + dtheta; 
-                                       dtheta  /= 10.0;
-                               }
-                               */
-                               maxOld = linfo->max;
-                               minTheta = linfo->maxTheta - dtheta; 
-                               maxTheta = linfo->maxTheta + dtheta; 
-                               dtheta  /= 10.0;
-                       }
-                       break;
-               }
-               case lmrcImageAutoRotationCorrelationMethodRotationalFunction: { /* Rotational Correlation Function */
-                       lmrcImageAutoRotationCorrelationRotationalCrossCorrelationFunction(out, cor, in, ref, linfo, mode);
-                       break;
-               }
-               default: {
-                       fprintf(stderr, "Not supported Method in lmrcImageAutoRotationCorrelation: %d\n", linfo->Method);
-                       exit(EXIT_FAILURE);
-                       break;
-               }
-       }
-       /* Calculate final correlation map and correlation peak */
-       lmrcImageRotation2DPeriodicBoundary(&rotproj, ref, linfo->maxTheta, mrcPixelHowCubicConv); 
-       lmrcImageCorrelation(cor, &inFFT, &rotproj, mode);
-       
-       if(linfo->flagXshiftOnly) {
-               linfo->max = -1e30;
-               for(x=0; x<cor->HeaderN.x; x++) {
-                       mrcPixelDataGet(cor, x, 0, 0, &data, mrcPixelRePart, mrcPixelHowNearest);
-                       if(linfo->max<data) {
-                               linfo->max    = data;
-                               linfo->maxP.x = x;
-                               linfo->maxP.y = 0.0;
-                               linfo->maxP.z = 0.0;
-                       }
-               }
-       } else if(linfo->flagNoShift) {
-               mrcPixelDataGet(cor, 0, 0, 0, &data, mrcPixelRePart, mrcPixelHowNearest);
-               linfo->max = data;
-               linfo->maxP.x = linfo->maxP.y = linfo->maxP.z = 0.0;
-       } else if(linfo->flagShiftRange) {
-               DEBUGPRINT("Last ShiftRange Restruction\n");
-               DEBUGPRINT4("Angle: %15.6f Correlation: %15.6f at %15.6f %15.6f :: MaxPoint:: Cubic\n", \
-                       linfo->maxTheta*DEGREE, linfo->maxP.x, linfo->maxP.y, linfo->corInfo.maxP.z); 
-       } else {
-               linfo->corInfo.mode = meanOfAll;
-               lmrcImageInformation(&(linfo->corInfo), cor);
-               DEBUGPRINT4("Angle: %15.6f Correlation: %15.6f at %15.6f %15.6f :: MaxPoint:: Cubic\n", \
-                       linfo->maxTheta*DEGREE, linfo->corInfo.max, linfo->corInfo.maxCoord.x, linfo->corInfo.maxCoord.y); 
-               linfo->max  = linfo->corInfo.max;
-               linfo->maxP = linfo->corInfo.maxCoord;
-       }
-       mrcImageFree(&rotproj, 0);
-
-       /* Calculate outImage from inImage */
-       currentp.x = -linfo->maxP.x;
-       currentp.y = -linfo->maxP.y;
-       currentp.z = -linfo->maxP.z;
-       lmrcImageShift(&rotproj, &inImage, currentp, mrcPixelHowCubicConv); 
-       lmrcImageRotation2DPeriodicBoundary(out, &rotproj, -linfo->maxTheta, mrcPixelHowCubicConv); 
-       //lmrcImageRotation2DPeriodicBoundary(&rotproj, &inImage, -linfo->maxTheta, mrcPixelHowCubicConv); 
-       //lmrcImageShift(&out, &rotproj, currentp, mrcPixelHowCubicConv); 
-       linfo->EuclidDistance    = lmrcImageEuclidDistanceCalc(out, ref, 1);  
-       linfo->LinearCorrelation = lmrcImageLinearCorrelation (out, ref, 1);  
-       DEBUGPRINT1("EuclidDistance:    %f \n", linfo->EuclidDistance); 
-       DEBUGPRINT1("LinearCorrelation: %f \n", linfo->LinearCorrelation); 
-
-       mrcImageFree(&rotproj, 0);
-       if(IsImage(in, "IsImage", 0)) {
-               mrcImageFree(&inFFT, 0);
-       } else if(IsFT(in, "IsFT", 0)) {
-               mrcImageFree(&inImage, 0);
-       } else {
-               fprintf(stderr, "Not supported mode: %ld\n", in->HeaderMode);
-       }
-}
-
-void
-lmrcImageCorrelationRefinement(mrcImage* out, mrcImage* shift, mrcImage* in, mrcImage* ref, lmrcImageCorrelationRefinementInfo* info, long mode)
-{
-    mrcImage inFFT;
-    mrcImage refFFT;
-    mrcImage shiftFFT;
-       long     flagIn  = 0;
-       long     flagRef = 0;
-       mrcImageParaTypeReal  x,  y,  z;
-       mrcImageParaTypeReal ix, iy, iz;
-       mrcImageParaTypeReal nx, ny, nz;
-       mrcImageParaTypeReal sx, sy, sz;
-       mrcImageParaTypeReal dx, dy, dz;
-       mrcImageParaTypeReal X, Y, Z;
-       double mag, phase;
-       double rmag, rphase;
-       double eval;
-       double sum;
-       double deltaPhase;
-       double dp;
-
-    if(IsImage(in, "", 0)&&IsImage(ref, "", 0)) {
-        lmrcImageFFT(&inFFT,  in, 0);
-        lmrcImageFFT(&refFFT, ref, 0);
-               flagIn = flagRef = 1;
-    } else if(IsFT(in, "", 0)&&IsImage(ref, "", 0)) {
-        inFFT = *in;
-        lmrcImageFFT(&refFFT, ref, 0);
-               flagRef = 1;
-    } else if(IsImage(in, "", 0)&&IsFT(ref, "", 0)) {
-        lmrcImageFFT(&inFFT,  in, 0);
-        refFFT = *ref;
-               flagIn = 1;
-    } else if(IsFT(in, "", 0)&&IsFT(ref, "", 0)) {
-        inFFT = *in;
-        refFFT = *ref;
-    } else {
-        fprintf(stderr, "Nut supported Mode (in %ld, ref %ld)\n", in->HeaderMode, ref->HeaderMode);
-        exit(EXIT_FAILURE);
-       }
-
-       if(1<in->HeaderN.x) {
-               sx = info->shift.x - info->range.x; 
-               nx = 2*info->range.x/info->step.x + 1;
-       } else {
-               sx = 0;
-               nx = 1;
-       }
-       if(1<in->HeaderN.y) {
-               sy = info->shift.y - info->range.y; 
-               ny = 2*info->range.y/info->step.y + 1;
-       } else {
-               sy = 0;
-               ny = 1;
-       }
-       if(1<in->HeaderN.z) {
-               sz = info->shift.z - info->range.z; 
-               nz = 2*info->range.z/info->step.z + 1;
-       } else {
-               sz = 0;
-               nz = 1;
-       }
-       dx = info->step.z;
-       dy = info->step.z;
-       dz = info->step.z;
-
-       mrcDefaultHeaderValueSet(out);
-       out->HeaderN.x = nx;
-       out->HeaderN.y = ny;
-       out->HeaderN.z = nz;
-       out->HeaderMode = mrcFloatImage;
-       out->HeaderLength.x = dx*in->HeaderLength.x;
-       out->HeaderLength.y = dy*in->HeaderLength.y;
-       out->HeaderLength.z = dz*in->HeaderLength.z;
-       mrcInit(out, NULL);
-
-       for(ix=0, x=sx; ix<nx; ix++, x+=dx) {
-       for(iy=0, y=sy; iy<ny; iy++, y+=dy) {
-       for(iz=0, z=sz; iz<nz; iz++, z+=dz) {
-               eval = sum = 0.0;
-               for(X=0;                  X<=in->HeaderN.x/2.0; X++) {
-               for(Y=-in->HeaderN.y/2.0; Y< in->HeaderN.y/2.0; Y++) {
-               for(Z=-in->HeaderN.z/2.0; Z< in->HeaderN.z/2.0; Z++) {
-                       deltaPhase = -2*M_PI*x*X/in->HeaderN.x 
-                                                -2*M_PI*y*Y/in->HeaderN.y
-                                                -2*M_PI*z*Z/in->HeaderN.z;
-                       mrcPixelDataGet(&inFFT, X, Y, Z, &mag,    mrcPixelMag,   mrcPixelHowNearest);
-                       mrcPixelDataGet(&inFFT, X, Y, Z, &phase,  mrcPixelPhase, mrcPixelHowNearest);
-                       mrcPixelDataGet(&refFFT, X, Y, Z, &rmag,   mrcPixelMag,   mrcPixelHowNearest);
-                       mrcPixelDataGet(&refFFT, X, Y, Z, &rphase, mrcPixelPhase, mrcPixelHowNearest);
-                       switch(info->mode&0x0000000f) {
-                               case 0: { /* Normal Correlation */
-                                       eval += (SQR(mag*cos(phase+deltaPhase) - rmag*cos(rphase)) 
-                                                       +SQR(mag*sin(phase+deltaPhase) - rmag*sin(rphase)));
-                                       sum  += SQR(rmag);
-                                       break;
-                               }
-                               case 1: { /* Phase Correlation */
-                                       dp = NORMAL_PHASE(phase+deltaPhase - rphase);
-                                       dp = MIN(dp, 2*M_PI - dp);
-                                       eval += rmag*dp;
-                                       sum  += rmag; 
-                                       break;
-                               }
-                               case 2: { /* Weighted Phase Correlation */
-                                       dp = NORMAL_PHASE(phase+deltaPhase - rphase);
-                                       dp = MIN(dp, 2*M_PI - dp);
-                                       eval += rmag*SQR(dp);
-                                       sum  += rmag; 
-                                       break;
-                               }
-                               default: {
-                                       fprintf(stderr, "Not supported mode: %ld in lmrcImageCorrelation\n", info->mode);
-                                       exit(EXIT_FAILURE);
-                                       break;
-                               }
-                       }
-               }
-               }
-               }
-               switch(info->mode&0x0000000f) {
-                       case 0: { /* Normal Correlation */
-                               eval = sqrt(eval/sum); 
-                               break;
-                       }
-                       case 1: { /* Phase Correlation */
-                               eval =      eval/sum;
-                               break;
-                       }
-                       case 2: { /* Weighted Phase Correlation */
-                               eval = sqrt(eval/sum);
-                               break;
-                       }
-               }
-               DEBUGPRINT4("(%g %g %g): %g\n", x, y, z, eval);
-               mrcPixelDataSet(out, ix, iy, iz, eval, mrcPixelRePart);
-       }
-       }
-       }
-       info->corInfo.mode = meanOfAll;
-       lmrcImageInformation(&(info->corInfo), out);
-       info->corInfo.minCoord.x = sx + info->corInfo.minCoord.x*dx;   
-       info->corInfo.minCoord.y = sy + info->corInfo.minCoord.y*dy;   
-       info->corInfo.minCoord.z = sz + info->corInfo.minCoord.z*dz;   
-
-       shiftFFT = inFFT;
-       mrcInit(&shiftFFT, NULL);
-
-       x = info->corInfo.minCoord.x;
-       y = info->corInfo.minCoord.y;
-       z = info->corInfo.minCoord.z;
-       DEBUGPRINT4("min (%g %g %g) %g", x, y, z, info->corInfo.min);
-       for(X=0;                    X<=inFFT.HeaderN.x/2.0; X++) {
-       for(Y=-inFFT.HeaderN.y/2.0; Y< inFFT.HeaderN.y/2.0; Y++) {
-       for(Z=-inFFT.HeaderN.z/2.0; Z< inFFT.HeaderN.z/2.0; Z++) {
-               deltaPhase = -2*M_PI*x*X/inFFT.HeaderN.x
-                                        -2*M_PI*y*Y/inFFT.HeaderN.y
-                                        -2*M_PI*z*Z/inFFT.HeaderN.z;
-               mrcPixelDataGet(&inFFT,       X, Y, Z, &mag,    mrcPixelMag,   mrcPixelHowNearest);
-               mrcPixelDataGet(&inFFT,       X, Y, Z, &phase,  mrcPixelPhase, mrcPixelHowNearest);
-               mrcPixelDataSet(&shiftFFT, X, Y, Z, mag*cos(phase+deltaPhase),  mrcPixelRePart);
-               mrcPixelDataSet(&shiftFFT, X, Y, Z, mag*sin(phase+deltaPhase),  mrcPixelImPart);
-       }
-       }
-       }
-       lmrcImageFFT(shift, &shiftFFT, 0);
-       mrcImageFree(&shiftFFT, "in lmrcImageCorrelation");
-
-       if(flagIn) {
-               mrcImageFree(&inFFT, "in lmrcImageCorrelation");
-       }
-       if(flagRef) {
-               mrcImageFree(&refFFT, "in lmrcImageCorrelation");
-       }
-}
-
-double
-lmrcImageLinearCorrelation(mrcImage* in1, mrcImage* in2, long mode)
-{
-       mrcImageParaTypeReal x, y, z;
-       double data1, data2;
-       double sum1, sum2;
-       double avg1, avg2;
-       double xy, xx, yy;
-       double count;
-       double r;
-
-       sum1 = sum2 = count = 0.0;
-       for(x=0; x<in1->HeaderN.x; x++) {
-       for(y=0; y<in1->HeaderN.y; y++) {
-       for(z=0; z<in1->HeaderN.z; z++) {
-               mrcPixelDataGet(in1, x, y, z, &data1, mrcPixelRePart, mrcPixelHowNearest);
-               sum1 += data1;
-               mrcPixelDataGet(in2, x, y, z, &data2, mrcPixelRePart, mrcPixelHowNearest);
-               sum2 += data2;
-               count += 1;
-       }
-       }
-       }
-
-       avg1 = sum1/count;
-       avg2 = sum2/count;
-
-       xx = yy = xy = 0.0;
-       for(x=0; x<in1->HeaderN.x; x++) {
-       for(y=0; y<in1->HeaderN.y; y++) {
-       for(z=0; z<in1->HeaderN.z; z++) {
-               mrcPixelDataGet(in1, x, y, z, &data1, mrcPixelRePart, mrcPixelHowNearest);
-               mrcPixelDataGet(in2, x, y, z, &data2, mrcPixelRePart, mrcPixelHowNearest);
-               xx += SQR(data1-avg1);
-               yy += SQR(data2-avg2);  
-               xy += (data1-avg1)*(data2-avg2);
-       }
-       }
-       }
-
-       r = xy/sqrt(xx)/sqrt(yy);
-
-       return r;
-}
-
-void 
-lmrcImageCorrelation(mrcImage* out, mrcImage* in, mrcImage* ref, long mode)
-{
-    mrcImage  inFFT;
-    mrcImage refFFT;
-    mrcImage outFFT;
-       long     flagIn, flagRef;
-       mrcImageParaTypeReal X, Y, Z;
-       double mag, phase;
-
-       flagIn = flagRef = 0;
-    if(!(   in->HeaderN.x==ref->HeaderN.x
-          &&in->HeaderN.y==ref->HeaderN.y
-          &&in->HeaderN.z==ref->HeaderN.z)) {
-        fprintf(stderr, "Different size between in(%ld,%ld,%ld) and ref(%ld,%ld,%ld)\n"
-                        ,in->HeaderN.x, ref->HeaderN.x
-                        ,in->HeaderN.y, ref->HeaderN.y
-                        ,in->HeaderN.z, ref->HeaderN.z);
-        exit(EXIT_FAILURE);
-    }
-
-    if(IsImage(in, "", 0)&&IsImage(ref, "", 0)) {
-        lmrcImageFFT(&inFFT,  in, 0);
-        lmrcImageFFT(&refFFT, ref, 0);
-               flagIn = flagRef = 1;
-    } else if(IsFT(in, "", 0)&&IsImage(ref, "", 0)) {
-        inFFT = *in;
-        lmrcImageFFT(&refFFT, ref, 0);
-               flagRef = 1;
-    } else if(IsImage(in, "", 0)&&IsFT(ref, "", 0)) {
-        lmrcImageFFT(&inFFT,  in, 0);
-        refFFT = *ref;
-               flagIn = 1;
-    } else if(IsFT(in, "", 0)&&IsFT(ref, "", 0)) {
-        inFFT = *in;
-        refFFT = *ref;
-    } else {
-        fprintf(stderr, "Nut supported Mode (in %ld, ref %ld)\n", in->HeaderMode, ref->HeaderMode);
-        exit(EXIT_FAILURE);
-    }
-       switch(mode&0x0000000f) {
-               case 0: { /* Normal Correlation */
-               lmrcFFTFGconj(&outFFT, &inFFT, &refFFT);
-                       break;
-               }
-               case 1: { /* Phase Correlation */
-               lmrcFFTFGconj(&outFFT, &inFFT, &refFFT);
-                       Z = 0;
-                       for(Z=-outFFT.HeaderN.z/2.0; Y<outFFT.HeaderN.z/2.0; Z++) {
-                       for(Y=-outFFT.HeaderN.y/2.0; Y<outFFT.HeaderN.y/2.0; Y++) {
-                       for(X=0; X<=outFFT.HeaderN.x/2.0; X++) {
-                                       mrcPixelDataSet(&outFFT, X, Y, Z, 1.0, mrcPixelMag);
-                       }
-                       }
-                       break;
-               }
-               case 2: { /* Weighted Phase Correlation */
-               lmrcFFTFGconj(&outFFT, &inFFT, &refFFT);
-                       Z = 0;
-                       for(X=0; X<=outFFT.HeaderN.x/2.0; X++) {
-                               for(Y=-outFFT.HeaderN.y/2.0; Y<outFFT.HeaderN.y/2.0; Y++) {
-                                       mrcPixelDataGet(&outFFT, X, Y, Z, &mag, mrcPixelMag, mrcPixelHowNearest);
-                                       mrcPixelDataSet(&outFFT, X, Y, Z, sqrt(mag), mrcPixelMag);
-                               }
-                       }
-                       break;
-               }
-               case 3: { /* Normalized Correlation */
-                       double F, G;
-                       double W;
-
-                       mrcPixelDataGet(&inFFT,  0, 0, 0, &F, mrcPixelMag, mrcPixelHowNearest);
-                       mrcPixelDataGet(&refFFT, 0, 0, 0, &G, mrcPixelMag, mrcPixelHowNearest);
-                       W = F*G;
-               lmrcFFTFGconj(&outFFT, &inFFT, &refFFT);
-                       Z = 0;
-                       for(X=0; X<=outFFT.HeaderN.x/2.0; X++) {
-                               for(Y=-outFFT.HeaderN.y/2.0; Y<outFFT.HeaderN.y/2.0; Y++) {
-                                       mrcPixelDataGet(&outFFT, X, Y, Z, &mag, mrcPixelMag, mrcPixelHowNearest);
-                                       mrcPixelDataSet(&outFFT, X, Y, Z, mag/W, mrcPixelMag);
-                               }
-                       }
-                       break;
-               }
-               default: {
-                       fprintf(stderr, "Not supported mode: %ld in lmrcImageCorrelation\n", mode);
-                       exit(EXIT_FAILURE);
-                       break;
-               }
-       }
-       if(flagIn) {
-               mrcImageFree(&inFFT, "in lmrcImageCorrelation");
-       }
-       if(flagRef) {
-               mrcImageFree(&refFFT, "in lmrcImageCorrelation");
-       }
-       if(0 != (mode&0x00000010)) {
-               mrcPixelDataSet(&outFFT, 0.0, 0.0, 0.0, 0.0, mrcPixelRePart);
-               mrcPixelDataSet(&outFFT, 0.0, 0.0, 0.0, 0.0, mrcPixelImPart);
-       }
-    lmrcImageFFT(out, &outFFT, 0);
-       mrcImageFree(&outFFT, "in lmrcImageCorrelation");
-}
-
-void
-lmrcImageCorrelationModePrint(FILE* fpt)
-{
-       fprintf(fpt, "0: Normal Correlation FxG*\n");
-       fprintf(fpt, "1: Phase  Correlation FxG*/     |FxG*|\n");
-       fprintf(fpt, "2: Phase  Correlation FxG*/sqrt(|FxG*|)\n");
-       fprintf(fpt, "3: Normalized Normal Correlation FxG*/|F||G|)\n");
-       fprintf(fpt, "16: (0,0) = 0 \n");
-       fprintf(fpt, "Refinement Correlation Map\n");
-       fprintf(fpt, "0: sqrt(Sum |Fi-Gi|^2                 / Sum |Gi|^2)\n");
-       fprintf(fpt, "1:      Sum |Gi||phaseFi - phaseGi|   / Sum |Gi|  \n");
-       fprintf(fpt, "2: sqrt(Sum |Gi||phaseFi - phaseGi|^2 / Sum |Gi|  )\n");
-}
-
-#define NUM_PARAMETER (7)
-
-void
-lmrcImageAutoRotationCorretionForManyReferences(mrcImage* in, mrcImage* ref,
-    lmrcImageAutoRotationCorrelationForManyReferencesInfo* info,
-    lmrcImageAutoRotationCorrelationInfo* linfo,
-    int mode)
-{
-    mrcImage proj;
-    mrcImage out;
-       mrcImage fit;
-       mrcImage cor;
-    long i, inext;
-    long i1, i2, i3;
-    mrcImageParaTypeReal x, y;
-    char s[5];
-    double correlationMax=-1e30;
-    double correlationMaxRot1=0;
-    double correlationMaxRot2=0;
-    double correlationMaxRot3=0;
-    double correlation;
-    int flagMap;
-       int flagMaxCount=0;
-       
-    /* Parameter Output file */
-    out.HeaderN.x = NUM_PARAMETER;
-    out.HeaderN.y = 1;
-    out.HeaderN.z = ref->HeaderN.z;
-    out.HeaderLength.x = 1;
-    out.HeaderLength.y = 1;
-    out.HeaderLength.z = 1;
-    out.HeaderMode = mrcFloatImage;
-    mrcInit(&out, NULL);
-    out.numTailer = ref->HeaderN.z;
-    mrcTailerInit(&out, 0);
-
-    DEBUGPRINT3("nRot1Area:  %f %f %f\n", info->nRot1AreaMin*DEGREE, info->nRot1AreaMax*DEGREE, info->nRot1AreaStep*DEGREE);
-    DEBUGPRINT3("nRot2Area:  %f %f %f\n", info->nRot2AreaMin*DEGREE, info->nRot2AreaMax*DEGREE, info->nRot2AreaStep*DEGREE);
-    DEBUGPRINT3("nRot3Area:  %f %f %f\n", info->nRot3AreaMin*DEGREE, info->nRot3AreaMax*DEGREE, info->nRot3AreaStep*DEGREE);
-    s[4] = '\0';
-
-    if(ref->HeaderN.z < info->nRot1*info->nRot2*info->nRot3-1) {
-           flagMap = 1;
-    } else {
-           flagMap = 0;        
-    }
-    i = -1;
-    while(1) {
-        for(i1=0; i1<info->nRot1; i1+=info->nRot1Step) {
-        for(i2=0; i2<info->nRot2; i2+=info->nRot2Step) {
-        for(i3=0; i3<info->nRot3; i3+=info->nRot3Step) {
-            if(flagMap==0) {   
-               i = i1 + i2*info->nRot1 + i3*info->nRot1*info->nRot2;
-               fprintf(stdout, "%d %d %d %d\n", i1, i2, i3, i ); 
-           } else {
-               i++;
-               if(ref->HeaderN.z<=i) break;
-               fprintf(stdout, "%d\n", i ); 
-           }
-            if(!(info->nRot1AreaMin<=ref->Tailer[i].Cont.Rot1 && ref->Tailer[i].Cont.Rot1<=info->nRot1AreaMax
-               &&info->nRot2AreaMin<=ref->Tailer[i].Cont.Rot2 && ref->Tailer[i].Cont.Rot2<=info->nRot2AreaMax
-               &&info->nRot3AreaMin<=ref->Tailer[i].Cont.Rot3 && ref->Tailer[i].Cont.Rot3<=info->nRot3AreaMax)) {
-                DEBUGPRINT3("Exclusion Area: Rot %g %g %g \n",  ref->Tailer[i].Cont.Rot1,
-                                                                ref->Tailer[i].Cont.Rot2,
-                                                                ref->Tailer[i].Cont.Rot3);
-            } else {
-               map2DCoordGet(&x, &y,
-                    ref->Tailer[i].Cont.Rot1,
-                    ref->Tailer[i].Cont.Rot2,
-                    1, 1, 1);
-            /*
-                !!!! Attention !!!!! This is true !!!!!
-                    map2DCoordGet(&x, &y, -ref->Tailer[i].Cont.Rot1,
-                                           ref->Tailer[i].Cont.Rot2,
-                                 out.HeaderN.x, out.HeaderN.y, 1);
-            */
-                mrcImageSectionGet(&proj, ref, i, 0);
-
-                /* Correlation */
-                               fit = proj;
-                               cor = proj;
-
-                               mrcInit(&fit, NULL);
-                               mrcInit(&cor, NULL);
-
-                lmrcImageAutoRotationCorrelation(&fit, &cor, in, &proj, linfo, info->mode);
-               DEBUGPRINT4("correlation %f angle %f at %f %f\n", linfo->max, linfo->maxTheta, linfo->maxP.x, linfo->maxP.y);
-                correlation = linfo->LinearCorrelation;
-                mrcPixelDataSet(&out, 0, 0, i, linfo->max,      mrcPixelRePart);
-                mrcPixelDataSet(&out, 1, 0, i, linfo->maxTheta, mrcPixelRePart);
-                mrcPixelDataSet(&out, 2, 0, i, linfo->maxP.x,   mrcPixelRePart);
-                
-                mrcPixelDataSet(&out, 4, 0, i, x, mrcPixelRePart);
-                mrcPixelDataSet(&out, 5, 0, i, y, mrcPixelRePart);
-                mrcPixelDataSet(&out, 6, 0, i, correlation, mrcPixelRePart);
-
-                fprintf(info->fptOutASC, "%ld: ", i);
-                strncpy(s, ref->Tailer[i].Cont.EulerAngleMode, 4);
-                LOGPRINT12(info->fptOutASC, "", "", \
-                    "%4s %15.6f %15.6f %15.6f : %15.6f theta %15.6f at %15.6f %15.6f onMap %15.6f %15.6f %s Cor %15.6f\n",
-                                                s,
-                                                ref->Tailer[i].Cont.Rot1*DEGREE,
-                                                ref->Tailer[i].Cont.Rot2*DEGREE,
-                                                ref->Tailer[i].Cont.Rot3*DEGREE,
-                                                linfo->max, linfo->maxTheta*DEGREE,
-                                                linfo->maxP.x, linfo->maxP.y,
-                                                x, y,
-                                                info->In,
-                                                correlation);
-                if(correlationMax<correlation) {
-                    correlationMax     = correlation;
-                    correlationMaxRot1 = ref->Tailer[i].Cont.Rot1;
-                    correlationMaxRot2 = ref->Tailer[i].Cont.Rot2;
-                    correlationMaxRot3 = ref->Tailer[i].Cont.Rot3;
-                                       if(0<flagMaxCount) {
-                                               mrcImageFree(&info->fittedMap, "");
-                                               mrcImageFree(&info->cor, "");
-                                       }
-                                       flagMaxCount++;
-                                       info->fittedMap = fit;
-                                       info->cor = cor;
-                } else {
-                                       mrcImageFree(&fit, "");
-                                       mrcImageFree(&cor, "");
-                               }
-            }
-
-        }
-        }
-        }
-        if(1<info->nRot1Step
-         ||1<info->nRot2Step
-         ||1<info->nRot3Step) {
-            DEBUGPRINT3("MAX Point: Rot %f %f %f\n", correlationMaxRot1*DEGREE, correlationMaxRot2*DEGREE, correlationMaxRot3*DEGREE);
-            info->nRot1AreaStep /= 5;
-            info->nRot2AreaStep /= 5;
-            info->nRot3AreaStep /= 5;
-            info->nRot1AreaMin = correlationMaxRot1-info->nRot1AreaStep;
-            info->nRot1AreaMax = correlationMaxRot1+info->nRot1AreaStep;
-            info->nRot2AreaMin = correlationMaxRot2-info->nRot2AreaStep;
-            info->nRot2AreaMax = correlationMaxRot2+info->nRot2AreaStep;
-            info->nRot3AreaMin = correlationMaxRot3-info->nRot3AreaStep;
-            info->nRot3AreaMax = correlationMaxRot3+info->nRot3AreaStep;
-            DEBUGPRINT3("nRot1Area:  %f %f %f\n", info->nRot1AreaMin*DEGREE, info->nRot1AreaMax*DEGREE, info->nRot1AreaStep*DEGREE);
-            DEBUGPRINT3("nRot2Area:  %f %f %f\n", info->nRot2AreaMin*DEGREE, info->nRot2AreaMax*DEGREE, info->nRot2AreaStep*DEGREE);
-            DEBUGPRINT3("nRot3Area:  %f %f %f\n", info->nRot3AreaMin*DEGREE, info->nRot3AreaMax*DEGREE, info->nRot3AreaStep*DEGREE);
-            info->nRot1Step = MAX(1,info->nRot1Step/5);
-            info->nRot2Step = MAX(1,info->nRot2Step/5);
-            info->nRot3Step = MAX(1,info->nRot3Step/5);
-        } else {
-            break;
-        }
-    }
-    info->out = out;
-}
-
-
diff --git a/src/Objects/DataManip/mrcImage/src/lmrcImagePrevitt.c b/src/Objects/DataManip/mrcImage/src/lmrcImagePrevitt.c
deleted file mode 100644 (file)
index 129854d..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
-# %M% %Y% %I%
-# The latest update : %G% at %U%
-#
-#%Z% lmrcImagePrevitt ver %I%
-#%Z% Created by 
-#%Z%
-#%Z% Usage : lmrcImagePrevitt 
-#%Z% Attention
-#%Z%
-*/
-static char __sccs_id[] = "%Z%lmrcImagePrevitt ver%I%; Date:%D% %Z%";
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "./lmrcImageEdgeEnhancement.h"
-
-void
-lmrcImageEdgeEnhancementPrewittOperatorSQRT(mrcImage* out, mrcImage* in, lmrcImageEdgeEnhancementInfo* linfo, int mode)
-{
-       mrcImageParaTypeReal x, y, z;
-       double src00, src01, src02;
-       double src10, src11, src12;
-       double src20, src21, src22;
-       double src000, src001, src002, src010, src011, src012, src020, src021, src022;
-       double src100, src101, src102, src110, src111, src112, src120, src121, src122;
-       double src200, src201, src202, src210, src211, src212, src220, src221, src222;
-       double dst, Gx, Gy, Gz;
-
-
-       lmrcImageEdgeEnhancementPrepare(out, in, linfo, mode);
-
-       if(1<in->HeaderN.z) { // 3D
-               for(z=0; z<in->HeaderN.z; z++) {
-               for(y=0; y<in->HeaderN.y; y++) {
-               for(x=0; x<in->HeaderN.x; x++) {
-                       mrcPixelDataGet(in, x+1, y,   z-1, &src210, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y,   z-1, &src010, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y-1, z,   &src201, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y-1, z,   &src001, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y,   z,   &src211, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y,   z,   &src011, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y+1, z,   &src221, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y+1, z,   &src021, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y,   z+1, &src212, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y,   z+1, &src012, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y+1,   z,   &src121, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y-1,   z,   &src101, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y+1,   z+1, &src122, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y-1,   z+1, &src102, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y,     z+1, &src112, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y,     z-1, &src110, mrcPixelRePart, mrcPixelHowNearest);
-
-                       switch(linfo->mode) { 
-                               case 0: { /* 3x3x1: 18 */
-                                       Gx = (src210 - src010 + src201 - src001 + src211 - src011 
-                                               + src221 - src021 + src212 - src012 )/5.0;
-                                       Gy = (src021 - src001 + src120 - src100 + src121 - src101 
-                                               + src122 - src102 + src221 - src201 )/5.0;
-                                       Gz = (src102 - src100 + src012 - src010 + src112 - src110 
-                                               + src212 - src210 + src122 - src120 )/5.0;
-
-                                       break;
-                               }
-                               case 1: { /* 3x3x3: 26 */
-                                       mrcPixelDataGet(in, x-1, y-1, z-1, &src000, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x-1, y+1, z-1, &src020, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x-1, y-1, z+1, &src002, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x-1, y+1, z+1, &src022, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x+1, y-1, z-1, &src200, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x+1, y+1, z-1, &src220, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x+1, y-1, z+1, &src202, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x+1, y+1, z+1, &src222, mrcPixelRePart, mrcPixelHowNearest);
-
-                                       Gx = (src200 - src000 + src210 - src010 + src220 - src020
-                                            +src201 - src001 + src211 - src011 + src221 - src021
-                                            +src202 - src002 + src212 - src012 + src222 - src022)/9.0;
-                                       Gy = (src020 - src000 + src021 - src001 + src022 - src002
-                                            +src120 - src100 + src121 - src101 + src122 - src102
-                                            +src220 - src200 + src221 - src201 + src222 - src202)/9.0;
-                                       Gz = (src002 - src000 + src102 - src100 + src202 - src200
-                                            +src012 - src010 + src112 - src110 + src212 - src210
-                                            +src022 - src020 + src122 - src120 + src222 - src220)/9.0;
-
-                                       break;
-                               }
-                               default: {
-                                       fprintf(stderr, "Not supported mode: %d in lmrcImageEdgeEnhancementRobertsCrossOperatorSQRT\n", linfo->mode);
-                                       exit(EXIT_FAILURE);
-                                       break;
-                               }
-                       }
-                       dst = SQR(Gx) + SQR(Gy) + SQR(Gz);
-                       if(0<dst) {
-                               dst = sqrt(dst);
-                       } else {
-                               dst = 0;
-                       }
-                       mrcPixelDataSet(out, x, y, z, dst, mrcPixelRePart);
-               }
-               }
-               }
-       } else { // 2D
-               for(y=1; y<in->HeaderN.y-1; y++) {
-               for(x=1; x<in->HeaderN.x-1; x++) {
-                       mrcPixelDataGet(in, x-1, y-1, 0, &src00, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y,   0, &src01, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y+1, 0, &src02, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x,   y-1, 0, &src10, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x,   y+1, 0, &src12, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y-1, 0, &src20, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y,   0, &src21, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y+1, 0, &src22, mrcPixelRePart, mrcPixelHowNearest);
-               
-                       Gx = (src20 - src00 + src21 - src01 + src22 - src02)/3.0;
-                       Gy = (src02 - src00 + src12 - src10 + src22 - src20)/3.0;
-                       
-                       dst = SQR(Gx) + SQR(Gy);
-                       if(0<dst) {
-                               dst = sqrt(dst);
-                       } else {
-                               dst = 0;
-                       }
-                       mrcPixelDataSet(out, x, y, 0, dst, mrcPixelRePart);
-
-                       if(linfo->flagDirection) {
-                               dst = atan2(Gy, Gx)*180.0/M_PI;
-                               mrcPixelDataSet(&(linfo->direction[0]), x, y, 0, dst, mrcPixelRePart);
-                       }
-               }
-               }
-       }
-}
-
-
-void
-lmrcImageEdgeEnhancementPrewittOperatorABS(mrcImage* out, mrcImage* in, lmrcImageEdgeEnhancementInfo* linfo, int mode)
-{
-       mrcImageParaTypeReal x, y, z;
-       double src00, src01, src02;
-       double src10, src11, src12;
-       double src20, src21, src22;
-       double src000, src001, src002, src010, src011, src012, src020, src021, src022;
-       double src100, src101, src102, src110, src111, src112, src120, src121, src122;
-       double src200, src201, src202, src210, src211, src212, src220, src221, src222;
-       double dst, Gx, Gy, Gz;
-
-
-       lmrcImageEdgeEnhancementPrepare(out, in, linfo, mode);
-
-       if(1<in->HeaderN.z) { // 3D
-               for(z=0; z<in->HeaderN.z; z++) {
-               for(y=0; y<in->HeaderN.y; y++) {
-               for(x=0; x<in->HeaderN.x; x++) {
-
-                       mrcPixelDataGet(in, x+1, y,   z-1, &src210, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y,   z-1, &src010, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y-1, z,   &src201, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y-1, z,   &src001, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y,   z,   &src211, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y,   z,   &src011, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y+1, z,   &src221, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y+1, z,   &src021, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y,   z+1, &src212, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y,   z+1, &src012, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y+1,   z,   &src121, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y-1,   z,   &src101, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y+1,   z+1, &src122, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y-1,   z+1, &src102, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y,     z+1, &src112, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x, y,     z-1, &src110, mrcPixelRePart, mrcPixelHowNearest);
-
-                       switch(linfo->mode) { 
-                               case 0: { /* 3x3x1: 18 */
-                                       Gx = (src210 - src010 + src201 - src001 + src211 - src011 
-                                               + src221 - src021 + src212 - src012 )/5.0;
-                                       Gy = (src021 - src001 + src120 - src100 + src121 - src101 
-                                               + src122 - src102 + src221 - src201 )/5.0;
-                                       Gz = (src102 - src100 + src012 - src010 + src112 - src110 
-                                               + src212 - src210 + src122 - src120 )/5.0;
-
-                                       break;
-                               }
-                               case 1: { /* 3x3x3: 26 */
-                                       mrcPixelDataGet(in, x-1, y-1, z-1, &src000, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x-1, y+1, z-1, &src020, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x-1, y-1, z+1, &src002, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x-1, y+1, z+1, &src022, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x+1, y-1, z-1, &src200, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x+1, y+1, z-1, &src220, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x+1, y-1, z+1, &src202, mrcPixelRePart, mrcPixelHowNearest);
-                                       mrcPixelDataGet(in, x+1, y+1, z+1, &src222, mrcPixelRePart, mrcPixelHowNearest);
-
-                                       Gx = (src200 - src000 + src210 - src010 + src220 - src020
-                                            +src201 - src001 + src211 - src011 + src221 - src021
-                                            +src202 - src002 + src212 - src012 + src222 - src022)/9.0;
-                                       Gy = (src020 - src000 + src021 - src001 + src022 - src002
-                                            +src120 - src100 + src121 - src101 + src122 - src102
-                                            +src220 - src200 + src221 - src201 + src222 - src202)/9.0;
-                                       Gz = (src002 - src000 + src102 - src100 + src202 - src200
-                                            +src012 - src010 + src112 - src110 + src212 - src210
-                                            +src022 - src020 + src122 - src120 + src222 - src220)/9.0;
-
-                                       break;
-                               }
-
-                               default: {
-                                       fprintf(stderr, "Not supported mode: %d in lmrcImageEdgeEnhancementRobertsCrossOperatorSQRT\n", linfo->mode);
-                                       exit(EXIT_FAILURE);
-                                       break;
-                               }
-                       }
-                       dst = fabs(Gx) + fabs(Gy) + fabs(Gz);
-                       mrcPixelDataSet(out, x, y, z, dst, mrcPixelRePart);
-               }
-               }
-               }
-       } else { // 2D
-               for(y=1; y<in->HeaderN.y-1; y++) {
-               for(x=1; x<in->HeaderN.x-1; x++) {
-                       mrcPixelDataGet(in, x-1, y-1, 0, &src00, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y,   0, &src01, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x-1, y+1, 0, &src02, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x,   y-1, 0, &src10, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x,   y+1, 0, &src12, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y-1, 0, &src20, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y,   0, &src21, mrcPixelRePart, mrcPixelHowNearest);
-                       mrcPixelDataGet(in, x+1, y+1, 0, &src22, mrcPixelRePart, mrcPixelHowNearest);
-               
-                       Gx = (src20 - src00 + src21 - src01 + src22 - src02)/3.0;
-                       Gy = (src02 - src00 + src12 - src10 + src22 - src20)/3.0;
-                       
-                       dst = fabs(Gx) + fabs(Gy);
-                       mrcPixelDataSet(out, x, y, 0, dst, mrcPixelRePart);
-
-                       if(linfo->flagDirection) {
-                               dst = atan2(Gy, Gx)*180.0/M_PI;
-                               mrcPixelDataSet(&(linfo->direction[0]), x, y, 0, dst, mrcPixelRePart);
-                       }
-               }
-               }
-       }
-}
-
-
index 09013f2..6c9dc0f 100755 (executable)
@@ -399,7 +399,7 @@ lmrc2Dto3D(mrcImage* out, mrcImage* in, lmrc2Dto3DInfo* linfo, long mode)
                // Perform Filtering 
                lmrcImageRhoFiltering2(out, linfo->CounterForWeight, threadNum, Matrix, &linfo->rhoInfo, 1);
        } else {
-               lmrcImageDevidedByReal(out, numProjection);
+               lmrcImageDividedByReal(out, numProjection);
        }
 
        // Statistics
index b9eb298..9186523 100755 (executable)
@@ -224,7 +224,7 @@ lmrcImage3DSymmetryFindC2(mrcImage* in, lmrcImage3DSymmetryFindInfo* linfo, int
        n=0;
        lmrcImageAdd(&linfo->avg, in, &n);
        lmrcImageAdd(&linfo->avg, &tmp, &n);
-       lmrcImageDevidedByReal(&linfo->avg, n);
+       lmrcImageDividedByReal(&linfo->avg, n);
        mrcImageFree(&tmpRot, "in lmrcImage3DSymmmetryFindC2"); 
        fprintf(log, "CORMAX: %f %f %f %f %f %f\n", linfo->corMaxRot1*DEGREE, linfo->corMaxRot2*DEGREE, linfo->corMaxCor, linfo->corMaxX, linfo->corMaxY, linfo->corMaxZ);              
 }
index 70d61f2..eadce7b 100755 (executable)
@@ -1 +1,27 @@
-/bin/bash: mrcImage3DSymmetryFind: No such file or directory
+<HTML>
+<HEAD>
+<TITLE>mrcImage3DSymmetryFind</TITLE>
+</HEAD>
+<BODY>
+<H1>mrcImage3DSymmetryFind</H1>
+<H2>Usage</H2>
+<PRE>
+Usage: mrcImage3DSymmetryFind
+Options:
+    [-i[nput]            In                  (NULL      )] :Essential :Input: MRC(3D)
+    [-o[utput]           Out                 (stdout    )] :Optional  :Output: SymmetryFindParameters
+    [-a[verage]          Avg                 (NULL      )] :Optional  :Output: SymmetryAverage
+    [-S[paceGroupNumber] ISGN                (0         )] :Optional  :SpaceGroupNumber
+    [-Rot[ation]Mode     RotMode             (XOYS      )] :Optional  :EulerMode
+    [-Rot1               minRot1             (0.        )maxRot1             (360.      )dRot1               (1.0       )] :Optional  :[degree]
+    [-Rot2               minRot2             (-90.      )maxRot2             (90.       )dRot2               (1.0       )] :Optional  :[degree]
+    [-dCos               dCos                (1         )] :Optional  :dCos
+    [-CorMode            corMode             (16        )] :Optional  :CorrelationMode
+    [-OffsetMode         OffsetMode          (0         )] :Optional  :OffsetMode
+    [-InterpolationMode  InterpolationMode   (2         )] :Optional  :InterpolationMode
+    [-c[onfig]           configFile          (NULL      )] :Optional  :ConfigurationFile
+    [-m[ode]             mode                (0         )] :Optional  :Mode
+----- Additional Usage -----
+</PRE>
+</BODY>
+</HTML>
index 1616fc6..83ee64b 100755 (executable)
@@ -23,7 +23,7 @@ static char __sccs_id[] = "%Z%mrcImageCorrelation ver%I%; Date:%D% %Z%";
 #include "mrcRefUtil.h"
 
 
-void
+int
 main(int argc, char* argv[]) 
 {
        long status;
@@ -104,7 +104,7 @@ main(int argc, char* argv[])
                        if(info.flagAvg) { /* average between shifted input file and reference */
                                num = 1;
                                lmrcImageAdd(&shift, &ref, &num);
-                               lmrcImageDevidedByReal(&shift, num);
+                               lmrcImageDividedByReal(&shift, num);
                                mrcFileWrite(&shift, info.Avg, "in main", 0);
                        }
                        if(info.flagOut) { /* correlation map or residual map is written down */
@@ -125,6 +125,7 @@ main(int argc, char* argv[])
                        break;
                }
        }
+       return 0;
 }
 
 void 
index 06a1cac..08eadb2 100755 (executable)
@@ -1 +1,51 @@
-/bin/bash: mrcImageCorrelation: No such file or directory
+Init Start
+<HTML>
+<HEAD>
+<TITLE>mrcImageCorrelation</TITLE>
+</HEAD>
+<BODY>
+<H1>mrcImageCorrelation</H1>
+<H2>Usage</H2>
+<PRE>
+Usage: mrcImageCorrelation
+Options:
+    [-i[nput]            In                  (NULL      )] :Essential :InputDataFile
+    [-o[utput]           Out                 (NULL      )] :Optional  :OutputDataFile: Correlation Map
+    [-O[utput]           Out2                (NULL      )] :Optional  :OutputDataFile: Correlation Map for Refinement
+    [-r[eference]        Ref                 (NULL      )] :Essential :ReferenceDataFile
+    [-cor[relation]Info  OutCor              (stdout    )] :Optional  :Output: Correlation Info
+    [-a[verage]          Avg                 (NULL      )] :Optional  :OutputDataFile: Averaged File
+    [-s[hit]             Shift               (NULL      )] :Optional  :OutputDataFile: Shifted InputFile
+    [-refine             RefineStep          (0.25      )RefineRange         (3.0       )RefineMode          (2         )] :Optional  :Refinemnet: Step Range[pixelUnit]
+    [-c[onfig]           configFile          (NULL      )] :Optional  :ConfigurationFile
+    [-m[ode]             mode                (0         )] :Optional  :Mode
+    [-M[ode2]            mode2               (0         )] :Optional  :Mode2
+----- Mode:  -m -----
+0: Normal Correlation FxG*
+1: Phase  Correlation FxG*/     |FxG*|
+2: Phase  Correlation FxG*/sqrt(|FxG*|)
+3: Normalized Normal Correlation FxG*/|F||G|)
+16: (0,0) = 0 
+Refinement Correlation Map
+0: sqrt(Sum |Fi-Gi|^2                 / Sum |Gi|^2)
+1:      Sum |Gi||phaseFi - phaseGi|   / Sum |Gi|  
+2: sqrt(Sum |Gi||phaseFi - phaseGi|^2 / Sum |Gi|  )
+----- Mode2: -M -----
+mode 0: Correlation by FFT.  Output is a mrcImage to file.
+            -a : Averaged image after Shift Transform [pixel unit] and Averaging
+            -s : Shifted  image after Shift Transform [pixel unit]
+            -o : Correation Map 
+mode 1: Correlation by multiplying in normal space.  Output is a real value 
+            Normalized correlation value
+            No shift transform 
+            No Correlation Map 
+----- Refinement:  -refine -----
+            refineStep[PixelUnit]  : refinement step size 
+            refineRange[PixelUnit] : refinement range     
+            refineMode             : refinement mode      
+            --- search area ----- 
+            the position of max correlation +- refineRange / refineStep 
+            Attention: If this option is set, the meaning of -o option is changed to a residual map 
+</PRE>
+</BODY>
+</HTML>
index bd2c747..a753820 100755 (executable)
@@ -281,7 +281,7 @@ lmrcImageUnbentROI(mrcImage* out, mrcImage* in, lmrcImageUnbentROIInfo* linfo, i
                                fprintf(stdout, "%f %f ", newx.data[i], newy.data[i]);
                        }
                        fprintf(stdout, "\n");
-                       lmrcImageDevidedByReal(&avg, (double)m);
+                       lmrcImageDividedByReal(&avg, (double)m);
                        mrcFileWrite(&avg, "/tmp/avg.test", "", 0);
                }
                p = newp;
index bfde04e..c1bfbbf 100755 (executable)
@@ -1 +1,24 @@
-/bin/bash: mrcImageUnbentROI: No such file or directory
+<HTML>
+<HEAD>
+<TITLE>mrcImageUnbentROI</TITLE>
+</HEAD>
+<BODY>
+<H1>mrcImageUnbentROI</H1>
+<H2>Usage</H2>
+<PRE>
+Usage: mrcImageUnbentROI
+Options:
+    [-i[nput]            In                  (NULL      )] :Essential :InputDataFile
+    [-o[utput]           Out                 (NULL      )] :Essential :OutputDataFile
+    [-r[oi]              roiLine             (NULL      )... ] :Variable  :
+    [-x                  x                   (1.0       )] :Essential :Width :Source 
+    [-y                  y                   (1.0       )] :Optional  :Height:Source
+    [-W                  Width               (1.0       )] :Optional  :Width :Dst 
+    [-H                  Height              (1.0       )] :Optional  :Height:Dst 
+    [-cor                Cor                 (360.0     )] :Optional  :Correlation Window along Y-axis [A]
+    [-S[hrink]           Shrink              (1         )] :Optional  :When inputfile is shrinked:
+    [-c[onfig]           configFile          (NULL      )] :Optional  :ConfigurationFile
+    [-m[ode]             mode                (0         )] :Optional  :Mode
+</PRE>
+</BODY>
+</HTML>
index 45f1dc7..6583451 100755 (executable)
@@ -1 +1,72 @@
-/bin/bash: mrc2Dto3D: No such file or directory
+<HTML>
+<HEAD>
+<TITLE>mrc2Dto3D</TITLE>
+</HEAD>
+<BODY>
+<H1>mrc2Dto3D</H1>
+<H2>Usage</H2>
+<PRE>
+Usage: mrc2Dto3D
+Options:
+    [-i[nput]            In                  (NULL      ).as(inFile              ) ] :Optional  :InputDataFile
+    [-I[nput]            In2                 (NULL      ).as(inFileListNoOpen    ) ] :Optional  :InputDataFile
+    [-each                                                                         ] :Optional  :Read each projection file if necessary, not at once.
+    [-o[utput]           Out                 (NULL      ).as(outFile             ) ] :Essential :OutputDataFile
+    [-O[utput]           Out2                (NULL      ).as(outFile             ) ] :Optional  :OutputDataFile[2DMulti]
+    [-Rmax               Rmax                (1.0       ).as(Real                ) ] :Optional  :Rmax: High Cut [/A]
+    [-single             single              (1         ).as(Integer             ) ] :Optional  :SingleTiltMode
+    [-singleFilter       singleFilter        (0         ).as(Integer             ) ] :Optional  :SingleFilterMode
+    [-InterpolationMode  InterpolationMode   (1         ).as(Integer             ) ] :Optional  :InterpolationMode
+    [-Double                                                                       ] :Optional  :DoubleTiltMode
+    [-DoubleCounter      DoubleCounter       (NULL      ).as(outFile             ) ] :Optional  :DoubleCounter
+    [-CounterThreshold   CounterThreshold    (1e-6      ).as(Real                ) ] :Optional  :CounterThreshold
+    [-CounterThresholdModeCounterThresholdMode(0         ).as(Integer             ) ] :Optional  :CounterThresholdMode
+    [-WeightMode         WeightMode          (0         ).as(Integer             ) ] :Optional  :WeightMode
+    [-thicknessWeight                                                              ] :Optional  :ThicknessWeight
+    [-Sub[Sampling]      SubSampling         (1         ).as(Integer             ) ] :Optional  :SubSampling: [pixel]
+    [-PlusXrot                                                                     ] :Optional  :plus x-rotation by 180 for rasmol.
+    [-N                  Nx                  (0         ).as(Integer             ) 
+                         Ny                  (0         ).as(Integer             ) 
+                         Nz                  (0         ).as(Integer             ) ] :Optional  :OutputSize
+    [-SIRT                                                                         ] :Optional  :by SIRT
+    [-max[Iter]          maxIter             (30        ).as(Integer             ) ] :Optional  :MaxIteration for SIRT
+    [-rms                rms                 (1.0       ).as(Real                ) ] :Optional  :Ending Conditions: rms for SIRT
+    [-CTF[Info]          CTFInfo             (NULL      ).as(inFileList          ) ] :Optional  :CTFInfo: for SIRT
+    [-pthread            pthreadMax          (1         ).as(Integer             ) ] :Optional  :pthread: max
+    [-c[onfig]           configFile          (NULL      ).as(inFile              ) ] :Optional  :ConfigurationFile
+    [-m[ode]             mode                (0         ).as(Integer             ) ] :Optional  :Mode
+----- Additional Usage -----
+-m Option
+    0:SimpleBackProjection
+    1:FilteredBackProjection(Fourier Space)
+    2:WeightedBackProjection(Real Space)
+-single 0|1 
+    0: tilt axis is parallel to x-axis
+    1: tilt axis is parallel to y-axis
+-singleFilter 0|1|2 
+    0: simple rho filter
+    1: Ram-Lak Filter
+    2: Shepp-Logan Filter
+-Double 
+    Double Tilt 
+-WeightMode 
+    1 : RealSpace: Circle(same density)
+    2 : RealSpace: Circle(weighted density)
+    3 : RealSpace: Square(weighted density) 
+    4 : Fourier Space : Plane(same density) -CounterThreshold 0.5
+    5 : Fourier Space : Plane(Linear Gradient)-CounterThreshold 0.5
+    6 : Fourier Space : Plane(Cosine Gradient) Current Recommende using -CounterThreshold 0.5
+-------------------------------
+-I Option file format
+filename0 RotationOrder0 rot1 rot2 rot3
+filename1 RotationOrder1 rot1 rot2 rot3
+.......................................
+>>> RotationOrder : Eular Angle Expression <<< 
+Example: YOYS : RotY(rot3)RotX(rot2)RotY(rot1)*v
+First Rotation  : y-axis : Y: Y     : [X|Y|Z] Axis used initially
+Second Rotation : x-axis : O: Odd   : [O|E]   Parity of axis permutation
+Last Rotation   : z-axis : Y: Yes   : [Y|N]   Repetition of initial axis as last
+v1 = A v0                : S: Staic : [S|R]   Frame from which axes are taken
+</PRE>
+</BODY>
+</HTML>