Skip to content
Permalink
Browse files

Feature/MessagesRedesign (#894)

* Replacing PipelineMessage API with an AbstractMessage superclass and subclasses for every type of message. This eliminates the need for the MessageType enumeration.

* Implementing a new, cleaner and more reusable API that observers can implement to be able to process specific types of messages. Take a look at the IssuesWidget and IssuesWidgetMessageHandler for a good example of this. Observers can decide which types of messages they are interested in by subclassing the AbstractMessageHandler class and reimplement the appropriate processMessage() methods.

* Passing AbstractMessages from observable object to observer object using a shared pointer instead of by value. This allows observers to store the messages with all the relevant subclass data if they prefer.

* Eliminating the use of humanLabel in Observable's and AbstractFilter's notify****Message method parameters. In AbstractFilter, these methods already set the human label into the message.

* It is no longer necessary to set error and warning codes outside of the setErrorCondition and setWarningCondition methods. These methods will automatically set the code to the integer that is passed in.

* Filters that emit progress messages while they are in an executing pipeline have their progress values automatically converted into overall pipeline progress values and re-emitted as pipeline progress messages. This allows filters to update the overall progress of the pipeline while they are running. Check out FilterPipelineMessageHandler at the top of the FilterPipeline implementation file.
  • Loading branch information...
joeykleingers committed Apr 5, 2019
1 parent 4961574 commit 67f3fd65e2d46ce015c0cfaa6c4c78e033b671cd
Showing with 3,439 additions and 3,470 deletions.
  1. +4 −4 Source/EbsdLib/EbsdImporter.h
  2. +6 −6 Source/EbsdLib/HKL/H5CtfImporter.cpp
  3. +5 −5 Source/EbsdLib/TSL/H5AngImporter.cpp
  4. +6 −6 Source/OrientationLib/Test/OrientationTransformsTest.cpp
  5. +67 −11 Source/Plugins/EMMPM/EMMPMFilters/EMMPMFilter.cpp
  6. +10 −0 Source/Plugins/EMMPM/EMMPMFilters/EMMPMFilter.h
  7. +87 −30 Source/Plugins/EMMPM/EMMPMFilters/MultiEmmpmFilter.cpp
  8. +14 −0 Source/Plugins/EMMPM/EMMPMFilters/MultiEmmpmFilter.h
  9. +68 −14 Source/Plugins/EMMPM/EMMPMLib/Core/EMCalculation.cpp
  10. +4 −2 Source/Plugins/EMMPM/EMMPMLib/Core/EMCalculation.h
  11. +58 −7 Source/Plugins/EMMPM/EMMPMLib/Core/EMMPM.cpp
  12. +1 −2 Source/Plugins/EMMPM/EMMPMLib/Core/EMMPM.h
  13. +2 −2 Source/Plugins/EMMPM/EMMPMLib/Core/MPMCalculation.cpp
  14. +1 −2 Source/Plugins/EMMPM/EMMPMLib/Core/MPMCalculation.h
  15. +1 −1 Source/Plugins/EMMPM/EMMPMLib/Core/MorphFilt.cpp
  16. +1 −1 Source/Plugins/EMMPM/EMMPMLib/Core/MorphFilt.h
  17. +4 −4 Source/Plugins/EMMPM/Test/EMMPMSegmentationTest.cpp
  18. +5 −5 Source/Plugins/Generic/GenericFilters/FindBoundaryCells.cpp
  19. +9 −9 Source/Plugins/Generic/GenericFilters/FindBoundingBoxFeatures.cpp
  20. +5 −5 Source/Plugins/Generic/GenericFilters/FindFeatureCentroids.cpp
  21. +8 −9 Source/Plugins/Generic/GenericFilters/FindFeaturePhases.cpp
  22. +8 −8 Source/Plugins/Generic/GenericFilters/FindFeaturePhasesBinary.cpp
  23. +5 −5 Source/Plugins/Generic/GenericFilters/FindSurfaceFeatures.cpp
  24. +7 −7 Source/Plugins/Generic/GenericFilters/GenerateVectorColors.cpp
  25. +28 −37 Source/Plugins/ImportExport/ImportExportFilters/AbaqusHexahedronWriter.cpp
  26. +14 −19 Source/Plugins/ImportExport/ImportExportFilters/AbaqusSurfaceMeshWriter.cpp
  27. +10 −12 Source/Plugins/ImportExport/ImportExportFilters/AvizoRectilinearCoordinateWriter.cpp
  28. +10 −12 Source/Plugins/ImportExport/ImportExportFilters/AvizoUniformCoordinateWriter.cpp
  29. +20 −27 Source/Plugins/ImportExport/ImportExportFilters/DxReader.cpp
  30. +11 −14 Source/Plugins/ImportExport/ImportExportFilters/DxWriter.cpp
  31. +28 −42 Source/Plugins/ImportExport/ImportExportFilters/FeatureInfoReader.cpp
  32. +12 −13 Source/Plugins/ImportExport/ImportExportFilters/GBCDTriangleDumper.cpp
  33. +15 −20 Source/Plugins/ImportExport/ImportExportFilters/GoldfeatherReader.cpp
  34. +12 −18 Source/Plugins/ImportExport/ImportExportFilters/ImportAvxmMDSim.cpp
  35. +9 −11 Source/Plugins/ImportExport/ImportExportFilters/LammpsFileWriter.cpp
  36. +11 −13 Source/Plugins/ImportExport/ImportExportFilters/LosAlamosFFTWriter.cpp
  37. +21 −31 Source/Plugins/ImportExport/ImportExportFilters/NodesTrianglesToStl.cpp
  38. +20 −29 Source/Plugins/ImportExport/ImportExportFilters/NodesTrianglesToVtk.cpp
  39. +17 −23 Source/Plugins/ImportExport/ImportExportFilters/PhReader.cpp
  40. +12 −15 Source/Plugins/ImportExport/ImportExportFilters/PhWriter.cpp
  41. +12 −14 Source/Plugins/ImportExport/ImportExportFilters/ReadStlFile.cpp
  42. +23 −32 Source/Plugins/ImportExport/ImportExportFilters/SPParksDumpReader.cpp
  43. +16 −18 Source/Plugins/ImportExport/ImportExportFilters/SPParksSitesWriter.cpp
  44. +22 −26 Source/Plugins/ImportExport/ImportExportFilters/SurfaceMeshToNonconformalVtk.cpp
  45. +18 −24 Source/Plugins/ImportExport/ImportExportFilters/SurfaceMeshToVtk.cpp
  46. +13 −17 Source/Plugins/ImportExport/ImportExportFilters/VASPReader.cpp
  47. +10 −14 Source/Plugins/ImportExport/ImportExportFilters/VisualizeGBCDGMT.cpp
  48. +13 −19 Source/Plugins/ImportExport/ImportExportFilters/VisualizeGBCDPoleFigure.cpp
  49. +16 −24 Source/Plugins/ImportExport/ImportExportFilters/VtkRectilinearGridWriter.cpp
  50. +26 −37 Source/Plugins/ImportExport/ImportExportFilters/VtkStructuredPointsReader.cpp
  51. +15 −18 Source/Plugins/ImportExport/ImportExportFilters/WriteStlFile.cpp
  52. +0 −199 Source/Plugins/ImportExport/ImportExportFilters/util/IOSupport.cpp
  53. +0 −94 Source/Plugins/ImportExport/ImportExportFilters/util/IOSupport.h
  54. +8 −8 Source/Plugins/ImportExport/Test/DxIOTest.cpp
  55. +10 −10 Source/Plugins/ImportExport/Test/EnsembleInfoReaderTest.cpp
  56. +4 −4 Source/Plugins/ImportExport/Test/ExportDataTest.cpp
  57. +31 −31 Source/Plugins/ImportExport/Test/FeatureInfoReaderTest.cpp
  58. +7 −7 Source/Plugins/ImportExport/Test/GenerateFeatureIds.h
  59. +8 −8 Source/Plugins/ImportExport/Test/PhIOTest.cpp
  60. +2 −2 Source/Plugins/ImportExport/Test/VtkStruturedPointsReaderTest.cpp
  61. +5 −5 Source/Plugins/OrientationAnalysis/Gui/Widgets/QEbsdReferenceFrameDialog.cpp
  62. +8 −8 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/BadDataNeighborOrientationCheck.cpp
  63. +5 −5 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ChangeAngleRepresentation.cpp
  64. +18 −30 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ConvertHexGridToSquareGrid.cpp
  65. +13 −19 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ConvertOrientations.cpp
  66. +12 −17 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/CreateEnsembleInfo.cpp
  67. +14 −19 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/CreateLambertSphere.cpp
  68. +18 −24 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/EMsoftSO3Sampler.cpp
  69. +31 −56 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/EbsdToH5Ebsd.cpp
  70. +21 −32 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/EnsembleInfoReader.cpp
  71. +7 −7 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindAvgCAxes.cpp
  72. +8 −8 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindAvgOrientations.cpp
  73. +6 −6 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindBasalLoadingFactor.cpp
  74. +12 −12 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindBoundaryStrengths.cpp
  75. +5 −5 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindCAxisLocations.cpp
  76. +10 −10 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindDistsToCharactGBs.cpp
  77. +8 −8 .../Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindFeatureNeighborCAxisMisalignments.cpp
  78. +10 −10 ...ugins/OrientationAnalysis/OrientationAnalysisFilters/FindFeatureReferenceCAxisMisorientations.cpp
  79. +10 −10 ...ce/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindFeatureReferenceMisorientations.cpp
  80. +12 −12 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindGBCD.cpp
  81. +20 −32 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindGBCDMetricBased.cpp
  82. +22 −33 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindGBPDMetricBased.cpp
  83. +8 −8 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindKernelAvgMisorientations.cpp
  84. +5 −5 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindLocalAverageCAxisMisalignments.cpp
  85. +8 −8 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindMicroTextureRegions.cpp
  86. +8 −8 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindMisorientations.cpp
  87. +8 −8 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindOrientationFieldCurl.cpp
  88. +8 −9 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindSchmids.cpp
  89. +8 −8 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindSlipTransmissionMetrics.cpp
  90. +12 −12 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindTwinBoundaries.cpp
  91. +13 −13 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/FindTwinBoundarySchmidFactors.cpp
  92. +5 −6 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateEulerColors.cpp
  93. +8 −9 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFZQuaternions.cpp
  94. +13 −13 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceIPFColoring.cpp
  95. +12 −12 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceMisorientationColoring.cpp
  96. +10 −10 ...lugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceSchuhMisorientationColoring.cpp
  97. +9 −10 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateIPFColors.cpp
  98. +5 −5 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateOrientationMatrixTranspose.cpp
  99. +5 −5 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateQuaternionConjugate.cpp
  100. +5 −6 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateRodriguesColors.cpp
  101. +14 −16 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/INLWriter.cpp
  102. +11 −15 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ImportEbsdMontage.cpp
  103. +18 −24 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ImportH5EspritData.cpp
  104. +23 −34 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ImportH5OimData.cpp
  105. +11 −11 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/NeighborOrientationCorrelation.cpp
  106. +21 −30 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ReadAngData.cpp
  107. +18 −24 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ReadCtfData.cpp
  108. +45 −72 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ReadH5Ebsd.cpp
  109. +2 −3 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/ReadH5Ebsd.h
  110. +11 −12 ...ins/OrientationAnalysis/OrientationAnalysisFilters/ReplaceElementAttributesWithNeighborValues.cpp
  111. +8 −5 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/RodriguesConvertor.cpp
  112. +5 −5 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/RotateEulerRefFrame.cpp
  113. +6 −7 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/Stereographic3D.cpp
  114. +10 −14 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/WriteIPFStandardTriangle.cpp
  115. +22 −30 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/WritePoleFigure.cpp
  116. +12 −17 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/WriteStatsGenOdfAngleFile.cpp
  117. +17 −22 Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/YSChoiAbaqusReader.cpp
  118. +5 −5 Source/Plugins/OrientationAnalysis/Test/AngCachingTest.cpp
  119. +3 −3 Source/Plugins/OrientationAnalysis/Test/AngleFileIOTest.cpp
  120. +5 −5 Source/Plugins/OrientationAnalysis/Test/CtfCachingTest.cpp
  121. +2 −2 Source/Plugins/OrientationAnalysis/Test/ImportH5EspritDataTest.cpp
  122. +12 −14 Source/Plugins/Processing/ProcessingFilters/DetectEllipsoids.cpp
  123. +6 −7 Source/Plugins/Processing/ProcessingFilters/ErodeDilateBadData.cpp
  124. +6 −7 Source/Plugins/Processing/ProcessingFilters/ErodeDilateCoordinationNumber.cpp
  125. +6 −7 Source/Plugins/Processing/ProcessingFilters/ErodeDilateMask.cpp
  126. +7 −7 Source/Plugins/Processing/ProcessingFilters/FillBadData.cpp
  127. +10 −14 Source/Plugins/Processing/ProcessingFilters/FindProjectedImageStatistics.cpp
  128. +15 −24 Source/Plugins/Processing/ProcessingFilters/FindRelativeMotionBetweenSlices.cpp
  129. +5 −6 Source/Plugins/Processing/ProcessingFilters/FixNonmanifoldVoxels.cpp
  130. +5 −5 Source/Plugins/Processing/ProcessingFilters/IdentifySample.cpp
  131. +12 −16 Source/Plugins/Processing/ProcessingFilters/MinNeighbors.cpp
  132. +12 −16 Source/Plugins/Processing/ProcessingFilters/MinSize.cpp
  133. +7 −8 Source/Plugins/Processing/ProcessingFilters/RemoveFlaggedFeatures.cpp
  134. +3 −3 Source/Plugins/Processing/Test/DetectEllipsoidsTest.cpp
  135. +9 −10 Source/Plugins/Reconstruction/ReconstructionFilters/AlignSections.cpp
  136. +7 −7 Source/Plugins/Reconstruction/ReconstructionFilters/AlignSectionsFeature.cpp
  137. +14 −19 Source/Plugins/Reconstruction/ReconstructionFilters/AlignSectionsFeatureCentroid.cpp
  138. +9 −12 Source/Plugins/Reconstruction/ReconstructionFilters/AlignSectionsList.cpp
  139. +10 −10 Source/Plugins/Reconstruction/ReconstructionFilters/AlignSectionsMisorientation.cpp
  140. +11 −11 Source/Plugins/Reconstruction/ReconstructionFilters/AlignSectionsMutualInformation.cpp
  141. +16 −17 Source/Plugins/Reconstruction/ReconstructionFilters/CAxisSegmentFeatures.cpp
  142. +6 −7 Source/Plugins/Reconstruction/ReconstructionFilters/ComputeFeatureRect.cpp
  143. +16 −17 Source/Plugins/Reconstruction/ReconstructionFilters/EBSDSegmentFeatures.cpp
  144. +5 −5 Source/Plugins/Reconstruction/ReconstructionFilters/GroupFeatures.cpp
  145. +16 −17 Source/Plugins/Reconstruction/ReconstructionFilters/GroupMicroTextureRegions.cpp
  146. +13 −13 Source/Plugins/Reconstruction/ReconstructionFilters/IdentifyMicroTextureRegions.cpp
  147. +17 −18 Source/Plugins/Reconstruction/ReconstructionFilters/MergeColonies.cpp
  148. +19 −20 Source/Plugins/Reconstruction/ReconstructionFilters/MergeTwins.cpp
  149. +16 −18 Source/Plugins/Reconstruction/ReconstructionFilters/ScalarSegmentFeatures.cpp
  150. +6 −6 Source/Plugins/Reconstruction/ReconstructionFilters/SegmentFeatures.cpp
  151. +17 −18 Source/Plugins/Reconstruction/ReconstructionFilters/SineParamsSegmentFeatures.cpp
  152. +16 −17 Source/Plugins/Reconstruction/ReconstructionFilters/VectorSegmentFeatures.cpp
  153. +3 −3 Source/Plugins/Reconstruction/Test/ComputeFeatureRectTest.cpp
  154. +15 −21 Source/Plugins/Sampling/SamplingFilters/AppendImageGeometryZSlice.cpp
  155. +15 −18 Source/Plugins/Sampling/SamplingFilters/ChangeResolution.cpp
  156. +29 −46 Source/Plugins/Sampling/SamplingFilters/CropImageGeometry.cpp
  157. +5 −5 Source/Plugins/Sampling/SamplingFilters/ExtractFlaggedFeatures.cpp
  158. +11 −14 Source/Plugins/Sampling/SamplingFilters/NearestPointFuseRegularGrids.cpp
  159. +8 −7 Source/Plugins/Sampling/SamplingFilters/RegularGridSampleSurfaceMesh.cpp
  160. +8 −10 Source/Plugins/Sampling/SamplingFilters/RegularizeZSpacing.cpp
  161. +10 −13 Source/Plugins/Sampling/SamplingFilters/RotateSampleRefFrame.cpp
  162. +14 −14 Source/Plugins/Sampling/SamplingFilters/SampleSurfaceMesh.cpp
  163. +10 −12 Source/Plugins/Sampling/SamplingFilters/SampleSurfaceMeshSpecifiedPoints.cpp
  164. +8 −7 Source/Plugins/Sampling/SamplingFilters/UncertainRegularGridSampleSurfaceMesh.cpp
  165. +4 −4 Source/Plugins/Sampling/SamplingFilters/WarpRegularGrid.cpp
  166. +25 −25 Source/Plugins/Sampling/Test/CropVolumeTest.cpp
  167. +7 −7 Source/Plugins/Sampling/Test/GenerateFeatureIds.h
  168. +12 −15 Source/Plugins/Statistics/StatisticsFilters/CalculateArrayHistogram.cpp
  169. +9 −12 Source/Plugins/Statistics/StatisticsFilters/ComputeMomentInvariants2D.cpp
  170. +10 −13 Source/Plugins/Statistics/StatisticsFilters/CorrelateValuesWithVectorDirection.cpp
  171. +7 −8 Source/Plugins/Statistics/StatisticsFilters/FindAvgScalarValueForFeatures.cpp
  172. +7 −7 Source/Plugins/Statistics/StatisticsFilters/FindBoundaryElementFractions.cpp
  173. +17 −24 Source/Plugins/Statistics/StatisticsFilters/FindDifferenceMap.cpp
  174. +8 −8 Source/Plugins/Statistics/StatisticsFilters/FindEllipsoidError.cpp
  175. +6 −6 Source/Plugins/Statistics/StatisticsFilters/FindEuclideanDistMap.cpp
  176. +6 −6 Source/Plugins/Statistics/StatisticsFilters/FindFeatureClustering.cpp
  177. +7 −9 Source/Plugins/Statistics/StatisticsFilters/FindFeatureHistogram.cpp
  178. +7 −8 Source/Plugins/Statistics/StatisticsFilters/FindLargestCrossSections.cpp
  179. +10 −10 Source/Plugins/Statistics/StatisticsFilters/FindNeighborhoods.cpp
  180. +9 −9 Source/Plugins/Statistics/StatisticsFilters/FindNeighbors.cpp
  181. +5 −5 Source/Plugins/Statistics/StatisticsFilters/FindNumFeatures.cpp
  182. +6 −6 Source/Plugins/Statistics/StatisticsFilters/FindSaltykovSizes.cpp
  183. +5 −5 Source/Plugins/Statistics/StatisticsFilters/FindShapes.cpp
  184. +11 −16 Source/Plugins/Statistics/StatisticsFilters/FindSizes.cpp
  185. +7 −9 Source/Plugins/Statistics/StatisticsFilters/FindSurfaceAreaToVolume.cpp
  186. +5 −5 Source/Plugins/Statistics/StatisticsFilters/FindVolFractions.cpp
  187. +9 −13 Source/Plugins/Statistics/StatisticsFilters/FitCorrelatedFeatureData.cpp
  188. +5 −5 Source/Plugins/Statistics/StatisticsFilters/FitFeatureData.cpp
  189. +28 −35 Source/Plugins/Statistics/StatisticsFilters/GenerateEnsembleStatistics.cpp
  190. +17 −23 Source/Plugins/Statistics/StatisticsFilters/QuiltCellData.cpp
  191. +3 −3 Source/Plugins/Statistics/Test/CalculateArrayHistogramTest.cpp
  192. +3 −3 Source/Plugins/Statistics/Test/ComputeMomentInvariants2DTest.cpp
  193. +2 −2 Source/Plugins/Statistics/Test/FindDifferenceMapTest.cpp
  194. +3 −3 Source/Plugins/Statistics/Test/FindEuclideanDistMapTest.cpp
  195. +4 −4 Source/Plugins/Statistics/Test/FindShapesTest.cpp
  196. +1 −1 Source/Plugins/Statistics/Test/FindSizesTest.cpp
  197. +33 −37 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/BinaryNodesTrianglesReader.cpp
  198. +14 −14 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/FeatureFaceCurvatureFilter.cpp
  199. +8 −8 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/FindTriangleGeomCentroids.cpp
  200. +9 −9 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/FindTriangleGeomNeighbors.cpp
  201. +5 −5 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/FindTriangleGeomShapes.cpp
  202. +16 −7 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/FindTriangleGeomSizes.cpp
  203. +9 −11 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/GenerateGeometryConnectivity.cpp
  204. +14 −17 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/LaplacianSmoothing.cpp
  205. +11 −14 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/M3CSliceBySlice.cpp
  206. +14 −24 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/MovingFiniteElementSmoothing.cpp
  207. +19 −22 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/QuickSurfaceMesh.cpp
  208. +3 −3 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/ReverseTriangleWinding.cpp
  209. +7 −7 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/SharedFeatureFaceFilter.cpp
  210. +7 −7 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/TriangleAreaFilter.cpp
  211. +7 −7 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/TriangleCentroidFilter.cpp
  212. +7 −7 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/TriangleDihedralAngleFilter.cpp
  213. +7 −7 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/TriangleNormalFilter.cpp
  214. +12 −19 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/Unsupported/GenerateNodeTriangleConnectivity.cpp
  215. +46 −50 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/Unsupported/M3CEntireVolume.cpp
  216. +15 −24 Source/Plugins/SurfaceMeshing/SurfaceMeshingFilters/VerifyTriangleWinding.cpp
  217. +1 −1 Source/Plugins/SurfaceMeshing/Test/FindTriangleGeomCentroidsTest.cpp
  218. +1 −1 Source/Plugins/SurfaceMeshing/Test/FindTriangleGeomNeighborsTest.cpp
  219. +5 −5 Source/Plugins/SurfaceMeshing/Test/FindTriangleGeomShapesTest.cpp
  220. +1 −1 Source/Plugins/SurfaceMeshing/Test/FindTriangleGeomSizesTest.cpp
  221. +3 −3 Source/Plugins/SurfaceMeshing/Test/QuickSurfaceMeshTest.cpp
  222. +39 −6 Source/Plugins/SyntheticBuilding/Gui/FilterParameterWidgets/InitializeSyntheticVolumeWidget.cpp
  223. +1 −1 Source/Plugins/SyntheticBuilding/Gui/FilterParameterWidgets/InitializeSyntheticVolumeWidget.h
  224. +2 −4 Source/Plugins/SyntheticBuilding/Gui/FilterParameterWidgets/StatsGeneratorWidget.cpp
  225. +7 −8 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/AddBadData.cpp
  226. +7 −7 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/AddOrientationNoise.cpp
  227. +13 −15 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/EstablishMatrixPhase.cpp
  228. +7 −7 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/EstablishShapeTypes.cpp
  229. +18 −24 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/GeneratePrecipitateStatsData.cpp
  230. +12 −17 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/GeneratePrimaryStatsData.cpp
  231. +11 −13 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/InitializeSyntheticVolume.cpp
  232. +13 −15 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/InsertAtoms.cpp
  233. +44 −57 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/InsertPrecipitatePhases.cpp
  234. +5 −5 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/JumbleOrientations.cpp
  235. +19 −24 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/MatchCrystallography.cpp
  236. +48 −61 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/PackPrimaryPhases.cpp
  237. +5 −6 Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/StatsGeneratorFilter.cpp
  238. +1 −1 Test/PipelineRunnerTest.cpp
  239. +3 −3 Test/PreFlightTest.cpp
  240. +1 −1 Tools/CMakeLists.txt
  241. +62 −59 Tools/SandboxTool.cpp
  242. +527 −0 Tools/SandboxTool/MassReplaceMessagingCalls.hpp
  243. +2 −1 Tools/SandboxTool/Sandbox.h
  244. +4 −4 Tools/Unused/H5VoxelToVtk.cpp
@@ -68,7 +68,7 @@ class EbsdLib_EXPORT EbsdImporter
/**
* @brief Sets an error condition
*/
EBSD_VIRTUAL_INSTANCE_PROPERTY(int, ErrorCondition)
EBSD_VIRTUAL_INSTANCE_PROPERTY(int, ErrorCode)

/**
* @brief Cancel the operation
@@ -133,9 +133,9 @@ class EbsdLib_EXPORT EbsdImporter
virtual void setFileVersion(uint32_t version) = 0;

protected:
EbsdImporter() :
m_ErrorCondition(0),
m_Cancel(false)
EbsdImporter()
: m_ErrorCode(0)
, m_Cancel(false)
{
m_PipelineMessage = "";
}
@@ -140,7 +140,7 @@ int H5CtfImporter::importFile(hid_t fileId, int64_t z, const QString& ctfFile)
{
herr_t err = -1;
setCancel(false);
setErrorCondition(0);
setErrorCode(0);
setPipelineMessage("");

// std::cout << "H5CtfImporter: Importing " << ctfFile << std::endl;
@@ -176,7 +176,7 @@ int H5CtfImporter::importFile(hid_t fileId, int64_t z, const QString& ctfFile)
ss = reader.getErrorMessage();
}
setPipelineMessage(ss);
setErrorCondition(err);
setErrorCode(err);
progressMessage(ss, 100);


@@ -240,7 +240,7 @@ int H5CtfImporter::writeSliceData(hid_t fileId, CtfReader& reader, int z, int ac
{
QString ss = QObject::tr("H5CtfImporter Error: A Group for Z index %1 could not be created. Please check other error messages from the HDF5 library for possible reasons.").arg(z);
setPipelineMessage(ss);
setErrorCondition(-500);
setErrorCode(-500);
return -1;
}

@@ -251,7 +251,7 @@ int H5CtfImporter::writeSliceData(hid_t fileId, CtfReader& reader, int z, int ac
progressMessage(ss, 100);
err = H5Gclose(ctfGroup);
setPipelineMessage(ss);
setErrorCondition(-600);
setErrorCode(-600);
return -1;
}

@@ -297,7 +297,7 @@ int H5CtfImporter::writeSliceData(hid_t fileId, CtfReader& reader, int z, int ac
err = H5Gclose(gid);
err = H5Gclose(ctfGroup);
setPipelineMessage(ss);
setErrorCondition(-600);
setErrorCode(-600);
return -1;
}
err = writePhaseData(reader, phasesGid);
@@ -320,7 +320,7 @@ int H5CtfImporter::writeSliceData(hid_t fileId, CtfReader& reader, int z, int ac
progressMessage(ss, 100);
err = H5Gclose(ctfGroup);
setPipelineMessage(ss);
setErrorCondition(-700);
setErrorCode(-700);
return -1;
}

@@ -145,7 +145,7 @@ int H5AngImporter::importFile(hid_t fileId, int64_t z, const QString& angFile)
{
herr_t err = -1;
setCancel(false);
setErrorCondition(0);
setErrorCode(0);
setPipelineMessage("");
QString streamBuf;
QTextStream ss(&streamBuf);
@@ -190,7 +190,7 @@ int H5AngImporter::importFile(hid_t fileId, int64_t z, const QString& angFile)
}
setPipelineMessage( *(ss.string()));

setErrorCondition(err);
setErrorCode(err);
progressMessage(*(ss.string()), 100);
return -1;
}
@@ -234,7 +234,7 @@ int H5AngImporter::importFile(hid_t fileId, int64_t z, const QString& angFile)
ss << "H5AngImporter Error: A Group for Z index " << z << " could not be created."
<< " Please check other error messages from the HDF5 library for possible reasons.";
setPipelineMessage( *(ss.string() ));
setErrorCondition(-500);
setErrorCode(-500);
return -1;
}

@@ -247,7 +247,7 @@ int H5AngImporter::importFile(hid_t fileId, int64_t z, const QString& angFile)
progressMessage(ss.string(), 100);
err = H5Gclose(angGroup);
setPipelineMessage( *(ss.string()) );
setErrorCondition(-600);
setErrorCode(-600);
return -1;
}
WRITE_ANG_HEADER_DATA(reader, float, TEMpixPerum, Ebsd::Ang::TEMPIXPerUM)
@@ -292,7 +292,7 @@ int H5AngImporter::importFile(hid_t fileId, int64_t z, const QString& angFile)
progressMessage(ss.string(), 100);
err = H5Gclose(angGroup);
setPipelineMessage(*(ss.string()));
setErrorCondition(-700);
setErrorCode(-700);
return -1;
}

@@ -275,10 +275,10 @@ class OrientationTransformsTest
}

Observer obs;
obs.connect(convFilt.get(), SIGNAL(filterGeneratedMessage(const PipelineMessage&)), &obs, SLOT(processPipelineMessage(const PipelineMessage&)));
obs.connect(convFilt.get(), SIGNAL(messageGenerated(const AbstractMessage::Pointer&)), &obs, SLOT(processPipelineMessage(const AbstractMessage::Pointer&)));

convFilt->execute();
int err = convFilt->getErrorCondition();
int err = convFilt->getErrorCode();
DREAM3D_REQUIRED(err, >=, 0)

return outputName;
@@ -456,11 +456,11 @@ class OrientationTransformsTest
}

// Observer obs;
// obs.connect(diffMapFilt.get(), SIGNAL(filterGeneratedMessage(const PipelineMessage&)),
// &obs, SLOT(processPipelineMessage(const PipelineMessage&)));
// obs.connect(diffMapFilt.get(), SIGNAL(messageGenerated(const AbstractMessage::Pointer&)),
// &obs, SLOT(processPipelineMessage(const AbstractMessage::Pointer&)));

diffMapFilt->execute();
int err = diffMapFilt->getErrorCondition();
int err = diffMapFilt->getErrorCode();
DREAM3D_REQUIRED(err, >=, 0)

DataArrayPath daPath(DCName, AMName, diffMapArrayName);
@@ -576,7 +576,7 @@ class OrientationTransformsTest
qDebug() << "Unable to set property OutputFile";
}
writer->execute();
int err = writer->getErrorCondition();
int err = writer->getErrorCode();
DREAM3D_REQUIRED(err, >=, 0)
}
#endif
@@ -57,10 +57,60 @@
#include "SIMPLib/FilterParameters/LinkedBooleanFilterParameter.h"
#include "SIMPLib/FilterParameters/SeparatorFilterParameter.h"
#include "SIMPLib/Geometry/ImageGeom.h"
#include "SIMPLib/Messages/AbstractMessageHandler.h"
#include "SIMPLib/Messages/GenericProgressMessage.h"
#include "SIMPLib/Messages/GenericStatusMessage.h"
#include "SIMPLib/Messages/GenericErrorMessage.h"
#include "SIMPLib/Messages/GenericWarningMessage.h"
#include "SIMPLib/SIMPLibVersion.h"

#include "EMMPM/EMMPMVersion.h"

/**
* @brief This message handler is used by EMMPMFilter instances to re-emit incoming generic messages from the
* EMMPM observable object as its own filter messages
*/
class EMMPMFilterMessageHandler : public AbstractMessageHandler
{
public:
explicit EMMPMFilterMessageHandler(EMMPMFilter* filter) : m_Filter(filter) {}

/**
* @brief Re-emits incoming GenericProgressMessages as FilterProgressMessages.
*/
void processMessage(const GenericProgressMessage* msg) const override
{
emit m_Filter->notifyProgressMessage(msg->getProgressValue(), msg->getMessageText());
}

/**
* @brief Re-emits incoming GenericStatusMessages as FilterStatusMessages.
*/
void processMessage(const GenericStatusMessage* msg) const override
{
emit m_Filter->notifyStatusMessage(msg->getMessageText());
}

/**
* @brief Re-emits incoming GenericErrorMessages as FilterErrorMessages.
*/
void processMessage(const GenericErrorMessage* msg) const override
{
emit m_Filter->setErrorCondition(msg->getCode(), msg->getMessageText());
}

/**
* @brief Re-emits incoming GenericWarningMessages as FilterWarningMessages.
*/
void processMessage(const GenericWarningMessage* msg) const override
{
emit m_Filter->setWarningCondition(msg->getCode(), msg->getMessageText());
}

private:
EMMPMFilter* m_Filter = nullptr;
};

/* Create Enumerations to allow the created Attribute Arrays to take part in renaming */
enum createdPathID : RenameDataPath::DataID_t
{
@@ -211,8 +261,8 @@ void EMMPMFilter::initialize()
// -----------------------------------------------------------------------------
void EMMPMFilter::dataCheck()
{
setErrorCondition(0);
setWarningCondition(0);
clearErrorCode();
clearWarningCode();

getDataContainerArray()->getPrereqGeometryFromDataContainer<ImageGeom, AbstractFilter>(this, getInputDataArrayPath().getDataContainerName());

@@ -232,15 +282,13 @@ void EMMPMFilter::dataCheck()

if(getNumClasses() > 15)
{
setErrorCondition(-89100);
QString ss = QObject::tr("The maximum number of classes is 15");
notifyErrorMessage(getHumanLabel(), ss, getErrorCondition());
setErrorCondition(-89100, ss);
}
if(getNumClasses() < 2)
{
setErrorCondition(-89101);
QString ss = QObject::tr("The minimum number of classes is 2");
notifyErrorMessage(getHumanLabel(), ss, getErrorCondition());
setErrorCondition(-89101, ss);
}
}

@@ -263,10 +311,10 @@ void EMMPMFilter::preflight()
// -----------------------------------------------------------------------------
void EMMPMFilter::execute()
{
setErrorCondition(0);
setWarningCondition(0);
clearErrorCode();
clearWarningCode();
dataCheck();
if(getErrorCondition() < 0)
if(getErrorCode() < 0)
{
return;
}
@@ -379,10 +427,9 @@ void EMMPMFilter::segment(EMMPM_InitializationType initType)
emmpm->setData(m_Data);
emmpm->setStatsDelegate(statsDelegate.get());
emmpm->setInitializationFunction(initFunction);
emmpm->setMessagePrefix(getMessagePrefix());

// Connect up the Error/Warning/Progress object so the filter can report those things
connect(emmpm.get(), SIGNAL(filterGeneratedMessage(const PipelineMessage&)), this, SLOT(broadcastPipelineMessage(const PipelineMessage&)));
connect(emmpm.get(), SIGNAL(messageGenerated(const AbstractMessage::Pointer&)), this, SLOT(handleEmmpmMessage(const AbstractMessage::Pointer&)));

emmpm->execute();

@@ -396,6 +443,15 @@ void EMMPMFilter::segment(EMMPM_InitializationType initType)
m_PreviousSigma.resize(getNumClasses() * m_Data->dims);
}

// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void EMMPMFilter::handleEmmpmMessage(const AbstractMessage::Pointer &msg)
{
EMMPMFilterMessageHandler msgHandler(this);
msg->visit(&msgHandler);
}

// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
@@ -45,6 +45,8 @@

#include "EMMPM/EMMPMDLLExport.h"

class EMMPMFilterMessageHandler;

/**
* @brief The EMMPMFilter class. See [Filter documentation](@ref emmpmfilter) for details.
*/
@@ -75,6 +77,8 @@ class EMMPM_EXPORT EMMPMFilter : public AbstractFilter

~EMMPMFilter() override;

friend EMMPMFilterMessageHandler;

SIMPL_FILTER_PARAMETER(DataArrayPath, InputDataArrayPath)
Q_PROPERTY(DataArrayPath InputDataArrayPath READ getInputDataArrayPath WRITE setInputDataArrayPath)

@@ -252,6 +256,12 @@ class EMMPM_EXPORT EMMPMFilter : public AbstractFilter
*/
void setPreviousSigma(std::vector<float> prevSigma);

/**
* @brief handleEmmpmMessage
* @param msg
*/
virtual void handleEmmpmMessage(const AbstractMessage::Pointer &msg);

private:
DEFINE_DATAARRAY_VARIABLE(uint8_t, InputImage)
DEFINE_DATAARRAY_VARIABLE(uint8_t, OutputImage)
Oops, something went wrong.

0 comments on commit 67f3fd6

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