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
21
22using VESSELGRAPH_NAMESPACE::Graph;
23using VESSELGRAPH_NAMESPACE::VesselEdge;
24
25
27{
28public:
29 VesselVoxelCreator(VesselEdge& edge);
30 void execute();
31
32private:
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
60
VesselVoxelCreator(VesselEdge &edge)
Target mlrange_cast(Source arg)
Generic version of checked ML casts.