Skip to content
Permalink
Browse files

Update DataArray API constructors to decrease the chance of ambigious…

… overloads

With the recently introduced API changes there were instances where a boolean parameter that was
to signal whether or not to allocate data was instead used as the init value for the
data array. The API has been updated to force the developer to supply all the arguments
when constructing the DataArray<T> object

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
  • Loading branch information...
imikejackson committed Jul 3, 2019
1 parent b354016 commit 8d06a4e29fd6b3c2319e381074e3cbe9f57a9258
Showing with 403 additions and 407 deletions.
  1. +1 −1 Source/OrientationLib/IO/AngleFileLoader.cpp
  2. +10 −10 Source/OrientationLib/LaueOps/CubicLowOps.cpp
  3. +11 −11 Source/OrientationLib/LaueOps/CubicOps.cpp
  4. +10 −10 Source/OrientationLib/LaueOps/HexagonalLowOps.cpp
  5. +10 −10 Source/OrientationLib/LaueOps/HexagonalOps.cpp
  6. +10 −10 Source/OrientationLib/LaueOps/MonoclinicOps.cpp
  7. +10 −10 Source/OrientationLib/LaueOps/OrthoRhombicOps.cpp
  8. +10 −11 Source/OrientationLib/LaueOps/TetragonalLowOps.cpp
  9. +10 −10 Source/OrientationLib/LaueOps/TetragonalOps.cpp
  10. +10 −10 Source/OrientationLib/LaueOps/TriclinicOps.cpp
  11. +10 −10 Source/OrientationLib/LaueOps/TrigonalLowOps.cpp
  12. +10 −10 Source/OrientationLib/LaueOps/TrigonalOps.cpp
  13. +2 −2 Source/OrientationLib/OrientationMath/OrientationConverter.hpp
  14. +1 −1 Source/OrientationLib/Test/OrientationArrayTest.cpp
  15. +2 −2 Source/OrientationLib/Test/OrientationConverterTest.cpp
  16. +2 −2 Source/OrientationLib/Test/OrientationTransformsTest.cpp
  17. +3 −3 Source/OrientationLib/Texture/Texture.hpp
  18. +3 −3 Source/OrientationLib/Utilities/ModifiedLambertProjection.cpp
  19. +7 −11 Source/OrientationLib/Utilities/PoleFigureUtilities.cpp
  20. +1 −1 Source/Plugins/Generic/GenericFilters/FindFeatureCentroids.cpp
  21. +1 −1 Source/Plugins/ImportExport/ImportExportFilters/ImportAvxmMDSim.cpp
  22. +3 −3 Source/Plugins/ImportExport/ImportExportFilters/NodesTrianglesToStl.cpp
  23. +1 −1 Source/Plugins/ImportExport/ImportExportFilters/ReadStlFile.cpp
  24. +3 −3 Source/Plugins/ImportExport/ImportExportFilters/VisualizeGBCDGMT.cpp
  25. +4 −4 Source/Plugins/ImportExport/ImportExportFilters/VisualizeGBCDPoleFigure.cpp
  26. +4 −4 Source/Plugins/ImportExport/Test/ExportDataTest.cpp
  27. +1 −1 Source/Plugins/OrientationAnalysis/Gui/Widgets/OrientationUtilityCalculator.cpp
  28. +1 −1 ...ugins/OrientationAnalysis/OrientationAnalysisFilters/FindFeatureReferenceCAxisMisorientations.cpp
  29. +1 −1 ...ce/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindFeatureReferenceMisorientations.cpp
  30. +6 −6 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindGBCD.cpp
  31. +7 −7 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindMicroTextureRegions.cpp
  32. +3 −3 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindOrientationFieldCurl.cpp
  33. +3 −3 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ImportH5EspritData.cpp
  34. +3 −3 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ImportH5OimData.cpp
  35. +11 −11 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ReadAngData.cpp
  36. +12 −12 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ReadCtfData.cpp
  37. +18 −18 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ReadH5Ebsd.cpp
  38. +2 −2 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ReadH5Ebsd.h
  39. +2 −2 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/WritePoleFigure.cpp
  40. +1 −1 Source/Plugins/OrientationAnalysis/Test/ConvertQuaternionTest.cpp
  41. +7 −7 Source/Plugins/Processing/ProcessingFilters/DetectEllipsoids.cpp
  42. +1 −1 Source/Plugins/Processing/ProcessingFilters/ErodeDilateBadData.cpp
  43. +1 −1 Source/Plugins/Processing/ProcessingFilters/ErodeDilateCoordinationNumber.cpp
  44. +1 −1 Source/Plugins/Processing/ProcessingFilters/ErodeDilateMask.cpp
  45. +2 −2 Source/Plugins/Processing/ProcessingFilters/FillBadData.cpp
  46. +1 −1 Source/Plugins/Processing/ProcessingFilters/FindProjectedImageStatistics.cpp
  47. +3 −3 Source/Plugins/Processing/ProcessingFilters/FindRelativeMotionBetweenSlices.cpp
  48. +18 −18 Source/Plugins/Processing/ProcessingFilters/HelperClasses/DetectEllipsoidsImpl.cpp
  49. +2 −2 Source/Plugins/Processing/ProcessingFilters/HelperClasses/DetectEllipsoidsImpl.h
  50. +1 −1 Source/Plugins/Processing/ProcessingFilters/MinNeighbors.cpp
  51. +1 −1 Source/Plugins/Processing/ProcessingFilters/MinSize.cpp
  52. +1 −1 Source/Plugins/Processing/ProcessingFilters/RemoveFlaggedFeatures.cpp
  53. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/AlignSectionsMisorientation.cpp
  54. +2 −2 Source/Plugins/Reconstruction/ReconstructionFilters/AlignSectionsMutualInformation.cpp
  55. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/CAxisSegmentFeatures.cpp
  56. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/EBSDSegmentFeatures.cpp
  57. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/GroupMicroTextureRegions.cpp
  58. +2 −2 Source/Plugins/Reconstruction/ReconstructionFilters/IdentifyMicroTextureRegions.cpp
  59. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/MergeColonies.cpp
  60. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/MergeTwins.cpp
  61. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/ScalarSegmentFeatures.cpp
  62. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/SineParamsSegmentFeatures.cpp
  63. +1 −1 Source/Plugins/Reconstruction/ReconstructionFilters/VectorSegmentFeatures.cpp
  64. +1 −1 Source/Plugins/Sampling/SamplingFilters/ExtractFlaggedFeatures.cpp
  65. +1 −1 Source/Plugins/Sampling/SamplingFilters/RotateSampleRefFrame.cpp
  66. +8 −8 Source/Plugins/Sampling/SamplingFilters/SampleSurfaceMesh.cpp
  67. +3 −3 Source/Plugins/Statistics/StatisticsFilters/CorrelateValuesWithVectorDirection.cpp
  68. +2 −2 Source/Plugins/Statistics/StatisticsFilters/FindBoundaryElementFractions.cpp
  69. +1 −1 Source/Plugins/Statistics/StatisticsFilters/FindLargestCrossSections.cpp
  70. +2 −2 Source/Plugins/Statistics/StatisticsFilters/FindShapes.cpp
  71. +2 −2 Source/Plugins/Statistics/StatisticsFilters/FindSizes.cpp
  72. +1 −1 Source/Plugins/Statistics/StatisticsFilters/FitCorrelatedFeatureData.cpp
  73. +9 −9 Source/Plugins/Statistics/StatisticsFilters/GenerateEnsembleStatistics.cpp
  74. +2 −2 Source/Plugins/Statistics/Test/CalculateArrayHistogramTest.cpp
  75. +1 −1 Source/Plugins/Statistics/Test/FindEuclideanDistMapTest.cpp
  76. +2 −2 Source/Plugins/Statistics/Test/FindShapesTest.cpp
  77. +11 −11 Source/Plugins/Statistics/Test/FindSizesTest.cpp
  78. +1 −1 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/CalculateTriangleGroupCurvatures.cpp
  79. +2 −2 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/FindTriangleGeomShapes.cpp
  80. +3 −3 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/LaplacianSmoothing.cpp
  81. +6 −6 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/M3CSliceBySlice.cpp
  82. +2 −2 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/MovingFiniteElementSmoothing.cpp
  83. +2 −2 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/Unsupported/GenerateNodeTriangleConnectivity.cpp
  84. +13 −13 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/Unsupported/M3CEntireVolume.cpp
  85. +1 −1 Source/Plugins/SurfaceMeshing/Test/FindTriangleGeomCentroidsTest.cpp
  86. +1 −1 Source/Plugins/SurfaceMeshing/Test/FindTriangleGeomNeighborsTest.cpp
  87. +1 −1 Source/Plugins/SurfaceMeshing/Test/FindTriangleGeomShapesTest.cpp
  88. +1 −1 Source/Plugins/SurfaceMeshing/Test/FindTriangleGeomSizesTest.cpp
  89. +5 −5 Source/Plugins/SurfaceMeshing/Test/QuickSurfaceMeshTest.cpp
  90. +2 −1 Source/Plugins/SyntheticBuilding/Gui/FilterParameterWidgets/InitializeSyntheticVolumeWidget.cpp
  91. +4 −4 Source/Plugins/SyntheticBuilding/Gui/FilterParameterWidgets/StatsGeneratorWidget.cpp
  92. +2 −2 Source/Plugins/SyntheticBuilding/Gui/Widgets/PrecipitatePhaseWidget.cpp
  93. +1 −1 Source/Plugins/SyntheticBuilding/Gui/Widgets/StatsGenAxisODFWidget.cpp
  94. +2 −2 Source/Plugins/SyntheticBuilding/Gui/Widgets/StatsGenFeatureSizeWidget.cpp
  95. +1 −1 Source/Plugins/SyntheticBuilding/Gui/Widgets/StatsGenODFWidget.cpp
  96. +8 −8 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/GeneratePrecipitateStatsData.cpp
  97. +8 −8 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/GeneratePrimaryStatsData.cpp
  98. +8 −8 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/InsertAtoms.cpp
  99. +2 −2 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/InsertPrecipitatePhases.cpp
  100. +2 −2 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/MatchCrystallography.cpp
  101. +5 −5 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/PackPrimaryPhases.cpp
  102. +2 −2 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/StatsGeneratorFilter.cpp
