Example #1
0
def _load_h5(filename):
    '''Delay loading of h5py until it is needed'''
    from neurom.io import hdf5
    return hdf5.read(filename,
                     remove_duplicates=False,
                     data_wrapper=DataWrapper)
Example #2
0
def _load_h5(filename):
    """Delay loading of h5py until it is needed."""
    return hdf5.read(filename,
                     remove_duplicates=False,
                     data_wrapper=DataWrapper)
Example #3
0
def _load_h5(filename):
    '''Delay loading of h5py until it is needed'''
    from neurom.io import hdf5
    return hdf5.read(filename,
                     remove_duplicates=False,
                     data_wrapper=DataWrapper)
Example #4
0
def test_consistency_between_v1_v2():
    v1_data = hdf5.read(os.path.join(H5V1_PATH, 'Neuron.h5'))
    v2_data = hdf5.read(os.path.join(H5V2_PATH, 'Neuron.h5'))
    nt.ok_(np.allclose(v1_data.data_block, v2_data.data_block))
Example #5
0
def test_consistency_between_h5_swc():
    h5_data = hdf5.read(os.path.join(H5V1_PATH, 'Neuron.h5'), remove_duplicates=True)
    swc_data = swc.read(os.path.join(SWC_PATH, 'Neuron.swc'))
    nt.ok_(np.allclose(h5_data.data_block.shape, swc_data.data_block.shape))
Example #6
0
 def setup(self):
     self.data = hdf5.read(os.path.join(H5V2_PATH, 'Neuron.h5'))
     self.first_id = int(self.data.data_block[0][COLS.ID])
     self.rows = len(self.data.data_block)
Example #7
0
 def read_h5(filename):
     '''Lazy loading of HDF5 reader'''
     from neurom.io import hdf5
     return hdf5.read(filename,
                      remove_duplicates=True,
                      data_wrapper=DataWrapper)
Example #8
0
def test_consistency_between_h5_swc():
    h5_data = hdf5.read(Path(H5V1_PATH, 'Neuron.h5'), remove_duplicates=True)
    swc_data = swc.read(Path(SWC_PATH, 'Neuron.swc'))
    nt.ok_(np.allclose(h5_data.data_block.shape, swc_data.data_block.shape))
Example #9
0
def test_consistency_between_v1_v2():
    v1_data = hdf5.read(Path(H5V1_PATH, 'Neuron.h5'))
    v2_data = hdf5.read(Path(H5V2_PATH, 'Neuron.h5'))
    nt.ok_(np.allclose(v1_data.data_block, v2_data.data_block))
Example #10
0
 def setup(self):
     self.data = hdf5.read(Path(H5V2_PATH, 'Neuron.h5'))
     self.first_id = int(self.data.data_block[0][COLS.ID])
     self.rows = len(self.data.data_block)