From 8abee02468c3ee788cde608fb89a058f1b8822a7 Mon Sep 17 00:00:00 2001 From: Christopher Schmied <schmied@mpi-cbg.de> Date: Tue, 9 Jun 2015 19:17:11 +0200 Subject: [PATCH] Updated registration to new .bsh version Added channel selection --- spim_registration/timelapse/Snakefile | 23 +- spim_registration/timelapse/define_czi.bsh | 10 +- .../timelapse/define_tif_zip.bsh | 10 +- spim_registration/timelapse/export.bsh | 26 +- spim_registration/timelapse/registration.bsh | 364 ++++++++++++++---- .../timelapse/tomancak_test_cluster.yaml | 48 +-- 6 files changed, 349 insertions(+), 132 deletions(-) mode change 100644 => 100755 spim_registration/timelapse/export.bsh mode change 100644 => 100755 spim_registration/timelapse/registration.bsh diff --git a/spim_registration/timelapse/Snakefile b/spim_registration/timelapse/Snakefile index 7f7804b..710bedd 100755 --- a/spim_registration/timelapse/Snakefile +++ b/spim_registration/timelapse/Snakefile @@ -131,7 +131,7 @@ rule resave_hdf5: run: part_string = produce_string( """{fiji-prefix} {fiji-app} \ - -Dimage_file_directory={jdir} \ + -Dimage_file_directory={jdir} \ -Dfirst_xml_filename={first_xml_filename} \ -Dhdf5_xml_filename={input_xml_base} \ -Dresave_angle={resave_angle} \ @@ -164,24 +164,24 @@ rule registration: -Dparallel_timepoints={file_id_w} \ -Dimage_file_directory={jdir} \ -Dxml_filename={input_xml} \ - -Dprocess_timepoint={timepoint} \ - -Dprocess_channel={channel} \ - -Dprocess_illumination={illuminations} \ - -Dprocess_angle={angle} \ - -Dprocessing_channel={proc-ch} \ + -Dreg_process_timepoint={reg_process_timepoint} \ + -Dreg_process_channel={reg_process_channel} \ + -Dreg_process_illumination={reg_process_illumination} \ + -Dreg_process_angle={reg_process_angle} \ + -Dchannels={channels} \ + -Dreg_processing_channel={reg_processing_channel} \ -Dlabel_interest_points={label_interest_points} \ -Dtype_of_registration={type_of_registration} \ -Dtype_of_detection={type_of_detection} \ -Dsubpixel_localization={subpixel_localization} \ -Dimglib_container={imglib_container} \ - -Dradius_1={radius_1} \ - -Dradius_2={radius_2} \ - -Dthreshold={threshold} \ + -Dreg_radius_1={reg_radius_1} \ + -Dreg_radius_2={reg_radius_2} \ + -Dreg_threshold={reg_threshold} \ -Dinitial_sigma={initial_sigma} \ -Dthreshold_gaussian={threshold_gaussian} \ -Dregistration_algorithm={algorithm} \ - -Dinterest_points_channel_0={interest_points_channel_0} \ - -Dinterest_points_channel_1={interest_points_channel_1} \ + -Dreg_interest_points_channel={reg_interest_points_channel} \ -Dfix_tiles={fix_tiles} \ -Dmap_back_tiles={map_back_tiles} \ -Dtransformation_model={transformation_model} \ @@ -189,6 +189,7 @@ rule registration: -Dlambda={lambda} \ -Dallowed_error_for_ransac={allowed_error_for_ransac} \ -Ddetection_min_max={detection_min_max} \ + -Dsignificance={significance} \ -- --no-splash {path_bsh}""", config["common"], config["registration"], diff --git a/spim_registration/timelapse/define_czi.bsh b/spim_registration/timelapse/define_czi.bsh index 6432e33..0b9b1ee 100755 --- a/spim_registration/timelapse/define_czi.bsh +++ b/spim_registration/timelapse/define_czi.bsh @@ -146,6 +146,7 @@ System.out.println("Define Multi-View Dataset type_of_dataset=[Zeiss Lightsheet "pixel_unit=" + pixel_unit + " " + "rotation_around=" + rotation_around + ""); +try { IJ.run("Define Multi-View Dataset", "type_of_dataset=[Zeiss Lightsheet Z.1 Dataset (LOCI Bioformats)] " + "xml_filename=" + first_xml_filename + ".xml " + @@ -161,6 +162,13 @@ IJ.run("Define Multi-View Dataset", "pixel_distance_z=" + pixel_distance_z + " " + "pixel_unit=" + pixel_unit + " " + "rotation_around=" + rotation_around + ""); - +} +catch ( e ) { + + print( "[registration::interest_points] caught exception: "+e ); + //important to fail the process if exception occurs + runtime.exit(1); + +} /* shutdown */ runtime.exit(0); diff --git a/spim_registration/timelapse/define_tif_zip.bsh b/spim_registration/timelapse/define_tif_zip.bsh index 37f129b..32ab010 100755 --- a/spim_registration/timelapse/define_tif_zip.bsh +++ b/spim_registration/timelapse/define_tif_zip.bsh @@ -145,6 +145,7 @@ System.out.println("Define Multi-View Dataset , type_of_dataset=[" + type_of_dat // Executes Fiji plugin System.out.println("========================================================="); System.out.println("Start plugin:"); +try { IJ.run("Define Multi-View Dataset", "type_of_dataset=[" + type_of_dataset + "] " + "xml_filename=[" + xml_filename + ".xml] " + @@ -164,7 +165,14 @@ IJ.run("Define Multi-View Dataset", "pixel_distance_y=" + pixel_distance_y + " " + "pixel_distance_z=" + pixel_distance_z + " " + "pixel_unit=" + pixel_unit + ""); - +} +catch ( e ) { + + print( "[registration::interest_points] caught exception: "+e ); + //important to fail the process if exception occurs + runtime.exit(1); + +} /* shutdown */ runtime.exit(0); diff --git a/spim_registration/timelapse/export.bsh b/spim_registration/timelapse/export.bsh old mode 100644 new mode 100755 index d7d064b..6d620ad --- a/spim_registration/timelapse/export.bsh +++ b/spim_registration/timelapse/export.bsh @@ -45,31 +45,24 @@ subsampling_factors = System.getProperty( "subsampling_factors" ); hdf5_chunk_sizes = System.getProperty( "hdf5_chunk_sizes" ); timepoints_per_partition = System.getProperty( "timepoints_per_partition" ); setups_per_partition = System.getProperty( "setups_per_partition" ); - +run_only_job_number = System.getProperty( "run_only_job_number" ); System.out.println( "subsampling_factors=" + subsampling_factors); System.out.println( "hdf5_chunk_sizes=" + hdf5_chunk_sizes ); System.out.println( "timepoints_per_partition=" + timepoints_per_partition ); System.out.println( "setups_per_partition=" + setups_per_partition ); - -int run_only_job_number = Integer.parseInt( System.getProperty( "run_only_job_number" ) ); System.out.println( "run_only_job_number=" + run_only_job_number ); // Activate cluster processing System.out.println("========================================================="); -try{ System.out.println("Cluster setting:"); IJ.run("Toggle Cluster Processing", "display_cluster"); -} -catch ( e ) { - print( "[deconvolution-GPU] caught exception: "+e ); - //important to fail the process if exception occurs - runtime.exit(1); -} + // Executes Fiji plugin System.out.println("========================================================="); System.out.println("Start plugin:"); -try{ + +try { IJ.run("As HDF5", "select_xml=" + image_file_directory + first_xml_filename + ".xml " + "resave_angle=[" + resave_angle + "] " + @@ -86,11 +79,14 @@ IJ.run("As HDF5", "use_deflate_compression " + "export_path=" + image_file_directory + hdf5_xml_filename ); } -catch ( e ) { - print( "[deconvolution-GPU] caught exception: "+e ); - //important to fail the process if exception occurs - runtime.exit(1); +catch ( e ) { + + print( "[registration::interest_points] caught exception: "+e ); + //important to fail the process if exception occurs + runtime.exit(1); + } + /* shutdown */ System.exit(0); diff --git a/spim_registration/timelapse/registration.bsh b/spim_registration/timelapse/registration.bsh old mode 100644 new mode 100755 index 8498085..44f1b5e --- a/spim_registration/timelapse/registration.bsh +++ b/spim_registration/timelapse/registration.bsh @@ -1,12 +1,18 @@ -import ij.IJ; +// Load Fiji dependencies +import ij.IJ; // calls imagej +import ij.Prefs; // calls imagej settings import ij.ImagePlus; import java.lang.Runtime; import java.io.File; import java.io.FilenameFilter; - +import java.lang.Object; + runtime = Runtime.getRuntime(); System.out.println(runtime.availableProcessors() + " cores available for multi-threading"); +//Prefs.setThreads(1); // defines the number of threads allowed +//print("Threads: "+Prefs.getThreads()); // prints thread setting in output + System.out.println("Start loading parameters"); // select xml @@ -18,25 +24,19 @@ xml_filename = System.getProperty( "xml_filename" ); System.out.println( "selected_xml = " + xml_path + xml_filename + ".xml"); - // Load general Parameters System.out.println( "-------------------------------------------------------" ); System.out.println( "General parameters: " ); -parallel_timepoints = Integer.parseInt(System.getProperty( "parallel_timepoints" )); -unique_id = System.getProperty( "parallel_timepoints" ); -process_timepoint = System.getProperty( "process_timepoint" ); -process_channel = System.getProperty( "process_channel" ); -process_illumination = System.getProperty( "process_illumination" ); -process_angle = System.getProperty( "process_angle" ); -processing_channel = System.getProperty( "processing_channel" ); +parallel_timepoints = System.getProperty( "parallel_timepoints" ); +reg_process_timepoint = System.getProperty( "reg_process_timepoint" ); +reg_process_illumination = System.getProperty( "reg_process_illumination" ); +reg_process_angle = System.getProperty( "reg_process_angle" ); System.out.println( "parallel_timepoints = " + parallel_timepoints ); -System.out.println( "process_timepoints = " + process_timepoint ); -System.out.println( "process_channel = " + process_channel ); -System.out.println( "process_illumination = " + process_illumination ); -System.out.println( "process_angle = " + process_angle ); -System.out.println( "processing_channel = " + processing_channel ); +System.out.println( "process_timepoints = " + reg_process_timepoint ); +System.out.println( "process_illumination = " + reg_process_illumination ); +System.out.println( "process_angle = " + reg_process_angle ); // Interest point detection parameters System.out.println( "-------------------------------------------------------" ); @@ -54,53 +54,223 @@ System.out.println( "type_of_detection = " + type_of_detection ); System.out.println( "subpixel_localization = " + subpixel_localization ); System.out.println( "imglib_container = " + imglib_container ); -// Parameters for difference of mean !!Comment out for Difference of Gaussian!! -System.out.println( "-------------------------------------------------------" ); -System.out.println( "Difference of Mean detection: " ); - -int radius_1 = Integer.parseInt( System.getProperty( "radius_1" ) ); -int radius_2 = Integer.parseInt( System.getProperty( "radius_2" ) ); -float threshold = Float.parseFloat( System.getProperty( "threshold" ) ); - -System.out.println( "radius_1 = " + radius_1 ); -System.out.println( "radius_2 = " + radius_2 ); -System.out.println( "threshold = " + threshold ); - -//Parameters for difference of gaussian !!Comment out for Differnence of Mean!! -//System.out.println( "-------------------------------------------------------" ); -//System.out.println( "Difference of Gaussian detection: " ); -//float initial_sigma = Float.parseFloat( System.getProperty( "initial_sigma" ) ); -//float threshold_gaussian = Float.parseFloat( System.getProperty( "threshold_gaussian" ) ); -//System.out.println( "initial_sigma = " + initial_sigma ); -//System.out.println( "threshold_gaussian = " + threshold_gaussian ); - // Registration parameters System.out.println( "-------------------------------------------------------" ); System.out.println( "Parameters for Registration: " ); registration_algorithm = System.getProperty( "registration_algorithm" ); -interest_points_channel_0 = System.getProperty( "interest_points_channel_0" ); -interest_points_channel_1 = System.getProperty( "interest_points_channel_1" ); + fix_tiles = System.getProperty( "fix_tiles" ); map_back_tiles = System.getProperty( "map_back_tiles" ); transformation_model = System.getProperty( "transformation_model" ); model_to_regularize_with = System.getProperty( "model_to_regularize_with" ); float lambda = Float.parseFloat( System.getProperty( "lambda" ) ); int allowed_error_for_ransac = Integer.parseInt( System.getProperty( "allowed_error_for_ransac" ) ); -detection_min_max = System.getProperty( "detection_min_max" ); +significance = System.getProperty( "significance" ); System.out.println( "registration_algorithm = " + registration_algorithm ); -System.out.println( "interest_points_channel_0 = " + interest_points_channel_0 ); -System.out.println( "interest_points_channel_1 = " + interest_points_channel_1 ); System.out.println( "fix_tiles = " + fix_tiles ); System.out.println( "map_back_tiles = " + map_back_tiles ); System.out.println( "transformation = " + transformation_model); System.out.println( "model_to_regularize_with = " + model_to_regularize_with ); System.out.println( "lambda = " + lambda ); System.out.println( "allowed_error_for_ransac = " + allowed_error_for_ransac ); -System.out.println( "detection_min_max = " + detection_min_max ); +System.out.println( "significance = " + significance ); + + +// detection_min_max = System.getProperty( "detection_min_max" ); +// System.out.println( "detection_min_max = " + detection_min_max ); +System.out.println( "-------------------------------------------------------" ); +System.out.println( "Channel setting for Detection: " ); -//activate cluster processing +// Channel setting for Difference-of-Mean detection +// parses channels and takes from there the number of channels +// takes from reg_process_channel if it is Single Channel, Dual Channel or Dual Channel +// were one Channel contains the beads +// from this it decides which string to assemble +reg_process_channel = System.getProperty( "reg_process_channel" ); +System.out.println( "process_channel = " + reg_process_channel ); + +reg_processing_channel = System.getProperty( "reg_processing_channel" ); +System.out.println( "processing_channel = channel " + reg_processing_channel ); + +channels = System.getProperty( "channels" ); +System.out.println( "Channels = " + channels ); + +reg_radius_1 = System.getProperty( "reg_radius_1" ); +System.out.println( "reg_radius_1 = " + reg_radius_1 ); + +reg_radius_2 = System.getProperty( "reg_radius_2" ); +System.out.println( "reg_radius_2 = " + reg_radius_2 ); + +reg_threshold = System.getProperty( "reg_threshold" ); +System.out.println( "reg_threshold = " + reg_threshold); + +// Splits up channels, reg_radius_1, reg_radius_2 and reg_threshold +String delims = "[,]"; +String[] channel_token = channels.split(delims); +String[] radius_1_token = reg_radius_1.split(delims); +String[] radius_2_token = reg_radius_2.split(delims); +String[] threshold_token = reg_threshold.split(delims); + +String channel_string = ""; +String processing_channel_string = ""; +StringBuilder channel_string_multi = new StringBuilder(); + +// If there are no channels set returns an error +if (channels.equalsIgnoreCase("")) +{ + System.out.println("Warning: There are no channels set"); +} + +// Dual Channels both Channels contain beads +else if (reg_process_channel.equalsIgnoreCase( "All channels" ) && channel_token.length > 1 ) + +{ + // Assembles String using StringBuilder for 2 Channels + for (int channel=0; channel < channel_token.length; channel++ ) + { + String channel_part = "interest_point_specification_(channel_" + channel_token[channel] + ")=[Advanced ...] " + + "radius_1_" + channel_token[channel] + "=" + radius_1_token[channel] + " " + + "radius_2_" + channel_token[channel] + "=" + radius_2_token[channel] + " " + + "threshold_" + channel_token[channel] + "=" + threshold_token[channel] + " " + + "find_maxima_" + channel_token[channel]; + channel_string_multi.append(channel_part); + channel_string_multi.append(" "); + } + + } + + // Returns an Error if there is one channel in channels but multiple settings in radius and or threshold + else if ( channel_token.length == 1 && (radius_1_token.length > 1 || radius_2_token.length > 1 || threshold_token.length > 1 ) ) + { + System.out.println( "Error: Only one channel detected but multiple channel settings for radius or threshold" ); + } + + // Returns an Error if set to Dual Channel one Channel contains beads but there is only one channel in channels + else if ( reg_process_channel.equalsIgnoreCase( "Single channel (Select from List)" ) && channel_token.length == 1 ) + { + System.out.println( "Error: reg_process_channel or channels set incorrectly" ); + } + + // Assembles String for Singel Channel + else if (reg_process_channel.equalsIgnoreCase( "Single channel" ) && channel_token.length == 1 ) + { + processing_channel_string = ""; + channel_string_multi.append(""); + channel_string = "interest_point_specification=[Advanced ...] " + + "radius_1=" + reg_radius_1 + " " + + "radius_2=" + reg_radius_2 + " " + + "threshold=" + reg_threshold + " " + + "find_maxima"; + } + + // Returns and Error if set to Dual Channel but there are multiple settings in radius and or threshold + else if ( reg_process_channel.equalsIgnoreCase( "Single channel (Select from List)" ) && (radius_1_token.length > 1 || radius_2_token.length > 1 || threshold_token.length > 1 ) ) + { + System.out.println( "Error: You said you wanted to process only one channel but there are multiple settings for radius or threshold" ); + } + + // Assembles String for Dual Channel but only one Channel contains beads + else if (reg_process_channel.equalsIgnoreCase( "Single channel (Select from List)" ) && channel_token.length > 1) + { + channel_string_multi.append(""); + processing_channel_string = "processing_channel=[channel " + reg_processing_channel + "] "; + channel_string = "interest_point_specification=[Advanced ...] " + + "radius_1=" + reg_radius_1 + " " + + "radius_2=" + reg_radius_2 + " " + + "threshold=" + reg_threshold + " " + + "find_maxima"; + } + // Returns and Error if no conditions above are met + else + { + System.out.println( "Error: Incorrect settings" ); + } + +System.out.println( "Processing Channel = " + processing_channel_string ); +System.out.println( "Channel String: " + channel_string ); +System.out.println( "Multi channel String: " + channel_string_multi ); + +// Channel Setting Registration +System.out.println( "-------------------------------------------------------" ); +System.out.println( "Channel Setting for Registration: " ); +// parses channels and takes from there the number of channels +// takes from reg_process_channel if it is Single Channel, Dual Channel or Dual Channel +// were one Channel contains the beads +// from this it decides which string to assemble + +reg_interest_points_channel = System.getProperty( "reg_interest_points_channel" ); +System.out.println( "reg_interest_points_channel = " + reg_interest_points_channel ); + +// Splits up channels, reg_interest_points_channel +String delims = "[,]"; +String[] channel_token = channels.split(delims); +String[] interest_token = reg_interest_points_channel.split(delims); + + +String reg_single_channel_string =""; +StringBuilder reg_multi_channel_string = new StringBuilder(); + +// If there are no channels set returns an error +if (channels.equalsIgnoreCase("")) + { + System.out.println("Warning: There are no channels set"); + } + + // Returns Error if Single Channel selected but multiple settings in channels or reg_interest_points_channel + else if ( reg_process_channel.equalsIgnoreCase( "Single Channel" ) && (channel_token.length > 1 || interest_token.length > 1 )) + { + System.out.println( "Error: Single Channel selected but multiple settings in channls or reg_interest_points_channel" ); + } + + // Assembles string for Single Channel registration + else if (reg_process_channel.equalsIgnoreCase( "Single Channel" ) && channel_token.length == 1 && interest_token.length == 1 ) + { + reg_multi_channel_string.append( "" ); + reg_single_channel_string = "interest_points_channel_" + channels + "=" + reg_interest_points_channel + " "; + } + + // Returns error if Multi Channels are selected but not enough settings in channels or reg_interest_points_channel + else if (reg_process_channel.equalsIgnoreCase( "All channels" ) && ( channel_token.length < 1 || interest_token.length < 1) ) + { + System.out.println( "Error: Multi Channel selected but only one setting in channels or reg_interest_points_channel" ); + } + + // Assembles string for Multi Channel registration + else if (reg_process_channel.equalsIgnoreCase( "All channels" ) && channel_token.length > 1 ) + { + for (int channel=0; channel < channel_token.length; channel++ ) + + { + String channel_part = "interest_points_channel_" + channel_token[channel] + "=" + interest_token[channel] + " "; + reg_multi_channel_string.append( channel_part ); + reg_multi_channel_string.append(" "); + } + } + + // Returns error of Multi Channels one Channel contains the beads is selected but not enough settings in channels or reg_interest_points_channel + else if (reg_process_channel.equalsIgnoreCase( "Single channel (Select from List)" ) && ( channel_token.length < 1 || interest_token.length < 1 )) + { + System.out.println( "Error: Multi Channel one Channel contains beads selected but only one setting in channls or reg_interest_points_channel" ); + } + + // Assembles string for Multi Channel Processing one Channel Contains the beads + else if (reg_process_channel.equalsIgnoreCase( "Single channel (Select from List)" ) && channel_token.length > 1 && interest_token.length > 1) + { + for (int channel=0; channel < channel_token.length; channel++ ) + { + String channel_part = "interest_points_channel_" + channel_token[channel] + "=" + interest_token[channel] + " "; + reg_multi_channel_string.append( channel_part ); + reg_multi_channel_string.append(" "); + } + } + +System.out.println( "reg_single_channel_string = " + reg_single_channel_string ); +System.out.println( "reg_multi_channel_string = " + reg_multi_channel_string ); + + +// activate cluster processing System.out.println( "=======================================================" ); try { IJ.run("Toggle Cluster Processing", "display_cluster"); @@ -112,73 +282,107 @@ catch ( e ) { runtime.exit(1); } -System.out.println( "Activated Cluster Processing" ); +System.out.println( "Activated Cluster Processing" ); -//interest point detection +// interest point detection System.out.println( "=======================================================" ); System.out.println( "Starting Detection of Interest Points" ); + +System.out.println("Detect Interest Points for Registration , select_xml=" + xml_path + xml_filename + ".xml " + + "unique_id=" + parallel_timepoints + " " + + "process_angle=[" + reg_process_angle + "] " + + "process_channel=[" + reg_process_channel + "] " + + "process_illumination=[" + reg_process_illumination + "] " + + "process_timepoint=[" + reg_process_timepoint + "] " + + processing_channel_string + + "xml_output=[Save every XML with user-provided unique id]" + " " + + "processing_timepoint=[Timepoint " + parallel_timepoints + "] " + + "type_of_interest_point_detection=[" + type_of_detection + "] " + + "label_interest_points=" + label_interest_points + " " + + "subpixel_localization=[" + subpixel_localization + "] " + + channel_string + "" + + channel_string_multi + "" + + ""); + try { IJ.run("Detect Interest Points for Registration", "select_xml=" + xml_path + xml_filename + ".xml " + - "unique_id=" + unique_id + " " + - "process_angle=[" + process_angle + "] " + - "process_channel=[" + process_channel + "] " + - "process_illumination=[" + process_illumination + "] " + - "process_timepoint=[" + process_timepoint + "] " + - "processing_channel=[" + processing_channel + "] " + // Dual Channel: 1 Channel contains the beads + "unique_id=" + parallel_timepoints + " " + + "process_angle=[" + reg_process_angle + "] " + + "process_channel=[" + reg_process_channel + "] " + + "process_illumination=[" + reg_process_illumination + "] " + + "process_timepoint=[" + reg_process_timepoint + "] " + + processing_channel_string + "xml_output=[Save every XML with user-provided unique id]" + " " + "processing_timepoint=[Timepoint " + parallel_timepoints + "] " + "type_of_interest_point_detection=[" + type_of_detection + "] " + "label_interest_points=" + label_interest_points + " " + "subpixel_localization=[" + subpixel_localization + "] " + - "interest_point_specification_(channel_0)=[Advanced ...] " + -// "interest_point_specification_(channel_1)=[Advanced ...] " + // Dual Channel - "radius_1=" + radius_1 + " " + - "radius_2=" + radius_2 + " " + - "threshold=" + threshold + " " + - "find_maxima"); + channel_string + "" + + channel_string_multi + "" + + ""); } catch ( e ) { - print( "[registration::interest_points] caught exception: "+e ); + print( "[registration::activate_cluster_processing] caught exception: "+e ); //important to fail the process if exception occurs runtime.exit(1); } -//registration based on interest point detection + +// registration based on interest point detection System.out.println( "=======================================================" ); System.out.println( "Starting Registration" ); +System.out.println("Register Dataset based on Interest Points , select_xml=" + xml_path + xml_filename + ".job_" + parallel_timepoints + ".xml " + + "process_angle=[" + reg_process_angle + "] " + + "process_channel=[" + reg_process_channel + "] " + + "process_illumination=[" + reg_process_illumination + "] " + + "process_timepoint=[" + reg_process_timepoint + "] " + + "xml_output=[Do not process on cluster] " + + "processing_timepoint=[Timepoint " + parallel_timepoints + "] " + + "registration_algorithm=[" + registration_algorithm + "] " + + "type_of_registration=[" + type_of_registration + "] " + + reg_single_channel_string + + reg_multi_channel_string + + "fix_tiles=[" + fix_tiles + "] " + + "map_back_tiles=[" + map_back_tiles + "] " + + "transformation=" + transformation_model + " " + + "regularize_model " + + "model_to_regularize_with=" + model_to_regularize_with + " " + + "lamba=" + lambda + " " + + "allowed_error_for_ransac=" + allowed_error_for_ransac + " " + + "significance=" + significance + ""); + try { - IJ.run("Register Dataset based on Interest Points", - "select_xml=" + xml_path + xml_filename + ".job_" + unique_id + ".xml " + - "process_angle=[" + process_angle + "] " + - "process_channel=[" + process_channel + "] " + - "process_illumination=[" + process_illumination + "] " + - "process_timepoint=[" + process_timepoint + "] " + - "xml_output=[Do not process on cluster] " + - "processing_timepoint=[Timepoint " + parallel_timepoints + "] " + - "registration_algorithm=[" + registration_algorithm + "] " + - "type_of_registration=[" + type_of_registration + "] " + - "interest_points_channel_0=" + interest_points_channel_0 + " " + - // check? "interest_points_channel_0=[[DO NOT register this channel]] " + - // "interest_points_channel_1=" + interest_points_channel_1 + " " + // Dual Channel - "fix_tiles=[" + fix_tiles + "] " + - "map_back_tiles=[" + map_back_tiles + "] " + - "transformation=" + transformation_model + " " + - "regularize_model " + - "model_to_regularize_with=" + model_to_regularize_with + " " + - "lamba=" + lambda + " " + - "allowed_error_for_ransac=" + allowed_error_for_ransac); +IJ.run("Register Dataset based on Interest Points", + "select_xml=" + xml_path + xml_filename + ".job_" + parallel_timepoints + ".xml " + + "process_angle=[" + reg_process_angle + "] " + + "process_channel=[" + reg_process_channel + "] " + + "process_illumination=[" + reg_process_illumination + "] " + + "process_timepoint=[" + reg_process_timepoint + "] " + + "xml_output=[Do not process on cluster] " + + "processing_timepoint=[Timepoint " + parallel_timepoints + "] " + + "registration_algorithm=[" + registration_algorithm + "] " + + "type_of_registration=[" + type_of_registration + "] " + + reg_single_channel_string + + reg_multi_channel_string + + "fix_tiles=[" + fix_tiles + "] " + + "map_back_tiles=[" + map_back_tiles + "] " + + "transformation=" + transformation_model + " " + + "regularize_model " + + "model_to_regularize_with=" + model_to_regularize_with + " " + + "lamba=" + lambda + " " + + "allowed_error_for_ransac=" + allowed_error_for_ransac + " " + + "significance=" + significance + ""); } catch ( e ) { - print( "[registration::based_on_interestpoints] caught exception: "+e ); + print( "[registration::activate_cluster_processing] caught exception: "+e ); //important to fail the process if exception occurs runtime.exit(1); } - /* shutdown */ runtime.exit(0); diff --git a/spim_registration/timelapse/tomancak_test_cluster.yaml b/spim_registration/timelapse/tomancak_test_cluster.yaml index 975904f..2935c2f 100755 --- a/spim_registration/timelapse/tomancak_test_cluster.yaml +++ b/spim_registration/timelapse/tomancak_test_cluster.yaml @@ -36,7 +36,6 @@ define_xml_tif: { } resave_hdf5: { - bsh_file: "export.bsh", hdf5_chunk_sizes: '"{{ {{32,32,4}}, {{32,32,4}}, {{16,16,16}}, {{16,16,16}} }}"', resave_angle: '"All angles"', resave_channel: '"All channels"', @@ -44,37 +43,38 @@ resave_hdf5: { resave_timepoint: '"All Timepoints"', setups_per_partition: '0', subsampling_factors: '"{{ {{1,1,1}}, {{2,2,1}}, {{4,4,1}}, {{8,8,1}} }}"', - timepoints_per_partition: '1' + timepoints_per_partition: '1', + bsh_file: "export.bsh" } registration: { + reg_process_channel: '"Single Channel"', + reg_processing_channel: '"green"', + reg_interest_points_channel: '"beads"', + reg_radius_1: '2', + reg_radius_2: '3', + reg_threshold: '0.005', + initial_sigma: '1.8', + threshold_gaussian: '0.0080', + type_of_detection: '"Difference-of-Mean (Integral image based)"', + label_interest_points: '"beads"', + reg_process_timepoint: '"Single Timepoint (Select from List)"', + reg_process_angle: '"All angles"', + reg_process_illumination: '"All illuminations"', + subpixel_localization: '"3-dimensional quadratic fit"', + detection_min_max: "find_maxima", + type_of_registration: '"Register timepoints individually"', algorithm: '"Fast 3d geometric hashing (rotation invariant)"', + transformation_model: "Affine", allowed_error_for_ransac: '5', - angle: '"All angles"', - bsh_file: "registration.bsh", - channel: '"All channels"', - detection_min_max: "find_maxima", + significance: '10', fix_tiles: '"Fix first tile"', - illuminations: '"All illuminations"', - imglib_container: '"ArrayImg (faster)"', - initial_sigma: '1.8', - interest_points_channel_0: '"beads"', - interest_points_channel_1: '"beads"', - label_interest_points: '"beads"', - lambda: '0.10', map_back_tiles: '"Map back to first tile using rigid model"', model_to_regularize_with: "Rigid", - proc-ch: '"channel 0"', - radius_1: '2', - radius_2: '3', - significance: '10', - subpixel_localization: '"3-dimensional quadratic fit"', - threshold: '0.005', - threshold_gaussian: '0.0080', - timepoint: '"Single Timepoint (Select from List)"', - transformation_model: "Affine", - type_of_detection: '"Difference-of-Mean (Integral image based)"', - type_of_registration: '"Register timepoints individually"' + lambda: '0.10', + + imglib_container: '"ArrayImg (faster)"', + bsh_file: "registration.bsh" } xml_merge: { -- GitLab