Skip to content

Commit e623f27

Browse files
committed
BUG: Add empty implementation to convert SIMPL Json parameters to SIMPLNX Parameters
1 parent 3ecdcb8 commit e623f27

15 files changed

+203
-8
lines changed

src/SimplnxReview/Filters/ComputeGroupingDensityFilter.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,25 @@ Result<> ComputeGroupingDensityFilter::executeImpl(DataStructure& dataStructure,
211211

212212
return ComputeGroupingDensity(dataStructure, messageHandler, shouldCancel, &inputValues)();
213213
}
214+
215+
//------------------------------------------------------------------------------
216+
// Converting from SIMPL Json to SIMPLNX Json
217+
namespace
218+
{
219+
namespace SIMPL
220+
{
221+
222+
} // namespace SIMPL
223+
} // namespace
224+
225+
Result<Arguments> ComputeGroupingDensityFilter::FromSIMPLJson(const nlohmann::json& json)
226+
{
227+
Arguments args = ComputeGroupingDensityFilter().getDefaultArguments();
228+
229+
std::vector<Result<>> results;
230+
231+
Result<> conversionResult = MergeResults(std::move(results));
232+
233+
return ConvertResultTo<Arguments>(std::move(conversionResult), std::move(args));
234+
}
214235
} // namespace nx::core

src/SimplnxReview/Filters/ComputeGroupingDensityFilter.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ class SIMPLNXREVIEW_EXPORT ComputeGroupingDensityFilter : public IFilter
3434
static inline constexpr StringLiteral k_CheckedFeaturesName_Key = "checked_features_name";
3535
static inline constexpr StringLiteral k_GroupingDensitiesName_Key = "grouping_densities_name";
3636

