Skip to content
Open
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 @@ -34,7 +34,6 @@ Result<> ReadAngData::operator()()
{
return MakeErrorResult(reader.getErrorCode(), reader.getErrorMessage());
}

const auto result = loadMaterialInfo(&reader);
if(result.first < 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ IFilter::PreflightResult ReadAngDataFilter::preflightImpl(const DataStructure& d
{
return {MakeErrorResult<OutputActions>(reader.getErrorCode(), reader.getErrorMessage())};
}
if(reader.getGrid().empty())
{
return {MakeErrorResult<OutputActions>(-19501, fmt::format("Input file '{}' is missing the GRID header key.", pInputFileValue.string()))};
}

CreateImageGeometryAction::DimensionType imageGeomDims = {static_cast<size_t>(reader.getXDimension()), static_cast<size_t>(reader.getYDimension()), static_cast<size_t>(1)};
std::vector<size_t> tupleDims = {imageGeomDims[2], imageGeomDims[1], imageGeomDims[0]};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,34 +245,47 @@ void GeneratePreflightPhaseInformation(ReaderType& reader, std::vector<IFilter::
preflightUpdatedValues.push_back({"Phase Information", ""});
}
auto laueOps = ebsdlib::LaueOps::GetAllOrientationOps();
int phaseIndex = 1;
// int phaseIndex = 1;
for(const auto& phaseInfo : phaseInfos)
{

if constexpr(std::is_same_v<ReaderType, ebsdlib::AngReader> || std::is_same_v<ReaderType, ebsdlib::H5OIMReader> || std::is_same_v<ReaderType, ebsdlib::H5AngVolumeReader>)
{
preflightUpdatedValues.push_back({fmt::format("{}: ", phaseIndex++), fmt::format("Material Name: {} | Formula: {} | Crystal Symmetry: {}", phaseInfo->getMaterialName(),
phaseInfo->getFormula(), laueOps[phaseInfo->determineOrientationOpsIndex()]->getSymmetryName())});
if(phaseInfo == nullptr)
{
continue;
}
preflightUpdatedValues.push_back({fmt::format("{}: ", phaseInfo->getPhaseIndex()), fmt::format("Material Name: {} | Formula: {} | Crystal Symmetry: {}", phaseInfo->getMaterialName(),
phaseInfo->getFormula(), laueOps[phaseInfo->determineOrientationOpsIndex()]->getSymmetryName())});
}

if constexpr(std::is_same_v<ReaderType, ebsdlib::CtfReader> || std::is_same_v<ReaderType, ebsdlib::H5OINAReader> || std::is_same_v<ReaderType, ebsdlib::CprReader> ||
std::is_same_v<ReaderType, ebsdlib::H5CtfVolumeReader>)
{
preflightUpdatedValues.push_back({fmt::format("{}: ", phaseIndex++), fmt::format("Material Name: {} | Crystal Symmetry: {} | Comment: {}", phaseInfo->getMaterialName(),
laueOps[phaseInfo->determineOrientationOpsIndex()]->getSymmetryName(), phaseInfo->getComment())});
if(phaseInfo == nullptr)
{
continue;
}
preflightUpdatedValues.push_back({fmt::format("{}: ", phaseInfo->getPhaseIndex()), fmt::format("Material Name: {} | Crystal Symmetry: {} | Comment: {}", phaseInfo->getMaterialName(),
laueOps[phaseInfo->determineOrientationOpsIndex()]->getSymmetryName(), phaseInfo->getComment())});
}

if constexpr(std::is_same_v<ReaderType, ebsdlib::H5EspritReader>)
{
preflightUpdatedValues.push_back({fmt::format("{}: ", phaseIndex++), fmt::format("Material Name: {} | Crystal Symmetry: {} | Space Group: {}", phaseInfo->getMaterialName(),
laueOps[phaseInfo->determineOrientationOpsIndex()]->getSymmetryName(), phaseInfo->getSpaceGroup())});
if(phaseInfo == nullptr)
{
continue;
}
preflightUpdatedValues.push_back(
{fmt::format("{}: ", phaseInfo->getPhaseIndex()), fmt::format("Material Name: {} | Crystal Symmetry: {} | Space Group: {}", phaseInfo->getMaterialName(),
laueOps[phaseInfo->determineOrientationOpsIndex()]->getSymmetryName(), phaseInfo->getSpaceGroup())});
}

if constexpr(std::is_same_v<ReaderType, GrainMapper3DUtilities::GrainMapperReader>)
{
preflightUpdatedValues.push_back(
{fmt::format("{}: ", phaseIndex++), fmt::format("Material Name: {} | Crystal Symmetry: {} | Space Group: {}", phaseInfo.Name,
ebsdlib::LaueOps::GetOrientationOpsFromSpaceGroupNumber(phaseInfo.SpaceGroup)->getSymmetryName(), phaseInfo.SpaceGroup)});
{fmt::format("{}: ", phaseInfo.PhaseIndex), fmt::format("Material Name: {} | Crystal Symmetry: {} | Space Group: {}", phaseInfo.Name,
ebsdlib::LaueOps::GetOrientationOpsFromSpaceGroupNumber(phaseInfo.SpaceGroup)->getSymmetryName(), phaseInfo.SpaceGroup)});
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ herr_t GrainMapperReader::readPhaseInfo(hid_t parentId)
m_PhaseInfos.clear();

// Now we know how many phases we have, we need to programmatically generate those phase names
// in order to keep them consistent. Yep, someone didn't really think through the parsing of this
// to keep them consistent. Yep, no one really thought through the parsing of this
// or assumptions are being made about the order that HDF5 is going to give them back to you. Either
// is bad.
for(int i = 0; i < phaseNames.size(); i++)
Expand All @@ -391,6 +391,7 @@ herr_t GrainMapperReader::readPhaseInfo(hid_t parentId)
auto phaseDGidSentinel = H5Support::H5ScopedGroupSentinel(phaseGid, true);

GrainMapperPhase phase;
phase.PhaseIndex = i;
error = H5Lite::readStringDataset(phaseGid, Constants::k_Name, phase.Name);
if(error < 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class ORIENTATIONANALYSIS_EXPORT GrainMapperReader
int32_t SpaceGroup;
std::vector<double> UnitCell; // ABC, Alpha, Beta, Gamma
std::string UniversalHermannMauguin;
int32_t PhaseIndex;
} GrainMapperPhase;

nx::core::Result<> readHeaderOnly();
Expand Down
4 changes: 1 addition & 3 deletions src/Plugins/SimplnxCore/docs/ReadRawBinaryFilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ The types of data that can be read with this **Filter** include:

---

### Tuple Dimensions
### A Note about Tuple and Component Dimensions

The tuple dimensions define the shape of the output **Data Array**. For example, a 3D volume with 100 x 200 x 50 voxels would have tuple dimensions of `50, 200, 100` (slowest to fastest, i.e., Z, Y, X).

When creating the output array inside an **Attribute Matrix**, the tuple dimensions are automatically inherited from the Attribute Matrix shape. In this case, the *Set Tuple Dimensions* checkbox can be unchecked to hide the tuple dimensions entry table.

If the output array is **not** inside an Attribute Matrix, then the user **must** check *Set Tuple Dimensions* and provide the dimensions explicitly.

### Component Dimensions

This parameter tells the program how many values are present for each *tuple* and how they are organized. The component dimensions are specified as a table of values (slowest to fastest dimension).

Examples:
Expand Down
4 changes: 2 additions & 2 deletions src/Plugins/SimplnxCore/docs/RemoveFlaggedEdgesFilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ This **Filter** removes **Edges** from the supplied **Edges Geometry** that are

For each of the vertex and edge data attribute matrices, the user can select to copy none, some or all of the associated data arrays into the newly created geometry. If the user wishes to not copy any of the data, just leave the choice to "Copy Selected XXX Data" but do not populate the list with any selections.

### Vertex Data Handling
### A Note on Vertex Data Handling

The *Vertex Data Handling* parameter controls which vertex data arrays are transferred to the reduced geometry:

- **Copy Selected Vertex Data [0]**: Copies only the vertex arrays selected by the user into the new geometry.
- **Copy All Vertex Data [1]**: Copies all arrays from the vertex attribute matrix into the new geometry.

### Edge Data Handling
### A Note on Edge Data Handling

The *Edge Data Handling* parameter controls which edge data arrays are transferred to the reduced geometry:

Expand Down
4 changes: 2 additions & 2 deletions src/Plugins/SimplnxCore/docs/RemoveFlaggedTrianglesFilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ This **Filter** removes **Triangles** from the supplied **Triangle Geometry** th

For each of the vertex and triangle (face) data attribute matrices, the user can select to copy none, some or all of the associated data arrays into the newly created geometry. If the user wishes to not copy any of the data, just leave the choice to "Copy Selected XXX Data" but do not populate the list with any selections.

### Vertex Data Handling
### A Note About Vertex Data Handling

The *Vertex Data Handling* parameter controls which vertex data arrays are transferred to the reduced geometry:

- **Copy Selected Vertex Data [0]**: Copies only the vertex arrays selected by the user into the new geometry.
- **Copy All Vertex Data [1]**: Copies all arrays from the vertex attribute matrix into the new geometry.

### Triangle Data Handling
### A Note About Triangle Data Handling

The *Triangle Data Handling* parameter controls which triangle (face) data arrays are transferred to the reduced geometry:

Expand Down
Loading