Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Userguide improvements #410

Merged
merged 10 commits into from
Jun 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions brayns/parameters/GeometryParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const std::string PARAM_SAVE_CACHE_FILE = "save-cache-file";
const std::string PARAM_RADIUS_MULTIPLIER = "radius-multiplier";
const std::string PARAM_RADIUS_CORRECTION = "radius-correction";
const std::string PARAM_COLOR_SCHEME = "color-scheme";
const std::string PARAM_SCENE_ENVIRONMENT = "scene-environment";
const std::string PARAM_GEOMETRY_QUALITY = "geometry-quality";
const std::string PARAM_NEST_CACHE_FILENAME = "nest-cache-file";
const std::string PARAM_MORPHOLOGY_SECTION_TYPES = "morphology-section-types";
Expand Down Expand Up @@ -92,9 +91,6 @@ const std::string COLOR_SCHEMES[12] = {"none",
"protein-chains",
"protein-residues"};

const std::string SCENE_ENVIRONMENTS[4] = {"none", "ground", "wall",
"bounding-box"};

const std::string GEOMETRY_QUALITIES[3] = {"low", "medium", "high"};
const std::string GEOMETRY_MEMORY_MODES[2] = {"shared", "replicated"};
}
Expand All @@ -103,7 +99,6 @@ namespace brayns
{
GeometryParameters::GeometryParameters()
: AbstractParameters("Geometry")
, _sceneEnvironment(SceneEnvironment::none)
, _radiusMultiplier(1.f)
, _radiusCorrection(0.f)
, _colorScheme(ColorScheme::none)
Expand Down Expand Up @@ -136,8 +131,6 @@ GeometryParameters::GeometryParameters()
"Color scheme to be applied to the geometry [none|"
"neuron_by_id|neuron_by_type|neuron_by_segment_type|"
"protein_atoms|protein_chains|protein_residues|protein_backbones]")(
PARAM_SCENE_ENVIRONMENT.c_str(), po::value<std::string>(),
"Scene environment [none|ground|wall|bounding-box]")(
PARAM_GEOMETRY_QUALITY.c_str(), po::value<std::string>(),
"Geometry rendering quality [low|medium|high]")(
PARAM_CIRCUIT_TARGETS.c_str(), po::value<std::string>(),
Expand Down Expand Up @@ -242,17 +235,6 @@ void GeometryParameters::parse(const po::variables_map& vm)
_radiusMultiplier = vm[PARAM_RADIUS_MULTIPLIER].as<float>();
if (vm.count(PARAM_RADIUS_CORRECTION))
_radiusCorrection = vm[PARAM_RADIUS_CORRECTION].as<float>();
if (vm.count(PARAM_SCENE_ENVIRONMENT))
{
_sceneEnvironment = SceneEnvironment::none;
const auto& sceneEnvironment =
vm[PARAM_SCENE_ENVIRONMENT].as<std::string>();
for (size_t i = 0;
i < sizeof(SCENE_ENVIRONMENTS) / sizeof(SCENE_ENVIRONMENTS[0]);
++i)
if (sceneEnvironment == SCENE_ENVIRONMENTS[i])
_sceneEnvironment = static_cast<SceneEnvironment>(i);
}
if (vm.count(PARAM_GEOMETRY_QUALITY))
{
_geometryQuality = GeometryQuality::low;
Expand Down Expand Up @@ -351,7 +333,6 @@ void GeometryParameters::parse(const po::variables_map& vm)
Vector3f(values[0], values[1], values[2]));
_circuitConfiguration.boundingBox.merge(
Vector3f(values[3], values[4], values[5]));
BRAYNS_ERROR << _circuitConfiguration.boundingBox << std::endl;
}
else
BRAYNS_ERROR << "Invalid number of values for "
Expand Down Expand Up @@ -424,8 +405,6 @@ void GeometryParameters::print()
<< std::endl;
BRAYNS_INFO << "Radius correction : " << _radiusCorrection
<< std::endl;
BRAYNS_INFO << "Scene environment : "
<< getSceneEnvironmentAsString(_sceneEnvironment) << std::endl;
BRAYNS_INFO << "Geometry quality : "
<< getGeometryQualityAsString(_geometryQuality) << std::endl;
BRAYNS_INFO << "Circuit configuration : " << std::endl;
Expand Down Expand Up @@ -503,13 +482,6 @@ const std::string& GeometryParameters::getColorSchemeAsString(
{
return COLOR_SCHEMES[static_cast<size_t>(value)];
}

const std::string& GeometryParameters::getSceneEnvironmentAsString(
const SceneEnvironment value) const
{
return SCENE_ENVIRONMENTS[static_cast<size_t>(value)];
}

const std::string& GeometryParameters::getGeometryQualityAsString(
const GeometryQuality value) const
{
Expand Down
9 changes: 2 additions & 7 deletions brayns/parameters/GeometryParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,14 @@ class GeometryParameters : public AbstractParameters
}
float getRadiusCorrection() const { return _radiusCorrection; }
/** Enables a different color for every molecule/morphology/mesh when
* loading them from a given folder
*/
* loading them from a given folder
*/
ColorScheme getColorScheme() const { return _colorScheme; }
const std::string& getColorSchemeAsString(const ColorScheme value) const;
void setColorScheme(const ColorScheme value)
{
_updateValue(_colorScheme, value);
}
/** Scene environment (none, ground, wall, bounding_box ) */
SceneEnvironment getSceneEnvironment() const { return _sceneEnvironment; }
const std::string& getSceneEnvironmentAsString(
const SceneEnvironment value) const;

/** Morphology quality */
GeometryQuality getGeometryQuality() const { return _geometryQuality; }
Expand Down Expand Up @@ -308,7 +304,6 @@ class GeometryParameters : public AbstractParameters
// Scene
std::string _loadCacheFile;
std::string _saveCacheFile;
SceneEnvironment _sceneEnvironment;

// Morphology
float _radiusMultiplier;
Expand Down
Loading