Medical Imaging Interaction Toolkit  2016.11.0
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,
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 
20 #include <mitkCoreObjectFactory.h>
21 
23 {
24 }
25 
27 {
28 }
29 
31 {
32  Mapper::Pointer mapper;
33 
34  if (dynamic_cast<GeometryData *>(node->GetData()) != nullptr)
35  {
36  if (slotId == BaseRenderer::Standard2D)
37  {
39  }
40  else if (slotId == BaseRenderer::Standard3D)
41  {
43  }
44 
45  if (mapper.IsNotNull())
46  mapper->SetDataNode(node);
47  }
48 
49  return mapper;
50 }
51 
53 {
54  return "BoundingShape Object Factory";
55 }
56 
58 {
59  return nullptr;
60 }
61 
63 {
64  return MultimapType();
65 }
66 
68 {
69  return nullptr;
70 }
71 
73 {
74  return MultimapType();
75 }
76 
78 {
79  if (node == nullptr)
80  return;
81 
82  if (dynamic_cast<GeometryData *>(node->GetData()) != nullptr)
83  {
86  }
87 }
88 
90 {
91  static bool alreadyRegistered = false;
92 
93  if (!alreadyRegistered)
94  {
96  alreadyRegistered = true;
97  }
98 }
std::multimap< std::string, std::string > MultimapType
virtual CoreObjectFactoryBase::MultimapType GetFileExtensionsMap() override
virtual CoreObjectFactoryBase::MultimapType GetSaveFileExtensionsMap() override
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
virtual Mapper::Pointer CreateMapper(DataNode *node, MapperSlotId slotId) override
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
MITKBOUNDINGSHAPE_EXPORT void RegisterBoundingShapeObjectFactory()
virtual const char * GetDescription() const override
virtual const char * GetSaveFileExtensions() override
virtual void SetDefaultProperties(DataNode *node) override
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
virtual const char * GetFileExtensions() override
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.