OSDN Git Service

Modified mrcImageShapeSearch v2.3.11p0178
authorTakuo Yasunaga <yasunaga@bio.kyutech.ac.jp>
Tue, 1 Sep 2015 00:27:06 +0000 (09:27 +0900)
committerTakuo Yasunaga <yasunaga@bio.kyutech.ac.jp>
Tue, 1 Sep 2015 00:27:06 +0000 (09:27 +0900)
src/Tools/Config/Define.inc
src/Tools/mrcImage/mrcImageBinalization/src/test/Makefile
src/Tools/mrcImage/mrcImageShapeSearch/Config/OptionControlFile
src/Tools/mrcImage/mrcImageShapeSearch/inc/mrcImageShapeSearch.h
src/Tools/mrcImage/mrcImageShapeSearch/src/argCheck.c
src/Tools/mrcImage/mrcImageShapeSearch/src/init.c
src/Tools/mrcImage/mrcImageShapeSearch/src/mrcImageShapeSearch.c
src/Tools/mrcImage/mrcImageShapeSearch/src/mrcImageShapeSearch.html
src/Tools/mrcImage/mrcImageShapeSearch/src/mrcImageShapeSearch.pane
src/Tools/mrcImage/mrcImageShapeSearch/src/test/Makefile
src/Tools/mrcImage/mrcImageShapeSearch/src/usage.c

index 14aaf61..6b404c1 100755 (executable)
@@ -616,3 +616,4 @@ WORLDNAME=Tools
 WORLDNAME=Tools
 WORLDNAME=Tools
 WORLDNAME=Tools
+WORLDNAME=Tools
index 0cc9a79..a5901b1 100755 (executable)
@@ -12,6 +12,9 @@ help:
 exec:
        @echo "----- Execution Check -----"
        ../$(OSTYPE)/$(OBJECTNAME)  -i data/test.mrc -o data/test.mrc.16 -m 16 
+       ../$(OSTYPE)/$(OBJECTNAME)  -i data/test.mrc -o data/test.mrc.16.dt -m 16 -dt -1
+       ../$(OSTYPE)/$(OBJECTNAME)  -i data/test.mrc -o data/test.mrc.16.o -m 16 -O data/test.mrc.16.Out
+       ../$(OSTYPE)/$(OBJECTNAME)  -i data/test.mrc -o data/test.mrc.16.o.dt -m 16 -O data/test.mrc.16.Out
        ../$(OSTYPE)/$(OBJECTNAME)  -i data/test.mrc -o data/test.mrc.32 -m 32 
        ../$(OSTYPE)/$(OBJECTNAME)  -i data/test.mrc -o data/test.mrc.48 -m 48 -p 0.25
        ../$(OSTYPE)/$(OBJECTNAME)  -i data/test.mrc -o data/test.mrc.64 -m 64 
index 0df0071..8dea921 100755 (executable)
@@ -3,6 +3,7 @@
 "-i","-i[nput]","Input","Essential","1","1","In","inFile::mrcImage","NULL"
 "-o","-o[utput]","Output","Essential","1","1","Out","outFile::mrcImage","NULL"
 "-Shape","-Shape","Output","Optional","1","1","Shape","outFile::mrcImage","NULL"
+"-n","-n[Cube]","Mode","Optional","1","1","nCube","Integer","0"
 "-r","-r[adius]","Radius[pixel]","Optional","3","1","minR","Integer","3","2","maxR","Integer","5","3","delR","Integer","1"
 "-l","-l[ength]","Length[pixel]","Optional","3","1","minL","Integer","3","2","maxL","Integer","5","3","delL","Integer","1"
 "-Phi","-Phi","around z-axis[degree]","Optional","3","1","minPhi","Real","0.0","2","maxPhi","Real","359.0","3","delPhi","Real","1.0"
