MeVisLab Toolbox Reference
VesselVoxelCreator.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2018, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
15 
16 #include "mlGraphComponents.h"
17 #include <mlVector3.h>
18 #include <mlMatrix4.h>
19 
20 ML_START_NAMESPACE
21 
22 using VESSELGRAPH_NAMESPACE::Graph;
23 using VESSELGRAPH_NAMESPACE::VesselEdge;
24 
25 
27 {
28 public:
29  VesselVoxelCreator(VesselEdge& edge);
30  void execute();
31 
32 private:
33  void calculateEdgeProperties();
34  void calculateImplicitFunctionParameters();
35  void calculateBoundingBox();
36  void determineVoxelsInsideEdge();
37  void distributeVoxelsToSkeletons();
38 
39 
40  VesselEdge& _edge;
41  Graph* _graph;
42 
43  Vector3 _pos0;
44  Vector3 _pos1;
45  Vector3 _direction;
46  double _radius0;
47  double _radius1;
48  bool _edgeIsCone;
49 
50  double _edgeHeightInFunctionSpace;
51  Matrix4 _voxelToFunctionSpaceMatrix;
52 
53  Vector3 _bbMin;
54  Vector3 _bbMax;
55 
56  std::vector<Vector3> _vesselVoxels;
57 };
58 
59 ML_END_NAMESPACE
60 
VesselVoxelCreator(VesselEdge &edge)