Skip to content

Commit bd7f22b

Browse files
Fixed various fiberODF rendering issues. Refactored code to use new SpherePointsGenerator class.
1 parent cd67199 commit bd7f22b

File tree

4 files changed

+223
-127
lines changed

4 files changed

+223
-127
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

FEBioStudio/FiberODFWidget.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ SOFTWARE.*/
6262
#include <FECore/fecore_enum.h>
6363
#include <FECore/mat3d.h>
6464
#include <FECore/mathalg.h>
65+
#include <FEAMR/SpherePointsGenerator.h>
6566
#include <ImageLib/FiberODFAnalysis.h>
66-
#include <FEAMR/spherePoints.h>
6767
#include <GeomLib/GObject.h>
6868
#include <MeshLib/FEMesh.h>
6969
#include <MeshLib/FEElementData.h>
@@ -81,6 +81,7 @@ SOFTWARE.*/
8181

8282
using std::vector;
8383
using std::complex;
84+
using sphere = SpherePointsGenerator;
8485

8586
CFiberGLWidget::CFiberGLWidget() : m_ODF(nullptr), m_analysis(nullptr)
8687
{
@@ -1184,14 +1185,16 @@ void CFiberODFWidget::on_saveODFs_triggered()
11841185
XMLElement nodes("Nodes");
11851186
writer.add_branch(nodes);
11861187

1188+
auto& coords = sphere::GetNodes(FULL);
1189+
11871190
std::vector<double> position(3,0);
11881191

1189-
for(int i = 0; i < NPTS; i++)
1192+
for(int i = 0; i < coords.size(); i++)
11901193
{
11911194
XMLElement current("node");
1192-
position[0] = XCOORDS[i];
1193-
position[1] = YCOORDS[i];
1194-
position[2] = ZCOORDS[i];
1195+
position[0] = coords[i].x;
1196+
position[1] = coords[i].y;
1197+
position[2] = coords[i].z;
11951198
current.value(position);
11961199
writer.add_leaf(current);
11971200
}

0 commit comments

Comments
 (0)