Exemplo n.º 1
0
 def get_object_by_id(self, memid: str, table="BlockObjects") -> "VoxelObjectNode":
     if table == "BlockObjects":
         return BlockObjectNode(self, memid)
     elif table == "InstSeg":
         return InstSegNode(self, memid)
     else:
         raise ValueError("Bad table={}".format(table))
Exemplo n.º 2
0
 def get_object_by_id(self, memid: str, table="BlockObjects") -> "ObjectNode":
     # sanity check...
     r = self._db_read(
         "SELECT x, y, z, bid, meta FROM {} WHERE uuid=? ORDER BY updated".format(table), memid
     )
     assert r, memid
     # end sanity check
     if table == "BlockObjects":
         return BlockObjectNode(self, memid)
     elif table == "ComponentObjects":
         return ComponentObjectNode(self, memid)
     else:
         raise ValueError("Bad table={}".format(table))
Exemplo n.º 3
0
 def get_object_by_id(self,
                      memid: str,
                      table="BlockObjects") -> "VoxelObjectNode":
     """
     Returns:
         The memory node for the given memid
     """
     if table == "BlockObjects":
         return BlockObjectNode(self, memid)
     elif table == "InstSeg":
         return InstSegNode(self, memid)
     else:
         raise ValueError("Bad table={}".format(table))