• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision68c1ec84294f6a9d67f49baa49865fc3c4f1e097 (tree)
Time2016-02-20 12:38:56
Author中野沙紀 <nakanosaki@naka...>
Commiter中野沙紀

Log Message

"create Tool"

Change Summary

Incremental Difference

--- a/include/lmrcFFTCentralSection.h
+++ b/include/lmrcFFTCentralSection.h
@@ -77,6 +77,7 @@ typedef struct lmrcMultiFFTCentralSectionsCompareInfo{
7777 int PriorSize;
7878 double Variat;
7979 double** Sigma;
80+ double SigMin;
8081 lmrcMultiFFTCentralSectionsCompareInfoOut* Out;
8182 lmrcMultiFFTCentralSectionsCompareInfoOut* Prior;
8283 }lmrcMultiFFTCentralSectionsCompareInfo;
@@ -99,20 +100,28 @@ extern "C" {
99100 /* prototype begin */
100101
101102 extern void lmrcFFTCentralSectionGet(mrcImage* out, mrcImage* template, mrcImage* volume, lmrcFFTCentralSectionInfo* linfo, int mode);
103+
104+extern void lmrcImageFFTRhoFilter(mrcImage* volFT, mrcImage* count, lmrcFFTCentralSectionInfo* linfo, int mode);
105+extern void lmrcImageFFTCentralSectionPut(mrcImage* volFT, mrcImage* count, mrcImage* template3D, mrcImage* in, double probability, lmrcFFTCentralSectionInfo* linfo, int* c, int mode);
106+
107+//lmrcFFTCentralSectionCompare.c
102108 extern void lmrcFFTCentralSectionCompare(mrcImage* in, mrcImage* volume, lmrcFFTCentralSectionCompareInfo* linfo, int mode);
103109 extern void lmrcFFTCentralSectionCompareInfoWrite(FILE* fpt, float Likelihood, int mode);
110+
111+//lmrcMultiFFTCentralSectionsComapre
104112 extern void lmrcFFTCentralSectionsGet(lmrcMultiFFTCentralSectionsCompareInfoOut* Out, mrcImage* template, mrcImage* volume, lmrcMultiFFTCentralSectionsCompareInfo* linfo, int mode, int nummode);
105113 extern void lmrcMultiFFTCentralSectionsCompare(lmrcMultiFFTCentralSectionsCompareInfoOut* Out, mrcImage* in, mrcImage* volume, lmrcMultiFFTCentralSectionsCompareInfo* linfo, int mode, int nummode);
106114 extern void lmrcMultiFFTCentralSectionsCompareNormalization(lmrcMultiFFTCentralSectionsCompareInfoOut* Out, lmrcMultiFFTCentralSectionsCompareInfo* linfo, int mode);
107115 extern void lmrcMultiFFTCentralSectionsCompareInfoWrite(FILE* fpt, char* filename, lmrcMultiFFTCentralSectionsCompareInfoOut* Out, lmrcMultiFFTCentralSectionsCompareInfo* linfo, float mode1, float mode2);
108116 extern void lmrcMultiFFTCentralSectionsCompareInfoSort(lmrcMultiFFTCentralSectionsCompareInfoOut Out[], int left, int right);
109-//extern void lmrcMultiFFTCentralSectionsCompareInfoSortPre(lmrcMultiFFTCentralSectionsCompareInfo* linfo, int left, int right);
110117 extern void lmrcMultiFFTCentralSectionsCompareInfoProbSet(lmrcMultiFFTCentralSectionsCompareInfo* linfo ,int mode);
111118 extern void lmrcMultiFFTCentralSectionsCompareInfoLimit(lmrcMultiFFTCentralSectionsCompareInfoOut* Out, lmrcMultiFFTCentralSectionsCompareInfo* linfo, float mode1, float mode2);
112119 extern void lmrcMultiFFTCentralSectionsCompareInfoUpdate(lmrcMultiFFTCentralSectionsCompareInfoOut* Out, lmrcMultiFFTCentralSectionsCompareInfo* linfo);
113120 extern void lmrcMultiFFTCentralSectionsCompareInfoVariation(lmrcMultiFFTCentralSectionsCompareInfoOut* Out, lmrcMultiFFTCentralSectionsCompareInfo* linfo);
121+extern void lmrcMultiFFTCentralSectionsCompareSigma(mrcImage* in, lmrcMultiFFTCentralSectionsCompareInfo* linfo, int mode);
114122 /* prototype end */
115123
124+
116125 #ifdef __cplusplus
117126 };
118127 #endif
--- a/src/Objects/DataManip/mrcImage/src/lmrcFFTCentralSection.c
+++ b/src/Objects/DataManip/mrcImage/src/lmrcFFTCentralSection.c
@@ -50,7 +50,7 @@ lmrcImageFFTCentralSectionPut(mrcImage* volFT, mrcImage* count, mrcImage* templa
5050 int i, n, k0;
5151 Matrix3D mat;
5252 double re3d, im3d;
53- double re3d0=0, im3d0=0;
53+ double re3d0=0, im3d0=0,counter=0;
5454 double re2d, im2d;
5555 double re2d0, im2d0;
5656 double phaseShift;
@@ -97,14 +97,13 @@ lmrcImageFFTCentralSectionPut(mrcImage* volFT, mrcImage* count, mrcImage* templa
9797
9898 mrcPixelDataGet(in, X2d, Y2d, 0, &re2d0, mrcPixelRePart, linfo->InterpMode);
9999 mrcPixelDataGet(in, X2d, Y2d, 0, &im2d0, mrcPixelImPart, linfo->InterpMode);
100-//if(re2d0 == 0 && im2d0 == 0){
101-//}else{
100+ if(re2d0 == 0 && im2d0 == 0){
101+ }else{
102102 re3d = re2d+re2d0*probability;
103103 im3d = im2d+im2d0*probability;
104104
105105 re3d0 = re3d*cos(-phaseShift) - im3d*sin(-phaseShift);
106106 im3d0 = re3d*sin(-phaseShift) + im3d*cos(-phaseShift);
107- // DEBUGPRINT4("new data: %f %f <- %f %f \n", re2d0, im2d0, re3d0, im3d0);
108107
109108 if((-volFT->HeaderN.x/2)+0.5 < X3d && X3d < (volFT->HeaderN.x/2)-0.5
110109 &&(-volFT->HeaderN.y/2)+0.5 < Y3d && Y3d < (volFT->HeaderN.y/2)-0.5
@@ -116,26 +115,22 @@ lmrcImageFFTCentralSectionPut(mrcImage* volFT, mrcImage* count, mrcImage* templa
116115 if((-volFT->HeaderN.x/2)+0.5 < X3d && X3d < (volFT->HeaderN.x/2)-0.5
117116 &&(-volFT->HeaderN.y/2)+0.5 < Y3d && Y3d < (volFT->HeaderN.y/2)-0.5
118117 &&(-volFT->HeaderN.z/2)+0.5 < Z3d && Z3d < (volFT->HeaderN.z/2)-0.5) {
119- mrcPixelDataGet(count, X3d, Y3d, Z3d, &re3d0, mrcPixelRePart, linfo->InterpMode);
120- // if(re3d0==0 && im3d0==0){
121- // printf("not zerozero\n");
122- // }else{
123- if(re3d0!=0 || im3d0!=0){
124- mrcPixelDataSet(count, X3d, Y3d, Z3d, re3d0+1, mrcPixelRePart);
125- // printf(" zerozero\n");
126- }
127- // DEBUGPRINT1("count: %f \n", re3d0);
118+ mrcPixelDataGet(count, X3d, Y3d, Z3d, &counter, mrcPixelRePart, linfo->InterpMode);
119+ // if(re3d0!=0 || im3d0!=0){
120+ // if((re3d - (re2d+re2d0*probability)) != 0){
121+ mrcPixelDataSet(count, X3d, Y3d, Z3d, counter+1, mrcPixelRePart);
122+ // }
128123 }
129124 }
130-// }
125+ }
131126 }
132127
133128 lmrcImageFFTCenterChange(volFT, 0);
134-/*
129+
135130 if(!IsFT(volFT, "lmrcFFTCentralSectionGet", 0)){
136131 mrcImageFree(volFT, 0);
137132 memoryFree(volFT);
138- }*/
133+ }
139134 }
140135
141136 void
--- a/src/Tools/mrcImage/mrcMultiFFTCentralSectionsCompare/src/mrcMultiFFTCentralSectionsCompare.c
+++ b/src/Tools/mrcImage/mrcMultiFFTCentralSectionsCompare/src/mrcMultiFFTCentralSectionsCompare.c
@@ -18,7 +18,7 @@
1818
1919 #define DEBUG
2020 #include "genUtil.h"
21-#include "/Users/nakanosaki/Eos/src/Objects/DataManip/mrcImage/src/lmrcFFTCentralSection.h"
21+#include "lmrcFFTCentralSection.h"
2222 //#include "Class.h"
2323
2424 /*
@@ -44,7 +44,7 @@ main(int argc, char* argv[])
4444 char filename[256], fname[256], EAMode[5];
4545 double rot[3];
4646 char Buf[256];
47- FILE* fp;
47+ FILE* fpfp;
4848
4949 start = clock();
5050
@@ -81,7 +81,7 @@ main(int argc, char* argv[])
8181 linfo.llinfo.nRot3 = MAX(1,(int)(fabs((linfo.llinfo.Rot3End - linfo.llinfo.Rot3Start)/linfo.llinfo.Rot3Delta)+0.5));
8282
8383 linfo.llinfo.RotSize = ((linfo.llinfo.nRot1))*((linfo.llinfo.nRot2))*((linfo.llinfo.nRot3));
84- DEBUGPRINT1("RotSize: %d\n",linfo.llinfo.RotSize);
84+ // DEBUGPRINT1("RotSize: %d\n",linfo.llinfo.RotSize);
8585
8686 linfo.OutSize = 0;
8787 linfo.PriorSize = 0;
@@ -152,16 +152,22 @@ main(int argc, char* argv[])
152152 lmrcMultiFFTCentralSectionsCompareInfoSort(linfo.Out, 0, linfo.OutSize-1);
153153 lmrcMultiFFTCentralSectionsCompareInfoLimit(linfo.Out, &linfo, info.Lmode1, info.Lmode2);
154154 lmrcMultiFFTCentralSectionsCompareNormalization(linfo.Out, &linfo, info.Lcalcmode);
155- lmrcMultiFFTCentralSectionsCompareInfoWrite(info.fptOut1, info.In2D, linfo.Out, &linfo, info.Lmode1, info.Lmode2);
155+ if((fpfp=fopen(info.Out1,"a"))==NULL){
156+ printf("Out file open error\n");
157+ exit(EXIT_FAILURE);
158+ }
159+ lmrcMultiFFTCentralSectionsCompareInfoWrite(fpfp, info.In2D, linfo.Out, &linfo, info.Lmode1, info.Lmode2);
160+ //lmrcMultiFFTCentralSectionsCompareInfoWrite(info.fptOut1, info.In2D, linfo.Out, &linfo, info.Lmode1, info.Lmode2);
156161 lmrcMultiFFTCentralSectionsCompareInfoVariation(linfo.Out, &linfo);
157162 // lmrcMultiFFTCentralSectionsCompareInfoProbSet(linfo.Out, &linfo ,1);
158163
159164 DEBUGPRINT1("Prior: %f\n",linfo.Out[0].Prob);
160-
165+/*
161166 for(i=0; i< linfo.PriorSize; i++){
162167 if(linfo.Out[i].Prob >0.0){
163168 DEBUGPRINT1(" %15.6e \n", linfo.Out[i].Prob);
164169 }}
170+ */
165171 free(linfo.Out);
166172 free(linfo.Prior);
167173