ITK
5.2.0
Insight Toolkit
|
#include <itkObjectFactoryBase.h>
Classes | |
class | OverrideInformation |
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | InsertionPositionEnum = ObjectFactoryEnums::InsertionPosition |
using | Pointer = SmartPointer< Self > |
using | Self = ObjectFactoryBase |
using | Superclass = Object |
Public Types inherited from itk::Object | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = Object |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
Public Member Functions | |
virtual const char * | GetNameOfClass () const |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *) |
unsigned long | AddObserver (const EventObject &event, Command *) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
static std::list< LightObject::Pointer > | CreateAllInstance (const char *itkclassname) |
static LightObject::Pointer | CreateInstance (const char *itkclassname) |
static void | RegisterFactoryInternal (ObjectFactoryBase *) |
static void | ReHash () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
OverRideMap * | m_OverrideMap |
void * | m_LibraryHandle |
unsigned long | m_LibraryDate |
std::string | m_LibraryPath |
static ObjectFactoryBasePrivate * | m_PimplGlobals |
virtual const char * | GetITKSourceVersion () const =0 |
virtual const char * | GetDescription () 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 bool | RegisterFactory (ObjectFactoryBase *, InsertionPositionEnum where=InsertionPositionEnum::INSERT_AT_BACK, vcl_size_t position=0) |
static void | UnRegisterFactory (ObjectFactoryBase *) |
static void | UnRegisterAllFactories () |
static std::list< ObjectFactoryBase * > | GetRegisteredFactories () |
static void | SetStrictVersionChecking (bool) |
static void | StrictVersionCheckingOn () |
static void | StrictVersionCheckingOff () |
static bool | GetStrictVersionChecking () |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | RegisterOverride (const char *classOverride, const char *subclass, const char *description, bool enableFlag, CreateObjectFunctionBase *createFunction) |
virtual LightObject::Pointer | CreateObject (const char *itkclassname) |
virtual std::list< LightObject::Pointer > | CreateAllObject (const char *itkclassname) |
ObjectFactoryBase () | |
~ObjectFactoryBase () override | |
static void | SynchronizeObjectFactoryBase (void *objectFactoryBasePrivate) |
static void | InitializeFactoryList () |
static void | Initialize () |
static void | RegisterInternal () |
static void | LoadDynamicFactories () |
static void | LoadLibrariesInPath (const char *) |
static void | DeleteNonInternalFactory (ObjectFactoryBase *) |
itkGetGlobalDeclarationMacro (ObjectFactoryBasePrivate, PimplGlobals) | |
Additional Inherited Members | |
Protected Member Functions inherited from itk::Object | |
Object () | |
~Object () override | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount |
Create instances of classes using an object factory.
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 override the creation of any object in ITK.
Definition at line 62 of file itkObjectFactoryBase.h.
using itk::ObjectFactoryBase::ConstPointer = SmartPointer<const Self> |
Definition at line 71 of file itkObjectFactoryBase.h.
Definition at line 105 of file itkObjectFactoryBase.h.
Definition at line 70 of file itkObjectFactoryBase.h.
Standard class type aliases.
Definition at line 68 of file itkObjectFactoryBase.h.
Definition at line 69 of file itkObjectFactoryBase.h.
|
protected |
Member variables for a factory set by the base class at load or register time
|
overrideprotected |
Member variables for a factory set by the base class at load or register time
|
static |
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.
|
protectedvirtual |
This method creates all the objects with the class override of itkclass name, which are provide by this object
|
static |
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.
Referenced by itk::ObjectFactory< T >::Create(), and itk::TransformFactoryBase::RegisterTransform().
|
protectedvirtual |
This method is provided 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.
|
staticprivate |
Member variables for a factory set by the base class at load or register time
|
virtual |
Set all enable flags for the given class to 0. This will mean that the factory will stop producing class with the given name.
|
virtual |
Return a list of descriptions for class overrides.
|
virtual |
Return a list of classes that this factory overrides.
|
virtual |
Return a list of the names of classes that override classes.
|
pure virtual |
Return a descriptive string describing the factory.
Implemented in itk::GPUImageFactory, itk::RawImageIOFactory< TPixel, VImageDimension >, itk::GPUBinaryThresholdImageFilterFactory, itk::GPUDemonsRegistrationFilterFactory, itk::GPUMeanImageFilterFactory, itk::MRCImageIOFactory, itk::JPEG2000ImageIOFactory, itk::SpatialObjectFactoryBase, itk::VTKImageIOFactory, itk::BioRadImageIOFactory, itk::LSMImageIOFactory, itk::MINCImageIOFactory, itk::StimulateImageIOFactory, itk::TransformFactoryBase, itk::Bruker2dseqImageIOFactory, itk::VoxBoCUBImageIOFactory, itk::HDF5ImageIOFactory, itk::JPEGImageIOFactory, itk::NiftiImageIOFactory, itk::PNGImageIOFactory, itk::TIFFImageIOFactory, itk::GPUGradientAnisotropicDiffusionImageFilterFactory, itk::GE4ImageIOFactory, itk::GE5ImageIOFactory, itk::GEAdwImageIOFactory, itk::SiemensVisionImageIOFactory, itk::FileListVideoIOFactory, itk::BMPImageIOFactory, itk::GDCMImageIOFactory, itk::GiplImageIOFactory, itk::BYUMeshIOFactory, itk::OBJMeshIOFactory, itk::OFFMeshIOFactory, itk::VTKPolyDataMeshIOFactory, itk::MetaImageIOFactory, itk::NrrdImageIOFactory, itk::DCMTKImageIOFactory, itk::HDF5TransformIOFactory, itk::MatlabTransformIOFactory, itk::VXLVideoIOFactory, itk::FreeSurferAsciiMeshIOFactory, itk::FreeSurferBinaryMeshIOFactory, itk::GiftiMeshIOFactory, itk::TxtTransformIOFactory, and itk::OpenCVVideoIOFactory.
|
virtual |
Get the Enable flag for the specific override of className.
|
virtual |
Return a list of enable flags.
|
pure virtual |
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::GPUImageFactory, itk::RawImageIOFactory< TPixel, VImageDimension >, itk::GPUBinaryThresholdImageFilterFactory, itk::GPUDemonsRegistrationFilterFactory, itk::GPUMeanImageFilterFactory, itk::MRCImageIOFactory, itk::JPEG2000ImageIOFactory, itk::SpatialObjectFactoryBase, itk::VTKImageIOFactory, itk::BioRadImageIOFactory, itk::LSMImageIOFactory, itk::MINCImageIOFactory, itk::StimulateImageIOFactory, itk::TransformFactoryBase, itk::Bruker2dseqImageIOFactory, itk::VoxBoCUBImageIOFactory, itk::HDF5ImageIOFactory, itk::JPEGImageIOFactory, itk::NiftiImageIOFactory, itk::PNGImageIOFactory, itk::TIFFImageIOFactory, itk::GE4ImageIOFactory, itk::GE5ImageIOFactory, itk::GEAdwImageIOFactory, itk::SiemensVisionImageIOFactory, itk::FileListVideoIOFactory, itk::BMPImageIOFactory, itk::GDCMImageIOFactory, itk::GiplImageIOFactory, itk::BYUMeshIOFactory, itk::OBJMeshIOFactory, itk::OFFMeshIOFactory, itk::VTKPolyDataMeshIOFactory, itk::MetaImageIOFactory, itk::NrrdImageIOFactory, itk::DCMTKImageIOFactory, itk::HDF5TransformIOFactory, itk::MatlabTransformIOFactory, itk::VXLVideoIOFactory, itk::FreeSurferAsciiMeshIOFactory, itk::FreeSurferBinaryMeshIOFactory, itk::GiftiMeshIOFactory, itk::GPUGradientAnisotropicDiffusionImageFilterFactory, itk::TxtTransformIOFactory, and itk::OpenCVVideoIOFactory.
const char* itk::ObjectFactoryBase::GetLibraryPath | ( | ) |
This returns the path to a dynamically loaded factory.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::Object.
Reimplemented in itk::GPUImageFactory, itk::RawImageIOFactory< TPixel, VImageDimension >, itk::GPUBinaryThresholdImageFilterFactory, itk::GPUDemonsRegistrationFilterFactory, itk::GPUMeanImageFilterFactory, itk::JPEG2000ImageIOFactory, itk::MRCImageIOFactory, itk::VTKImageIOFactory, itk::BioRadImageIOFactory, itk::LSMImageIOFactory, itk::MINCImageIOFactory, itk::StimulateImageIOFactory, itk::SpatialObjectFactoryBase, itk::Bruker2dseqImageIOFactory, itk::JPEGImageIOFactory, itk::PNGImageIOFactory, itk::TIFFImageIOFactory, itk::TransformFactoryBase, itk::GPUGradientAnisotropicDiffusionImageFilterFactory, itk::VoxBoCUBImageIOFactory, itk::HDF5ImageIOFactory, itk::NiftiImageIOFactory, itk::GE4ImageIOFactory, itk::GE5ImageIOFactory, itk::GEAdwImageIOFactory, itk::SiemensVisionImageIOFactory, itk::FileListVideoIOFactory, itk::OpenCVVideoIOFactory, itk::BMPImageIOFactory, itk::GDCMImageIOFactory, itk::GiplImageIOFactory, itk::BYUMeshIOFactory, itk::OBJMeshIOFactory, itk::OFFMeshIOFactory, itk::VTKPolyDataMeshIOFactory, itk::MetaImageIOFactory, itk::NrrdImageIOFactory, itk::DCMTKImageIOFactory, itk::HDF5TransformIOFactory, itk::MatlabTransformIOFactory, itk::VXLVideoIOFactory, itk::FreeSurferAsciiMeshIOFactory, itk::FreeSurferBinaryMeshIOFactory, itk::GiftiMeshIOFactory, and itk::TxtTransformIOFactory.
|
static |
Return the list of all registered factories. This is NOT a copy, do not remove items from this list!
|
static |
Member variables for a factory set by the base class at load or register time
|
staticprivate |
Initialize the static members of ObjectFactoryBase. RegisterInternal() and InitializeFactoryList() are called here.
|
staticprivate |
Initialize the static list of Factories.
|
private |
Member variables for a factory set by the base class at load or register time
|
staticprivate |
Load dynamic factories from the ITK_AUTOLOAD_PATH
|
staticprivate |
Load all dynamic libraries in the given path
|
overrideprotectedvirtual |
Member variables for a factory set by the base class at load or register time
Reimplemented from itk::Object.
Reimplemented in itk::HDF5ImageIOFactory, itk::BYUMeshIOFactory, itk::OBJMeshIOFactory, itk::OFFMeshIOFactory, itk::VTKPolyDataMeshIOFactory, itk::NiftiImageIOFactory, itk::GE4ImageIOFactory, itk::GE5ImageIOFactory, itk::GEAdwImageIOFactory, itk::SiemensVisionImageIOFactory, itk::FreeSurferAsciiMeshIOFactory, itk::FreeSurferBinaryMeshIOFactory, itk::GiftiMeshIOFactory, itk::HDF5TransformIOFactory, itk::MatlabTransformIOFactory, and itk::TxtTransformIOFactory.
|
static |
Register a factory so it can be used to create itk objects.
When InsertionPositionEnum::INSERT_AT_POSITION is selected, a third argument must be provided with the actual integer number of the intended position. The position number must be in the range [0, numberOfRegisteredFactories-1]. Usage should be any of the following: itk::ObjectFactoryBase::RegisterFactory( newFactory1 ); // at back itk::ObjectFactoryBase::RegisterFactory( newFactory2, InsertionPositionEnum::INSERT_AT_FRONT ); itk::ObjectFactoryBase::RegisterFactory( newFactory3, InsertionPositionEnum::INSERT_AT_BACK ); itk::ObjectFactoryBase::RegisterFactory( newFactory4, InsertionPositionEnum::INSERT_AT_POSITION, 5 ); If the position value is out of range, an exception will be thrown. Returns true if the factory was successfully registered. Returns false if factory is already loaded.
Referenced by itk::SpatialObjectFactoryBase::GetFactory(), ProcessArgumentsAndRegisterBuiltInFactories(), itk::VoxBoCUBImageIOFactory::RegisterOneFactory(), itk::GPUGradientAnisotropicDiffusionImageFilterFactory::RegisterOneFactory(), itk::GPUMeanImageFilterFactory::RegisterOneFactory(), itk::GPUDemonsRegistrationFilterFactory::RegisterOneFactory(), itk::GPUBinaryThresholdImageFilterFactory::RegisterOneFactory(), itk::RawImageIOFactory< TPixel, VImageDimension >::RegisterOneFactory(), and itk::GPUImageFactory::RegisterOneFactory().
|
static |
Register a factory so it can be used to create itk objects. This method is intended to be called only for built-in default factories, not for loadable factories.
Factories that are registered with this method will be registered after ReHash.
Referenced by itk::FreeSurferAsciiMeshIOFactory::RegisterOneFactory(), itk::FreeSurferBinaryMeshIOFactory::RegisterOneFactory(), itk::TxtTransformIOFactory::RegisterOneFactory(), itk::GiftiMeshIOFactory::RegisterOneFactory(), itk::BYUMeshIOFactory::RegisterOneFactory(), itk::HDF5TransformIOFactory::RegisterOneFactory(), itk::VTKPolyDataMeshIOFactory::RegisterOneFactory(), itk::GDCMImageIOFactory::RegisterOneFactory(), itk::VXLVideoIOFactory::RegisterOneFactory(), itk::DCMTKImageIOFactory::RegisterOneFactory(), itk::OFFMeshIOFactory::RegisterOneFactory(), itk::MatlabTransformIOFactory::RegisterOneFactory(), itk::MetaImageIOFactory::RegisterOneFactory(), itk::BMPImageIOFactory::RegisterOneFactory(), itk::NrrdImageIOFactory::RegisterOneFactory(), itk::OBJMeshIOFactory::RegisterOneFactory(), itk::GiplImageIOFactory::RegisterOneFactory(), itk::GEAdwImageIOFactory::RegisterOneFactory(), itk::OpenCVVideoIOFactory::RegisterOneFactory(), itk::GE4ImageIOFactory::RegisterOneFactory(), itk::GE5ImageIOFactory::RegisterOneFactory(), itk::NiftiImageIOFactory::RegisterOneFactory(), itk::FileListVideoIOFactory::RegisterOneFactory(), itk::SiemensVisionImageIOFactory::RegisterOneFactory(), itk::HDF5ImageIOFactory::RegisterOneFactory(), itk::TIFFImageIOFactory::RegisterOneFactory(), itk::JPEGImageIOFactory::RegisterOneFactory(), itk::PNGImageIOFactory::RegisterOneFactory(), itk::Bruker2dseqImageIOFactory::RegisterOneFactory(), itk::StimulateImageIOFactory::RegisterOneFactory(), itk::MINCImageIOFactory::RegisterOneFactory(), itk::VTKImageIOFactory::RegisterOneFactory(), itk::BioRadImageIOFactory::RegisterOneFactory(), itk::LSMImageIOFactory::RegisterOneFactory(), itk::MRCImageIOFactory::RegisterOneFactory(), and itk::JPEG2000ImageIOFactory::RegisterOneFactory().
|
staticprivate |
Register default factories which are not loaded at run time.
|
protected |
Register object creation information with the factory.
Referenced by itk::TransformFactoryBase::RegisterTransform().
|
static |
Re-check the ITK_AUTOLOAD_PATH for new factory libraries. This calls UnRegisterAll before re-loading.
|
virtual |
Set the Enable flag for the specific override of className.
|
static |
Require the ITK version of this application to exactly match the ITK version used to compile a dynamic library. When this is set to true, if the versions do not match, an exception will be thrown. When this is false, and the versions do not match, only a warning message is printed out in the console, and the factory is still registered.
|
static |
Member variables for a factory set by the base class at load or register time
|
static |
Member variables for a factory set by the base class at load or register time
|
staticprivate |
Set/Get the pointer to ObjectFactoryBasePrivate. No concurrent thread safe.
|
static |
Unregister all factories.
|
static |
Remove a factory from the list of registered factories.
|
private |
Member variables for a factory set by the base class at load or register time
Definition at line 288 of file itkObjectFactoryBase.h.
|
private |
Member variables for a factory set by the base class at load or register time
Definition at line 287 of file itkObjectFactoryBase.h.
|
private |
Member variables for a factory set by the base class at load or register time
Definition at line 289 of file itkObjectFactoryBase.h.
|
private |
Member variables for a factory set by the base class at load or register time
Definition at line 259 of file itkObjectFactoryBase.h.
|
staticprivate |
Member variables for a factory set by the base class at load or register time
Definition at line 291 of file itkObjectFactoryBase.h.