Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
18 
19 #include <mitkProperties.h>
20 #include <mitkBaseRenderer.h>
21 #include <mitkDataNode.h>
22 
24 
25 typedef std::multimap<std::string, std::string> MultimapType;
26 
29 {
30  static bool alreadyDone = false;
31  if (!alreadyDone)
32  {
33  MITK_INFO << "RegEvaluationObjectFactory c'tor" << std::endl;
34 
35  alreadyDone = true;
36  }
37 
38 }
39 
41 {
42 }
43 
47 {
48  mitk::Mapper::Pointer newMapper = NULL;
49 
50  if ( slotId == mitk::BaseRenderer::Standard2D )
51  {
52  std::string classname("RegEvaluationObject");
53  if(node->GetData() && classname.compare(node->GetData()->GetNameOfClass())==0)
54  {
56  newMapper->SetDataNode(node);
57  }
58  }
59 
60  return newMapper;
61 };
62 
64 {
65 
66 }
67 
69 {
70  //return empty (dummy) extension string
71  return m_FileExtensions.c_str();
72 };
73 
75 {
77 }
78 
80 {
81  //return empty (dummy) extension string
82  return m_FileExtensions.c_str();
83 }
84 
86 {
88 }
89 
91 {
92 }
93 
94 struct RegisterRegEvaluationObjectFactoryHelper{
95  RegisterRegEvaluationObjectFactoryHelper()
96  : m_Factory( mitk::RegEvaluationObjectFactory::New() )
97  {
98  mitk::CoreObjectFactory::GetInstance()->RegisterExtraFactory( m_Factory );
99  }
100 
101  ~RegisterRegEvaluationObjectFactoryHelper()
102  {
103  mitk::CoreObjectFactory::GetInstance()->UnRegisterExtraFactory( m_Factory );
104  }
105 
107 };
108 
109 static RegisterRegEvaluationObjectFactoryHelper registerMITKRegistrationWrapperIOFactoryHelper;
#define MITK_INFO
Definition: mitkLogMacros.h:22
DataCollection - Class to facilitate loading/accessing structured data.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
virtual mitk::CoreObjectFactoryBase::MultimapType GetSaveFileExtensionsMap()
std::multimap< std::string, std::string > MultimapType
virtual mitk::CoreObjectFactoryBase::MultimapType GetFileExtensionsMap()
static RegisterRegEvaluationObjectFactoryHelper registerMITKRegistrationWrapperIOFactoryHelper
virtual mitk::Mapper::Pointer CreateMapper(mitk::DataNode *node, MapperSlotId slotId)
virtual void SetDefaultProperties(mitk::DataNode *node)
unsigned int MapperSlotId
Definition: mitkCommon.h:37
std::multimap< std::string, std::string > MultimapType
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.