Skip to content
Permalink
Browse files

Update codes to remove use of macros, fix python errors, fix const is…

…sues

        commit b9d4192
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Wed Oct 30 14:51:47 2019 -0400

            Fix bug using std::accumulate due to casting issue.

            Passing in "1" will force the computation to be done in int32_t. When using large
            Tuple dimensions we will over flow.

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit a1aef36
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Tue Oct 29 17:05:04 2019 -0400

            Add missing include directive <memory> for shared_ptr<> access.

            Updated some other code areas with better documentation strings
            Updated some code sections to be more consistent with use of type aliases.

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 93f8327
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Tue Oct 29 13:37:27 2019 -0400

            Update codes to latest const correctness changes

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 6415cfd
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Fri Oct 25 12:12:34 2019 -0400

            Fix compiler errors on MSVC platform

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit ae0182b
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Fri Oct 25 11:53:54 2019 -0400

            Fix DOxygen comments that got munged up in some find/replace operation

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 1cc23a5
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Fri Oct 25 11:43:13 2019 -0400

            Fix compiler warnings about overriding a virtual method without using override keyword

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 89d32ae
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Wed Oct 23 14:42:45 2019 -0400

            Fix warnings about returning const QString as a value instead of a reference.

            Warnings are fixed by changing from "const QString" to "QString"

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 8dd7d0c
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Wed Oct 23 14:02:15 2019 -0400

            Merge OrientationTransformation and supporting classes API changes

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit d2084f3
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Mon Aug 12 13:18:59 2019 -0400

            Removing the macros is the default tool

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 47eb8eb
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Thu Jun 27 10:49:44 2019 -0400

            Resolving merge conflicts

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 45b7b6a
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Fri Jun 21 14:24:07 2019 -0400

            Fix pass by const reference for POD types

            In the last pass at removing the macros POD types were mistakenly passed by
            const reference instead of by value. These have all been fixed to pass by value.

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit f19c413
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Thu Jun 13 18:14:45 2019 -0400

            Massive code modifications to clean up and reduce macro clutter

            * Remove use of all SIMPL_* macros replacing with actual C++ code
            * Remove the include directive to DataContainerArray in AbstractFilter instead using a forward declaration and alias
            * Add needed include directives or forward declarations to all effected classes

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 1419659
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Thu Jun 13 18:57:21 2019 -0400

            Transfer some SIMPL_* macros into the Pybind11 macro section

            This is needed because the codescraper algorithm looks for four specific macros in order
            to determine the proper c++ and python code to generate. The same macros have been
            defined in the SIMPLPythonMacros.h header file.

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        commit 21b59e1
        Author: Michael Jackson <mike.jackson@bluequartz.net>
        Date:   Tue Jun 11 18:19:06 2019 -0400

            Wrap the Python wrapping macros in a #define for SIMPL_ENABLE_PYTHON

            This is done because SIMPLibSetGetMacros is going away eventually and we need to separate
            out the still needed macros that help generate the python bindings.

            Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>

        Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
  • Loading branch information...
