]> Creatis software - clitk.git/blob - tools/clitkXml2DicomRTStruct.cxx
Add pixel coordinate instead of mm coordinates into Xml2DicomRTStruct
[clitk.git] / tools / clitkXml2DicomRTStruct.cxx
1 /*=========================================================================
2   Program:         vv http://www.creatis.insa-lyon.fr/rio/vv
3   Main authors :   XX XX XX
4
5   Authors belongs to:
6   - University of LYON           http://www.universite-lyon.fr/
7   - Léon Bérard cancer center    http://www.centreleonberard.fr
8   - CREATIS CNRS laboratory      http://www.creatis.insa-lyon.fr
9
10   This software is distributed WITHOUT ANY WARRANTY; without even
11   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12   PURPOSE.  See the copyright notices for more information.
13
14   It is distributed under dual licence
15   - BSD       http://www.opensource.org/licenses/bsd-license.php
16   - CeCILL-B  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17
18   =========================================================================*/
19
20 // clitk
21 #include "clitkXml2DicomRTStructFilter.h"
22 #include "clitkXml2DicomRTStruct_ggo.h"
23
24 //--------------------------------------------------------------------
25 int main(int argc, char * argv[]) {
26
27   // Init command line
28   GGO(clitkXml2DicomRTStruct, args_info);
29
30   // Create a filter to convert Xml struct into dicomRTStruct and write to disk
31   typedef float PixelType;
32   clitk::Xml2DicomRTStructFilter<PixelType> filter;
33   filter.SetVerboseFlag(args_info.verbose_flag);
34   filter.SetUsePixel(args_info.pixel_flag);
35   if (args_info.pixel_flag) {
36     if (args_info.image_given)
37       filter.SetImageMHD(args_info.image_arg);
38     else {
39       std::cout << "Set MHD image (option -j) when pixel is set" << std::endl;
40       return -1;
41     }
42   }
43   filter.SetInputFilename(args_info.input_arg);
44   filter.SetDicomFolder(args_info.dicom_arg);
45   filter.SetStructureSetFilename(args_info.rtstruct_arg);
46   filter.SetOutputFilename(args_info.output_arg);
47   filter.Update();
48
49   // This is the end my friend
50   return 0;
51 }
52 //--------------------------------------------------------------------