]> Creatis software - clitk.git/blobdiff - tools/clitkXml2DicomRTStruct.cxx
Add pixel coordinate instead of mm coordinates into Xml2DicomRTStruct
[clitk.git] / tools / clitkXml2DicomRTStruct.cxx
index 96c160fd0b660daebec9327ecadb9aecba582bee..34fe5107f62053c80ee9c38ecd6af5566ef55b9b 100644 (file)
@@ -31,6 +31,15 @@ int main(int argc, char * argv[]) {
   typedef float PixelType;
   clitk::Xml2DicomRTStructFilter<PixelType> filter;
   filter.SetVerboseFlag(args_info.verbose_flag);
+  filter.SetUsePixel(args_info.pixel_flag);
+  if (args_info.pixel_flag) {
+    if (args_info.image_given)
+      filter.SetImageMHD(args_info.image_arg);
+    else {
+      std::cout << "Set MHD image (option -j) when pixel is set" << std::endl;
+      return -1;
+    }
+  }
   filter.SetInputFilename(args_info.input_arg);
   filter.SetDicomFolder(args_info.dicom_arg);
   filter.SetStructureSetFilename(args_info.rtstruct_arg);