Skip to content

Commit

Permalink
Reorganize scalar segment features feature ids randomization
Browse files Browse the repository at this point in the history
  • Loading branch information
nyoungbq committed Oct 18, 2023
1 parent c3cdece commit 55ad646
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include "complex/Parameters/BoolParameter.hpp"
#include "complex/Utilities/DataArrayUtilities.hpp"

#include <chrono>

using namespace complex;

#define CX_DEFAULT_CONSTRUCTORS(className) \
Expand Down Expand Up @@ -210,11 +208,6 @@ Result<> ScalarSegmentFeatures::operator()()
// Generate the random voxel indices that will be used for the seed points to start a new grain growth/agglomeration
auto totalPoints = inputDataArray->getNumberOfTuples();

const int64 rangeMin = 0;
const int64 rangeMax = totalPoints - 1;
Int64Distribution distribution;
initializeVoxelSeedGenerator(distribution, rangeMin, rangeMax);

// // Add compare function to arguments
// Arguments newArgs = args;
// newArgs.insert(k_CompareFunctKey, compare.get());
Expand All @@ -235,6 +228,10 @@ Result<> ScalarSegmentFeatures::operator()()
// By default we randomize grains
if(m_InputValues->pShouldRandomizeFeatureIds)
{
const int64 rangeMin = 0;
const int64 rangeMax = totalPoints - 1;
Int64Distribution distribution;
initializeVoxelSeedGenerator(distribution, rangeMin, rangeMax);
totalPoints = gridGeom->getNumberOfCells();
randomizeFeatureIds(m_FeatureIdsArray, totalPoints, totalFeatures, distribution);
}
Expand Down

0 comments on commit 55ad646

Please sign in to comment.