# HG changeset patch # User iuc # Date 1440614232 14400 # Node ID 7a8b05b111f9f51db42d2c12e5aa5bf9844d9649 # Parent 9a24b7e6801090a68df01b1fa3ba0114538c7d9c planemo upload commit 18df9e67efd4adafcde4eb9b62cd815e4afe9733-dirty diff -r 9a24b7e68010 -r 7a8b05b111f9 imagej2_base_utils.py --- a/imagej2_base_utils.py Tue Aug 04 11:15:04 2015 -0400 +++ b/imagej2_base_utils.py Wed Aug 26 14:37:12 2015 -0400 @@ -86,21 +86,6 @@ os.symlink( input_file, image_path ) return image_path -def get_max_heap_size_value( max_heap_size_type, max_heap_size ): - """ - Return a string that can be used by the javabridge to set the size - of the memory allocation pool used by the JVM. The value must be - determined to be a multiple of 1024 or it will be ignored. - """ - if max_heap_size_type == 'default': - return None - if max_heap_size_type == 'megabytes': - if int( max_heap_size ) % 1024 not in [ 0, 256, 512 ]: - return None - return '%sm' % str( max_heap_size ) - if max_heap_size_type == 'gigabytes': - return '%sg' % str( max_heap_size ) - def get_platform_info_dict(): '''Return a dict with information about the current platform.''' platform_dict = {} @@ -172,6 +157,7 @@ return ' %.1f' % val elif val_type == 'int': return ' %d' % val + return ' %s' % val def stop_err( msg ): sys.stderr.write( msg ) diff -r 9a24b7e68010 -r 7a8b05b111f9 imagej2_convert_format.py --- a/imagej2_convert_format.py Tue Aug 04 11:15:04 2015 -0400 +++ b/imagej2_convert_format.py Wed Aug 26 14:37:12 2015 -0400 @@ -8,15 +8,12 @@ parser = argparse.ArgumentParser() parser.add_argument( '--in_fname', dest='in_fname', help='Path to the input file' ) parser.add_argument( '--input_datatype', dest='input_datatype', help='Input image datatype' ) - parser.add_argument( '--max_heap_size_type', dest='max_heap_size_type', help='Type (default or megabytes) of max_heap_size value' ) - parser.add_argument( '--max_heap_size', dest='max_heap_size', help='Maximum size of the memory allocation pool used by the JVM.' ) parser.add_argument( '--output_datatype', dest='output_datatype', help='Output image datatype' ) parser.add_argument( '--out_fname', help='Path to the output file' ) args = parser.parse_args() - # Set the size of the memory allocation pool used by the JVM. - max_heap_size = imagej2_base_utils.get_max_heap_size_value( args.max_heap_size_type, args.max_heap_size ) + # Start the JVM via the Javabridge. - imagej2_utils.start_vm( args=None, class_path=None, max_heap_size=max_heap_size, run_headless=True ) + imagej2_utils.start_vm( args=None, class_path=None, max_heap_size=None, run_headless=True ) try: tmp_dir = imagej2_base_utils.get_temp_dir() in_image_path = imagej2_base_utils.get_input_image_path( tmp_dir, args.in_fname, args.input_datatype ) diff -r 9a24b7e68010 -r 7a8b05b111f9 imagej2_convert_format.xml --- a/imagej2_convert_format.xml Tue Aug 04 11:15:04 2015 -0400 +++ b/imagej2_convert_format.xml Wed Aug 26 14:37:12 2015 -0400 @@ -1,22 +1,20 @@ - + with bioformats imagej2_macros.xml - + - diff -r 9a24b7e68010 -r 7a8b05b111f9 imagej2_macros.xml --- a/imagej2_macros.xml Tue Aug 04 11:15:04 2015 -0400 +++ b/imagej2_macros.xml Wed Aug 26 14:37:12 2015 -0400 @@ -1,11 +1,12 @@ - + 1.0 + fiji - + fiji javabridge @@ -53,33 +54,27 @@ + + + + + + --iterations $iterations --count $count --black_background $black_background --pad_edges_when_eroding $pad_edges_when_eroding - - - - - - - - - - - - - - - - - - - - --max_heap_size_type $set_max_heap_size.max_heap_size_type - --max_heap_size $set_max_heap_size.max_heap_size + +.. class:: warningmark + +This tool works on binary images, so other image types will automatically be converted to binary +before they are analyzed. This step is performed using the ImageJ2 **Make Binary** command with +the following settings: **Iterations:** 1, **Count:** 1, **Pad edges when eroding:** No. The tool +allows you to choose the **Black background** setting. If these settings are not appropriate, +first manually convert the image to binary using the **Convert to binary (black and white) with ImageJ2** +tool, which allows you to change them.