Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c2da34ac authored by NADAL Morgane's avatar NADAL Morgane
Browse files

changed __slots__ initialization

parent 15c95e8f
No related branches found
No related tags found
No related merge requests found
......@@ -55,10 +55,12 @@ class extension_t(glial_cmp_t):
def __init__(self):
#
super().__init__()
self.end_points = None
self.scales = None
self.soma_uid = None
self.__cache__ = None
for slot in self.__class__.__slots__:
setattr(self, slot, None)
# self.end_points = None
# self.scales = None
# self.soma_uid = None
# self.__cache__ = None
@classmethod
def FromMap(cls, lmp: array_t, scales: array_t, uid: int) -> extension_t:
......
......@@ -45,11 +45,13 @@ class glial_cmp_t:
def __init__(self):
#
self.uid = None # type: Optional[int]
self.sites = None # type: Optional[np_array_picker_h]
self.connection_path = None # type: Optional[Dict[int, py_array_picker_h]]
self.extensions = None # type: Optional[List[glial_cmp_t]]
self.img_shape = None # type: Optional[Tuple[int, ...]]
for slot in self.__class__.__slots__:
setattr(self, slot, None)
# self.uid = None # type: Optional[int]
# self.sites = None # type: Optional[np_array_picker_h]
# self.connection_path = None # type: Optional[Dict[int, py_array_picker_h]]
# self.extensions = None # type: Optional[List[glial_cmp_t]]
# self.img_shape = None # type: Optional[Tuple[int, ...]]
def InitializeFromMap(self, bmp: array_t, uid: int) -> None:
#
......
......@@ -53,14 +53,16 @@ class soma_t(glial_cmp_t):
#
__slots__ = ("contour_points", "centroid", "skl_graph", "ext_roots", "graph_roots")
def __init__(self): # TODO: Initialize with a for
def __init__(self):
#
super().__init__()
self.contour_points = None
self.centroid = None
self.skl_graph = None
for slot in self.__class__.__slots__:
setattr(self, slot, None)
# self.contour_points = None
# self.centroid = None
# self.skl_graph = None
self.ext_roots = []
self.graph_roots = None
# self.graph_roots = None
@classmethod
def FromMap(cls, lmp: array_t, uid: int) -> soma_t:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment