-
Notifications
You must be signed in to change notification settings - Fork 47
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
Added neuron connectivity matrix visualizer #220
Conversation
f5e84aa
to
cf36617
Compare
brayns/Brayns.cpp
Outdated
@@ -85,6 +86,10 @@ struct Brayns::Impl | |||
_parametersManager->parse(argc, argv); | |||
_parametersManager->print(); | |||
|
|||
// Initialize Mesh loader | |||
_meshLoader.reset( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why pointer? can we not have a local meshloader everytime we need one? Does it have to be a permanent member of Brayns.cpp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a global meshloader indeed (and it's a pain). The reason behind it is that triangle faces use indices to vertices. When you load several meshes from different files, indices have to remain consistent. We could have many mesh loaders, but they would still have to aggregate at some point, so using a single one is the simple solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the pointer is still not necessary. using proper initialization order in ctor should suffice
brayns/Brayns.cpp
Outdated
@@ -521,6 +528,21 @@ struct Brayns::Impl | |||
|
|||
#if (BRAYNS_USE_BRION) | |||
/** | |||
Loads data from a neuron matrix file (command line parameter | |||
--matrix-file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--connectivity-file rather than matrix? Sounds too generic imo. In the end, everything is a matrix :)
brayns/io/MatrixLoader.cpp
Outdated
@@ -0,0 +1,276 @@ | |||
/* Copyright (c) 2015-2017, EPFL/Blue Brain Project | |||
* All rights reserved. Do not distribute without permission. | |||
* Responsible Author: Jafet Villafranca Diaz <jafet.villafrancadiaz@epfl.ch> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jafet? really?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, he initiated the work. I added me, but I am not removing him ;)
brayns/io/MatrixLoader.cpp
Outdated
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
#include <H5Cpp.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h5cpp is deprecated, use highfive instead. Or coordinate with Mohammed and Juan to get this into brion, where highfive is already used.
brayns/io/MeshLoader.cpp
Outdated
_geometryParameters.getCircuitMeshFolder(); | ||
auto meshFilenamePattern = | ||
_geometryParameters.getCircuitMeshFilenamePattern(); | ||
std::string gidAsString = std::to_string(gid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -55,7 +55,6 @@ class MeshLoader | |||
* @return true if the file was successfully imported. False otherwise. | |||
*/ | |||
bool importMeshFromFile(const std::string& filename, Scene& scene, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doxygen update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -241,6 +241,16 @@ class GeometryParameters : public AbstractParameters | |||
* Return the full path of the file containing a scene description | |||
*/ | |||
std::string getSceneFile() const { return _sceneFile; }; | |||
/** File containing neuron matrix */ | |||
std::string getMatrixFile() const { return _matrixFile; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ref for all the returns here please
brayns/io/MeshLoader.h
Outdated
@@ -39,7 +39,7 @@ namespace brayns | |||
class MeshLoader | |||
{ | |||
public: | |||
MeshLoader(GeometryParameters& geometryParameters); | |||
MeshLoader(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why removed? the geometry params are always the same, so giving them once in the construction is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost :) I noticed you update CMake/common back to the past. Maybe leave at current version or update to latest?
@@ -241,6 +241,22 @@ class GeometryParameters : public AbstractParameters | |||
* Return the full path of the file containing a scene description | |||
*/ | |||
std::string getSceneFile() const { return _sceneFile; }; | |||
/** File containing neuron matrix */ | |||
std::string getConnectivityFile() const { return _connectivityFile; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still no const refs here
No description provided.