Matrix with b3dMex

This commit is contained in:
kradchen
2023-05-25 16:18:08 +08:00
parent f0bff1a803
commit e98e301ec5
2 changed files with 13 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <vector>
namespace Recon {
float* b3dMex(float *startPoint, float *endPoint,size_t &outputSize ) {
/* Input arguments from MATLAB */
@@ -109,6 +110,14 @@ float* b3dMex(float *startPoint, float *endPoint,size_t &outputSize ) {
return output;
}
Aurora::Matrix b3dMexDouble(const Aurora::Matrix& StartPt, const Aurora::Matrix& endPts)
{
size_t size = 0;
auto temp =
Recon::b3dMexDouble(StartPt.getData(), endPts.getData(), size);
return Aurora::Matrix::fromRawData(temp, 3, size / 3);
}
double * b3dMexDouble(double *startPoint,double *endPoint, size_t& outputSize) {
std::vector<double> points;
@@ -206,3 +215,5 @@ double * b3dMexDouble(double *startPoint,double *endPoint, size_t& outputSize) {
outputSize = points.size();
return output;
}
}

View File

@@ -1,8 +1,10 @@
#ifndef __B3DMEX_H__
#define __B3DMEX_H__
#include <cstddef>
#include "Matrix.h"
namespace Recon {
float* b3dMex(float *startPoint, float *endPoint,std::size_t &outputSize );
double * b3dMexDouble(double *startPoint,double *endPoint, size_t& outputSize);
Aurora::Matrix b3dMexDouble(const Aurora::Matrix& StartPt, const Aurora::Matrix& endPts);
}
#endif // __B3DMEX_H__