X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FrtkXRadImageIOFactory.h;fp=common%2FrtkXRadImageIOFactory.h;h=1651918a33b15ab7072ea5d0a7330d35911c4cfe;hb=bf4b9657cd6577fe1276b9d3f5fc9f40dbb4d13c;hp=0000000000000000000000000000000000000000;hpb=78616ba72923cbf15fe81ddbec0792e9c7d20ef9;p=clitk.git diff --git a/common/rtkXRadImageIOFactory.h b/common/rtkXRadImageIOFactory.h new file mode 100644 index 0000000..1651918 --- /dev/null +++ b/common/rtkXRadImageIOFactory.h @@ -0,0 +1,77 @@ +/*========================================================================= + * + * Copyright RTK Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *=========================================================================*/ + +#ifndef __rtkXRadImageIOFactory_h +#define __rtkXRadImageIOFactory_h + +#include "rtkXRadImageIO.h" +#include +#include +#include + +namespace rtk { + +/** \class XRadImageIOFactory + * \brief ITK factory for XRad file I/O. + * + * \author Simon Rit + */ +class XRadImageIOFactory : public itk::ObjectFactoryBase +{ +public: + /** Standard class typedefs. */ + typedef XRadImageIOFactory Self; + typedef itk::ObjectFactoryBase Superclass; + typedef itk::SmartPointer Pointer; + typedef itk::SmartPointer ConstPointer; + + /** Class methods used to interface with the registered factories. */ + const char* GetITKSourceVersion(void) const { + return ITK_SOURCE_VERSION; + } + + const char* GetDescription(void) const { + return "XRad ImageIO Factory, allows the loading of XRad images into insight"; + } + + /** Method for class instantiation. */ + itkFactorylessNewMacro(Self); + + /** Run-time type information (and related methods). */ + itkTypeMacro(XRadImageIOFactory, ObjectFactoryBase); + + /** Register one factory of this type */ + static void RegisterOneFactory(void) { + ObjectFactoryBase::RegisterFactory( Self::New() ); + } + +protected: + XRadImageIOFactory(); + ~XRadImageIOFactory() {} + + typedef XRadImageIOFactory myProductType; + const myProductType* m_MyProduct; +private: + XRadImageIOFactory(const Self&); //purposely not implemented + void operator=(const Self&); //purposely not implemented + +}; + +} // end namespace + +#endif