#include <itkObjectFactoryBase.h>
Inheritance diagram for itk::ObjectFactoryBase:
Public Types | |
typedef ObjectFactoryBase | Self |
typedef Object | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual const char * | GetITKSourceVersion (void) const =0 |
virtual const char * | GetDescription (void) const =0 |
virtual std::list< std::string > | GetClassOverrideNames () |
virtual std::list< std::string > | GetClassOverrideWithNames () |
virtual std::list< std::string > | GetClassOverrideDescriptions () |
virtual std::list< bool > | GetEnableFlags () |
virtual void | SetEnableFlag (bool flag, const char *className, const char *subclassName) |
virtual bool | GetEnableFlag (const char *className, const char *subclassName) |
virtual void | Disable (const char *className) |
const char * | GetLibraryPath () |
Static Public Member Functions | |
LightObject::Pointer | CreateInstance (const char *itkclassname) |
std::list< LightObject::Pointer > | CreateAllInstance (const char *itkclassname) |
void | ReHash () |
void | RegisterFactory (ObjectFactoryBase *) |
void | UnRegisterFactory (ObjectFactoryBase *) |
void | UnRegisterAllFactories () |
std::list< ObjectFactoryBase * > | GetRegisteredFactories () |
Protected Member Functions | |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
void | RegisterOverride (const char *classOverride, const char *overrideClassName, const char *description, bool enableFlag, CreateObjectFunctionBase *createFunction) |
virtual LightObject::Pointer | CreateObject (const char *itkclassname) |
ObjectFactoryBase () | |
virtual | ~ObjectFactoryBase () |
ObjectFactoryBase is used to create itk objects. The base class ObjectFactoryBase contains a static method CreateInstance() that is used to create itk objects from the list of registerd ObjectFactoryBase sub-classes. The first time CreateInstance() is called, all dll's or shared libraries in the environment variable ITK_AUTOLOAD_PATH are loaded into the current process. The C function itkLoad is called on each dll. itkLoad should return an instance of the factory sub-class implemented in the shared library. ITK_AUTOLOAD_PATH is an environment variable containing a colon separated (semi-colon on win32) list of paths.
This can be use to overide the creation of any object in ITK.
Definition at line 50 of file itkObjectFactoryBase.h.
|
|
|
Standard class typedefs. Reimplemented from itk::Object.
Reimplemented in itk::AnalyzeImageIOFactory, itk::Brains2MaskImageIOFactory, itk::DICOMImageIO2Factory, itk::DicomImageIOFactory, itk::GE4ImageIOFactory, itk::GE5ImageIOFactory, itk::GEAdwImageIOFactory, itk::GiplImageIOFactory, itk::JPEGImageIOFactory, itk::MetaImageIOFactory, itk::PNGImageIOFactory, itk::RawImageIOFactory< TPixel, VImageDimension >, itk::SiemensVisionImageIOFactory, itk::StimulateImageIOFactory, itk::TIFFImageIOFactory, and itk::VTKImageIOFactory. Definition at line 54 of file itkObjectFactoryBase.h. |
|
|
|
|
|
|
Create and return all possible instances of the named itk object. Each loaded ObjectFactoryBase will be asked in the order the factory was in the ITK_AUTOLOAD_PATH. All created objects will be returned in the list. |
|
Create and return an instance of the named itk object. Each loaded ObjectFactoryBase will be asked in the order the factory was in the ITK_AUTOLOAD_PATH. After the first factory returns the object no other factories are asked. |
|
This method is provioded by sub-classes of ObjectFactoryBase. It should create the named itk object or return 0 if that object is not supported by the factory implementation. |
|
Set all enable flags for the given class to 0. This will mean that the factory will stop producing class with the given name. |
|
Run-time type information (and related methods). Reimplemented from itk::Object.
Reimplemented in itk::AnalyzeImageIOFactory, itk::Brains2MaskImageIOFactory, itk::DICOMImageIO2Factory, itk::DicomImageIOFactory, itk::GE4ImageIOFactory, itk::GE5ImageIOFactory, itk::GEAdwImageIOFactory, itk::GiplImageIOFactory, itk::JPEGImageIOFactory, itk::MetaImageIOFactory, itk::PNGImageIOFactory, itk::RawImageIOFactory< TPixel, VImageDimension >, itk::SiemensVisionImageIOFactory, itk::StimulateImageIOFactory, itk::TIFFImageIOFactory, and itk::VTKImageIOFactory.
|
|
Return a list of descriptions for class overrides. |
|
Return a list of classes that this factory overrides. |
|
Return a list of the names of classes that override classes. |
|
|
Get the Enable flag for the specific override of className. |
|
Return a list of enable flags. |
|
All sub-classes of ObjectFactoryBase should must return the version of ITK they were built with. This should be implemented with the macro ITK_SOURCE_VERSION and NOT a call to Version::GetITKSourceVersion. As the version needs to be compiled into the file as a string constant. This is critical to determine possible incompatible dynamic factory loads. Implemented in itk::AnalyzeImageIOFactory, itk::Brains2MaskImageIOFactory, itk::DICOMImageIO2Factory, itk::DicomImageIOFactory, itk::GE4ImageIOFactory, itk::GE5ImageIOFactory, itk::GEAdwImageIOFactory, itk::GiplImageIOFactory, itk::JPEGImageIOFactory, itk::MetaImageIOFactory, itk::PNGImageIOFactory, itk::RawImageIOFactory< TPixel, VImageDimension >, itk::SiemensVisionImageIOFactory, itk::StimulateImageIOFactory, itk::TIFFImageIOFactory, and itk::VTKImageIOFactory.
|
|
This returns the path to a dynamically loaded factory. |
|
Return the list of all registered factories. This is NOT a copy, do not remove items from this list! |
|
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from itk::Object.
Reimplemented in itk::AnalyzeImageIOFactory, itk::GE4ImageIOFactory, itk::GE5ImageIOFactory, itk::GEAdwImageIOFactory, and itk::SiemensVisionImageIOFactory.
|
|
Register a factory so it can be used to create itk objects. |
|
Register object creation information with the factory. |
|
Re-check the ITK_AUTOLOAD_PATH for new factory libraries. This calls UnRegisterAll before re-loading. |
|
Set the Enable flag for the specific override of className. |
|
Unregister all factories. |
|
Remove a factory from the list of registered factories. |