@@ -153,7 +153,7 @@ FloatArrayType::Pointer AngleFileLoader::loadData()

// Allocate enough for the angles
std::vector<size_t> dims(1, 5);
angles = FloatArrayType::CreateArray(numOrients, dims, "EulerAngles_From_File");
angles = FloatArrayType::CreateArray(numOrients, dims, "EulerAngles_From_File", true);

for(int i = 0; i < numOrients; i++)
{
@@ -1084,11 +1084,11 @@ QVector<UInt8ArrayType::Pointer> CubicLowOps::generatePoleFigure(PoleFigureConfi
// Create an Array to hold the XYZ Coordinates which are the coords on the sphere.
// this is size for CUBIC ONLY, <001> Family
std::vector<size_t> dims(1, 3);
FloatArrayType::Pointer xyz001 = FloatArrayType::CreateArray(numOrientations * Detail::CubicLow::symSize0, dims, label0 + QString("xyzCoords"));
FloatArrayType::Pointer xyz001 = FloatArrayType::CreateArray(numOrientations * Detail::CubicLow::symSize0, dims, label0 + QString("xyzCoords"), true);
// this is size for CUBIC ONLY, <011> Family
FloatArrayType::Pointer xyz011 = FloatArrayType::CreateArray(numOrientations * Detail::CubicLow::symSize1, dims, label1 + QString("xyzCoords"));
FloatArrayType::Pointer xyz011 = FloatArrayType::CreateArray(numOrientations * Detail::CubicLow::symSize1, dims, label1 + QString("xyzCoords"), true);
// this is size for CUBIC ONLY, <111> Family
FloatArrayType::Pointer xyz111 = FloatArrayType::CreateArray(numOrientations * Detail::CubicLow::symSize2, dims, label2 + QString("xyzCoords"));
FloatArrayType::Pointer xyz111 = FloatArrayType::CreateArray(numOrientations * Detail::CubicLow::symSize2, dims, label2 + QString("xyzCoords"), true);

config.sphereRadius = 1.0f;

@@ -1098,9 +1098,9 @@ QVector<UInt8ArrayType::Pointer> CubicLowOps::generatePoleFigure(PoleFigureConfi

// These arrays hold the "intensity" images which eventually get converted to an actual Color RGB image
// Generate the modified Lambert projection images (Squares, 2 of them, 1 for northern hemisphere, 1 for southern hemisphere
DoubleArrayType::Pointer intensity001 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label0 + "_Intensity_Image");
DoubleArrayType::Pointer intensity011 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label1 + "_Intensity_Image");
DoubleArrayType::Pointer intensity111 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label2 + "_Intensity_Image");
DoubleArrayType::Pointer intensity001 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label0 + "_Intensity_Image", true);
DoubleArrayType::Pointer intensity011 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label1 + "_Intensity_Image", true);
DoubleArrayType::Pointer intensity111 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label2 + "_Intensity_Image", true);
#ifdef SIMPL_USE_PARALLEL_ALGORITHMS
tbb::task_scheduler_init init;
bool doParallel = true;
@@ -1176,9 +1176,9 @@ QVector<UInt8ArrayType::Pointer> CubicLowOps::generatePoleFigure(PoleFigureConfi
config.maxScale = max;

dims[0] = 4;
UInt8ArrayType::Pointer image001 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label0);
UInt8ArrayType::Pointer image011 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label1);
UInt8ArrayType::Pointer image111 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label2);
UInt8ArrayType::Pointer image001 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label0, true);
UInt8ArrayType::Pointer image011 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label1, true);
UInt8ArrayType::Pointer image111 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label2, true);

