Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Update to latest SIMPL API Changes #1004

Merged
merged 2 commits into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The developers of DREAM.3D maintain a pair of Google Groups for discussions on t
+ Fix issue where NeighborList could not be selected for a path.
+ RotateSampleRefFrame: Fix long preflight issues. Parallel Rotations.
+ Adding new StringUtilities and StringLiteral files.

+ Updated filter parameters to utilize a group index array instead of a single group index.

#### DREAM3D Changes (Since v6.6.0 Tag) ####

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ EMMPMFilterParameter::~EMMPMFilterParameter() = default;
//
// -----------------------------------------------------------------------------
EMMPMFilterParameter::Pointer EMMPMFilterParameter::Create(const QString& humanLabel, const QString& propertyName, const QString& defaultValue, Category category,
const SetterCallbackType& setterCallback, const GetterCallbackType& getterCallback, int groupIndex)
const SetterCallbackType& setterCallback, const GetterCallbackType& getterCallback, const std::vector<int>& groupIndices)
{
EMMPMFilterParameter::Pointer ptr = EMMPMFilterParameter::New();
ptr->setHumanLabel(humanLabel);
ptr->setPropertyName(propertyName);
ptr->setDefaultValue(defaultValue);
ptr->setCategory(category);
ptr->setGroupIndex(groupIndex);
ptr->setGroupIndices(groupIndices);
ptr->setSetterCallback(setterCallback);
ptr->setGetterCallback(getterCallback);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class EMMPMFilterParameter : public FilterParameter
* @return
*/
static Pointer Create(const QString& humanLabel, const QString& propertyName, const QString& defaultValue, Category category, const SetterCallbackType& setterCallback,
const GetterCallbackType& getterCallback, int groupIndex = -1);
const GetterCallbackType& getterCallback, const std::vector<int>& groupIndices = {});

virtual ~EMMPMFilterParameter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ AbaqusHexahedronWriter::~AbaqusHexahedronWriter() = default;
void AbaqusHexahedronWriter::setupFilterParameters()
{
FilterParameterVectorType parameters;
parameters.push_back(SIMPL_NEW_INTEGER_FP("Hourglass Stiffness", HourglassStiffness, FilterParameter::Category::Parameter, AbaqusHexahedronWriter, 0));
parameters.push_back(SIMPL_NEW_INTEGER_FP("Hourglass Stiffness", HourglassStiffness, FilterParameter::Category::Parameter, AbaqusHexahedronWriter, {0}));
parameters.push_back(SIMPL_NEW_STRING_FP("Job Name", JobName, FilterParameter::Category::Parameter, AbaqusHexahedronWriter));
parameters.push_back(SIMPL_NEW_OUTPUT_PATH_FP("Output Path", OutputPath, FilterParameter::Category::Parameter, AbaqusHexahedronWriter));
parameters.push_back(SIMPL_NEW_STRING_FP("Output File Prefix", FilePrefix, FilterParameter::Category::Parameter, AbaqusHexahedronWriter));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void AvizoRectilinearCoordinateWriter::setupFilterParameters()
parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Feature Ids", FeatureIdsArrayPath, FilterParameter::Category::RequiredArray, AvizoRectilinearCoordinateWriter, req));
}

parameters.push_back(SIMPL_NEW_STRING_FP("Units", Units, FilterParameter::Category::Parameter, AvizoRectilinearCoordinateWriter, 0));
parameters.push_back(SIMPL_NEW_STRING_FP("Units", Units, FilterParameter::Category::Parameter, AvizoRectilinearCoordinateWriter, {0}));

setFilterParameters(parameters);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void AvizoUniformCoordinateWriter::setupFilterParameters()
DataArraySelectionFilterParameter::RequirementType req;
parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("FeatureIds", FeatureIdsArrayPath, FilterParameter::Category::RequiredArray, AvizoUniformCoordinateWriter, req));
}
parameters.push_back(SIMPL_NEW_STRING_FP("Units", Units, FilterParameter::Category::Parameter, AvizoUniformCoordinateWriter, 0));
parameters.push_back(SIMPL_NEW_STRING_FP("Units", Units, FilterParameter::Category::Parameter, AvizoUniformCoordinateWriter, {0}));

