Skip to content

Commit

Permalink
Merge pull request #340 from favreau/master
Browse files Browse the repository at this point in the history
Improved bezier representation of morphologies
  • Loading branch information
favreau authored Dec 1, 2023
2 parents 310b849 + 9324902 commit ed1488a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 6 additions & 3 deletions bioexplorer/backend/science/common/SDFGeometries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ Vector4fs SDFGeometries::_getProcessedSectionPoints(const MorphologyRepresentati
const Vector4fs& points)
{
Vector4fs localPoints;
const float step = 1.f / static_cast<float>(points.size());
if (representation == MorphologyRepresentation::bezier)
for (uint64_t i = 0; i <= points.size(); ++i)
localPoints.push_back(getBezierPoint(points, static_cast<float>(i) * step));
{
const uint64_t nbBezierPoints = std::max(static_cast<size_t>(3), points.size() / 10);
const float step = 1.f / static_cast<float>(nbBezierPoints);
for (float i = 0; i <= 1.f; i += step)
localPoints.push_back(getBezierPoint(points, i));
}
else
localPoints = points;
return localPoints;
Expand Down
4 changes: 0 additions & 4 deletions bioexplorer/backend/science/vasculature/Vasculature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ void Vasculature::_buildModel(const LoaderProgress& callback, const doubles& rad
if (_details.colorScheme == VasculatureColorScheme::radius)
radiusRange = DBConnector::getInstance().getVasculatureRadiusRange(_details.populationName, _details.sqlFilter);

uint64_t progress = 0;
uint64_t index;
volatile bool flag = false;
std::string flagMessage;
Expand Down Expand Up @@ -384,9 +383,6 @@ void Vasculature::_buildModel(const LoaderProgress& callback, const doubles& rad
}
} while (iter != nodes.end());

#pragma omp critical
++progress;

#pragma omp critical
containers.push_back(container);
}
Expand Down

0 comments on commit ed1488a

Please sign in to comment.