index 33ab0ff..293bfa0 100755 (executable)
@@ -25,6 +25,9 @@ typedef struct mrcImageShapeSearchInfo {
     char* Shape;
     FILE* fptShape;
     
+    long flagnCube;
+    long nCube;
+    
     long flagminR;
     long minR;
     
index 5f45844..5a60e4c 100755 (executable)
@@ -61,6 +61,17 @@ argCheck(mrcImageShapeSearchInfo* info, int argc, char* argv[])
                     }
                     SBREAK;
                 }
+                SCASE("n") {
+                    if(i+1<argc) {
+                        info->nCube = stringGetNthIntegerData(argv[i+1], 1, " ,");
+                        i++;
+                        info->flagnCube++;
+                    } else {
+                        usage(argv[0]);
+                        exit(EXIT_FAILURE);
+                    }
+                    SBREAK;
+                }
                 SCASE("r") {
                     if(i+3<argc) {
                         info->minR = stringGetNthIntegerData(argv[i+1], 1, " ,");
index 217a049..7b44c3e 100755 (executable)
@@ -15,6 +15,7 @@ init0(mrcImageShapeSearchInfo* info)
     info->fptIn = NULL;    info->flagIn = 0;
     info->fptOut = NULL;    info->flagOut = 0;
     info->fptShape = NULL;    info->flagShape = 0;
+    info->nCube = 0;    info->flagnCube = 0;
     info->minR = 3;    info->flagminR = 0;
     info->maxR = 5;    info->flagmaxR = 0;
     info->delR = 1;    info->flagdelR = 0;
@@ -63,6 +64,9 @@ init1(mrcImageShapeSearchInfo* info)
         info->fptShape = fileOpen(info->Shape, "w");
     }
     
+    if(info->flagnCube) {
+    }
+    
     if(info->flagminR) {
     }
     
index 549d96d..08a4a22 100755 (executable)
@@ -45,6 +45,8 @@ typedef struct lmrcImageShapeSearchInfo {
        float maxPsi;
        float delPsi;
 
+       int nCube;
+
        // temporary
        float x;
        float y;
@@ -53,16 +55,17 @@ typedef struct lmrcImageShapeSearchInfo {
        int interpMode;
        int thresZscore;
 
-       mrcImage shape; // Template Structure 
-
        // Output
        mrcImage average; // Average for all orientations
        mrcImage SD;      // SD for all 
        mrcImage Max;     // Max for all 
        mrcImage Zscore;  // Z-score;
        mrcImage PCA;     // PCA
+       mrcImage PCAaccuracy; 
        int nShapeInfo;
        mrcImage* shapeInfo; // Shape, Orientation, ... 
+       mrcImage shape; // Template Structure 
+
 } lmrcImageShapeSearchInfo;
 
 typedef enum lmrcImageShapeSearchMode {
@@ -116,6 +119,9 @@ main(int argc, char* argv[])
        linfo.thresZscore = info.thresZscore;
        linfo.interpMode = info.interpMode;
 
+       // 
+       linfo.nCube = info.nCube;
+
        mrcFileRead(&in, info.In, "in main", 0); 
 
        lmrcImageShapeSearch(&out, &in, &linfo, info.mode);
@@ -129,13 +135,19 @@ main(int argc, char* argv[])
        mrcFileWrite(&linfo.Zscore, filename, "in main", 0);
        sprintf(filename, "%s.max", info.Out);  
        mrcFileWrite(&linfo.Max, filename, "in main", 0);
+
        sprintf(filename, "%s.PCA", info.Out);  
        mrcFileWrite(&linfo.PCA, filename, "in main", 0);
+       sprintf(filename, "%s.PCAaccuracy", info.Out);  
+       mrcFileWrite(&linfo.PCAaccuracy, filename, "in main", 0);
+
        for(i=0; i<linfo.nShapeInfo; i++) {
                sprintf(filename, "%s.shapeinfo-%02d", info.Out, i);    
                mrcFileWrite(&linfo.shapeInfo[i], filename, "in main", 0);
        }
-       //mrcFileWrite(&linfo.shape, info.Shape, "in main", 0);
+       if(info.flagShape) {
+               mrcFileWrite(&linfo.shape, info.Shape, "in main", 0);
+       }
 
        exit(EXIT_SUCCESS);
 }
@@ -209,7 +221,7 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
        Array X;
        Array Ave;
        mrcImageParaTypeInteger nCube; 
-       double W;
+       double W, Wsylinder, Wdisk, Wsphere, Waccuracy;
 
        nPhi   = (int)((linfo->maxPhi     - linfo->minPhi)  /linfo->delPhi)  +1;
        nTheta = (int)((linfo->maxTheta   - linfo->minTheta)/linfo->delTheta)+1;
@@ -233,8 +245,14 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
        mrcInit(&linfo->Zscore, NULL);
        linfo->Max.Header = in->Header;
        mrcInit(&linfo->Max, NULL);
+
        linfo->PCA.Header = in->Header;
        mrcInit(&linfo->PCA, NULL);
+       linfo->shape.Header = in->Header;
+       mrcInit(&linfo->shape, NULL);
+       linfo->PCAaccuracy.Header = in->Header;
+       mrcInit(&linfo->PCAaccuracy, NULL);
+
        linfo->nShapeInfo = 5;
        linfo->shapeInfo = (mrcImage*)memoryAllocate(sizeof(mrcImage)*linfo->nShapeInfo, "in MFPCalc");
        for(i=0; i<linfo->nShapeInfo; i++) {
@@ -244,7 +262,11 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
 
        X.dim = 2;
        X.n[0] = 3;
-       nCube = ((int)(MAX(linfo->maxLength, 2*linfo->maxRadius+1)+3)/2)*2; 
+       if(0<linfo->nCube) {
+               nCube = linfo->nCube;
+       } else {
+               nCube = ((int)(MAX(linfo->maxLength, 2*linfo->maxRadius+1)+3)/2)*2; 
+       }
        X.n[1] = nCube*nCube*nCube; 
        arrayInit(&X, "in");
        DEBUGPRINT2("nCube: %d %lu\n", nCube, X.n[1]); 
@@ -260,20 +282,21 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
                linfo->x = x;
 
                k0 = (int)(x + y*in->HeaderN.x + z*in->HeaderN.x*in->HeaderN.y); 
+               linfo->shape.ImageFloatImage[k0] = -1;
 
                //mrcPixelDataGet(in, x, y, z, &d, mrcPixelRePart, mrcPixelHowNearest);
                k = x + y*in->HeaderN.x + z*in->HeaderN.x*in->HeaderN.y;
                d = in->ImageFloatImage[k];
-               if(0<d) {
+       if(0<d) {
                numPoint = 0;
-               for(srcz=-nCube/2; srcz<nCube/2; srcz++) {
-               for(srcy=-nCube/2; srcy<nCube/2; srcy++) {
-               for(srcx=-nCube/2; srcx<nCube/2; srcx++) {
-                       mrcPixelDataGet(in, x+srcx, y+srcy, z+srcz, &d, mrcPixelRePart, mrcPixelHowNearest);    
-                       //srcx0 = x + srcx;
-                       //srcy0 = y + srcy;
-                       //srcz0 = z + srcz;
-                       //k = srcx0 + srcy0*in->HeaderN.x + srcz0*in->HeaderN.x*in->HeaderN.y;
+               for(srcz=-nCube/2; srcz<=nCube/2; srcz++) {
+               for(srcy=-nCube/2; srcy<=nCube/2; srcy++) {
+               for(srcx=-nCube/2; srcx<=nCube/2; srcx++) {
+                       //mrcPixelDataGet(in, x+srcx, y+srcy, z+srcz, &d, mrcPixelRePart, mrcPixelHowNearest);  
+                       srcx0 = ((int)(x + srcx)+in->HeaderN.x)%in->HeaderN.x;
+                       srcy0 = ((int)(y + srcy)+in->HeaderN.y)%in->HeaderN.y;
+                       srcz0 = ((int)(z + srcz)+in->HeaderN.z)%in->HeaderN.z;
+                       k = srcx0 + srcy0*in->HeaderN.x + srcz0*in->HeaderN.x*in->HeaderN.y;
                        d = in->ImageFloatImage[k];
                        if(0<d) {
                                arrayDataSet2(X, 0, numPoint, srcx0);
@@ -285,7 +308,7 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
                }
                }
                DEBUGPRINT4("%f %f %f numPoint: %d\n", x, y, z, numPoint);
-               if(16<numPoint) {
+               if(5<numPoint) {
                        X.n[1] = numPoint;
                        arrayPCA(&U, &C, &Lambda, &X, &Ave, PCAMode);
                        if(PCAMode==0) PCAMode=1;
@@ -293,20 +316,50 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
                        L1 = arrayDataGet1(Lambda, 1);
                        L2 = arrayDataGet1(Lambda, 2);
 
-                       DEBUGPRINT4("W: %f %f %f %f\n", W, L0, L1, L2);
-
+                       DEBUGPRINT3("Lambda: %f %f %f\n", L0, L1, L2);
                        L = L0+L1+L2;
                        L0 /= L;
                        L1 /= L;
                        L2 /= L;
+                       DEBUGPRINT3("Lambda: %f %f %f\n", L0, L1, L2);
+
+                       Wsphere      = 100*exp(-((L1/L0) + (L2/L1) + 0.5*(L0 - L2)/L0));  
+                       Wdisk        = 100*exp(-((L2/L0) + (L2/L1) + 0.5*(L0 - L1)/L0));  
+                       Wsylinder    = 100*exp(-((L1/L0) + (L2/L0) + 0.5*(L1 - L2)/L1));
+                       DEBUGPRINT3("W: sphere %f disk %f sylinder %f\n", Wsphere, Wdisk, Wsylinder);
+
+                       if(Wsphere<Wdisk) {
+                               if(Wdisk<Wsylinder) {  // sphere -> disk -> sylinder
+                                       linfo->shape.ImageFloatImage[k0] =  lmrcImageShapeSearchModeSylinder;
+                                       Waccuracy = Wsylinder - Wdisk;
+                               } else {               // sphere/sylinder -> disk
+                                       linfo->shape.ImageFloatImage[k0] =  lmrcImageShapeSearchModeDisk;
+                                       if(Wsphere<Wsylinder) { // sphere -> sylinder -> disk 
+                                               Waccuracy = Wdisk - Wsylinder;
+                                       } else {                // sphere -> sylinder -> disk
+                                               Waccuracy = Wdisk - Wsphere;
+                                       }
+                               }
+                       } else {
+                               if(Wsphere<Wsylinder) { // Wdisk -> Wsphere -> Wsylinder 
+                                       linfo->shape.ImageFloatImage[k0] =  lmrcImageShapeSearchModeSylinder;
+                                       Waccuracy = Wsylinder - Wsphere;
+                               } else { // Wdisk/Wsylinder -> Wsphere
+                                       linfo->shape.ImageFloatImage[k0] =  lmrcImageShapeSearchModeSphere;
+                                       if(Wdisk<Wsylinder) { // Wdisk -> Wsylinder -> Wsphere
+                                               Waccuracy = Wsphere - Wsylinder;
+                                       } else {              // Wsylinder -> Wdisk -> Wsphere
+                                               Waccuracy = Wsphere - Wdisk;
+                                       }
+                               }       
+                       }
                        
                        switch(mode) {
                                case lmrcImageShapeSearchModeSylinder: {        
-                                       //W = ((L1!=0)?(L0/L1):1)*(L2!=0?(L0/L2):1);            
-                                       W = 1.0/(SQR(1-L0)+SQR(L1)+SQR(L2)); 
+                                       W = Wsylinder;
                                        DEBUGPRINT4("W: %f %f %f %f\n", W, L0, L1, L2);
-#ifdef DEBUG
-                                       if(1<W) {
+#ifdef DEBUG2
+                                       if(0.2<W) {
                                                DEBUGPRINT3("%f %f %f\n", x, y, z);
                                                DEBUGPRINT4("W: %f %f %f %f\n", W, L0, L1, L2);
                                        }
@@ -314,9 +367,9 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
                                        break;
                                }
                                case lmrcImageShapeSearchModeDisk: {    
-                                       W = ((L2!=0)?((L0/L2)*(L1/L2)):1);              
-#ifdef DEBUG
-                                       if(1000<W) {
+                                       W = Wdisk;
+#ifdef DEBUG2
+                                       if(0.2<W) {
                                                DEBUGPRINT3("%f %f %f\n", x, y, z);
                                                DEBUGPRINT4("W: %f %f %f %f\n", W, L0, L1, L2);
                                        }
@@ -324,7 +377,7 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
                                        break;
                                }
                                case lmrcImageShapeSearchModeSphere: {  
-                                       W = L0*L1+L1*L2+L2*L0/SQR(L0+L1+L2);            
+                                       W = Wsphere;
                                        break;
                                }
                                default: {
@@ -334,13 +387,20 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
                        }
                } else {
                        W = 1;
-               }
+               } // numPoint
+
                } else {
-                       W = 1;
-               }
+                       W = 0;
+       } // 0 < d
                //mrcPixelDataSet(&linfo->PCA, x, y, z, W, mrcPixelRePart);
-               linfo->PCA.ImageFloatImage[k] = W;
-               if(1<W) {
+               linfo->PCA.ImageFloatImage[k0] = W;
+               if(linfo->shape.ImageFloatImage[k0]==mode) {
+                       linfo->PCAaccuracy.ImageFloatImage[k0] = W*Waccuracy/100/100;
+               } else {
+                       linfo->PCAaccuracy.ImageFloatImage[k0] = 0;
+               }
+
+       if(1<W) {
                for(iPhi=0; iPhi<nPhi; iPhi++) { // Three Rotation      
                        phi = linfo->minPhi + iPhi*linfo->delPhi;
                for(iTheta=0; iTheta<nTheta; iTheta++) {        
@@ -422,12 +482,12 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
                DEBUGPRINT3("%f %f %f \n", max, ave, sd);       
                }
 #endif
-               } else {
+       } else {
                        ave = 0;
                        sd  = 0;
                        max = 0;
                        imax = 0;
-               }
+       }
 
                //mrcPixelDataSet(&linfo->average, x, y, z, ave, mrcPixelRePart);
                linfo->average.ImageFloatImage[k0] = ave;
@@ -486,7 +546,8 @@ lmrcImageShapeSearchCalc0(mrcImage* out, mrcImage* in, lmrcImageShapeSearchInfo*
        sum = 100./(max - min);
        for(k=0; k<nVoxel; k++) {
                d = linfo->Max.ImageFloatImage[k]; 
-               zscore = (d-linfo->average.ImageFloatImage[k])/linfo->SD.ImageFloatImage[k]; 
+                       
+               zscore = (d-linfo->average.ImageFloatImage[k])/linfo->SD.ImageFloatImage[k];
                //zscore = (d-ave)/sd; 
                linfo->Zscore.ImageFloatImage[k] = zscore*in->ImageFloatImage[k];
                
index e71413f..85ab8e8 100755 (executable)
@@ -11,6 +11,7 @@ Options:
     [-i[nput]            In                  (NULL      ).as(inFile::mrcImage    ) ] :Essential :Input
     [-o[utput]           Out                 (NULL      ).as(outFile::mrcImage   ) ] :Essential :Output
     [-Shape              Shape               (NULL      ).as(outFile::mrcImage   ) ] :Optional  :Output
+    [-n[Cube]            nCube               (0         ).as(Integer             ) ] :Optional  :Mode
     [-r[adius]           minR                (3         ).as(Integer             ) 
                          maxR                (5         ).as(Integer             ) 
                          delR                (1         ).as(Integer             ) ] :Optional  :Radius[pixel]
index 4d500d5..7fb2d14 100755 (executable)
         -I 1 0 1 1 0 1 -1x1+1+1.500000 ' ' 'In' 'Input' i
         -O 1 0 1 1 0 1 -1x1+1+3.000000 ' ' 'Out' 'Output' o
         -O 1 0 1 0 0 1 -1x1+1+4.500000 ' ' 'Shape' 'Output' Shape
-        -I  1 0 0 1 0 1 -1x1+1+6 ' ' '3' 'minR' Radius[pixel]
-        -I  1 0 0 1 0 1 -1x1+1+7 ' ' '3' 'minL' Length[pixel]
-        -I  1 0 0 1 0 1 -1x1+1+9 ' ' '0.0' 'minPhi' around z-axis[degree]
-        -I  1 0 0 1 0 1 -1x1+1+10 ' ' '0.0' 'minTheta' around x-axis[degree]
-        -I  1 0 0 1 0 1 -1x1+1+12 ' ' '0.0' 'minPsi' around x-axis[degree]
-        -f 1 0 1 0 0 -1x1+1+13.500000 0 0 1.000000 0 0 0 'thresZscore' 'Zscore' thres
-        -i 1 0 1 0 0 -1x1+1+15.000000 0 0 0 0 0 'interpMode' 'interpMode' interp
-        -I 1 0 1 0 0 1 -1x1+1+16.500000 ' ' 'configFile' 'ConfigurationFile' c
-        -i 1 0 1 0 0 -1x1+1+18.000000 0 0 0 0 0 'mode' 'Mode' m
+        -i 1 0 1 0 0 -1x1+1+6.000000 0 0 0 0 0 'nCube' 'Mode' n
+        -I  1 0 0 1 0 1 -1x1+1+7 ' ' '3' 'minR' Radius[pixel]
+        -I  1 0 0 1 0 1 -1x1+1+9 ' ' '3' 'minL' Length[pixel]
+        -I  1 0 0 1 0 1 -1x1+1+10 ' ' '0.0' 'minPhi' around z-axis[degree]
+        -I  1 0 0 1 0 1 -1x1+1+12 ' ' '0.0' 'minTheta' around x-axis[degree]
+        -I  1 0 0 1 0 1 -1x1+1+13 ' ' '0.0' 'minPsi' around x-axis[degree]
+        -f 1 0 1 0 0 -1x1+1+15.000000 0 0 1.000000 0 0 0 'thresZscore' 'Zscore' thres
+        -i 1 0 1 0 0 -1x1+1+16.500000 0 0 0 0 0 'interpMode' 'interpMode' interp
+        -I 1 0 1 0 0 1 -1x1+1+18.000000 ' ' 'configFile' 'ConfigurationFile' c
+        -i 1 0 1 0 0 -1x1+1+19.500000 0 0 0 0 0 'mode' 'Mode' m
     -E
   -E
 -E
index afbdf7d..56b06c6 100755 (executable)
@@ -3,7 +3,7 @@ include ../../../Config/Define.inc
 include ../../../../Config/Define.inc
 include ../../../../../Config/Define.inc
 
-all: help exec exec2
+all: help exec exec2 exec-all
 
 help:
        @echo "----- Help Message Check -----"
@@ -11,20 +11,29 @@ help:
 
 exec:
        @echo "----- Execution Check -----"
-       time ../$(OSTYPE)/$(OBJECTNAME) -i data/test-sylinder.bin -o data/test-sylinder.syl -r 3 5 1 -l 5 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 0 -thres 0.5 
+       time ../$(OSTYPE)/$(OBJECTNAME) -i data/test-sylinder.bin -o data/test-sylinder.syl -Shape data/test-sylinder.shape0 -n 9 -r 3 5 1 -l 5 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 0 -thres 0.5 
+       time ../$(OSTYPE)/$(OBJECTNAME) -i data/test-sylinder.bin -o data/test-sylinder.disk -Shape data/test-sylinder.shape1 -n 9 -r 6 6 1 -l 3 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 1 -thres 0.5 
 
 exec2:
-       time ../$(OSTYPE)/$(OBJECTNAME) -i data/test-disk.bin -o data/test-disk.disk -r 6 6 1 -l 3 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 1 -thres 0.5 
+       time ../$(OSTYPE)/$(OBJECTNAME) -i data/test-disk.bin -o data/test-disk.disk -Shape data/test-disk.shape0 -n 6 -r 6 6 1 -l 3 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 1 -thres 0.5 
+       time ../$(OSTYPE)/$(OBJECTNAME) -i data/test-disk.bin -o data/test-disk.syl -Shape data/test-disk.shape1 -n 6 -r 3 5 1 -l 5 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 0 -thres 0.5 
        @echo "----- Calc check -----"          
 
 exec3:
        time ../$(OSTYPE)/$(OBJECTNAME) -i data/test-disk.bin -o data/test-disk.disk -r 6 6 1 -l 3 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 2 -thres 0.5 
        @echo "----- Calc check -----"          
 
+exec-all:
+       time ../$(OSTYPE)/$(OBJECTNAME) -i data/test.bin -o data/test.syl -Shape data/test.shape0 -n 9 -r 6 6 1 -l 3 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 0 -thres 0.5  
+       time ../$(OSTYPE)/$(OBJECTNAME) -i data/test.bin -o data/test.disk -Shape data/test.shape1 -n 9 -r 6 6 1 -l 3 5 1 -Phi 0 359 45 -Theta  0 179 45 -Psi 0 0 90 -m 1 -thres 0.5 
+       @echo "----- Calc check -----"          
+
 init:
        mrcImageModelCreate -o data/test-sylinder.mrc -nx 32 -ny 32 -nz 32 -r 3 -l 20 -m 8
        mrcImageBinalization -i data/test-sylinder.mrc -o data/test-sylinder.bin -m 32
        mrcImageModelCreate -o data/test-disk.mrc -nx 32 -ny 32 -nz 32 -r 10 -l 3 -m 8
        mrcImageBinalization -i data/test-disk.mrc -o data/test-disk.bin -m 32
+       mrcImageAdd -i1 data/test-sylinder.mrc -i2 data/test-disk.mrc -o data/test.mrc 
+       mrcImageBinalization -i data/test.mrc -o data/test.bin -m 32
 
 clean:
index 364be38..c5749e4 100755 (executable)
@@ -10,6 +10,7 @@ usage(char* thisProgram)
     fprintf(stderr, "    [-i[nput]            In                  (NULL      ).as(inFile::mrcImage    ) ] :Essential :Input\n");
     fprintf(stderr, "    [-o[utput]           Out                 (NULL      ).as(outFile::mrcImage   ) ] :Essential :Output\n");
     fprintf(stderr, "    [-Shape              Shape               (NULL      ).as(outFile::mrcImage   ) ] :Optional  :Output\n");
+    fprintf(stderr, "    [-n[Cube]            nCube               (0         ).as(Integer             ) ] :Optional  :Mode\n");
     fprintf(stderr, "    [-r[adius]           minR                (3         ).as(Integer             ) \n                         maxR                (5         ).as(Integer             ) \n                         delR                (1         ).as(Integer             ) ] :Optional  :Radius[pixel]\n");
     fprintf(stderr, "    [-l[ength]           minL                (3         ).as(Integer             ) \n                         maxL                (5         ).as(Integer             ) \n                         delL                (1         ).as(Integer             ) ] :Optional  :Length[pixel]\n");
     fprintf(stderr, "    [-Phi                minPhi              (0.0       ).as(Real                ) \n                         maxPhi              (359.0     ).as(Real                ) \n                         delPhi              (1.0       ).as(Real                ) ] :Optional  :around z-axis[degree]\n");