QVector<UInt8ArrayType::Pointer> poleFigures(3);
if(config.order.size() == 3)
@@ -1226,7 +1226,7 @@ UInt8ArrayType::Pointer CubicLowOps::generateIPFTriangleLegend(int imageDim)
{

std::vector<size_t> dims(1, 4);
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, getSymmetryName() + " Triangle Legend");
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, getSymmetryName() + " Triangle Legend", true);
image->initializeWithValue(255);
return image;
}
@@ -1813,11 +1813,11 @@ QVector<UInt8ArrayType::Pointer> CubicOps::generatePoleFigure(PoleFigureConfigur
// Create an Array to hold the XYZ Coordinates which are the coords on the sphere.
// this is size for CUBIC ONLY, <001> Family
std::vector<size_t> dims(1, 3);
FloatArrayType::Pointer xyz001 = FloatArrayType::CreateArray(numOrientations * Detail::CubicHigh::symSize0, dims, label0 + QString("xyzCoords"));
FloatArrayType::Pointer xyz001 = FloatArrayType::CreateArray(numOrientations * Detail::CubicHigh::symSize0, dims, label0 + QString("xyzCoords"), true);
// this is size for CUBIC ONLY, <011> Family
FloatArrayType::Pointer xyz011 = FloatArrayType::CreateArray(numOrientations * Detail::CubicHigh::symSize1, dims, label1 + QString("xyzCoords"));
FloatArrayType::Pointer xyz011 = FloatArrayType::CreateArray(numOrientations * Detail::CubicHigh::symSize1, dims, label1 + QString("xyzCoords"), true);
// this is size for CUBIC ONLY, <111> Family
FloatArrayType::Pointer xyz111 = FloatArrayType::CreateArray(numOrientations * Detail::CubicHigh::symSize2, dims, label2 + QString("xyzCoords"));
FloatArrayType::Pointer xyz111 = FloatArrayType::CreateArray(numOrientations * Detail::CubicHigh::symSize2, dims, label2 + QString("xyzCoords"), true);

config.sphereRadius = 1.0f;

@@ -1826,9 +1826,9 @@ QVector<UInt8ArrayType::Pointer> CubicOps::generatePoleFigure(PoleFigureConfigur

// These arrays hold the "intensity" images which eventually get converted to an actual Color RGB image
// Generate the modified Lambert projection images (Squares, 2 of them, 1 for northern hemisphere, 1 for southern hemisphere
DoubleArrayType::Pointer intensity001 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label0 + "_Intensity_Image");
DoubleArrayType::Pointer intensity011 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label1 + "_Intensity_Image");
DoubleArrayType::Pointer intensity111 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label2 + "_Intensity_Image");
DoubleArrayType::Pointer intensity001 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label0 + "_Intensity_Image", true);
DoubleArrayType::Pointer intensity011 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label1 + "_Intensity_Image", true);
DoubleArrayType::Pointer intensity111 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label2 + "_Intensity_Image", true);

