This repository is a base of Eos.
Revision | dfda9da383ef57ca6eafc0cfc24c344644349689 (tree) |
---|---|
Time | 2022-04-18 19:44:28 |
Author | Takuo Yasunaga <yasuanga@phys...> |
Commiter | Takuo Yasunaga |
modified: hostdepend/ARM64MAC64
modified: src/Objects/DataManip/Makefile
renamed: src/Objects/DataManip/starFile/Config/Define.inc -> src/Objects/DataManip/eosStarFile/Config/Define.inc
renamed: src/Objects/DataManip/starFile/Config/Target.inc -> src/Objects/DataManip/eosStarFile/Config/Target.inc
renamed: src/Objects/DataManip/starFile/Makefile -> src/Objects/DataManip/eosStarFile/Makefile
renamed: src/Objects/DataManip/starFile/doc/.footer -> src/Objects/DataManip/eosStarFile/doc/.eosStarFile.html
renamed: src/Objects/DataManip/starFile/doc/.header -> src/Objects/DataManip/eosStarFile/doc/.footer
renamed: src/Objects/DataManip/starFile/doc/.starFile.html -> src/Objects/DataManip/eosStarFile/doc/.header
renamed: src/Objects/DataManip/starFile/doc/Makefile -> src/Objects/DataManip/eosStarFile/doc/Makefile
renamed: src/Objects/DataManip/starFile/inc/Makefile -> src/Objects/DataManip/eosStarFile/inc/Makefile
new file: src/Objects/DataManip/eosStarFile/inc/eosStarFile.h
new file: src/Objects/DataManip/eosStarFile/inc/eosStarFile.h.org
renamed: src/Objects/DataManip/starFile/src/.CCHeader -> src/Objects/DataManip/eosStarFile/src/.CCHeader
renamed: src/Objects/DataManip/starFile/src/.CHeader -> src/Objects/DataManip/eosStarFile/src/.CHeader
renamed: src/Objects/DataManip/starFile/src/.Ruby -> src/Objects/DataManip/eosStarFile/src/.Ruby
renamed: src/Objects/DataManip/starFile/src/.Wish -> src/Objects/DataManip/eosStarFile/src/.Wish
new file: src/Objects/DataManip/eosStarFile/src/ARM64MAC64
renamed: src/Objects/DataManip/starFile/src/Makefile -> src/Objects/DataManip/eosStarFile/src/Makefile
new file: src/Objects/DataManip/eosStarFile/src/eosStarFileDataGet.c
new file: src/Objects/DataManip/eosStarFile/src/eosStarFileLoopDataGet.c
new file: src/Objects/DataManip/eosStarFile/src/eosStarFileRead.c
new file: src/Objects/DataManip/eosStarFile/src/eosStarFileWrite.c
deleted: src/Objects/DataManip/starFile/.Source
deleted: src/Objects/DataManip/starFile/.Source.org
deleted: src/Objects/DataManip/starFile/src/ARM64MAC64
deleted: src/Objects/DataManip/starFile/src/X86MAC64
modified: src/Objects/Makefile
modified: src/Objects/Makefile.org
modified: src/Tools/mrcImage/mrcImageLucasKanade/src/mrcImageLucasKanade.c
modified: util/src/DataFormat/Makefile
new file: util/src/DataFormat/cif_api
modified: hostdepend/ARM64MAC64 (modified content)
modified: include/eosMATH.h
@@ -1 +1 @@ | ||
1 | -Subproject commit c3065522e7b0c8f309ff01f63e8a2ddfcf9b9116 | |
1 | +Subproject commit 7e91a5ade1e8d1cbb055de20cc8aea309784296f |
@@ -1,3 +1,3 @@ | ||
1 | -OBJECTNAME = starFile | |
1 | +OBJECTNAME = eosStarFile | |
2 | 2 | EXTRA_INC = |
3 | 3 | EXTRA_CCOPTS = |
@@ -0,0 +1,98 @@ | ||
1 | +/* | |
2 | +# eosStarFile.h : $Revision$ | |
3 | +# $Date$ | |
4 | +# Created by $Author$ | |
5 | +# Usage : eosStarFile.h | |
6 | +# Attention | |
7 | +# $Loccker$ | |
8 | +# $State$ | |
9 | +# | |
10 | +*/ | |
11 | +/* $Log$ */ | |
12 | +#ifndef EOS_STAR_FILE | |
13 | +#define EOS_STAR_FILE | |
14 | + | |
15 | +#include <stdio.h> | |
16 | + | |
17 | +/* constant begin */ | |
18 | + | |
19 | + | |
20 | +/* constant end */ | |
21 | + | |
22 | +/* struct begin */ | |
23 | +typedef struct eosStarFileData { | |
24 | + char* key; | |
25 | + char** valueS; | |
26 | + double* valueR; | |
27 | + int* valueI; | |
28 | +} eosStarFileData; | |
29 | + | |
30 | +typedef struct eosStgrFileDataBlock { | |
31 | + char* dataBlockName; | |
32 | + | |
33 | + int numDataItem; | |
34 | + eosStarFileData* data; | |
35 | + | |
36 | + int numLoopKey; | |
37 | + int numLoopData; | |
38 | + eosStarFileData* loop; | |
39 | +} eosStgrFileDataBlock; | |
40 | + | |
41 | +typedef struct eosStarFile { | |
42 | + int numDataBlock; | |
43 | + eosStgrFileDataBlock* block; | |
44 | +} eosStarFile; | |
45 | + | |
46 | +/* struct end */ | |
47 | + | |
48 | +#ifdef __cplusplus | |
49 | +extern "C" { | |
50 | +#endif | |
51 | + | |
52 | +/* prototype begin */ | |
53 | +void eosStarFileWrite(FILE* fpt, eosStarFile* star, int mode); | |
54 | + | |
55 | +void eosStarFileDataSizeSet(eosStarFile* star, int mode); | |
56 | + | |
57 | +void eosStarFileDataKeySet(eosStarFile* star, char* key, int index, int mode); | |
58 | +void eosStarFileDataValueSSet(eosStarFile* star, char* key, char* value, int mode); | |
59 | +void eosStarFileDataValueRSet(eosStarFile* star, char* key, double value, int mode); | |
60 | +void eosStarFileDataValueISet(eosStarFile* star, char* key, int value, int mode); | |
61 | + | |
62 | +void eosStarFileLoopDataKeySet(eosStarFile* star, int index, int mode); | |
63 | +void eosStarFileLoopDataValueSSet(eosStarFile* star, char* key, char** value, int mode); | |
64 | +void eosStarFileLoopDataValueRSet(eosStarFile* star, char* key, double* value, int mode); | |
65 | +void eosStarFileLoopDataValueISet(eosStarFile* star, char* key, int* value, int mode); | |
66 | + | |
67 | +// esoStarFileRead.c | |
68 | +void eosStarFileRead (FILE* fpt, eosStarFile* star, int mode); | |
69 | +void eosStarFileDataSizeGet(FILE* fpt, eosStarFile* star, int mode); | |
70 | +void eosStarFileRead0 (FILE* fpt, eosStarFile* star, int mode); | |
71 | + | |
72 | +// data | |
73 | +char* eosStarFileDataGetStringP(eosStarFile* star, char* key, int mode); | |
74 | +void eosStarFileDataGetString(eosStarFile* star, char* key, char** value, int mode); | |
75 | + | |
76 | +double eosStarFileDataGetRealP(eosStarFile* star, char* key, int mode); | |
77 | +void eosStarFileDataGetReal(eosStarFile* star, char* key, double* value, int mode); | |
78 | + | |
79 | +int eosStarFileDataGetInterger(eosStarFile* star, char* key, int mode); | |
80 | +void eosStarFilDataGetInterger(eosStarFile* star, char* key, int* value, int mode); | |
81 | + | |
82 | +// Loop | |
83 | +char** eosStarFileLoopDataGetStringP(eosStarFile* star, char* key, int mode); | |
84 | +void eosStarFileLoopDataGetString(eosStarFile* star, char* key, char*** value, int mode); | |
85 | + | |
86 | +double* eosStarFileLoopDataGetRealP(eosStarFile* star, char* key, int mode); | |
87 | +void eosStarFileLoopDataGetReal(eosStarFile* star, char* key, double** value, int mode); | |
88 | + | |
89 | +int* eosStarFileLoopDataGetIntergerP(eosStarFile* star, char* key, int mode); | |
90 | +void eosStarFileLoopDataGetInterger(eosStarFile* star, char* key, int** value, int mode); | |
91 | + | |
92 | +/* prototype end */ | |
93 | + | |
94 | +#ifdef __cplusplus | |
95 | +}; | |
96 | +#endif | |
97 | + | |
98 | +#endif /* EOS_STAR_FILE */ |
@@ -0,0 +1 @@ | ||
1 | +../../../../../hostdepend/ARM64MAC64/src/Objects/DataManip/eosStarFile/src/ARM64MAC64 | |
\ No newline at end of file |
@@ -0,0 +1,14 @@ | ||
1 | +/* | |
2 | +# %M% %Y% %I% | |
3 | +# The latest update : %G% at %U% | |
4 | +# | |
5 | +#%Z% eosStarFileDataGet ver %I% | |
6 | +#%Z% Created by | |
7 | +#%Z% | |
8 | +#%Z% Usage : eosStarFileDataGet | |
9 | +#%Z% Attention | |
10 | +#%Z% | |
11 | +*/ | |
12 | +static char __sccs_id[] = "%Z%eosStarFileDataGet ver%I%; Date:%D% %Z%"; | |
13 | + | |
14 | + |
@@ -0,0 +1,14 @@ | ||
1 | +/* | |
2 | +# %M% %Y% %I% | |
3 | +# The latest update : %G% at %U% | |
4 | +# | |
5 | +#%Z% eosStarFileLoopDataGet ver %I% | |
6 | +#%Z% Created by | |
7 | +#%Z% | |
8 | +#%Z% Usage : eosStarFileLoopDataGet | |
9 | +#%Z% Attention | |
10 | +#%Z% | |
11 | +*/ | |
12 | +static char __sccs_id[] = "%Z%eosStarFileLoopDataGet ver%I%; Date:%D% %Z%"; | |
13 | + | |
14 | + |
@@ -0,0 +1,101 @@ | ||
1 | +/* | |
2 | +# %M% %Y% %I% | |
3 | +# The latest update : %G% at %U% | |
4 | +# | |
5 | +#%Z% eosStarFileRead ver %I% | |
6 | +#%Z% Created by | |
7 | +#%Z% | |
8 | +#%Z% Usage : eosStarFileRead | |
9 | +#%Z% Attention | |
10 | +#%Z% | |
11 | +*/ | |
12 | +static char __sccs_id[] = "%Z%eosStarFileRead ver%I%; Date:%D% %Z%"; | |
13 | + | |
14 | +#include <stdio.h> | |
15 | +#include "eosString.h" | |
16 | +#include "Memory.h" | |
17 | +#include "../inc/eosStarFile.h" | |
18 | + | |
19 | +void | |
20 | +eosStarFileRead (FILE* fpt, eosStarFile* star, int mode) | |
21 | +{ | |
22 | + eosStarFileDataSizeGet(fpt, star, mode); | |
23 | + eosStarFileRead0(fpt, star, mode); | |
24 | +} | |
25 | + | |
26 | +void | |
27 | +eosStarFileDataSizeGet(FILE* fpt, eosStarFile* star, int mode) | |
28 | +{ | |
29 | + int flagData=0; | |
30 | + int flagLoop=0; | |
31 | + int dataBlockIndex = 0; | |
32 | + int dataKeyIndex = 0; | |
33 | + int loopDataKeyIndex = 0; | |
34 | + int i, j; | |
35 | + char* stmp[STRING_MAX_LENGTH]; | |
36 | + | |
37 | + // DataBlockCount | |
38 | + star->numDataBlock = 0; | |
39 | + for(NULL!=(stmp = stringGetFromFile(stmp, "in", fpt, stderr, 0))) { | |
40 | + if(stmp[0] != '#' && stmp[0] != ';' && stmp[0] != '\n') { // Not Comment | |
41 | + if(0==strncmp(stmp, "data_", 5)) { // in loop | |
42 | + flagData = 1; | |
43 | + flagLoop = 0; | |
44 | + star->numDataBlock++; | |
45 | + } | |
46 | + if(0==strncmp(setmp, "loop_", 6)) { // in loop | |
47 | + flagData = 0; | |
48 | + flagLoop = 1; | |
49 | + } | |
50 | + } | |
51 | + } | |
52 | + star->block = (eosStgrFileDataBlock*)memoryAllocate(sizeof(eosStgrFileDataBlock)* star->numDataBlock, "in eosStarFileDataSizeGet"); | |
53 | + | |
54 | + for(NULL!=(stmp = stringGetFromFile(stmp, "in", fpt, stderr, 0))) { | |
55 | + if(stmp[0] != '#' && stmp[0] != ';' && stmp[0] != '\n') { // Not Comment | |
56 | + if(flagLoop==1) { | |
57 | + if(stmp[0] == '_') { // LoopKey | |
58 | + star->block[dataBlockIndex-1].numLoopKey++; | |
59 | + } else { // LoopData | |
60 | + star->block[dataBlockIndex-1].numLoopData++; | |
61 | + } | |
62 | + } | |
63 | + if(flagLoop==1) { | |
64 | + if(stmp[0] == '_') { // dataItem | |
65 | + star->block[dataBlockIndex-1].numDataItem++; | |
66 | + } | |
67 | + } | |
68 | + | |
69 | + // Mode Check | |
70 | + if(0==strncmp(stmp, "data_", 5)) { // in loop | |
71 | + flagData = 1; | |
72 | + flagLoop = 0; | |
73 | + dataBlockIndex++; | |
74 | + } | |
75 | + if(0==strncmp(stmp, "loop_", 6)) { // in loop | |
76 | + flagData = 0; | |
77 | + flagLoop = 1; | |
78 | + } | |
79 | + } | |
80 | + } | |
81 | + for(i=0; i<star->numDataBlock; i++) { | |
82 | + star->block[i].data = (eosStarFileData*)memoryAllocate(sizeof(eosStarFileData)* star->block[i].numDataItem, "in eosStarFileDataSizeGet"); | |
83 | + for(j=0; j<star->block[i].numDataItem; j++) { | |
84 | + star->block[i].data[j].valueS = (char**) malloc(sizeof(char*)); | |
85 | + star->block[i].data[j].valueI = (int*) malloc(sizeof(int)); | |
86 | + star->block[i].data[j].valueR = (double*) malloc(sizeof(double)); | |
87 | + } | |
88 | + star->block[i].loop = (eosStarFileData*)memoryAllocate(sizeof(eosStarFileData)* star->block[i].numLoopKey, "in eosStarFileDataSizeGet"); | |
89 | + for(j=0; j<star->block[i].numLoopKey; j++) { | |
90 | + star->block[i].data[j].valueS = (char**) malloc(sizeof(char*) *star->block[i].numLoopData); | |
91 | + star->block[i].data[j].valueI = (int*) malloc(sizeof(int) *star->block[i].numLoopData); | |
92 | + star->block[i].data[j].valueR = (double*) malloc(sizeof(double)*star->block[i].numLoopData); | |
93 | + } | |
94 | + } | |
95 | +} | |
96 | + | |
97 | + | |
98 | +void | |
99 | +eosStarFileRead0 (FILE* fpt, eosStarFile* star, int mode) | |
100 | +{ | |
101 | +} |
@@ -0,0 +1,14 @@ | ||
1 | +/* | |
2 | +# %M% %Y% %I% | |
3 | +# The latest update : %G% at %U% | |
4 | +# | |
5 | +#%Z% eosStarFileWrite ver %I% | |
6 | +#%Z% Created by | |
7 | +#%Z% | |
8 | +#%Z% Usage : eosStarFileWrite | |
9 | +#%Z% Attention | |
10 | +#%Z% | |
11 | +*/ | |
12 | +static char __sccs_id[] = "%Z%eosStarFileWrite ver%I%; Date:%D% %Z%"; | |
13 | + | |
14 | + |
@@ -1,5 +0,0 @@ | ||
1 | -SOURCE=\ | |
2 | -doc \ | |
3 | -inc \ | |
4 | -src \ | |
5 | -#LastSource |
@@ -1,5 +0,0 @@ | ||
1 | -SOURCE=\ | |
2 | -doc \ | |
3 | -inc \ | |
4 | -src \ | |
5 | -#LastSource |
@@ -1 +0,0 @@ | ||
1 | -../../../../../hostdepend/ARM64MAC64/src/Objects/DataManip/starFile/src/ARM64MAC64 | |
\ No newline at end of file |
@@ -1 +0,0 @@ | ||
1 | -../../../../../hostdepend/X86MAC64/src/Objects/DataManip/starFile/src/X86MAC64 | |
\ No newline at end of file |
@@ -18,6 +18,7 @@ | ||
18 | 18 | #define DEBUG |
19 | 19 | #include "genUtil.h" |
20 | 20 | #include "mrcImage.h" |
21 | +#include "Memory.h" | |
21 | 22 | |
22 | 23 | /* |
23 | 24 | Example: |
@@ -41,9 +42,9 @@ main(int argc, char* argv[]) | ||
41 | 42 | int i=5; |
42 | 43 | //i=info.NOS; |
43 | 44 | |
44 | - mrcImage InVx[i]; | |
45 | - mrcImage InVy[i]; | |
46 | - mrcImage InVz[i]; | |
45 | + mrcImage* InVx; | |
46 | + mrcImage* InVy; | |
47 | + mrcImage* InVz; | |
47 | 48 | |
48 | 49 | /* |
49 | 50 | mrcImage in1Vx, in1Vy, in1Vz; |
@@ -57,9 +58,9 @@ main(int argc, char* argv[]) | ||
57 | 58 | mrcImage outVz; |
58 | 59 | mrcImage Size; |
59 | 60 | |
60 | - mrcImage tmpx[i]; | |
61 | - mrcImage tmpy[i]; | |
62 | - mrcImage tmpz[i]; | |
61 | + mrcImage* tmpx; | |
62 | + mrcImage* tmpy; | |
63 | + mrcImage* tmpz; | |
63 | 64 | |
64 | 65 | double x,y,z; |
65 | 66 | double data1,data2,data3,data4,data5,data6; |
@@ -71,6 +72,14 @@ main(int argc, char* argv[]) | ||
71 | 72 | |
72 | 73 | DEBUGPRINT("Program Start\n"); |
73 | 74 | |
75 | + InVx = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagInVxList, "in main"); | |
76 | + InVy = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagInVxList, "in main"); | |
77 | + InVz = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagInVxList, "in main"); | |
78 | + | |
79 | + tmpx = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagInVxList, "in main"); | |
80 | + tmpy = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagInVxList, "in main"); | |
81 | + tmpz = (mrcImage*)memoryAllocate(sizeof(mrcImage)*info.flagInVxList, "in main"); | |
82 | + | |
74 | 83 | for(i=0; i<info.flagInVxList; i++) { |
75 | 84 | mrcFileRead(&(InVx[i]), info.InVxList[i], "in main", 0); |
76 | 85 | mrcFileRead(&(InVy[i]), info.InVyList[i], "in main", 0); |
@@ -62,8 +62,8 @@ cleanAll-icu:: | ||
62 | 62 | rm -rf icu |
63 | 63 | |
64 | 64 | cif_api:: icu |
65 | - make init-cif_api | |
66 | - make config-cif_api | |
65 | + make -i init-cif_api | |
66 | + make -i config-cif_api | |
67 | 67 | |
68 | 68 | init-cif_api:: |
69 | 69 | git clone https://github.com/COMCIFS/cif_api.git |
@@ -0,0 +1 @@ | ||
1 | +Subproject commit b9cb36942ce5e3a87830ee83a826c156a24bf078 |