Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkPAVesselMeanderStrategy.cpp
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 
14 
16 {
17 }
18 
20 {
21 }
22 
23 void mitk::pa::VesselMeanderStrategy::CalculateNewDirectionVectorInStraightLine(Vector::Pointer direction, double /*bendingFactor*/, std::mt19937* rng)
24 {
25  if (direction->GetNorm() <= mitk::eps)
26  {
27  direction->Randomize(rng);
28  }
29 }
30 
31 void mitk::pa::VesselMeanderStrategy::CalculateNewRandomlyDivergingDirectionVector(Vector::Pointer direction, double bendingFactor, std::mt19937* rng)
32 {
33  if (direction->GetNorm() <= mitk::eps)
34  {
35  direction->Randomize(rng);
36  }
37 
38  direction->RandomizeByPercentage(RANDOMIZATION_PERCENTAGE, bendingFactor, rng);
39 
40  direction->Normalize();
41 }
void CalculateNewRandomlyDivergingDirectionVector(Vector::Pointer direction, double bendingFactor, std::mt19937 *rng)
CalculateRandomlyDivergingPosition calculates the new position by modifying the direction vector rand...
void CalculateNewDirectionVectorInStraightLine(Vector::Pointer direction, double bendingFactor, std::mt19937 *rng)
CalculateNewPositionInStraightLine calculates the new position by just following the direction vector...
MITKCORE_EXPORT const ScalarType eps