Skip to content

Commit edde3bf

Browse files
authored
ENH: Add API to generate 3-Image Pole Figure (#42)
* Add PoleFigureCompositor header, stub implementation, and build integration ---------
1 parent 705b82e commit edde3bf

15 files changed

Lines changed: 1218 additions & 14 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ option(EbsdLib_BUILD_H5SUPPORT "Build H5Support Library" OFF)
3737

3838

3939
# set project's name
40-
project(EbsdLibProj VERSION 2.3.0)
40+
project(EbsdLibProj VERSION 2.4.0)
4141

4242

4343
# Request C++17 standard, using new CMake variables.

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
},
148148
"CMAKE_BUILD_TYPE": {
149149
"type": "STRING",
150-
"value": "Debug"
150+
"value": "Release"
151151
}
152152
}
153153
},

Source/Apps/generate_ipf_legends.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
using namespace ebsdlib;
3535

3636
// const std::string k_Output_Dir(ebsdlib::unit_test::DataDir + "/IPF_Legend/");
37-
const std::string k_Output_Dir(ebsdlib::unit_test::TestTempDir + "/IPF_Legend/");
37+
const std::string k_Output_Dir(ebsdlib::unit_test::k_TestTempDir + "/IPF_Legend/");
3838

3939
using EbsdDoubleArrayType = EbsdDataArray<float>;
4040
using EbsdDoubleArrayPointerType = EbsdDoubleArrayType::Pointer;

Source/EbsdLib/SourceList.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ target_include_directories(${PROJECT_NAME}
178178
target_link_libraries(${PROJECT_NAME}
179179
PUBLIC
180180
Eigen3::Eigen
181+
fmt::fmt
181182
)
182183

183184
if(WIN32 AND BUILD_SHARED_LIBS)

Source/EbsdLib/Utilities/ColorTable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ void EbsdColorTable::GetColorTable(int numColors, std::vector<float>& colorsOut)
6767
const float nodeStepSize = 1.0F / (maxNodeIndex);
6868
for(int i = 0; i < numColors; i++)
6969
{
70-
float pos = i * stepSize; // [0, 1] range
70+
const float pos = static_cast<float>(i) * stepSize; // [0, 1] range
7171
int currColorBin = static_cast<int>(pos / nodeStepSize);
72-
float currFraction = (pos / nodeStepSize) - currColorBin;
72+
const float currFraction = (pos / nodeStepSize) - static_cast<float>(currColorBin);
7373

7474
float r;
7575
float g;

Source/EbsdLib/Utilities/Fonts.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,30 @@ namespace ebsdlib::fonts
1010
std::vector<unsigned char> GetFiraSansRegular()
1111
{
1212
static std::vector<unsigned char> fontData;
13-
Base64Decode(fonts::k_FiraSansRegularBase64, fontData);
13+
if(fontData.empty())
14+
{
15+
Base64Decode(fonts::k_FiraSansRegularBase64, fontData);
16+
}
1417
return fontData;
1518
}
1619

1720
std::vector<unsigned char> GetLatoRegular()
1821
{
1922
static std::vector<unsigned char> fontData;
20-
Base64Decode(fonts::k_LatoRegularBase64, fontData);
23+
if(fontData.empty())
24+
{
25+
Base64Decode(fonts::k_LatoRegularBase64, fontData);
26+
}
2127
return fontData;
2228
}
2329

2430
std::vector<unsigned char> GetLatoBold()
2531
{
2632
static std::vector<unsigned char> fontData;
27-
Base64Decode(fonts::k_LatoBoldBase64, fontData);
33+
if(fontData.empty())
34+
{
35+
Base64Decode(fonts::k_LatoBoldBase64, fontData);
36+
}
2837
return fontData;
2938
}
3039

0 commit comments

Comments
 (0)