setFilterParameters(parameters);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ConvertHexGridToSquareGridFilterParameter::~ConvertHexGridToSquareGridFilterPara
// -----------------------------------------------------------------------------
ConvertHexGridToSquareGridFilterParameter::Pointer ConvertHexGridToSquareGridFilterParameter::Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue,
Category category, ConvertHexGridToSquareGrid* filter, const QString& fileExtension,
const QString& fileType, int groupIndex)
const QString& fileType, const std::vector<int>& groupIndices)
{
ConvertHexGridToSquareGridFilterParameter::Pointer ptr = ConvertHexGridToSquareGridFilterParameter::New();
ptr->setHumanLabel(humanLabel);
Expand All @@ -63,7 +63,7 @@ ConvertHexGridToSquareGridFilterParameter::Pointer ConvertHexGridToSquareGridFil
ptr->setCategory(category);
ptr->setFileExtension(fileExtension);
ptr->setFileType(fileType);
ptr->setGroupIndex(groupIndex);
ptr->setGroupIndices(groupIndices);
ptr->setFilter(filter);

return ptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class OrientationAnalysis_EXPORT ConvertHexGridToSquareGridFilterParameter : pub
static QString ClassName();

static Pointer Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, Category category, ConvertHexGridToSquareGrid* filter,
const QString& fileExtension = QString(""), const QString& fileType = QString(""), int groupIndex = -1);
const QString& fileExtension = QString(""), const QString& fileType = QString(""), const std::vector<int>& groupIndices = {});

~ConvertHexGridToSquareGridFilterParameter() override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ EbsdToH5EbsdFilterParameter::~EbsdToH5EbsdFilterParameter() = default;
//
// -----------------------------------------------------------------------------
EbsdToH5EbsdFilterParameter::Pointer EbsdToH5EbsdFilterParameter::Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, Category category, EbsdToH5Ebsd* filter,
const QString& fileExtension, const QString& fileType, int groupIndex)
const QString& fileExtension, const QString& fileType, const std::vector<int>& groupIndices)
{
EbsdToH5EbsdFilterParameter::Pointer ptr = EbsdToH5EbsdFilterParameter::New();
ptr->setHumanLabel(humanLabel);
Expand All @@ -58,7 +58,7 @@ EbsdToH5EbsdFilterParameter::Pointer EbsdToH5EbsdFilterParameter::Create(const Q
ptr->setCategory(category);
ptr->setFileExtension(fileExtension);
ptr->setFileType(fileType);
ptr->setGroupIndex(groupIndex);
ptr->setGroupIndices(groupIndices);
ptr->setFilter(filter);

return ptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class OrientationAnalysis_EXPORT EbsdToH5EbsdFilterParameter : public FilterPara
static QString ClassName();

static Pointer Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, Category category, EbsdToH5Ebsd* filter, const QString& fileExtension = QString(""),
const QString& fileType = QString(""), int groupIndex = -1);
const QString& fileType = QString(""), const std::vector<int>& groupIndices = {});

virtual ~EbsdToH5EbsdFilterParameter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ EnsembleInfoFilterParameter::~EnsembleInfoFilterParameter() = default;
// -----------------------------------------------------------------------------
EnsembleInfoFilterParameter::Pointer EnsembleInfoFilterParameter::Create(const QString& humanLabel, const QString& propertyName, EnsembleInfo defaultValue, Category category,
const SetterCallbackType& setterCallback, const GetterCallbackType& getterCallback, QVector<QString> choices,
bool showOperators, int groupIndex)
bool showOperators, const std::vector<int>& groupIndices)
{
EnsembleInfoFilterParameter::Pointer ptr = EnsembleInfoFilterParameter::New();
ptr->setHumanLabel(humanLabel);
Expand All @@ -63,7 +63,7 @@ EnsembleInfoFilterParameter::Pointer EnsembleInfoFilterParameter::Create(const Q
ptr->setCategory(category);
ptr->setChoices(choices);
ptr->setShowOperators(showOperators);
ptr->setGroupIndex(groupIndex);
ptr->setGroupIndices(groupIndices);
ptr->setSetterCallback(setterCallback);
ptr->setGetterCallback(getterCallback);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class OrientationAnalysis_EXPORT EnsembleInfoFilterParameter : public FilterPara
* @return
*/
static Pointer Create(const QString& humanLabel, const QString& propertyName, EnsembleInfo defaultValue, Category category, const SetterCallbackType& setterCallback,
const GetterCallbackType& getterCallback, QVector<QString> choices, bool showOperators, int groupIndex = -1);
const GetterCallbackType& getterCallback, QVector<QString> choices, bool showOperators, const std::vector<int>& groupIndices = {});

virtual ~EnsembleInfoFilterParameter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ OEMEbsdScanSelectionFilterParameter::~OEMEbsdScanSelectionFilterParameter() = de
// -----------------------------------------------------------------------------
OEMEbsdScanSelectionFilterParameter::Pointer OEMEbsdScanSelectionFilterParameter::Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue,
const QString& listProperty, Category category, const SetterCallbackType& setterCallback,
const GetterCallbackType& getterCallback, int groupIndex)
const GetterCallbackType& getterCallback, const std::vector<int>& groupIndices)
{
OEMEbsdScanSelectionFilterParameter::Pointer ptr = OEMEbsdScanSelectionFilterParameter::New();
ptr->setHumanLabel(humanLabel);
ptr->setPropertyName(propertyName);
ptr->setDefaultValue(defaultValue);
ptr->setListProperty(listProperty);
ptr->setCategory(category);
ptr->setGroupIndex(groupIndex);
ptr->setGroupIndices(groupIndices);
ptr->setSetterCallback(setterCallback);
ptr->setGetterCallback(getterCallback);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class OrientationAnalysis_EXPORT OEMEbsdScanSelectionFilterParameter : public Fi
using GetterCallbackType = std::function<QStringList(void)>;

static Pointer Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, const QString& listProperty, Category category, const SetterCallbackType& setterCallback,
const GetterCallbackType& getterCallback, int groupIndex = -1);
const GetterCallbackType& getterCallback, const std::vector<int>& groupIndices = {});

