ct_segnet/data_utils/data_io.py
def read_data(self, slice_3D = (slice(None,None),)*3):
        """Read a block of data. Only supported for hdf5 datasets.
        slice_3D   : list of three python slices e.g. [slice(start,stop,step)]*3
        """
        
        if self.tiff_mode:
            ch = np.asarray(read_tiffseq(self.fname, s = slice_3D[0]))
            ch = ch[:, slice_3D[1], slice_3D[2]]
        
        with h5py.File(self.fname, 'r') as hf:
            
            _message("Reading hdf5: %s, Z: %s, Y: %s, X: %s"%(self.fname.split('/')[-1], str(slice_3D[0]), str(slice_3D[1]), str(slice_3D[2])), self.VERBOSITY > 1)    
            ch = np.asarray(hf[self.data_tag][slice_3D[0],slice_3D[1],slice_3D[2]])
        return ch
Read a block of data. Only supported for hdf5 datasets.
        slice_3D   : list of three python slices e.g. [slice(start,stop,step)]*3
        
Read a block of data. Only supported for hdf5 datasets.
slice_3D   : list of three python slices e.g.
Read a block of data . Only supported for hdf5 datasets . slice_3D : list of three python slices e . g .
def read_data(self, slice_3D = (slice(None,None),)*3):
        if self.tiff_mode:
            ch = np.asarray(read_tiffseq(self.fname, s = slice_3D[0]))
            ch = ch[:, slice_3D[1], slice_3D[2]]
        with h5py.File(self.fname, 'r') as hf:
            _message("Reading hdf5: %s, Z: %s, Y: %s, X: %s"%(self.fname.split('/')[-1], str(slice_3D[0]), str(slice_3D[1]), str(slice_3D[2])), self.VERBOSITY > 1)    
            ch = np.asarray(hf[self.data_tag][slice_3D[0],slice_3D[1],slice_3D[2]])
        return ch
def read_data ( self , slice_3D = ( slice ( None , None ) , ) * 3 ) : if self . tiff_mode : ch = np . asarray ( read_tiffseq ( self . fname , s = slice_3D [ 0 ] ) ) ch = ch [ : , slice_3D [ 1 ] , slice_3D [ 2 ] ] with h5py . File ( self . fname , 'r' ) as hf : _message ( "Reading hdf5: %s, Z: %s, Y: %s, X: %s" % ( self . fname . split ( '/' ) [ - 1 ] , str ( slice_3D [ 0 ] ) , str ( slice_3D [ 1 ] ) , str ( slice_3D [ 2 ] ) ) , self . VERBOSITY > 1 ) ch = np . asarray ( hf [ self . data_tag ] [ slice_3D [ 0 ] , slice_3D [ 1 ] , slice_3D [ 2 ] ] ) return ch
Read a block of data.
Read a block of data .
"""Read a block of data. Only supported for hdf5 datasets.
        slice_3D   : list of three python slices e.g. [slice(start,stop,step)]*3
        """
self
slice_3D