Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkBoundingShapeObjectFactory.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 
16 #include <mitkCoreObjectFactory.h>
17 
19 {
20 }
21 
23 {
24 }
25 
27 {
28  Mapper::Pointer mapper;
29 
30  if (dynamic_cast<GeometryData *>(node->GetData()) != nullptr)
31  {
32  if (slotId == BaseRenderer::Standard2D)
33  {
35  }
36  else if (slotId == BaseRenderer::Standard3D)
37  {
39  }
40 
41  if (mapper.IsNotNull())
42  mapper->SetDataNode(node);
43  }
44 
45  return mapper;
46 }
47 
49 {
50  return "BoundingShape Object Factory";
51 }
52 
54 {
55  return nullptr;
56 }
57 
59 {
60  return MultimapType();
61 }
62 
64 {
65  return nullptr;
66 }
67 
69 {
70  return MultimapType();
71 }
72 
74 {
75  if (node == nullptr)
76  return;
77 
78  if (dynamic_cast<GeometryData *>(node->GetData()) != nullptr)
79  {
82  }
83 }
84 
86 {
87  static bool alreadyRegistered = false;
88 
89  if (!alreadyRegistered)
90  {
92  alreadyRegistered = true;
93  }
94 }
CoreObjectFactoryBase::MultimapType GetFileExtensionsMap() override
CoreObjectFactoryBase::MultimapType GetSaveFileExtensionsMap() override
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
Mapper::Pointer CreateMapper(DataNode *node, MapperSlotId slotId) override
MITKBOUNDINGSHAPE_EXPORT void RegisterBoundingShapeObjectFactory()
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
void SetDefaultProperties(DataNode *node) override
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
unsigned int MapperSlotId
Definition: mitkCommon.h:33
std::multimap< std::string, std::string > MultimapType
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57