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