Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkPAInSilicoTissueVolume.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKPHOTOACOUSTICVOLUME_H
14 #define MITKPHOTOACOUSTICVOLUME_H
15 
17 #include <mitkImage.h>
18 #include <mitkProperties.h>
20 #include <mitkPAVolume.h>
21 
22 //Includes for smart pointer usage
23 #include "mitkCommon.h"
24 #include "itkLightObject.h"
25 
26 namespace mitk {
27  namespace pa {
28  class MITKPHOTOACOUSTICSLIB_EXPORT InSilicoTissueVolume : public itk::LightObject
29  {
30  public:
32  mitkNewMacro2Param(Self, TissueGeneratorParameters::Pointer, std::mt19937*);
33 
35  {
36  AIR = -1,
37  BACKGROUND = 0,
38  VESSEL = 1,
39  FAT = 2,
40  SKIN = 3
41  };
42 
47  mitk::Image::Pointer ConvertToMitkImage();
48 
60  void SetVolumeValues(int x, int y, int z, double absorption, double scattering, double anisotropy, SegmentationType segmentType);
61 
72  void SetVolumeValues(int x, int y, int z, double absorption, double scattering, double anisotropy);
73 
82  bool IsInsideVolume(int x, int y, int z);
83 
90  void AddDoubleProperty(std::string label, double value);
91 
98  void AddIntProperty(std::string label, int value);
99 
100  Volume::Pointer GetAbsorptionVolume();
101  Volume::Pointer GetScatteringVolume();
102  Volume::Pointer GetAnisotropyVolume();
103  Volume::Pointer GetSegmentationVolume();
104 
105  void SetAbsorptionVolume(Volume::Pointer volume);
106  void SetScatteringVolume(Volume::Pointer volume);
107  void SetAnisotropyVolume(Volume::Pointer volume);
108  void SetSegmentationVolume(Volume::Pointer volume);
109 
110  double GetSpacing();
111  void SetSpacing(double spacing);
112 
113  void FinalizeVolume();
114  itkGetMacro(TissueParameters, TissueGeneratorParameters::Pointer);
115  itkGetMacro(TDim, unsigned int);
116 
117  static InSilicoTissueVolume::Pointer New(mitk::pa::Volume::Pointer absorptionVolume,
118  Volume::Pointer scatteringVolume,
119  Volume::Pointer anisotropyVolume,
120  Volume::Pointer segmentationVolume,
121  TissueGeneratorParameters::Pointer tissueParameters,
122  mitk::PropertyList::Pointer propertyList);
123 
124  protected:
125  InSilicoTissueVolume(TissueGeneratorParameters::Pointer parameters, std::mt19937* rng);
126  InSilicoTissueVolume(Volume::Pointer absorptionVolume,
127  Volume::Pointer scatteringVolume,
128  Volume::Pointer anisotropyVolume,
129  Volume::Pointer segmentationVolume,
130  TissueGeneratorParameters::Pointer tissueParameters,
131  mitk::PropertyList::Pointer propertyList);
132  ~InSilicoTissueVolume() override;
133 
134  mitk::pa::Volume::Pointer m_AbsorptionVolume;
135  mitk::pa::Volume::Pointer m_ScatteringVolume;
136  mitk::pa::Volume::Pointer m_AnisotropyVolume;
137  mitk::pa::Volume::Pointer m_SegmentationVolume;
138 
139  TissueGeneratorParameters::Pointer m_TissueParameters;
140 
141  unsigned int m_TDim;
142 
144 
145  std::mt19937* m_Rng;
146 
147  void RandomizeTissueCoefficients(long rngSeed, bool useRngSeed, double percentage);
148 
150 
151  private:
152  void FillZLayer(int x, int y, double startIdx, double endIdx,
153  double absorption, double scattering, double anisotropy,
154  SegmentationType segmentationType);
155  void AddSkinAndAirLayers();
156  void UpdatePropertyList();
157  };
158  }
159 }
160 #endif // MITKPHOTOACOUSTICVOLUME_H
mitk::pa::Volume::Pointer m_ScatteringVolume
mitk::pa::Volume::Pointer m_AnisotropyVolume
TissueGeneratorParameters::Pointer m_TissueParameters
mitk::PropertyList::Pointer m_PropertyList
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:85
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
mitk::pa::Volume::Pointer m_SegmentationVolume
#define MITKPHOTOACOUSTICSLIB_EXPORT
mitk::pa::Volume::Pointer m_AbsorptionVolume