]> Creatis software - clitk.git/blob - common/clitkXdrImageIOFactory.h
added the new headers
[clitk.git] / common / clitkXdrImageIOFactory.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 CLITKXDRIMAGEIOFACTORY_H
19 #define CLITKXDRIMAGEIOFACTORY_H
20
21 /**
22  * @file   clitkXdrImageIOFactory.h
23  * @author Simon Rit <simon.rit@gmail.com>
24  * @date   Sun Jun  1 22:09:56 2008
25  *
26  * @brief
27  *
28  *
29  */
30
31 // clitk include
32 #include "clitkXdrImageIO.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 XDR Image file format
43 class XdrImageIOFactory: public itk::ObjectFactoryBase
44 {
45 public:
46     /** Standard class typedefs. */
47     typedef XdrImageIOFactory              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 "Xdr ImageIO Factory, allows the loading of Xdr images into insight";
59     }
60
61     /** Method for class instantiation. */
62     itkFactorylessNewMacro(Self);
63
64     /** Run-time type information (and related methods). */
65     itkTypeMacro(XdrImageIOFactory, ObjectFactoryBase);
66
67     /** Register one factory of this type  */
68     static void RegisterOneFactory(void) {
69         ObjectFactoryBase::RegisterFactory( Self::New() );
70     }
71
72 protected:
73     XdrImageIOFactory();
74     ~XdrImageIOFactory() {};
75     typedef XdrImageIOFactory myProductType;
76     const myProductType* m_MyProduct;
77
78 private:
79     XdrImageIOFactory(const Self&); //purposely not implemented
80     void operator=(const Self&); //purposely not implemented
81 };
82
83 } // end namespace
84
85 #endif /* end #define CLITKXDRIMAGEIOFACTORY_H */
86