#ifdef SIMPL_USE_PARALLEL_ALGORITHMS
tbb::task_scheduler_init init;
@@ -1904,9 +1904,9 @@ QVector<UInt8ArrayType::Pointer> CubicOps::generatePoleFigure(PoleFigureConfigur
config.maxScale = max;

dims[0] = 4;
UInt8ArrayType::Pointer image001 = UInt8ArrayType::CreateArray(static_cast<size_t>(config.imageDim * config.imageDim), dims, label0);
UInt8ArrayType::Pointer image011 = UInt8ArrayType::CreateArray(static_cast<size_t>(config.imageDim * config.imageDim), dims, label1);
UInt8ArrayType::Pointer image111 = UInt8ArrayType::CreateArray(static_cast<size_t>(config.imageDim * config.imageDim), dims, label2);
UInt8ArrayType::Pointer image001 = UInt8ArrayType::CreateArray(static_cast<size_t>(config.imageDim * config.imageDim), dims, label0, true);
UInt8ArrayType::Pointer image011 = UInt8ArrayType::CreateArray(static_cast<size_t>(config.imageDim * config.imageDim), dims, label1, true);
UInt8ArrayType::Pointer image111 = UInt8ArrayType::CreateArray(static_cast<size_t>(config.imageDim * config.imageDim), dims, label2, true);

QVector<UInt8ArrayType::Pointer> poleFigures(3);
if(config.order.size() == 3)
@@ -1964,7 +1964,7 @@ UInt8ArrayType::Pointer CubicOps::generateIPFTriangleLegend(int imageDim)
{

std::vector<size_t> dims(1, 4);
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, getSymmetryName() + " Triangle Legend");
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, getSymmetryName() + " Triangle Legend", true);
uint32_t* pixelPtr = reinterpret_cast<uint32_t*>(image->getPointer(0));

