Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
Medical Imaging Interaction Toolkit
mitkRegEvaluationObjectFactory.cpp
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 
14 
15 #include <mitkProperties.h>
16 #include <mitkBaseRenderer.h>
17 #include <mitkDataNode.h>
18 
20 
21 typedef std::multimap<std::string, std::string> MultimapType;
22 
25 {
26  static bool alreadyDone = false;
27  if (!alreadyDone)
28  {
29  alreadyDone = true;
30  }
31 
32 }
33 
35 {
36 }
37 
41 {
42  mitk::Mapper::Pointer newMapper = nullptr;
43 
44  if ( slotId == mitk::BaseRenderer::Standard2D )
45  {
46  std::string classname("RegEvaluationObject");
47  if(node->GetData() && classname.compare(node->GetData()->GetNameOfClass())==0)
48  {
50  newMapper->SetDataNode(node);
51  }
52  }
53 
54  return newMapper;
55 };
56 
58 {
59 
60 }
61 
63 {
64  //return empty (dummy) extension string
65  return m_FileExtensions.c_str();
66 };
67 
69 {
71 }
72 
74 {
75  //return empty (dummy) extension string
76  return m_FileExtensions.c_str();
77 }
78 
80 {
82 }
83 
85 {
86 }
87 
88 struct RegisterRegEvaluationObjectFactoryHelper{
89  RegisterRegEvaluationObjectFactoryHelper()
91  {
92  mitk::CoreObjectFactory::GetInstance()->RegisterExtraFactory( m_Factory );
93  }
94 
95  ~RegisterRegEvaluationObjectFactoryHelper()
96  {
97  mitk::CoreObjectFactory::GetInstance()->UnRegisterExtraFactory( m_Factory );
98  }
99 
101 };
102 
103 static RegisterRegEvaluationObjectFactoryHelper registerMITKRegistrationWrapperIOFactoryHelper;
std::multimap< std::string, std::string > MultimapType
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
mitk::CoreObjectFactoryBase::MultimapType GetFileExtensionsMap() override
static RegisterRegEvaluationObjectFactoryHelper registerMITKRegistrationWrapperIOFactoryHelper
mitk::Mapper::Pointer CreateMapper(mitk::DataNode *node, MapperSlotId slotId) override
void SetDefaultProperties(mitk::DataNode *node) override
mitk::CoreObjectFactoryBase::MultimapType GetSaveFileExtensionsMap() override
unsigned int MapperSlotId
Definition: mitkCommon.h:33
std::multimap< std::string, std::string > MultimapType
Class for nodes of the DataTree.
Definition: mitkDataNode.h:64