Created
February 21, 2014 00:06
-
-
Save icaoberg/9126132 to your computer and use it in GitHub Desktop.
[CellOrganizer] demo3D12 generic test skeleton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "help demo3D12; | |
TRAIN = false; | |
SYNTHESIS = false; | |
POSTPROCESSING = true; | |
option = 1; | |
patterns = {'LAM','Nuc','Mit','TfR'}; | |
model_filenames = {'./lam.mat', './nuc.mat', './mit.mat', './tfr.mat'}; | |
downsampling_scale = 5; | |
pattern = patterns{option}; | |
model_filename = model_filenames{option}; | |
cd( './demos/3D/demo3D12' ); | |
if TRAIN | |
%run demo and make profile | |
profile on | |
param.model.downsampling = [ downsampling_scale, downsampling_scale, 1]; | |
param.proteinUpsampleZ = 5; | |
param.train.flag = 'framework'; | |
demo3D12( option, false, param ); | |
profile off | |
movefile( model_filename, './model.mat' ); | |
profsave( profile('info'), 'profile' ); | |
zip( 'profile.zip', 'profile' ) | |
rmdir( 'profile', 's' ); | |
end | |
if SYNTHESIS | |
%try to synthesize images from model | |
try | |
state = rng(3); | |
catch | |
state = RandStream.create('mt19937ar','seed', 11); | |
RandStream.setDefaultStream(state); | |
end | |
outputDirectory = pwd; | |
param = []; | |
param.targetDirectory = [ outputDirectory ]; | |
param.prefix = 'synthesizedImages'; | |
param.numberOfSynthesizedImages = 50; | |
param.compression = 'lzw'; | |
param.microscope = 'none'; | |
param.synthesis = 'framework'; | |
param.verbose = true; | |
param.debug = true; | |
slml2img( {'./model.mat'}, param ); | |
end | |
if POSTPROCESSING | |
input_images_directory = [ pwd filesep pattern ]; | |
output_images_directory = [ pwd filesep 'temp' filesep 'raw' ]; | |
answer = ... | |
raw_images_gallery_wrapper( input_images_directory, ... | |
output_images_directory ); | |
input_images_directory = [ pwd filesep 'intermediate_results' ]; | |
output_images_directory = [ pwd filesep 'temp' filesep 'intermediate' ]; | |
answer = ... | |
intermediate_results_image_gallery_wrapper( input_images_directory, ... | |
output_images_directory ); | |
input_images_directory = [ pwd filesep 'temp' filesep 'preprocessing' ]; | |
output_images_directory = [ pwd filesep 'temp' filesep 'preprocessing' ]; | |
answer = ... | |
preprocessed_images_gallery_wrapper( input_images_directory, ... | |
output_images_directory ); | |
input_images_directory = [ pwd filesep 'synthesizedImages' ]; | |
output_images_directory = [ pwd filesep 'temp' filesep 'synthetic' ]; | |
synthesized_images_gallery_wrapper( input_images_directory, ... | |
output_images_directory ); | |
input_images_directory = [ pwd filesep 'temp' filesep 'cell_shape_eigen' ] | |
output_images_directory = [ pwd filesep 'temp' filesep 'cellcodes' ]; | |
cellcodes_images_gallery_wrapper( input_images_directory, ... | |
output_images_directory ); | |
end | |
exit;" > script.m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment