Skip to content

Commit

Permalink
Fix filenames that are illegal on windows machines
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Sep 18, 2024
1 parent 2611991 commit e12c057
Show file tree
Hide file tree
Showing 34 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Apps/generate_ipf_legends.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

using namespace EbsdLib;

// const std::string k_Output_Dir(UnitTest::DataDir + "IPF_Legend/");
//const std::string k_Output_Dir(UnitTest::DataDir + "IPF_Legend/");
const std::string k_Output_Dir(UnitTest::TestTempDir + "IPF_Legend/");

using EbsdDoubleArrayType = EbsdDataArray<float>;
Expand Down Expand Up @@ -312,7 +312,11 @@ void GeneratePoleFigures(LaueOps& ops, int symType)
poleFigure = EbsdLib::DrawStandardHexagonalProjection(poleFigure, config.imageDim, config.imageDim);
}
ss.str("");
ss << k_Output_Dir << EbsdStringUtils::replace(ops.getSymmetryName(), "/", "|") << "/" << config.labels[index] << "_pole_figure.tiff";

std::string cleanedLabel = EbsdStringUtils::replace(config.labels[index], "<", "_");
cleanedLabel = EbsdStringUtils::replace(cleanedLabel, ">", "_");

ss << k_Output_Dir << EbsdStringUtils::replace(ops.getSymmetryName(), "/", "|") << "/" << cleanedLabel << "_pole_figure.tiff";
auto result = TiffWriter::WriteColorImage(ss.str(), config.imageDim, config.imageDim, 3, poleFigure->getTuplePointer(0));
std::cout << ops.getSymmetryName() << " Pole Figure Result: " << result.first << ": " << result.second << std::endl;
index++;
Expand Down

0 comments on commit e12c057

Please sign in to comment.