from hdf5_image_processing import Hdf5ImageProcessingLib as IPL import os import numpy as np __author__ = 'jhennies' if __name__ == '__main__': yamlfile = os.path.dirname(os.path.abspath(__file__)) + '/parameters.yml' ipl = IPL(yaml=yamlfile) ipl.logging('Parameters: {}', ipl.get_params()) params = ipl.get_params() ipl.data_from_file(filepath=params['datafolder'] + 'cremi.splA.raw_neurons.crop.h5', skeys='raw', tkeys='raw') ipl.crop_bounding_rect(np.s_[10:110, 200:712, 200:712], keys='raw') ipl.write(filepath=params['datafolder'] + 'cremi.splA.raw_neurons.crop.crop_10-200-200_110-712-712.h5')
'/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.train.probs.crop.h5', '/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.train.raw_neurons.crop.h5' ] outfiles = [ '/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.train.probs.crop.crop_x10_110_y200_712_z200_712.split_xyz.h5', '/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.train.raw_neurons.crop.crop_x10_110_y200_712_z200_712.split_xyz.h5' ] for i in xrange(0, len(infiles)): ipl = IPL( filepath=infiles[i] ) ipl.logging('Datastructure\n---\n{}', ipl.datastructure2string()) ipl.crop_bounding_rect(bounds=np.s_[10:110, 200:712, 200:712]) def shape(image): return image.shape print ipl.datastructure2string(function=shape) ipl_split = split_in_xyz(ipl) ipl_split.write(filepath=outfiles[i]) # # Sample A # sample_a = IPL( # filepath='/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.raw_neurons.crop.h5' # ) # # sample_a.logging('Sample A datastructure\n---\n{}', sample_a.datastructure2string())
from hdf5_image_processing import Hdf5ImageProcessingLib as IPL import os import numpy as np __author__ = 'jhennies' if __name__ == '__main__': yamlfile = os.path.dirname(os.path.abspath(__file__)) + '/parameters.yml' ipl = IPL( yaml=yamlfile ) ipl.logging('Parameters: {}', ipl.get_params()) params = ipl.get_params() ipl.data_from_file(filepath=params['datafolder'] + 'cremi.splA.raw_neurons.crop.h5', skeys='raw', tkeys='raw') ipl.crop_bounding_rect(np.s_[10:110, 200:712, 200:712], keys='raw') ipl.write(filepath=params['datafolder'] + 'cremi.splA.raw_neurons.crop.crop_10-200-200_110-712-712.h5')
infiles = [ '/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.train.probs.crop.h5', '/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.train.raw_neurons.crop.h5' ] outfiles = [ '/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.train.probs.crop.crop_x10_110_y200_712_z200_712.split_xyz.h5', '/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.train.raw_neurons.crop.crop_x10_110_y200_712_z200_712.split_xyz.h5' ] for i in xrange(0, len(infiles)): ipl = IPL(filepath=infiles[i]) ipl.logging('Datastructure\n---\n{}', ipl.datastructure2string()) ipl.crop_bounding_rect(bounds=np.s_[10:110, 200:712, 200:712]) def shape(image): return image.shape print ipl.datastructure2string(function=shape) ipl_split = split_in_xyz(ipl) ipl_split.write(filepath=outfiles[i]) # # Sample A # sample_a = IPL( # filepath='/mnt/localdata02/jhennies/neuraldata/cremi_2016/cremi.splA.raw_neurons.crop.h5' # ) #