]> Creatis software - clitk.git/blob - common/clitkVoxImageIOFactory.h
Add clitkImage2Dicom tool
[clitk.git] / common / clitkVoxImageIOFactory.h
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 #ifndef CLITKVOXIMAGEIOFACTORY_H
19 #define CLITKVOXIMAGEIOFACTORY_H
20 /**
21  ===================================================================
22  * @file   clitkVoxImageIOFactory.h
23  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
24  * @date   03 Jul 2006 11:27:55
25
26  * @brief  
27
28  ===================================================================*/
29
30 // clitk include
31 #include "clitkVoxImageIO.h"
32
33 // itk include
34 #include "itkImageIOBase.h"
35 #include "itkObjectFactoryBase.h"
36 #include "itkVersion.h"
37
38 namespace clitk {
39   
40   //====================================================================
41   // Factory for reading Vox Image file format
42   class VoxImageIOFactory: public itk::ObjectFactoryBase
43   {
44   public:
45         /** Standard class typedefs. */
46         typedef VoxImageIOFactory              Self;
47         typedef itk::ObjectFactoryBase         Superclass;
48         typedef itk::SmartPointer<Self>        Pointer;
49         typedef itk::SmartPointer<const Self>  ConstPointer;
50         
51         /** Class methods used to interface with the registered factories. */
52         const char* GetITKSourceVersion(void) const ITK_OVERRIDE {
53           return ITK_SOURCE_VERSION;
54         }
55         
56         const char* GetDescription(void) const ITK_OVERRIDE {
57           return "Vox ImageIO Factory, allows the loading of Vox images into insight";
58         }
59         
60         /** Method for class instantiation. */
61         itkFactorylessNewMacro(Self);
62         
63         /** Run-time type information (and related methods). */
64         itkTypeMacro(VoxImageIOFactory, ObjectFactoryBase);
65         
66         /** Register one factory of this type  */
67         static void RegisterOneFactory(void) {
68           ObjectFactoryBase::RegisterFactory( Self::New() );
69         }       
70
71   protected:
72         VoxImageIOFactory();
73         ~VoxImageIOFactory() {};
74         typedef VoxImageIOFactory myProductType;
75         const myProductType* m_MyProduct;
76         
77   private:
78         VoxImageIOFactory(const Self&); //purposely not implemented
79         void operator=(const Self&); //purposely not implemented
80   };
81
82 } // end namespace
83
84 #endif /* end #define CLITKVOXIMAGEIOFACTORY_H */
85