<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.na-mic.org/w/index.php?action=history&amp;feed=atom&amp;title=CommandLineParsing</id>
	<title>CommandLineParsing - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.na-mic.org/w/index.php?action=history&amp;feed=atom&amp;title=CommandLineParsing"/>
	<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=CommandLineParsing&amp;action=history"/>
	<updated>2026-04-08T23:18:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=CommandLineParsing&amp;diff=3792&amp;oldid=prev</id>
		<title>Andy: Update from Wiki</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=CommandLineParsing&amp;diff=3792&amp;oldid=prev"/>
		<updated>2006-12-18T13:29:44Z</updated>

		<summary type="html">&lt;p&gt;Update from Wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Abstract ===&lt;br /&gt;
&lt;br /&gt;
The purpose of this proposal is to facilitate a &amp;quot;run-everywhere&amp;quot; philosophy for algorithm writers. If NAMIC adopts a standard for algorithm &amp;quot;self-description&amp;quot; that is followed when command line executables are written, Slicer, the grid, clusters, etc... should be able to use the executables directly in their environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Proposal ===&lt;br /&gt;
&lt;br /&gt;
If we adopt a standard XML description of the parameters to the algorithm, any application should be able to parse the XML and construct a GUI suitable for interaction with the software.&lt;br /&gt;
&lt;br /&gt;
Here is the an example of the proposed XML format, with suitable comments.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;executable class=&amp;quot;register&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Register3d&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;This registers and resamples two images&amp;lt;/description&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;parameters&amp;gt;&lt;br /&gt;
     &amp;lt;!-- a switch is a boolean flag, likely a checkbox.&lt;br /&gt;
          on the command line, name is the long version, flag is the&lt;br /&gt;
          one character version of the argument&lt;br /&gt;
          --&amp;gt;&lt;br /&gt;
     &amp;lt;switch name=&amp;quot;interpolate&amp;quot; flag=&amp;quot;i&amp;quot; default=&amp;quot;true&amp;quot; required=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;&lt;br /&gt;
     &amp;lt;/switch&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;!-- a value takes a single argument, may be required to be present&lt;br /&gt;
          and has a type.  In this case, the &amp;quot;metric&amp;quot; value is constrained to be&lt;br /&gt;
          one of the listed options below.  This should be represented by a&lt;br /&gt;
          group of radio buttons or drop down menu.&lt;br /&gt;
          --&amp;gt;&lt;br /&gt;
     &amp;lt;value name=&amp;quot;metric&amp;quot; flag=&amp;quot;m&amp;quot; default=&amp;quot;mattes&amp;quot; required=&amp;quot;false&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;&lt;br /&gt;
       &amp;lt;constraints&amp;gt;&lt;br /&gt;
         &amp;lt;list&amp;gt;&lt;br /&gt;
           &amp;lt;constraint&amp;gt;mattes&amp;lt;/constraint&amp;gt;&lt;br /&gt;
           &amp;lt;constraint&amp;gt;mi&amp;lt;/constraint&amp;gt;&lt;br /&gt;
           &amp;lt;constraint&amp;gt;normalizedcorrelation&amp;lt;/constraint&amp;gt;&lt;br /&gt;
         &amp;lt;/list&amp;gt;&lt;br /&gt;
       &amp;lt;/constraints&amp;gt;&lt;br /&gt;
     &amp;lt;/value&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;!-- an integer value with a range --&amp;gt;&lt;br /&gt;
     &amp;lt;value name=&amp;quot;threshold&amp;quot; flag=&amp;quot;t&amp;quot; type=&amp;quot;integer&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;constraints&amp;gt;&lt;br /&gt;
         &amp;lt;range minimum=&amp;quot;0&amp;quot; maximum=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/constraints&amp;gt;&lt;br /&gt;
     &amp;lt;/value&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;!-- a value argument that allow several instances of the argument to be specified.&lt;br /&gt;
          The values are appended to each other and returned in a vector.&lt;br /&gt;
          In the GUI, this could be a list of numbers in a string, or a&lt;br /&gt;
          dynamic list constructed by the user.&lt;br /&gt;
          --&amp;gt;&lt;br /&gt;
     &amp;lt;value name=&amp;quot;iterations&amp;quot; flag=&amp;quot;e&amp;quot; type=&amp;quot;iteration&amp;quot; allowrepeats=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;constraints&amp;gt;&lt;br /&gt;
         &amp;lt;range minimum=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/constraints&amp;gt;&lt;br /&gt;
     &amp;lt;/value&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;!-- xor specifies that only one of it's contained parameters&lt;br /&gt;
          be specified.  In this case, we want a file or url, but not&lt;br /&gt;
          both --&amp;gt;&lt;br /&gt;
     &amp;lt;xor&amp;gt;&lt;br /&gt;
       &amp;lt;value name=&amp;quot;file&amp;quot; flag=&amp;quot;f&amp;quot; type=&amp;quot;filename&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;value name=&amp;quot;url&amp;quot; flag=&amp;quot;u&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/xor&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;!-- unlabeledvalue do not have a flag associated with them, and are positional.&lt;br /&gt;
          In this case, we are looking for 3 filenames.&lt;br /&gt;
          --&amp;gt;&lt;br /&gt;
     &amp;lt;unlabeledvalue name=&amp;quot;fixedimage&amp;quot; position=&amp;quot;0&amp;quot; type=&amp;quot;filename&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;unlabeledvalue name=&amp;quot;movingimage&amp;quot; position=&amp;quot;1&amp;quot; type=&amp;quot;filename&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;unlabeledvalue name=&amp;quot;outputimage&amp;quot; position=&amp;quot;2&amp;quot; type=&amp;quot;filename&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/parameters&amp;gt;&lt;br /&gt;
 &amp;lt;/executable&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Related Work ===&lt;br /&gt;
&lt;br /&gt;
==== MetaCommand ====&lt;br /&gt;
&lt;br /&gt;
Julien Jomier and Stephen Aylward have added support for command line parsing to itk with the MetaCommand class (Utilities/MetaIO/metaCommand.{h,cxx}). It supports a -xml flag to output args in an xml syntax.&lt;br /&gt;
&lt;br /&gt;
==== Qt Designer XML Format ====&lt;br /&gt;
&lt;br /&gt;
Qt has an xml syntax for representing their GUI layouts. It's unclear if this tool could be used to design layouts used by other GUI packages.&lt;br /&gt;
&lt;br /&gt;
==== ParaView Server ====&lt;br /&gt;
&lt;br /&gt;
ParaView has a syntax to extend the GUI described [http://www.paraview.org/Wiki/ParaView:Extend on their wiki here].&lt;br /&gt;
&lt;br /&gt;
==== LONI Pipeline ====&lt;br /&gt;
&lt;br /&gt;
Parameters to executables are described in an XML file as part of the process of wrapping them for the pipeline.&lt;/div&gt;</summary>
		<author><name>Andy</name></author>
		
	</entry>
</feed>