Mercurial > repos > iuc > imagej2_create_image
changeset 4:48f25b8408e1 draft
planemo upload commit 18df9e67efd4adafcde4eb9b62cd815e4afe9733-dirty
| author | iuc |
|---|---|
| date | Wed, 26 Aug 2015 14:37:18 -0400 |
| parents | bb65623b90a8 |
| children | e16d8e6654a6 |
| files | imagej2_base_utils.py imagej2_create_image.py imagej2_create_image.xml imagej2_macros.xml |
| diffstat | 4 files changed, 22 insertions(+), 47 deletions(-) [+] |
line wrap: on
line diff
--- a/imagej2_base_utils.py Tue Aug 04 11:15:10 2015 -0400 +++ b/imagej2_base_utils.py Wed Aug 26 14:37:18 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 )
--- a/imagej2_create_image.py Tue Aug 04 11:15:10 2015 -0400 +++ b/imagej2_create_image.py Wed Aug 26 14:37:18 2015 -0400 @@ -13,8 +13,6 @@ parser.add_argument( '--depth', dest='depth', type=int, help='Image depth (specifies the number of stack slices)' ) parser.add_argument( '--image_type', dest='image_type', help='Image type' ) parser.add_argument( '--image_title', dest='image_title', default='', help='Image title' ) - 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 format' ) parser.add_argument( '--jython_script', dest='jython_script', help='Path to the Jython script' ) parser.add_argument( '--out_fname', help='Path to the output file' ) @@ -22,8 +20,6 @@ tmp_dir = imagej2_base_utils.get_temp_dir() tmp_image_path = imagej2_base_utils.get_temporary_image_path( tmp_dir, args.output_datatype ) - # Set the size of the memory allocation pool used by the JVM. - memory_size = imagej2_base_utils.get_max_heap_size_value( args.max_heap_size_type, args.max_heap_size ) # Define command response buffers. tmp_out = tempfile.NamedTemporaryFile().name @@ -31,7 +27,7 @@ tmp_err = tempfile.NamedTemporaryFile().name tmp_stderr = open( tmp_err, 'wb' ) # Build the command line. - cmd = imagej2_base_utils.get_base_command_imagej2( memory_size, jython_script=args.jython_script ) + cmd = imagej2_base_utils.get_base_command_imagej2( None, jython_script=args.jython_script ) if cmd is None: imagej2_base_utils.stop_err( "ImageJ not found!" ) cmd += ' %s %d %d %d %s %s' % ( args.image_title, args.width, args.height, args.depth, args.image_type, tmp_image_path )
--- a/imagej2_create_image.xml Tue Aug 04 11:15:10 2015 -0400 +++ b/imagej2_create_image.xml Wed Aug 26 14:37:18 2015 -0400 @@ -1,10 +1,10 @@ <?xml version='1.0' encoding='UTF-8'?> -<tool id="imagej2_create_image" name="Create new image" version="1.0.0"> +<tool id="imagej2_create_image" name="Create new image" version="@WRAPPER_VERSION@.0"> <description>with ImageJ2</description> <macros> <import>imagej2_macros.xml</import> </macros> - <expand macro="fiji_20141125_requirements" /> + <expand macro="fiji_requirements" /> <command> <