From 7172bd9575abeaeaecba01678403077b0f4dca35 Mon Sep 17 00:00:00 2001 From: nyoungbq Date: Thu, 19 Oct 2023 16:15:35 -0400 Subject: [PATCH] last bit of std::random cleanup --- .../ComplexCore/test/MinNeighborsTest.cpp | 3 --- .../test/ITKImageWriterTest.cpp | 3 --- .../Filters/Algorithms/EBSDSegmentFeatures.cpp | 16 ++++++++-------- .../Filters/Algorithms/EBSDSegmentFeatures.hpp | 3 --- .../Filters/Algorithms/GroupFeatures.cpp | 5 ----- src/complex/Utilities/SampleSurfaceMesh.cpp | 1 - 6 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/Plugins/ComplexCore/test/MinNeighborsTest.cpp b/src/Plugins/ComplexCore/test/MinNeighborsTest.cpp index 7cee454979..5eef9ad46c 100644 --- a/src/Plugins/ComplexCore/test/MinNeighborsTest.cpp +++ b/src/Plugins/ComplexCore/test/MinNeighborsTest.cpp @@ -6,12 +6,9 @@ #include "complex/UnitTest/UnitTestCommon.hpp" #include "complex/Utilities/Parsing/HDF5/Writers/FileWriter.hpp" -#include "complex/UnitTest/UnitTestCommon.hpp" - #include #include -#include #include namespace fs = std::filesystem; diff --git a/src/Plugins/ITKImageProcessing/test/ITKImageWriterTest.cpp b/src/Plugins/ITKImageProcessing/test/ITKImageWriterTest.cpp index b2e01aa5c4..1386dad22b 100644 --- a/src/Plugins/ITKImageProcessing/test/ITKImageWriterTest.cpp +++ b/src/Plugins/ITKImageProcessing/test/ITKImageWriterTest.cpp @@ -2,16 +2,13 @@ #include "ITKImageProcessing/Filters/ITKImageWriter.hpp" #include "ITKImageProcessing/Filters/ITKImportImageStack.hpp" -#include "ITKImageProcessing/ITKImageProcessingPlugin.hpp" #include "ITKImageProcessing/ITKImageProcessing_test_dirs.hpp" #include "complex/Core/Application.hpp" #include "complex/Parameters/GeneratedFileListParameter.hpp" #include "complex/UnitTest/UnitTestCommon.hpp" -#include "complex/Utilities/Parsing/DREAM3D/Dream3dIO.hpp" #include -#include #include namespace fs = std::filesystem; diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/EBSDSegmentFeatures.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/EBSDSegmentFeatures.cpp index 447e2f10b9..b6672dbe88 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/EBSDSegmentFeatures.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/EBSDSegmentFeatures.cpp @@ -43,14 +43,6 @@ Result<> EBSDSegmentFeatures::operator()() m_FeatureIdsArray = m_DataStructure.getDataAs(m_InputValues->featureIdsArrayPath); m_FeatureIdsArray->fill(0); // initialize the output array with zeros - // Generate the random voxel indices that will be used for the seed points to start a new grain growth/agglomeration - auto totalPoints = m_QuatsArray->getNumberOfTuples(); - - const int64 rangeMin = 0; - const int64 rangeMax = static_cast(totalPoints - 1); - Int64Distribution distribution; - initializeStaticVoxelSeedGenerator(distribution, rangeMin, rangeMax); - execute(gridGeom); IDataArray* activeArray = m_DataStructure.getDataAs(m_InputValues->activeArrayPath); @@ -63,6 +55,14 @@ Result<> EBSDSegmentFeatures::operator()() // By default we randomize grains if(m_InputValues->shouldRandomizeFeatureIds) { + // Generate the random voxel indices that will be used for the seed points to start a new grain growth/agglomeration + auto totalPoints = m_QuatsArray->getNumberOfTuples(); + + const int64 rangeMin = 0; + const auto rangeMax = static_cast(totalPoints - 1); + Int64Distribution distribution; + initializeStaticVoxelSeedGenerator(distribution, rangeMin, rangeMax); + totalPoints = gridGeom->getNumberOfCells(); randomizeFeatureIds(m_FeatureIdsArray, totalPoints, totalFeatures, distribution); } diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/EBSDSegmentFeatures.hpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/EBSDSegmentFeatures.hpp index afacde44a7..2b69d96d1d 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/EBSDSegmentFeatures.hpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/EBSDSegmentFeatures.hpp @@ -12,7 +12,6 @@ #include "EbsdLib/LaueOps/LaueOps.h" -#include #include namespace complex @@ -42,8 +41,6 @@ struct ORIENTATIONANALYSIS_EXPORT EBSDSegmentFeaturesInputValues class ORIENTATIONANALYSIS_EXPORT EBSDSegmentFeatures : public SegmentFeatures { public: - using SeedGenerator = std::mt19937_64; - using Int64Distribution = std::uniform_int_distribution; using FeatureIdsArrayType = Int32Array; EBSDSegmentFeatures(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, EBSDSegmentFeaturesInputValues* inputValues); diff --git a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GroupFeatures.cpp b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GroupFeatures.cpp index 2a4260db6a..aff84df74f 100644 --- a/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GroupFeatures.cpp +++ b/src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/GroupFeatures.cpp @@ -1,13 +1,8 @@ #include "GroupFeatures.hpp" -#include "complex/DataStructure/DataArray.hpp" #include "complex/DataStructure/DataGroup.hpp" -#include "complex/DataStructure/DataStore.hpp" #include "complex/DataStructure/NeighborList.hpp" -#include -#include - using namespace complex; // ----------------------------------------------------------------------------- diff --git a/src/complex/Utilities/SampleSurfaceMesh.cpp b/src/complex/Utilities/SampleSurfaceMesh.cpp index 8968019066..adf222d849 100644 --- a/src/complex/Utilities/SampleSurfaceMesh.cpp +++ b/src/complex/Utilities/SampleSurfaceMesh.cpp @@ -9,7 +9,6 @@ #include "complex/Utilities/StringUtilities.hpp" #include -#include using namespace complex;