Mercurial > repos > imgteam > bfconvert
comparison bfconvert.xml @ 5:2945efa4cb3d draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/bfconvert/ commit 4eea5324bf5d02e6ac21006db677dd5a8ecbaaa2
| author | imgteam |
|---|---|
| date | Thu, 12 Feb 2026 11:55:02 +0000 |
| parents | 86e519799f6c |
| children |
comparison
equal
deleted
inserted
replaced
| 4:86e519799f6c | 5:2945efa4cb3d |
|---|---|
| 1 <tool id="ip_convertimage" name="Convert image" version="6.7.0+galaxy1"> | 1 <tool id="ip_convertimage" name="Convert image format" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05"> |
| 2 <description>Convert image</description> | 2 <description>with Bioformats</description> |
| 3 <requirements> | 3 <macros> |
| 4 <requirement type="package" version="6.7.0">bftools</requirement> | 4 <import>creators.xml</import> |
| 5 </requirements> | 5 <import>tests.xml</import> |
| 6 <command> | 6 <token name="@TOOL_VERSION@">6.7.0</token> |
| 7 <token name="@VERSION_SUFFIX@">4</token> | |
| 8 </macros> | |
| 9 <creator> | |
| 10 <expand macro="creators/alliecreason"/> | |
| 11 <expand macro="creators/bmcv"/> | |
| 12 </creator> | |
| 13 <edam_operations> | |
| 14 <edam_operation>operation_3443</edam_operation> | |
| 15 </edam_operations> | |
| 16 <xrefs> | |
| 17 <xref type="biii">python-bioformats</xref> | |
| 18 </xrefs> | |
| 19 <requirements> | |
| 20 <requirement type="package" version="@TOOL_VERSION@">bftools</requirement> | |
| 21 </requirements> | |
| 22 <command> | |
| 7 <![CDATA[ | 23 <![CDATA[ |
| 24 ln -s '$input_file' 'input.$input_file.ext' && | |
| 25 | |
| 8 bfconvert | 26 bfconvert |
| 9 #if $series_options['extract'] == 'True' | 27 #if $series_options['extract'] == 'True' |
| 10 -series $series_options.series | 28 -series $series_options.series |
| 11 #end if | 29 #end if |
| 12 #if $timepoint_options['extract'] == 'True' | 30 #if $timepoint_options['extract'] == 'True' |
| 34 $bigtiff | 52 $bigtiff |
| 35 $noflat | 53 $noflat |
| 36 #if $compression != 'False' | 54 #if $compression != 'False' |
| 37 -compression $compression | 55 -compression $compression |
| 38 #end if | 56 #end if |
| 39 '$input_file' './res.$out_format' && | 57 'input.$input_file.ext' './res.$out_format' && |
| 40 mv './res.$out_format' ./result_image | 58 mv './res.$out_format' ./result_image |
| 41 ]]> | 59 ]]> |
| 42 </command> | 60 </command> |
| 43 <inputs> | 61 <inputs> |
| 44 <param label="Input Image" name="input_file" type="data" format="atsf,scn,ali,labels,ffr,jpeg,ndpi,tf8,pty,fff,mnc,vms,mng,xml,pcx,img,pct,ims,bip,ome.xml,bin,flex,his,hdr,mov,psd,spi,ipl,dv,aiix,j2kr,pst,mod,ome.tif,tif,obf,dib,dic,im3,tga,pbm,c01,crw,mrcs,l2d,seq,mdb,cfg,htm,mvd2,arf,vsi,companion.ome,htd,aim,fts,ndpis,r3d.log,nef,res,jpx,ics,rec,nd2,cr2,dcm,mea,ome,lei,lms,j2k,oib,mtb,ima,ets,wlz,pict,sm3,sm2,nrrd,xdce,acff,al3d,zvi,1sc,xys,tiff,pgm,pcoraw,ppm,ipm,set,cxd,ipw,apl,fake,tnb,txt,xv,tf2,ps,log,zip,epsi,j2ki,dicom,top,msr,frm,hed,gif,dm2,dm3,dm4,zpo,wav,wat,2fl,sdt,liff,hx,pic,ome.btf,am,bmp,pnl,r3d_d3d,jpf,png,tfr,dti,nii.gz,cif,fdf,grey,df3,stk,fli,hdf,btf,stp,ch5,v,sld,ids,dv.log,jpk,mrw,r3d,xlog,ano,jpe,sxm,jpg,vws,raw,czi,spl,avi,ome.tf8,inf,spc,ome.tf2,spe,lsm,afm,lif,naf,afi,inr,lim,nd,tim,html,sif,env,tif,csv,map,nii,gel,ome.tiff,oif,par,amiramesh,pr3,fits,lut,jp2,oir,dat,aisf,zfr,zfp,xqd,eps,xqf,st,nhdr,i2i,thm,exp,svs,mrc"/> | 62 <param label="Input Image" name="input_file" type="data" format="scn,ndpi,tf8,vms,xml,pcx,xml,binary,hdr,mov,psd,ome.tiff,tiff,pbm,nrrd,pgm,ppm,txt,tf2,zip,top,gif,wav,bmp,png,gz,cif,fli,btf,jpg,avi,html,sif,ome.tiff,par,fits,jp2,eps,nhdr,svs,mrc"/> |
| 45 <param name="out_format" type="select" label="Output data type"> | 63 <param name="out_format" type="select" label="Output data type"> |
| 46 <option value="tiff" selected="True">TIFF</option> | 64 <option value="tiff" selected="True">TIFF</option> |
| 47 <option value="png">PNG</option> | 65 <option value="png">PNG</option> |
| 48 <option value="jpg">JPEG</option> | 66 <option value="jpg">JPEG</option> |
| 49 <option value="ome.tiff">OME TIFF</option> | 67 <option value="ome.tiff">OME TIFF</option> |
| 50 <option value="jp2">JPEG 2000</option> | 68 <option value="jp2">JPEG 2000</option> |
| 51 <option value="eps">EPS</option> | 69 <option value="eps">EPS</option> |
| 52 <option value="avi">AVI</option> | 70 <option value="avi">AVI</option> |
| 53 </param> | |
| 54 | |
| 55 <conditional name="series_options"> | |
| 56 <param label="Extract series" name="extract" type="select"> | |
| 57 <option selected="True" value="False">All series</option> | |
| 58 <option value="True">Extract series</option> | |
| 59 </param> | 71 </param> |
| 60 <when value="False"> </when> | 72 |
| 61 <when value="True"> | 73 <conditional name="series_options"> |
| 62 <param name="series" type="integer" value="0" label="Series id" /> | 74 <param label="Extract series" name="extract" type="select"> |
| 63 </when> | 75 <option selected="True" value="False">All series</option> |
| 64 </conditional> | 76 <option value="True">Extract series</option> |
| 65 <conditional name="timepoint_options"> | 77 </param> |
| 66 <param name="extract" type="select" label="Extract timepoint"> | 78 <when value="False"> </when> |
| 67 <option selected="True" value="False">All timepoints</option> | 79 <when value="True"> |
| 68 <option value="True">Extract timepoint</option> | 80 <param name="series" type="integer" value="0" label="Series id" /> |
| 69 </param> | 81 </when> |
| 70 <when value="False"></when> | 82 </conditional> |
| 71 <when value="True"> | 83 <conditional name="timepoint_options"> |
| 72 <param name="timepoint" type="integer" value="0" label="Timepoint ID" /> | 84 <param name="extract" type="select" label="Extract timepoint"> |
| 73 </when> | 85 <option selected="True" value="False">All timepoints</option> |
| 74 </conditional> | 86 <option value="True">Extract timepoint</option> |
| 75 <conditional name="channel_options"> | 87 </param> |
| 76 <param name="extract" type="select" label="Extract channel" > | 88 <when value="False"></when> |
| 77 <option selected="True" value="False">All channels</option> | 89 <when value="True"> |
| 78 <option value="True">Extract channel</option> | 90 <param name="timepoint" type="integer" value="0" label="Timepoint ID" /> |
| 79 </param> | 91 </when> |
| 80 <when value="False"> </when> | 92 </conditional> |
| 81 <when value="True"> | 93 <conditional name="channel_options"> |
| 82 <param name="channel" type="integer" value="0" label="Channel id" /> | 94 <param name="extract" type="select" label="Extract channel" > |
| 83 </when> | 95 <option selected="True" value="False">All channels</option> |
| 84 </conditional> | 96 <option value="True">Extract channel</option> |
| 85 <conditional name="z_options"> | 97 </param> |
| 86 <param label="Extract z-slice" name="extract" type="select"> | 98 <when value="False"> </when> |
| 87 <option selected="True" value="False">All z-slices</option> | 99 <when value="True"> |
| 88 <option value="True">Extract z-slice</option> | 100 <param name="channel" type="integer" value="0" label="Channel id" /> |
| 89 </param> | 101 </when> |
| 90 <when value="False"> </when> | 102 </conditional> |
| 91 <when value="True"> | 103 <conditional name="z_options"> |
| 92 <param name="z" type="integer" value="0" label="Z-slice id" /> | 104 <param label="Extract z-slice" name="extract" type="select"> |
| 93 </when> | 105 <option selected="True" value="False">All z-slices</option> |
| 94 </conditional> | 106 <option value="True">Extract z-slice</option> |
| 95 <conditional name="range_options"> | 107 </param> |
| 96 <param label="Extract range" name="extract" type="select"> | 108 <when value="False"> </when> |
| 97 <option selected="True" value="False">All images</option> | 109 <when value="True"> |
| 98 <option value="True">Extract range by indicess (inclusive)</option> | 110 <param name="z" type="integer" value="0" label="Z-slice id" /> |
| 99 </param> | 111 </when> |
| 100 <when value="False"> </when> | 112 </conditional> |
| 101 <when value="True"> | 113 <conditional name="range_options"> |
| 102 <param name="range_lower" type="integer" value="0" label="Lower image id" /> | 114 <param label="Extract range" name="extract" type="select"> |
| 103 <param name="range_upper" type="integer" value="1" label="Upper image id" /> | 115 <option selected="True" value="False">All images</option> |
| 104 </when> | 116 <option value="True">Extract range by indicess (inclusive)</option> |
| 105 </conditional> | 117 </param> |
| 106 <conditional name="crop_options"> | 118 <when value="False"> </when> |
| 107 <param label="Extract crop" name="extract" type="select"> | 119 <when value="True"> |
| 108 <option selected="True" value="False">Full image</option> | 120 <param name="range_lower" type="integer" value="0" label="Lower image id" /> |
| 109 <option value="True">Extract crop</option> | 121 <param name="range_upper" type="integer" value="1" label="Upper image id" /> |
| 110 </param> | 122 </when> |
| 111 <when value="False"> </when> | 123 </conditional> |
| 112 <when value="True"> | 124 <conditional name="crop_options"> |
| 113 <param name="crop_x" type="integer" value="0" label="X" /> | 125 <param label="Extract crop" name="extract" type="select"> |
| 114 <param name="crop_y" type="integer" value="0" label="Y" /> | 126 <option selected="True" value="False">Full image</option> |
| 115 <param name="crop_width" type="integer" value="512" label="Width" /> | 127 <option value="True">Extract crop</option> |
| 116 <param name="crop_height" type="integer" value="512" label="height" /> | 128 </param> |
| 117 </when> | 129 <when value="False"> </when> |
| 118 </conditional> | 130 <when value="True"> |
| 119 <conditional name="tile_options"> | 131 <param name="crop_x" type="integer" value="0" label="X" /> |
| 120 <param label="Tile image" name="extract" type="select"> | 132 <param name="crop_y" type="integer" value="0" label="Y" /> |
| 121 <option selected="True" value="False">No tiling</option> | 133 <param name="crop_width" type="integer" value="512" label="Width" /> |
| 122 <option value="True">Tile image</option> | 134 <param name="crop_height" type="integer" value="512" label="height" /> |
| 123 </param> | 135 </when> |
| 124 <when value="False"> </when> | 136 </conditional> |
| 125 <when value="True"> | 137 <conditional name="tile_options"> |
| 126 <param name="tile_x" type="integer" value="512 " label="Tile width" /> | 138 <param label="Tile image" name="extract" type="select"> |
| 127 <param name="tile_y" type="integer" value="512 " label="Tile height" /> | 139 <option selected="True" value="False">No tiling</option> |
| 128 </when> | 140 <option value="True">Tile image</option> |
| 129 </conditional> | 141 </param> |
| 130 <conditional name="pyramid_options"> | 142 <when value="False"> </when> |
| 131 <param label="Pyramid image" name="generate" type="select" help="Pyramids will be generated only if the selected output format supports pyramids (OME TIFF, JPEG 2000)."><!-- see: https://docs.openmicroscopy.org/bio-formats/6.7.0/supported-formats.html --> | 143 <when value="True"> |
| 132 <option selected="True" value="True">Generate Pyramid</option> | 144 <param name="tile_x" type="integer" value="512 " label="Tile width" /> |
| 133 <option value="False">No Pyramid</option> | 145 <param name="tile_y" type="integer" value="512 " label="Tile height" /> |
| 134 </param> | 146 </when> |
| 135 <when value="True"> | 147 </conditional> |
| 136 <param name="pyramid_resolutions" type="integer" value="4" label="Pyramid Resolutions"/> | 148 <conditional name="pyramid_options"> |
| 137 <param name="pyramid_scale" type="integer" value="2" label="Pyramid Scale" /> | 149 <param label="Pyramid image" name="generate" type="select" help="Pyramids will be generated only if the selected output format supports pyramids (OME TIFF, JPEG 2000)."><!-- see: https://docs.openmicroscopy.org/bio-formats/6.7.0/supported-formats.html --> |
| 138 </when> | 150 <option selected="True" value="True">Generate Pyramid</option> |
| 139 <when value="False" /> | 151 <option value="False">No Pyramid</option> |
| 140 </conditional> | 152 </param> |
| 141 <param name="bigtiff" label="Big TIFF" type="boolean" checked="false" truevalue="-bigtiff" falsevalue=""/> | 153 <when value="True"> |
| 142 <param name="noflat" label="No Flatten" type="boolean" checked="true" truevalue="-noflat" falsevalue=""/> | 154 <param name="pyramid_resolutions" type="integer" value="4" label="Pyramid Resolutions"/> |
| 143 <param label="Compression" name="compression" type="select"> | 155 <param name="pyramid_scale" type="integer" value="2" label="Pyramid Scale" /> |
| 144 <option selected="True" value="False">No Compression</option> | 156 </when> |
| 145 <option value="LZW">LZW</option> | 157 <when value="False" /> |
| 146 <option value="JPEG-2000">JPEG-2000</option> | 158 </conditional> |
| 147 <option value="JPEG-2000 Lossy">JPEG-2000 Lossy</option> | 159 <param name="bigtiff" label="Big TIFF" type="boolean" checked="false" truevalue="-bigtiff" falsevalue=""/> |
| 148 <option value="JPEG">JPEG</option> | 160 <param name="noflat" label="No Flatten" type="boolean" checked="true" truevalue="-noflat" falsevalue=""/> |
| 149 <option value="zlib">zlib</option> | 161 <param label="Compression" name="compression" type="select"> |
| 150 </param> | 162 <option selected="True" value="False">No Compression</option> |
| 151 </inputs> | 163 <option value="LZW">LZW</option> |
| 152 <outputs> | 164 <option value="JPEG-2000">JPEG-2000</option> |
| 153 <data format="tiff" name="output" from_work_dir="result_image"> | 165 <option value="JPEG-2000 Lossy">JPEG-2000 Lossy</option> |
| 154 <change_format> | 166 <option value="JPEG">JPEG</option> |
| 155 <when input="out_format" value="tiff" format="tiff" /> | 167 <option value="zlib">zlib</option> |
| 156 <when input="out_format" value="png" format="png" /> | 168 </param> |
| 157 <when input="out_format" value="jpg" format="jpg" /> | 169 </inputs> |
| 158 <when input="out_format" value="ome.tiff" format="ome.tiff" /> | 170 <outputs> |
| 159 <when input="out_format" value="jp2" format="jpg" /> | 171 <data format="tiff" name="output" from_work_dir="result_image"> |
| 160 <when input="out_format" value="eps" format="eps" /> | 172 <change_format> |
| 161 <when input="out_format" value="avi" format="avi" /> | 173 <when input="out_format" value="tiff" format="tiff" /> |
| 162 </change_format> | 174 <when input="out_format" value="png" format="png" /> |
| 163 </data> | 175 <when input="out_format" value="jpg" format="jpg" /> |
| 164 </outputs> | 176 <when input="out_format" value="ome.tiff" format="ome.tiff" /> |
| 165 <tests> | 177 <when input="out_format" value="jp2" format="jpg" /> |
| 178 <when input="out_format" value="eps" format="eps" /> | |
| 179 <when input="out_format" value="avi" format="avi" /> | |
| 180 </change_format> | |
| 181 </data> | |
| 182 </outputs> | |
| 183 <tests> | |
| 166 <test> | 184 <test> |
| 167 <param name="input_file" value="input.png" /> | 185 <param name="input_file" value="input.png" /> |
| 168 <param name="out_format" value="tiff" /> | 186 <param name="out_format" value="tiff" /> |
| 169 <output name="output" value="res.tiff" ftype="tiff" compare="sim_size"/> | 187 <expand macro="tests/intensity_image_diff" name="output" value="res.tiff" ftype="tiff"/> |
| 170 </test> | 188 </test> |
| 171 <test> | 189 <test> |
| 172 <param name="input_file" value="input.png" /> | 190 <param name="input_file" value="input.png" /> |
| 173 <param name="out_format" value="ome.tiff" /> | 191 <param name="out_format" value="ome.tiff" /> |
| 174 <conditional name="pyramid_options"> | 192 <conditional name="pyramid_options"> |
| 175 <param name="generate" value="True"/> | 193 <param name="generate" value="True"/> |
| 176 <param name="pyramid_resolutions" value="4"/> | 194 <param name="pyramid_resolutions" value="4"/> |
| 177 <param name="pyramid_scale" value="2"/> | 195 <param name="pyramid_scale" value="2"/> |
| 178 </conditional> | 196 </conditional> |
| 179 <output name="output" value="res.ome.tiff" ftype="ome.tiff" compare="sim_size"/> | 197 <expand macro="tests/intensity_image_diff" name="output" value="res.ome.tiff" ftype="ome.tiff"/> |
| 180 </test> | 198 </test> |
| 181 <test> | 199 <test> |
| 182 <param name="input_file" value="input.tiff" /> | 200 <param name="input_file" value="input.tiff" /> |
| 183 <param name="out_format" value="png" /> | 201 <param name="out_format" value="png" /> |
| 184 <output name="output" value="input.tiff.png" ftype="png" compare="sim_size"/> | 202 <expand macro="tests/intensity_image_diff" name="output" value="input.tiff.png" ftype="png"/> |
| 185 </test> | 203 </test> |
| 186 </tests> | 204 </tests> |
| 187 <help> | 205 <help> |
| 188 **What it does** | 206 |
| 189 | 207 **Converts image format.** |
| 190 Universial image converter using bioformats. | 208 |
| 209 Universial image converter using bioformats. | |
| 210 | |
| 191 </help> | 211 </help> |
| 192 <citations> | 212 <citations> |
| 193 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> | 213 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> |
| 194 </citations> | 214 </citations> |
| 195 </tool> | 215 </tool> |
