Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkDataNodeFactory.h
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 #ifndef _DATA_TREE_NODE_FACTORY_H_
18 #define _DATA_TREE_NODE_FACTORY_H_
19 
20 #include "mitkColorProperty.h"
21 #include "mitkDataNodeSource.h"
22 #include "mitkFileSeriesReader.h"
23 
24 #include <string>
25 #include <vtkConfigure.h>
26 
27 namespace mitk
28 {
44  {
45  public:
47 
48  DEPRECATED(itkFactorylessNewMacro(Self))
49  itkCloneMacro(Self)
50 
51 
55  itkSetStringMacro(FileName);
56 
60  itkGetStringMacro(FileName);
61 
65  itkSetStringMacro(FilePrefix);
66 
70  itkGetStringMacro(FilePrefix);
71 
75  itkSetStringMacro(FilePattern);
76 
80  itkGetStringMacro(FilePattern);
81 
85  static ColorProperty::Pointer DefaultColorForOrgan(const std::string &);
86 
87  void SetDefaultCommonProperties(mitk::DataNode::Pointer &node);
88 
92  void SetImageSerie(bool serie);
93 
94  void AddSeriesRestriction(const std::string &tag) { m_SeriesRestrictions.push_back(tag); }
96 
97  protected:
101  DataNodeFactory();
102 
106  virtual ~DataNodeFactory();
107 
108  bool m_Serie;
109 
114  virtual void GenerateData() override;
115 
121  virtual void ResizeOutputs(const unsigned int &num);
122 
130  virtual bool FileNameEndsWith(const std::string &name);
131 
139  virtual bool FilePatternEndsWith(const std::string &name);
140 
144  virtual std::string GetBaseFileName();
145 
149  virtual std::string GetBaseFilePrefix();
150 
154  virtual std::string GetDirectory();
155 
156 #ifdef MBI_INTERNAL
157  virtual void ReadFileTypeHPSONOS();
158 #ifdef HAVE_IPDICOM
159  virtual void ReadFileTypeIPDCM();
160 #endif /* HAVE_IPDICOM */
161 #ifdef USE_TUS_READER
162  virtual void ReadFileTypeTUS();
163 #endif
164 #endif /* MBI_INTERNAL */
165 
166  virtual void ReadFileSeriesTypeDCM();
167 
168  virtual void ReadFileSeriesTypeITKImageSeriesReader();
169 
170  std::vector<std::string> m_SeriesRestrictions;
172  };
173 }
174 
175 #endif //#ifndef __DATA_TREE_NODE_FACTORY_H
#define MITKLEGACYIO_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
static bool m_TextureInterpolationActive
Factory, which creates instances of mitk::DataNodes filled with data read from a given file...
#define DEPRECATED(func)
Definition: mitkCommon.h:183
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
void AddSeriesRestriction(const std::string &tag)
Superclass of all classes generating data tree nodes (instances of class mitk::DataNode) as output...
std::vector< std::string > m_SeriesRestrictions