Blue Brain BioExplorer
VolumeLoader.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2024, EPFL/Blue Brain Project
3  * All rights reserved. Do not distribute without permission.
4  *
5  * This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
6  *
7  * This library is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Lesser General Public License version 3.0 as published
9  * by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #pragma once
22 
24 
25 namespace core
26 {
29 class MHDVolumeLoader : public Loader
30 {
31 public:
32  MHDVolumeLoader(Scene& scene);
33 
34  std::vector<std::string> getSupportedStorage() const final;
35  std::string getName() const final;
36 
37  bool isSupported(const std::string& storage, const std::string& extension) const final;
38  ModelDescriptorPtr importFromBlob(Blob&& blob, const LoaderProgress& callback,
39  const PropertyMap& properties) const final;
40 
41  ModelDescriptorPtr importFromStorage(const std::string& storage, const LoaderProgress& callback,
42  const PropertyMap& properties) const final;
43 };
44 
47 class RawVolumeLoader : public Loader
48 {
49 public:
50  RawVolumeLoader(Scene& scene);
51 
52  std::vector<std::string> getSupportedStorage() const final;
53  std::string getName() const final;
54  PropertyMap getProperties() const final;
55 
56  bool isSupported(const std::string& storage, const std::string& extension) const final;
57  ModelDescriptorPtr importFromBlob(Blob&& blob, const LoaderProgress& callback,
58  const PropertyMap& properties) const final;
59 
60  ModelDescriptorPtr importFromStorage(const std::string& storage, const LoaderProgress& callback,
61  const PropertyMap& properties) const final;
62 
63 private:
64  ModelDescriptorPtr _loadVolume(const std::string& filename, const LoaderProgress& callback,
65  const PropertyMap& properties,
66  const std::function<void(SharedDataVolumePtr)>& mapData) const;
67 };
68 } // namespace core
ModelDescriptorPtr importFromBlob(Blob &&blob, const LoaderProgress &callback, const PropertyMap &properties) const final
bool isSupported(const std::string &storage, const std::string &extension) const final
ModelDescriptorPtr importFromStorage(const std::string &storage, const LoaderProgress &callback, const PropertyMap &properties) const final
MHDVolumeLoader(Scene &scene)
std::vector< std::string > getSupportedStorage() const final
std::string getName() const final
PropertyMap getProperties() const final
ModelDescriptorPtr importFromBlob(Blob &&blob, const LoaderProgress &callback, const PropertyMap &properties) const final
std::vector< std::string > getSupportedStorage() const final
std::string getName() const final
RawVolumeLoader(Scene &scene)
bool isSupported(const std::string &storage, const std::string &extension) const final
ModelDescriptorPtr importFromStorage(const std::string &storage, const LoaderProgress &callback, const PropertyMap &properties) const final
Scene object This object contains collections of geometries, materials and light sources that are use...
Definition: Scene.h:43
std::shared_ptr< SharedDataVolume > SharedDataVolumePtr
Definition: Types.h:154
std::shared_ptr< ModelDescriptor > ModelDescriptorPtr
Definition: Types.h:112