Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkCoreObjectFactoryBase.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkCoreObjectFactoryBase_h
14 #define mitkCoreObjectFactoryBase_h
15 
16 // the mitkLog.h header is necessary for CMake test drivers.
17 // Since the EXTRA_INCLUDE parameter of CREATE_TEST_SOURCELIST only
18 // allows one extra include file, we specify mitkLog.h here so it will
19 // be available to all classes implementing this interface.
20 #include <mitkLog.h>
21 
23 #include "mitkMapper.h"
24 #include <MitkCoreExports.h>
25 #include <itkObjectFactoryBase.h>
26 #include <itkVersion.h>
27 
28 namespace mitk
29 {
30  class DataNode;
31 
32  //## @brief base-class for factories of certain mitk objects.
33  //## @ingroup Algorithms
34  //## This interface can be implemented by factories which add new mapper classes or extend the
35  //## data tree deserialization mechanism.
36 
37  class MITKCORE_EXPORT CoreObjectFactoryBase : public itk::Object
38  {
39  public:
40  typedef std::list<mitk::FileWriterWithInformation::Pointer> FileWriterList;
41  typedef std::multimap<std::string, std::string> MultimapType;
42 
44 
45  virtual Mapper::Pointer CreateMapper(mitk::DataNode *node, MapperSlotId slotId) = 0;
46  virtual void SetDefaultProperties(mitk::DataNode *node) = 0;
47 
51  virtual std::string GetFileExtensions() = 0;
52 
56  virtual MultimapType GetFileExtensionsMap() = 0;
57 
61  virtual std::string GetSaveFileExtensions() = 0;
62 
66  virtual MultimapType GetSaveFileExtensionsMap() = 0;
67 
68  virtual const char *GetITKSourceVersion() const { return ITK_SOURCE_VERSION; }
69  virtual const char *GetDescription() const { return "Core Object Factory"; }
73  FileWriterList GetFileWriters() { return m_FileWriters; }
74  protected:
84  static void CreateFileExtensions(MultimapType fileExtensionsMap, std::string &fileExtensions);
85 
87 
88  friend class CoreObjectFactory;
89  };
90 }
91 #endif
mitk::CoreObjectFactoryBase::GetITKSourceVersion
virtual const char * GetITKSourceVersion() const
Definition: mitkCoreObjectFactoryBase.h:68
mitk::CoreObjectFactoryBase::GetDescription
virtual const char * GetDescription() const
Definition: mitkCoreObjectFactoryBase.h:69
itk::SmartPointer< Self >
mitk::CoreObjectFactoryBase::GetFileWriters
FileWriterList GetFileWriters()
Definition: mitkCoreObjectFactoryBase.h:73
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkMapper.h
MitkCoreExports.h
mitkLog.h
mitkFileWriterWithInformation.h
mitk::CoreObjectFactory
Definition: mitkCoreObjectFactory.h:28
mitk::CoreObjectFactoryBase::FileWriterList
std::list< mitk::FileWriterWithInformation::Pointer > FileWriterList
Definition: mitkCoreObjectFactoryBase.h:40
MapperSlotId
unsigned int MapperSlotId
Definition: mitkCommon.h:29
mitk::CoreObjectFactoryBase
Definition: mitkCoreObjectFactoryBase.h:37
mitk::CoreObjectFactoryBase::MultimapType
std::multimap< std::string, std::string > MultimapType
Definition: mitkCoreObjectFactoryBase.h:41
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
mitk::ROIMapperHelper::SetDefaultProperties
void SetDefaultProperties(DataNode *node, BaseRenderer *renderer, bool override)
Set common default properties for both 2-d and 3-d ROI mappers.
mitk::CoreObjectFactoryBase::m_FileWriters
FileWriterList m_FileWriters
Definition: mitkCoreObjectFactoryBase.h:86