Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkConnectomicsObjectFactory.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 
17 
19 
22 
25 {
26  static bool alreadyDone = false;
27  if (!alreadyDone)
28  {
29  MITK_DEBUG << "ConnectomicsObjectFactory c'tor" << std::endl;
30 
31  alreadyDone = true;
32  }
33 
34 }
35 
37 {
38 }
39 
41 {
42  mitk::Mapper::Pointer newMapper=NULL;
43 
45  {
46  std::string classname("ConnectomicsNetwork");
47  if (node->GetData() && classname.compare(node->GetData()->GetNameOfClass())==0)
48  {
50  newMapper->SetDataNode(node);
51  }
52 
53  }
54 
55  return newMapper;
56 }
57 
59 {
60  std::string classname("ConnectomicsNetwork");
61  if(node->GetData() && classname.compare(node->GetData()->GetNameOfClass())==0)
62  {
64  }
65 }
66 
68 {
69  std::string fileExtension;
70  this->CreateFileExtensions(m_FileExtensionsMap, fileExtension);
71  return fileExtension.c_str();
72 };
73 
75 {
76  return m_FileExtensionsMap;
77 }
78 
80 {
81  std::string fileExtension;
82  this->CreateFileExtensions(m_SaveFileExtensionsMap, fileExtension);
83  return fileExtension.c_str();
84 };
85 
87 {
88  return m_SaveFileExtensionsMap;
89 }
90 
91 void mitk::ConnectomicsObjectFactory::CreateFileExtensionsMap()
92 {
93 }
94 
95 struct RegisterConnectomicsObjectFactory{
96  RegisterConnectomicsObjectFactory()
97  : m_Factory( mitk::ConnectomicsObjectFactory::New() )
98  {
99  mitk::CoreObjectFactory::GetInstance()->RegisterExtraFactory( m_Factory );
100  }
101 
102  ~RegisterConnectomicsObjectFactory()
103  {
104  mitk::CoreObjectFactory::GetInstance()->UnRegisterExtraFactory( m_Factory );
105  }
106 
108 };
109 
110 static RegisterConnectomicsObjectFactory registerDiffusionCoreObjectFactory;
virtual const char * GetFileExtensions() override
static RegisterConnectomicsObjectFactory registerDiffusionCoreObjectFactory
#define MITK_DEBUG
Definition: mitkLogMacros.h:26
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 const char * GetSaveFileExtensions() override
virtual mitk::CoreObjectFactoryBase::MultimapType GetSaveFileExtensionsMap() override
virtual void SetDefaultProperties(mitk::DataNode *node) override
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
virtual mitk::CoreObjectFactoryBase::MultimapType GetFileExtensionsMap() override
virtual Mapper::Pointer CreateMapper(mitk::DataNode *node, MapperSlotId slotId) 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.