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

itkSpatialObjectFactory.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSpatialObjectFactory.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/06/30 16:50:30 $
00007   Version:   $Revision: 1.1 $
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 __itkSpatialObjectFactory_h
00021 #define __itkSpatialObjectFactory_h
00022 
00023 #include "itkSpatialObjectFactoryBase.h"
00024 
00025 namespace itk
00026 {
00031 template <class T>
00032 class SpatialObjectFactory : public SpatialObjectFactoryBase
00033 {
00034 public:
00035 
00036   static void RegisterSpatialObject()
00037     {
00038     typename T::Pointer t = T::New();
00039     SpatialObjectFactoryBase::Pointer f = SpatialObjectFactoryBase::GetFactory();
00040     f->RegisterSpatialObject ( t->GetSpatialObjectTypeAsString().c_str(),
00041                                t->GetSpatialObjectTypeAsString().c_str(),
00042                                t->GetSpatialObjectTypeAsString().c_str(),
00043                                1,
00044                                CreateObjectFunction<T>::New() );
00045     };
00046 };
00047 } // end namespace itk
00048 
00049 #endif

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