Commit 2e73e7bc7dc349d5742f975ea6ca4945959e486a

Authored by David Mayerich
1 parent f0d5a769

basic changes for envispec software

Showing 2 changed files with 20 additions and 16 deletions   Show diff stats
envi/bsq.h
... ... @@ -13,6 +13,10 @@ protected:
13 13  
14 14 envi header;
15 15  
  16 + Assistant Professor
  17 + CPRIT Scholar
  18 + Scalable Tissue Imaging + Modeling Laboratory
  19 +
16 20 public:
17 21  
18 22 using binary<T>::open;
... ...
ui/arguments.h
1   -#ifndef RTS_ARGUMENTS
2   -#define RTS_ARGUMENTS
  1 +#ifndef STIM_ARGUMENTS
  2 +#define STIM_ARGUMENTS
3 3  
4 4 #include <string>
5 5 #include <vector>
... ... @@ -13,7 +13,7 @@
13 13 #include <Windows.h>
14 14 #endif
15 15  
16   -namespace rts{
  16 +namespace stim{
17 17  
18 18 class argument
19 19 {
... ... @@ -82,7 +82,7 @@ namespace rts{
82 82 }
83 83  
84 84 //return the value of a text argument
85   - std::string as_text(int n = 0)
  85 + std::string as_string(unsigned int n = 0)
86 86 {
87 87 if(!flag)
88 88 {
... ... @@ -97,7 +97,7 @@ namespace rts{
97 97 }
98 98  
99 99 //return the value of a floating point argument
100   - float as_float(int n = 0)
  100 + float as_float(unsigned int n = 0)
101 101 {
102 102 if(!flag)
103 103 {
... ... @@ -108,7 +108,7 @@ namespace rts{
108 108 if(vals.size() > n)
109 109 {
110 110 float r;
111   - if ( ! (istringstream(vals[n]) >> r) ) r = 0;
  111 + if ( ! (std::istringstream(vals[n]) >> r) ) r = 0;
112 112 return r;
113 113 }
114 114  
... ... @@ -116,7 +116,7 @@ namespace rts{
116 116 }
117 117  
118 118 //return the value of an integer argument
119   - int as_int(int n = 0)
  119 + int as_int(unsigned int n = 0)
120 120 {
121 121 if(!flag)
122 122 {
... ... @@ -127,7 +127,7 @@ namespace rts{
127 127 if(vals.size() > n)
128 128 {
129 129 int r;
130   - if ( ! (istringstream(vals[n]) >> r) ) r = 0;
  130 + if ( ! (std::istringstream(vals[n]) >> r) ) r = 0;
131 131 return r;
132 132 }
133 133  
... ... @@ -148,7 +148,7 @@ namespace rts{
148 148 n += 6;
149 149  
150 150 //for each default argument value
151   - for(int v=0; v<vals.size(); v++)
  151 + for(unsigned int v=0; v<vals.size(); v++)
152 152 n += vals[v].size() + 1;
153 153 }
154 154  
... ... @@ -174,7 +174,7 @@ namespace rts{
174 174 if(ansi)
175 175 left_part += "\033[1;32m";
176 176 left_part += " ( = ";
177   - for(int v=0; v<vals.size(); v++)
  177 + for(unsigned int v=0; v<vals.size(); v++)
178 178 left_part += vals[v] + std::string(" ");
179 179 left_part += ")";
180 180 if(ansi)
... ... @@ -191,7 +191,7 @@ namespace rts{
191 191 ss<<std::left<<std::setw(width + color_size)<<left_part;
192 192  
193 193 //output right column
194   - for(int d=0; d<desc.size(); d++)
  194 + for(unsigned int d=0; d<desc.size(); d++)
195 195 {
196 196 if(d == 0)
197 197 ss<<desc[0];
... ... @@ -261,7 +261,7 @@ namespace rts{
261 261 void set_ansi(bool b)
262 262 {
263 263 ansi = b;
264   - for(int i=0; i<args.size(); i++)
  264 + for(unsigned int i=0; i<args.size(); i++)
265 265 args[i].set_ansi(ansi);
266 266 }
267 267  
... ... @@ -293,7 +293,7 @@ namespace rts{
293 293 si = 0;
294 294  
295 295 //for each argument
296   - for(int a=0; a<args.size(); a++)
  296 + for(unsigned int a=0; a<args.size(); a++)
297 297 {
298 298 if(si != -1 && a == sections[si].index)
299 299 {
... ... @@ -302,7 +302,7 @@ namespace rts{
302 302 else
303 303 ss<<std::endl<<std::left<<std::setfill('=')<<std::setw(col_width)<<sections[si].name<<std::endl;
304 304 si++;
305   - if(si == sections.size()) si = -1;
  305 + if(si == (int)sections.size()) si = -1;
306 306 }
307 307  
308 308 ss<<args[a].toStr(col_width)<<std::endl;
... ... @@ -313,7 +313,7 @@ namespace rts{
313 313  
314 314 int index(std::string _name)
315 315 {
316   - int i = find(args.begin(), args.end(), _name) - args.begin();
  316 + unsigned int i = find(args.begin(), args.end(), _name) - args.begin();
317 317  
318 318 if(i >= args.size())
319 319 i = -1;
... ... @@ -414,6 +414,6 @@ namespace rts{
414 414  
415 415  
416 416  
417   -} //end namespace rts
  417 +} //end namespace stim
418 418  
419 419 #endif
... ...