OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / src / Tools / mrcImage / mrcImageBackgroundSubtraction / 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 "eosString.h"
8 #include "File.h"
9 #include "Memory.h"
10
11
12 void
13 init0(mrcImageBackgroundSubtractionInfo* info)
14 {
15     info->fptIn = NULL;    info->flagIn = 0;
16     info->fptOut = NULL;    info->flagOut = 0;
17     info->widthX = 1;    info->flagwidthX = 0;
18     info->widthY = 1;    info->flagwidthY = 0;
19     info->widthZ = 1;    info->flagwidthZ = 0;
20     info->edgeX = 1;    info->flagedgeX = 0;
21     info->edgeY = 1;    info->flagedgeY = 0;
22     info->edgeZ = 1;    info->flagedgeZ = 0;
23     info->Trim = 0;    info->flagTrim = 0;
24     info->fptconfigFile = NULL;    info->flagconfigFile = 0;
25     info->mode = 0;    info->flagmode = 0;
26 }
27
28 void
29 init1(mrcImageBackgroundSubtractionInfo* info)
30 {
31     char s[1024];
32     int i;
33     if(!info->flagIn) {
34         stringGetFromFile(s, "In", stdin, stdout, 0);
35         info->In = stringGetNthWord(s, 1, " ,\t");
36         info->flagIn++;
37     }
38     if(info->flagIn) {
39         info->fptIn = fileOpen(info->In, "r");
40     }
41     
42     if(!info->flagOut) {
43         stringGetFromFile(s, "Out", stdin, stdout, 0);
44         info->Out = stringGetNthWord(s, 1, " ,\t");
45         info->flagOut++;
46     }
47     if(info->flagOut) {
48         info->fptOut = fileOpen(info->Out, "w");
49     }
50     
51     if(info->flagwidthX) {
52     }
53     
54     if(info->flagwidthY) {
55     }
56     
57     if(info->flagwidthZ) {
58     }
59     
60     if(info->flagedgeX) {
61     }
62     
63     if(info->flagedgeY) {
64     }
65     
66     if(info->flagedgeZ) {
67     }
68     
69     if(info->flagTrim) {
70     }
71     
72     if(info->flagconfigFile) {
73         info->fptconfigFile = fileOpen(info->configFile, "r");
74     }
75     
76     if(info->flagmode) {
77     }
78     
79 }
80 #ifdef KHOROS
81 #include <stdio.h>
82 #include "bootstrap.h"
83 #include "dataserv.h"
84 #include "datamanip.h"
85 extern void func_usage_additions(void);
86 extern void func_free_args(kexit_status status, kaddr client_data);
87 extern void func_get_args(kform* pane);
88
89 void
90 func_usage_additions(void)
91 {
92 }
93 void
94 func_free_args(kexit_status status, kaddr client_data)
95 {
96 }
97 void
98 func_get_args(kform* pane)
99 {
100 }
101 void
102 khorosInit(int argc, char* argv[])
103 {
104     char* eospath;
105     char  panepath[1024];
106     FILE* fpt;
107     
108     eospath = getenv("EOS_HOME");
109     sprintf(panepath, "%s/src/Tools/mrcImage/mrcImageBackgroundSubtraction/src/mrcImageBackgroundSubtraction.pane", eospath);
110     khoros_initialize(argc, argv, "EOS");
111     fpt = fopen(panepath, "r");    if(NULL!=fpt) {
112         fclose(fpt);
113         kclui_initialize(panepath, KGEN_NONE, "EOS", "mrcImageBackgroundSubtraction",
114                      func_usage_additions,
115                      func_get_args,
116                      func_free_args);
117     }
118 }
119 #endif /* KHOROS */