]> Creatis software - clitk.git/blob - common/rtkEdfImageIOFactory.h
Merge branch 'master' into extentSimon
[clitk.git] / common / rtkEdfImageIOFactory.h
1 /*=========================================================================
2  *
3  *  Copyright RTK Consortium
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at
8  *
9  *         http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  *=========================================================================*/
18
19 #ifndef __rtkEdfImageIOFactory_h
20 #define __rtkEdfImageIOFactory_h
21
22 #include "rtkEdfImageIO.h"
23 #include <itkImageIOBase.h>
24 #include <itkObjectFactoryBase.h>
25 #include <itkVersion.h>
26
27 namespace rtk {
28
29 /** \class EdfImageIOFactory
30  * \brief ITK factory for Edf file I/O.
31  *
32  * \author Simon Rit
33  */
34 class EdfImageIOFactory : public itk::ObjectFactoryBase
35 {
36 public:
37   /** Standard class typedefs. */
38   typedef EdfImageIOFactory             Self;
39   typedef itk::ObjectFactoryBase        Superclass;
40   typedef itk::SmartPointer<Self>       Pointer;
41   typedef itk::SmartPointer<const Self> ConstPointer;
42
43   /** Class methods used to interface with the registered factories. */
44   const char* GetITKSourceVersion(void) const {
45     return ITK_SOURCE_VERSION;
46   }
47
48   const char* GetDescription(void) const {
49     return "Edf ImageIO Factory, allows the loading of Edf images into insight";
50   }
51
52   /** Method for class instantiation. */
53   itkFactorylessNewMacro(Self);
54
55   /** Run-time type information (and related methods). */
56   itkTypeMacro(EdfImageIOFactory, ObjectFactoryBase);
57
58   /** Register one factory of this type  */
59   static void RegisterOneFactory(void) {
60     ObjectFactoryBase::RegisterFactory( Self::New() );
61   }
62
63 protected:
64   EdfImageIOFactory();
65   ~EdfImageIOFactory() {}
66
67   typedef EdfImageIOFactory myProductType;
68   const myProductType* m_MyProduct;
69 private:
70   EdfImageIOFactory(const Self&); //purposely not implemented
71   void operator=(const Self&);    //purposely not implemented
72
73 };
74
75 } // end namespace
76
77 #endif