Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkTransformFactory.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTransformFactory.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/04/05 15:41:44 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012   Portions of this code are covered under the VTK copyright.
00013   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
00014 
00015      This software is distributed WITHOUT ANY WARRANTY; without even 
00016      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00017      PURPOSE.  See the above copyright notices for more information.
00018 
00019 =========================================================================*/
00020 #ifndef __itkTransformFactory_h
00021 #define __itkTransformFactory_h
00022 
00023 #include "itkTransformFactoryBase.h"
00024 
00025 namespace itk
00026 {
00031 template <class T>
00032 class TransformFactory : public TransformFactoryBase
00033 {
00034 public:  
00035   static void RegisterTransform ()
00036     {
00037     typename T::Pointer t = T::New();
00038     // std::cout << "Registering: " << t->GetTransformTypeAsString() << std::endl;
00039     TransformFactoryBase::Pointer f = TransformFactoryBase::GetFactory();
00040     f->RegisterTransform ( t->GetTransformTypeAsString().c_str(),
00041                            t->GetTransformTypeAsString().c_str(),
00042                            t->GetTransformTypeAsString().c_str(),
00043                            1,
00044                            CreateObjectFunction<T>::New() );
00045     };
00046 };
00047 } // end namespace itk
00048 
00049 #endif

Generated at Thu May 25 00:09:30 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000