Commit aaef9ad6 authored by Gregory C. Sharp's avatar Gregory C. Sharp

Add stub for writing opt4d files

parent 32c80ff4
......@@ -468,6 +468,16 @@ Segmentation::save_labelmap (const std::string& labelmap_fn)
d_ptr->m_labelmap->save_image (labelmap_fn);
}
void
Segmentation::save_opt4d (const std::string &opt4d_prefix)
{
std::string opt4d_vv_fn = opt4d_prefix + ".vv";
lprintf ("Trying to write file %s\n", opt4d_vv_fn.c_str());
std::string opt4d_voi_fn = opt4d_prefix + ".voi";
lprintf ("Trying to write file %s\n", opt4d_voi_fn.c_str());
}
void
Segmentation::save_prefix (const std::string &output_prefix,
const std::string& extension)
......
......@@ -51,6 +51,7 @@ public:
void save_prefix_fcsv (const std::string& output_prefix);
void save_ss_image (const std::string& ss_img_fn);
void save_labelmap (const std::string& labelmap_fn);
void save_opt4d (const std::string& output_prefix);
void save_prefix (const std::string& output_prefix,
const std::string& extension = "mha");
void save_prefix (const char *output_prefix);
......
......@@ -81,6 +81,9 @@ parse_fn (
"a single structure", 1, "");
parser->add_long_option ("", "output-colormap",
"create a colormap file that can be used with 3d slicer", 1, "");
parser->add_long_option ("", "output-opt4d",
"create output files file.vv and file.voi that can be used "
"with opt4D; file extensions will be added automatically", 1, "");
parser->add_long_option ("", "output-pointset",
"create a pointset file that can be used with 3d slicer", 1, "");
parser->add_long_option ("", "output-prefix",
......@@ -232,6 +235,7 @@ parse_fn (
parms->output_labelmap_fn = parser->get_string("output-labelmap").c_str();
parms->output_colormap_fn = parser->get_string("output-colormap").c_str();
parms->output_pointset_fn = parser->get_string("output-pointset").c_str();
parms->output_opt4d_fn = parser->get_string("output-opt4d").c_str();
parms->output_prefix = parser->get_string("output-prefix").c_str();
parms->output_prefix_fcsv
= parser->get_string("output-prefix-fcsv").c_str();
......
......@@ -103,6 +103,12 @@ save_ss_img (
seg->save_ss_list (parms->output_ss_list_fn);
}
/* Opt4D images */
if (parms->output_opt4d_fn != "") {
lprintf ("save_ss_img: save_opt4d\n");
seg->save_opt4d (parms->output_opt4d_fn);
}
/* prefix images */
if (parms->output_prefix != "") {
lprintf ("save_ss_img: save_prefix\n");
......
......@@ -36,6 +36,7 @@ public:
std::string output_dose_img_fn;
std::string output_img_fn;
std::string output_labelmap_fn;
std::string output_opt4d_fn;
std::string output_pointset_fn;
std::string output_prefix;
std::string output_prefix_fcsv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment