Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkFiberTrackingObjectFactory.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 
22 {
23 }
24 
26 {
27 }
28 
30 {
31  mitk::Mapper::Pointer newMapper=NULL;
32 
34  {
35  std::string classname("FiberBundle");
36  if(node->GetData() && classname.compare(node->GetData()->GetNameOfClass())==0)
37  {
38  newMapper = mitk::FiberBundleMapper2D::New();
39  newMapper->SetDataNode(node);
40  }
41 
42  }
43  else if ( id == mitk::BaseRenderer::Standard3D )
44  {
45  std::string classname("FiberBundle");
46  if(node->GetData() && classname.compare(node->GetData()->GetNameOfClass())==0)
47  {
48  newMapper = mitk::FiberBundleMapper3D::New();
49  newMapper->SetDataNode(node);
50  }
51  }
52 
53  return newMapper;
54 }
55 
57 {
58  std::string classname("FiberBundle");
59  if(node->GetData() && classname.compare(node->GetData()->GetNameOfClass())==0)
60  {
63  }
64 }
65 
67 {
68  std::string fileExtension;
69  this->CreateFileExtensions(m_FileExtensionsMap, fileExtension);
70  return fileExtension.c_str();
71 }
72 
74 {
75  return m_FileExtensionsMap;
76 }
77 
79 {
80  std::string fileExtension;
81  this->CreateFileExtensions(m_SaveFileExtensionsMap, fileExtension);
82  return fileExtension.c_str();
83 }
84 
86 {
87  return m_SaveFileExtensionsMap;
88 }
89 
90 void mitk::FiberTrackingObjectFactory::CreateFileExtensionsMap()
91 {
92 
93 }
94 
96 {
97 }
98 
99 struct RegisterFiberTrackingObjectFactory{
100  RegisterFiberTrackingObjectFactory()
101  : m_Factory( mitk::FiberTrackingObjectFactory::New() )
102  {
103  mitk::CoreObjectFactory::GetInstance()->RegisterExtraFactory( m_Factory );
104  }
105 
106  ~RegisterFiberTrackingObjectFactory()
107  {
108  mitk::CoreObjectFactory::GetInstance()->UnRegisterExtraFactory( m_Factory );
109  }
110 
112 };
113 
114 static RegisterFiberTrackingObjectFactory registerFiberTrackingObjectFactory;
static Pointer New()
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=NULL, bool overwrite=false)
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=NULL, bool overwrite=false)
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 * GetFileExtensions() override
virtual void SetDefaultProperties(mitk::DataNode *node) override
static RegisterFiberTrackingObjectFactory registerFiberTrackingObjectFactory
virtual const char * GetSaveFileExtensions() override
virtual Mapper::Pointer CreateMapper(mitk::DataNode *node, MapperSlotId slotId) override
virtual mitk::CoreObjectFactoryBase::MultimapType GetFileExtensionsMap() 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
virtual mitk::CoreObjectFactoryBase::MultimapType GetSaveFileExtensionsMap() override
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.