00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2007-12-11 14:46:19 +0100 (Di, 11. Dez 2007) $ 00006 Version: $Revision: 11215 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #include "mitkPlanarFigureWriterFactory.h" 00019 00020 #include "itkCreateObjectFunction.h" 00021 #include "itkVersion.h" 00022 00023 #include <mitkPlanarFigureWriter.h> 00024 00025 namespace mitk 00026 { 00027 00028 template <class T> 00029 class CreatePlanarFigureWriter : public itk::CreateObjectFunctionBase 00030 { 00031 public: 00032 00034 typedef CreatePlanarFigureWriter Self; 00035 typedef itk::SmartPointer<Self> Pointer; 00036 00038 itkFactorylessNewMacro(Self); 00039 LightObject::Pointer CreateObject() { typename T::Pointer p = T::New(); 00040 p->Register(); 00041 return p.GetPointer(); 00042 } 00043 00044 protected: 00045 CreatePlanarFigureWriter() {} 00046 ~CreatePlanarFigureWriter() {} 00047 00048 private: 00049 CreatePlanarFigureWriter(const Self&); //purposely not implemented 00050 void operator=(const Self&); //purposely not implemented 00051 }; 00052 00053 PlanarFigureWriterFactory::PlanarFigureWriterFactory() 00054 { 00055 this->RegisterOverride("IOWriter", 00056 "PlanarFigureWriter", 00057 "PlanarFigure xml Writer", 00058 1, 00059 mitk::CreatePlanarFigureWriter< mitk::PlanarFigureWriter >::New()); 00060 } 00061 00062 PlanarFigureWriterFactory::~PlanarFigureWriterFactory() 00063 { 00064 } 00065 00066 const char* PlanarFigureWriterFactory::GetITKSourceVersion() const 00067 { 00068 return ITK_SOURCE_VERSION; 00069 } 00070 00071 const char* PlanarFigureWriterFactory::GetDescription() const 00072 { 00073 return "PlanarFigureWriterFactory"; 00074 } 00075 00076 } // end namespace mitk