Commit message:
Uploaded |
added:
icqsol_macros.xml icqsol_refine_shape.py icqsol_refine_shape.xml icqsol_utils.py test-data/box_refined.vtkascii test-data/box_with_surface_field.vtkascii |
b |
diff -r 000000000000 -r d543f7bbe8da icqsol_macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icqsol_macros.xml Tue Aug 23 15:01:27 2016 -0400 |
b |
@@ -0,0 +1,116 @@ +<?xml version='1.0' encoding='UTF-8'?> +<macros> + <token name="@WRAPPER_VERSION@">1.0</token> + <xml name="requirements"> + <requirements> + <requirement type="package" version="0.3.26">icqsol</requirement> + </requirements> + </xml> + <xml name="stdio"> + <stdio> + <exit_code range="1:"/> + <exit_code range=":-1"/> + <regex match="Error:"/> + <regex match="Exception:"/> + </stdio> + </xml> + <!-- TODO: place this in colormaps_conf.xml --> + <xml name="color_map_param"> + <param name="color_map" type="select" label="Color map"> + <option value="hot" selected="True">Hot</option> + <option value="cold">Cold</option> + <option value="blackbody">Blackbody</option> + <option value="gnu">Gnu</option> + </param> + </xml> + <xml name="output_vtk_type_params"> + <param name="output_vtk_type" type="select" label="Output file type"> + <option value="vtkascii" selected="True">Vtk-ascii</option> + <option value="vtkbinary">Vtk-binary</option> + </param> + </xml> + <token name="@origin_cmd_args@"> + --origin_x $create_process_cond.shape_cond.origin_x + --origin_y $create_process_cond.shape_cond.origin_y + --origin_z $create_process_cond.shape_cond.origin_z + </token> + <xml name="origin_params"> + <param name="origin_x" type="float" value="0.0" label="X coordinate of origin" help="Floating point number"/> + <param name="origin_y" type="float" value="0.0" label="Y coordinate of origin" help="Floating point number"/> + <param name="origin_z" type="float" value="0.0" label="Z coordinate of origin" help="Floating point number"/> + </xml> + <token name="@lengths_cmd_args@"> + --length_x $create_process_cond.shape_cond.length_x + --length_y $create_process_cond.shape_cond.length_y + --length_z $create_process_cond.shape_cond.length_z + </token> + <xml name="lengths_params"> + <!-- At least one of these lengths must be greater than zero, but we have no validator for this. --> + <param name="length_x" type="float" value="1.0" label="Length in the X direction" help="Floating point number"> + <validator type="in_range" min="0" exclude_min="false" /> + </param> + <param name="length_y" type="float" value="0.0" label="Length in the Y direction" help="Floating point number"> + <validator type="in_range" min="0" exclude_min="false" /> + </param> + <param name="length_z" type="float" value="0.0" label="Length in the Z direction" help="Floating point number"> + <validator type="in_range" min="0" exclude_min="false" /> + </param> + </xml> + <xml name="lengths_exclude_min_params"> + <param name="length_x" type="float" value="1.0" label="Length in the X direction" help="Floating point number"> + <validator type="in_range" min="0" exclude_min="true" /> + </param> + <param name="length_y" type="float" value="1.0" label="Length in the Y direction" help="Floating point number"> + <validator type="in_range" min="0" exclude_min="true" /> + </param> + <param name="length_z" type="float" value="1.0" label="Length in the Z direction" help="Floating point number"> + <validator type="in_range" min="0" exclude_min="true" /> + </param> + </xml> + <token name="@radius_cmd_args@"> + --radius $create_process_cond.shape_cond.radius + </token> + <xml name="radius_params"> + <param name="radius" type="float" value="1.0" label="Radius" help="Floating point number"> + <validator type="in_range" min="0" exclude_min="True" /> + </param> + </xml> + <token name="@n_theta_cmd_args@"> + --n_theta $create_process_cond.shape_cond.n_theta + </token> + <xml name="n_theta_params"> + <param name="n_theta" type="integer" value="16" label="Number of slices" help="Controls the tessellation along the longitude direction"> + <validator type="in_range" min="0" exclude_min="False" /> + </param> + </xml> + <token name="@n_phi_cmd_args@"> + --n_phi $create_process_cond.shape_cond.n_phi + </token> + <xml name="n_phi_params"> + <param name="n_phi" type="integer" value="8" label="Number of stacks" help="Controls the tessellation along the latitude direction"> + <validator type="in_range" min="0" exclude_min="False" /> + </param> + </xml> + <xml name="citations"> + <citations> + <citation type="bibtex"> + @unpublished{None, + author = {None}, + title = {None}, + year = {None}, + eprint = {None}, + url = {https://github.com/gregvonkuster/galaxy-csg} + }</citation> + <citation type="bibtex"> + @misc(Schroeder-Martin-Lorensen2006, + author = "Will Schroeder and + Ken Martin and + Bill Lorensen", + year = "2006", + title = "The Visualization Toolkit (4th ed.)", + publisher = "Kitware", + url = "https://en.wikipedia.org/wiki/Special:BookSources/978-1-930934-19-1") + </citation> + </citations> + </xml> +</macros> |
b |
diff -r 000000000000 -r d543f7bbe8da icqsol_refine_shape.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icqsol_refine_shape.py Tue Aug 23 15:01:27 2016 -0400 |
b |
@@ -0,0 +1,39 @@ +#!/usr/bin/env python +import argparse +import shutil + +import icqsol_utils + +# Parse Command Line. +parser = argparse.ArgumentParser() +parser.add_argument('--input', dest='input', help='Shape dataset selected from history') +parser.add_argument('--input_file_format_and_type', dest='input_file_format_and_type', help='Input file format and type') +parser.add_argument('--input_dataset_type', dest='input_dataset_type', help='Input dataset_type') +parser.add_argument('--max_edge_length', dest='max_edge_length', type=float, help='Maximum edge length') +parser.add_argument('--output', dest='output', help='Output dataset') +parser.add_argument('--output_vtk_type', dest='output_vtk_type', help='Output VTK type') + +args = parser.parse_args() + +input_format, input_file_type = icqsol_utils.get_format_and_type(args.input_file_format_and_type) +tmp_dir = icqsol_utils.get_temp_dir() + +# Instantiate a ShapeManager for loading the input. +shape_mgr = icqsol_utils.get_shape_manager(input_format, args.input_dataset_type) + +# Get the vtk polydata from the input dataset. +vtk_poly_data = shape_mgr.loadAsVtkPolyData(args.input) + +# Refine the shape if requested. +vtk_poly_data = shape_mgr.refineVtkPolyData(vtk_poly_data, max_edge_length=args.max_edge_length) + +# Define the output file format and type (the output_format can only be 'vtk'). +output_format, output_file_type = icqsol_utils.get_format_and_type(args.output_vtk_type) +tmp_output_path = icqsol_utils.get_temporary_file_path(tmp_dir, output_format) + +# Make sure the ShapeManager's writer is vtk. +shape_mgr.setWriter(file_format=icqsol_utils.VTK, vtk_dataset_type=icqsol_utils.POLYDATA) + +# Save the output. +shape_mgr.saveVtkPolyData(vtk_poly_data=vtk_poly_data, file_name=tmp_output_path, file_type=output_file_type) +shutil.move(tmp_output_path, args.output) |
b |
diff -r 000000000000 -r d543f7bbe8da icqsol_refine_shape.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icqsol_refine_shape.xml Tue Aug 23 15:01:27 2016 -0400 |
[ |
@@ -0,0 +1,57 @@ +<?xml version='1.0' encoding='UTF-8'?> +<tool id="icqsol_refine_shape" name="Refine shape" version="@WRAPPER_VERSION@.0"> + <description></description> + <macros> + <import>icqsol_macros.xml</import> + </macros> + <expand macro="requirements" /> + <command> + <![CDATA[ + python $__tool_directory__/icqsol_refine_shape.py + --input "$input" + --input_file_format_and_type $input.ext + --input_dataset_type $input.metadata.dataset_type + --max_edge_length $max_edge_length + --output "$output" + --output_vtk_type $output_vtk_type + ]]> + </command> + <inputs> + <param name="input" type="data" format="plyascii,plybinary,vtkascii,vtkbinary" label="Shape"> + <validator type="dataset_ok_validator" /> + </param> + <param name="max_edge_length" type="float" value="0.1" label="Maximum edge length" help="Refine shape by restricting edges to this length."> + <validator type="in_range" min="0" exclude_min="true" /> + </param> + <expand macro="output_vtk_type_params" /> + </inputs> + <outputs> + <data name="output" format="vtkascii" label="${tool.name} ${on_string} Max edge length: ${max_edge_length}"> + <actions> + <action type="format"> + <option type="from_param" name="output_vtk_type" /> + </action> + </actions> + </data> + </outputs> + <tests> + <test> + <param name="input" value="box_with_surface_field.vtkascii" ftype="vtkascii" /> + <param name="input_file_format_and_type" value="vtkascii" /> + <param name="input_dataset_type" value="POLYDATA" /> + <param name="max_edge_length" value="0.1" /> + <output name="output" file="box_refined.vtkascii" ftype="vtkascii" /> + <param name="output_vtk_type" value="vtkascii" /> + </test> + </tests> + <help> +**What it does** + +Refines a shape by limiting all edges to a specified length, resulting in a more detailed shape. + +* **Shape** - Shape to be refined. +* **Maximum edge length** - The shape's edges are smoothed by adding points to its edges that are longer than the defined maximum length. + + </help> + <expand macro="citations" /> +</tool> |
b |
diff -r 000000000000 -r d543f7bbe8da icqsol_utils.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icqsol_utils.py Tue Aug 23 15:01:27 2016 -0400 |
[ |
@@ -0,0 +1,86 @@ +import os +import sys +import tempfile + +from icqsol.shapes.icqShapeManager import ShapeManager +from icqsol.bem.icqLaplaceSolver import LaplaceSolver + +PLY = 'ply' +POLYDATA = 'POLYDATA' +VTK = 'vtk' + + +def asbool(val): + return str(val).lower() in ['yes', 'true'] + + +def get_format_and_type(galaxy_ext): + # Define the output file format and type. + format = None + datatype = None + if galaxy_ext in ['vtkascii', 'vtkbinary']: + format = VTK + elif galaxy_ext in ['plyascii', 'plybinary']: + format = PLY + if galaxy_ext in ['vtkascii', 'plyascii']: + datatype = 'ascii' + elif galaxy_ext in ['vtkbinary', 'plybinary']: + datatype = 'binary' + return format, datatype + + +def get_input_file_path(tmp_dir, input_file, format): + """ + iCqSol uses file extensions (e.g., .ply, .vtk) when reading and + writing files, so the Galaxy dataset naming convention of + setting all file extensions as .dat must be handled. + """ + file_path = get_temporary_file_path(tmp_dir, format) + # Remove the file so we can create a symlink. + os.remove(file_path) + os.symlink(input_file, file_path) + return file_path + + +def get_laplace_solver(shape_data, max_edge_length=float('inf')): + return LaplaceSolver(shape_data, max_edge_length=max_edge_length) + + +def get_shape_manager(format=None, dataset_type=None): + # Instantiate a ShapeManager. + return ShapeManager(file_format=format, vtk_dataset_type=dataset_type) + + +def get_temp_dir(prefix='tmp-vtk-', dir=None): + """ + Return a temporary directory. + """ + return tempfile.mkdtemp(prefix=prefix, dir=dir) + + +def get_tempfilename(dir=None, suffix=None): + """ + Return a temporary file name. + """ + if suffix is None: + s = None + elif suffix.startswith('.'): + s = suffix + else: + s = '.%s' % suffix + fd, name = tempfile.mkstemp(suffix=s, dir=dir) + os.close(fd) + return name + + +def get_temporary_file_path(tmp_dir, file_extension): + """ + Return the path to a temporary file with a valid VTK format + file extension. + """ + return get_tempfilename(tmp_dir, file_extension) + + +def stop_err(msg): + sys.stderr.write("%s\n" % msg) + sys.exit() |
b |
diff -r 000000000000 -r d543f7bbe8da test-data/box_refined.vtkascii --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/box_refined.vtkascii Tue Aug 23 15:01:27 2016 -0400 |
b |
b'@@ -0,0 +1,2803 @@\n+# vtk DataFile Version 4.0\n+vtk output\n+ASCII\n+DATASET POLYDATA\n+POINTS 1062 float\n+0 0 0 0 0 1 0 1 1 \n+0 1 0 1 0 0 1 1 0 \n+1 1 1 1 0 1 0 0 0 \n+0 0 0 0 0 1 0 0 1 \n+0 1 1 0 1 1 0 1 0 \n+0 1 0 1 0 0 1 0 0 \n+1 1 0 1 1 0 1 1 1 \n+1 1 1 1 0 1 1 0 1 \n+0 0.9 0 0 0.8 0 0 0.7 0 \n+0 0.6 0 0 0.5 0 0 0.4 0 \n+0 0.3 0 0 0.2 0 0 0.1 0 \n+0 0 0.1 0 0 0.2 0 0 0.3 \n+0 0 0.4 0 0 0.5 0 0 0.6 \n+0 0 0.7 0 0 0.8 0 0 0.9 \n+0 0.0666667 0.933333 0 0.133333 0.866667 0 0.2 0.8 \n+0 0.266667 0.733333 0 0.333333 0.666667 0 0.4 0.6 \n+0 0.466667 0.533333 0 0.533333 0.466667 0 0.6 0.4 \n+0 0.666667 0.333333 0 0.733333 0.266667 0 0.8 0.2 \n+0 0.866667 0.133333 0 0.933333 0.0666667 0 0.85 0.0583333 \n+0 0.55 0.183333 0 0.255556 0.388889 0 0.05 0.05 \n+0 0.138889 0.672222 0 0.0583333 0.85 0 0.0880359 0.756319 \n+0 0.636458 0.236458 0 0.65 0.112121 0 0.751798 0.0919115 \n+0 0.55 0.0848485 0 0.35 0.193939 0 0.125845 0.35 \n+0 0.268403 0.535069 0 0.401736 0.401736 0 0.191993 0.725327 \n+0 0.232923 0.631293 0 0.114222 0.55 0 0.0622222 0.65 \n+0 0.13489 0.801557 0 0.537695 0.300276 0 0.65 0.044912 \n+0 0.616871 0.171419 0 0.706832 0.181217 0 0.801296 0.13463 \n+0 0.447107 0.134091 0 0.35 0.0905244 0 0.0529899 0.35 \n+0 0.0927212 0.25 0 0.0949592 0.144959 0 0.323188 0.589855 \n+0 0.362462 0.495796 0 0.456522 0.456522 0 0.50535 0.382681 \n+0 0.0461675 0.55 0 0.16485 0.603383 0 0.0899419 0.45 \n+0 0.598364 0.331697 0 0.571814 0.244747 0 0.510337 0.134091 \n+0 0.45 0.0577546 0 0.385128 0.142232 0 0.216594 0.200095 \n+0 0.15 0.0743059 0 0.326006 0.425345 0 0.185238 0.479809 \n+0 0.143982 0.198548 0 0.17858 0.279503 0 0.197044 0.348287 \n+0 0.287252 0.282724 0 0.342299 0.344342 0 0.436401 0.306364 \n+0 0.280769 0.142232 0 0.206827 0.124743 0 0.259537 0.0669451 \n+0 0.201252 0.54592 0 0.25672 0.462441 0 0.152844 0.416139 \n+0 0.482965 0.235398 0 0.40927 0.237802 0 0.284077 0.213914 \n+0 0.1 1 0 0.2 1 0 0.3 1 \n+0 0.4 1 0 0.5 1 0 0.6 1 \n+0 0.7 1 0 0.8 1 0 0.9 1 \n+0 1 0.9 0 1 0.8 0 1 0.7 \n+0 1 0.6 0 1 0.5 0 1 0.4 \n+0 1 0.3 0 1 0.2 0 1 0.1 \n+0 0.15 0.941667 0 0.45 0.816667 0 0.744444 0.611111 \n+0 0.95 0.95 0 0.9 0.233333 0 0.941667 0.15 \n+0 0.822222 0.422222 0 0.363542 0.763542 0 0.35 0.887879 \n+0 0.248202 0.908088 0 0.45 0.915152 0 0.65 0.806061 \n+0 0.874155 0.65 0 0.652431 0.519097 0 0.961111 0.25 \n+0 0.903472 0.35 0 0.756566 0.356566 0 0.915972 0.45 \n+0 0.462305 0.699724 0 0.35 0.955088 0 0.383129 0.828581 \n+0 0.293168 0.818783 0 0.198704 0.86537 0 0.552893 0.865909 \n+0 0.65 0.909476 0 0.94701 0.65 0 0.907279 0.75 \n+0 0.905041 0.855041 0 0.603071 0.469738 0 0.562315 0.562315 \n+0 0.726719 0.452069 0 0.829826 0.348962 0 0.838836 0.538243 \n+0 0.919811 0.568095 0 0.401637 0.668303 0 0.428186 0.755253 \n+0 0.483699 0.617032 0 0.592224 0.689223 0 0.525444 0.671946 \n+0 0.535857 0.769396 0 0.489663 0.865909 0 0.55 0.942245 \n+0 0.614872 0.857768 0 0.783406 0.799905 0 0.85 0.925694 \n+0 0.671905 0.405238 0 0.731497 0.532045 0 0.808999 0.275665 \n+0 0.857154 0.47642 0 0.787394 0.488575 0 0.640968 0.610757 \n+0 0.602914 0.756641 0 0.700939 0.710387 0 0.856018 0.801452 \n+0 0.82142 0.720497 0 0.802956 0.651713 0 0.719231 0.857768 \n+0 0.793173 0.875257 0 0.740463 0.933055 0 0.872198 0.292546 \n+0 0.692581 0.647553 0 0.715624 0.779603 1 0 0.9 \n+1 0 0.8 1 0 0.7 1 0 0.6 \n+1 0 0.5 1 0 0.4 1 0 0.3 \n+1 0 0.2 1 0 0.1 1 0.1 0 \n+1 0.2 0 1 0.3 0 1 0.4 0 \n+1 0.5 0 1 0.6 0 1 0.7 0 \n+1 0.8 0 1 0.9 0 1 0.933333 0.0666667 \n+1 0.866667 0.133333 1 0.8 0.2 1 0.733333 0.266667 \n+1 0.666667 0.333333 1 0.6 0.4 1 0.533333 0.466667 \n+1 0.466667 0.533333 1 0.4 0.6 1 0.333333 0.666667 \n+1 0.266667 0.733333 1 0.2 0.8 1 0.133333 0.866667 \n+1 0.0666667 0.933333 1 0.0583333 0.85 1 0.183333 0.55 \n+1 0.388889 0.255556 1 0.05 0.05 1 0.672222 0.138889 \n+1 0.85 0.0583333 1 0.756319 0.0880359 1 0.236458 0.636458 \n+1 0.112121 0.65 1 0.0919115 0.751798 1 0.0848485 0.55 \n+1 0.193939 0.35 1 0.35 0.125845 1 0.535069 0.268403 \n+1 0.401736 0.401736 1 0.725327 0.191993 1 0.631293 0.232923 \n+1 0.55 0.114222 1 0.65 0.0622222 1 0.801557 0.13489 '..b'1 0 0 -1 0 0 -1 0 \n+0 -1 0 0 -1 0 0 -1 0 \n+0 -1 0 0 -1 0 0 -1 0 \n+0 -1 0 0 -1 0 0 -1 0 \n+0 -1 0 0 -1 0 0 -1 0 \n+0 -1 0 0 -1 0 0 -1 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ascii --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/box_with_surface_field.vtkascii Tue Aug 23 15:01:27 2016 -0400 |
b |
@@ -0,0 +1,44 @@ +# vtk DataFile Version 4.0 +vtk output +ASCII +DATASET POLYDATA +POINTS 24 float +0 0 0 0 0 1 0 1 1 +0 1 0 1 0 0 1 1 0 +1 1 1 1 0 1 0 0 0 +0 0 0 0 0 1 0 0 1 +0 1 1 0 1 1 0 1 0 +0 1 0 1 0 0 1 0 0 +1 1 0 1 1 0 1 1 1 +1 1 1 1 0 1 1 0 1 + +POLYGONS 12 48 +3 3 0 1 +3 1 2 3 +3 7 4 5 +3 5 6 7 +3 10 8 16 +3 16 22 10 +3 18 14 12 +3 12 20 18 +3 17 9 15 +3 15 19 17 +3 13 11 23 +3 23 21 13 + +CELL_DATA 12 +FIELD FieldData 1 +surface_field 1 12 double +0.0136441 0.218305 0.97075 1.17541 0.0136441 0.218305 0.0136441 0.218305 0.106345 +0.42538 1.21152 1.53055 +POINT_DATA 24 +NORMALS Normals float +-1 0 0 -1 0 0 -1 0 0 +-1 0 0 1 0 0 1 0 0 +1 0 0 1 0 0 0 -1 0 +0 0 -1 0 -1 0 0 0 1 +0 1 0 0 0 1 0 1 0 +0 0 -1 0 -1 0 0 0 -1 +0 1 0 0 0 -1 0 1 0 +0 0 1 0 -1 0 0 0 1 + |