filter.SetCropMaskEnabled(args_info.crop_flag);
filter.SetImageFilename(args_info.image_arg); // Used to get spacing + origin
name.erase(remove_if(name.begin(), name.end(), isspace), name.end());
- std::string n = std::string(args_info.output_arg).append
- (clitk::toString(num)).append
- ("_").append
- (name).append
- (".mhd");
+ std::string n;
+ if (args_info.mha_flag) {
+ n = std::string(args_info.output_arg).append
+ (clitk::toString(num)).append
+ ("_").append
+ (name).append
+ (".mha");
+ }
+ else {
+ n = std::string(args_info.output_arg).append
+ (clitk::toString(num)).append
+ ("_").append
+ (name).append
+ (".mhd");
+ }
if (args_info.verbose_flag) {
std::cout << num << " " << roi->GetName() << " num=" << num << " : " << n << std::endl;
}
option "crop" c "Crop binary mask" flag off
+option "mha" - "Write the RTStruct as a mha image to avoid special character problems" flag off
+
#option "roi" r "ROI to print (ID)" int no
#option "contour" c "contour to print (ID)" int no
#option "offset" o "to display points as image offsets" flag off