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