]> Creatis software - clitk.git/blob - common/clitkIO.cxx
Add code to write dicom sequence tag in gateSimulation2Dicom
[clitk.git] / common / clitkIO.cxx
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to:
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18
19 // std include
20 #include <iostream>
21 #include <fstream>
22
23 // itk include
24 #include "itkMacro.h"
25
26 // clitk include
27 #include "clitkIO.h"
28 #include "clitkImageCommon.h"
29 #include "clitkDicomRTDoseIOFactory.h"
30 #include "clitkVoxImageIOFactory.h"
31 #include "clitkVfImageIOFactory.h"
32 #include "clitkXdrImageIOFactory.h"
33 #include "rtkHisImageIOFactory.h"
34 #include "rtkHndImageIOFactory.h"
35 #include "rtkEdfImageIOFactory.h"
36 #include "rtkImagXImageIOFactory.h"
37 #include "rtkXRadImageIOFactory.h"
38 #include "clitkEsrfHstImageIOFactory.h"
39 #include "clitkGateAsciiImageIOFactory.h"
40 #include "clitkConfiguration.h"
41 #if CLITK_PRIVATE_FEATURES
42   #include "clitkUsfImageIOFactory.h"
43   #include "clitkUSVoxImageIOFactory.h"
44   #include "clitkSvlImageIOFactory.h"
45 #endif
46 #include <itkBMPImageIOFactory.h>
47 #include <itkGDCMImageIOFactory.h>
48 #include <itkGiplImageIOFactory.h>
49 #include <itkJPEGImageIOFactory.h>
50 #include <itkMetaImageIOFactory.h>
51 #include <itkPNGImageIOFactory.h>
52 #include <itkStimulateImageIOFactory.h>
53 #include <itkTIFFImageIOFactory.h>
54 #include <itkVTKImageIOFactory.h>
55 #include <itkNiftiImageIOFactory.h>
56 #include <itkNrrdImageIOFactory.h>
57 #include <itkImageIOFactory.h>
58
59 //--------------------------------------------------------------------
60 // Register factories
61 void clitk::RegisterClitkFactories()
62 {
63   std::list< itk::ObjectFactoryBase * > fl = itk::GDCMImageIOFactory::GetRegisteredFactories();
64   for (std::list< itk::ObjectFactoryBase * >::iterator it = fl.begin(); it != fl.end(); ++it)
65     if (dynamic_cast<itk::GDCMImageIOFactory *>(*it))
66     {
67       itk::GDCMImageIOFactory::UnRegisterFactory(*it);
68       break;
69     }
70
71   std::list< itk::ObjectFactoryBase * > flpng = itk::PNGImageIOFactory::GetRegisteredFactories();
72   for (std::list< itk::ObjectFactoryBase * >::iterator it = flpng.begin(); it != flpng.end(); ++it)
73     if (dynamic_cast<itk::PNGImageIOFactory *>(*it))
74     {
75       itk::PNGImageIOFactory::UnRegisterFactory(*it);
76       break;
77     }
78 #if CLITK_PRIVATE_FEATURES
79   clitk::UsfImageIOFactory::RegisterOneFactory();
80   clitk::USVoxImageIOFactory::RegisterOneFactory();
81   clitk::SvlImageIOFactory::RegisterOneFactory();
82 #endif
83   clitk::GateAsciiImageIOFactory::RegisterOneFactory();
84   clitk::DicomRTDoseIOFactory::RegisterOneFactory();
85   clitk::VoxImageIOFactory::RegisterOneFactory();
86   clitk::VfImageIOFactory::RegisterOneFactory();
87   clitk::XdrImageIOFactory::RegisterOneFactory();
88   rtk::HisImageIOFactory::RegisterOneFactory();
89   rtk::HndImageIOFactory::RegisterOneFactory();
90   rtk::EdfImageIOFactory::RegisterOneFactory();
91   rtk::ImagXImageIOFactory::RegisterOneFactory();
92   rtk::XRadImageIOFactory::RegisterOneFactory();
93   clitk::EsrfHstImageIOFactory::RegisterOneFactory();
94   itk::BMPImageIOFactory::RegisterOneFactory();
95   itk::GDCMImageIOFactory::RegisterOneFactory();
96   itk::GiplImageIOFactory::RegisterOneFactory();
97   itk::JPEGImageIOFactory::RegisterOneFactory();
98   itk::MetaImageIOFactory::RegisterOneFactory();
99   itk::PNGImageIOFactory::RegisterOneFactory();
100   itk::StimulateImageIOFactory::RegisterOneFactory();
101   itk::TIFFImageIOFactory::RegisterOneFactory();
102   itk::VTKImageIOFactory::RegisterOneFactory();
103   itk::NiftiImageIOFactory::RegisterOneFactory();
104   itk::NrrdImageIOFactory::RegisterOneFactory();
105 } ////
106