~OEMEbsdScanSelectionFilterParameter() override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ OrientationUtilityFilterParameter::~OrientationUtilityFilterParameter() = defaul
//
// -----------------------------------------------------------------------------
OrientationUtilityFilterParameter::Pointer OrientationUtilityFilterParameter::Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, Category category,
int groupIndex)
const std::vector<int>& groupIndices)
{
OrientationUtilityFilterParameter::Pointer ptr = OrientationUtilityFilterParameter::New();
ptr->setHumanLabel(humanLabel);
ptr->setPropertyName(propertyName);
ptr->setDefaultValue(defaultValue);
ptr->setCategory(category);
ptr->setGroupIndex(groupIndex);
ptr->setGroupIndices(groupIndices);
ptr->setReadOnly(true);

return ptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class OrientationAnalysis_EXPORT OrientationUtilityFilterParameter : public Filt
*/
static QString ClassName();

static Pointer Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, Category category, int groupIndex = -1);
static Pointer Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, Category category, const std::vector<int>& groupIndices = {});

virtual ~OrientationUtilityFilterParameter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ReadH5EbsdFilterParameter::~ReadH5EbsdFilterParameter() = default;
//
// -----------------------------------------------------------------------------
ReadH5EbsdFilterParameter::Pointer ReadH5EbsdFilterParameter::Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, Category category, ReadH5Ebsd* filter,
const QString& fileExtension, const QString& fileType, int groupIndex)
const QString& fileExtension, const QString& fileType, const std::vector<int>& groupIndices)
{
ReadH5EbsdFilterParameter::Pointer ptr = ReadH5EbsdFilterParameter::New();
ptr->setHumanLabel(humanLabel);
Expand All @@ -62,7 +62,7 @@ ReadH5EbsdFilterParameter::Pointer ReadH5EbsdFilterParameter::Create(const QStri
ptr->setCategory(category);
ptr->setFileExtension(fileExtension);
ptr->setFileType(fileType);
ptr->setGroupIndex(groupIndex);
ptr->setGroupIndices(groupIndices);
ptr->setFilter(filter);
return ptr;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class OrientationAnalysis_EXPORT ReadH5EbsdFilterParameter : public FilterParame
static QString ClassName();

static Pointer Create(const QString& humanLabel, const QString& propertyName, const QVariant& defaultValue, Category category, ReadH5Ebsd* filter, const QString& fileExtension = QString(""),
const QString& fileType = QString(""), int groupIndex = -1);
const QString& fileType = QString(""), const std::vector<int>& groupIndices = {});

~ReadH5EbsdFilterParameter() override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ void ConvertOrientations::setupFilterParameters()
DataArraySelectionFilterParameter::RequirementType req;
req.daTypes = std::vector<QString>(2, SIMPL::TypeNames::Double);
req.daTypes[1] = SIMPL::TypeNames::Float;
parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Input Orientations", InputOrientationArrayPath, FilterParameter::Category::RequiredArray, ConvertOrientations, req, 0));
parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Input Orientations", InputOrientationArrayPath, FilterParameter::Category::RequiredArray, ConvertOrientations, req, {0}));
}

parameters.push_back(SIMPL_NEW_DA_WITH_LINKED_AM_FP("Output Orientations", OutputOrientationArrayName, InputOrientationArrayPath, InputOrientationArrayPath, FilterParameter::Category::CreatedArray,
ConvertOrientations, 0));
ConvertOrientations, {0}));