37+
/**
38+
* @brief Reads SIMPL json and converts it simplnx Arguments.
39+
* @param json
40+
* @return Result<Arguments>
41+
*/
42+
static Result<Arguments> FromSIMPLJson(const nlohmann::json& json);
43+
3744
/**
3845
* @brief Returns the name of the filter.
3946
* @return

src/SimplnxReview/Filters/ComputeLocalAverageCAxisMisalignmentsFilter.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,25 @@ Result<> ComputeLocalAverageCAxisMisalignmentsFilter::executeImpl(DataStructure&
249249

250250
return ComputeLocalAverageCAxisMisalignments(dataStructure, messageHandler, shouldCancel, &inputValues)();
251251
}
252+
253+
//------------------------------------------------------------------------------
254+
// Converting from SIMPL Json to SIMPLNX Json
255+
namespace
256+
{
257+
namespace SIMPL
258+
{
259+
260+
} // namespace SIMPL
261+
} // namespace
262+
263+
Result<Arguments> ComputeLocalAverageCAxisMisalignmentsFilter::FromSIMPLJson(const nlohmann::json& json)
264+
{
265+
Arguments args = ComputeLocalAverageCAxisMisalignmentsFilter().getDefaultArguments();
266+
267+
std::vector<Result<>> results;
268+
269+
Result<> conversionResult = MergeResults(std::move(results));
270+
271+
return ConvertResultTo<Arguments>(std::move(conversionResult), std::move(args));
272+
}
252273
} // namespace nx::core

src/SimplnxReview/Filters/ComputeLocalAverageCAxisMisalignmentsFilter.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ class SIMPLNXREVIEW_EXPORT ComputeLocalAverageCAxisMisalignmentsFilter : public
3535
static inline constexpr StringLiteral k_LocalCAxisMisalignmentsName_Key = "local_c_axis_misalignments_name";
3636
static inline constexpr StringLiteral k_UnbiasedLocalCAxisMisalignmentsName_Key = "unbiased_local_c_axis_misalignments_name";
3737

38+
/**
39+
* @brief Reads SIMPL json and converts it simplnx Arguments.
40+
* @param json
41+
* @return Result<Arguments>
42+
*/
43+
static Result<Arguments> FromSIMPLJson(const nlohmann::json& json);
44+
3845
/**
3946
* @brief Returns the name of the filter.
4047
* @return

src/SimplnxReview/Filters/ComputeMicroTextureRegionsFilter.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,25 @@ Result<> ComputeMicroTextureRegionsFilter::executeImpl(DataStructure& dataStruct
128128

129129
return ComputeMicroTextureRegions(dataStructure, messageHandler, shouldCancel, &inputValues)();
130130
}
131+
132+
//------------------------------------------------------------------------------
133+
// Converting from SIMPL Json to SIMPLNX Json
134+
namespace
135+
{
136+
namespace SIMPL
137+
{
138+
139+
} // namespace SIMPL
140+
} // namespace
141+
142+
Result<Arguments> ComputeMicroTextureRegionsFilter::FromSIMPLJson(const nlohmann::json& json)
143+
{
144+
Arguments args = ComputeMicroTextureRegionsFilter().getDefaultArguments();
145+
146+
std::vector<Result<>> results;
147+
148+
Result<> conversionResult = MergeResults(std::move(results));
149+
150+
return ConvertResultTo<Arguments>(std::move(conversionResult), std::move(args));
151+
}
131152
} // namespace nx::core

src/SimplnxReview/Filters/ComputeMicroTextureRegionsFilter.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ class SIMPLNXREVIEW_EXPORT ComputeMicroTextureRegionsFilter : public IFilter
3030
static inline constexpr StringLiteral k_MicroTextureRegionNumCellsArrayName_Key = "micro_texture_region_num_cells_array_name";
3131
static inline constexpr StringLiteral k_MicroTextureRegionFractionOccupiedArrayName_Key = "micro_texture_region_fraction_occupied_array_name";
3232

33+
/**
34+
* @brief Reads SIMPL json and converts it simplnx Arguments.
35+
* @param json
36+
* @return Result<Arguments>
37+
*/
38+
static Result<Arguments> FromSIMPLJson(const nlohmann::json& json);
39+
3340
/**
3441
* @brief Returns the name of the filter.
3542
* @return

src/SimplnxReview/Filters/ComputeSaltykovSizesFilter.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,25 @@ Result<> ComputeSaltykovSizesFilter::executeImpl(DataStructure& dataStructure, c
121121

122122
return ComputeSaltykovSizes(dataStructure, messageHandler, shouldCancel, &inputValues)();
123123
}
124+
125+
//------------------------------------------------------------------------------
126+
// Converting from SIMPL Json to SIMPLNX Json
127+
namespace
128+
{
129+
namespace SIMPL
130+
{
131+
132+
} // namespace SIMPL
133+
} // namespace
134+
135+
Result<Arguments> ComputeSaltykovSizesFilter::FromSIMPLJson(const nlohmann::json& json)
136+
{
137+
Arguments args = ComputeSaltykovSizesFilter().getDefaultArguments();
138+
139+
std::vector<Result<>> results;
140+
141+
Result<> conversionResult = MergeResults(std::move(results));
142+
143+
return ConvertResultTo<Arguments>(std::move(conversionResult), std::move(args));
144+
}
124145
} // namespace nx::core

src/SimplnxReview/Filters/ComputeSaltykovSizesFilter.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ class SIMPLNXREVIEW_EXPORT ComputeSaltykovSizesFilter : public IFilter
2929
static inline constexpr StringLiteral k_EquivalentDiametersArrayPath_Key = "equivalent_diameters_array_path";
3030
static inline constexpr StringLiteral k_SaltykovEquivalentDiametersName_Key = "saltykov_equivalent_diameters_name";
3131

32+
/**
33+
* @brief Reads SIMPL json and converts it simplnx Arguments.
34+
* @param json
35+
* @return Result<Arguments>
36+
*/
37+
static Result<Arguments> FromSIMPLJson(const nlohmann::json& json);
38+
3239
/**
3340
* @brief Returns the name of the filter.
3441
* @return

src/SimplnxReview/Filters/GroupMicroTextureRegionsFilter.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ Parameters GroupMicroTextureRegionsFilter::parameters() const
6161
params.insert(std::make_unique<NeighborListSelectionParameter>(k_ContiguousNeighborListArrayPath_Key, "Contiguous Neighbor List", "List of contiguous neighbors for each Feature.", DataPath{},
6262
NeighborListSelectionParameter::AllowedTypes{DataType::int32}));
6363

64-
params.insertSeparator(Parameters::Separator{"Non-Contiguous Neighborhood Option"});
64+
params.insertSeparator(Parameters::Separator{"Non-Contiguous Neighborhood Option"});
6565
params.insertLinkableParameter(std::make_unique<BoolParameter>(k_UseNonContiguousNeighbors_Key, "Use Non-Contiguous Neighbors", "Use non-contiguous neighborhoods", false));
6666
params.insert(std::make_unique<NeighborListSelectionParameter>(k_NonContiguousNeighborListArrayPath_Key, "Non-Contiguous Neighbor List", "List of non-contiguous neighbors for each Feature.",
6767
DataPath{}, NeighborListSelectionParameter::AllowedTypes{DataType::int32}));
6868

69-
7069
params.insertSeparator(Parameters::Separator{"Random Number Seed Parameters"});
7170
params.insertLinkableParameter(std::make_unique<BoolParameter>(k_UseSeed_Key, "Use Seed for Random Generation", "When true the user will be able to put in a seed for random generation", false));
7271
params.insert(std::make_unique<NumberParameter<uint64>>(k_SeedValue_Key, "Seed", "The seed fed into the random generator", std::mt19937::default_seed));
@@ -194,4 +193,25 @@ Result<> GroupMicroTextureRegionsFilter::executeImpl(DataStructure& dataStructur
194193

195194
return GroupMicroTextureRegions(dataStructure, messageHandler, shouldCancel, &inputValues)();
196195
}
196+
197+
//------------------------------------------------------------------------------
198+
// Converting from SIMPL Json to SIMPLNX Json
199+
namespace
200+
{
201+
namespace SIMPL
202+
{
203+
204+
} // namespace SIMPL
205+
} // namespace
206+
207+
Result<Arguments> GroupMicroTextureRegionsFilter::FromSIMPLJson(const nlohmann::json& json)
208+
{
209+
Arguments args = GroupMicroTextureRegionsFilter().getDefaultArguments();
210+
211+
std::vector<Result<>> results;
212+
213+
Result<> conversionResult = MergeResults(std::move(results));
214+
215+
return ConvertResultTo<Arguments>(std::move(conversionResult), std::move(args));
216+
}
197217
} // namespace nx::core

src/SimplnxReview/Filters/GroupMicroTextureRegionsFilter.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ class SIMPLNXREVIEW_EXPORT GroupMicroTextureRegionsFilter : public IFilter
4242
static inline constexpr StringLiteral k_UseSeed_Key = "use_seed";
4343
static inline constexpr StringLiteral k_SeedValue_Key = "seed_value";
4444

45+
/**
46+
* @brief Reads SIMPL json and converts it simplnx Arguments.
47+
* @param json
48+
* @return Result<Arguments>
49+
*/
50+
static Result<Arguments> FromSIMPLJson(const nlohmann::json& json);
51+
4552
/**
4653
* @brief Returns the name of the filter.
4754
* @return

0 commit comments

Comments
 (0)