diff --git a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceMisorientationColoring.cpp b/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceMisorientationColoring.cpp deleted file mode 100644 index 2736e83343..0000000000 --- a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceMisorientationColoring.cpp +++ /dev/null @@ -1,503 +0,0 @@ -/* ============================================================================ - * Copyright (c) 2009-2016 BlueQuartz Software, LLC - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, this - * list of conditions and the following disclaimer in the documentation and/or - * other materials provided with the distribution. - * - * Neither the name of BlueQuartz Software, the US Air Force, nor the names of its - * contributors may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The code contained herein was partially funded by the following contracts: - * United States Air Force Prime Contract FA8650-07-D-5800 - * United States Air Force Prime Contract FA8650-10-D-5210 - * United States Prime Contract Navy N00173-07-C-2068 - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#include "GenerateFaceMisorientationColoring.h" - -#include - -#include "SIMPLib/DataContainers/DataContainerArray.h" -#include "SIMPLib/FilterParameters/AbstractFilterParametersReader.h" -#include "SIMPLib/FilterParameters/DataArraySelectionFilterParameter.h" -#include "SIMPLib/FilterParameters/LinkedPathCreationFilterParameter.h" -#include "SIMPLib/FilterParameters/SeparatorFilterParameter.h" -#include "SIMPLib/FilterParameters/StringFilterParameter.h" -#include "SIMPLib/Geometry/ImageGeom.h" -#include "SIMPLib/Geometry/TriangleGeom.h" -#include "SIMPLib/Math/SIMPLibMath.h" - -#include "EbsdLib/Core/EbsdLibConstants.h" -#include "EbsdLib/LaueOps/CubicLowOps.h" -#include "EbsdLib/LaueOps/CubicOps.h" -#include "EbsdLib/LaueOps/HexagonalOps.h" -#include "EbsdLib/LaueOps/LaueOps.h" -#include "EbsdLib/LaueOps/MonoclinicOps.h" -#include "EbsdLib/LaueOps/OrthoRhombicOps.h" -#include "EbsdLib/LaueOps/TetragonalOps.h" -#include "EbsdLib/LaueOps/TrigonalOps.h" - -#include "OrientationAnalysis/OrientationAnalysisConstants.h" -#include "OrientationAnalysis/OrientationAnalysisVersion.h" - -#ifdef SIMPL_USE_PARALLEL_ALGORITHMS -#include -#include -#include -#endif - -using LaueOpsShPtrType = std::shared_ptr; -using LaueOpsContainer = std::vector; - -/** - * @brief The CalculateFaceMisorientationColorsImpl class implements a threaded algorithm that computes the misorientation - * colors for the given list of surface mesh labels - */ -class CalculateFaceMisorientationColorsImpl -{ - int32_t* m_Labels; - int32_t* m_Phases; - float* m_Quats; - float* m_Colors; - unsigned int* m_CrystalStructures; - LaueOpsContainer m_OrientationOps; - -public: - CalculateFaceMisorientationColorsImpl(int32_t* labels, int32_t* phases, float* quats, float* colors, unsigned int* crystalStructures) - : m_Labels(labels) - , m_Phases(phases) - , m_Quats(quats) - , m_Colors(colors) - , m_CrystalStructures(crystalStructures) - { - m_OrientationOps = LaueOps::GetAllOrientationOps(); - } - virtual ~CalculateFaceMisorientationColorsImpl() = default; - - void generate(size_t start, size_t end) const - { - int32_t feature1 = 0, feature2 = 0, phase1 = 0, phase2 = 0; - // QuatF q1 = QuaternionMathF::New(); - // QuatF q2 = QuaternionMathF::New(); - // QuatF* quats = reinterpret_cast(m_Quats); - - for(size_t i = start; i < end; i++) - { - feature1 = m_Labels[2 * i]; - feature2 = m_Labels[2 * i + 1]; - if(feature1 > 0) - { - phase1 = m_Phases[feature1]; - } - else - { - phase1 = 0; - } - if(feature2 > 0) - { - phase2 = m_Phases[feature2]; - } - else - { - phase2 = 0; - } - if(phase1 > 0 && phase1 == phase2) - { - if((m_CrystalStructures[phase1] == EbsdLib::CrystalStructure::Hexagonal_High) || (m_CrystalStructures[phase1] == EbsdLib::CrystalStructure::Cubic_High)) - { - float* quatPtr = m_Quats + feature1 * 4; - QuatD q1(quatPtr[0], quatPtr[1], quatPtr[2], quatPtr[3]); - quatPtr = m_Quats + feature2 * 4; - QuatD q2(quatPtr[0], quatPtr[1], quatPtr[2], quatPtr[3]); - // double w = 0.0f, n1 = 0.0f, n2 = 0.0f, n3 = 0.0f; - OrientationD axisAngle = m_OrientationOps[phase1]->calculateMisorientation(q1, q2); - - m_Colors[3 * i + 0] = axisAngle[0] * (axisAngle[3] * SIMPLib::Constants::k_180OverPiD); - m_Colors[3 * i + 1] = axisAngle[1] * (axisAngle[3] * SIMPLib::Constants::k_180OverPiD); - m_Colors[3 * i + 2] = axisAngle[2] * (axisAngle[3] * SIMPLib::Constants::k_180OverPiD); - } - } - else - { - m_Colors[3 * i + 0] = 0; - m_Colors[3 * i + 1] = 0; - m_Colors[3 * i + 2] = 0; - } - } - } - -#ifdef SIMPL_USE_PARALLEL_ALGORITHMS - /** - * @brief operator () This is called from the TBB stye of code - * @param r The range to compute the values - */ - void operator()(const tbb::blocked_range& r) const - { - generate(r.begin(), r.end()); - } -#endif -}; - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -GenerateFaceMisorientationColoring::GenerateFaceMisorientationColoring() = default; - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -GenerateFaceMisorientationColoring::~GenerateFaceMisorientationColoring() = default; - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::setupFilterParameters() -{ - FilterParameterVectorType parameters; - parameters.push_back(SeparatorFilterParameter::Create("Face Data", FilterParameter::Category::RequiredArray)); - { - DataArraySelectionFilterParameter::RequirementType req = DataArraySelectionFilterParameter::CreateRequirement(SIMPL::TypeNames::Int32, 2, AttributeMatrix::Type::Face, IGeometry::Type::Triangle); - parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Face Labels", SurfaceMeshFaceLabelsArrayPath, FilterParameter::Category::RequiredArray, GenerateFaceMisorientationColoring, req)); - } - parameters.push_back(SeparatorFilterParameter::Create("Cell Feature Data", FilterParameter::Category::RequiredArray)); - { - DataArraySelectionFilterParameter::RequirementType req = - DataArraySelectionFilterParameter::CreateRequirement(SIMPL::TypeNames::Float, 4, AttributeMatrix::Type::CellFeature, IGeometry::Type::Image); - - parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Average Quaternions", AvgQuatsArrayPath, FilterParameter::Category::RequiredArray, GenerateFaceMisorientationColoring, req)); - } - { - DataArraySelectionFilterParameter::RequirementType req = - DataArraySelectionFilterParameter::CreateRequirement(SIMPL::TypeNames::Int32, 1, AttributeMatrix::Type::CellFeature, IGeometry::Type::Image); - - parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Phases", FeaturePhasesArrayPath, FilterParameter::Category::RequiredArray, GenerateFaceMisorientationColoring, req)); - } - parameters.push_back(SeparatorFilterParameter::Create("Cell Ensemble Data", FilterParameter::Category::RequiredArray)); - { - DataArraySelectionFilterParameter::RequirementType req = - DataArraySelectionFilterParameter::CreateRequirement(SIMPL::TypeNames::UInt32, 1, AttributeMatrix::Type::CellEnsemble, IGeometry::Type::Image); - - parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Crystal Structures", CrystalStructuresArrayPath, FilterParameter::Category::RequiredArray, GenerateFaceMisorientationColoring, req)); - } - parameters.push_back(SeparatorFilterParameter::Create("Face Data", FilterParameter::Category::CreatedArray)); - parameters.push_back(SIMPL_NEW_DA_WITH_LINKED_AM_FP("Misorientation Colors", SurfaceMeshFaceMisorientationColorsArrayName, SurfaceMeshFaceLabelsArrayPath, SurfaceMeshFaceLabelsArrayPath, - FilterParameter::Category::CreatedArray, GenerateFaceMisorientationColoring)); - - setFilterParameters(parameters); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::readFilterParameters(AbstractFilterParametersReader* reader, int index) -{ - reader->openFilterGroup(this, index); - setSurfaceMeshFaceMisorientationColorsArrayName(reader->readString("SurfaceMeshFaceMisorientationColorsArrayName", getSurfaceMeshFaceMisorientationColorsArrayName())); - setCrystalStructuresArrayPath(reader->readDataArrayPath("CrystalStructuresArrayPath", getCrystalStructuresArrayPath())); - setFeaturePhasesArrayPath(reader->readDataArrayPath("FeaturePhasesArrayPath", getFeaturePhasesArrayPath())); - setAvgQuatsArrayPath(reader->readDataArrayPath("AvgQuatsArrayPath", getAvgQuatsArrayPath())); - setSurfaceMeshFaceLabelsArrayPath(reader->readDataArrayPath("SurfaceMeshFaceLabelsArrayPath", getSurfaceMeshFaceLabelsArrayPath())); - reader->closeFilterGroup(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::dataCheckSurfaceMesh() -{ - DataArrayPath tempPath; - - TriangleGeom::Pointer triangles = getDataContainerArray()->getPrereqGeometryFromDataContainer(this, m_SurfaceMeshFaceLabelsArrayPath.getDataContainerName()); - - QVector dataArrays; - - if(getErrorCode() >= 0) - { - dataArrays.push_back(triangles->getTriangles()); - } - - std::vector cDims(1, 2); - m_SurfaceMeshFaceLabelsPtr = getDataContainerArray()->getPrereqArrayFromPath>(this, getSurfaceMeshFaceLabelsArrayPath(), cDims); - if(nullptr != m_SurfaceMeshFaceLabelsPtr.lock()) - { - m_SurfaceMeshFaceLabels = m_SurfaceMeshFaceLabelsPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ - if(getErrorCode() >= 0) - { - dataArrays.push_back(m_SurfaceMeshFaceLabelsPtr.lock()); - } - - cDims[0] = 3; - tempPath.update(m_SurfaceMeshFaceLabelsArrayPath.getDataContainerName(), m_SurfaceMeshFaceLabelsArrayPath.getAttributeMatrixName(), getSurfaceMeshFaceMisorientationColorsArrayName()); - m_SurfaceMeshFaceMisorientationColorsPtr = getDataContainerArray()->createNonPrereqArrayFromPath>(this, tempPath, 0, cDims); - if(nullptr != m_SurfaceMeshFaceMisorientationColorsPtr.lock()) - { - m_SurfaceMeshFaceMisorientationColors = m_SurfaceMeshFaceMisorientationColorsPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ - - getDataContainerArray()->validateNumberOfTuples(this, dataArrays); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::dataCheckVoxel() -{ - QVector dataArrayPaths; - - getDataContainerArray()->getPrereqGeometryFromDataContainer(this, getAvgQuatsArrayPath().getDataContainerName()); - - std::vector cDims(1, 4); - m_AvgQuatsPtr = getDataContainerArray()->getPrereqArrayFromPath>(this, getAvgQuatsArrayPath(), cDims); - if(nullptr != m_AvgQuatsPtr.lock()) - { - m_AvgQuats = m_AvgQuatsPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ - if(getErrorCode() >= 0) - { - dataArrayPaths.push_back(getAvgQuatsArrayPath()); - } - - cDims[0] = 1; - m_FeaturePhasesPtr = getDataContainerArray()->getPrereqArrayFromPath>(this, getFeaturePhasesArrayPath(), cDims); - if(nullptr != m_FeaturePhasesPtr.lock()) - { - m_FeaturePhases = m_FeaturePhasesPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ - if(getErrorCode() >= 0) - { - dataArrayPaths.push_back(getFeaturePhasesArrayPath()); - } - - m_CrystalStructuresPtr = getDataContainerArray()->getPrereqArrayFromPath>(this, getCrystalStructuresArrayPath(), cDims); - if(nullptr != m_CrystalStructuresPtr.lock()) - { - m_CrystalStructures = m_CrystalStructuresPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ - - getDataContainerArray()->validateNumberOfTuples(this, dataArrayPaths); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::dataCheck() -{ - clearErrorCode(); - clearWarningCode(); - - dataCheckSurfaceMesh(); - dataCheckVoxel(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::execute() -{ - clearErrorCode(); - clearWarningCode(); - dataCheckSurfaceMesh(); - if(getErrorCode() < 0) - { - return; - } - dataCheckVoxel(); - if(getErrorCode() < 0) - { - return; - } - - int64_t numTriangles = m_SurfaceMeshFaceLabelsPtr.lock()->getNumberOfTuples(); - -#ifdef SIMPL_USE_PARALLEL_ALGORITHMS - if(true) - { - tbb::parallel_for(tbb::blocked_range(0, numTriangles), - CalculateFaceMisorientationColorsImpl(m_SurfaceMeshFaceLabels, m_FeaturePhases, m_AvgQuats, m_SurfaceMeshFaceMisorientationColors, m_CrystalStructures), tbb::auto_partitioner()); - } - else -#endif - { - CalculateFaceMisorientationColorsImpl serial(m_SurfaceMeshFaceLabels, m_FeaturePhases, m_AvgQuats, m_SurfaceMeshFaceMisorientationColors, m_CrystalStructures); - serial.generate(0, numTriangles); - } -} -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -AbstractFilter::Pointer GenerateFaceMisorientationColoring::newFilterInstance(bool copyFilterParameters) const -{ - GenerateFaceMisorientationColoring::Pointer filter = GenerateFaceMisorientationColoring::New(); - if(copyFilterParameters) - { - copyFilterParameterInstanceVariables(filter.get()); - } - return filter; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::getCompiledLibraryName() const -{ - return OrientationAnalysisConstants::OrientationAnalysisBaseName; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::getBrandingString() const -{ - return "OrientationAnalysis"; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::getFilterVersion() const -{ - QString version; - QTextStream vStream(&version); - vStream << OrientationAnalysis::Version::Major() << "." << OrientationAnalysis::Version::Minor() << "." << OrientationAnalysis::Version::Patch(); - return version; -} -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::getGroupName() const -{ - return SIMPL::FilterGroups::ProcessingFilters; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QUuid GenerateFaceMisorientationColoring::getUuid() const -{ - return QUuid("{7cd30864-7bcf-5c10-aea7-d107373e2d40}"); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::getSubGroupName() const -{ - return SIMPL::FilterSubGroups::CrystallographyFilters; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::getHumanLabel() const -{ - return "Generate Misorientation Colors (Face)"; -} - -// ----------------------------------------------------------------------------- -GenerateFaceMisorientationColoring::Pointer GenerateFaceMisorientationColoring::NullPointer() -{ - return Pointer(static_cast(nullptr)); -} - -// ----------------------------------------------------------------------------- -std::shared_ptr GenerateFaceMisorientationColoring::New() -{ - struct make_shared_enabler : public GenerateFaceMisorientationColoring - { - }; - std::shared_ptr val = std::make_shared(); - val->setupFilterParameters(); - return val; -} - -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::getNameOfClass() const -{ - return QString("GenerateFaceMisorientationColoring"); -} - -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::ClassName() -{ - return QString("GenerateFaceMisorientationColoring"); -} - -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::setSurfaceMeshFaceLabelsArrayPath(const DataArrayPath& value) -{ - m_SurfaceMeshFaceLabelsArrayPath = value; -} - -// ----------------------------------------------------------------------------- -DataArrayPath GenerateFaceMisorientationColoring::getSurfaceMeshFaceLabelsArrayPath() const -{ - return m_SurfaceMeshFaceLabelsArrayPath; -} - -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::setAvgQuatsArrayPath(const DataArrayPath& value) -{ - m_AvgQuatsArrayPath = value; -} - -// ----------------------------------------------------------------------------- -DataArrayPath GenerateFaceMisorientationColoring::getAvgQuatsArrayPath() const -{ - return m_AvgQuatsArrayPath; -} - -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::setFeaturePhasesArrayPath(const DataArrayPath& value) -{ - m_FeaturePhasesArrayPath = value; -} - -// ----------------------------------------------------------------------------- -DataArrayPath GenerateFaceMisorientationColoring::getFeaturePhasesArrayPath() const -{ - return m_FeaturePhasesArrayPath; -} - -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::setCrystalStructuresArrayPath(const DataArrayPath& value) -{ - m_CrystalStructuresArrayPath = value; -} - -// ----------------------------------------------------------------------------- -DataArrayPath GenerateFaceMisorientationColoring::getCrystalStructuresArrayPath() const -{ - return m_CrystalStructuresArrayPath; -} - -// ----------------------------------------------------------------------------- -void GenerateFaceMisorientationColoring::setSurfaceMeshFaceMisorientationColorsArrayName(const QString& value) -{ - m_SurfaceMeshFaceMisorientationColorsArrayName = value; -} - -// ----------------------------------------------------------------------------- -QString GenerateFaceMisorientationColoring::getSurfaceMeshFaceMisorientationColorsArrayName() const -{ - return m_SurfaceMeshFaceMisorientationColorsArrayName; -} diff --git a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceMisorientationColoring.h b/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceMisorientationColoring.h deleted file mode 100644 index c2d3eee9fd..0000000000 --- a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceMisorientationColoring.h +++ /dev/null @@ -1,252 +0,0 @@ -/* ============================================================================ - * Copyright (c) 2009-2016 BlueQuartz Software, LLC - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, this - * list of conditions and the following disclaimer in the documentation and/or - * other materials provided with the distribution. - * - * Neither the name of BlueQuartz Software, the US Air Force, nor the names of its - * contributors may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The code contained herein was partially funded by the following contracts: - * United States Air Force Prime Contract FA8650-07-D-5800 - * United States Air Force Prime Contract FA8650-10-D-5210 - * United States Prime Contract Navy N00173-07-C-2068 - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -#pragma once - -#include - -#include "SIMPLib/SIMPLib.h" -#include "SIMPLib/DataArrays/DataArray.hpp" -#include "SIMPLib/Filtering/AbstractFilter.h" - -#include "OrientationAnalysis/OrientationAnalysisDLLExport.h" - -/** - * @brief The GenerateFaceMisorientationColoring class. See [Filter documentation](@ref generatefacemisorientationcoloring) for details. - */ -class OrientationAnalysis_EXPORT GenerateFaceMisorientationColoring : public AbstractFilter -{ - Q_OBJECT - - // Start Python bindings declarations - PYB11_BEGIN_BINDINGS(GenerateFaceMisorientationColoring SUPERCLASS AbstractFilter) - PYB11_FILTER() - PYB11_SHARED_POINTERS(GenerateFaceMisorientationColoring) - PYB11_FILTER_NEW_MACRO(GenerateFaceMisorientationColoring) - PYB11_PROPERTY(DataArrayPath SurfaceMeshFaceLabelsArrayPath READ getSurfaceMeshFaceLabelsArrayPath WRITE setSurfaceMeshFaceLabelsArrayPath) - PYB11_PROPERTY(DataArrayPath AvgQuatsArrayPath READ getAvgQuatsArrayPath WRITE setAvgQuatsArrayPath) - PYB11_PROPERTY(DataArrayPath FeaturePhasesArrayPath READ getFeaturePhasesArrayPath WRITE setFeaturePhasesArrayPath) - PYB11_PROPERTY(DataArrayPath CrystalStructuresArrayPath READ getCrystalStructuresArrayPath WRITE setCrystalStructuresArrayPath) - PYB11_PROPERTY(QString SurfaceMeshFaceMisorientationColorsArrayName READ getSurfaceMeshFaceMisorientationColorsArrayName WRITE setSurfaceMeshFaceMisorientationColorsArrayName) - PYB11_END_BINDINGS() - // End Python bindings declarations - -public: - using Self = GenerateFaceMisorientationColoring; - using Pointer = std::shared_ptr; - using ConstPointer = std::shared_ptr; - using WeakPointer = std::weak_ptr; - using ConstWeakPointer = std::weak_ptr; - - /** - * @brief Returns a NullPointer wrapped by a shared_ptr<> - * @return - */ - static Pointer NullPointer(); - - /** - * @brief Creates a new object wrapped in a shared_ptr<> - * @return - */ - static Pointer New(); - - /** - * @brief Returns the name of the class for GenerateFaceMisorientationColoring - */ - QString getNameOfClass() const override; - /** - * @brief Returns the name of the class for GenerateFaceMisorientationColoring - */ - static QString ClassName(); - - ~GenerateFaceMisorientationColoring() override; - - /** - * @brief Setter property for SurfaceMeshFaceLabelsArrayPath - */ - void setSurfaceMeshFaceLabelsArrayPath(const DataArrayPath& value); - /** - * @brief Getter property for SurfaceMeshFaceLabelsArrayPath - * @return Value of SurfaceMeshFaceLabelsArrayPath - */ - DataArrayPath getSurfaceMeshFaceLabelsArrayPath() const; - Q_PROPERTY(DataArrayPath SurfaceMeshFaceLabelsArrayPath READ getSurfaceMeshFaceLabelsArrayPath WRITE setSurfaceMeshFaceLabelsArrayPath) - - /** - * @brief Setter property for AvgQuatsArrayPath - */ - void setAvgQuatsArrayPath(const DataArrayPath& value); - /** - * @brief Getter property for AvgQuatsArrayPath - * @return Value of AvgQuatsArrayPath - */ - DataArrayPath getAvgQuatsArrayPath() const; - Q_PROPERTY(DataArrayPath AvgQuatsArrayPath READ getAvgQuatsArrayPath WRITE setAvgQuatsArrayPath) - - /** - * @brief Setter property for FeaturePhasesArrayPath - */ - void setFeaturePhasesArrayPath(const DataArrayPath& value); - /** - * @brief Getter property for FeaturePhasesArrayPath - * @return Value of FeaturePhasesArrayPath - */ - DataArrayPath getFeaturePhasesArrayPath() const; - Q_PROPERTY(DataArrayPath FeaturePhasesArrayPath READ getFeaturePhasesArrayPath WRITE setFeaturePhasesArrayPath) - - /** - * @brief Setter property for CrystalStructuresArrayPath - */ - void setCrystalStructuresArrayPath(const DataArrayPath& value); - /** - * @brief Getter property for CrystalStructuresArrayPath - * @return Value of CrystalStructuresArrayPath - */ - DataArrayPath getCrystalStructuresArrayPath() const; - Q_PROPERTY(DataArrayPath CrystalStructuresArrayPath READ getCrystalStructuresArrayPath WRITE setCrystalStructuresArrayPath) - - /** - * @brief Setter property for SurfaceMeshFaceMisorientationColorsArrayName - */ - void setSurfaceMeshFaceMisorientationColorsArrayName(const QString& value); - /** - * @brief Getter property for SurfaceMeshFaceMisorientationColorsArrayName - * @return Value of SurfaceMeshFaceMisorientationColorsArrayName - */ - QString getSurfaceMeshFaceMisorientationColorsArrayName() const; - Q_PROPERTY(QString SurfaceMeshFaceMisorientationColorsArrayName READ getSurfaceMeshFaceMisorientationColorsArrayName WRITE setSurfaceMeshFaceMisorientationColorsArrayName) - - /** - * @brief getCompiledLibraryName Reimplemented from @see AbstractFilter class - */ - QString getCompiledLibraryName() const override; - - /** - * @brief getBrandingString Returns the branding string for the filter, which is a tag - * used to denote the filter's association with specific plugins - * @return Branding string - */ - QString getBrandingString() const override; - - /** - * @brief getFilterVersion Returns a version string for this filter. Default - * value is an empty string. - * @return - */ - QString getFilterVersion() const override; - - /** - * @brief newFilterInstance Reimplemented from @see AbstractFilter class - */ - AbstractFilter::Pointer newFilterInstance(bool copyFilterParameters) const override; - - /** - * @brief getGroupName Reimplemented from @see AbstractFilter class - */ - QString getGroupName() const override; - - /** - * @brief getSubGroupName Reimplemented from @see AbstractFilter class - */ - QString getSubGroupName() const override; - - /** - * @brief getUuid Return the unique identifier for this filter. - * @return A QUuid object. - */ - QUuid getUuid() const override; - - /** - * @brief getHumanLabel Reimplemented from @see AbstractFilter class - */ - QString getHumanLabel() const override; - - /** - * @brief setupFilterParameters Reimplemented from @see AbstractFilter class - */ - void setupFilterParameters() override; - - /** - * @brief readFilterParameters Reimplemented from @see AbstractFilter class - */ - void readFilterParameters(AbstractFilterParametersReader* reader, int index) override; - - /** - * @brief execute Reimplemented from @see AbstractFilter class - */ - void execute() override; - -protected: - GenerateFaceMisorientationColoring(); - - /** - * @brief dataCheck Checks for the appropriate parameter values and availability of arrays - */ - void dataCheck() override; - - /** - * @brief dataCheckSurfaceMesh Checks for the appropriate parameter values and availability of arrays - */ - void dataCheckSurfaceMesh(); - - /** - * @brief dataCheckVoxel Checks for the appropriate parameter values and availability of arrays - */ - void dataCheckVoxel(); - -private: - std::weak_ptr> m_SurfaceMeshFaceLabelsPtr; - int32_t* m_SurfaceMeshFaceLabels = nullptr; - std::weak_ptr> m_AvgQuatsPtr; - float* m_AvgQuats = nullptr; - std::weak_ptr> m_FeaturePhasesPtr; - int32_t* m_FeaturePhases = nullptr; - std::weak_ptr> m_CrystalStructuresPtr; - unsigned int* m_CrystalStructures = nullptr; - std::weak_ptr> m_SurfaceMeshFaceMisorientationColorsPtr; - float* m_SurfaceMeshFaceMisorientationColors = nullptr; - - DataArrayPath m_SurfaceMeshFaceLabelsArrayPath = {SIMPL::Defaults::TriangleDataContainerName, SIMPL::Defaults::FaceAttributeMatrixName, SIMPL::FaceData::SurfaceMeshFaceLabels}; - DataArrayPath m_AvgQuatsArrayPath = {SIMPL::Defaults::ImageDataContainerName, SIMPL::Defaults::CellFeatureAttributeMatrixName, SIMPL::FeatureData::AvgQuats}; - DataArrayPath m_FeaturePhasesArrayPath = {SIMPL::Defaults::ImageDataContainerName, SIMPL::Defaults::CellFeatureAttributeMatrixName, SIMPL::FeatureData::Phases}; - DataArrayPath m_CrystalStructuresArrayPath = {SIMPL::Defaults::ImageDataContainerName, SIMPL::Defaults::CellEnsembleAttributeMatrixName, SIMPL::EnsembleData::CrystalStructures}; - QString m_SurfaceMeshFaceMisorientationColorsArrayName = {SIMPL::FaceData::SurfaceMeshFaceMisorientationColors}; - -public: - GenerateFaceMisorientationColoring(const GenerateFaceMisorientationColoring&) = delete; // Copy Constructor Not Implemented - GenerateFaceMisorientationColoring(GenerateFaceMisorientationColoring&&) = delete; // Move Constructor Not Implemented - GenerateFaceMisorientationColoring& operator=(const GenerateFaceMisorientationColoring&) = delete; // Copy Assignment Not Implemented - GenerateFaceMisorientationColoring& operator=(GenerateFaceMisorientationColoring&&) = delete; // Move assignment Not Implemented // Move assignment Not Implemented -}; diff --git a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceSchuhMisorientationColoring.cpp b/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceSchuhMisorientationColoring.cpp deleted file mode 100644 index 7378f45d88..0000000000 --- a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceSchuhMisorientationColoring.cpp +++ /dev/null @@ -1,491 +0,0 @@ -/* ============================================================================ - * Copyright (c) 2009-2016 BlueQuartz Software, LLC - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, this - * list of conditions and the following disclaimer in the documentation and/or - * other materials provided with the distribution. - * - * Neither the name of BlueQuartz Software, the US Air Force, nor the names of its - * contributors may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The code contained herein was partially funded by the following contracts: - * United States Air Force Prime Contract FA8650-07-D-5800 - * United States Air Force Prime Contract FA8650-10-D-5210 - * United States Prime Contract Navy N00173-07-C-2068 - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#include "GenerateFaceSchuhMisorientationColoring.h" - -#ifdef SIMPL_USE_PARALLEL_ALGORITHMS -#include -#include -#include -#endif - -#include - -#include "SIMPLib/DataContainers/DataContainer.h" -#include "SIMPLib/DataContainers/DataContainerArray.h" -#include "SIMPLib/FilterParameters/AbstractFilterParametersReader.h" -#include "SIMPLib/FilterParameters/DataArraySelectionFilterParameter.h" -#include "SIMPLib/FilterParameters/SeparatorFilterParameter.h" -#include "SIMPLib/FilterParameters/StringFilterParameter.h" -#include "SIMPLib/Math/MatrixMath.h" -#include "SIMPLib/Math/SIMPLibMath.h" -#include "SIMPLib/Utilities/ColorTable.h" - -#include "EbsdLib/Core/EbsdLibConstants.h" -#include "EbsdLib/LaueOps/CubicLowOps.h" -#include "EbsdLib/LaueOps/CubicOps.h" -#include "EbsdLib/LaueOps/HexagonalLowOps.h" -#include "EbsdLib/LaueOps/HexagonalOps.h" -#include "EbsdLib/LaueOps/MonoclinicOps.h" -#include "EbsdLib/LaueOps/OrthoRhombicOps.h" -#include "EbsdLib/LaueOps/TetragonalLowOps.h" -#include "EbsdLib/LaueOps/TetragonalOps.h" -#include "EbsdLib/LaueOps/TriclinicOps.h" -#include "EbsdLib/LaueOps/TrigonalLowOps.h" -#include "EbsdLib/LaueOps/TrigonalOps.h" - -#include "OrientationAnalysis/OrientationAnalysisConstants.h" -#include "OrientationAnalysis/OrientationAnalysisVersion.h" - -using LaueOpsShPtrType = std::shared_ptr; -using LaueOpsContainer = std::vector; - -/** - * @brief The CalculateFaceSchuhMisorientationColorsImpl class - */ -class CalculateFaceSchuhMisorientationColorsImpl -{ - int32_t* m_Labels; - int32_t* m_Phases; - float* m_Quats; - uint8_t* m_Colors; - unsigned int* m_CrystalStructures; - LaueOpsContainer m_OrientationOps; - -public: - CalculateFaceSchuhMisorientationColorsImpl(int32_t* labels, int32_t* phases, float* quats, uint8_t* colors, unsigned int* crystalStructures) - : m_Labels(labels) - , m_Phases(phases) - , m_Quats(quats) - , m_Colors(colors) - , m_CrystalStructures(crystalStructures) - { - m_OrientationOps = LaueOps::GetAllOrientationOps(); - } - virtual ~CalculateFaceSchuhMisorientationColorsImpl() = default; - - /** - * @brief generate Generates the colors for the triangles - * @param start The starting SIMPL::SurfaceMesh::Face_t Index - * @param end The ending SIMPL::SurfaceMesh::Face_t Index - */ - void generate(size_t start, size_t end) const - { - std::vector ops = LaueOps::GetAllOrientationOps(); - SIMPL::Rgb argb = 0x00000000; - - int grain1, grain2, phase1, phase2; - - // QuatF* quats = reinterpret_cast(m_Quats); - - for(size_t i = start; i < end; i++) - { - grain1 = m_Labels[2 * i]; - grain2 = m_Labels[2 * i + 1]; - if(grain1 > 0) - { - phase1 = m_Phases[grain1]; - } - else - { - phase1 = 0; - } - if(grain2 > 0) - { - phase2 = m_Phases[grain2]; - } - else - { - phase2 = 0; - } - - m_Colors[3 * i + 0] = 0; - m_Colors[3 * i + 1] = 0; - m_Colors[3 * i + 2] = 0; - - if(phase1 > 0) - { - if(phase1 == phase2) - { - if(m_CrystalStructures[phase1] == EbsdLib::CrystalStructure::Cubic_High) - { - float* quatPtr = m_Quats + i * grain1; - QuatD q1(quatPtr[0], quatPtr[1], quatPtr[2], quatPtr[3]); - quatPtr = m_Quats + i * grain2; - QuatD q2(quatPtr[0], quatPtr[1], quatPtr[2], quatPtr[3]); - - argb = ops[m_CrystalStructures[phase1]]->generateMisorientationColor(q1, q2); - m_Colors[3 * i] = RgbColor::dRed(argb); - m_Colors[3 * i + 1] = RgbColor::dGreen(argb); - m_Colors[3 * i + 2] = RgbColor::dBlue(argb); - } - } - } - } - } - -#ifdef SIMPL_USE_PARALLEL_ALGORITHMS - /** - * @brief operator () This is called from the TBB stye of code - * @param r The range to compute the values - */ - void operator()(const tbb::blocked_range& r) const - { - generate(r.begin(), r.end()); - } -#endif -}; - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -GenerateFaceSchuhMisorientationColoring::GenerateFaceSchuhMisorientationColoring() = default; - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -GenerateFaceSchuhMisorientationColoring::~GenerateFaceSchuhMisorientationColoring() = default; - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::setupFilterParameters() -{ - FilterParameterVectorType parameters; - { - DataArraySelectionFilterParameter::RequirementType req; - parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("SurfaceMeshFaceLabels", SurfaceMeshFaceLabelsArrayPath, FilterParameter::Category::RequiredArray, GenerateFaceSchuhMisorientationColoring, req)); - } - { - DataArraySelectionFilterParameter::RequirementType req; - parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("AvgQuats", AvgQuatsArrayPath, FilterParameter::Category::RequiredArray, GenerateFaceSchuhMisorientationColoring, req)); - } - { - DataArraySelectionFilterParameter::RequirementType req; - parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("FeaturePhases", FeaturePhasesArrayPath, FilterParameter::Category::RequiredArray, GenerateFaceSchuhMisorientationColoring, req)); - } - { - DataArraySelectionFilterParameter::RequirementType req; - parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("CrystalStructures", CrystalStructuresArrayPath, FilterParameter::Category::RequiredArray, GenerateFaceSchuhMisorientationColoring, req)); - } - - parameters.push_back(SIMPL_NEW_STRING_FP("SurfaceMeshFaceSchuhMisorientationColors", SurfaceMeshFaceSchuhMisorientationColorsArrayName, FilterParameter::Category::CreatedArray, - GenerateFaceSchuhMisorientationColoring)); - - setFilterParameters(parameters); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::readFilterParameters(AbstractFilterParametersReader* reader, int index) -{ - reader->openFilterGroup(this, index); - setSurfaceMeshFaceSchuhMisorientationColorsArrayName(reader->readString("SurfaceMeshFaceSchuhMisorientationColorsArrayName", getSurfaceMeshFaceSchuhMisorientationColorsArrayName())); - setCrystalStructuresArrayPath(reader->readDataArrayPath("CrystalStructuresArrayPath", getCrystalStructuresArrayPath())); - setFeaturePhasesArrayPath(reader->readDataArrayPath("FeaturePhasesArrayPath", getFeaturePhasesArrayPath())); - setAvgQuatsArrayPath(reader->readDataArrayPath("AvgQuatsArrayPath", getAvgQuatsArrayPath())); - setSurfaceMeshFaceLabelsArrayPath(reader->readDataArrayPath("SurfaceMeshFaceLabelsArrayPath", getSurfaceMeshFaceLabelsArrayPath())); - reader->closeFilterGroup(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::dataCheckSurfaceMesh() -{ - DataArrayPath tempPath; - clearErrorCode(); - clearWarningCode(); - - DataContainer::Pointer sm = getDataContainerArray()->getPrereqDataContainer(this, m_SurfaceMeshFaceLabelsArrayPath.getDataContainerName(), false); - if(getErrorCode() < 0) - { - return; - } - - std::vector dims(1, 2); - m_SurfaceMeshFaceLabelsPtr = getDataContainerArray()->getPrereqArrayFromPath>(this, getSurfaceMeshFaceLabelsArrayPath(), dims); - if(nullptr != m_SurfaceMeshFaceLabelsPtr.lock()) - { - m_SurfaceMeshFaceLabels = m_SurfaceMeshFaceLabelsPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ - dims[0] = 3; - tempPath.update(m_SurfaceMeshFaceLabelsArrayPath.getDataContainerName(), m_SurfaceMeshFaceLabelsArrayPath.getAttributeMatrixName(), getSurfaceMeshFaceSchuhMisorientationColorsArrayName()); - m_SurfaceMeshFaceSchuhMisorientationColorsPtr = getDataContainerArray()->createNonPrereqArrayFromPath>(this, tempPath, 0, dims); - if(nullptr != m_SurfaceMeshFaceSchuhMisorientationColorsPtr.lock()) - { - m_SurfaceMeshFaceSchuhMisorientationColors = m_SurfaceMeshFaceSchuhMisorientationColorsPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::dataCheckVoxel() -{ - DataArrayPath tempPath; - clearErrorCode(); - clearWarningCode(); - - std::vector dims(1, 4); - m_AvgQuatsPtr = getDataContainerArray()->getPrereqArrayFromPath>(this, getAvgQuatsArrayPath(), dims); - if(nullptr != m_AvgQuatsPtr.lock()) - { - m_AvgQuats = m_AvgQuatsPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ - dims[0] = 1; - m_FeaturePhasesPtr = getDataContainerArray()->getPrereqArrayFromPath>(this, getFeaturePhasesArrayPath(), dims); - if(nullptr != m_FeaturePhasesPtr.lock()) - { - m_FeaturePhases = m_FeaturePhasesPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ - // typedef DataArray XTalStructArrayType; - m_CrystalStructuresPtr = getDataContainerArray()->getPrereqArrayFromPath>(this, getCrystalStructuresArrayPath(), dims); - if(nullptr != m_CrystalStructuresPtr.lock()) - { - m_CrystalStructures = m_CrystalStructuresPtr.lock()->getPointer(0); - } /* Now assign the raw pointer to data from the DataArray object */ -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::dataCheck() -{ - clearErrorCode(); - clearWarningCode(); - - dataCheckSurfaceMesh(); - dataCheckVoxel(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::execute() -{ - clearErrorCode(); - clearWarningCode(); - dataCheckSurfaceMesh(); - if(getErrorCode() < 0) - { - return; - } - - dataCheckVoxel(); - if(getErrorCode() < 0) - { - return; - } - - notifyStatusMessage("Starting"); - - // Run the data check to allocate the memory for the centroid array - int64_t numTriangles = m_SurfaceMeshFaceLabelsPtr.lock()->getNumberOfTuples(); - -#ifdef SIMPL_USE_PARALLEL_ALGORITHMS - if(true) - { - tbb::parallel_for(tbb::blocked_range(0, numTriangles), - CalculateFaceSchuhMisorientationColorsImpl(m_SurfaceMeshFaceLabels, m_FeaturePhases, m_AvgQuats, m_SurfaceMeshFaceSchuhMisorientationColors, m_CrystalStructures), - tbb::auto_partitioner()); - } - else -#endif - { - CalculateFaceSchuhMisorientationColorsImpl serial(m_SurfaceMeshFaceLabels, m_FeaturePhases, m_AvgQuats, m_SurfaceMeshFaceSchuhMisorientationColors, m_CrystalStructures); - serial.generate(0, numTriangles); - } -} -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -AbstractFilter::Pointer GenerateFaceSchuhMisorientationColoring::newFilterInstance(bool copyFilterParameters) const -{ - GenerateFaceSchuhMisorientationColoring::Pointer filter = GenerateFaceSchuhMisorientationColoring::New(); - if(copyFilterParameters) - { - copyFilterParameterInstanceVariables(filter.get()); - } - return filter; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::getCompiledLibraryName() const -{ - return OrientationAnalysisConstants::OrientationAnalysisBaseName; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::getBrandingString() const -{ - return "OrientationAnalysis"; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::getFilterVersion() const -{ - QString version; - QTextStream vStream(&version); - vStream << OrientationAnalysis::Version::Major() << "." << OrientationAnalysis::Version::Minor() << "." << OrientationAnalysis::Version::Patch(); - return version; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::getGroupName() const -{ - return SIMPL::FilterGroups::ProcessingFilters; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QUuid GenerateFaceSchuhMisorientationColoring::getUuid() const -{ - return QUuid("{0850a882-ca6f-52c6-aa0b-885359b84c32}"); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::getSubGroupName() const -{ - return SIMPL::FilterSubGroups::CrystallographyFilters; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::getHumanLabel() const -{ - return "Generate Face Schuh Misorientation Colors"; -} - -// ----------------------------------------------------------------------------- -GenerateFaceSchuhMisorientationColoring::Pointer GenerateFaceSchuhMisorientationColoring::NullPointer() -{ - return Pointer(static_cast(nullptr)); -} - -// ----------------------------------------------------------------------------- -std::shared_ptr GenerateFaceSchuhMisorientationColoring::New() -{ - struct make_shared_enabler : public GenerateFaceSchuhMisorientationColoring - { - }; - std::shared_ptr val = std::make_shared(); - val->setupFilterParameters(); - return val; -} - -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::getNameOfClass() const -{ - return QString("GenerateFaceSchuhMisorientationColoring"); -} - -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::ClassName() -{ - return QString("GenerateFaceSchuhMisorientationColoring"); -} - -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::setSurfaceMeshFaceLabelsArrayPath(const DataArrayPath& value) -{ - m_SurfaceMeshFaceLabelsArrayPath = value; -} - -// ----------------------------------------------------------------------------- -DataArrayPath GenerateFaceSchuhMisorientationColoring::getSurfaceMeshFaceLabelsArrayPath() const -{ - return m_SurfaceMeshFaceLabelsArrayPath; -} - -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::setAvgQuatsArrayPath(const DataArrayPath& value) -{ - m_AvgQuatsArrayPath = value; -} - -// ----------------------------------------------------------------------------- -DataArrayPath GenerateFaceSchuhMisorientationColoring::getAvgQuatsArrayPath() const -{ - return m_AvgQuatsArrayPath; -} - -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::setFeaturePhasesArrayPath(const DataArrayPath& value) -{ - m_FeaturePhasesArrayPath = value; -} - -// ----------------------------------------------------------------------------- -DataArrayPath GenerateFaceSchuhMisorientationColoring::getFeaturePhasesArrayPath() const -{ - return m_FeaturePhasesArrayPath; -} - -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::setCrystalStructuresArrayPath(const DataArrayPath& value) -{ - m_CrystalStructuresArrayPath = value; -} - -// ----------------------------------------------------------------------------- -DataArrayPath GenerateFaceSchuhMisorientationColoring::getCrystalStructuresArrayPath() const -{ - return m_CrystalStructuresArrayPath; -} - -// ----------------------------------------------------------------------------- -void GenerateFaceSchuhMisorientationColoring::setSurfaceMeshFaceSchuhMisorientationColorsArrayName(const QString& value) -{ - m_SurfaceMeshFaceSchuhMisorientationColorsArrayName = value; -} - -// ----------------------------------------------------------------------------- -QString GenerateFaceSchuhMisorientationColoring::getSurfaceMeshFaceSchuhMisorientationColorsArrayName() const -{ - return m_SurfaceMeshFaceSchuhMisorientationColorsArrayName; -} diff --git a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceSchuhMisorientationColoring.h b/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceSchuhMisorientationColoring.h deleted file mode 100644 index cea3d4910f..0000000000 --- a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/GenerateFaceSchuhMisorientationColoring.h +++ /dev/null @@ -1,266 +0,0 @@ -/* ============================================================================ - * Copyright (c) 2009-2016 BlueQuartz Software, LLC - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, this - * list of conditions and the following disclaimer in the documentation and/or - * other materials provided with the distribution. - * - * Neither the name of BlueQuartz Software, the US Air Force, nor the names of its - * contributors may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The code contained herein was partially funded by the following contracts: - * United States Air Force Prime Contract FA8650-07-D-5800 - * United States Air Force Prime Contract FA8650-10-D-5210 - * United States Prime Contract Navy N00173-07-C-2068 - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -#pragma once - -#include - -#include - -#include "SIMPLib/SIMPLib.h" -#include "SIMPLib/DataArrays/DataArray.hpp" -#include "SIMPLib/DataArrays/IDataArray.h" -#include "SIMPLib/Filtering/AbstractFilter.h" - -#include "OrientationAnalysis/OrientationAnalysisDLLExport.h" - -/** - * @class GenerateFaceMisorientationColors GenerateFaceMisorientationColors.h DREAM3DLib/ProcessingFilters/GenerateFaceMisorientationColors.h - * @brief This filter calculates the normal of each triangle in the surface mesh. The calculated normals have been - * normalized themselves. This filter is parallelized using the Threading Building Blocks library and will attempt to - * use the optimal number of processors to do the computation. - * @author Will Lenthe - * @date March 12, 2014 - * @version 1.0 - */ -class OrientationAnalysis_EXPORT GenerateFaceSchuhMisorientationColoring : public AbstractFilter -{ - Q_OBJECT - - // Start Python bindings declarations - PYB11_BEGIN_BINDINGS(GenerateFaceSchuhMisorientationColoring SUPERCLASS AbstractFilter) - PYB11_FILTER() - PYB11_SHARED_POINTERS(GenerateFaceSchuhMisorientationColoring) - PYB11_FILTER_NEW_MACRO(GenerateFaceSchuhMisorientationColoring) - PYB11_PROPERTY(DataArrayPath SurfaceMeshFaceLabelsArrayPath READ getSurfaceMeshFaceLabelsArrayPath WRITE setSurfaceMeshFaceLabelsArrayPath) - PYB11_PROPERTY(DataArrayPath AvgQuatsArrayPath READ getAvgQuatsArrayPath WRITE setAvgQuatsArrayPath) - PYB11_PROPERTY(DataArrayPath FeaturePhasesArrayPath READ getFeaturePhasesArrayPath WRITE setFeaturePhasesArrayPath) - PYB11_PROPERTY(DataArrayPath CrystalStructuresArrayPath READ getCrystalStructuresArrayPath WRITE setCrystalStructuresArrayPath) - PYB11_PROPERTY(QString SurfaceMeshFaceSchuhMisorientationColorsArrayName READ getSurfaceMeshFaceSchuhMisorientationColorsArrayName WRITE setSurfaceMeshFaceSchuhMisorientationColorsArrayName) - PYB11_END_BINDINGS() - // End Python bindings declarations - -public: - using Self = GenerateFaceSchuhMisorientationColoring; - using Pointer = std::shared_ptr; - using ConstPointer = std::shared_ptr; - using WeakPointer = std::weak_ptr; - using ConstWeakPointer = std::weak_ptr; - - /** - * @brief Returns a NullPointer wrapped by a shared_ptr<> - * @return - */ - static Pointer NullPointer(); - - /** - * @brief Creates a new object wrapped in a shared_ptr<> - * @return - */ - static Pointer New(); - - /** - * @brief Returns the name of the class for GenerateFaceSchuhMisorientationColoring - */ - QString getNameOfClass() const override; - /** - * @brief Returns the name of the class for GenerateFaceSchuhMisorientationColoring - */ - static QString ClassName(); - - ~GenerateFaceSchuhMisorientationColoring() override; - - /** - * @brief This returns the group that the filter belonds to. You can select - * a different group if you want. The string returned here will be displayed - * in the GUI for the filter - */ - /** - * @brief Setter property for SurfaceMeshFaceLabelsArrayPath - */ - void setSurfaceMeshFaceLabelsArrayPath(const DataArrayPath& value); - /** - * @brief Getter property for SurfaceMeshFaceLabelsArrayPath - * @return Value of SurfaceMeshFaceLabelsArrayPath - */ - DataArrayPath getSurfaceMeshFaceLabelsArrayPath() const; - Q_PROPERTY(DataArrayPath SurfaceMeshFaceLabelsArrayPath READ getSurfaceMeshFaceLabelsArrayPath WRITE setSurfaceMeshFaceLabelsArrayPath) - - /** - * @brief Setter property for AvgQuatsArrayPath - */ - void setAvgQuatsArrayPath(const DataArrayPath& value); - /** - * @brief Getter property for AvgQuatsArrayPath - * @return Value of AvgQuatsArrayPath - */ - DataArrayPath getAvgQuatsArrayPath() const; - Q_PROPERTY(DataArrayPath AvgQuatsArrayPath READ getAvgQuatsArrayPath WRITE setAvgQuatsArrayPath) - - /** - * @brief Setter property for FeaturePhasesArrayPath - */ - void setFeaturePhasesArrayPath(const DataArrayPath& value); - /** - * @brief Getter property for FeaturePhasesArrayPath - * @return Value of FeaturePhasesArrayPath - */ - DataArrayPath getFeaturePhasesArrayPath() const; - Q_PROPERTY(DataArrayPath FeaturePhasesArrayPath READ getFeaturePhasesArrayPath WRITE setFeaturePhasesArrayPath) - - /** - * @brief Setter property for CrystalStructuresArrayPath - */ - void setCrystalStructuresArrayPath(const DataArrayPath& value); - /** - * @brief Getter property for CrystalStructuresArrayPath - * @return Value of CrystalStructuresArrayPath - */ - DataArrayPath getCrystalStructuresArrayPath() const; - Q_PROPERTY(DataArrayPath CrystalStructuresArrayPath READ getCrystalStructuresArrayPath WRITE setCrystalStructuresArrayPath) - - /** - * @brief Setter property for SurfaceMeshFaceSchuhMisorientationColorsArrayName - */ - void setSurfaceMeshFaceSchuhMisorientationColorsArrayName(const QString& value); - /** - * @brief Getter property for SurfaceMeshFaceSchuhMisorientationColorsArrayName - * @return Value of SurfaceMeshFaceSchuhMisorientationColorsArrayName - */ - QString getSurfaceMeshFaceSchuhMisorientationColorsArrayName() const; - Q_PROPERTY(QString SurfaceMeshFaceSchuhMisorientationColorsArrayName READ getSurfaceMeshFaceSchuhMisorientationColorsArrayName WRITE setSurfaceMeshFaceSchuhMisorientationColorsArrayName) - - /** - * @brief getCompiledLibraryName Reimplemented from @see AbstractFilter class - */ - QString getCompiledLibraryName() const override; - - /** - * @brief getBrandingString Returns the branding string for the filter, which is a tag - * used to denote the filter's association with specific plugins - * @return Branding string - */ - QString getBrandingString() const override; - - /** - * @brief getFilterVersion Returns a version string for this filter. Default - * value is an empty string. - * @return - */ - QString getFilterVersion() const override; - - /** - * @brief newFilterInstance Reimplemented from @see AbstractFilter class - */ - AbstractFilter::Pointer newFilterInstance(bool copyFilterParameters) const override; - - /** - * @brief getGroupName Reimplemented from @see AbstractFilter class - */ - QString getGroupName() const override; - - /** - * @brief getSubGroupName Reimplemented from @see AbstractFilter class - */ - QString getSubGroupName() const override; - - /** - * @brief getUuid Return the unique identifier for this filter. - * @return A QUuid object. - */ - QUuid getUuid() const override; - - /** - * @brief getHumanLabel Reimplemented from @see AbstractFilter class - */ - QString getHumanLabel() const override; - - /** - * @brief setupFilterParameters Reimplemented from @see AbstractFilter class - */ - void setupFilterParameters() override; - - /** - * @brief readFilterParameters Reimplemented from @see AbstractFilter class - */ - void readFilterParameters(AbstractFilterParametersReader* reader, int index) override; - - /** - * @brief execute Reimplemented from @see AbstractFilter class - */ - void execute() override; - -protected: - GenerateFaceSchuhMisorientationColoring(); - - /** - * @brief dataCheck Checks for the appropriate parameter values and availability of arrays - */ - void dataCheck() override; - - /** - * @brief dataCheckSurfaceMesh Checks for the appropriate parameter values and availability of arrays - */ - void dataCheckSurfaceMesh(); - - /** - * @brief dataCheckVoxel Checks for the appropriate parameter values and availability of arrays - */ - void dataCheckVoxel(); - -private: - std::weak_ptr> m_SurfaceMeshFaceLabelsPtr; - int32_t* m_SurfaceMeshFaceLabels = nullptr; - std::weak_ptr> m_SurfaceMeshFaceSchuhMisorientationColorsPtr; - uint8_t* m_SurfaceMeshFaceSchuhMisorientationColors = nullptr; - std::weak_ptr> m_AvgQuatsPtr; - float* m_AvgQuats = nullptr; - std::weak_ptr> m_FeaturePhasesPtr; - int32_t* m_FeaturePhases = nullptr; - std::weak_ptr> m_CrystalStructuresPtr; - unsigned int* m_CrystalStructures = nullptr; - - DataArrayPath m_SurfaceMeshFaceLabelsArrayPath = {SIMPL::Defaults::TriangleDataContainerName, SIMPL::Defaults::FaceAttributeMatrixName, SIMPL::FaceData::SurfaceMeshFaceLabels}; - DataArrayPath m_AvgQuatsArrayPath = {SIMPL::Defaults::ImageDataContainerName, SIMPL::Defaults::CellFeatureAttributeMatrixName, SIMPL::FeatureData::AvgQuats}; - DataArrayPath m_FeaturePhasesArrayPath = {SIMPL::Defaults::ImageDataContainerName, SIMPL::Defaults::CellFeatureAttributeMatrixName, SIMPL::FeatureData::Phases}; - DataArrayPath m_CrystalStructuresArrayPath = {SIMPL::Defaults::ImageDataContainerName, SIMPL::Defaults::CellEnsembleAttributeMatrixName, SIMPL::EnsembleData::CrystalStructures}; - QString m_SurfaceMeshFaceSchuhMisorientationColorsArrayName = {SIMPL::FaceData::SurfaceMeshFaceSchuhMisorientationColors}; - -public: - GenerateFaceSchuhMisorientationColoring(const GenerateFaceSchuhMisorientationColoring&) = delete; // Copy Constructor Not Implemented - GenerateFaceSchuhMisorientationColoring(GenerateFaceSchuhMisorientationColoring&&) = delete; // Move Constructor Not Implemented - GenerateFaceSchuhMisorientationColoring& operator=(const GenerateFaceSchuhMisorientationColoring&) = delete; // Copy Assignment Not Implemented - GenerateFaceSchuhMisorientationColoring& operator=(GenerateFaceSchuhMisorientationColoring&&) = delete; // Move Assignment Not Implemented -}; diff --git a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/SourceList.cmake b/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/SourceList.cmake index b722bd2f0d..bbb2a8ff77 100644 --- a/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/SourceList.cmake +++ b/Source/Plugins/OrientationAnalysis/OrientationAnalysisFilters/SourceList.cmake @@ -46,7 +46,6 @@ set(_PublicFilters FindTwinBoundaries FindTwinBoundarySchmidFactors GenerateFaceIPFColoring - GenerateFaceMisorientationColoring GenerateFZQuaternions GenerateIPFColors GenerateOrientationMatrixTranspose @@ -87,7 +86,6 @@ endforeach() # This is the list of Private Filters. These filters are available from other filters but the user will not # be able to use them from the DREAM3D user interface. set(_PrivateFilters - GenerateFaceSchuhMisorientationColoring FindBasalLoadingFactor FindLocalAverageCAxisMisalignments diff --git a/Website/docs/About.md b/Website/docs/About.md index d47dfaef28..5e8ef934ae 100644 --- a/Website/docs/About.md +++ b/Website/docs/About.md @@ -1,3 +1,9 @@ +--- +hide: + - navigation + - toc +--- + ## History ## The history of DREAM.3D is rooted in two parallel research efforts: diff --git a/Website/docs/DREAM3D_in_Use.md b/Website/docs/DREAM3D_in_Use.md index b80968df9f..5ade2672a7 100644 --- a/Website/docs/DREAM3D_in_Use.md +++ b/Website/docs/DREAM3D_in_Use.md @@ -1,3 +1,9 @@ +--- +hide: + - navigation + - toc +--- + ## Papers Citing DREAM3D ## [1](http://stacks.iop.org/0965-0393/20/i=7/a=075005) S D Sintay and A D Rollett. Testing the accuracy of microstructure reconstruction in three dimensions using phantoms. Modelling and Simulation in Materials Science and Engineering, 20(7):075005, 2012. diff --git a/Website/docs/Download.md b/Website/docs/Download.md index 29b48ed224..517a43bfb5 100644 --- a/Website/docs/Download.md +++ b/Website/docs/Download.md @@ -1,3 +1,9 @@ +--- +hide: + - navigation + - toc +--- + ## Prebuilt Binaries ## The current version is 6.5.171 and is available in prebuilt binaries for MacOS, Windows and Linux operating systems: diff --git a/Website/docs/Latest_Release_Notes.md b/Website/docs/Latest_Release_Notes.md index dc428de042..27df65b4ac 100644 --- a/Website/docs/Latest_Release_Notes.md +++ b/Website/docs/Latest_Release_Notes.md @@ -1,3 +1,9 @@ +--- +hide: + - navigation + - toc +--- + ## Version 6.5.171 Release Notes ## These release notes summarize the major changes for each officially released version of DREAM.3D. The official bug report is located at the [DREAM.3D GitHub issues page](https://github.com/bluequartzsoftware/DREAM3D/issues). diff --git a/Website/docs/License.md b/Website/docs/License.md index e91fe5fcc6..5ab7f3d540 100644 --- a/Website/docs/License.md +++ b/Website/docs/License.md @@ -1,3 +1,9 @@ +--- +hide: + - navigation + - toc +--- + ## DREAM.3D License ## Copyright (c) 2009-2022 BlueQuartz Software, LLC diff --git a/Website/docs/NX.md b/Website/docs/NX.md index 7dfda195c2..aa119d47a0 100644 --- a/Website/docs/NX.md +++ b/Website/docs/NX.md @@ -1,6 +1,12 @@ +--- +hide: + - navigation + - toc +--- + # DREAM3D-NX: The Next Generation of DREAM.3D -BlueQuartz Software has officially released the next version of DREAM.3D, **DREAM3D-NX**. This version is completely rewritten from the ground up using modern C++ and Python coding standards, contains complete filter unit testing coverage and a fresh brand new interface that is still familiar to previous users. You can check out the full release notes and download your trial version at [https://www.dream3d.io](https://www.dream3d.io). Please contact **dream3d@bluequartz.net** for more information to obtain a license to the full verison of DREAM3D-NX. +BlueQuartz Software has officially released the next version of DREAM.3D, **DREAM3D-NX**. This version is completely rewritten from the ground up using modern C++ and Python coding standards, has integrated visualization, contains complete filter unit testing coverage and a fresh brand new interface that is still familiar to previous users. You can check out the full release notes and download your trial version at [https://www.dream3d.io](https://www.dream3d.io). Please contact **dream3d@bluequartz.net** for more information to obtain a license to the full verison of DREAM3D-NX. ## DREAM3D-NX Screenshots (Version 7.0.0'ish) diff --git a/Website/docs/Origins.md b/Website/docs/Origins.md index 1afb8684e3..dcfcf07d24 100644 --- a/Website/docs/Origins.md +++ b/Website/docs/Origins.md @@ -1,3 +1,9 @@ +--- +hide: + - navigation + - toc +--- + ## Publications That Describe Algorithms Contained In DREAM3D ## [1] S. P. Donegan, J. C. Tucker, A. D. Rollett, K. Barmak, and M. Groeber. Extreme value analysis of tail departure from log-normality in experimental and simulated grain size distributions. Acta materialia, 61(15):5595-5604, 2013. diff --git a/Website/docs/images/branded_splash.png b/Website/docs/images/branded_splash.png new file mode 100644 index 0000000000..fa7a43faff Binary files /dev/null and b/Website/docs/images/branded_splash.png differ diff --git a/Website/docs/index.md b/Website/docs/index.md index 6d4f9e2e59..91812b9afa 100644 --- a/Website/docs/index.md +++ b/Website/docs/index.md @@ -1,4 +1,32 @@ -## DREAM.3D General Information +--- +hide: + - navigation + - toc +--- + +![DREAM.3DLogo](images/branded_splash.png) + + +## IMPORTANT NOTE + +DREAM.3D Version 6 is considered legacy and all development has stopped. Please consider using DREAM3D-NX which can be downloaded from [https://www.dream3d.io](https://www.dream3d.io). DREAM3D-NX offers a much better user experience with its [integrated visualization](https://www.dream3d.io/FeatureGallery/) among its new features. + +| Feature | DREAM.3D v6 | DREAM3D-NX v7 | +|------------|---------|------------| +| Integrated Visualization | NO | YES | +| Actively Developed | NO | YES | +| Actively Supported | NO | YES | +| Easy Python Bindings | NO | YES | +| Crash Protection | NO | YES | +| New features being added | NO | YES | + +
+ +- :octicons-arrow-right-24:{ .lg .middle } [Go Checkout DREAM3D-NX](https://www.dream3d.io) + +
+ +## DREAM.3D Version 6.x DREAM.3D consists of data analysis tools (Filters) that allow for the construction of customized workflows (Pipelines) to analyze data. DREAM.3D provides a flexible and extensible data structure that eases data transport between collaborators by storing data in a non-proprietary format. diff --git a/Website/mkdocs.yml b/Website/mkdocs.yml index 111a9da3e9..8b37c88dff 100644 --- a/Website/mkdocs.yml +++ b/Website/mkdocs.yml @@ -1,11 +1,27 @@ -site_name: DREAM3D +site_name: DREAM.3D Version 6 + theme: name: 'material' + custom_dir: overrides + palette: primary: light-blue accent: light-blue + features: + - navigation.instant + - navigation.instant.prefetch + - header.autohide + - announce.dismiss + - navigation.footer + - navigation.tabs + - navigation.tabs + - navigation.tabs.sticky + - navigation.path + - navigation.prune + icon: + annotation: material/arrow-right-circle -site_url: http://dream3d.bluequartz.net +site_url: https://dream3d.bluequartz.net nav: - Home: 'index.md' @@ -17,7 +33,6 @@ nav: - DREAM3D In Use: 'DREAM3D_in_Use.md' - Origins of DREAM3D: 'Origins.md' - docs_dir: docs site_dir: 'dream3d-wp.bluequartz.net' @@ -28,11 +43,33 @@ markdown_extensions: guess_lang: false - toc: permalink: true + - attr_list + - md_in_html + - pymdownx.superfences + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg extra: palette: primary: 'blue' accent: 'bluegrey' + consent: + title: Cookie consent + description: >- + We use cookies to recognize your repeated visits and preferences, as well + as to measure the effectiveness of our documentation and whether users + find what they're searching for. With your consent, you're helping us to + make our documentation better. extra_css: - 'assets/stylesheets/extra.css' + +extra: + social: + - icon: fontawesome/brands/linkedin + link: https://www.linkedin.com/company/15381665/admin/feed/posts/ + name: BlueQuartz Software on LinkedIn + - icon: fontawesome/brands/github + link: https://www.github.com/bluequartzsoftware + name: BlueQuartz Software on GitHub diff --git a/Website/overrides/assetts/stylesheets/extra.css b/Website/overrides/assetts/stylesheets/extra.css new file mode 100644 index 0000000000..566afccf28 --- /dev/null +++ b/Website/overrides/assetts/stylesheets/extra.css @@ -0,0 +1,24 @@ +label.md-nav__link.md-nav__link--active:after { + content: "\E313"; +} + +.md-nav__link[for=toc] { + display: block !important; +} + +@media only screen and (max-width: 76.1875em) { + .md-nav__list.toc-ul { + padding-left: 16px; + padding-right: 16px; + } +} + +@media only screen and (min-width: 60em) { + .md-content { + margin-right: 0 !important; + } +} + +.md-sidebar.md-sidebar--secondary { + display: none !important; +} \ No newline at end of file diff --git a/Website/overrides/main.html b/Website/overrides/main.html new file mode 100644 index 0000000000..d059b41ee8 --- /dev/null +++ b/Website/overrides/main.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block htmltitle %} + DREAM3D-NX Home Page +{% endblock %} + +{% block announce %} + DREAM.3D Version 6 is deprecated. Please go to https://www.dream3d.io and try out DREAM3D-NX +{% endblock %}