go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxInstallFunctions.h
Go to the documentation of this file.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 
00015 #ifndef __elxInstallFunctions_h
00016 #define __elxInstallFunctions_h
00017 
00018 #include "elxComponentDatabase.h"
00019 
00020 namespace elastix
00021 {
00022 
00023 
00042   template<class TAnyItkObject>
00043     class InstallFunctions
00044   {
00045   public:
00046 
00048     typedef InstallFunctions         Self;
00049     typedef TAnyItkObject            AnyItkObjectType;
00050 
00052     typedef ComponentDatabase::ObjectType                 ObjectType;
00053     typedef ComponentDatabase::ObjectPointer              ObjectPointer;
00054 
00058     typedef ComponentDatabase::IndexType                  IndexType;
00059 
00061     typedef ComponentDatabase::ComponentDescriptionType   ComponentDescriptionType;
00062 
00064     static ObjectPointer Creator(void)
00065     {
00066       return dynamic_cast< ObjectType * >( AnyItkObjectType::New().GetPointer() );
00067     }
00068 
00072     static int InstallComponent(
00073       const ComponentDescriptionType & name,
00074       IndexType i, ComponentDatabase * cdb )
00075     {
00076       return cdb->SetCreator( name, i, Self::Creator );
00077     }
00078 
00079   }; // end class InstallFunctions
00080 
00081 
00082 } // end namespace elastix
00083 
00084 
00085 #endif // end #ifndef __elxInstallFunctions_h
00086 


Generated on 24-10-2011 for elastix by doxygen 1.7.4 elastix logo