fix smooth distance

This commit is contained in:
JamesEMcclure 2020-07-22 13:14:07 -04:00
parent 418ba77751
commit c9640c46ba
4 changed files with 8 additions and 10 deletions

View File

@ -140,7 +140,7 @@ void Minkowski::MeasureObject(){
* 0 - labels the object
* 1 - labels the rest of the
*/
DoubleArray smooth_distance(Nx,Ny,Nz);
for (int k=0; k<Nz; k++){
for (int j=0; j<Ny; j++){
for (int i=0; i<Nx; i++){
@ -149,8 +149,9 @@ void Minkowski::MeasureObject(){
}
}
CalcDist(distance,id,*Dm);
Eikonal(distance, id, *Dm, 10, {true, true, true});
ComputeScalar(distance,0.0);
Mean3D(distance,smooth_distance);
//Eikonal(distance, id, *Dm, 10, {true, true, true});
ComputeScalar(smooth_distance,0.0);
}

View File

@ -10,6 +10,7 @@
#include "common/Communication.h"
#include "analysis/analysis.h"
#include "analysis/distance.h"
#include "analysis/filters.h"
#include "common/Utilities.h"
#include "common/MPI_Helpers.h"

View File

@ -2,15 +2,11 @@
#include "math.h"
#include "ProfilerApp.h"
void Mean3D( const Array<float> &Input, Array<float> &Output )
void Mean3D( const Array<double> &Input, Array<double> &Output )
{
PROFILE_START("Mean3D");
// Perform a 3D Mean filter on Input array
int i,j,k,ii,jj,kk;
int imin,jmin,kmin,imax,jmax,kmax;
float *List;
List=new float[27];
int i,j,k;
int Nx = int(Input.size(0));
int Ny = int(Input.size(1));

View File

@ -10,7 +10,7 @@
* @param[in] Input Input image
* @param[out] Output Output image
*/
void Mean3D( const Array<float> &Input, Array<float> &Output )
void Mean3D( const Array<double> &Input, Array<double> &Output );
/*!
* @brief Filter image