setFilterParameters(parameters);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ void ConvertQuaternion::setupFilterParameters()
comp.push_back(std::vector<size_t>(1, 4));
dasReq.componentDimensions = comp;
dasReq.daTypes = {SIMPL::TypeNames::Float};
parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Quaternion Array", QuaternionDataArrayPath, FilterParameter::Category::Parameter, ConvertQuaternion, dasReq, DataArrayID30));
parameters.push_back(SIMPL_NEW_DA_SELECTION_FP("Quaternion Array", QuaternionDataArrayPath, FilterParameter::Category::Parameter, ConvertQuaternion, dasReq, {DataArrayID30}));
DataArrayCreationFilterParameter::RequirementType dacReq;
parameters.push_back(SIMPL_NEW_DA_CREATION_FP("Output Data Array Path", OutputDataArrayPath, FilterParameter::Category::CreatedArray, ConvertQuaternion, dacReq, DataArrayID31));
parameters.push_back(SIMPL_NEW_DA_CREATION_FP("Output Data Array Path", OutputDataArrayPath, FilterParameter::Category::CreatedArray, ConvertQuaternion, dacReq, {DataArrayID31}));
parameters.push_back(SIMPL_NEW_BOOL_FP("Delete Original Data", DeleteOriginalData, FilterParameter::Category::Parameter, ConvertQuaternion));
std::vector<QString> choices = {"To Scalar Vector ( w, [x, y, z] )", "To Vector Scalar ( [x, y, z], w )"};
parameters.push_back(SIMPL_NEW_CHOICE_FP("Conversion Type", ConversionType, FilterParameter::Category::Parameter, ConvertQuaternion, choices, false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ void EMsoftSO3Sampler::setupFilterParameters()
parameters.push_back(parameter);

/* standard sampling method */
parameters.push_back(SIMPL_NEW_INTEGER_FP("Point group number (see documentation for list)", PointGroup, FilterParameter::Category::Parameter, EMsoftSO3Sampler, 0));
parameters.push_back(SIMPL_NEW_INTEGER_FP("Point group number (see documentation for list)", PointGroup, FilterParameter::Category::Parameter, EMsoftSO3Sampler, {0}));
parameters.push_back(BooleanFilterParameter::Create("Offset sampling grid from origin?", "OffsetGrid", getOffsetGrid(), FilterParameter::Category::Parameter,
SIMPL_BIND_SETTER(EMsoftSO3Sampler, this, OffsetGrid), SIMPL_BIND_GETTER(EMsoftSO3Sampler, this, OffsetGrid), 0));
SIMPL_BIND_SETTER(EMsoftSO3Sampler, this, OffsetGrid), SIMPL_BIND_GETTER(EMsoftSO3Sampler, this, OffsetGrid), {0}));

/* equal misorientation sampling method */
parameters.push_back(SIMPL_NEW_DOUBLE_FP("Misorientation angle (degree)", MisOr, FilterParameter::Category::Parameter, EMsoftSO3Sampler, 1));
parameters.push_back(SIMPL_NEW_DOUBLE_FP("Misorientation angle (degree)", MisOr, FilterParameter::Category::Parameter, EMsoftSO3Sampler, {1}));
parameters.push_back(FloatVec3FilterParameter::Create("Reference orientation (Euler, °)", "RefOr", getRefOr(), FilterParameter::Category::Parameter,
SIMPL_BIND_SETTER(EMsoftSO3Sampler, this, RefOr), SIMPL_BIND_GETTER(EMsoftSO3Sampler, this, RefOr), 1));
SIMPL_BIND_SETTER(EMsoftSO3Sampler, this, RefOr), SIMPL_BIND_GETTER(EMsoftSO3Sampler, this, RefOr), {1}));

/* maximum misorientation sampling method */
parameters.push_back(SIMPL_NEW_DOUBLE_FP("Misorientation angle (degree)", MisOrFull, FilterParameter::Category::Parameter, EMsoftSO3Sampler, 2));
parameters.push_back(SIMPL_NEW_DOUBLE_FP("Misorientation angle (degree)", MisOrFull, FilterParameter::Category::Parameter, EMsoftSO3Sampler, {2}));
parameters.push_back(FloatVec3FilterParameter::Create("Reference orientation (Euler, °)", "RefOrFull", getRefOrFull(), FilterParameter::Category::Parameter,
SIMPL_BIND_SETTER(EMsoftSO3Sampler, this, RefOrFull), SIMPL_BIND_GETTER(EMsoftSO3Sampler, this, RefOrFull), 2));
SIMPL_BIND_SETTER(EMsoftSO3Sampler, this, RefOrFull), SIMPL_BIND_GETTER(EMsoftSO3Sampler, this, RefOrFull), {2}));
}
parameters.push_back(SIMPL_NEW_INTEGER_FP("Number of sampling points along cube semi-axis", Numsp, FilterParameter::Category::Parameter, EMsoftSO3Sampler));

Expand Down
Loading