|
@@ -72,15 +72,15 @@ int main ( int argc, char **argv )
|
|
|
|
|
|
ResourceStatistics rs;
|
|
|
|
|
|
+ /*-------------I/O CONFIGURATION-------------*/
|
|
|
bool show_result = conf.gB ( "debug", "show_results", false );
|
|
|
-
|
|
|
bool write_results = conf.gB ( "debug", "write_results", false );
|
|
|
-
|
|
|
bool write_results_pascal = conf.gB ( "debug", "write_results_pascal", false );
|
|
|
-
|
|
|
bool run_3dseg = conf.gB ( "debug", "run_3dseg", true );
|
|
|
-
|
|
|
- std::string resultdir = conf.gS ( "debug", "resultdir", "." );
|
|
|
+ string output_type = conf.gS ( "debug", "output_type", "ppm" );
|
|
|
+ string output_postfix = conf.gS ( "debug", "output_postfix", "" );
|
|
|
+ string resultdir = conf.gS ( "debug", "resultdir", "." );
|
|
|
+ /*-------------------------------------------*/
|
|
|
|
|
|
if ( write_results )
|
|
|
{
|
|
@@ -182,9 +182,7 @@ int main ( int argc, char **argv )
|
|
|
}
|
|
|
|
|
|
char filename[1024];
|
|
|
-
|
|
|
- char *format = ( char * ) "pgm";
|
|
|
- sprintf ( filename, "%s/%s.%s", resultdir.c_str(), fname.c_str(), format );
|
|
|
+ sprintf ( filename, "%s/%s.%s.%s", resultdir.c_str(), fname.c_str(), output_postfix.c_str(), output_type.c_str() );
|
|
|
pascal_lm.write ( filename );
|
|
|
}
|
|
|
|
|
@@ -210,8 +208,11 @@ int main ( int argc, char **argv )
|
|
|
if ( write_results )
|
|
|
{
|
|
|
char filename[1024];
|
|
|
- char *format = ( char * ) "ppm";
|
|
|
- sprintf ( filename, "%03d_%03d.%s", imageno, fileno, format );
|
|
|
+ if ( output_postfix.size() > 0 )
|
|
|
+ sprintf ( filename, "%s.%s.%s", fname.c_str(), output_postfix.c_str(), output_type.c_str() );
|
|
|
+ else
|
|
|
+ sprintf ( filename, "%s.%s", fname.c_str(), output_type.c_str() );
|
|
|
+
|
|
|
std::string origfilename = resultdir + "/orig_" + string ( filename );
|
|
|
cerr << "Writing to file " << origfilename << endl;
|
|
|
orig.write ( origfilename );
|