--- /dev/null
+../sbin/MachineIndependent
\ No newline at end of file
WORLDNAME=Tools
WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
mrcImagePrint3D \
mrcImageProjection \
mrcImagePut3D \
+mrcImagePyramid \
mrcImageROI \
mrcImageROI3D \
mrcImageROIs \
mrcImageHighPassFilter \
mrcImageHighlighting \
mrcImageHoleFilling \
+mrcImageHornSchunck \
mrcImageHoughTransform \
mrcImageHoughTransformInverse \
mrcImageInfo \
"-o","-o[utput]","OutputDataFile","Optional","3","1","outU","outFile::mrcImage","NULL","2","outV","outFile::mrcImage","NULL","3","outW","outFile::mrcImage","NULL"
"-oF","-o[utput]F","OutputDataFile","Optional","4","1","OutIx","outFile::mrcImage","NULL","2","OutIy","outFile::mrcImage","NULL","3","OutIz","outFile::mrcImage","NULL","4","OutIt","outFile::mrcImage","NULL"
"-oSize","-o[utput]Size","Output:Chimera","Optional","1","1","Size","outFile::mrcImage","NULL"
-"-oSize1","-o[utput]Size1","Output:Chimera","Optional","1","1","Size1","outFile::mrcImage","NULL"
-"-oSize2","-o[utput]Size2","Output:Chimera","Optional","1","1","Size2","outFile::mrcImage","NULL"
-"-oSize3","-o[utput]Size3","Output:Chimera","Optional","1","1","Size3","outFile::mrcImage","NULL"
-"-oSize4","-o[utput]Size4","Output:Chimera","Optional","1","1","Size4","outFile::mrcImage","NULL"
-"-oSize5","-o[utput]Size5","Output:Chimera","Optional","1","1","Size5","outFile::mrcImage","NULL"
-"-oSize6","-o[utput]Size6","Output:Chimera","Optional","1","1","Size6","outFile::mrcImage","NULL"
-"-oSize7","-o[utput]Size7","Output:Chimera","Optional","1","1","Size7","outFile::mrcImage","NULL"
-"-oSize8","-o[utput]Size8","Output:Chimera","Optional","1","1","Size8","outFile::mrcImage","NULL"
-"-oSize9","-o[utput]Size9","Output:Chimera","Optional","1","1","Size9","outFile::mrcImage","NULL"
-"-oSize10","-o[utput]Size10","Output:Chimera","Optional","1","1","Size10","outFile::mrcImage","NULL"
"-MI","-M[ax]I[terations]","MAX_ITERATIONS","Optional","1","1","MAX_ITERATIONS","Real","100"
"-a","-a[lpha]","alpha","Optional","1","1","ALPHA","Real","1.0"
-"-oconv","-o[utput]conv","OutputDataFile","Optional","1","1","Conv","outFile::mrcImage","NULL"
"-oCOMMAND","-o[utput]COMMAND","Output:Chimera","Optional","1","1","OutCOMMAND","outFile::ASCII","NULL"
"-oBILD","-o[utput]BILD","Output:Chimera","Optional","1","1","OutBILD","outFile::ASCII","NULL"
"-bildThresLow","-bildThresLow","bildThresLow","Optional","1","1","BildThresLow","Real","0.0"
char* Size;
FILE* fptSize;
- long flagSize1;
- char* Size1;
- FILE* fptSize1;
-
- long flagSize2;
- char* Size2;
- FILE* fptSize2;
-
- long flagSize3;
- char* Size3;
- FILE* fptSize3;
-
- long flagSize4;
- char* Size4;
- FILE* fptSize4;
-
- long flagSize5;
- char* Size5;
- FILE* fptSize5;
-
- long flagSize6;
- char* Size6;
- FILE* fptSize6;
-
- long flagSize7;
- char* Size7;
- FILE* fptSize7;
-
- long flagSize8;
- char* Size8;
- FILE* fptSize8;
-
- long flagSize9;
- char* Size9;
- FILE* fptSize9;
-
- long flagSize10;
- char* Size10;
- FILE* fptSize10;
-
long flagMAX_ITERATIONS;
float MAX_ITERATIONS;
long flagALPHA;
float ALPHA;
- long flagConv;
- char* Conv;
- FILE* fptConv;
-
long flagOutCOMMAND;
char* OutCOMMAND;
FILE* fptOutCOMMAND;
-include ../Config/Define.inc
-include ../../Config/Define.inc
-include ../../../Config/Define.inc
-include ../../../../Config/Define.inc
+include ../../../Config/Define.inc
+include ../../Config/Define.inc
+include ../Config/Define.inc
+include $(EOS_HOME)/src/Config/DefineTool.inc
-EOSHOME=../../../../../
+EOSHOME=$(EOS_HOME)
DSTDIR=$(EOSHOME)/bin
DSTDOC=$(EOSHOME)/doc
DSTTAR=$(EOSHOME)/tar
then \
echo "Compilation is complete"; \
$(RM) -f $(DSTDIR)/$(OSTYPE)/$(OBJECTNAME); \
- $(CD) $(OSTYPE); $(INSTALL) -m 555 $(OBJECTNAME) ../$(DSTDIR)/$(OSTYPE); \
- $(CHMOD) 555 ../$(DSTDIR)/$(OSTYPE)/$(OBJECTNAME); \
+ $(CD) $(OSTYPE); $(INSTALL) -m 555 $(OBJECTNAME) $(DSTDIR)/$(OSTYPE); \
+ $(CHMOD) 555 $(DSTDIR)/$(OSTYPE)/$(OBJECTNAME); \
else \
echo "Compilation is incomplete. $(OBJECTNAME)"; \
fi
}
SBREAK;
}
- SCASE("oSize1") {
- if(i+1<argc) {
- info->Size1 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize1++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize2") {
- if(i+1<argc) {
- info->Size2 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize2++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize3") {
- if(i+1<argc) {
- info->Size3 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize3++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize4") {
- if(i+1<argc) {
- info->Size4 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize4++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize5") {
- if(i+1<argc) {
- info->Size5 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize5++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize6") {
- if(i+1<argc) {
- info->Size6 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize6++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize7") {
- if(i+1<argc) {
- info->Size7 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize7++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize8") {
- if(i+1<argc) {
- info->Size8 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize8++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize9") {
- if(i+1<argc) {
- info->Size9 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize9++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
- SCASE("oSize10") {
- if(i+1<argc) {
- info->Size10 = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagSize10++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
SCASE("MI") {
if(i+1<argc) {
info->MAX_ITERATIONS = stringGetNthRealData(argv[i+1], 1, " ,");
}
SBREAK;
}
- SCASE("oconv") {
- if(i+1<argc) {
- info->Conv = stringGetNthWord(argv[i+1], 1, " ,");
- i++;
- info->flagConv++;
- } else {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
- SBREAK;
- }
SCASE("oCOMMAND") {
if(i+1<argc) {
info->OutCOMMAND = stringGetNthWord(argv[i+1], 1, " ,");
info->fptOutIz = NULL; info->flagOutIz = 0;
info->fptOutIt = NULL; info->flagOutIt = 0;
info->fptSize = NULL; info->flagSize = 0;
- info->fptSize1 = NULL; info->flagSize1 = 0;
- info->fptSize2 = NULL; info->flagSize2 = 0;
- info->fptSize3 = NULL; info->flagSize3 = 0;
- info->fptSize4 = NULL; info->flagSize4 = 0;
- info->fptSize5 = NULL; info->flagSize5 = 0;
- info->fptSize6 = NULL; info->flagSize6 = 0;
- info->fptSize7 = NULL; info->flagSize7 = 0;
- info->fptSize8 = NULL; info->flagSize8 = 0;
- info->fptSize9 = NULL; info->flagSize9 = 0;
- info->fptSize10 = NULL; info->flagSize10 = 0;
info->MAX_ITERATIONS = 100; info->flagMAX_ITERATIONS = 0;
info->ALPHA = 1.0; info->flagALPHA = 0;
- info->fptConv = NULL; info->flagConv = 0;
info->fptOutCOMMAND = NULL; info->flagOutCOMMAND = 0;
info->fptOutBILD = NULL; info->flagOutBILD = 0;
info->BildThresLow = 0.0; info->flagBildThresLow = 0;
info->fptSize = fileOpen(info->Size, "w");
}
- if(info->flagSize1) {
- info->fptSize1 = fileOpen(info->Size1, "w");
- }
-
- if(info->flagSize2) {
- info->fptSize2 = fileOpen(info->Size2, "w");
- }
-
- if(info->flagSize3) {
- info->fptSize3 = fileOpen(info->Size3, "w");
- }
-
- if(info->flagSize4) {
- info->fptSize4 = fileOpen(info->Size4, "w");
- }
-
- if(info->flagSize5) {
- info->fptSize5 = fileOpen(info->Size5, "w");
- }
-
- if(info->flagSize6) {
- info->fptSize6 = fileOpen(info->Size6, "w");
- }
-
- if(info->flagSize7) {
- info->fptSize7 = fileOpen(info->Size7, "w");
- }
-
- if(info->flagSize8) {
- info->fptSize8 = fileOpen(info->Size8, "w");
- }
-
- if(info->flagSize9) {
- info->fptSize9 = fileOpen(info->Size9, "w");
- }
-
- if(info->flagSize10) {
- info->fptSize10 = fileOpen(info->Size10, "w");
- }
-
if(info->flagMAX_ITERATIONS) {
}
if(info->flagALPHA) {
}
- if(info->flagConv) {
- info->fptConv = fileOpen(info->Conv, "w");
- }
-
if(info->flagOutCOMMAND) {
info->fptOutCOMMAND = fileOpen(info->OutCOMMAND, "w");
}
#include "mrcImage.h"
#include "mrcImageHornSchunck.h"
-
/////////////////////////コード描き始め////////////////////////
//#define ALPHA 1.0 // パラメータ α
-
int main(int argc, char* argv[])
{
mrcImageHornSchunckInfo info;
mrcImage outW;
mrcImage Size;
- mrcImage Size1;
- mrcImage Size2;
- mrcImage Size3;
- mrcImage Size4;
- mrcImage Size5;
- mrcImage Size6;
- mrcImage Size7;
- mrcImage Size8;
- mrcImage Size9;
- mrcImage Size10;
-
- //mrcImage Conv;
init0(&info);
outV.Header = in1.Header;
outW.Header = in1.Header;
Size.Header = in1.Header;
- Size1.Header = in1.Header;
- Size2.Header = in1.Header;
- Size3.Header = in1.Header;
- Size4.Header = in1.Header;
- Size5.Header = in1.Header;
- Size6.Header = in1.Header;
- Size7.Header = in1.Header;
- Size8.Header = in1.Header;
- Size9.Header = in1.Header;
- Size10.Header = in1.Header;
-
- //Conv.Header = in1.Header;
//初期化
mrcInit(&outIx, NULL);
mrcInit(&outV, NULL);
mrcInit(&outW, NULL);
mrcInit(&Size, NULL);
- mrcInit(&Size1, NULL);
- mrcInit(&Size2, NULL);
- mrcInit(&Size3, NULL);
- mrcInit(&Size4, NULL);
- mrcInit(&Size5, NULL);
- mrcInit(&Size6, NULL);
- mrcInit(&Size7, NULL);
- mrcInit(&Size8, NULL);
- mrcInit(&Size9, NULL);
- mrcInit(&Size10, NULL);
-
- //mrcInit(&Conv, NULL);
-
+
//各画像の勾配のための変数
double Ix, Iy, Iz, It;
Ix = Iy = Iz = It = 0;
//収束を見るためのもの
double conv = 0;
+ double conv1 = 0;
double density = 0;
double I = 0;
//最終的に求めたいもの
float x, y, z;
double size = 0;
+
+
+
// inputfileがある場合勾配の計算をする(Ix,Iy,Iz,Itの)
for (x = 1; x < in1.HeaderN.x - 1; x++) {
for (y = 1; y < in1.HeaderN.y - 1; y++) {
size = sqrt(u*u + v*v + w*w);
- //breakのための差異計算
+ //breakのための差異計算の始まり
mrcPixelDataGet(&in1, x , y , z , &I, mrcPixelRePart, mrcPixelHowNearest);
+
+ //差分取る方
conv = conv + fabs( (size - size_before) * I );
- density = density + I;
-
+
+ //差分とらないヒストグラムを重み平均で正規化するための式
+ conv1 = conv1 + fabs( size * I );
+
+ //密度の総和(割るための値)
+ density = density + fabs(I);
+
//オプティカルフロー の差を出してどのぐらい収束するのか知るために...
- if(info.flagSize1) {
- if(l == 0){
- mrcPixelDataSet(&Size1, x, y, z, size, mrcPixelRePart);
- }
- if(l == 1){
- mrcPixelDataSet(&Size2, x, y, z, size, mrcPixelRePart);
- }
- if(l == 2){
- mrcPixelDataSet(&Size3, x, y, z, size, mrcPixelRePart);
- }
- if(l == 3){
- mrcPixelDataSet(&Size4, x, y, z, size, mrcPixelRePart);
- }
- if(l == 9){
- mrcPixelDataSet(&Size5, x, y, z, size, mrcPixelRePart);
- }
- if(l == 19){
- mrcPixelDataSet(&Size6, x, y, z, size, mrcPixelRePart);
- }
- if(l == 29){
- mrcPixelDataSet(&Size7, x, y, z, size, mrcPixelRePart);
- }
- if(l == 39){
- mrcPixelDataSet(&Size8, x, y, z, size, mrcPixelRePart);
- }
- if(l == 49){
- mrcPixelDataSet(&Size9, x, y, z, size, mrcPixelRePart);
- }
- if(l == 99){
- mrcPixelDataSet(&Size10, x, y, z, size, mrcPixelRePart);
- }
- }
mrcPixelDataSet(&outU, x, y, z, u, mrcPixelRePart);
mrcPixelDataSet(&outV, x, y, z, v, mrcPixelRePart);
mrcPixelDataSet(&outW, x, y, z, w, mrcPixelRePart);
mrcPixelDataSet(&Size, x, y, z, size, mrcPixelRePart);
- //printf("反復数%d回目\n", l);
+
+
}
}
}
- printf("反復数%d回目\n", l);
- if(conv/density < 0.0001)
- break;
- }
+ printf("反復数%d回目\n", l);
+ printf("反復回数の差分の値 = %lg\n", conv/density);
+
+ if(conv/density < 0.0000001){//小数第4位までの値欲しいので0.0001で固定する
+ break;
+ }
+ }//反復回数のループ分の最後
+
+
+
if(info.flagoutU) {
mrcFileWrite(&outU, info.outU, "in main", 0);
mrcFileWrite(&outV, info.outV, "in main", 0);
}
if(info.flagSize) {
mrcFileWrite(&Size, info.Size, "in main", 0);
- }
- if(info.flagSize1) {
- mrcFileWrite(&Size1, info.Size1, "in main", 0);
- mrcFileWrite(&Size2, info.Size2, "in main", 0);
- mrcFileWrite(&Size3, info.Size3, "in main", 0);
- mrcFileWrite(&Size4, info.Size4, "in main", 0);
- mrcFileWrite(&Size5, info.Size5, "in main", 0);
- mrcFileWrite(&Size6, info.Size6, "in main", 0);
- mrcFileWrite(&Size7, info.Size7, "in main", 0);
- mrcFileWrite(&Size8, info.Size8, "in main", 0);
- mrcFileWrite(&Size9, info.Size9, "in main", 0);
- mrcFileWrite(&Size10, info.Size10, "in main", 0);
+
}
- /*
- if(info.flagConv) {
- mrcFileWrite(&Conv, info.Conv, "in main", 0);
- }
- */
+
+
return 0;
}
OutIz (NULL ).as(outFile::mrcImage )
OutIt (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFile
[-o[utput]Size Size (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size1 Size1 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size2 Size2 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size3 Size3 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size4 Size4 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size5 Size5 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size6 Size6 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size7 Size7 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size8 Size8 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size9 Size9 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
- [-o[utput]Size10 Size10 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
[-M[ax]I[terations] MAX_ITERATIONS (100 ).as(Real ) ] :Optional :MAX_ITERATIONS
[-a[lpha] ALPHA (1.0 ).as(Real ) ] :Optional :alpha
- [-o[utput]conv Conv (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFile
[-o[utput]COMMAND OutCOMMAND (NULL ).as(outFile::ASCII ) ] :Optional :Output:Chimera
[-o[utput]BILD OutBILD (NULL ).as(outFile::ASCII ) ] :Optional :Output:Chimera
[-bildThresLow BildThresLow (0.0 ).as(Real ) ] :Optional :bildThresLow
-I 1 0 0 1 0 1 -1x1+1+6 ' ' 'NULL' 'outU' OutputDataFile
-I 1 0 0 1 0 1 -1x1+1+7 ' ' 'NULL' 'OutIx' OutputDataFile
-O 1 0 1 0 0 1 -1x1+1+9.000000 ' ' 'Size' 'Output:Chimera' oSize
- -O 1 0 1 0 0 1 -1x1+1+10.500000 ' ' 'Size1' 'Output:Chimera' oSize1
- -O 1 0 1 0 0 1 -1x1+1+12.000000 ' ' 'Size2' 'Output:Chimera' oSize2
- -O 1 0 1 0 0 1 -1x1+1+13.500000 ' ' 'Size3' 'Output:Chimera' oSize3
- -O 1 0 1 0 0 1 -1x1+1+15.000000 ' ' 'Size4' 'Output:Chimera' oSize4
- -O 1 0 1 0 0 1 -1x1+1+16.500000 ' ' 'Size5' 'Output:Chimera' oSize5
- -O 1 0 1 0 0 1 -1x1+1+18.000000 ' ' 'Size6' 'Output:Chimera' oSize6
- -O 1 0 1 0 0 1 -1x1+1+19.500000 ' ' 'Size7' 'Output:Chimera' oSize7
- -O 1 0 1 0 0 1 -1x1+1+21.000000 ' ' 'Size8' 'Output:Chimera' oSize8
- -O 1 0 1 0 0 1 -1x1+1+22.500000 ' ' 'Size9' 'Output:Chimera' oSize9
- -O 1 0 1 0 0 1 -1x1+1+24.000000 ' ' 'Size10' 'Output:Chimera' oSize10
- -f 1 0 1 0 0 -1x1+1+25.500000 0 0 100.000000 0 0 0 'MAX_ITERATIONS' 'MAX_ITERATIONS' MI
- -f 1 0 1 0 0 -1x1+1+27.000000 0 0 1.000000 0 0 0 'ALPHA' 'alpha' a
- -O 1 0 1 0 0 1 -1x1+1+28.500000 ' ' 'Conv' 'OutputDataFile' oconv
- -O 1 0 1 0 0 1 -1x1+1+30.000000 ' ' 'OutCOMMAND' 'Output:Chimera' oCOMMAND
- -O 1 0 1 0 0 1 -1x1+1+31.500000 ' ' 'OutBILD' 'Output:Chimera' oBILD
- -f 1 0 1 0 0 -1x1+1+33.000000 0 0 0.000000 0 0 0 'BildThresLow' 'bildThresLow' bildThresLow
- -f 1 0 1 0 0 -1x1+1+34.500000 0 0 1.000000 0 0 0 'BildThresHigh' 'bildThresHigh' bildThresHigh
- -f 1 0 1 0 0 -1x1+1+36.000000 0 0 0.000000 0 0 0 'BildRangeLow' 'bildRangeLow' bildRangeLow
- -f 1 0 1 0 0 -1x1+1+37.500000 0 0 1.000000 0 0 0 'BildRangeHigh' 'bildRangeHigh' bildRangeHigh
- -I 1 0 1 0 0 1 -1x1+1+39.000000 ' ' 'configFile' 'ConfigurationFile' c
- -i 1 0 1 0 0 -1x1+1+40.500000 0 0 0 0 0 'mode' 'Mode' m
+ -f 1 0 1 0 0 -1x1+1+10.500000 0 0 100.000000 0 0 0 'MAX_ITERATIONS' 'MAX_ITERATIONS' MI
+ -f 1 0 1 0 0 -1x1+1+12.000000 0 0 1.000000 0 0 0 'ALPHA' 'alpha' a
+ -O 1 0 1 0 0 1 -1x1+1+13.500000 ' ' 'OutCOMMAND' 'Output:Chimera' oCOMMAND
+ -O 1 0 1 0 0 1 -1x1+1+15.000000 ' ' 'OutBILD' 'Output:Chimera' oBILD
+ -f 1 0 1 0 0 -1x1+1+16.500000 0 0 0.000000 0 0 0 'BildThresLow' 'bildThresLow' bildThresLow
+ -f 1 0 1 0 0 -1x1+1+18.000000 0 0 1.000000 0 0 0 'BildThresHigh' 'bildThresHigh' bildThresHigh
+ -f 1 0 1 0 0 -1x1+1+19.500000 0 0 0.000000 0 0 0 'BildRangeLow' 'bildRangeLow' bildRangeLow
+ -f 1 0 1 0 0 -1x1+1+21.000000 0 0 1.000000 0 0 0 'BildRangeHigh' 'bildRangeHigh' bildRangeHigh
+ -I 1 0 1 0 0 1 -1x1+1+22.500000 ' ' 'configFile' 'ConfigurationFile' c
+ -i 1 0 1 0 0 -1x1+1+24.000000 0 0 0 0 0 'mode' 'Mode' m
-E
-E
-E
fprintf(stderr, " [-o[utput] outU (NULL ).as(outFile::mrcImage ) \n outV (NULL ).as(outFile::mrcImage ) \n outW (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFile\n");
fprintf(stderr, " [-o[utput]F OutIx (NULL ).as(outFile::mrcImage ) \n OutIy (NULL ).as(outFile::mrcImage ) \n OutIz (NULL ).as(outFile::mrcImage ) \n OutIt (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFile\n");
fprintf(stderr, " [-o[utput]Size Size (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size1 Size1 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size2 Size2 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size3 Size3 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size4 Size4 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size5 Size5 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size6 Size6 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size7 Size7 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size8 Size8 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size9 Size9 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
- fprintf(stderr, " [-o[utput]Size10 Size10 (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
fprintf(stderr, " [-M[ax]I[terations] MAX_ITERATIONS (100 ).as(Real ) ] :Optional :MAX_ITERATIONS\n");
fprintf(stderr, " [-a[lpha] ALPHA (1.0 ).as(Real ) ] :Optional :alpha\n");
- fprintf(stderr, " [-o[utput]conv Conv (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFile\n");
fprintf(stderr, " [-o[utput]COMMAND OutCOMMAND (NULL ).as(outFile::ASCII ) ] :Optional :Output:Chimera\n");
fprintf(stderr, " [-o[utput]BILD OutBILD (NULL ).as(outFile::ASCII ) ] :Optional :Output:Chimera\n");
fprintf(stderr, " [-bildThresLow BildThresLow (0.0 ).as(Real ) ] :Optional :bildThresLow\n");
# OptionControlFile
# FileFormat
+"-input","-input","Input","Essential","1","1","In","inFile::mrcImage","NULL"
+"-H","-H[istgram]","Histgram","Optional","1","1","Histgram","outFile::ASCII","stdout"
"-i","-i[nput]","InputDataFile","Optional","3","1","InVx","inFile::mrcImage","NULL","2","InVy","inFile::mrcImage","NULL","3","InVz","inFile::mrcImage","NULL"
"-I","-I[nput]","InputDataFile","Optional","3","1","InVxList","inFileList::mrcImage","NULL","2","InVyList","inFileList::mrcImage","NULL","3","InVzList","inFileList::mrcImage","NULL"
"-i1","-i[nput]1","InputDataFile","Optional","3","1","In1Vx","inFile::mrcImage","NULL","2","In1Vy","inFile::mrcImage","NULL","3","In1Vz","inFile::mrcImage","NULL"
"-oSize","-o[utput]Size","Output:Chimera","Optional","1","1","Size","outFile::mrcImage","NULL"
"-c","-c[onfig]","ConfigurationFile","Optional","1","1","configFile","inFile","NULL"
"-m","-m[ode]","Mode","Optional","1","1","mode","Integer","0"
+"-b","-b[in]","bin","Optional","1","1","BIN","Integer","10"
+"-t","-t[hreshold]","threshold","Optional","1","1","THRESHOLD","Integer","0.1"
typedef struct mrcImageLucasKanadeInfo {
long flagRedirect;
+ long flagIn;
+ char* In;
+ FILE* fptIn;
+
+ long flagHistgram;
+ char* Histgram;
+ FILE* fptHistgram;
+
long flagInVx;
char* InVx;
FILE* fptInVx;
long flagmode;
long mode;
+ long flagBIN;
+ long BIN;
+
+ long flagTHRESHOLD;
+ long THRESHOLD;
+
} mrcImageLucasKanadeInfo;
#ifdef __cplusplus
extern "C" {
for(i=1; i<argc; i++) {
if(OPTION_FLAG==argv[i][OPTION_FLAG_POS]) {
SSWITCH(argv[i]+OPTION_POS)
+ SCASE("input") {
+ if(i+1<argc) {
+ info->In = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagIn++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("H") {
+ if(i+1<argc) {
+ info->Histgram = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagHistgram++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
SCASE("i") {
if(i+3<argc) {
info->InVx = stringGetNthWord(argv[i+1], 1, " ,");
}
SBREAK;
}
+ SCASE("b") {
+ if(i+1<argc) {
+ info->BIN = stringGetNthIntegerData(argv[i+1], 1, " ,");
+ i++;
+ info->flagBIN++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("t") {
+ if(i+1<argc) {
+ info->THRESHOLD = stringGetNthIntegerData(argv[i+1], 1, " ,");
+ i++;
+ info->flagTHRESHOLD++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
SCASE("h") {
usage(argv[0]);
exit(EXIT_SUCCESS);
void
init0(mrcImageLucasKanadeInfo* info)
{
+ info->fptIn = NULL; info->flagIn = 0;
+ info->fptHistgram = stdout; info->flagHistgram = 0;
info->fptInVx = NULL; info->flagInVx = 0;
info->fptInVy = NULL; info->flagInVy = 0;
info->fptInVz = NULL; info->flagInVz = 0;
info->fptSize = NULL; info->flagSize = 0;
info->fptconfigFile = NULL; info->flagconfigFile = 0;
info->mode = 0; info->flagmode = 0;
+ info->BIN = 10; info->flagBIN = 0;
+ info->THRESHOLD = 0.1; info->flagTHRESHOLD = 0;
}
void
{
char s[1024];
int i;
+ if(!info->flagIn) {
+ stringGetFromFile(s, "In", stdin, stdout, 0);
+ info->In = stringGetNthWord(s, 1, " ,\t");
+ info->flagIn++;
+ }
+ if(info->flagIn) {
+ info->fptIn = fileOpen(info->In, "r");
+ }
+
+ if(info->flagHistgram) {
+ info->fptHistgram = fileOpen(info->Histgram, "w");
+ }
+
if(info->flagInVx) {
info->fptInVx = fileOpen(info->InVx, "r");
}
if(info->flagmode) {
}
+ if(info->flagBIN) {
+ }
+
+ if(info->flagTHRESHOLD) {
+ }
+
}
#ifdef KHOROS
#include <stdio.h>
mrcImageLucasKanadeInfo info;
- int i=5;
- //i=info.NOS;
//ポインタ変数の定義
mrcImage* InVx;
mrcImage outVz;
mrcImage Size;
+ mrcImage In;
+ //mrcImage Histgram;
+ //mrcImage Out;
/*
mrcImage in1Vx, in1Vy, in1Vz;
mrcImage in2Vx, in2Vy, in2Vz;
*/
//変数の定義
+ int i = 0;
double x,y,z;
- double data0, data1, data2, data3, data4, data5, data6;
- double size1, size2, size3, size;
+ double data1, data2, data3, data4, data5, data6;
+ double size1, size2, size3, size, *I, *Y;
+ double pix = 0;
+
+ int n = 0;
+ double delta;
+ // double sum = 0;
+ double max, min;
+
init0(&info);
argCheck(&info, argc, argv);
mrcInit(&tmpy[i], NULL);
mrcInit(&tmpz[i], NULL);
}
+ //ファイルの読み込み
+ mrcFileRead(&In, info.In, "in main", 0);
//ファイルフォーマットの統一
outVx.Header = InVx[0].Header;
outVy.Header = InVx[0].Header;
outVz.Header = InVx[0].Header;
Size.Header = InVx[0].Header;
-
- /*
- mrcFileRead(&in1Vx, info.In1Vx, "in main", 0);
- mrcFileRead(&in1Vy, info.In1Vy, "in main", 0);
- mrcFileRead(&in1Vz, info.In1Vz, "in main", 0);
-
- mrcFileRead(&in2Vx, info.In2Vx, "in main", 0);
- mrcFileRead(&in2Vy, info.In2Vy, "in main", 0);
- mrcFileRead(&in2Vz, info.In2Vz, "in main", 0);
-
- mrcFileRead(&in3Vx, info.In3Vx, "in main", 0);
- mrcFileRead(&in3Vy, info.In3Vy, "in main", 0);
- mrcFileRead(&in3Vz, info.In3Vz, "in main", 0);
-
- mrcFileRead(&in4Vx, info.In4Vx, "in main", 0);
- mrcFileRead(&in4Vy, info.In4Vy, "in main", 0);
- mrcFileRead(&in4Vz, info.In4Vz, "in main", 0);
-
- outVx.Header = in1Vx.Header;
- outVy.Header = in1Vx.Header;
- outVz.Header = in1Vx.Header;
- */
+ //In.Header = InVx[0].Header;
+ //Out.Header = InVx[0].Header;
+ //Histgram.Header = InVx[0].Header;
//初期化
mrcInit(&outVx, NULL);
mrcInit(&outVy, NULL);
mrcInit(&outVz, NULL);
mrcInit(&Size, NULL);
+ //mrcInit(&In, NULL);
+ //mrcInit(&Out, NULL);
+ //mrcInit(&Histgram, NULL);
+
+ //ファイルポインタの宣言
+ /*
+ FILE *fpt;
+ fpt = fopen("output_histgram.txt", "w");
+
+ if (fpt == NULL) {
+ fprintf(stderr, "ファイルを開けませんでした。\n");
+ return 1; // エラーコードを返して終了
+ }
+ */
+
+
//ピラミダルの計算(inFileList)
//info.flagInVxList-1 リストファイルの行数-1回
mrcPixelDataGet(&(InVy[i]), x, y, z, &data2, mrcPixelRePart, mrcPixelHowNearest);
mrcPixelDataGet(&(InVz[i]), x, y, z, &data3, mrcPixelRePart, mrcPixelHowNearest);
- //if(data1 <= 1 && data2 <= 1 && data3 <= 1){
+ if(fabs(data1) <= 1.0 && fabs(data2) <= 1.0 && fabs(data3) <= 1.0){
data1 = 2 * data1; //下の解像度のフローを2倍して一つ上のピラミダル画像に渡す
data2 = 2 * data2;
data3 = 2 * data3;
mrcPixelDataSet(&(InVx[i-1]), 2*x, 2*y, 2*z, data1, mrcPixelRePart); //一つ上の解像度のピラミダル画像の偶数ピクセルに値をセットする
mrcPixelDataSet(&(InVy[i-1]), 2*x, 2*y, 2*z, data2, mrcPixelRePart);
mrcPixelDataSet(&(InVz[i-1]), 2*x, 2*y, 2*z, data3, mrcPixelRePart);
- //}
+ }
}
}
}
mrcPixelDataSet(&(InVy[i-1]), x, y, z, size2, mrcPixelRePart);
mrcPixelDataSet(&(InVz[i-1]), x, y, z, size3, mrcPixelRePart);
- // size = sqrt(size1 * size1 + size2 * size2 + size3 * size3);
- // mrcPixelDataSet(&Size, x, y, z, size, mrcPixelRePart);
}
}
}
}
}
- //printf("iの値を出力:%d\n",i);
-
- for(z=0; z<InVx[i].HeaderN.z; z++){
- for(y=0; y<InVx[i].HeaderN.y; y++){
- for(x=0; x<InVx[i].HeaderN.x; x++){
+ max = -1;
+ min = FLT_MAX;
+ for(z=0; z<InVx[0].HeaderN.z; z++){
+ for(y=0; y<InVx[0].HeaderN.y; y++){
+ for(x=0; x<InVx[0].HeaderN.x; x++){
if(info.flagInVxList){
mrcPixelDataGet(&(InVx[i]), x, y, z, &data1, mrcPixelRePart, mrcPixelHowNearest);
mrcPixelDataSet(&outVy, x, y, z, data2, mrcPixelRePart);
mrcPixelDataSet(&outVz, x, y, z, data3, mrcPixelRePart);
mrcPixelDataSet(&Size, x, y, z, size, mrcPixelRePart);
+
+ //ここで最大値最小値を計算する
+ //max
+ //min
+ if(max<size) max = size;
+ if(size<min) min = size;
}
}
}
}
+ /*************************************************************/
+ //ヒストグラムの階級(ビン)
+ n = info.BIN;
+ //各階級の幅
+ delta = ( (max - min) / info.BIN);
+
+ fprintf(stderr, "%f %f %f %d\n", min, max, delta, n);
+ fprintf(stderr, "%f %f \n", In.HeaderAMin, In.HeaderAMax);
+
+ //ヒストグラムの各ビンに対する累積値を格納するための配列、動的にメモリの確保
+ I = (double*)calloc(n, sizeof(double));
+ Y = (double*)calloc(n, sizeof(double));
+ if(NULL != I) {
+ double thres = info.THRESHOLD; // mean + 2*SD
+ double T, U ;
+ double data;
+ T = (thres - In.HeaderAMin)/(In.HeaderAMax - In.HeaderAMin);
+ U = In.HeaderAMin/(In.HeaderAMax - In.HeaderAMin);
+ for(z=0; z<InVx[0].HeaderN.z; z++){
+ for(y=0; y<InVx[0].HeaderN.y; y++){
+ for(x=0; x<InVx[0].HeaderN.x; x++){
+ mrcPixelDataGet(&Size, x, y, z, &size, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&In, x, y, z, &pix, mrcPixelRePart, mrcPixelHowNearest);
+ i =(int)(( size-min)/delta);
+ if(n<=i) i = n-1;
+ data = (pix-In.HeaderAMin)/(In.HeaderAMax-In.HeaderAMin);
+ if(T<=data) {
+ I[i] += data;
+ }
+ if(U<=data) {
+ Y[i] += data;
+ }
+ }
+ }
+ }
+ for(i=0; i<n; i++){
+ fprintf(info.fptHistgram, "%3d %15.6g %15.6g %15.6g \n", i, min+i*delta, Y[i], I[i]);
+ }
+ }
+ //fclose(fpt);
+ /*ここまでヒストグラムの仕掛け*/
+ /*************************************************************/
<PRE>
Usage: mrcImageLucasKanade
Options:
+ [-input In (NULL ).as(inFile::mrcImage ) ] :Essential :Input
+ [-H[istgram] Histgram (stdout ).as(outFile::ASCII ) ] :Optional :Histgram
[-i[nput] InVx (NULL ).as(inFile::mrcImage )
InVy (NULL ).as(inFile::mrcImage )
InVz (NULL ).as(inFile::mrcImage ) ] :Optional :InputDataFile
[-o[utput]Size Size (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera
[-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile
[-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode
+ [-b[in] BIN (10 ).as(Integer ) ] :Optional :bin
+ [-t[hreshold] THRESHOLD (0.1 ).as(Integer ) ] :Optional :threshold
----- Additional Usage -----
</PRE>
</BODY>
-R 1 0 1 5x1+35+0 'Run' 'execute operation' $EOS/bin/mrcImageLucasKanade
-H 1 5x1+41+0 'Help' 'help page' $EOS/src/Tools/mrcImage/mrcImageLucasKanade/doc/mrcImageLucasKanade.doc help
-Q 1 0 5.25x1+47+0 'Close'
- -I 1 0 0 1 0 1 -1x1+1+1 ' ' 'NULL' 'InVx' InputDataFile
- -I 1 0 0 1 0 1 -1x1+1+3 ' ' 'NULL' 'InVxList' InputDataFile
- -I 1 0 0 1 0 1 -1x1+1+4 ' ' 'NULL' 'In1Vx' InputDataFile
- -I 1 0 0 1 0 1 -1x1+1+6 ' ' 'NULL' 'In2Vx' InputDataFile
- -I 1 0 0 1 0 1 -1x1+1+7 ' ' 'NULL' 'In3Vx' InputDataFile
- -I 1 0 0 1 0 1 -1x1+1+9 ' ' 'NULL' 'In4Vx' InputDataFile
- -I 1 0 1 1 0 1 -1x1+1+10 ' ' 'NULL' 'outVx' OutputDataFile
- -f 1 0 1 0 0 -1x1+1+12.000000 0 0 4.000000 0 0 0 'NOS' 'NOS' nos
- -O 1 0 1 0 0 1 -1x1+1+13.500000 ' ' 'Size' 'Output:Chimera' oSize
- -I 1 0 1 0 0 1 -1x1+1+15.000000 ' ' 'configFile' 'ConfigurationFile' c
- -i 1 0 1 0 0 -1x1+1+16.500000 0 0 0 0 0 'mode' 'Mode' m
+ -I 1 0 1 1 0 1 -1x1+1+1.500000 ' ' 'In' 'Input' input
+ -O 1 0 1 0 0 1 -1x1+1+3.000000 ' ' 'Histgram' 'Histgram' H
+ -I 1 0 0 1 0 1 -1x1+1+4 ' ' 'NULL' 'InVx' InputDataFile
+ -I 1 0 0 1 0 1 -1x1+1+6 ' ' 'NULL' 'InVxList' InputDataFile
+ -I 1 0 0 1 0 1 -1x1+1+7 ' ' 'NULL' 'In1Vx' InputDataFile
+ -I 1 0 0 1 0 1 -1x1+1+9 ' ' 'NULL' 'In2Vx' InputDataFile
+ -I 1 0 0 1 0 1 -1x1+1+10 ' ' 'NULL' 'In3Vx' InputDataFile
+ -I 1 0 0 1 0 1 -1x1+1+12 ' ' 'NULL' 'In4Vx' InputDataFile
+ -I 1 0 1 1 0 1 -1x1+1+13 ' ' 'NULL' 'outVx' OutputDataFile
+ -f 1 0 1 0 0 -1x1+1+15.000000 0 0 4.000000 0 0 0 'NOS' 'NOS' nos
+ -O 1 0 1 0 0 1 -1x1+1+16.500000 ' ' 'Size' 'Output:Chimera' oSize
+ -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
+ -i 1 0 1 0 0 -1x1+1+21.000000 0 0 10 0 0 'BIN' 'bin' b
+ -i 1 0 1 0 0 -1x1+1+22.500000 0 0 0 0 0 'THRESHOLD' 'threshold' t
-E
-E
-E
{
fprintf(stderr, "Usage: %s\n", thisProgram);
fprintf(stderr, "Options:\n");
+ fprintf(stderr, " [-input In (NULL ).as(inFile::mrcImage ) ] :Essential :Input\n");
+ fprintf(stderr, " [-H[istgram] Histgram (stdout ).as(outFile::ASCII ) ] :Optional :Histgram\n");
fprintf(stderr, " [-i[nput] InVx (NULL ).as(inFile::mrcImage ) \n InVy (NULL ).as(inFile::mrcImage ) \n InVz (NULL ).as(inFile::mrcImage ) ] :Optional :InputDataFile\n");
fprintf(stderr, " [-I[nput] InVxList (NULL ).as(inFileList::mrcImage) \n InVyList (NULL ).as(inFileList::mrcImage) \n InVzList (NULL ).as(inFileList::mrcImage) ] :Optional :InputDataFile\n");
fprintf(stderr, " [-i[nput]1 In1Vx (NULL ).as(inFile::mrcImage ) \n In1Vy (NULL ).as(inFile::mrcImage ) \n In1Vz (NULL ).as(inFile::mrcImage ) ] :Optional :InputDataFile\n");
fprintf(stderr, " [-o[utput]Size Size (NULL ).as(outFile::mrcImage ) ] :Optional :Output:Chimera\n");
fprintf(stderr, " [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile\n");
fprintf(stderr, " [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode\n");
+ fprintf(stderr, " [-b[in] BIN (10 ).as(Integer ) ] :Optional :bin\n");
+ fprintf(stderr, " [-t[hreshold] THRESHOLD (0.1 ).as(Integer ) ] :Optional :threshold\n");
additionalUsage();
}
--- /dev/null
+OBJECTNAME = mrcImagePyramid
+EXTRA_LIB =
+EXTRA_CCOPTS =
+EXTRA_INC =
--- /dev/null
+# OptionControlFile
+# FileFormat
+"-i","-i[nput]","InputDataFile","Essential","3","1","InU","inFile::mrcImage","NULL","2","InV","inFile::mrcImage","NULL","3","InW","inFile::mrcImage","NULL"
+"-iShrink","-i[nput]Shrink","InputDataFileShrink","Essential","2","1","In1ShrinkList","inFileList::mrcImage","NULL","2","In2ShrinkList","inFileList::mrcImage","NULL"
+"-o","-o[utput]","OutputDataFile","Optional","3","1","outU","outFile::mrcImage","NULL","2","outV","outFile::mrcImage","NULL","3","outW","outFile::mrcImage","NULL"
+"-oFlow","-o[utput]Flow","OutputDataFilemrcFlow","Optional","1","1","outFlow","outFile::mrcImage","NULL"
+"-oHistgram","-o[utput]Histgram","OutputDataFileHistgram","Optional","1","1","outHistgram","outFile::ASCII","stdout"
+"-c","-c[onfig]","ConfigurationFile","Optional","1","1","configFile","inFile","NULL"
+"-m","-m[ode]","Mode","Optional","1","1","mode","Integer","0"
+"-bg","-b[ack]g[round]","BG","Optional","1","1","BG","Real","1"
+"-b","-b[in]","bin","Optional","1","1","BIN","Integer","100"
+"-t","-t[hreshold]","threshold","Optional","1","1","THRESHOLD","Integer","0.1"
--- /dev/null
+include ../../../Config/Define.inc
+include ../../Config/Define.inc
+include ../Config/Define.inc
+include Config/Define.inc
+
+all:
+ cd src; make all; cd ..
+
+install:
+ cd src; make install; cd ..
+
+
+putSF:
+ if [ -f private ] ; \
+ then \
+ echo "$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME) is private"; \
+ else \
+ cvs -z4 -d:ext:$$USER@$$EOS_SOURCEFORGE commit || cvs -z4 -d:ext:$$USER@$$EOS_SOURCEFORGE import src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME); \
+ fi
+
+put:
+ cd src; make put; cd ..
+
+clean:
+ cd src; make clean; cd ..
+
+depend:
+ cd src; make depend; cd ..
+
+check:
+ @if [ ! -d $(EOS_HOME)/hostdepend/$(OSTYPE)/src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/$(OSTYPE) ] ; then \
+ echo making directory; \
+ mkdir -p $(EOS_HOME)/hostdepend/$(OSTYPE)/src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/$(OSTYPE); \
+ fi
+ ln -sf ../../../../../hostdepend/$(OSTYPE)/src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/$(OSTYPE) src/$(OSTYPE);
+ @$(RM) src/Makefile
+ @echo "New src/Makefile"
+ @$(CP) ../../../Config/Template/$(WORLDNAME)Template.Dir/src/Makefile src/Makefile
+ @cd src; rm -f $(OSTYPE)/.Depend; touch $(OSTYPE)/.Depend; make depend
+
+update:
+ @if [ ! -d $(EOS_HOME)/hostdepend/$(OSTYPE)/src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/$(OSTYPE) ] ; then \
+ echo making directory; \
+ mkdir -p $(EOS_HOME)/hostdepend/$(OSTYPE)/src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/$(OSTYPE); \
+ fi
+ ln -sf ../../../../../hostdepend/$(OSTYPE)/src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/$(OSTYPE) src/$(OSTYPE);
+ @$(RM) src/Makefile
+ @echo "New src/Makefile"
+ @$(CP) ../../../Config/Template/$(WORLDNAME)Template.Dir/src/Makefile src/Makefile
+ @cd src; rm -f $(OSTYPE)/.Depend; touch $(OSTYPE)/.Depend; echo "Y" | make update
+
+cvsupdate::
+ cvs -d $(EOS_CVSROOT) update -d
+
+cvscommit::
+ cvs -d $(EOS_CVSROOT) commit
+
+backup:
+ @cd ../../../..; \
+ echo $(OBJECTNAME) ; \
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/Config ; \
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/Makefile ;\
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/.[A-z]* ; \
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/inc ; \
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/doc; \
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/wish; \
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/[A-z]*.[A-z]*; \
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/.[A-z]*; \
+ tar uvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/Makefile
+
+backup-all:
+ @cd ../../../..; \
+ echo $(OBJECTNAME) ; \
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/Config ; \
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/Makefile ;\
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/.[A-z]* ; \
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/inc ; \
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/doc; \
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/wish; \
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/[A-z]*.[A-z]*; \
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/.[A-z]*; \
+ tar rvf ${EOS_HOME}/backup/EosBase.tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/Makefile
+
+distribute:
+ cd ../../../..; \
+ echo $(OBJECTNAME) ; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/Config ; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/Makefile ;\
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/.[A-z]* ; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/inc ; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/doc; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/wish; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/[A-z]*.[A-z]*; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/.[A-z]*; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/Makefile ; \
+ tar uvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/$(OSTYPE)
+
+distribute-all:
+ @cd ../../../..; \
+ echo $(OBJECTNAME) ; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/Config ; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/Makefile ;\
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/.[A-z]* ; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/inc ; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/doc; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/wish; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/[A-z]*.[A-z]*; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/.[A-z]*; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/Makefile ; \
+ tar rvf ${EOS_HOME}/distribute/src.$(OSTYPE).tar src/$(WORLDNAME)/$(CLASSNAME)/$(OBJECTNAME)/src/$(OSTYPE)
+
+eosintroduce:
+ ${EOS_HOME}/sbin/eosintroduce ${WORLDNAME} ${CLASSNAME} ${OBJECTNAME} ./
+
+include Config/Target.inc
--- /dev/null
+install:
+ cd ../src; make install-doc; cd ../doc
--- /dev/null
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "../inc/mrcImagePyramid.h"
+
+#endif /* CONFIG_H */
--- /dev/null
+#ifndef MRCIMAGEPYRAMID_H
+#define MRCIMAGEPYRAMID_H
+#include <stdio.h>
+#include <stdlib.h>
+
+#define OPTION_FLAG '-'
+#define OPTION_FLAG_POS (0)
+#define OPTION_POS (1)
+
+
+
+
+typedef struct mrcImagePyramidInfo {
+ long flagRedirect;
+
+ long flagInU;
+ char* InU;
+ FILE* fptInU;
+
+ long flagInV;
+ char* InV;
+ FILE* fptInV;
+
+ long flagInW;
+ char* InW;
+ FILE* fptInW;
+
+ long flagIn1ShrinkList;
+ char** In1ShrinkList;
+ char* In1ShrinkListList;
+ FILE** fptIn1ShrinkList;
+ FILE* fptIn1ShrinkListList;
+
+ long flagIn2ShrinkList;
+ char** In2ShrinkList;
+ char* In2ShrinkListList;
+ FILE** fptIn2ShrinkList;
+ FILE* fptIn2ShrinkListList;
+
+ long flagoutU;
+ char* outU;
+ FILE* fptoutU;
+
+ long flagoutV;
+ char* outV;
+ FILE* fptoutV;
+
+ long flagoutW;
+ char* outW;
+ FILE* fptoutW;
+
+ long flagoutFlow;
+ char* outFlow;
+ FILE* fptoutFlow;
+
+ long flagoutHistgram;
+ char* outHistgram;
+ FILE* fptoutHistgram;
+
+ long flagconfigFile;
+ char* configFile;
+ FILE* fptconfigFile;
+
+ long flagmode;
+ long mode;
+
+ long flagBG;
+ float BG;
+
+ long flagBIN;
+ long BIN;
+
+ long flagTHRESHOLD;
+ long THRESHOLD;
+
+} mrcImagePyramidInfo;
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern void argCheck(mrcImagePyramidInfo* info, int argc, char* avgv[]);
+extern void khorosInit(int argc, char* avgv[]);
+extern void init0(mrcImagePyramidInfo* info);
+extern void init1(mrcImagePyramidInfo* info);
+extern void usage(char* usage);
+extern void additionalUsage(void);
+extern void htmlBeforeUsage(char* usage);
+extern void htmlAfterUsage(char* usage);
+#ifdef __cplusplus
+};
+#endif
+#endif /* MRCIMAGEPYRAMID_H */
--- /dev/null
+include ../../../Config/Define.inc
+include ../../Config/Define.inc
+include ../Config/Define.inc
+include $(EOS_HOME)/src/Config/DefineTool.inc
+
+EOSHOME=$(EOS_HOME)
+DSTDIR=$(EOSHOME)/bin
+DSTDOC=$(EOSHOME)/doc
+DSTTAR=$(EOSHOME)/tar
+
+INCFILES =
+
+LIBFILES = \
+ $(LIBPREFIX)EosObjects$(LIBSUFFIX)
+
+LIBFILESDEBUG = \
+ $(LIBPREFIX)EosObjects.debug$(LIBSUFFIX)
+
+SRCC = \
+ $(OBJECTNAME).c \
+ init.c \
+ argCheck.c \
+ usage.c \
+ util.c \
+
+SRCCXX = \
+ $(OBJECTNAME).cc \
+ init.cc \
+ argCheck.cc \
+ usage.cc \
+ util.cc \
+
+MODULES = \
+ $(OBJECTNAME).o \
+ init.o \
+ argCheck.o \
+ usage.o \
+ util.o \
+
+REALMODULES = \
+ $(OSTYPE)/$(OBJECTNAME).o \
+ $(OSTYPE)/init.o \
+ $(OSTYPE)/argCheck.o \
+ $(OSTYPE)/usage.o \
+ $(OSTYPE)/util.o
+
+MODULESDEBUG = \
+ $(OBJECTNAME).debugo \
+ init.debugo \
+ argCheck.debugo \
+ usage.debugo \
+ util.debugo \
+
+REALMODULESDEBUG = \
+ $(OSTYPE)/$(OBJECTNAME).debugo \
+ $(OSTYPE)/init.debugo \
+ $(OSTYPE)/argCheck.debugo \
+ $(OSTYPE)/usage.debugo \
+ $(OSTYPE)/util.debugo
+
+
+all: $(OSTYPE)/$(OBJECTNAME)
+ if [ ! -L $(OSTYPE) ] ; then \
+ moveHostdependent; \
+ fi
+
+debug: $(OSTYPE)/$(OBJECTNAME).debug
+
+cudagdb: $(OSTYPE)/$(OBJECTNAME).cudagdb
+
+
+$(OSTYPE)/$(OBJECTNAME)::
+ @$(RM) -f $(OSTYPE)/Makefile ; \
+ $(CP) $(EOS_HOME)/src/Config/Template/$(WORLDNAME)Template.Dir/src/ARCH/Makefile $(OSTYPE)/Makefile ; \
+ cd $(OSTYPE); \
+ $(MAKE) $(OBJECTNAME) WORLDNAME=$(WORLDNAME) CLASSNAME=$(CLASSNAME) OBJECTNAME=$(OBJECTNAME)
+
+$(OSTYPE)/$(OBJECTNAME).debug::
+ @$(RM) -f $(OSTYPE)/Makefile ; \
+ $(CP) $(EOS_HOME)/src/Config/Template/$(WORLDNAME)Template.Dir/src/ARCH/Makefile $(OSTYPE)/Makefile ; \
+ cd $(OSTYPE); \
+ $(MAKE) $(OBJECTNAME).debug WORLDNAME=$(WORLDNAME) CLASSNAME=$(CLASSNAME) OBJECTNAME=$(OBJECTNAME)
+
+$(OSTYPE)/$(OBJECTNAME).cudagdb::
+ @$(RM) -f $(OSTYPE)/Makefile ; \
+ $(CP) $(EOS_HOME)/src/Config/Template/$(WORLDNAME)Template.Dir/src/ARCH/Makefile $(OSTYPE)/Makefile ; \
+ cd $(OSTYPE); \
+ $(MAKE) $(OBJECTNAME).cudagdb WORLDNAME=$(WORLDNAME) CLASSNAME=$(CLASSNAME) OBJECTNAME=$(OBJECTNAME)
+
+cvsupdate::
+ cvs -d $(EOS_CVSROOT) update -d
+
+cvscommit::
+ cvs -d $(EOS_CVSROOT) commit
+
+edit:
+ @if [ -r $(OBJECTNAME).c ]; \
+ then \
+ sccsEdit $(OBJECTNAME).c; \
+ else \
+ echo "Source files are already editable"; \
+ fi
+ @if [ -r wish/$(OBJECTNAME).wish ]; \
+ then \
+ cd wish; sccsEdit $(OBJECTNAME).wish; \
+ else \
+ echo "Source files (wish) are already editable."; \
+ fi
+ @if [ -r ruby/$(OBJECTNAME).rb ]; \
+ then \
+ cd ruby; sccsEdit $(OBJECTNAME).rb; \
+ else \
+ echo "Source files (ruby) are already editable."; \
+ fi
+ @if [ -r perl/$(OBJECTNAME).pl ]; \
+ then \
+ cd perl; sccsEdit $(OBJECTNAME).pl ; \
+ else \
+ echo "Source files (perl) are already editable."; \
+ fi
+ @if [ -r ../Config/OptionControlFile ]; \
+ then \
+ cd ../Config; sccsEdit OptionControlFile; \
+ else \
+ echo "OptionControlFile are already editable."; \
+ fi
+
+unedit:
+ @if [ -w $(OBJECTNAME).c ]; \
+ then \
+ sccsUnedit $(OBJECTNAME).c; \
+ else \
+ echo "Source files are not editable"; \
+ fi
+ @if [ -w wish/$(OBJECTNAME).wish ]; \
+ then \
+ cd wish; sccsUnedit $(OBJECTNAME).wish; \
+ else \
+ echo "Source files (wish) are not editable."; \
+ fi
+ @if [ -w ruby/$(OBJECTNAME).rb]; \
+ then \
+ cd ruby; sccsUnedit $(OBJECTNAME).rb; \
+ else \
+ echo "Source files (ruby) are not editable."; \
+ fi
+ @if [ -w perl/$(OBJECTNAME).pl ]; \
+ then \
+ cd perl; sccsUnedit $(OBJECTNAME).pl ; \
+ else \
+ echo "Source files (ruby) are not editable."; \
+ fi
+ @if [ -w ../Config/OptionControlFile ]; \
+ then \
+ cd ../Config; sccsUnedit OptionControlFile; \
+ else \
+ echo "OptionControlFile are not editable."; \
+ fi
+
+report:
+ @if [ -r $(OBJECTNAME).c ]; \
+ then \
+ sccsReport $(OBJECTNAME).c; \
+ else \
+ echo "Source files are already editable"; \
+ fi
+ @if [ -r wish/$(OBJECTNAME).wish ]; \
+ then \
+ cd wish; sccsReport $(OBJECTNAME).wish; \
+ else \
+ echo "Source files (wish) are already editable."; \
+ fi
+ @if [ -r ruby/$(OBJECTNAME).rb ]; \
+ then \
+ cd ruby; sccsReport $(OBJECTNAME).rb; \
+ else \
+ echo "Source files (ruby) are already editable."; \
+ fi
+ @if [ -r perl/$(OBJECTNAME).pl ] ; \
+ then \
+ cd perl; sccsReport $(OBJECTNAME).pl ; \
+ else \
+ echo "Source files (perl) are already editable."; \
+ fi
+ @if [ -r ../Config/OptionControlFile ]; \
+ then \
+ cd ../Config; sccsReport OptionControlFile; \
+ else \
+ echo "OptionControlFile are already editable."; \
+ fi
+
+clean :
+ rm -f *.debugo $(OSTYPE)/*.debugo *.cudagdbo $(OSTYPE)/*.cudagdbo *.o $(OSTYPE)/*.o *.linkinfo $(OSTYPE)/*.linkinfo \
+ $(OSTYPE)/$(OBJECTNAME) $(OSTYPE)/*.$(OSTYPE) \
+ $(OSTYPE)/$(OBJECTNAME).debug $(OSTYPE)/*.$(OSTYPE).debug \
+ $(OSTYPE)/$(OBJECTNAME).cudagdb $(OSTYPE)/*.$(OSTYPE).cudagdb \
+ $(OSTYPE)/$(OBJECTNAME).linkinfo $(OSTYPE)/*.$(OSTYPE).linkinfo \
+ *.bak *.$(OSTYPE) core
+
+install: install-bin install-doc install-wish install-ruby install-shell install-perl
+ @if [ dummy$(KHOROS_KENGOBJ) != dummy ] ; \
+ then \
+ if [ -x $(KHOROS_KGENOBJ) ] ; \
+ then \
+ make install-khoros ; \
+ fi; \
+ fi
+
+install-bin:$(DSTDIR)/$(OSTYPE)/$(OBJECTNAME)
+
+$(DSTDIR)/$(OSTYPE)/$(OBJECTNAME):$(OSTYPE)/$(OBJECTNAME) $(DSTDIR)/$(OBJECTNAME)
+ @echo ---- Installing to bin
+ @echo $(DSTDIR)/$(OSTYPE)/$(OBJECTNAME)
+ @if [ ! -d $(DSTDIR)/$(OSTYPE) ]; \
+ then \
+ mkdir $(DSTDIR)/$(OSTYPE); \
+ fi
+ @if [ -x $(OSTYPE)/$(OBJECTNAME) ]; \
+ then \
+ echo "Compilation is complete"; \
+ $(RM) -f $(DSTDIR)/$(OSTYPE)/$(OBJECTNAME); \
+ $(CD) $(OSTYPE); $(INSTALL) -m 555 $(OBJECTNAME) $(DSTDIR)/$(OSTYPE); \
+ $(CHMOD) 555 $(DSTDIR)/$(OSTYPE)/$(OBJECTNAME); \
+ else \
+ echo "Compilation is incomplete. $(OBJECTNAME)"; \
+ fi
+ @echo ---- end of bin
+
+install-wish:
+ @if [ -d wish ]; \
+ then \
+ echo "---- Tcl/Tk file Install"; \
+ if [ ! -d $(DSTDIR)/wish/$(OBJECTNAME) ]; \
+ then \
+ mkdir $(DSTDIR)/wish/$(OBJECTNAME) ; \
+ fi ; \
+ $(CP) -f wish/* $(DSTDIR)/wish/$(OBJECTNAME); \
+ $(CHMOD) 555 $(DSTDIR)/wish/$(OBJECTNAME)/* ;\
+ touch $(DSTDIR)/wish/$(OBJECTNAME)/tclIndex;\
+ $(CHMOD) 666 $(DSTDIR)/wish/$(OBJECTNAME)/tclIndex;\
+ echo "---- Tcl/Tk file Installed";\
+ fi
+
+install-ruby:
+ @if [ -d ruby ]; \
+ then \
+ echo "---- Ruby/Tk file Install"; \
+ if [ ! -d $(DSTDIR)/ruby/$(OBJECTNAME) ]; \
+ then \
+ mkdir $(DSTDIR)/ruby/$(OBJECTNAME) ; \
+ fi ; \
+ $(CP) -f ruby/* $(DSTDIR)/ruby/$(OBJECTNAME); \
+ $(CHMOD) 555 $(DSTDIR)/ruby/$(OBJECTNAME)/* ; \
+ echo "---- Ruby/Tk file Installed"; \
+ fi
+
+install-perl:
+ @if [ -d perl ]; \
+ then \
+ echo "---- Perl/Tk file Install"; \
+ if [ ! -d $(DSTDIR)/perl/$(OBJECTNAME) ]; \
+ then \
+ mkdir $(DSTDIR)/perl/$(OBJECTNAME) ; \
+ fi; \
+ $(CP) -f perl/* $(DSTDIR)/perl/$(OBJECTNAME); \
+ $(CHMOD) 555 $(DSTDIR)/perl/$(OBJECTNAME)/* ; \
+ echo "---- Perl/Tk file Installed"; \
+ fi
+
+install-shell:
+ @if [ ! -d $(DSTDIR)/shell/$(OBJECTNAME) ]; \
+ then \
+ mkdir $(DSTDIR)/shell/$(OBJECTNAME) ; \
+ fi
+ @if [ -d shell ]; \
+ then \
+ echo "---- Shell file Install"; \
+ if [ ! -d $(DSTDIR)/shell/$(OBJECTNAME) ]; \
+ then \
+ mkdir $(DSTDIR)/shell/$(OBJECTNAME) ; \
+ fi ; \
+ $(CP) -f shell/* $(DSTDIR)/shell/$(OBJECTNAME); \
+ $(CHMOD) 555 $(DSTDIR)/shell/$(OBJECTNAME)/*; \
+ echo "---- Shell file Installed"; \
+ fi
+
+install-khoros:
+ @echo Installing to khoros
+ @if [ ! -d ../../../../../objects/script/$(OBJECTNAME) -a -f $(KHOROS_KGENOBJ) ]; \
+ then \
+ echo kgenobj;\
+ $(KHOROS_KGENOBJ) -tb Eos -oname $(OBJECTNAME) -type script -pane -cantata true -cat Eos -subcat $(CLASSNAME) -description $(OBJECTNAME) -bname $(OBJECTNAME) -form -lang ksh ; \
+ fi
+ @if [ ! -d ../../../../../objects/script/$(OBJECTNAME) -a -f $(KHOROS_KSET) ]; \
+ then \
+ $(KHOROS_KSET) -tb Eos -oname $(OBJECTNAME) -icon $(OBJECTNAME) ; \
+ fi
+ @if [ -d ../../../../../objects/script/$(OBJECTNAME) -a -f $(KHOROS_KSET) ]; \
+ then \
+ $(CHMOD) -R 775 ../../../../../objects/script/$(OBJECTNAME) ; \
+ if [ $? ] ; \
+ then \
+ echo "-- setting khoros ---" ; \
+ if [ -d ../../../../../objects/script/$(OBJECTNAME)/uis/ ] ; \
+ then \
+ $(CD) ../../../../../objects/script/$(OBJECTNAME)/uis/ ; \
+ $(RM) -f $(OBJECTNAME).pane ; \
+ $(LN) -s ../../../../src/Tools/$(CLASSNAME)/$(OBJECTNAME)/src/$(OBJECTNAME).pane $(OBJECTNAME).pane; \
+ $(CD) ../../ ; \
+ $(CHMOD) -R 555 $(OBJECTNAME); \
+ else \
+ echo "../../../../../objects/script/$(OBJECTNAME)/uis/ does not exist."; \
+ fi ; \
+ else \
+ echo "Failed !!: Cannot chage mode in installing $(OBJECTNAME) to khoros system"; \
+ fi ; \
+ echo "-- end of khoros-installing"; \
+ fi
+
+install-doc: html
+ @if [ ! -d $(DSTDOC)/SmallTools ]; \
+ then \
+ mkdir $(DSTDOC)/SmallTools ;\
+ fi
+ @if [ -f $(DSTDOC)/SmallTools/$(OBJECTNAME).html ]; \
+ then \
+ $(RM) -f $(DSTDOC)/SmallTools/$(OBJECTNAME).html ;\
+ fi
+ @$(CP) $(OBJECTNAME).html $(DSTDOC)/SmallTools/$(OBJECTNAME).html
+ @$(CHMOD) 444 $(DSTDOC)/SmallTools/$(OBJECTNAME).html
+ @if [ -f ../doc/*.html ]; \
+ then \
+ $(CP) ../doc/*.html $(DSTDOC)/SmallTools/ ;\
+ fi
+ @$(CHMOD) 444 $(DSTDOC)/SmallTools/$(OBJECTNAME).html
+ @if [ -f $(DSTDOC)/SmallTools/Makefile ]; \
+ then \
+ cd $(DSTDOC)/SmallTools; $(MAKE); \
+ fi
+
+html: $(OBJECTNAME).html
+
+configFileRead:
+ @ctrl2configFileRead $(CLASSNAME) $(OBJECTNAME) ../Config/OptionControlFile
+
+$(OBJECTNAME).html: $(OSTYPE)/$(OBJECTNAME)
+ @echo creating html
+ @$(OSTYPE)/$(OBJECTNAME) -html 2> $(OBJECTNAME).html.tmp
+ @sed -e s/$(OSTYPE)\\/// $(OBJECTNAME).html.tmp > $(OBJECTNAME).html
+ @$(RM) $(OBJECTNAME).html.tmp
+
+$(DSTDIR)/$(OBJECTNAME): $(OSTYPE)/$(OBJECTNAME)
+ @ln -s -f ../sbin/MachineIndependent $@
+
+depend::
+ @echo dependency checking now
+ @if [ ! -L $(OSTYPE) ] ; then \
+ moveHostdependent; \
+ fi
+ rm -f $(OSTYPE)/.Depend
+ #echo C
+ @if [ -f $(OBJECTNAME).c ] ; \
+ then \
+ echo "dependency: *.c"; \
+ echo $(DEPENDCOMMAND) $(INCLUDEDIR) $(EXTRA_INC) $(EXTRA_DEFINE) *.c ; \
+ $(DEPENDCOMMAND) $(INCLUDEDIR) $(EXTRA_INC) $(EXTRA_DEFINE) *.c >> $(OSTYPE)/.Depend ; \
+ fi
+ #echo CC
+ @if [ -f $(OBJECTNAME).cc ] ; \
+ then \
+ echo "dependency: *.cc"; \
+ echo $(DEPENDCOMMAND) $(INCLUDEDIR) $(EXTRA_INC) $(EXTRA_DEFINE) $(EXTRA_CCOPTS) *.cc ; \
+ $(DEPENDCOMMAND) $(INCLUDEDIR) $(EXTRA_INC) $(EXTRA_DEFINE) $(EXTRA_CCOPTS) *.cc >> $(OSTYPE)/.Depend ; \
+ fi
+ @if [ -f $(OBJECTNAME).ccm ] ; \
+ then \
+ echo "dependency: *.ccm"; \
+ echo $(DEPENDCOMMAND) $(INCLUDEDIR) $(EXTRA_INC) $(EXTRA_DEFINE) $(EXTRA_CCOPTS) *.ccm ; \
+ $(DEPENDCOMMAND) $(INCLUDEDIR) $(EXTRA_INC) $(EXTRA_DEFINE) $(EXTRA_CCOPTS) *.ccm >> $(OSTYPE)/.Depend ; \
+ fi
+ @if [ -f $(OBJECTNAME).cu ] ; \
+ then \
+ echo "dependency: *.cu"; \
+ echo $(DEPENDCOMMAND) $(INCLUDEDIR) $(EXTRA_INC) $(EXTRA_DEFINE) $(EXTRA_CCOPTS) *.cu ; \
+ $(DEPENDCOMMAND) $(INCLUDEDIR) $(EXTRA_INC) $(EXTRA_DEFINE) $(EXTRA_CCOPTS) *.cu >> $(OSTYPE)/.Depend ; \
+ fi
+
+update:../Config/OptionControlFile
+ maketool $(CLASSNAME) $(OBJECTNAME) update
+
+updateNoAns:../Config/OptionControlFile
+ maketool $(CLASSNAME) $(OBJECTNAME) update N
+
+changeName::
+
+Test:$(OSTYPE)/$(OBJECTNAME) TestDir
+ @if [ -f test/Makefile ] ; \
+ then \
+ cd test; make ; \
+ else \
+ echo "No test Makefile"; \
+ fi
+
+TestDir::
+ @if [ ! -d test ] ; \
+ then \
+ echo "Creating test dir"; \
+ mkdir test; \
+ fi
+ @if [ ! -f test/Makefile ] ; \
+ then \
+ echo "Creating Makefile"; \
+ cd test; \
+ protoTestMakefileCreate; \
+ fi
+ @if [ ! -d test/data ]; \
+ then \
+ mkdir $(EOSHOME)/data/$(OBJECTNAME); \
+ cd test; \
+ ln -sf ../$(EOSHOME)/data/$(OBJECTNAME) data; \
+ fi
+
+tar::
+ cd $(DSTTAR); tar cvf Tools.$(CLASSNAME).$(OBJECTNAME).tar ../bin/$(OBJECTNAME) \
+ ../bin/*/$(OBJECTNAME).* \
+ ../src/Tools/$(CLASSNAME)/$(OBJECTNAME) \
+ ; gzip Tools.$(CLASSNAME).$(OBJECTNAME).tar
+
+-include $(OSTYPE)/.Depend
+-include ../Config/Target.inc
--- /dev/null
+../../../../../hostdepend/X86LINUX64/src/Tools/mrcImage/mrcImagePyramid/src/X86LINUX64
\ No newline at end of file
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "../inc/config.h"
+#include "genUtil.h"
+#include "eosString.h"
+#include "File.h"
+#include "Memory.h"
+
+
+void
+argCheck(mrcImagePyramidInfo* info, int argc, char* argv[])
+{
+ long i;
+ char s[1024];
+ FILE* fpt;
+
+ if(NULL==(fpt=fopen(".EosLog", "a+"))) {
+
+ } else {
+ for(i=0; i<argc; i++) {
+ fprintf(fpt, "%s ", argv[i]);
+ }
+ fprintf(fpt, "\n");
+ fclose(fpt);
+ }
+ for(i=1; i<argc; i++) {
+ if(OPTION_FLAG==argv[i][OPTION_FLAG_POS]) {
+ SSWITCH(argv[i]+OPTION_POS)
+ SCASE("i") {
+ if(i+3<argc) {
+ info->InU = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagInU++;
+ info->InV = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagInV++;
+ info->InW = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagInW++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("iShrink") {
+ if(i+2<argc) {
+ info->In1ShrinkListList = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagIn1ShrinkList++;
+ info->In2ShrinkListList = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagIn2ShrinkList++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("o") {
+ if(i+3<argc) {
+ info->outU = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagoutU++;
+ info->outV = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagoutV++;
+ info->outW = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagoutW++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("oFlow") {
+ if(i+1<argc) {
+ info->outFlow = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagoutFlow++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("oHistgram") {
+ if(i+1<argc) {
+ info->outHistgram = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagoutHistgram++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("c") {
+ if(i+1<argc) {
+ info->configFile = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagconfigFile++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("m") {
+ if(i+1<argc) {
+ info->mode = stringGetNthIntegerData(argv[i+1], 1, " ,");
+ i++;
+ info->flagmode++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("bg") {
+ if(i+1<argc) {
+ info->BG = stringGetNthRealData(argv[i+1], 1, " ,");
+ i++;
+ info->flagBG++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("b") {
+ if(i+1<argc) {
+ info->BIN = stringGetNthIntegerData(argv[i+1], 1, " ,");
+ i++;
+ info->flagBIN++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("t") {
+ if(i+1<argc) {
+ info->THRESHOLD = stringGetNthIntegerData(argv[i+1], 1, " ,");
+ i++;
+ info->flagTHRESHOLD++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
+ SCASE("h") {
+ usage(argv[0]);
+ exit(EXIT_SUCCESS);
+ break;
+ }
+ SCASE("html") {
+ htmlBeforeUsage(argv[0]);
+ usage(argv[0]);
+ htmlAfterUsage(argv[0]);
+ exit(EXIT_SUCCESS);
+ break;
+ }
+ SDEFAULT {
+ fprintf(stderr, "Not Supported Options: :%s\n", argv[i]);
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ break;
+ }
+ SSWITCHEND;
+ }
+ }
+}
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "../inc/config.h"
+#include "genUtil.h"
+#include "eosString.h"
+#include "File.h"
+#include "Memory.h"
+
+
+void
+init0(mrcImagePyramidInfo* info)
+{
+ info->fptInU = NULL; info->flagInU = 0;
+ info->fptInV = NULL; info->flagInV = 0;
+ info->fptInW = NULL; info->flagInW = 0;
+ info->fptIn1ShrinkList = NULL; info->fptIn1ShrinkListList = NULL; info->flagIn1ShrinkList = 0;
+ info->fptIn2ShrinkList = NULL; info->fptIn2ShrinkListList = NULL; info->flagIn2ShrinkList = 0;
+ info->fptoutU = NULL; info->flagoutU = 0;
+ info->fptoutV = NULL; info->flagoutV = 0;
+ info->fptoutW = NULL; info->flagoutW = 0;
+ info->fptoutFlow = NULL; info->flagoutFlow = 0;
+ info->fptoutHistgram = stdout; info->flagoutHistgram = 0;
+ info->fptconfigFile = NULL; info->flagconfigFile = 0;
+ info->mode = 0; info->flagmode = 0;
+ info->BG = 1; info->flagBG = 0;
+ info->BIN = 100; info->flagBIN = 0;
+ info->THRESHOLD = 0.1; info->flagTHRESHOLD = 0;
+}
+
+void
+init1(mrcImagePyramidInfo* info)
+{
+ char s[1024];
+ int i;
+ if(!info->flagInU) {
+ stringGetFromFile(s, "InU", stdin, stdout, 0);
+ info->InU = stringGetNthWord(s, 1, " ,\t");
+ info->flagInU++;
+ }
+ if(info->flagInU) {
+ info->fptInU = fileOpen(info->InU, "r");
+ }
+
+ if(!info->flagInV) {
+ stringGetFromFile(s, "InV", stdin, stdout, 0);
+ info->InV = stringGetNthWord(s, 1, " ,\t");
+ info->flagInV++;
+ }
+ if(info->flagInV) {
+ info->fptInV = fileOpen(info->InV, "r");
+ }
+
+ if(!info->flagInW) {
+ stringGetFromFile(s, "InW", stdin, stdout, 0);
+ info->InW = stringGetNthWord(s, 1, " ,\t");
+ info->flagInW++;
+ }
+ if(info->flagInW) {
+ info->fptInW = fileOpen(info->InW, "r");
+ }
+
+ if(!info->flagIn1ShrinkList) {
+ stringGetFromFile(s, "In1ShrinkList", stdin, stdout, 0);
+ info->In1ShrinkListList = stringGetNthWord(s, 1, " ,\t");
+ info->flagIn1ShrinkList++;
+ }
+ if(info->flagIn1ShrinkList) {
+ info->fptIn1ShrinkListList = fileOpen(info->In1ShrinkListList, "r");
+ fseek(info->fptIn1ShrinkListList, 0L, SEEK_SET);
+ i=0;
+ while(NULL!=stringGetFromFile(s, "", info->fptIn1ShrinkListList, stdout, 1)) {
+ i++;
+ }
+ info->fptIn1ShrinkList = (FILE**)memoryAllocate(i*sizeof(FILE*), "in init1");
+ info->In1ShrinkList = (char**)memoryAllocate(i*sizeof(char*), "in init1");
+ info->flagIn1ShrinkList = i;
+ fseek(info->fptIn1ShrinkListList, 0L, SEEK_SET);
+ i=0;
+ while(NULL!=stringGetFromFile(s, "", info->fptIn1ShrinkListList, stdout, 1)) {
+ info->In1ShrinkList[i] = stringGetNthWord(s, 1, " ,\t");
+ info->fptIn1ShrinkList[i] = fileOpen(info->In1ShrinkList[i],"r");
+ i++;
+ }
+ }
+
+ if(!info->flagIn2ShrinkList) {
+ stringGetFromFile(s, "In2ShrinkList", stdin, stdout, 0);
+ info->In2ShrinkListList = stringGetNthWord(s, 1, " ,\t");
+ info->flagIn2ShrinkList++;
+ }
+ if(info->flagIn2ShrinkList) {
+ info->fptIn2ShrinkListList = fileOpen(info->In2ShrinkListList, "r");
+ fseek(info->fptIn2ShrinkListList, 0L, SEEK_SET);
+ i=0;
+ while(NULL!=stringGetFromFile(s, "", info->fptIn2ShrinkListList, stdout, 1)) {
+ i++;
+ }
+ info->fptIn2ShrinkList = (FILE**)memoryAllocate(i*sizeof(FILE*), "in init1");
+ info->In2ShrinkList = (char**)memoryAllocate(i*sizeof(char*), "in init1");
+ info->flagIn2ShrinkList = i;
+ fseek(info->fptIn2ShrinkListList, 0L, SEEK_SET);
+ i=0;
+ while(NULL!=stringGetFromFile(s, "", info->fptIn2ShrinkListList, stdout, 1)) {
+ info->In2ShrinkList[i] = stringGetNthWord(s, 1, " ,\t");
+ info->fptIn2ShrinkList[i] = fileOpen(info->In2ShrinkList[i],"r");
+ i++;
+ }
+ }
+
+ if(info->flagoutU) {
+ info->fptoutU = fileOpen(info->outU, "w");
+ }
+
+ if(info->flagoutV) {
+ info->fptoutV = fileOpen(info->outV, "w");
+ }
+
+ if(info->flagoutW) {
+ info->fptoutW = fileOpen(info->outW, "w");
+ }
+
+ if(info->flagoutFlow) {
+ info->fptoutFlow = fileOpen(info->outFlow, "w");
+ }
+
+ if(info->flagoutHistgram) {
+ info->fptoutHistgram = fileOpen(info->outHistgram, "w");
+ }
+
+ if(info->flagconfigFile) {
+ info->fptconfigFile = fileOpen(info->configFile, "r");
+ }
+
+ if(info->flagmode) {
+ }
+
+ if(info->flagBG) {
+ }
+
+ if(info->flagBIN) {
+ }
+
+ if(info->flagTHRESHOLD) {
+ }
+
+}
+#ifdef KHOROS
+#include <stdio.h>
+#include "bootstrap.h"
+#include "dataserv.h"
+#include "datamanip.h"
+extern void func_usage_additions(void);
+extern void func_free_args(kexit_status status, kaddr client_data);
+extern void func_get_args(kform* pane);
+
+void
+func_usage_additions(void)
+{
+}
+void
+func_free_args(kexit_status status, kaddr client_data)
+{
+}
+void
+func_get_args(kform* pane)
+{
+}
+void
+khorosInit(int argc, char* argv[])
+{
+ char* eospath;
+ char panepath[1024];
+ FILE* fpt;
+
+ eospath = getenv("EOS_HOME");
+ sprintf(panepath, "%s/src/Tools/mrcImage/mrcImagePyramid/src/mrcImagePyramid.pane", eospath);
+ khoros_initialize(argc, argv, "EOS");
+ fpt = fopen(panepath, "r"); if(NULL!=fpt) {
+ fclose(fpt);
+ kclui_initialize(panepath, KGEN_NONE, "EOS", "mrcImagePyramid",
+ func_usage_additions,
+ func_get_args,
+ func_free_args);
+ }
+}
+#endif /* KHOROS */
--- /dev/null
+/*
+# mrcImagePyramid : $Revision$
+# $Date$
+# Created by $Author$
+# Usage : mrcImagePyramid
+# Attention
+# $Loccker$
+# $State$
+#
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <gsl/gsl_math.h>
+#include <gsl/gsl_matrix.h>
+#include <gsl/gsl_linalg.h>
+#include <gsl/gsl_blas.h>
+#include <gsl/gsl_errno.h>
+
+#define GLOBAL_DECLARATION
+#include "../inc/config.h"
+
+#undef DEBUG
+#include "genUtil.h"
+#include "mrcImage.h"
+#include "Memory.h"
+//#include "mrcImagePyramid.h"
+
+int main(int argc, char* argv[])
+{
+ mrcImagePyramidInfo info;
+
+ //mrcImage* InVx;
+ //mrcImage* InVy;
+ //mrcImage* InVz;
+
+
+ mrcImage* In1Shrink;
+ mrcImage* In2Shrink;
+
+ mrcImage InU;
+ mrcImage InV;
+ mrcImage InW;
+
+ mrcImage outU;
+ mrcImage outV;
+ mrcImage outW;
+ mrcImage outFlow;
+
+ mrcImage* tmpu;
+ mrcImage* tmpv;
+ mrcImage* tmpw;
+ mrcImage* tmpt;
+
+
+ double u, v, w;
+ double du, dv, dw, u_dash, v_dash, w_dash;
+ int i = (info.flagIn1ShrinkList-1);//5-1=4
+ double x,y,z;
+ double data1, data2, data3, data4, data5, data6;
+ double size1, size2, size3, size, *I, *Y;
+ double pix = 0;
+
+
+ double Ht, It ;
+ double fx, fx1, fx2, fy, fy1, fy2, fz, fz1, fz2, di;
+ fx1 = fy1 = fz1 = di = fx2 = fy2 = fz2 = 0;
+
+
+ int n = 0;
+ double delta;
+ double max, min;
+
+ int i_mat, j_mat, k_mat;
+ int signum;
+ int count;
+
+ gsl_matrix *m; // mを宣言
+ gsl_matrix *b; // bを宣言
+ gsl_matrix *mp_result; // mp_resultを宣言
+ gsl_permutation *p; // pを宣言
+ gsl_matrix *inv; // invを宣言
+ gsl_matrix *mp_result2; // mp_result2を宣言
+ gsl_matrix *final; // finalを宣言
+
+
+ m = gsl_matrix_alloc(27,3); //Ix,Iy,Izを格納する行列
+ b = gsl_matrix_alloc(27,1); //Itを格納する行列
+ mp_result = gsl_matrix_alloc(3,3); // transA * Aの結果を格納
+ mp_result2 = gsl_matrix_alloc(3,27); //(transA * A)^-1 * transA の結果を格納
+ inv = gsl_matrix_alloc(3, 3); //逆行列の格納場所
+ final = gsl_matrix_alloc(3, 1); //最終結果の格納場所
+ p = gsl_permutation_alloc(3);
+
+ //double thres = info.THRESHOLD; // mean + 2*SD
+ //double T, U ;
+ //double data;
+
+
+ init0(&info);
+ argCheck(&info, argc, argv);
+ init1(&info);
+
+ DEBUGPRINT("Program Start\n");
+
+
+ In1Shrink = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagIn1ShrinkList, "in main");
+ In2Shrink = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagIn1ShrinkList, "in main");
+
+ tmpu = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagIn1ShrinkList, "in main");
+ tmpv = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagIn1ShrinkList, "in main");
+ tmpw = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagIn1ShrinkList, "in main");
+ tmpt = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagIn1ShrinkList, "in main");
+
+
+ mrcFileRead(&InU, info.InU, "in main", 0);
+ mrcFileRead(&InV, info.InV, "in main", 0);
+ mrcFileRead(&InW, info.InW, "in main", 0);
+
+ for(i=0; i<info.flagIn1ShrinkList; i++) {
+
+ mrcFileRead(&(In1Shrink[i]), info.In1ShrinkList[i], "in main", 0);
+ mrcFileRead(&(In2Shrink[i]), info.In2ShrinkList[i], "in main", 0);
+
+ tmpu[i].Header = In1Shrink[i].Header;
+ tmpv[i].Header = In1Shrink[i].Header;
+ tmpw[i].Header = In1Shrink[i].Header;
+ tmpt[i].Header = In1Shrink[i].Header;
+
+ mrcInit(&tmpu[i], NULL);
+ mrcInit(&tmpv[i], NULL);
+ mrcInit(&tmpw[i], NULL);
+ mrcInit(&tmpt[i], NULL);
+
+ }
+
+
+ outU.Header = In1Shrink[0].Header;
+ outV.Header = In1Shrink[0].Header;
+ outW.Header = In1Shrink[0].Header;
+ outFlow.Header = In1Shrink[0].Header;
+
+ mrcInit(&outU, NULL);
+ mrcInit(&outV, NULL);
+ mrcInit(&outW, NULL);
+ mrcInit(&outFlow, NULL);
+
+
+
+
+
+ for(z = 0; z < In1Shrink[i].HeaderN.z; z++){
+ for(y = 0; y < In1Shrink[i].HeaderN.y; y++){
+ for(x = 0; x < In1Shrink[i].HeaderN.x; x++){
+
+ if(info.flagInU){
+ mrcPixelDataGet(&InU, x, y, z, &u, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&InV, x, y, z, &v, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&InW, x, y, z, &w, mrcPixelRePart, mrcPixelHowNearest);
+
+ if(fabs(u) < 0.5 && fabs(v) < 0.5 && fabs(w) < 0.5){
+ u = 2 * u; //必ず1以下
+ v = 2 * v;
+ w = 2 * w;
+
+ mrcPixelDataSet(&(tmpu[i-1]), 2*x, 2*y, 2*z, u, mrcPixelRePart); //一つ上の解像度のピラミダル画像の偶数ピクセルに値をセットする
+ mrcPixelDataSet(&(tmpv[i-1]), 2*x, 2*y, 2*z, v, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpw[i-1]), 2*x, 2*y, 2*z, w, mrcPixelRePart);
+
+ }
+ }
+ }
+ }
+ }
+
+
+ for(z = 1; z < In1Shrink[i-1].HeaderN.z-1; z++){
+ for(y = 1; y < In1Shrink[i-1].HeaderN.y-1; y++){
+ for(x = 1; x < In1Shrink[i-1].HeaderN.x-1; x++){
+
+ if((int)x%2 != 0 || (int)y%2 != 0 || (int)z%2 != 0){
+
+ mrcPixelDataGet(&(tmpu[i-1]), x - 1, y , z , &data1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x + 1, y , z , &data2, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x , y - 1, z , &data3, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x , y + 1, z , &data4, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x , y , z - 1, &data5, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x , y , z + 1, &data6, mrcPixelRePart, mrcPixelHowNearest);
+
+ size1 = (data1 + data2 + data3 + data4 + data5 + data6) / 6 ;
+
+
+ mrcPixelDataGet(&(tmpv[i-1]), x - 1, y , z , &data1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x + 1, y , z , &data2, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x , y - 1, z , &data3, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x , y + 1, z , &data4, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x , y , z - 1, &data5, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x , y , z + 1, &data6, mrcPixelRePart, mrcPixelHowNearest);
+
+ size2 = (data1 + data2 + data3 + data4 + data5 + data6) / 6 ;
+
+ mrcPixelDataGet(&(tmpw[i-1]), x - 1, y , z , &data1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x + 1, y , z , &data2, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x , y - 1, z , &data3, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x , y + 1, z , &data4, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x , y , z - 1, &data5, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x , y , z + 1, &data6, mrcPixelRePart, mrcPixelHowNearest);
+
+ size3 = (data1 + data2 + data3 + data4 + data5 + data6) / 6 ;
+
+ mrcPixelDataSet(&(tmpu[i-1]), x, y, z, size1, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpv[i-1]), x, y, z, size2, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpw[i-1]), x, y, z, size3, mrcPixelRePart);
+
+ }
+ }
+ }
+ }
+
+ //i=3
+ for(i = info.flagIn1ShrinkList - 2 ; i > 0; i--){
+
+
+ //deltaIの計算
+ for(z = 0; z < In1Shrink[i].HeaderN.z; z++){
+ for(y = 0; y < In1Shrink[i].HeaderN.y; y++){
+ for(x = 0; x < In1Shrink[i].HeaderN.x; x++){
+ //I(x+u', y+v')-H(x, y)
+ mrcPixelDataGet(&(tmpu[i]), x, y, z, &u_dash, mrcPixelRePart, mrcPixelHowNearest); //各ピクセルに保管されているu', v', w'の値を持ってくる
+ mrcPixelDataGet(&(tmpv[i]), x, y, z, &v_dash, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i]), x, y, z, &w_dash, mrcPixelRePart, mrcPixelHowNearest);
+
+ mrcPixelDataGet(&In1Shrink[i], x, y, z, &Ht, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&In2Shrink[i], x + u_dash, y + v_dash, z + w_dash, &It, mrcPixelRePart, mrcPixelHowNearest);
+ di = (It - Ht);
+
+ mrcPixelDataSet(&(tmpt[i]), x, y, z, di, mrcPixelRePart);
+ }
+ }
+ }
+ //i=3
+ for(z = 1; z < In1Shrink[i].HeaderN.z-1; z++){
+ for(y = 1; y < In1Shrink[i].HeaderN.y-1; y++){
+ for(x = 1; x < In1Shrink[i].HeaderN.x-1; x++){
+
+ mrcPixelDataGet(&(In1Shrink[i]), x, y, z, &data1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(In2Shrink[i]), x, y, z, &data2, mrcPixelRePart, mrcPixelHowNearest);
+
+ if(data1 < info.BG || data2 < info.BG) {
+ mrcPixelDataSet(&tmpu[i], x, y, z, 0, mrcPixelRePart);
+ mrcPixelDataSet(&tmpv[i], x, y, z, 0, mrcPixelRePart);
+ mrcPixelDataSet(&tmpw[i], x, y, z, 0, mrcPixelRePart);
+ } else {
+
+ count = 0;
+
+ for(k_mat = z-1; k_mat < z+2; k_mat++){
+ for(j_mat = y-1; j_mat < y+2; j_mat++){
+ for(i_mat = x-1; i_mat < x+2; i_mat++){
+
+ mrcPixelDataGet(&(In2Shrink[i]), i_mat, j_mat, k_mat, &fx1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(In2Shrink[i]), i_mat, j_mat, k_mat, &fx2, mrcPixelRePart, mrcPixelHowNearest);
+ fx = (fx1 - fx2) / 2;
+
+ mrcPixelDataGet(&(In2Shrink[i]), i_mat, j_mat, k_mat, &fy1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(In2Shrink[i]), i_mat, j_mat, k_mat, &fy2, mrcPixelRePart, mrcPixelHowNearest);
+ fy = (fy1 - fy2) / 2;
+
+ mrcPixelDataGet(&(In2Shrink[i]), i_mat, j_mat, k_mat, &fz1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(In2Shrink[i]), i_mat, j_mat, k_mat, &fz2, mrcPixelRePart, mrcPixelHowNearest);
+ fz = (fz1 - fz2) / 2;
+
+ mrcPixelDataGet(&tmpt[i], i_mat, j_mat, k_mat, &di, mrcPixelRePart, mrcPixelHowNearest);
+
+ gsl_matrix_set(m, count, 0, fx);
+ gsl_matrix_set(m, count, 1, fy);
+ gsl_matrix_set(m, count, 2, fz);
+
+ gsl_matrix_set(b, count, 0, di);
+
+ count++;
+ if(count == 27){
+ break;
+ }
+ }
+ }
+ }
+
+ gsl_blas_dgemm(CblasTrans, CblasNoTrans, 1.0, m, m, 0.0, mp_result); //転置行列[3×27] × 元の行列[27×3]
+ gsl_linalg_LU_decomp(mp_result, p, &signum); //LU分解
+ gsl_linalg_LU_invert(mp_result, p, inv); //逆行列
+ gsl_blas_dgemm(CblasNoTrans, CblasTrans, 1.0, inv, m, 0.0, mp_result2); //逆行列×転置行列
+ gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, mp_result2, b, 0.0, final); //bをかける
+
+ du = gsl_matrix_get(final, 0, 0);//値の取得
+ dv = gsl_matrix_get(final, 1, 0);
+ dw = gsl_matrix_get(final, 2, 0);
+ size = sqrt(du*du + dv*dv + dw*dw);
+
+ u = (u_dash + du);
+ v = (u_dash + dv);
+ w = (u_dash + dw);
+
+ mrcPixelDataSet(&(tmpu[i]), x, y, z, u, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpv[i]), x, y, z, v, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpw[i]), x, y, z, w, mrcPixelRePart);
+ mrcPixelDataSet(&outFlow, x, y, z, size, mrcPixelRePart);
+
+ u = 2 * u;
+ v = 2 * v;
+ z = 2 * w;
+
+ mrcPixelDataSet(&(tmpu[i-1]), 2*x, 2*y, 2*z, u, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpv[i-1]), 2*x, 2*y, 2*z, v, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpw[i-1]), 2*x, 2*y, 2*z, w, mrcPixelRePart);
+
+
+//////////////////////////////////計算した速度を2倍して高い解像度のわたす/////////////////////////////////////////////////////////
+
+ for(z = 1; z < In1Shrink[i-1].HeaderN.z; z++){
+ for(y = 1; y < In1Shrink[i-1].HeaderN.y; y++){
+ for(x = 1; x < In1Shrink[i-1].HeaderN.x; x++){
+
+ if((int)x%2 != 0 || (int)y%2 != 0 || (int)z%2 != 0){
+
+ mrcPixelDataGet(&(tmpu[i-1]), x - 1, y , z , &data1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x + 1, y , z , &data2, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x , y - 1, z , &data3, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x , y + 1, z , &data4, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x , y , z - 1, &data5, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpu[i-1]), x , y , z + 1, &data6, mrcPixelRePart, mrcPixelHowNearest);
+
+ size1 = (data1 + data2 + data3 + data4 + data5 + data6) / 6 ;
+
+ mrcPixelDataGet(&(tmpv[i-1]), x - 1, y , z , &data1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x + 1, y , z , &data2, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x , y - 1, z , &data3, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x , y + 1, z , &data4, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x , y , z - 1, &data5, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[i-1]), x , y , z + 1, &data6, mrcPixelRePart, mrcPixelHowNearest);
+
+ size2 = (data1 + data2 + data3 + data4 + data5 + data6) / 6 ;
+
+ mrcPixelDataGet(&(tmpw[i-1]), x - 1, y , z , &data1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x + 1, y , z , &data2, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x , y - 1, z , &data3, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x , y + 1, z , &data4, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x , y , z - 1, &data5, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[i-1]), x , y , z + 1, &data6, mrcPixelRePart, mrcPixelHowNearest);
+
+ size3 = (data1 + data2 + data3 + data4 + data5 + data6) / 6 ;
+
+ mrcPixelDataSet(&(tmpu[i-1]), x, y, z, size1, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpv[i-1]), x, y, z, size2, mrcPixelRePart);
+ mrcPixelDataSet(&(tmpw[i-1]), x, y, z, size3, mrcPixelRePart);
+
+ }
+ }
+ }
+ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ }
+ }
+ }
+ }
+ }
+
+ gsl_matrix_free(m);
+ gsl_matrix_free(b);
+ gsl_matrix_free(mp_result);
+ gsl_matrix_free(mp_result2);
+ gsl_matrix_free(inv);
+ gsl_matrix_free(final);
+ gsl_permutation_free(p);
+
+ max = -1;
+ min = FLT_MAX;
+ for(z=0; z<In1Shrink[0].HeaderN.z; z++){
+ for(y=0; y<In1Shrink[0].HeaderN.y; y++){
+ for(x=0; x<In1Shrink[0].HeaderN.x; x++){
+
+ mrcPixelDataGet(&(tmpu[0]), x, y, z, &data1, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpv[0]), x, y, z, &data2, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&(tmpw[0]), x, y, z, &data3, mrcPixelRePart, mrcPixelHowNearest);
+
+ size = sqrt(data1 * data1 + data2 * data2 + data3 * data3);
+
+ mrcPixelDataSet(&outU, x, y, z, data1, mrcPixelRePart);
+ mrcPixelDataSet(&outV, x, y, z, data2, mrcPixelRePart);
+ mrcPixelDataSet(&outW, x, y, z, data3, mrcPixelRePart);
+ mrcPixelDataSet(&outFlow, x, y, z, size, mrcPixelRePart);
+
+ if(max<size) max = size;
+ if(size<min) min = size;
+ }
+ }
+ }
+
+ n = info.BIN;
+ delta = ( (max - min) / info.BIN);
+
+ fprintf(stderr, "%f %f %f %d\n", min, max, delta, n);
+ fprintf(stderr, "%f %f \n", In1Shrink[0].HeaderAMin, In1Shrink[0].HeaderAMax);
+
+ I = (double*)calloc(n, sizeof(double));
+ Y = (double*)calloc(n, sizeof(double));
+
+ if(I != NULL && Y != NULL) {
+ double thres = info.THRESHOLD; // mean + 2*SD
+ double T, U ;
+ double data;
+
+ T = ( thres - (In1Shrink[0].HeaderAMin) ) / ( (In1Shrink[0].HeaderAMax) - (In1Shrink[0].HeaderAMin) );
+ U = In1Shrink[0].HeaderAMin / ( (In1Shrink[0].HeaderAMax) - (In1Shrink[0].HeaderAMin) );
+
+ for(z=0; z<In1Shrink[0].HeaderN.z; z++){
+ for(y=0; y<In1Shrink[0].HeaderN.y; y++){
+ for(x=0; x<In1Shrink[0].HeaderN.x; x++){
+ mrcPixelDataGet(&outFlow, x, y, z, &size, mrcPixelRePart, mrcPixelHowNearest);
+ mrcPixelDataGet(&In1Shrink[0], x, y, z, &pix, mrcPixelRePart, mrcPixelHowNearest);
+ i = (int)(( size-min )/delta);
+
+ if(n<=i) i = n-1;
+ data = ( pix - (In1Shrink[0].HeaderAMin)) / ( (In1Shrink[0].HeaderAMax) - (In1Shrink[0].HeaderAMin) );
+ if(T <= data) {
+ I[i] += data;
+ }
+ if(U <= data) {
+ Y[i] += data;
+ }
+ }
+ }
+ }
+ for(i=0; i<n; i++){
+ fprintf(info.fptoutHistgram, "%3d %15.6g %15.6g %15.6g \n", i, min+i*delta, Y[i], I[i]);
+ }
+ }
+
+ free(I);
+ free(Y);
+
+ if(info.flagoutU){
+ mrcFileWrite(&outU, info.outU, "in main", 0);
+ mrcFileWrite(&outV, info.outV, "in main", 0);
+ mrcFileWrite(&outW, info.outW, "in main", 0);
+ }
+
+ if(info.flagoutFlow) {
+ mrcFileWrite(&outFlow, info.outFlow, "in main", 0);
+ }
+
+ return 0;
+
+ exit(EXIT_SUCCESS);
+
+}
+
+void
+additionalUsage()
+{
+ fprintf(stderr, "----- Additional Usage -----\n");
+}
+
+
+
+
+
+
+
--- /dev/null
+<HTML>
+<HEAD>
+<TITLE>mrcImagePyramid</TITLE>
+</HEAD>
+<BODY>
+<H1>mrcImagePyramid</H1>
+<H2>Usage</H2>
+<PRE>
+Usage: mrcImagePyramid
+Options:
+ [-i[nput] InU (NULL ).as(inFile::mrcImage )
+ InV (NULL ).as(inFile::mrcImage )
+ InW (NULL ).as(inFile::mrcImage ) ] :Essential :InputDataFile
+ [-i[nput]Shrink In1ShrinkList (NULL ).as(inFileList::mrcImage)
+ In2ShrinkList (NULL ).as(inFileList::mrcImage) ] :Essential :InputDataFileShrink
+ [-o[utput] outU (NULL ).as(outFile::mrcImage )
+ outV (NULL ).as(outFile::mrcImage )
+ outW (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFile
+ [-o[utput]Flow outFlow (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFilemrcFlow
+ [-o[utput]Histgram outHistgram (stdout ).as(outFile::ASCII ) ] :Optional :OutputDataFileHistgram
+ [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile
+ [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode
+ [-b[ack]g[round] BG (1 ).as(Real ) ] :Optional :BG
+ [-b[in] BIN (100 ).as(Integer ) ] :Optional :bin
+ [-t[hreshold] THRESHOLD (0.1 ).as(Integer ) ] :Optional :threshold
+----- Additional Usage -----
+</PRE>
+</BODY>
+</HTML>
--- /dev/null
+-F 4.3 1 0 52x1+0+0 +0+0 'Cantata' cantata
+ -M 1 1 52x1+0+0 +1+0 ' ' subform
+ -P 1 0 52x1+0+1 +0+0 ' ' mrcImagePyramid
+ -D 1 0 9x1+0+0 'Options' _gui_options
+ -H 1 6x1+0+0 'License' 'license' $BOOTSTRAP/repos/license/License license
+ -E
+ -R 1 0 1 5x1+35+0 'Run' 'execute operation' $EOS/bin/mrcImagePyramid
+ -H 1 5x1+41+0 'Help' 'help page' $EOS/src/Tools/mrcImage/mrcImagePyramid/doc/mrcImagePyramid.doc help
+ -Q 1 0 5.25x1+47+0 'Close'
+ -I 1 0 1 1 0 1 -1x1+1+1 ' ' 'NULL' 'InU' InputDataFile
+ -I 1 0 1 1 0 1 -1x1+1+3 ' ' 'NULL' 'In1ShrinkList' InputDataFileShrink
+ -I 1 0 0 1 0 1 -1x1+1+4 ' ' 'NULL' 'outU' OutputDataFile
+ -O 1 0 1 0 0 1 -1x1+1+6.000000 ' ' 'outFlow' 'OutputDataFilemrcFlow' oFlow
+ -O 1 0 1 0 0 1 -1x1+1+7.500000 ' ' 'outHistgram' 'OutputDataFileHistgram' oHistgram
+ -I 1 0 1 0 0 1 -1x1+1+9.000000 ' ' 'configFile' 'ConfigurationFile' c
+ -i 1 0 1 0 0 -1x1+1+10.500000 0 0 0 0 0 'mode' 'Mode' m
+ -f 1 0 1 0 0 -1x1+1+12.000000 0 0 1.000000 0 0 0 'BG' 'BG' bg
+ -i 1 0 1 0 0 -1x1+1+13.500000 0 0 100 0 0 'BIN' 'bin' b
+ -i 1 0 1 0 0 -1x1+1+15.000000 0 0 0 0 0 'THRESHOLD' 'threshold' t
+ -E
+ -E
+-E
--- /dev/null
+Movie_0001.shrink1
+Movie_0001.shrink2
+Movie_0001.shrink4
+Movie_0001.shrink8
+Movie_0001.shrink16
--- /dev/null
+Movie_0002.shrink1
+Movie_0002.shrink2
+Movie_0002.shrink4
+Movie_0002.shrink8
+Movie_0002.shrink16
--- /dev/null
+Movie_0005.shrink1
+Movie_0005.shrink2
+Movie_0005.shrink4
+Movie_0005.shrink8
+Movie_0005.shrink16
--- /dev/null
+Movie_0006.shrink1
+Movie_0006.shrink2
+Movie_0006.shrink4
+Movie_0006.shrink8
+Movie_0006.shrink16
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include "../inc/config.h"
+
+void
+usage(char* thisProgram)
+{
+ fprintf(stderr, "Usage: %s\n", thisProgram);
+ fprintf(stderr, "Options:\n");
+ fprintf(stderr, " [-i[nput] InU (NULL ).as(inFile::mrcImage ) \n InV (NULL ).as(inFile::mrcImage ) \n InW (NULL ).as(inFile::mrcImage ) ] :Essential :InputDataFile\n");
+ fprintf(stderr, " [-i[nput]Shrink In1ShrinkList (NULL ).as(inFileList::mrcImage) \n In2ShrinkList (NULL ).as(inFileList::mrcImage) ] :Essential :InputDataFileShrink\n");
+ fprintf(stderr, " [-o[utput] outU (NULL ).as(outFile::mrcImage ) \n outV (NULL ).as(outFile::mrcImage ) \n outW (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFile\n");
+ fprintf(stderr, " [-o[utput]Flow outFlow (NULL ).as(outFile::mrcImage ) ] :Optional :OutputDataFilemrcFlow\n");
+ fprintf(stderr, " [-o[utput]Histgram outHistgram (stdout ).as(outFile::ASCII ) ] :Optional :OutputDataFileHistgram\n");
+ fprintf(stderr, " [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile\n");
+ fprintf(stderr, " [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode\n");
+ fprintf(stderr, " [-b[ack]g[round] BG (1 ).as(Real ) ] :Optional :BG\n");
+ fprintf(stderr, " [-b[in] BIN (100 ).as(Integer ) ] :Optional :bin\n");
+ fprintf(stderr, " [-t[hreshold] THRESHOLD (0.1 ).as(Integer ) ] :Optional :threshold\n");
+ additionalUsage();
+}
+
+void
+htmlBeforeUsage(char* thisProgram)
+{
+ fprintf(stderr, "<HTML>\n");
+ fprintf(stderr, "<HEAD>\n");
+ fprintf(stderr, "<TITLE>%s</TITLE>\n", thisProgram);
+ fprintf(stderr, "</HEAD>\n");
+ fprintf(stderr, "<BODY>\n");
+ fprintf(stderr, "<H1>%s</H1>\n", thisProgram);
+ fprintf(stderr, "<H2>Usage</H2>\n");
+ fprintf(stderr, "<PRE>\n");
+}
+
+void
+htmlAfterUsage(char* thisProgram)
+{
+ fprintf(stderr, "</PRE>\n");
+ fprintf(stderr, "</BODY>\n");
+ fprintf(stderr, "</HTML>\n");
+}
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include "../inc/config.h"
+