Page MenuHomePhabricator

Extending the MITK Factory Mechanism
Closed, ResolvedPublic

Assigned To
Authored By
Oct 12 2009, 10:02 AM
Referenced Files
F334: modification_coreObjectFactory.diff
Oct 12 2009, 10:03 AM
F333: ChangeRequest.txt
Oct 12 2009, 10:03 AM


Modules cannot properly register their file readers and writers in order to provide their on file format. CoreObjectFactory should provide a mechanism to register factories.

Event Timeline

fritzsck added a subscriber: fritzsck.

change request for CoreObjectFactory

core modification patch for coreObjectFactory

Ok, after some discussions we agreed we use this as a first fix, rework of factory mechanism well be resolved in a new T2807. But can you please create a test in your module that checks whether your factory is successfully registered and used?

could you please allow the corresponding commit?

Currently the SB-factory is not aware of the filenames that were registered to CoreObjectFactory.

[SVN revision 20071]
FIX (#2648): The mitk::CoreObjectFactory now provides a method RegisterExtraFactory() to register addtional factories. These are stored in a list member variable and queried when SetDefaultProperties(), CreateMapper(), GetFileExtensions(), GetSaveFileExtensions() or GetFileWriters() is called. All filewriters that belong to the extra factories need to be appended to m_FileWriters, a new member of the base class CoreObjectFactoryBase. Complete rework of factory mechanism is planned in T2807.