OSDN Git Service

add mrcImageParticleCandidateExtract
[eos/base.git] / src / Tools / mrcImage / mrcImageParticleCandidateExtract / src / init.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <math.h>
5 #include "../inc/config.h"
6 #include "genUtil.h"
7 #include "String.h"
8 #include "File.h"
9 #include "Memory.h"
10
11
12 void
13 init0(mrcImageParticleCandidateExtractInfo* info)
14 {
15     info->fptIn = NULL;    info->flagIn = 0;
16     info->fptOut = NULL;    info->flagOut = 0;
17     info->RingRadius = 100.0;    info->flagRingRadius = 0;
18     info->RingWidth = 10.0;    info->flagRingWidth = 0;
19     info->Threshold = 3.0;    info->flagThreshold = 0;
20     info->fptoutFileThres = stdout;    info->flagoutFileThres = 0;
21     info->fptconfigFile = NULL;    info->flagconfigFile = 0;
22     info->mode = 0;    info->flagmode = 0;
23 }
24
25 void
26 init1(mrcImageParticleCandidateExtractInfo* info)
27 {
28     char s[1024];
29     int i;
30     if(!info->flagIn) {
31         stringGetFromFile(s, "In", stdin, stdout, 0);
32         info->In = stringGetNthWord(s, 1, " ,\t");
33         info->flagIn++;
34     }
35     if(info->flagIn) {
36         info->fptIn = fileOpen(info->In, "r");
37     }
38     
39     if(!info->flagOut) {
40         stringGetFromFile(s, "Out", stdin, stdout, 0);
41         info->Out = stringGetNthWord(s, 1, " ,\t");
42         info->flagOut++;
43     }
44     if(info->flagOut) {
45         info->fptOut = fileOpen(info->Out, "w");
46     }
47     
48     if(info->flagRingRadius) {
49     }
50     
51     if(info->flagRingWidth) {
52     }
53     
54     if(info->flagThreshold) {
55     }
56     
57     if(info->flagoutFileThres) {
58         info->fptoutFileThres = fileOpen(info->outFileThres, "w");
59     }
60     
61     if(info->flagconfigFile) {
62         info->fptconfigFile = fileOpen(info->configFile, "r");
63     }
64     
65     if(info->flagmode) {
66     }
67     
68 }
69 #ifdef KHOROS
70 #include <stdio.h>
71 #include "bootstrap.h"
72 #include "dataserv.h"
73 #include "datamanip.h"
74 extern void func_usage_additions(void);
75 extern void func_free_args(kexit_status status, kaddr client_data);
76 extern void func_get_args(kform* pane);
77
78 void
79 func_usage_additions(void)
80 {
81 }
82 void
83 func_free_args(kexit_status status, kaddr client_data)
84 {
85 }
86 void
87 func_get_args(kform* pane)
88 {
89 }
90 void
91 khorosInit(int argc, char* argv[])
92 {
93     char* eospath;
94     char  panepath[1024];
95     FILE* fpt;
96     
97     eospath = getenv("EOS_HOME");
98     sprintf(panepath, "%s/src/Tools/mrcImage/mrcImageParticleCandidateExtract/src/mrcImageParticleCandidateExtract.pane", eospath);
99     khoros_initialize(argc, argv, "EOS");
100     fpt = fopen(panepath, "r");    if(NULL!=fpt) {
101         fclose(fpt);
102         kclui_initialize(panepath, KGEN_NONE, "EOS", "mrcImageParticleCandidateExtract",
103                      func_usage_additions,
104                      func_get_args,
105                      func_free_args);
106     }
107 }
108 #endif /* KHOROS */