Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Conversation

@jacquemi-bbp
Copy link

@jacquemi-bbp jacquemi-bbp commented Mar 17, 2021

This PR is the first one of a series that will implement Dendritic spine Specifications for morphio h5 format. We (@wizmer and @jacquemi-bbp ) decided to not produce too large PULL REQUEST to facilitate the work of reviewers

This PR templatizes immutable Morphology.
The mutable Morphology will be templatized in a next PR
Spine Class will be only implemented in a next next PR

Immutable Morphology becomes a TTree template class:
Two TTree instantiation are created:

  • template class TTree<NodeCellFamily::NEURON, Morphology, mut::Morphology> (for neuron)
  • template class TTree<NodeCellFamily::GLIA, GlialCell, mut::GlialCell> (for glail cell)

Immutable Section becomes Node template class:
Two Node instantiation are created:

  • template class NodeCellFamily::NEURON (Neuronal section)
  • template class NodeCellFamily::GLIA ( Glial section)

enum CellFamily replaced by struct CellFamily (that contains static constexpr to identify Cell type)

@jacquemi-bbp jacquemi-bbp force-pushed the template_morphology_glialcell branch from 4e286b4 to f300d9f Compare March 17, 2021 16:23
@jacquemi-bbp jacquemi-bbp marked this pull request as ready for review March 18, 2021 08:23
If recursive == true, all descendent will be appended as well
**/
std::shared_ptr<Section> appendRootSection(const morphio::Section&, bool recursive = false);
std::shared_ptr<Section> appendRootSection(const morphio::Node<CellFamily::NEURON>&,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::shared_ptr<Section> appendRootSection(const morphio::Node<CellFamily::NEURON>&,
std::shared_ptr<Section> appendRootSection(const morphio::NeuronalSection&,

is equivalent.

I think it would be good to take the habit of no longer using the old alias Section or even Node<CellFamily::NEURON but the new NeuronalSection.
This will make MorphIO less neuron centric.

Comment on lines 279 to 284
/*
template <typename Node, typename CRTP, typename Mut>
const CellFamily& TTree<Node, CRTP, Mut>::cellFamily() const {
return _properties->cellFamily();
}
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dead code

struct CellFamily {
struct NEURON {
using Type = SectionType;
static constexpr int value = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those values must correspond to the values of the cell family in the spec.
https://bbpteam.epfl.ch/documentation/projects/Morphology%20Documentation/latest/h5v1.html

Maybe you can add a comment about it in the code.

setup.py Outdated
Comment on lines 78 to 79
cfg = 'Debug' if self.debug else 'Release'
# cfg = 'Debug' if self.debug else 'Release'
cfg = 'Debug'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be removed.

- Remove dead code
- Use alias NeuralSection instead of Node<CellFamily::NEURON>
- Use alias GlialSection instead of Node<CellFamily::GLIA>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants