Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkNrrdTbssRoiImageReader.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 __mitkNrrdTbssRoiImageReader_h
18 #define __mitkNrrdTbssRoiImageReader_h
19 
20 #include "mitkCommon.h"
21 #include "mitkFileReader.h"
22 #include "mitkTbssRoiImageSource.h"
23 #include "itkImage.h"
24 #include "mitkTbssRoiImage.h"
25 
26 namespace mitk
27 {
28 
33  class MITKQUANTIFICATION_EXPORT NrrdTbssRoiImageReader : public mitk::TbssRoiImageSource, public FileReader
34  {
35  public:
36 
38  typedef itk::Image<unsigned char,3> ImageType;
40 
41 
42 
43  mitkClassMacro( NrrdTbssRoiImageReader, TbssVolSourceType )
44  itkFactorylessNewMacro(Self)
45  itkCloneMacro(Self)
46 
47  const char* GetFileName() const override;
48  void SetFileName(const char* aFileName) override;
49  const char* GetFilePrefix() const override;
50  void SetFilePrefix(const char* aFilePrefix) override;
51  const char* GetFilePattern() const override;
52  void SetFilePattern(const char* aFilePattern) override;
53 
54  static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern);
55 
56  protected:
57 
59  virtual void GenerateData() override;
60 
61  void ReadRoiInfo(itk::MetaDataDictionary dict);
62 
63  std::string m_FileName;
64  std::string m_FilePrefix;
65  std::string m_FilePattern;
66 
67  OutputType::Pointer m_OutputCache;
68  itk::TimeStamp m_CacheTime;
69 
70 
71 
72  private:
73  void operator=(const Self&); //purposely not implemented
74  };
75 
76 } //namespace MITK
77 
78 //#include "mitkNrrdTbssRoiImageReader.cpp"
79 
80 #endif // __mitkNrrdTbssImageReader_h
this class encapsulates diffusion volumes (vectorimages not yet supported by mitkImage) ...
Superclass of all classes generating some kind of mitk::BaseData.
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
itk::Image< unsigned char, 3 > ImageType
static const std::string filename
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Interface class of readers that read from files.
Superclass of all classes generating diffusion volumes (instances of class DiffusionImage) as output...