MeVisLab Toolbox Reference
CSOGeneratePathPoints.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, 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
17
18#pragma once
19
20
21#include "MLCSOIncludes.h"
22#include <CSOBase/CSO.h>
23
24
26
28
35
37
41namespace CSOGeneratePathPoints
42{
53
55 MLCSO_EXPORT void smoothPointsSplineApproximation(const std::vector<Vector3>& inputPoints, std::vector<Vector3>& outputPoints);
57 MLCSO_EXPORT void smoothPointsSplineInterpolation(const std::vector<Vector3>& inputPoints, std::vector<Vector3>& outputPoints);
59 MLCSO_EXPORT void smoothPointsSpline(const std::vector<Vector3>& inputPoints, std::vector<Vector3>& outputPoints, SplineModes splineMode);
60
64
71
76
78 MLCSO_EXPORT void fillPathPointsSplineInterpolation(CSO* cso, CSOPathPoints* pPoints, const std::vector<Vector3>&positions, double pointDistanceInMM=1);
80 MLCSO_EXPORT void fillPathPointsSplineApproximation(CSO* cso, CSOPathPoints* pPoints, const std::vector<Vector3>&positions, double pointDistanceInMM=1);
82 MLCSO_EXPORT void fillPathPointsSpline(CSO* cso, CSOPathPoints* pPoints, const std::vector<Vector3>&positions, double pointDistanceInMM=1, int splineMode=0);
83
86
89
94
96 double _catmullRomBasisFunc(int i, double t);
98 void _computeSingleCatmullRomPoint(int i, double t, Vector3& pos, double* xCoords, double* yCoords, double* zCoords);
99
101 double _B_SplineBasisFunc(int i, double t);
103 void _computeSingleB_SplinePoint(int i, double t, Vector3& pos, double* xCoords, double* yCoords, double* zCoords);
104};
105
107
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Definition MLCSOSystem.h:23
The CSOPathPoints is a list of world coordinates which are interpolated by a certain interpolation sc...
The CSO represents a contour segmentation object.
Definition CSO.h:44
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLCSO_EXPORT void smoothPointsSpline(const std::vector< Vector3 > &inputPoints, std::vector< Vector3 > &outputPoints, SplineModes splineMode)
Smooths the given positions by a spline interpolation.
double _B_SplineBasisFunc(int i, double t)
Computes value of a basis function at section i of a B-Spline.
MLCSO_EXPORT void fillPathPointsLinear(CSO *cso, CSOPathPoints *pPoints, double pointDistanceInMM=1)
Fills up the given CSOPathPoints of the given CSO by a linear interpolation method.
MLCSO_EXPORT void fillPathPointsSpline(CSO *cso, CSOPathPoints *pPoints, double pointDistanceInMM=1, int splineMode=0)
Fills up the given CSOPathPoints of the given CSO by a spline method splineMode.
MLCSO_EXPORT void fillPathPointsLinearNoPathChanged(CSO *cso, CSOPathPoints *pPoints, double pointDistanceInMM)
Like fillPathPointsLinear, without calling pathChanged().
MLCSO_EXPORT void reduceToOneSeedPoint(CSO *cso)
Removes all seed points but the first, leaving only one path point list with all the positions.
MLCSO_EXPORT void fillAllPathPointsSplineApproximation(CSO *cso, double pointDistanceInMM=1)
Fills all CSOPathPoints of the given CSO by a spline approximation method.
void _computeSingleB_SplinePoint(int i, double t, Vector3 &pos, double *xCoords, double *yCoords, double *zCoords)
Computes a single point for the B-Spline approximation.
MLCSO_EXPORT void fillPathPointsHermite(CSO *cso, CSOPathPoints *pPoints, const Vector3 &tangentTail, const Vector3 &tangentHead, double pointDistanceInMM=1)
Fills up the given CSOPathPoints of the given CSO by a Hermite interpolation method using the given t...
MLCSO_EXPORT void smoothPointsSplineApproximation(const std::vector< Vector3 > &inputPoints, std::vector< Vector3 > &outputPoints)
Smooths the given positions by a spline approximation.
MLCSO_EXPORT void fillPathPointsSplineApproximation(CSO *cso, CSOPathPoints *pPoints, double pointDistanceInMM=1)
Fills up the given CSOPathPoints of the given CSO by a spline approximation method.
void _computeSingleCatmullRomPoint(int i, double t, Vector3 &pos, double *xCoords, double *yCoords, double *zCoords)
Computes a single point for the Catmull-Rom spline interpolation.
MLCSO_EXPORT void fillPathPointsSplineInterpolation(CSO *cso, CSOPathPoints *pPoints, double pointDistanceInMM=1)
Fills up the given CSOPathPoints of the given CSO by a spline interpolation method.
MLCSO_EXPORT void fillAllPathPointsWithSeedPoints(CSO *cso)
Fills all CSOPathPoints of the given CSO by setting each seed point as a path point.
MLCSO_EXPORT void fillAllPathPointsSplineInterpolation(CSO *cso, double pointDistanceInMM=1)
Fills all CSOPathPoints of the given CSO by a spline interpolation method.
MLCSO_EXPORT void fillPathPointEllipse(CSO *cso, double pointDistanceInMM=1)
Fills up the CSOPathPoints of the given CSOs to result in an ellipse.
MLCSO_EXPORT void fillPathPointsSplineNoPathChanged(CSO *cso, CSOPathPoints *pPoints, double pointDistanceInMM, int splineMode)
Like fillPathPointsSpline, without calling pathChanged().
double _catmullRomBasisFunc(int i, double t)
Computes value of a basis function at section i of a Catmull-Rom spline.
MLCSO_EXPORT void smoothPointsSplineInterpolation(const std::vector< Vector3 > &inputPoints, std::vector< Vector3 > &outputPoints)
Smooths the given positions by a spline interpolation.
MLCSO_EXPORT void fillAllPathPointsLinear(CSO *cso, double pointDistanceInMM=1)
Fills all CSOPathPoints of the given CSO by a linear interpolation method.
MLCSO_EXPORT void fillAllPathPointsSpline(CSO *cso, double pointDistanceInMM=1, int splineMode=0)
Fills all CSOPathPoints of the given CSO by a spline method splineMode.
MLCSO_EXPORT void fillPathPointsWithSeedPoint(CSO *cso, CSOPathPoints *pPoints)
Fills up the given CSOPathPoints of the given CSO by the corresponding seed point.
SplineModes
Enumeration of the different spline modes.
@ SPLINE_MODE_APPROXIMATION
Interpolating spline: B-Spline.
@ SPLINE_MODE_INTERPOLATION
Interpolating spline: Catmull-Rom.