Blue Brain BioExplorer
Morphologies.h
Go to the documentation of this file.
1 /*
2  *
3  * The Blue Brain BioExplorer is a tool for scientists to extract and analyse
4  * scientific data from visualization
5  *
6  * This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
7  *
8  * Copyright 2020-2024 Blue BrainProject / EPFL
9  *
10  * This program is free software: you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License as published by the Free Software
12  * Foundation, either version 3 of the License, or (at your option) any later
13  * version.
14  *
15  * This program is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License along with
21  * this program. If not, see <https://www.gnu.org/licenses/>.
22  */
23 
24 #pragma once
25 
27 
28 namespace bioexplorer
29 {
30 namespace morphology
31 {
32 const double DEFAULT_SPINE_RADIUS = 0.25;
33 
34 const size_t NB_MATERIALS_PER_MORPHOLOGY = 10;
35 const size_t MATERIAL_OFFSET_VARICOSITY = 0;
36 const size_t MATERIAL_OFFSET_SOMA = 1;
37 const size_t MATERIAL_OFFSET_AXON = 2;
38 const size_t MATERIAL_OFFSET_DENDRITE = 3;
43 const size_t MATERIAL_OFFSET_NUCLEUS = 8;
45 const size_t MATERIAL_OFFSET_END_FOOT = 4;
47 
48 const int64_t SOMA_AS_PARENT = -1;
49 
54 {
55 public:
60  Morphologies(const double alignToGrid, const core::Vector3d& position, const core::Quaterniond& rotation,
61  const core::Vector3f& scale = core::Vector3d(1.0, 1.0, 1.0));
62 
63 protected:
64  size_t _getNbMitochondrionSegments() const;
65 
66  void _addSomaInternals(common::ThreadSafeContainer& container, const size_t materialId,
67  const core::Vector3d& somaPosition, const double somaRadius,
68  const double mitochondriaDensity, const bool useSdf, const double radiusMultiplier);
69 
70  double _getDistanceToSoma(const SectionMap& sections, const Section& section);
71 
72  size_t _getMaterialFromDistanceToSoma(const double maxDistanceToSoma, const double distanceToSoma) const;
73 };
74 } // namespace morphology
75 } // namespace bioexplorer
The SDFGeometries abstract class is used as a parent to any assembly that potentially requires the si...
Definition: SDFGeometries.h:46
The ThreadSafeContainer class is used to load large datasets in parallel. Every individual element is...
void _addSomaInternals(common::ThreadSafeContainer &container, const size_t materialId, const core::Vector3d &somaPosition, const double somaRadius, const double mitochondriaDensity, const bool useSdf, const double radiusMultiplier)
Morphologies(const double alignToGrid, const core::Vector3d &position, const core::Quaterniond &rotation, const core::Vector3f &scale=core::Vector3d(1.0, 1.0, 1.0))
Construct a new Morphologies object.
size_t _getMaterialFromDistanceToSoma(const double maxDistanceToSoma, const double distanceToSoma) const
double _getDistanceToSoma(const SectionMap &sections, const Section &section)
const size_t MATERIAL_OFFSET_MICRO_DOMAIN
Definition: Morphologies.h:46
const size_t MATERIAL_OFFSET_MITOCHONDRION
Definition: Morphologies.h:42
const size_t MATERIAL_OFFSET_END_FOOT
Definition: Morphologies.h:45
const size_t MATERIAL_OFFSET_APICAL_DENDRITE
Definition: Morphologies.h:39
const size_t MATERIAL_OFFSET_NUCLEUS
Definition: Morphologies.h:43
const size_t NB_MATERIALS_PER_MORPHOLOGY
Definition: Morphologies.h:34
const size_t MATERIAL_OFFSET_AXON
Definition: Morphologies.h:37
const double DEFAULT_SPINE_RADIUS
Definition: Morphologies.h:32
const size_t MATERIAL_OFFSET_EFFERENT_SYNAPSE
Definition: Morphologies.h:41
const size_t MATERIAL_OFFSET_VARICOSITY
Definition: Morphologies.h:35
const size_t MATERIAL_OFFSET_SOMA
Definition: Morphologies.h:36
const size_t MATERIAL_OFFSET_AFFERENT_SYNAPSE
Definition: Morphologies.h:40
const size_t MATERIAL_OFFSET_MYELIN_SHEATH
Definition: Morphologies.h:44
const int64_t SOMA_AS_PARENT
Definition: Morphologies.h:48
const size_t MATERIAL_OFFSET_DENDRITE
Definition: Morphologies.h:38
std::map< uint64_t, Section > SectionMap
Definition: Types.h:386
glm::vec3 Vector3f
Definition: MathTypes.h:137
glm::vec< 3, double > Vector3d
Definition: MathTypes.h:143
glm::tquat< double, glm::highp > Quaterniond
Double quaternion.
Definition: MathTypes.h:153