imikejackson committed Oct 30, 2019
1 parent b7f5abb commit 0446b45616257e421c0e6b4550d412b1af171020
Showing 609 changed files with 58,294 additions and 9,762 deletions.
@@ -72,7 +72,7 @@ ConstructorInitializerIndentWidth: 0
# PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
# ReflowComments: true
# SortIncludes: true
SortIncludes: false
# SpaceAfterCStyleCast: false
# SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
@@ -83,7 +83,7 @@ SpaceBeforeParens: Never
# SpacesInCStyleCastParentheses: false
# SpacesInParentheses: false
# SpacesInSquareBrackets: false
# Standard: Cpp11
Standard: Cpp11
TabWidth: 2
UseTab: Never
...
@@ -649,7 +649,7 @@ int H5EspritReader::readData(hid_t parId)
err = QH5Lite::getDatasetInfo(gid, Ebsd::H5Esprit::RawPatterns, dims, type_class, type_size);
if(err >= 0) // Only read the pattern data if the pattern data is available.
{
totalDataRows = std::accumulate(dims.begin(), dims.end(), 1, std::multiplies<size_t>());
totalDataRows = std::accumulate(dims.begin(), dims.end(), static_cast<size_t>(1), std::multiplies<size_t>());

// Set the pattern dimensions
m_PatternDims[0] = dims[1];
@@ -1,53 +1,48 @@
/* ============================================================================
* 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 followig 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
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
* 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 followig 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 "EbsdTransform.h"


// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
EbsdTransform::EbsdTransform()

= default;
EbsdTransform::EbsdTransform() = default;

Ebsd::EbsdToSampleCoordinateMapping EbsdTransform::IdentifyStandardTransformation(AxisAngleInput_t sampleTransformation, AxisAngleInput_t eulerTransformation)
{



// TSL/EDAX
if(sampleTransformation.angle == 180.0f && sampleTransformation.h == 0.0f && sampleTransformation.k == 1.0f && sampleTransformation.l == 0.0f

@@ -78,9 +73,6 @@ Ebsd::EbsdToSampleCoordinateMapping EbsdTransform::IdentifyStandardTransformatio
return Ebsd::UnknownCoordinateMapping;
}




// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
@@ -42,8 +42,8 @@
#include <QtCore/QFileInfo>
#include <QtCore/QFile>
#include <QtCore/QByteArray>
#include <QtCore/QDebug>

#include "SIMPLib/Common/Constants.h"

#include "OrientationLib/Core/Orientation.hpp"
#include "OrientationLib/Core/OrientationTransformation.hpp"
@@ -229,3 +229,124 @@ FloatArrayType::Pointer AngleFileLoader::loadData()

return angles;
}

// -----------------------------------------------------------------------------
AngleFileLoader::Pointer AngleFileLoader::NullPointer()
{
return Pointer(static_cast<Self*>(nullptr));
}

// -----------------------------------------------------------------------------
AngleFileLoader::Pointer AngleFileLoader::New()
{
Pointer sharedPtr(new(AngleFileLoader));
return sharedPtr;
}

// -----------------------------------------------------------------------------
QString AngleFileLoader::getNameOfClass() const
{
return QString("AngleFileLoader");
}

// -----------------------------------------------------------------------------
QString AngleFileLoader::ClassName()
{
return QString("AngleFileLoader");
}

// -----------------------------------------------------------------------------
void AngleFileLoader::setErrorMessage(const QString& value)
{
m_ErrorMessage = value;
}

// -----------------------------------------------------------------------------
QString AngleFileLoader::getErrorMessage() const
{
return m_ErrorMessage;
}

// -----------------------------------------------------------------------------
void AngleFileLoader::setErrorCode(int value)
{
m_ErrorCode = value;
}

// -----------------------------------------------------------------------------
int AngleFileLoader::getErrorCode() const
{
return m_ErrorCode;
}

// -----------------------------------------------------------------------------
void AngleFileLoader::setInputFile(const QString& value)
{
m_InputFile = value;
}

// -----------------------------------------------------------------------------
QString AngleFileLoader::getInputFile() const
{
return m_InputFile;
}

// -----------------------------------------------------------------------------
void AngleFileLoader::setFileAnglesInDegrees(bool value)
{
m_FileAnglesInDegrees = value;
}

// -----------------------------------------------------------------------------
bool AngleFileLoader::getFileAnglesInDegrees() const
{
return m_FileAnglesInDegrees;
}

// -----------------------------------------------------------------------------
void AngleFileLoader::setOutputAnglesInDegrees(bool value)
{
m_OutputAnglesInDegrees = value;
}

// -----------------------------------------------------------------------------
bool AngleFileLoader::getOutputAnglesInDegrees() const
{
return m_OutputAnglesInDegrees;
}

// -----------------------------------------------------------------------------
void AngleFileLoader::setAngleRepresentation(uint32_t value)
{
m_AngleRepresentation = value;
}

// -----------------------------------------------------------------------------
uint32_t AngleFileLoader::getAngleRepresentation() const
{
return m_AngleRepresentation;
}

// -----------------------------------------------------------------------------
void AngleFileLoader::setDelimiter(const QString& value)
{
m_Delimiter = value;
}

// -----------------------------------------------------------------------------
QString AngleFileLoader::getDelimiter() const
{
return m_Delimiter;
}

// -----------------------------------------------------------------------------
void AngleFileLoader::setIgnoreMultipleDelimiters(bool value)
{
m_IgnoreMultipleDelimiters = value;
}

// -----------------------------------------------------------------------------
bool AngleFileLoader::getIgnoreMultipleDelimiters() const
{
return m_IgnoreMultipleDelimiters;
}

0 comments on commit 0446b45

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