Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkTbssRoiImage.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 
18 #ifndef __mitkTbssRoiImage__h
19 #define __mitkTbssRoiImage__h
20 
21 #include "mitkImage.h"
22 #include "itkImage.h"
23 #include "mitkImageCast.h"
24 #include "MitkQuantificationExports.h"
25 
26 namespace mitk
27 {
28 
34  class MITKQUANTIFICATION_EXPORT TbssRoiImage : public Image
35  {
36 
37  public:
38 
39  typedef itk::Image<unsigned char, 3> ImageType;
41  //typedef typename std::vector <Index<3> > RoiType;
42 
44  itkFactorylessNewMacro(Self)
45  itkCloneMacro(Self)
46 
47 
48  //void SetRequestedRegionToLargestPossibleRegion();
49  //bool RequestedRegionIsOutsideOfTheBufferedRegion();
50  //virtual bool VerifyRequestedRegion();
51  //void SetRequestedRegion( const itk::DataObject *data);
52 
53  ImageType::Pointer GetImage()
54  {
55  return m_Image;
56  }
58  {
59  this->m_Image = image;
60  }
61 
62  itkGetMacro(PreprocessedFA, bool)
63  itkSetMacro(PreprocessedFA, bool)
64  itkGetMacro(PreprocessedFAFile, std::string)
65  itkSetMacro(PreprocessedFAFile, std::string)
66  itkGetMacro(Structure, std::string)
67  itkSetMacro(Structure, std::string)
68 
69  void SetRoi(std::vector< itk::Index<3> > roi)
70  {
71  m_Roi = roi;
72  }
73 
74 
75  // depricated
76  std::vector< itk::Index<3> > GetRoi()
77  {
78  return m_Roi;
79  }
80 
81 
83  {
84  MITK_INFO << "make an mitk image that can be shown by mitk";
85  this->InitializeByItk(m_Image.GetPointer());
86 
87  this->SetChannel(m_Image->GetBufferPointer());
88  }
89 
90 
91 
92 
93  protected:
94 
95  TbssRoiImage();
96 
97  virtual ~TbssRoiImage(){}
98 
100 
101  std::vector< itk::Index<3> > m_Roi;
102 
104  std::string m_PreprocessedFAFile;
105 
106  std::string m_Structure;
107 
108 
109  };
110 
111 
112  // Does the same es the normal CastToMitkImage, but needed to reimplemented due to the templatet pixeltype
113  /*
114  template <typename ItkOutputImageType>
115  void CastToTbssImage(const ItkOutputImageType* itkimage, itk::SmartPointer< mitk::TbssRoiImage >& tbssoutputimage)
116  {
117  if(tbssoutputimage.IsNull())
118  {
119  tbssoutputimage = mitk::TbssRoiImage::New();
120  }
121  tbssoutputimage->InitializeByItk(itkimage);
122  tbssoutputimage->SetChannel(itkimage->GetBufferPointer());
123  }
124 */
125 
126 
127 
128 
129 
130 } // namespace mitk
131 
132 //#include "mitkTbssRoiImage.cpp"
133 #endif /* __mitkTbssRoiImage__h */
void SetImage(ImageType::Pointer image)
itk::SmartPointer< Self > Pointer
this class encapsulates diffusion volumes (vectorimages not yet supported by mitkImage) ...
#define MITK_INFO
Definition: mitkLogMacros.h:22
Base of all data objects.
Definition: mitkBaseData.h:39
std::vector< itk::Index< 3 > > m_Roi
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
ImageType::Pointer m_Image
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
std::vector< itk::Index< 3 > > GetRoi()
std::string m_PreprocessedFAFile
itk::Image< unsigned char, 3 > ImageType
Image class for storing images.
Definition: mitkImage.h:76
itk::Index< 3 > IndexType