def transform_from_FlyEM_to_FCWB(points): try: new_points = navis.xform_brain(points, source=source, target=target) except: new_points = [] print("ERROR") pass return new_points
def test_volume_transforms(): vol = navis.example_volume('LH') # Convert example neurons from voxels (raw hemibrain space) to microns tr = navis.xform_brain(vol, source='JRCFIB2018Fraw', target='JRCFIB2018Fum') assert isinstance(vol, navis.Volume) assert vol.vertices.shape[0] == tr.vertices.shape[0]
def test_skeleton_transforms(): nl = navis.example_neurons(kind='skeleton') # Convert example neurons from voxels (raw hemibrain space) to microns tr = navis.xform_brain(nl, source='JRCFIB2018Fraw', target='JRCFIB2018Fum') assert isinstance(tr, navis.NeuronList) assert len(tr) == len(nl) assert all(nl.n_nodes == tr.n_nodes)
def transform_from_source_to_target(points, source, target): print("PPP",source,target) print(points) points = np.array(points,dtype=float) # new_points = navis.xform_brain(points, source=source, target=target) try: new_points = navis.xform_brain(points, source=source, target=target) except: new_points = [] print("ERROR") pass # print("NPP") print(new_points) return new_points