File tree Expand file tree Collapse file tree 4 files changed +14
-18
lines changed
plugins/CircuitExplorer/io/bbploader Expand file tree Collapse file tree 4 files changed +14
-18
lines changed Original file line number Diff line number Diff line change 42
42
#include < filesystem>
43
43
#include < fstream>
44
44
#include < sstream>
45
+ #include " MeshLoader.h"
45
46
46
47
namespace
47
48
{
@@ -191,6 +192,11 @@ std::vector<std::string> MeshLoader::getExtensions() const
191
192
return _parsers.getAllSupportedExtensions ();
192
193
}
193
194
195
+ bool MeshLoader::canLoadBinary () const
196
+ {
197
+ return true ;
198
+ }
199
+
194
200
std::vector<std::shared_ptr<Model>> MeshLoader::loadBinary (const BinaryRequest &request)
195
201
{
196
202
auto format = std::string (request.format );
Original file line number Diff line number Diff line change @@ -124,6 +124,13 @@ class MeshLoader : public Loader<EmptyLoaderParams>
124
124
*/
125
125
std::vector<std::string> getExtensions () const override ;
126
126
127
+ /* *
128
+ * @brief Supports binary
129
+ *
130
+ * @return true
131
+ */
132
+ bool canLoadBinary () const override ;
133
+
127
134
/* *
128
135
* @brief Import the mesh in the given scene from the given binary data.
129
136
*
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ std::vector<CellCompartments> CellLoader::load(
175
175
176
176
auto colorData = ColorDataFactory::create (context);
177
177
178
- if (loadSoma && !loadAxon && !loadDend)
178
+ if (! loadSoma && !loadAxon && !loadDend)
179
179
{
180
180
return SomaImporter::import (context, model, std::move (colorData));
181
181
}
Original file line number Diff line number Diff line change @@ -114,29 +114,12 @@ class ReportChecker
114
114
}
115
115
}
116
116
};
117
-
118
- class NeuronSectionsChecker
119
- {
120
- public:
121
- static void check (const BBPLoaderParameters &input)
122
- {
123
- const auto &morphSettings = input.neuron_morphology_parameters ;
124
- const auto loadSoma = morphSettings.load_soma ;
125
- const auto loadAxon = morphSettings.load_axon ;
126
- const auto loadDend = morphSettings.load_dendrites ;
127
- if (!loadSoma && !loadAxon && !loadDend)
128
- {
129
- throw std::invalid_argument (" All neuron sections cannot be disabled" );
130
- }
131
- }
132
- };
133
117
} // namespace
134
118
135
119
void ParameterCheck::checkInput (const brion::BlueConfig &config, const BBPLoaderParameters &input)
136
120
{
137
121
InputGidSettingsChecker::check (input);
138
122
TargetChecker::check (config, input);
139
123
ReportChecker::check (config, input);
140
- NeuronSectionsChecker::check (input);
141
124
}
142
125
} // namespace bbploader
You can’t perform that action at this time.
0 commit comments