Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkPAVessel.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 MITKVESSEL_H
14 #define MITKVESSEL_H
15 
16 #include "mitkVector.h"
19 #include "mitkPAVector.h"
20 #include "mitkPAVesselProperties.h"
21 #include "mitkPAVesselDrawer.h"
22 
24 
25 //Includes for smart pointer usage
26 #include "mitkCommon.h"
27 #include "itkLightObject.h"
28 
29 namespace mitk {
30  namespace pa {
31  class MITKPHOTOACOUSTICSLIB_EXPORT Vessel : public itk::LightObject
32  {
33  public:
34  mitkClassMacroItkParent(Vessel, itk::LightObject)
35  mitkNewMacro1Param(Self, VesselProperties::Pointer)
36 
37 
40  typedef void (VesselMeanderStrategy::*CalculateNewVesselPositionCallback)
41  (Vector::Pointer, double, std::mt19937*);
42 
52  void ExpandVessel(mitk::pa::InSilicoTissueVolume::Pointer volume,
53  CalculateNewVesselPositionCallback calculateNewPosition, double bendingFactor, std::mt19937* rng);
54 
59  bool CanBifurcate();
60 
66  Vessel::Pointer Bifurcate(std::mt19937* rng);
67 
72  bool IsFinished();
73 
74  itkGetConstMacro(VesselProperties, VesselProperties::Pointer);
75 
76  protected:
77  Vessel(VesselProperties::Pointer parameters);
78  ~Vessel() override;
79 
80  private:
81 
82  const double MINIMUM_VESSEL_RADIUS = 0.1;
83  const double NEW_RADIUS_MINIMUM_RELATIVE_SIZE = 0.6;
84  const double NEW_RADIUS_MAXIMUM_RELATIVE_SIZE = 0.8;
85 
86  VesselMeanderStrategy::Pointer m_VesselMeanderStrategy;
87  bool m_Finished;
88  double m_WalkedDistance;
89 
90  std::uniform_real_distribution<> m_RangeDistribution;
91  std::uniform_real_distribution<> m_SignDistribution;
92  std::uniform_real_distribution<> m_RadiusRangeDistribution;
93 
94  int GetSign(std::mt19937* rng);
95 
96  VesselProperties::Pointer m_VesselProperties;
97 
98  VesselDrawer::Pointer m_VesselDrawer;
99  };
100 
110  MITKPHOTOACOUSTICSLIB_EXPORT bool Equal(const Vessel::Pointer leftHandSide, const Vessel::Pointer rightHandSide, double eps, bool verbose);
111  }
112 }
113 #endif // MITKVESSEL_H
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:72
DataCollection - Class to facilitate loading/accessing structured data.
MITKPHOTOACOUSTICSLIB_EXPORT bool Equal(const MonteCarloThreadHandler::Pointer leftHandSide, const MonteCarloThreadHandler::Pointer rightHandSide, double eps, bool verbose)
Equal A function comparing two thread handlers for beeing equal.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
bool verbose(false)
MITKCORE_EXPORT const ScalarType eps
#define MITKPHOTOACOUSTICSLIB_EXPORT