float indexConst1 = 0.414f / static_cast<float>(imageDim);
@@ -2141,7 +2141,7 @@ SIMPL::Rgb CubicOps::generateMisorientationColor(const QuatF& q, const QuatF& re
UInt8ArrayType::Pointer CubicOps::generateMisorientationTriangleLegend(float angle, int n1, int n2, int imageDim)
{
std::vector<size_t> dims(1, 4);
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, "Cubic High Misorientation Triangle Legend");
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, "Cubic High Misorientation Triangle Legend", true);
#if 0
//uint32_t* pixelPtr = reinterpret_cast<uint32_t*>(image->getPointer(0));

@@ -1373,11 +1373,11 @@ QVector<UInt8ArrayType::Pointer> HexagonalLowOps::generatePoleFigure(PoleFigureC
// Create an Array to hold the XYZ Coordinates which are the coords on the sphere.
// this is size for CUBIC ONLY, <001> Family
std::vector<size_t> dims(1, 3);
FloatArrayType::Pointer xyz001 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalLow::symSize0, dims, label0 + QString("xyzCoords"));
FloatArrayType::Pointer xyz001 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalLow::symSize0, dims, label0 + QString("xyzCoords"), true);
// this is size for CUBIC ONLY, <011> Family
FloatArrayType::Pointer xyz011 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalLow::symSize1, dims, label1 + QString("xyzCoords"));
FloatArrayType::Pointer xyz011 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalLow::symSize1, dims, label1 + QString("xyzCoords"), true);
// this is size for CUBIC ONLY, <111> Family
FloatArrayType::Pointer xyz111 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalLow::symSize2, dims, label2 + QString("xyzCoords"));
FloatArrayType::Pointer xyz111 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalLow::symSize2, dims, label2 + QString("xyzCoords"), true);

config.sphereRadius = 1.0f;

@@ -1387,9 +1387,9 @@ QVector<UInt8ArrayType::Pointer> HexagonalLowOps::generatePoleFigure(PoleFigureC

// These arrays hold the "intensity" images which eventually get converted to an actual Color RGB image
// Generate the modified Lambert projection images (Squares, 2 of them, 1 for northern hemisphere, 1 for southern hemisphere
DoubleArrayType::Pointer intensity001 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label0 + "_Intensity_Image");
DoubleArrayType::Pointer intensity011 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label1 + "_Intensity_Image");
DoubleArrayType::Pointer intensity111 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label2 + "_Intensity_Image");
DoubleArrayType::Pointer intensity001 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label0 + "_Intensity_Image", true);
DoubleArrayType::Pointer intensity011 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label1 + "_Intensity_Image", true);
DoubleArrayType::Pointer intensity111 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label2 + "_Intensity_Image", true);
#ifdef SIMPL_USE_PARALLEL_ALGORITHMS
tbb::task_scheduler_init init;
bool doParallel = true;
@@ -1465,9 +1465,9 @@ QVector<UInt8ArrayType::Pointer> HexagonalLowOps::generatePoleFigure(PoleFigureC
config.maxScale = max;

dims[0] = 4;
UInt8ArrayType::Pointer image001 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label0);
UInt8ArrayType::Pointer image011 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label1);
UInt8ArrayType::Pointer image111 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label2);
UInt8ArrayType::Pointer image001 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label0, true);
UInt8ArrayType::Pointer image011 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label1, true);
UInt8ArrayType::Pointer image111 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label2, true);

