From e12c057ead35e836ee661998d74f3923e24ff3b9 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Wed, 18 Sep 2024 12:24:17 -0400 Subject: [PATCH] Fix filenames that are illegal on windows machines Signed-off-by: Michael Jackson --- ...001>_pole_figure.tiff => _001__pole_figure.tiff} | Bin ...011>_pole_figure.tiff => _011__pole_figure.tiff} | Bin ...111>_pole_figure.tiff => _111__pole_figure.tiff} | Bin ...001>_pole_figure.tiff => _001__pole_figure.tiff} | Bin ...011>_pole_figure.tiff => _011__pole_figure.tiff} | Bin ...111>_pole_figure.tiff => _111__pole_figure.tiff} | Bin ...01>_pole_figure.tiff => _0001__pole_figure.tiff} | Bin ...0>_pole_figure.tiff => _11-20__pole_figure.tiff} | Bin ...>_pole_figure.tiff => _2-1-10__pole_figure.tiff} | Bin ...01>_pole_figure.tiff => _0001__pole_figure.tiff} | Bin ...0>_pole_figure.tiff => _10-10__pole_figure.tiff} | Bin ...>_pole_figure.tiff => _2-1-10__pole_figure.tiff} | Bin ...001>_pole_figure.tiff => _001__pole_figure.tiff} | Bin ...010>_pole_figure.tiff => _010__pole_figure.tiff} | Bin ...100>_pole_figure.tiff => _100__pole_figure.tiff} | Bin ...001>_pole_figure.tiff => _001__pole_figure.tiff} | Bin ...010>_pole_figure.tiff => _010__pole_figure.tiff} | Bin ...100>_pole_figure.tiff => _100__pole_figure.tiff} | Bin ...001>_pole_figure.tiff => _001__pole_figure.tiff} | Bin ...010>_pole_figure.tiff => _010__pole_figure.tiff} | Bin ...100>_pole_figure.tiff => _100__pole_figure.tiff} | Bin ...001>_pole_figure.tiff => _001__pole_figure.tiff} | Bin ...100>_pole_figure.tiff => _100__pole_figure.tiff} | Bin ...110>_pole_figure.tiff => _110__pole_figure.tiff} | Bin ...001>_pole_figure.tiff => _001__pole_figure.tiff} | Bin ...010>_pole_figure.tiff => _010__pole_figure.tiff} | Bin ...100>_pole_figure.tiff => _100__pole_figure.tiff} | Bin ...>_pole_figure.tiff => _-1-120__pole_figure.tiff} | Bin ...01>_pole_figure.tiff => _0001__pole_figure.tiff} | Bin ...>_pole_figure.tiff => _2-1-10__pole_figure.tiff} | Bin ...0>_pole_figure.tiff => _0-110__pole_figure.tiff} | Bin ...01>_pole_figure.tiff => _0001__pole_figure.tiff} | Bin ...0>_pole_figure.tiff => _1-100__pole_figure.tiff} | Bin Source/Apps/generate_ipf_legends.cpp | 8 ++++++-- 34 files changed, 6 insertions(+), 2 deletions(-) rename Data/IPF_Legend/Cubic m-3 (Th)/{<001>_pole_figure.tiff => _001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Cubic m-3 (Th)/{<011>_pole_figure.tiff => _011__pole_figure.tiff} (100%) rename Data/IPF_Legend/Cubic m-3 (Th)/{<111>_pole_figure.tiff => _111__pole_figure.tiff} (100%) rename Data/IPF_Legend/Cubic m-3m (Oh)/{<001>_pole_figure.tiff => _001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Cubic m-3m (Oh)/{<011>_pole_figure.tiff => _011__pole_figure.tiff} (100%) rename Data/IPF_Legend/Cubic m-3m (Oh)/{<111>_pole_figure.tiff => _111__pole_figure.tiff} (100%) rename Data/IPF_Legend/Hexagonal 6|m (C6h)/{<0001>_pole_figure.tiff => _0001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Hexagonal 6|m (C6h)/{<11-20>_pole_figure.tiff => _11-20__pole_figure.tiff} (100%) rename Data/IPF_Legend/Hexagonal 6|m (C6h)/{<2-1-10>_pole_figure.tiff => _2-1-10__pole_figure.tiff} (100%) rename Data/IPF_Legend/Hexagonal 6|mmm (D6h)/{<0001>_pole_figure.tiff => _0001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Hexagonal 6|mmm (D6h)/{<10-10>_pole_figure.tiff => _10-10__pole_figure.tiff} (100%) rename Data/IPF_Legend/Hexagonal 6|mmm (D6h)/{<2-1-10>_pole_figure.tiff => _2-1-10__pole_figure.tiff} (100%) rename Data/IPF_Legend/Monoclinic 2|m (C2h)/{<001>_pole_figure.tiff => _001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Monoclinic 2|m (C2h)/{<010>_pole_figure.tiff => _010__pole_figure.tiff} (100%) rename Data/IPF_Legend/Monoclinic 2|m (C2h)/{<100>_pole_figure.tiff => _100__pole_figure.tiff} (100%) rename Data/IPF_Legend/Orthorhombic mmm (D2h)/{<001>_pole_figure.tiff => _001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Orthorhombic mmm (D2h)/{<010>_pole_figure.tiff => _010__pole_figure.tiff} (100%) rename Data/IPF_Legend/Orthorhombic mmm (D2h)/{<100>_pole_figure.tiff => _100__pole_figure.tiff} (100%) rename Data/IPF_Legend/Tetragonal 4|m (C4h)/{<001>_pole_figure.tiff => _001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Tetragonal 4|m (C4h)/{<010>_pole_figure.tiff => _010__pole_figure.tiff} (100%) rename Data/IPF_Legend/Tetragonal 4|m (C4h)/{<100>_pole_figure.tiff => _100__pole_figure.tiff} (100%) rename Data/IPF_Legend/Tetragonal 4|mmm (D4h)/{<001>_pole_figure.tiff => _001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Tetragonal 4|mmm (D4h)/{<100>_pole_figure.tiff => _100__pole_figure.tiff} (100%) rename Data/IPF_Legend/Tetragonal 4|mmm (D4h)/{<110>_pole_figure.tiff => _110__pole_figure.tiff} (100%) rename Data/IPF_Legend/Triclinic -1 (Ci)/{<001>_pole_figure.tiff => _001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Triclinic -1 (Ci)/{<010>_pole_figure.tiff => _010__pole_figure.tiff} (100%) rename Data/IPF_Legend/Triclinic -1 (Ci)/{<100>_pole_figure.tiff => _100__pole_figure.tiff} (100%) rename Data/IPF_Legend/Trigonal -3 (C3i)/{<-1-120>_pole_figure.tiff => _-1-120__pole_figure.tiff} (100%) rename Data/IPF_Legend/Trigonal -3 (C3i)/{<0001>_pole_figure.tiff => _0001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Trigonal -3 (C3i)/{<2-1-10>_pole_figure.tiff => _2-1-10__pole_figure.tiff} (100%) rename Data/IPF_Legend/Trigonal -3m (D3d)/{<0-110>_pole_figure.tiff => _0-110__pole_figure.tiff} (100%) rename Data/IPF_Legend/Trigonal -3m (D3d)/{<0001>_pole_figure.tiff => _0001__pole_figure.tiff} (100%) rename Data/IPF_Legend/Trigonal -3m (D3d)/{<1-100>_pole_figure.tiff => _1-100__pole_figure.tiff} (100%) diff --git a/Data/IPF_Legend/Cubic m-3 (Th)/<001>_pole_figure.tiff b/Data/IPF_Legend/Cubic m-3 (Th)/_001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Cubic m-3 (Th)/<001>_pole_figure.tiff rename to Data/IPF_Legend/Cubic m-3 (Th)/_001__pole_figure.tiff diff --git a/Data/IPF_Legend/Cubic m-3 (Th)/<011>_pole_figure.tiff b/Data/IPF_Legend/Cubic m-3 (Th)/_011__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Cubic m-3 (Th)/<011>_pole_figure.tiff rename to Data/IPF_Legend/Cubic m-3 (Th)/_011__pole_figure.tiff diff --git a/Data/IPF_Legend/Cubic m-3 (Th)/<111>_pole_figure.tiff b/Data/IPF_Legend/Cubic m-3 (Th)/_111__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Cubic m-3 (Th)/<111>_pole_figure.tiff rename to Data/IPF_Legend/Cubic m-3 (Th)/_111__pole_figure.tiff diff --git a/Data/IPF_Legend/Cubic m-3m (Oh)/<001>_pole_figure.tiff b/Data/IPF_Legend/Cubic m-3m (Oh)/_001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Cubic m-3m (Oh)/<001>_pole_figure.tiff rename to Data/IPF_Legend/Cubic m-3m (Oh)/_001__pole_figure.tiff diff --git a/Data/IPF_Legend/Cubic m-3m (Oh)/<011>_pole_figure.tiff b/Data/IPF_Legend/Cubic m-3m (Oh)/_011__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Cubic m-3m (Oh)/<011>_pole_figure.tiff rename to Data/IPF_Legend/Cubic m-3m (Oh)/_011__pole_figure.tiff diff --git a/Data/IPF_Legend/Cubic m-3m (Oh)/<111>_pole_figure.tiff b/Data/IPF_Legend/Cubic m-3m (Oh)/_111__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Cubic m-3m (Oh)/<111>_pole_figure.tiff rename to Data/IPF_Legend/Cubic m-3m (Oh)/_111__pole_figure.tiff diff --git a/Data/IPF_Legend/Hexagonal 6|m (C6h)/<0001>_pole_figure.tiff b/Data/IPF_Legend/Hexagonal 6|m (C6h)/_0001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Hexagonal 6|m (C6h)/<0001>_pole_figure.tiff rename to Data/IPF_Legend/Hexagonal 6|m (C6h)/_0001__pole_figure.tiff diff --git a/Data/IPF_Legend/Hexagonal 6|m (C6h)/<11-20>_pole_figure.tiff b/Data/IPF_Legend/Hexagonal 6|m (C6h)/_11-20__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Hexagonal 6|m (C6h)/<11-20>_pole_figure.tiff rename to Data/IPF_Legend/Hexagonal 6|m (C6h)/_11-20__pole_figure.tiff diff --git a/Data/IPF_Legend/Hexagonal 6|m (C6h)/<2-1-10>_pole_figure.tiff b/Data/IPF_Legend/Hexagonal 6|m (C6h)/_2-1-10__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Hexagonal 6|m (C6h)/<2-1-10>_pole_figure.tiff rename to Data/IPF_Legend/Hexagonal 6|m (C6h)/_2-1-10__pole_figure.tiff diff --git a/Data/IPF_Legend/Hexagonal 6|mmm (D6h)/<0001>_pole_figure.tiff b/Data/IPF_Legend/Hexagonal 6|mmm (D6h)/_0001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Hexagonal 6|mmm (D6h)/<0001>_pole_figure.tiff rename to Data/IPF_Legend/Hexagonal 6|mmm (D6h)/_0001__pole_figure.tiff diff --git a/Data/IPF_Legend/Hexagonal 6|mmm (D6h)/<10-10>_pole_figure.tiff b/Data/IPF_Legend/Hexagonal 6|mmm (D6h)/_10-10__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Hexagonal 6|mmm (D6h)/<10-10>_pole_figure.tiff rename to Data/IPF_Legend/Hexagonal 6|mmm (D6h)/_10-10__pole_figure.tiff diff --git a/Data/IPF_Legend/Hexagonal 6|mmm (D6h)/<2-1-10>_pole_figure.tiff b/Data/IPF_Legend/Hexagonal 6|mmm (D6h)/_2-1-10__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Hexagonal 6|mmm (D6h)/<2-1-10>_pole_figure.tiff rename to Data/IPF_Legend/Hexagonal 6|mmm (D6h)/_2-1-10__pole_figure.tiff diff --git a/Data/IPF_Legend/Monoclinic 2|m (C2h)/<001>_pole_figure.tiff b/Data/IPF_Legend/Monoclinic 2|m (C2h)/_001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Monoclinic 2|m (C2h)/<001>_pole_figure.tiff rename to Data/IPF_Legend/Monoclinic 2|m (C2h)/_001__pole_figure.tiff diff --git a/Data/IPF_Legend/Monoclinic 2|m (C2h)/<010>_pole_figure.tiff b/Data/IPF_Legend/Monoclinic 2|m (C2h)/_010__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Monoclinic 2|m (C2h)/<010>_pole_figure.tiff rename to Data/IPF_Legend/Monoclinic 2|m (C2h)/_010__pole_figure.tiff diff --git a/Data/IPF_Legend/Monoclinic 2|m (C2h)/<100>_pole_figure.tiff b/Data/IPF_Legend/Monoclinic 2|m (C2h)/_100__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Monoclinic 2|m (C2h)/<100>_pole_figure.tiff rename to Data/IPF_Legend/Monoclinic 2|m (C2h)/_100__pole_figure.tiff diff --git a/Data/IPF_Legend/Orthorhombic mmm (D2h)/<001>_pole_figure.tiff b/Data/IPF_Legend/Orthorhombic mmm (D2h)/_001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Orthorhombic mmm (D2h)/<001>_pole_figure.tiff rename to Data/IPF_Legend/Orthorhombic mmm (D2h)/_001__pole_figure.tiff diff --git a/Data/IPF_Legend/Orthorhombic mmm (D2h)/<010>_pole_figure.tiff b/Data/IPF_Legend/Orthorhombic mmm (D2h)/_010__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Orthorhombic mmm (D2h)/<010>_pole_figure.tiff rename to Data/IPF_Legend/Orthorhombic mmm (D2h)/_010__pole_figure.tiff diff --git a/Data/IPF_Legend/Orthorhombic mmm (D2h)/<100>_pole_figure.tiff b/Data/IPF_Legend/Orthorhombic mmm (D2h)/_100__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Orthorhombic mmm (D2h)/<100>_pole_figure.tiff rename to Data/IPF_Legend/Orthorhombic mmm (D2h)/_100__pole_figure.tiff diff --git a/Data/IPF_Legend/Tetragonal 4|m (C4h)/<001>_pole_figure.tiff b/Data/IPF_Legend/Tetragonal 4|m (C4h)/_001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Tetragonal 4|m (C4h)/<001>_pole_figure.tiff rename to Data/IPF_Legend/Tetragonal 4|m (C4h)/_001__pole_figure.tiff diff --git a/Data/IPF_Legend/Tetragonal 4|m (C4h)/<010>_pole_figure.tiff b/Data/IPF_Legend/Tetragonal 4|m (C4h)/_010__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Tetragonal 4|m (C4h)/<010>_pole_figure.tiff rename to Data/IPF_Legend/Tetragonal 4|m (C4h)/_010__pole_figure.tiff diff --git a/Data/IPF_Legend/Tetragonal 4|m (C4h)/<100>_pole_figure.tiff b/Data/IPF_Legend/Tetragonal 4|m (C4h)/_100__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Tetragonal 4|m (C4h)/<100>_pole_figure.tiff rename to Data/IPF_Legend/Tetragonal 4|m (C4h)/_100__pole_figure.tiff diff --git a/Data/IPF_Legend/Tetragonal 4|mmm (D4h)/<001>_pole_figure.tiff b/Data/IPF_Legend/Tetragonal 4|mmm (D4h)/_001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Tetragonal 4|mmm (D4h)/<001>_pole_figure.tiff rename to Data/IPF_Legend/Tetragonal 4|mmm (D4h)/_001__pole_figure.tiff diff --git a/Data/IPF_Legend/Tetragonal 4|mmm (D4h)/<100>_pole_figure.tiff b/Data/IPF_Legend/Tetragonal 4|mmm (D4h)/_100__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Tetragonal 4|mmm (D4h)/<100>_pole_figure.tiff rename to Data/IPF_Legend/Tetragonal 4|mmm (D4h)/_100__pole_figure.tiff diff --git a/Data/IPF_Legend/Tetragonal 4|mmm (D4h)/<110>_pole_figure.tiff b/Data/IPF_Legend/Tetragonal 4|mmm (D4h)/_110__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Tetragonal 4|mmm (D4h)/<110>_pole_figure.tiff rename to Data/IPF_Legend/Tetragonal 4|mmm (D4h)/_110__pole_figure.tiff diff --git a/Data/IPF_Legend/Triclinic -1 (Ci)/<001>_pole_figure.tiff b/Data/IPF_Legend/Triclinic -1 (Ci)/_001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Triclinic -1 (Ci)/<001>_pole_figure.tiff rename to Data/IPF_Legend/Triclinic -1 (Ci)/_001__pole_figure.tiff diff --git a/Data/IPF_Legend/Triclinic -1 (Ci)/<010>_pole_figure.tiff b/Data/IPF_Legend/Triclinic -1 (Ci)/_010__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Triclinic -1 (Ci)/<010>_pole_figure.tiff rename to Data/IPF_Legend/Triclinic -1 (Ci)/_010__pole_figure.tiff diff --git a/Data/IPF_Legend/Triclinic -1 (Ci)/<100>_pole_figure.tiff b/Data/IPF_Legend/Triclinic -1 (Ci)/_100__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Triclinic -1 (Ci)/<100>_pole_figure.tiff rename to Data/IPF_Legend/Triclinic -1 (Ci)/_100__pole_figure.tiff diff --git a/Data/IPF_Legend/Trigonal -3 (C3i)/<-1-120>_pole_figure.tiff b/Data/IPF_Legend/Trigonal -3 (C3i)/_-1-120__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Trigonal -3 (C3i)/<-1-120>_pole_figure.tiff rename to Data/IPF_Legend/Trigonal -3 (C3i)/_-1-120__pole_figure.tiff diff --git a/Data/IPF_Legend/Trigonal -3 (C3i)/<0001>_pole_figure.tiff b/Data/IPF_Legend/Trigonal -3 (C3i)/_0001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Trigonal -3 (C3i)/<0001>_pole_figure.tiff rename to Data/IPF_Legend/Trigonal -3 (C3i)/_0001__pole_figure.tiff diff --git a/Data/IPF_Legend/Trigonal -3 (C3i)/<2-1-10>_pole_figure.tiff b/Data/IPF_Legend/Trigonal -3 (C3i)/_2-1-10__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Trigonal -3 (C3i)/<2-1-10>_pole_figure.tiff rename to Data/IPF_Legend/Trigonal -3 (C3i)/_2-1-10__pole_figure.tiff diff --git a/Data/IPF_Legend/Trigonal -3m (D3d)/<0-110>_pole_figure.tiff b/Data/IPF_Legend/Trigonal -3m (D3d)/_0-110__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Trigonal -3m (D3d)/<0-110>_pole_figure.tiff rename to Data/IPF_Legend/Trigonal -3m (D3d)/_0-110__pole_figure.tiff diff --git a/Data/IPF_Legend/Trigonal -3m (D3d)/<0001>_pole_figure.tiff b/Data/IPF_Legend/Trigonal -3m (D3d)/_0001__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Trigonal -3m (D3d)/<0001>_pole_figure.tiff rename to Data/IPF_Legend/Trigonal -3m (D3d)/_0001__pole_figure.tiff diff --git a/Data/IPF_Legend/Trigonal -3m (D3d)/<1-100>_pole_figure.tiff b/Data/IPF_Legend/Trigonal -3m (D3d)/_1-100__pole_figure.tiff similarity index 100% rename from Data/IPF_Legend/Trigonal -3m (D3d)/<1-100>_pole_figure.tiff rename to Data/IPF_Legend/Trigonal -3m (D3d)/_1-100__pole_figure.tiff diff --git a/Source/Apps/generate_ipf_legends.cpp b/Source/Apps/generate_ipf_legends.cpp index 53df786..0de7ba6 100644 --- a/Source/Apps/generate_ipf_legends.cpp +++ b/Source/Apps/generate_ipf_legends.cpp @@ -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; @@ -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++;