QVector<UInt8ArrayType::Pointer> poleFigures(3);
if(config.order.size() == 3)
@@ -1514,7 +1514,7 @@ UInt8ArrayType::Pointer HexagonalLowOps::generateIPFTriangleLegend(int imageDim)
{

std::vector<size_t> dims(1, 4);
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, getSymmetryName() + " Triangle Legend");
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, getSymmetryName() + " Triangle Legend", true);
uint32_t* pixelPtr = reinterpret_cast<uint32_t*>(image->getPointer(0));

float xInc = 1.0 / static_cast<float>(imageDim);
@@ -1456,11 +1456,11 @@ QVector<UInt8ArrayType::Pointer> HexagonalOps::generatePoleFigure(PoleFigureConf
// Create an Array to hold the XYZ Coordinates which are the coords on the sphere.
// this is size for CUBIC ONLY, <001> Family
std::vector<size_t> dims(1, 3);
FloatArrayType::Pointer xyz001 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalHigh::symSize0, dims, label0 + QString("xyzCoords"));
FloatArrayType::Pointer xyz001 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalHigh::symSize0, dims, label0 + QString("xyzCoords"), true);
// this is size for CUBIC ONLY, <011> Family
FloatArrayType::Pointer xyz011 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalHigh::symSize1, dims, label1 + QString("xyzCoords"));
FloatArrayType::Pointer xyz011 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalHigh::symSize1, dims, label1 + QString("xyzCoords"), true);
// this is size for CUBIC ONLY, <111> Family
FloatArrayType::Pointer xyz111 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalHigh::symSize2, dims, label2 + QString("xyzCoords"));
FloatArrayType::Pointer xyz111 = FloatArrayType::CreateArray(numOrientations * Detail::HexagonalHigh::symSize2, dims, label2 + QString("xyzCoords"), true);

config.sphereRadius = 1.0f;

@@ -1470,9 +1470,9 @@ QVector<UInt8ArrayType::Pointer> HexagonalOps::generatePoleFigure(PoleFigureConf

// These arrays hold the "intensity" images which eventually get converted to an actual Color RGB image
// Generate the modified Lambert projection images (Squares, 2 of them, 1 for northern hemisphere, 1 for southern hemisphere
DoubleArrayType::Pointer intensity001 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label0 + "_Intensity_Image");
DoubleArrayType::Pointer intensity011 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label1 + "_Intensity_Image");
DoubleArrayType::Pointer intensity111 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label2 + "_Intensity_Image");
DoubleArrayType::Pointer intensity001 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label0 + "_Intensity_Image", true);
DoubleArrayType::Pointer intensity011 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label1 + "_Intensity_Image", true);
DoubleArrayType::Pointer intensity111 = DoubleArrayType::CreateArray(config.imageDim * config.imageDim, label2 + "_Intensity_Image", true);
#ifdef SIMPL_USE_PARALLEL_ALGORITHMS
tbb::task_scheduler_init init;
bool doParallel = true;
@@ -1548,9 +1548,9 @@ QVector<UInt8ArrayType::Pointer> HexagonalOps::generatePoleFigure(PoleFigureConf
config.maxScale = max;

dims[0] = 4;
UInt8ArrayType::Pointer image001 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label0);
UInt8ArrayType::Pointer image011 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label1);
UInt8ArrayType::Pointer image111 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label2);
UInt8ArrayType::Pointer image001 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label0, true);
UInt8ArrayType::Pointer image011 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label1, true);
UInt8ArrayType::Pointer image111 = UInt8ArrayType::CreateArray(config.imageDim * config.imageDim, dims, label2, true);

QVector<UInt8ArrayType::Pointer> poleFigures(3);
if(config.order.size() == 3)
@@ -1597,7 +1597,7 @@ QVector<UInt8ArrayType::Pointer> HexagonalOps::generatePoleFigure(PoleFigureConf
UInt8ArrayType::Pointer HexagonalOps::generateIPFTriangleLegend(int imageDim)
{
std::vector<size_t> dims(1, 4);
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, getSymmetryName() + " Triangle Legend");
UInt8ArrayType::Pointer image = UInt8ArrayType::CreateArray(imageDim * imageDim, dims, getSymmetryName() + " Triangle Legend", true);
uint32_t* pixelPtr = reinterpret_cast<uint32_t*>(image->getPointer(0));

float xInc = 1.0f / static_cast<float>(imageDim);

0 comments on commit 8d06a4e

Please sign in to comment.
You can’t perform that action at this time.