<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthew.woehlke&amp;*</id>
	<title>Slicer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthew.woehlke&amp;*"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/wiki/Special:Contributions/Matthew.woehlke"/>
	<updated>2026-05-01T09:03:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/ExtensionsManager&amp;diff=38556</id>
		<title>Documentation/Nightly/SlicerApplication/ExtensionsManager</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/ExtensionsManager&amp;diff=38556"/>
		<updated>2014-07-23T17:15:24Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Extensions Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
3D Slicer now supports plug-ins which we call extensions.  Extensions are available from an extension server.  This allows end-users to select the extensions useful to them, without having to download the entire extension archive.&lt;br /&gt;
&lt;br /&gt;
= Extensions Manager =&lt;br /&gt;
&lt;br /&gt;
[[File:Extension_Manager.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
ExtensionsManager must be enabled in the Application Settings (menu item &amp;quot;Edit -&amp;gt; Application Settings -&amp;gt; Extensions&amp;quot;). If you changed the setting, Slicer has to be restarted for it to become effective.&lt;br /&gt;
[[Image:ExtensionsManager-enable.png|Enable ExtensionsManager]]&lt;br /&gt;
&lt;br /&gt;
== Installing an extension ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=230px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_0_ExtensionsManagerMenu.jpg|1. Open extensions manager&lt;br /&gt;
File:ExtensionsManager-4.1-Install_1a_extension_list.png|2. Choose an extension&lt;br /&gt;
File:ExtensionsManager-4.1-Install_1_extension_details.png|3. Look at extension details&lt;br /&gt;
File:ExtensionsManager-4.1-Install_2a_InstallButton.png.jpg|4. Click on &amp;quot;Install&amp;quot;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_2b_ExtensionInstalled_ManagerAndInstallWidget.jpg|5. Extension is installed&lt;br /&gt;
File:ExtensionsManager-4.1-Install_Restart.jpg|6. Restart Slicer&lt;br /&gt;
File:ExtensionsManager-4.1-Install_3_ExtensionAvailable.jpg|7. Extension is available&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing an extension without network connection ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=230px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_0_ExtensionsManagerMenu.jpg|1. Open extensions manager&lt;br /&gt;
File:TBD|2. Select 'Install from File' from the tools menu&lt;br /&gt;
File:TBD|3. Select a previously downloaded or othwerwise obtained extension archive&lt;br /&gt;
File:TBD|4. Extension is installed&lt;br /&gt;
File:TBD|5. Restart Slicer&lt;br /&gt;
File:ExtensionsManager-4.1-Install_3_ExtensionAvailable.jpg|6. Extension is available&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling an extension ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=230px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_0_ExtensionsManagerMenu.jpg|1. Open extensions manager&lt;br /&gt;
File:ExtensionsManager-4.1-Uninstall_1b_UninstallButton.jpg|2. Click on &amp;quot;Uninstall&amp;quot;&lt;br /&gt;
File:ExtensionsManager-4.1-Uninstall_2_ScheduledForUninstall.jpg|3. Extension is scheduled for uninstall&lt;br /&gt;
File:ExtensionsManager-4.1-Uninstall_3_Restart.jpg|4. Restart Slicer&lt;br /&gt;
File:ExtensionsManager-4.1-Uninstall_4_ExtensionUninstalled.png| 5. Extension has been uninstalled&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disabling an extension ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=230px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_0_ExtensionsManagerMenu.jpg|1. Open extensions manager&lt;br /&gt;
File:ExtensionsManager-4.1-Disable_1.png|2. Disable extension&lt;br /&gt;
File:ExtensionsManager-4.1-Disable_2.png|3. Restart Slicer&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Incompatible extensions ==&lt;br /&gt;
&lt;br /&gt;
'''Caveat''': Considering that installed extensions are common to all Slicer version installed by a given user and that an extension is specific to a given revision of Slicer, it's currently not possible to have working extension installed for multiple version of Slicer. The issues has been reported as #[http://www.na-mic.org/Bug/view.php?id=1958 1958] and is currently targeted for 4.2.0 release.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=120px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-IncompatibleExtension.jpg| Incompatible extension has been identified&lt;br /&gt;
File:ExtensionsManager-4.1-IncompatibleExtension_ErrorLogMessage.png | Error log message&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extensions Manager Settings ==&lt;br /&gt;
&lt;br /&gt;
=== Extensions settings ===&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;gallery widths=400px heights=230px perrow=1&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-UnderTheHood_1_ExtensionsSettings.png|Extensions settings&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
# Extensions server URL: Address of the server used to download and install extensions&lt;br /&gt;
# Extensions installation path: Directory where extension packages should be extracted and installed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Module settings ===&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;gallery widths=400px heights=230px perrow=1&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-UnderTheHood_2_ModulesSettings.png|Module settings&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
|| &lt;br /&gt;
# After installing an extension, the directories containing the modules bundled within an extension will be visible as additional module paths.&lt;br /&gt;
# Modules associated with an extension can also be disabled one by one.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Launcher settings ===&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;gallery widths=400px heights=230px perrow=1&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-UnderTheHood_3_LauncherSettings.png|Launcher settings&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
Whereas the module path is used to indicate Slicer where to look to load additional modules, the extension manager also takes care of updating the &amp;lt;code&amp;gt;LibraryPaths&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Paths&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;EnvironmentVariables&amp;lt;/code&amp;gt; in the launcher settings so that libraries associated with modules can be successfully loaded.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/{{documentation/version}}/FAQ/Extensions|Extensions}}&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/ExtensionsManager&amp;diff=38555</id>
		<title>Documentation/Nightly/SlicerApplication/ExtensionsManager</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/ExtensionsManager&amp;diff=38555"/>
		<updated>2014-07-23T17:12:46Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Installing an extension without network connection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
3D Slicer now supports plug-ins which we call extensions.  Extensions are available from an extension server.  This allows end-users to select the extensions useful to them, without having to download the entire extension archive.&lt;br /&gt;
&lt;br /&gt;
= Extensions Manager =&lt;br /&gt;
&lt;br /&gt;
[[File:Extension_Manager.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
ExtensionsManager must be enabled in the Application Settings (menu item &amp;quot;Edit -&amp;gt; Application Settings -&amp;gt; Extensions&amp;quot;). If you changed the setting, Slicer has to be restarted for it to become effective.&lt;br /&gt;
[[Image:ExtensionsManager-enable.png|Enable ExtensionsManager]]&lt;br /&gt;
&lt;br /&gt;
== Installing an extension ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=230px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_0_ExtensionsManagerMenu.jpg|1. Open extensions manager&lt;br /&gt;
File:ExtensionsManager-4.1-Install_1a_extension_list.png|2. Choose an extension&lt;br /&gt;
File:ExtensionsManager-4.1-Install_1_extension_details.png|3. Look at extension details&lt;br /&gt;
File:ExtensionsManager-4.1-Install_2a_InstallButton.png.jpg|4. Click on &amp;quot;Install&amp;quot;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_2b_ExtensionInstalled_ManagerAndInstallWidget.jpg|5. Extension is installed&lt;br /&gt;
File:ExtensionsManager-4.1-Install_Restart.jpg|6. Restart Slicer&lt;br /&gt;
File:ExtensionsManager-4.1-Install_3_ExtensionAvailable.jpg|7. Extension is available&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing an extension without network connection ==&lt;br /&gt;
&lt;br /&gt;
== Installing an extension ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=230px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_0_ExtensionsManagerMenu.jpg|1. Open extensions manager&lt;br /&gt;
File:TBD|2. Select 'Install from File' from the tools menu&lt;br /&gt;
File:TBD|3. Select a previously downloaded or othwerwise obtained extension archive&lt;br /&gt;
File:TBD|4. Extension is installed&lt;br /&gt;
File:TBD|5. Restart Slicer&lt;br /&gt;
File:ExtensionsManager-4.1-Install_3_ExtensionAvailable.jpg|6. Extension is available&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling an extension ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=230px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_0_ExtensionsManagerMenu.jpg|1. Open extensions manager&lt;br /&gt;
File:ExtensionsManager-4.1-Uninstall_1b_UninstallButton.jpg|2. Click on &amp;quot;Uninstall&amp;quot;&lt;br /&gt;
File:ExtensionsManager-4.1-Uninstall_2_ScheduledForUninstall.jpg|3. Extension is scheduled for uninstall&lt;br /&gt;
File:ExtensionsManager-4.1-Uninstall_3_Restart.jpg|4. Restart Slicer&lt;br /&gt;
File:ExtensionsManager-4.1-Uninstall_4_ExtensionUninstalled.png| 5. Extension has been uninstalled&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disabling an extension ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=230px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-Install_0_ExtensionsManagerMenu.jpg|1. Open extensions manager&lt;br /&gt;
File:ExtensionsManager-4.1-Disable_1.png|2. Disable extension&lt;br /&gt;
File:ExtensionsManager-4.1-Disable_2.png|3. Restart Slicer&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Incompatible extensions ==&lt;br /&gt;
&lt;br /&gt;
'''Caveat''': Considering that installed extensions are common to all Slicer version installed by a given user and that an extension is specific to a given revision of Slicer, it's currently not possible to have working extension installed for multiple version of Slicer. The issues has been reported as #[http://www.na-mic.org/Bug/view.php?id=1958 1958] and is currently targeted for 4.2.0 release.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=230px heights=120px perrow=4&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-IncompatibleExtension.jpg| Incompatible extension has been identified&lt;br /&gt;
File:ExtensionsManager-4.1-IncompatibleExtension_ErrorLogMessage.png | Error log message&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extensions Manager Settings ==&lt;br /&gt;
&lt;br /&gt;
=== Extensions settings ===&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;gallery widths=400px heights=230px perrow=1&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-UnderTheHood_1_ExtensionsSettings.png|Extensions settings&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
# Extensions server URL: Address of the server used to download and install extensions&lt;br /&gt;
# Extensions installation path: Directory where extension packages should be extracted and installed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Module settings ===&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;gallery widths=400px heights=230px perrow=1&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-UnderTheHood_2_ModulesSettings.png|Module settings&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
|| &lt;br /&gt;
# After installing an extension, the directories containing the modules bundled within an extension will be visible as additional module paths.&lt;br /&gt;
# Modules associated with an extension can also be disabled one by one.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Launcher settings ===&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;gallery widths=400px heights=230px perrow=1&amp;gt;&lt;br /&gt;
File:ExtensionsManager-4.1-UnderTheHood_3_LauncherSettings.png|Launcher settings&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
Whereas the module path is used to indicate Slicer where to look to load additional modules, the extension manager also takes care of updating the &amp;lt;code&amp;gt;LibraryPaths&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Paths&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;EnvironmentVariables&amp;lt;/code&amp;gt; in the launcher settings so that libraries associated with modules can be successfully loaded.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/{{documentation/version}}/FAQ/Extensions|Extensions}}&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=38194</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=38194"/>
		<updated>2014-06-17T16:56:57Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Requirements */ update wording, external links for improved consistency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
If you already have git (or won't be using the operations that require git), the easiest way to let the Slicer superbuild build its own Python, which will also build the various required Python packages. For full functionality, you will also need [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows) and (to work with extensions using svn repositories) [https://subversion.apache.org/ subversion] &amp;amp;ge; 1.7.0.&lt;br /&gt;
&lt;br /&gt;
If you want to use your own (e.g. system) Python, you will need:&lt;br /&gt;
&lt;br /&gt;
* '''For all operations:'''&lt;br /&gt;
** [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;)&lt;br /&gt;
* '''For full functionality:'''&lt;br /&gt;
** [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
** [https://subversion.apache.org/ subversion] &amp;amp;ge; 1.7.0&lt;br /&gt;
** [https://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
** [https://github.com/jacquev6/PyGithub PyGithub] = v1&lt;br /&gt;
** [https://github.com/chardet/chardet chardet]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
=== Invoking the Wizard ===&lt;br /&gt;
&lt;br /&gt;
In your favorite terminal program running a POSIX-compliant shell (on Windows, &amp;quot;git bash&amp;quot; is strongly recommended), run:&lt;br /&gt;
&lt;br /&gt;
 /path/to/slicer/bin/slicerExtensionWizard&lt;br /&gt;
&lt;br /&gt;
...replacing '&amp;lt;code&amp;gt;/path/to/slicer&amp;lt;/code&amp;gt;' with the (relative or absolute) path to your Slicer build or install.&lt;br /&gt;
&lt;br /&gt;
{{notice|You can also add '&amp;lt;code&amp;gt;''/path/to/slicer''/bin&amp;lt;/code&amp;gt;' to your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;. For the sake of brevity, we'll assume that you've done so for the remainder of this document.}}&lt;br /&gt;
&lt;br /&gt;
The launcher script will ensure that your Python and library paths are set correctly to find packages and libraries that are provided by Slicer, and will invoke the correct Python binary if provided by Slicer.&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 slicerExtensionWizard --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 slicerExtensionWizard --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 slicerExtensionWizard --addModule loadable:MyCppModule&lt;br /&gt;
 slicerExtensionWizard --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 slicerExtensionWizard --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 slicerExtensionWizard --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
More detailed information about the various module types in Slicer can be found [[Documentation/{{documentation/version}}/Developers/Modules|here]].&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 slicerExtensionWizard --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 slicerExtensionWizard --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy:&lt;br /&gt;
&lt;br /&gt;
 # Make a copy of an existing module in the same extension&lt;br /&gt;
 slicerExtensionWizard --templatePath modules=~/code/MyExtension \&lt;br /&gt;
                       --templateKey ModuleOne=ModuleOne \&lt;br /&gt;
                       --addModule ModuleOne:ModuleTwo \&lt;br /&gt;
                       ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
Here is a simple recipe that will work in many cases (assumes you are on not-Windows or using the git-msys shell):&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # You may also want to pass '-G &amp;quot;&amp;amp;lt;generator&amp;amp;gt;&amp;quot;' here (required on Windows)&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
{{notice|If the above leaves you scratching your head, don't worry; the default behavior if you haven't configured anything else is simply to prompt you for your user name and password. Setting up either a password manager or credential caching is recommended however, as some operations may otherwise require you to provide your password more than once.}}&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 slicerExtensionWizard --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 slicerExtensionWizard --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 slicerExtensionWizard --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=38141</id>
		<title>Documentation/Nightly/Developers/Style Guide</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=38141"/>
		<updated>2014-06-09T18:44:26Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
= Code style =&lt;br /&gt;
&lt;br /&gt;
'''Code that inherits from VTK classes should follow VTK coding conventions for naming, indentation, etc.''' See http://www.vtk.org/Wiki/VTK_Coding_Standards for details.&lt;br /&gt;
&lt;br /&gt;
== Naming ==&lt;br /&gt;
&lt;br /&gt;
# Acronyms should be written with the same case for each letter (all uppercase or all lowercase).&lt;br /&gt;
#: ''RASToSlice'' not ''RasToSlice''&lt;br /&gt;
#: ''vtkMRML'' not ''vtkMrml''&lt;br /&gt;
#: ''vtkSlicer'' not ''vTKSlicer''&lt;br /&gt;
# Words should be spelled out and not abreviated&lt;br /&gt;
#: ''GetWindow'' not ''GetWin''&lt;br /&gt;
# File names must follow the [http://en.wikipedia.org/wiki/CamelCase Camel case] convention&lt;br /&gt;
#: ''TestMyFeature.cxx'' not ''Test-My_Feature.cxx''&lt;br /&gt;
# Use US English words and spelling&lt;br /&gt;
#: &amp;quot;Millimeter&amp;quot; not &amp;quot;Millimetre&amp;quot;&lt;br /&gt;
#: &amp;quot;Color&amp;quot; not &amp;quot;Colour&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
&lt;br /&gt;
# include extensive comments in the header files&lt;br /&gt;
# keep the comments up to date as the code changes&lt;br /&gt;
# use the keyword &amp;lt;code&amp;gt;\todo&amp;lt;/code&amp;gt; to flag spots in the code that need to be revisited&lt;br /&gt;
# do not leave blocks of commented out code in the source file -- if needed insert links to prior svn versions as comments&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
# Don't mix different levels of abstraction&lt;br /&gt;
#: Examples:&lt;br /&gt;
#:: When dealing with files names and path, use [http://vtk.org/gitweb?p=VTK.git;a=blob;f=Utilities/KWSys/vtksys/SystemTools.hxx.in;h=04f197842695c5914d1a49d4738159d3bccb08e8;hb=HEAD kwsys::SystemTools] in VTK classes, [http://doc.qt.nokia.com/{{documentation/{{documentation/version}}/qtversion}}/qfileinfo.html QFileInfo]/[http://doc.qt.nokia.com/{{documentation/{{documentation/version}}/qtversion}}/qdir.html QDir] in Qt classes or [http://docs.python.org/library/os.path.html os.path] in python. Instead of doing string manipulation manually:&lt;br /&gt;
#:::&amp;lt;code&amp;gt;QString filePath = directoryPath + &amp;quot;/&amp;quot; + fileName + &amp;quot;.exe&amp;quot;&amp;lt;/code&amp;gt;)&lt;br /&gt;
#:: prefer instead:&lt;br /&gt;
#:::&amp;lt;code&amp;gt;SystemTools::JoinPath(), SystemTools::GetFilenameName()...&amp;lt;/code&amp;gt;&lt;br /&gt;
#:::&amp;lt;code&amp;gt;QFileInfo(QDir directory, QString fileName), QFileInfo::suffix(), QFileInfo::absoluteFilePath()...&amp;lt;/code&amp;gt;&lt;br /&gt;
#:::&amp;lt;code&amp;gt;os.path.join(), os.path.splitext(), os.path.abspath()...&amp;lt;/code&amp;gt;&lt;br /&gt;
#: References:&lt;br /&gt;
#:* [http://www.amazon.com/gp/product/0132350882?ie=UTF8&amp;amp;tag=solisyntprog-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0132350882 Clean Code] from ''Robert C. Martin'': ''Mixing levels of abstraction within a function is always confusing. Readers may not be able to tell whether a particular expression is an essential concept or a detail. Worse, like broken windows, once details are mixed with essential concepts, more and more details tend to accrete within the functions.''&lt;br /&gt;
#:* http://zuskin.com/coding_habits__functions.htm#Abstraction_levels&lt;br /&gt;
# Use STL where you can, but follow the VTK [http://www.vtk.org/Wiki/VTK_FAQ#Can_I_use_STL_with_VTK.3F guidelines]&lt;br /&gt;
## However, prefer [http://doc.qt.nokia.com/{{documentation/{{documentation/version}}/qtversion}}/containers.html Qt Container classes] to STL classes in Qt files&lt;br /&gt;
## Note that a [http://www.vtk.org/doc/nightly/html/classvtkCollection.html vtkCollection] is somewhat equivalent to &amp;lt;code&amp;gt;std::list&amp;lt;vtkSmartPointer&amp;lt;vtkObject*&amp;gt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Layout ==&lt;br /&gt;
=== Includes ===&lt;br /&gt;
# Only include the necessary files, no more.&lt;br /&gt;
# Group includes per library&lt;br /&gt;
# Alphabetically sort files within groups&lt;br /&gt;
# Order groups from local to global&lt;br /&gt;
#: e.g. Module then MRML then CTK then Qt then VTK then ITK then STL &lt;br /&gt;
# Implementation files should include the header files first&lt;br /&gt;
For example:&lt;br /&gt;
 // header&lt;br /&gt;
 // ...&lt;br /&gt;
 // end header&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;quot;qSlicerMyModule.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // MyModule includes&lt;br /&gt;
 #include &amp;quot;qSlicerMyModuleWidget.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkSlicerMyModuleLogic.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // MRML includes&lt;br /&gt;
 #include &amp;quot;vtkMRMLScene.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // Qt includes&lt;br /&gt;
 #include &amp;lt;QDialog&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 // VTK includes&lt;br /&gt;
 #include &amp;lt;vtkSmartPointer.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 // STD includes&lt;br /&gt;
 #include &amp;lt;vector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Language Specific ==&lt;br /&gt;
&lt;br /&gt;
# [[Documentation/{{documentation/version}}/Developers/Style Guide/Cpp | C++]]&lt;br /&gt;
# [[Documentation/{{documentation/version}}/Developers/Style Guide/Python | Python]]&lt;br /&gt;
# [[Documentation/{{documentation/version}}/Developers/Style Guide/CMake | CMake]]&lt;br /&gt;
&lt;br /&gt;
== Library Dependencies ==&lt;br /&gt;
&lt;br /&gt;
# MRML classes should only depend on vtk and itk (not Slicer Logic or Qt)&lt;br /&gt;
# Logic classes depend on MRML to store state&lt;br /&gt;
# Logic classes should encapsulate vtk and itk pipelines to accomplish specific slicer tasks (such as resampling volumes for display)&lt;br /&gt;
# GUI classes can depend on MRML and Logic and Qt&lt;br /&gt;
&lt;br /&gt;
== Development Practices ==&lt;br /&gt;
&lt;br /&gt;
# While developing code, enable VTK_DEBUG_LEAKS (ON by default) in your vtk build and be sure to clean up any leaks that arise from your contributions.&lt;br /&gt;
&lt;br /&gt;
== Coordinate Systems ==&lt;br /&gt;
&lt;br /&gt;
# World space for 3D Views is in RAS (Right Anterior Superior) space. See [[Coordinate systems]].&lt;br /&gt;
# All units are expressed in Millimeters (mm)&lt;br /&gt;
&lt;br /&gt;
== Error and warning messages ==&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
The ITK, VTK, Qt, std::cout, std::cerr .. all appear in the error log and can easily be filtered according to their type (debug/warning/error). &lt;br /&gt;
&lt;br /&gt;
* '''Errors''': Error should be used to signal something that should not happen. They usually mean that the execution of the current function/code should be stopped.&lt;br /&gt;
* '''Warnings''': Warning should be used to signal potentially dangerous behavior. Also consider using these in deprecated methods to warn your fellow developers.&lt;br /&gt;
* '''Debugs''': For general debug and developer aimed information, one can use the debug messages.&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;right&amp;quot;|&lt;br /&gt;
|[[Image: Slicer4ErrorLog.jpg|thumb|200px| Error log in Slicer 4]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* In Qt-based classes:&lt;br /&gt;
** For error messages, use [http://qt-project.org/doc/qt-4.8/qtglobal.html#qCritical qCritical()]. &lt;br /&gt;
  if (somethingWrongHappened)&lt;br /&gt;
    {&lt;br /&gt;
    qCritical() &amp;lt;&amp;lt; &amp;quot;I encountered an error&amp;quot;;&lt;br /&gt;
    return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
:* For warnings, use [http://qt-project.org/doc/qt-4.8/qtglobal.html#qWarning qWarning()]. &lt;br /&gt;
  qWarning() &amp;lt;&amp;lt; &amp;quot;Be careful here, this is dangerous&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
:* For debug, use [http://qt-project.org/doc/qt-4.8/qtglobal.html#qDebug qDebug()]:&lt;br /&gt;
  qDebug() &amp;lt;&amp;lt; &amp;quot;This variable has the value: &amp;quot;&amp;lt;&amp;lt; value;&lt;br /&gt;
&lt;br /&gt;
* In VTK-based classes:&lt;br /&gt;
** For error messages, use [http://www.vtk.org/doc/release/3/html/vtkSetGet_8h.html vtkErrorMacro()]. &lt;br /&gt;
  if (somethingWrongHappened)&lt;br /&gt;
    {&lt;br /&gt;
    vtkErrorMacro(&amp;quot;I encountered an error&amp;quot;);&lt;br /&gt;
    return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
:* For warnings, use [http://www.vtk.org/doc/release/3/html/vtkSetGet_8h.html vtkWarningMacro()]. &lt;br /&gt;
  vtkWarningMacro(&amp;quot;Be careful here, this is dangerous&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
:* For debug, use [http://www.vtk.org/doc/release/3/html/vtkSetGet_8h.html vtkDebugMacro()]:&lt;br /&gt;
  vtkDebugMacro(&amp;quot;This variable has the value: &amp;quot;&amp;lt;&amp;lt; value);&lt;br /&gt;
&lt;br /&gt;
== Misc. ==&lt;br /&gt;
# No more than 80 characters per line&lt;br /&gt;
&lt;br /&gt;
= Commits =&lt;br /&gt;
==Summary==&lt;br /&gt;
#Prefix the commit message title with &amp;quot;BUG:&amp;quot;,&amp;quot;ENH:&amp;quot;,&amp;quot;COMP:&amp;quot;, &amp;quot;STYLE:&amp;quot;. Note the ':' (colon) character.&lt;br /&gt;
#Explain in the commit message title the &amp;quot;impact of the commit to the user&amp;quot;&lt;br /&gt;
#Add in the commit message body the Mantis issue number prefixed by '#' (pound) character. &lt;br /&gt;
&lt;br /&gt;
==Commit message prefix==&lt;br /&gt;
Subversion Commits to Slicer require commit type in the comment.&lt;br /&gt;
&lt;br /&gt;
Valid commit types are:&lt;br /&gt;
   BUG:   - a change made to fix a runtime issue&lt;br /&gt;
            (crash, segmentation fault, exception, or incorrect result,&lt;br /&gt;
   COMP:  - a fix for a compilation issue, error or warning,&lt;br /&gt;
   ENH:   - new functionality added to the project,&lt;br /&gt;
   PERF:  - a performance improvement,&lt;br /&gt;
   STYLE: - a change that does not impact the logic or execution of the code.&lt;br /&gt;
            (improve coding style, comments, documentation).&lt;br /&gt;
Note that the ':'(colon) directly follows the commit tag. For example, it is: &amp;quot;STYLE:&amp;quot; not &amp;quot;STYLE :&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Subversion command to commit the change is:&lt;br /&gt;
  svn commit -m &amp;quot;BUG: fixed core dump when passed float data&amp;quot; filename1[, filename2, ...]&lt;br /&gt;
&lt;br /&gt;
By using the &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; command line option, it's not possible to submit a message having multiple line.&lt;br /&gt;
Submitting a mutli-line message can be achieved using the &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt; option:&lt;br /&gt;
  svn commit -f /path/to/message filename1[, filename2, ...]&lt;br /&gt;
&lt;br /&gt;
It's also possible to set the environment variable [http://www.google.com/search?q=SVN_EDITOR|&amp;lt;code&amp;gt;SVN_EDITOR&amp;lt;/code&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==Message content== &lt;br /&gt;
# A good commit message title (first line) should '''explain what the commit does for the user, not ''how'' it is done'''. ''How'' can be explained in the body of the commit message (if looking at the code of the commit is not self explanatory enough).&lt;br /&gt;
#: Examples:&lt;br /&gt;
#:* Bad: &amp;lt;code&amp;gt;BUG: Check pointer validity before dereferencing&amp;lt;/code&amp;gt; -&amp;gt; ''implementation detail'', ''self-explanatory'' (by looking at the code)&lt;br /&gt;
#:* Good: &amp;lt;code&amp;gt;BUG: Fix crash in Module X when clicking Apply button&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* Bad: &amp;lt;code&amp;gt;ENH: More work in qSlicerXModuleWidget&amp;lt;/code&amp;gt; -&amp;gt; &amp;lt;code&amp;gt;more work&amp;lt;/code&amp;gt; is ''too vague'', &amp;lt;code&amp;gt;qSlicerXModuleWidget&amp;lt;/code&amp;gt; is too ''low level'' &lt;br /&gt;
#:* Good: &amp;lt;code&amp;gt;ENH: Add float image outputs in module X&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* Bad: &amp;lt;code&amp;gt;COMP: Typo in cmake variable&amp;lt;/code&amp;gt; -&amp;gt; ''implementation detail'', ''self-explanatory''&lt;br /&gt;
#:* Good: &amp;lt;code&amp;gt;COMP: Fix compilation error with Numpy on Visual Studio&amp;lt;/code&amp;gt;&lt;br /&gt;
# If the commit is related to a [http://na-mic.org/Mantis/view_all_bug_page.php mantis issue] (bug or feature request), you can mention it in the commit message body by preceding the issue number with a '''#'''(pound) character:&lt;br /&gt;
 BUG: Fix crash in Volume Rendering module when switching view layout&lt;br /&gt;
 &lt;br /&gt;
 vtkSetAndObserveMRMLNodeEventsMacro can't be used for observing all types of vtkObjects,&lt;br /&gt;
 only vtkMRMLNode is expected by vtkMRMLAbstractLogic::OnMRMLNodeModified(...) &lt;br /&gt;
 Closes #1641&lt;br /&gt;
Where &amp;lt;code&amp;gt;1641&amp;lt;/code&amp;gt; refers to the [http://www.na-mic.org/Bug/view.php?id=1641 issue number] in mantis.&lt;br /&gt;
&lt;br /&gt;
# Notice the empty 2nd line.&lt;br /&gt;
&lt;br /&gt;
==Importing changes from external project/repository==&lt;br /&gt;
When you update the git tag or svn revision of any external project, explicit in the commit message what the update does instead of just mentioning that an update in made.&lt;br /&gt;
&lt;br /&gt;
This will avoid having a Slicer commit history made of ineligible messages:&lt;br /&gt;
 r19180 - ENH: Update git tag&lt;br /&gt;
 r19181 - BUG: Update svn revision&lt;br /&gt;
 r19182 - ENH: revision updated&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Ideally it should be the same message than the commit(s) in the external repository. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;ENH: Add feature A in module X&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ENH: Update git tag&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
http://www.na-mic.org/Wiki/index.php/Engineering:Subversion_Repository&lt;br /&gt;
&lt;br /&gt;
http://www.slicer.org/slicerWiki/index.php/Slicer:git-svn&lt;br /&gt;
&lt;br /&gt;
= UI Design Guidelines =&lt;br /&gt;
{{:Documentation/{{documentation/version}}/Developers/Style Guide/UI}}&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
In VTK classes:&lt;br /&gt;
* vtkErrorMacro(&amp;quot;vtkMRMLClipModelsNode:: Invalid Clip Type&amp;quot;);&lt;br /&gt;
* vtkWarningMacro(&amp;quot;Model &amp;quot; &amp;lt;&amp;lt; modelNode-&amp;gt;GetName() &amp;lt;&amp;lt; &amp;quot;'s display node is null\n&amp;quot;);&lt;br /&gt;
* vtkDebugMacro(&amp;quot;CreateWidget: found a glyph type already defined for this node: &amp;quot; &amp;lt;&amp;lt; iter-&amp;gt;second);&lt;br /&gt;
&lt;br /&gt;
In QT classes:&lt;br /&gt;
* qCritical() &amp;lt;&amp;lt; &amp;quot;qSlicerUtils::setPermissionsRecursively: Failed to set permissions on file&amp;quot; &amp;lt;&amp;lt; info.filePath();&lt;br /&gt;
* qWarning() &amp;lt;&amp;lt; &amp;quot;qSlicerIOManager::openScreenshotDialog: Unable to get Annotations module (annotations), using the CTK screen shot dialog.&amp;quot;;&lt;br /&gt;
* qDebug() &amp;lt;&amp;lt; &amp;quot;qMRMLSceneFactoryWidget::deleteNode(&amp;quot; &amp;lt;&amp;lt;className &amp;lt;&amp;lt;&amp;quot;) no node&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
= Wiki =&lt;br /&gt;
&lt;br /&gt;
* Prefer to follow [http://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_(capitalization) Wikipedia conventions] for page naming: ''For multiword page titles, leave the second and subsequent words in lowercase unless the title phrase is a proper noun that would always occur capitalized, even in the middle of a sentence''.&lt;br /&gt;
* Versioned pages should include '&amp;lt;nowiki&amp;gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&amp;lt;/nowiki&amp;gt;' at the very beginning.&lt;br /&gt;
** FAQ pages should also have (immediately after the above): '&amp;lt;nowiki&amp;gt;&amp;lt;noinclude&amp;gt;__TOC__={{#titleparts: {{PAGENAME}} | | -1 }}=&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;='''&amp;lt;/nowiki&amp;gt;''name of parent FAQ''&amp;lt;nowiki&amp;gt;: {{{1}}}'''=&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt; (be sure to replace &amp;quot;''name of parent FAQ''&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=38140</id>
		<title>Documentation/Nightly/Developers/Style Guide</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=38140"/>
		<updated>2014-06-09T18:37:24Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: add wiki style section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
= Code style =&lt;br /&gt;
&lt;br /&gt;
'''Code that inherits from VTK classes should follow VTK coding conventions for naming, indentation, etc.''' See http://www.vtk.org/Wiki/VTK_Coding_Standards for details.&lt;br /&gt;
&lt;br /&gt;
== Naming ==&lt;br /&gt;
&lt;br /&gt;
# Acronyms should be written with the same case for each letter (all uppercase or all lowercase).&lt;br /&gt;
#: ''RASToSlice'' not ''RasToSlice''&lt;br /&gt;
#: ''vtkMRML'' not ''vtkMrml''&lt;br /&gt;
#: ''vtkSlicer'' not ''vTKSlicer''&lt;br /&gt;
# Words should be spelled out and not abreviated&lt;br /&gt;
#: ''GetWindow'' not ''GetWin''&lt;br /&gt;
# File names must follow the [http://en.wikipedia.org/wiki/CamelCase Camel case] convention&lt;br /&gt;
#: ''TestMyFeature.cxx'' not ''Test-My_Feature.cxx''&lt;br /&gt;
# Use US English words and spelling&lt;br /&gt;
#: &amp;quot;Millimeter&amp;quot; not &amp;quot;Millimetre&amp;quot;&lt;br /&gt;
#: &amp;quot;Color&amp;quot; not &amp;quot;Colour&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
&lt;br /&gt;
# include extensive comments in the header files&lt;br /&gt;
# keep the comments up to date as the code changes&lt;br /&gt;
# use the keyword &amp;lt;code&amp;gt;\todo&amp;lt;/code&amp;gt; to flag spots in the code that need to be revisited&lt;br /&gt;
# do not leave blocks of commented out code in the source file -- if needed insert links to prior svn versions as comments&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
# Don't mix different levels of abstraction&lt;br /&gt;
#: Examples:&lt;br /&gt;
#:: When dealing with files names and path, use [http://vtk.org/gitweb?p=VTK.git;a=blob;f=Utilities/KWSys/vtksys/SystemTools.hxx.in;h=04f197842695c5914d1a49d4738159d3bccb08e8;hb=HEAD kwsys::SystemTools] in VTK classes, [http://doc.qt.nokia.com/{{documentation/{{documentation/version}}/qtversion}}/qfileinfo.html QFileInfo]/[http://doc.qt.nokia.com/{{documentation/{{documentation/version}}/qtversion}}/qdir.html QDir] in Qt classes or [http://docs.python.org/library/os.path.html os.path] in python. Instead of doing string manipulation manually:&lt;br /&gt;
#:::&amp;lt;code&amp;gt;QString filePath = directoryPath + &amp;quot;/&amp;quot; + fileName + &amp;quot;.exe&amp;quot;&amp;lt;/code&amp;gt;)&lt;br /&gt;
#:: prefer instead:&lt;br /&gt;
#:::&amp;lt;code&amp;gt;SystemTools::JoinPath(), SystemTools::GetFilenameName()...&amp;lt;/code&amp;gt;&lt;br /&gt;
#:::&amp;lt;code&amp;gt;QFileInfo(QDir directory, QString fileName), QFileInfo::suffix(), QFileInfo::absoluteFilePath()...&amp;lt;/code&amp;gt;&lt;br /&gt;
#:::&amp;lt;code&amp;gt;os.path.join(), os.path.splitext(), os.path.abspath()...&amp;lt;/code&amp;gt;&lt;br /&gt;
#: References:&lt;br /&gt;
#:* [http://www.amazon.com/gp/product/0132350882?ie=UTF8&amp;amp;tag=solisyntprog-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0132350882 Clean Code] from ''Robert C. Martin'': ''Mixing levels of abstraction within a function is always confusing. Readers may not be able to tell whether a particular expression is an essential concept or a detail. Worse, like broken windows, once details are mixed with essential concepts, more and more details tend to accrete within the functions.''&lt;br /&gt;
#:* http://zuskin.com/coding_habits__functions.htm#Abstraction_levels&lt;br /&gt;
# Use STL where you can, but follow the VTK [http://www.vtk.org/Wiki/VTK_FAQ#Can_I_use_STL_with_VTK.3F guidelines]&lt;br /&gt;
## However, prefer [http://doc.qt.nokia.com/{{documentation/{{documentation/version}}/qtversion}}/containers.html Qt Container classes] to STL classes in Qt files&lt;br /&gt;
## Note that a [http://www.vtk.org/doc/nightly/html/classvtkCollection.html vtkCollection] is somewhat equivalent to &amp;lt;code&amp;gt;std::list&amp;lt;vtkSmartPointer&amp;lt;vtkObject*&amp;gt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Layout ==&lt;br /&gt;
=== Includes ===&lt;br /&gt;
# Only include the necessary files, no more.&lt;br /&gt;
# Group includes per library&lt;br /&gt;
# Alphabetically sort files within groups&lt;br /&gt;
# Order groups from local to global&lt;br /&gt;
#: e.g. Module then MRML then CTK then Qt then VTK then ITK then STL &lt;br /&gt;
# Implementation files should include the header files first&lt;br /&gt;
For example:&lt;br /&gt;
 // header&lt;br /&gt;
 // ...&lt;br /&gt;
 // end header&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;quot;qSlicerMyModule.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // MyModule includes&lt;br /&gt;
 #include &amp;quot;qSlicerMyModuleWidget.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkSlicerMyModuleLogic.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // MRML includes&lt;br /&gt;
 #include &amp;quot;vtkMRMLScene.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 // Qt includes&lt;br /&gt;
 #include &amp;lt;QDialog&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 // VTK includes&lt;br /&gt;
 #include &amp;lt;vtkSmartPointer.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 // STD includes&lt;br /&gt;
 #include &amp;lt;vector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Language Specific ==&lt;br /&gt;
&lt;br /&gt;
# [[Documentation/{{documentation/version}}/Developers/Style Guide/Cpp | C++]]&lt;br /&gt;
# [[Documentation/{{documentation/version}}/Developers/Style Guide/Python | Python]]&lt;br /&gt;
# [[Documentation/{{documentation/version}}/Developers/Style Guide/CMake | CMake]]&lt;br /&gt;
&lt;br /&gt;
== Library Dependencies ==&lt;br /&gt;
&lt;br /&gt;
# MRML classes should only depend on vtk and itk (not Slicer Logic or Qt)&lt;br /&gt;
# Logic classes depend on MRML to store state&lt;br /&gt;
# Logic classes should encapsulate vtk and itk pipelines to accomplish specific slicer tasks (such as resampling volumes for display)&lt;br /&gt;
# GUI classes can depend on MRML and Logic and Qt&lt;br /&gt;
&lt;br /&gt;
== Development Practices ==&lt;br /&gt;
&lt;br /&gt;
# While developing code, enable VTK_DEBUG_LEAKS (ON by default) in your vtk build and be sure to clean up any leaks that arise from your contributions.&lt;br /&gt;
&lt;br /&gt;
== Coordinate Systems ==&lt;br /&gt;
&lt;br /&gt;
# World space for 3D Views is in RAS (Right Anterior Superior) space. See [[Coordinate systems]].&lt;br /&gt;
# All units are expressed in Millimeters (mm)&lt;br /&gt;
&lt;br /&gt;
== Error and warning messages ==&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
The ITK, VTK, Qt, std::cout, std::cerr .. all appear in the error log and can easily be filtered according to their type (debug/warning/error). &lt;br /&gt;
&lt;br /&gt;
* '''Errors''': Error should be used to signal something that should not happen. They usually mean that the execution of the current function/code should be stopped.&lt;br /&gt;
* '''Warnings''': Warning should be used to signal potentially dangerous behavior. Also consider using these in deprecated methods to warn your fellow developers.&lt;br /&gt;
* '''Debugs''': For general debug and developer aimed information, one can use the debug messages.&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;right&amp;quot;|&lt;br /&gt;
|[[Image: Slicer4ErrorLog.jpg|thumb|200px| Error log in Slicer 4]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* In Qt-based classes:&lt;br /&gt;
** For error messages, use [http://qt-project.org/doc/qt-4.8/qtglobal.html#qCritical qCritical()]. &lt;br /&gt;
  if (somethingWrongHappened)&lt;br /&gt;
    {&lt;br /&gt;
    qCritical() &amp;lt;&amp;lt; &amp;quot;I encountered an error&amp;quot;;&lt;br /&gt;
    return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
:* For warnings, use [http://qt-project.org/doc/qt-4.8/qtglobal.html#qWarning qWarning()]. &lt;br /&gt;
  qWarning() &amp;lt;&amp;lt; &amp;quot;Be careful here, this is dangerous&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
:* For debug, use [http://qt-project.org/doc/qt-4.8/qtglobal.html#qDebug qDebug()]:&lt;br /&gt;
  qDebug() &amp;lt;&amp;lt; &amp;quot;This variable has the value: &amp;quot;&amp;lt;&amp;lt; value;&lt;br /&gt;
&lt;br /&gt;
* In VTK-based classes:&lt;br /&gt;
** For error messages, use [http://www.vtk.org/doc/release/3/html/vtkSetGet_8h.html vtkErrorMacro()]. &lt;br /&gt;
  if (somethingWrongHappened)&lt;br /&gt;
    {&lt;br /&gt;
    vtkErrorMacro(&amp;quot;I encountered an error&amp;quot;);&lt;br /&gt;
    return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
:* For warnings, use [http://www.vtk.org/doc/release/3/html/vtkSetGet_8h.html vtkWarningMacro()]. &lt;br /&gt;
  vtkWarningMacro(&amp;quot;Be careful here, this is dangerous&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
:* For debug, use [http://www.vtk.org/doc/release/3/html/vtkSetGet_8h.html vtkDebugMacro()]:&lt;br /&gt;
  vtkDebugMacro(&amp;quot;This variable has the value: &amp;quot;&amp;lt;&amp;lt; value);&lt;br /&gt;
&lt;br /&gt;
== Misc. ==&lt;br /&gt;
# No more than 80 characters per line&lt;br /&gt;
&lt;br /&gt;
= Commits =&lt;br /&gt;
==Summary==&lt;br /&gt;
#Prefix the commit message title with &amp;quot;BUG:&amp;quot;,&amp;quot;ENH:&amp;quot;,&amp;quot;COMP:&amp;quot;, &amp;quot;STYLE:&amp;quot;. Note the ':' (colon) character.&lt;br /&gt;
#Explain in the commit message title the &amp;quot;impact of the commit to the user&amp;quot;&lt;br /&gt;
#Add in the commit message body the Mantis issue number prefixed by '#' (pound) character. &lt;br /&gt;
&lt;br /&gt;
==Commit message prefix==&lt;br /&gt;
Subversion Commits to Slicer require commit type in the comment.&lt;br /&gt;
&lt;br /&gt;
Valid commit types are:&lt;br /&gt;
   BUG:   - a change made to fix a runtime issue&lt;br /&gt;
            (crash, segmentation fault, exception, or incorrect result,&lt;br /&gt;
   COMP:  - a fix for a compilation issue, error or warning,&lt;br /&gt;
   ENH:   - new functionality added to the project,&lt;br /&gt;
   PERF:  - a performance improvement,&lt;br /&gt;
   STYLE: - a change that does not impact the logic or execution of the code.&lt;br /&gt;
            (improve coding style, comments, documentation).&lt;br /&gt;
Note that the ':'(colon) directly follows the commit tag. For example, it is: &amp;quot;STYLE:&amp;quot; not &amp;quot;STYLE :&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Subversion command to commit the change is:&lt;br /&gt;
  svn commit -m &amp;quot;BUG: fixed core dump when passed float data&amp;quot; filename1[, filename2, ...]&lt;br /&gt;
&lt;br /&gt;
By using the &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; command line option, it's not possible to submit a message having multiple line.&lt;br /&gt;
Submitting a mutli-line message can be achieved using the &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt; option:&lt;br /&gt;
  svn commit -f /path/to/message filename1[, filename2, ...]&lt;br /&gt;
&lt;br /&gt;
It's also possible to set the environment variable [http://www.google.com/search?q=SVN_EDITOR|&amp;lt;code&amp;gt;SVN_EDITOR&amp;lt;/code&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==Message content== &lt;br /&gt;
# A good commit message title (first line) should '''explain what the commit does for the user, not ''how'' it is done'''. ''How'' can be explained in the body of the commit message (if looking at the code of the commit is not self explanatory enough).&lt;br /&gt;
#: Examples:&lt;br /&gt;
#:* Bad: &amp;lt;code&amp;gt;BUG: Check pointer validity before dereferencing&amp;lt;/code&amp;gt; -&amp;gt; ''implementation detail'', ''self-explanatory'' (by looking at the code)&lt;br /&gt;
#:* Good: &amp;lt;code&amp;gt;BUG: Fix crash in Module X when clicking Apply button&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* Bad: &amp;lt;code&amp;gt;ENH: More work in qSlicerXModuleWidget&amp;lt;/code&amp;gt; -&amp;gt; &amp;lt;code&amp;gt;more work&amp;lt;/code&amp;gt; is ''too vague'', &amp;lt;code&amp;gt;qSlicerXModuleWidget&amp;lt;/code&amp;gt; is too ''low level'' &lt;br /&gt;
#:* Good: &amp;lt;code&amp;gt;ENH: Add float image outputs in module X&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* Bad: &amp;lt;code&amp;gt;COMP: Typo in cmake variable&amp;lt;/code&amp;gt; -&amp;gt; ''implementation detail'', ''self-explanatory''&lt;br /&gt;
#:* Good: &amp;lt;code&amp;gt;COMP: Fix compilation error with Numpy on Visual Studio&amp;lt;/code&amp;gt;&lt;br /&gt;
# If the commit is related to a [http://na-mic.org/Mantis/view_all_bug_page.php mantis issue] (bug or feature request), you can mention it in the commit message body by preceding the issue number with a '''#'''(pound) character:&lt;br /&gt;
 BUG: Fix crash in Volume Rendering module when switching view layout&lt;br /&gt;
 &lt;br /&gt;
 vtkSetAndObserveMRMLNodeEventsMacro can't be used for observing all types of vtkObjects,&lt;br /&gt;
 only vtkMRMLNode is expected by vtkMRMLAbstractLogic::OnMRMLNodeModified(...) &lt;br /&gt;
 Closes #1641&lt;br /&gt;
Where &amp;lt;code&amp;gt;1641&amp;lt;/code&amp;gt; refers to the [http://www.na-mic.org/Bug/view.php?id=1641 issue number] in mantis.&lt;br /&gt;
&lt;br /&gt;
# Notice the empty 2nd line.&lt;br /&gt;
&lt;br /&gt;
==Importing changes from external project/repository==&lt;br /&gt;
When you update the git tag or svn revision of any external project, explicit in the commit message what the update does instead of just mentioning that an update in made.&lt;br /&gt;
&lt;br /&gt;
This will avoid having a Slicer commit history made of ineligible messages:&lt;br /&gt;
 r19180 - ENH: Update git tag&lt;br /&gt;
 r19181 - BUG: Update svn revision&lt;br /&gt;
 r19182 - ENH: revision updated&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Ideally it should be the same message than the commit(s) in the external repository. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;ENH: Add feature A in module X&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ENH: Update git tag&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
http://www.na-mic.org/Wiki/index.php/Engineering:Subversion_Repository&lt;br /&gt;
&lt;br /&gt;
http://www.slicer.org/slicerWiki/index.php/Slicer:git-svn&lt;br /&gt;
&lt;br /&gt;
= UI Design Guidelines =&lt;br /&gt;
{{:Documentation/{{documentation/version}}/Developers/Style Guide/UI}}&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
In VTK classes:&lt;br /&gt;
* vtkErrorMacro(&amp;quot;vtkMRMLClipModelsNode:: Invalid Clip Type&amp;quot;);&lt;br /&gt;
* vtkWarningMacro(&amp;quot;Model &amp;quot; &amp;lt;&amp;lt; modelNode-&amp;gt;GetName() &amp;lt;&amp;lt; &amp;quot;'s display node is null\n&amp;quot;);&lt;br /&gt;
* vtkDebugMacro(&amp;quot;CreateWidget: found a glyph type already defined for this node: &amp;quot; &amp;lt;&amp;lt; iter-&amp;gt;second);&lt;br /&gt;
&lt;br /&gt;
In QT classes:&lt;br /&gt;
* qCritical() &amp;lt;&amp;lt; &amp;quot;qSlicerUtils::setPermissionsRecursively: Failed to set permissions on file&amp;quot; &amp;lt;&amp;lt; info.filePath();&lt;br /&gt;
* qWarning() &amp;lt;&amp;lt; &amp;quot;qSlicerIOManager::openScreenshotDialog: Unable to get Annotations module (annotations), using the CTK screen shot dialog.&amp;quot;;&lt;br /&gt;
* qDebug() &amp;lt;&amp;lt; &amp;quot;qMRMLSceneFactoryWidget::deleteNode(&amp;quot; &amp;lt;&amp;lt;className &amp;lt;&amp;lt;&amp;quot;) no node&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
= Wiki =&lt;br /&gt;
&lt;br /&gt;
* Prefer to follow [http://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_(capitalization) Wikipedia conventions] for page naming: ''For multiword page titles, leave the second and subsequent words in lowercase unless the title phrase is a proper noun that would always occur capitalized, even in the middle of a sentence''.&lt;br /&gt;
&lt;br /&gt;
* Versioned pages should include '&amp;lt;nowiki&amp;gt;&amp;amp;lt;noinclude&amp;amp;gt;{{documentation/versioncheck}}&amp;amp;lt;/noinclude&amp;amp;gt;&amp;lt;/nowiki&amp;gt;' at the very beginning.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_system/Qt_resource_files&amp;diff=38139</id>
		<title>Documentation/Nightly/Developers/Build system/Qt resource files</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_system/Qt_resource_files&amp;diff=38139"/>
		<updated>2014-06-09T18:30:52Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: remove potentially confusing notice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Generating QRC Files: genqrc.py ==&lt;br /&gt;
&lt;br /&gt;
Slicer includes a tool to generate &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; files from resource directories. This convenience tool was created to simplify working with icons, which can require several entries per icon (one per available resolution) that may be cumbersome to write by hand.&lt;br /&gt;
&lt;br /&gt;
The script ([https://github.com/Slicer/Slicer/blob/master/Utilities/Scripts/genpy.py genpy.py]) can be found in the [https://github.com/Slicer/Slicer/tree/master/Utilities/Scripts Utilities/Scripts] directory of the Slicer source.&lt;br /&gt;
&lt;br /&gt;
The positional argument(s) to the script give a list of directories that should be scanned for resource files (e.g. &amp;lt;code&amp;gt;'Icons'&amp;lt;/code&amp;gt;). An optional &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; parameter may be used to specify the output file (otherwise the script will print to stdout). The script should normally be run in the directory of the desired output &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; file in order to provide and generate relative paths that will be both understood correctly by the Qt resource compiler, and meaningful to other developers' checkouts.&lt;br /&gt;
&lt;br /&gt;
For example, to generate [https://github.com/Slicer/Slicer/blob/master/Base/QTGUI/Resources/qSlicerBaseQTGUI.qrc qSlicerBaseQTGUI.qrc], one would run:&lt;br /&gt;
&lt;br /&gt;
 cd /path/to/slicer/source&lt;br /&gt;
 cd Base/QTGUI/Resources&lt;br /&gt;
 ../../../Utilities/Scripts/genqrc.py -o qSlicerBaseQTGUI.qrc Icons&lt;br /&gt;
&lt;br /&gt;
This tool is currently meant to be used in an &amp;quot;offline&amp;quot; manner (i.e. not part of the build process). When adding icons, you should re-run the script to generate an updated &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; file and commit the updated file.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_system&amp;diff=38138</id>
		<title>Documentation/Nightly/Developers/Build system</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_system&amp;diff=38138"/>
		<updated>2014-06-09T18:26:56Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Leveraging the [http://www.cmake.org/cmake/help/v2.8.8/cmake.html#module:ExternalProject ExternalProject] module provided by [[{{tool|logo|cmake}}|x16px]] [{{tool|homepage|cmake}} CMake], Slicer SuperBuild system allows developers to quickly install and configure the multiple open-source packages and libraries it depends on.&lt;br /&gt;
&lt;br /&gt;
;[[Documentation/{{documentation/version}}/Developers/Versioning|Versioning]]&lt;br /&gt;
: Convention to name Slicer packages.&lt;br /&gt;
 &lt;br /&gt;
;[[Documentation/{{documentation/version}}/Developers/Factory|Factory description]]&lt;br /&gt;
: Current configuration of Slicer's factory machines.&lt;br /&gt;
&lt;br /&gt;
;[[Documentation/{{documentation/version}}/Developers/Build_ExtensionsIndex|Build ExtensionsIndex]]&lt;br /&gt;
: How to build an ExtensionsIndex (collection of extension description files) ?&lt;br /&gt;
&lt;br /&gt;
;[[Documentation/{{documentation/version}}/Developers/FactoryDashboardSetup |Factory Dashboard setup]]&lt;br /&gt;
: Provide a general overview of the slicer application and extensions dashboard script organization&lt;br /&gt;
&lt;br /&gt;
;[[Documentation/{{documentation/version}}/Developers/Build system/Qt resource files|Qt resource files]]&lt;br /&gt;
: Describes the &amp;lt;code&amp;gt;genqrc.py&amp;lt;/code&amp;gt; tool for automatic generation/updating of Qt resource scripts.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_system/Qt_resource_files&amp;diff=38137</id>
		<title>Documentation/Nightly/Developers/Build system/Qt resource files</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_system/Qt_resource_files&amp;diff=38137"/>
		<updated>2014-06-09T18:22:40Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: fix name of script in link (genpy s.b. genqrc)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Generating QRC Files: genqrc.py ==&lt;br /&gt;
&lt;br /&gt;
Slicer includes a tool to generate &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; files from resource directories. This convenience tool was created to simplify working with icons, which can require several entries per icon (one per available resolution) that may be cumbersome to write by hand.&lt;br /&gt;
&lt;br /&gt;
The script ([https://github.com/Slicer/Slicer/blob/master/Utilities/Scripts/genqrc.py genqrc.py]) can be found in the [https://github.com/Slicer/Slicer/tree/master/Utilities/Scripts Utilities/Scripts] directory of the Slicer source.&lt;br /&gt;
&lt;br /&gt;
The positional argument(s) to the script give a list of directories that should be scanned for resource files (e.g. &amp;lt;code&amp;gt;'Icons'&amp;lt;/code&amp;gt;). An optional &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; parameter may be used to specify the output file (otherwise the script will print to stdout). The script should normally be run in the directory of the desired output &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; file in order to provide and generate relative paths that will be both understood correctly by the Qt resource compiler, and meaningful to other developers' checkouts.&lt;br /&gt;
&lt;br /&gt;
For example, to generate [https://github.com/Slicer/Slicer/blob/master/Base/QTGUI/Resources/qSlicerBaseQTGUI.qrc qSlicerBaseQTGUI.qrc], one would run:&lt;br /&gt;
&lt;br /&gt;
 cd /path/to/slicer/source&lt;br /&gt;
 cd Base/QTGUI/Resources&lt;br /&gt;
 ../../../Utilities/Scripts/genqrc.py -o qSlicerBaseQTGUI.qrc Icons&lt;br /&gt;
&lt;br /&gt;
{{notice|The list of resource directories in the generated &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; is printed using Python's representational format of a list of strings, which is ''not'' suitable for feeding to the shell directly. You should perform the necessary syntax conversion by hand when running the script. (Usually it is sufficient to remove the square brackets and commas.)}}&lt;br /&gt;
&lt;br /&gt;
This tool is currently meant to be used in an &amp;quot;offline&amp;quot; manner (i.e. not part of the build process). When adding icons, you should re-run the script to generate an updated &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; file and commit the updated file.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_system/Qt_resource_files&amp;diff=38136</id>
		<title>Documentation/Nightly/Developers/Build system/Qt resource files</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_system/Qt_resource_files&amp;diff=38136"/>
		<updated>2014-06-09T18:21:22Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: Created page with '&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;  == Generating QRC Files: genqrc.py ==  Slicer includes a tool to generate &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; files from resource directories…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Generating QRC Files: genqrc.py ==&lt;br /&gt;
&lt;br /&gt;
Slicer includes a tool to generate &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; files from resource directories. This convenience tool was created to simplify working with icons, which can require several entries per icon (one per available resolution) that may be cumbersome to write by hand.&lt;br /&gt;
&lt;br /&gt;
The script ([https://github.com/Slicer/Slicer/blob/master/Utilities/Scripts/genpy.py genpy.py]) can be found in the [https://github.com/Slicer/Slicer/tree/master/Utilities/Scripts Utilities/Scripts] directory of the Slicer source.&lt;br /&gt;
&lt;br /&gt;
The positional argument(s) to the script give a list of directories that should be scanned for resource files (e.g. &amp;lt;code&amp;gt;'Icons'&amp;lt;/code&amp;gt;). An optional &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; parameter may be used to specify the output file (otherwise the script will print to stdout). The script should normally be run in the directory of the desired output &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; file in order to provide and generate relative paths that will be both understood correctly by the Qt resource compiler, and meaningful to other developers' checkouts.&lt;br /&gt;
&lt;br /&gt;
For example, to generate [https://github.com/Slicer/Slicer/blob/master/Base/QTGUI/Resources/qSlicerBaseQTGUI.qrc qSlicerBaseQTGUI.qrc], one would run:&lt;br /&gt;
&lt;br /&gt;
 cd /path/to/slicer/source&lt;br /&gt;
 cd Base/QTGUI/Resources&lt;br /&gt;
 ../../../Utilities/Scripts/genqrc.py -o qSlicerBaseQTGUI.qrc Icons&lt;br /&gt;
&lt;br /&gt;
{{notice|The list of resource directories in the generated &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; is printed using Python's representational format of a list of strings, which is ''not'' suitable for feeding to the shell directly. You should perform the necessary syntax conversion by hand when running the script. (Usually it is sufficient to remove the square brackets and commas.)}}&lt;br /&gt;
&lt;br /&gt;
This tool is currently meant to be used in an &amp;quot;offline&amp;quot; manner (i.e. not part of the build process). When adding icons, you should re-run the script to generate an updated &amp;lt;code&amp;gt;.qrc&amp;lt;/code&amp;gt; file and commit the updated file.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Modules/ExtensionWizard&amp;diff=38125</id>
		<title>Documentation/Nightly/Modules/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Modules/ExtensionWizard&amp;diff=38125"/>
		<updated>2014-06-04T21:21:30Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: Created page with '&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt; {{documentation/{{documentation/version}}/module-header}}  {{documentation/{{documentation/version}}/module-section|Introduc…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-header}}&lt;br /&gt;
&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|Introduction and Acknowledgements}}&lt;br /&gt;
{{documentation/{{documentation/version}}/module-introduction-start|{{documentation/modulename}}}}&lt;br /&gt;
{{documentation/{{documentation/version}}/module-introduction-row}}&lt;br /&gt;
This work is part of the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on NA-MIC can be obtained from the [http://www.na-mic.org/ NA-MIC website].&amp;lt;br&amp;gt;&lt;br /&gt;
Author: Matthew Woehlke, Kitware&amp;lt;br&amp;gt;&lt;br /&gt;
Contact: Matthew Woehlke, &amp;lt;email&amp;gt;matthew.woehlke@kitware.com&amp;lt;/email&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-introduction-row}}&lt;br /&gt;
{{documentation/{{documentation/version}}/module-introduction-logo-gallery&lt;br /&gt;
|{{collaborator|logo|kitware}}|{{collaborator|longname|kitware}}&lt;br /&gt;
|{{collaborator|logo|namic}}|{{collaborator|longname|namic}}&lt;br /&gt;
}}&lt;br /&gt;
{{documentation/{{documentation/version}}/module-introduction-end}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|Module Description}}&lt;br /&gt;
The Extension Wizard modules provides a graphical interface within Slicer to aid in the creation of Slicer extensions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|Use Cases}}&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|Tutorials}}&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|Panels and their use}}&lt;br /&gt;
== Extension Tools ==&lt;br /&gt;
&lt;br /&gt;
* Create Extension: Create a new extension from a specified template, given a name and destination.&lt;br /&gt;
* Select Extension: Choose an existing extension to edit.&lt;br /&gt;
&lt;br /&gt;
When creating a template, the newly created template is automatically selected for editing. When selecting an extension, if the extension provides scripted modules that are not already loaded, an option to load such modules is provided.&lt;br /&gt;
&lt;br /&gt;
== Extension Editor ==&lt;br /&gt;
&lt;br /&gt;
* Name: The name of the currently selected extension.&lt;br /&gt;
* Location: The location (on disk) of the currently selected extension.&lt;br /&gt;
* Repository: If available, the upstream URL of the repository hosting the extension.&lt;br /&gt;
* Contents: A tree view showing the file contents of the currently selected extension.&lt;br /&gt;
* Add Module to Extension: Create a new module from a specified template, given a name, and add it to the selected extension.&lt;br /&gt;
* Edit Extension Metadata: Edit metadata associated with the extension (such as the name, contributors, etc.).&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard module provides a settings page, which is accessible via Slicer's Application Settings.&lt;br /&gt;
&lt;br /&gt;
* Built-in template path: If found, displays the location of the built-in templates.&lt;br /&gt;
* Additional template paths: A list of additional locations containing categorized templates.&lt;br /&gt;
* Additional template paths for ''&amp;lt;category&amp;gt;'': A list of additional locations containing templates for a particular category (e.g. extensions, modules).&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;template&amp;quot; is a directory containing a collection of files which comprise that template. Additional paths should point to directories which ''contain'' such template directories, ''not'' the directory of the template itself. A categorized template directory should have directories for one or more categories, which in turn contain templates.&lt;br /&gt;
&lt;br /&gt;
The built-in templates provide an example of the correct layout for a categorized template directory. (Each category directory is in turn an example of a template collection for that category.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|Similar Modules}}&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|References}}&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|Information for Developers}}&lt;br /&gt;
{{documentation/{{documentation/version}}/module-developerinfo}}&lt;br /&gt;
The Extension Wizard module makes extensive use of the SlicerWizard Python package, which is also used by the CLI [[Documentation/{{documentation/version}}/Developers/ExtensionWizard|Extension Wizard]].&lt;br /&gt;
&lt;br /&gt;
{{documentation/{{documentation/version}}/module-footer}}&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Modules&amp;diff=38124</id>
		<title>Documentation/Nightly/Modules</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Modules&amp;diff=38124"/>
		<updated>2014-06-04T19:41:08Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Developer Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
=Modules by Category=&lt;br /&gt;
==Core Modules==&lt;br /&gt;
&lt;br /&gt;
{{documentation/{{documentation/version}}/Developers/random-image}}&lt;br /&gt;
&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Annotations|Annotations]] (Nicole Aucoin) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Colors|Colors]] (Nicole Aucoin) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Data|Data]] (Julien Finet)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/DICOM|DICOM]] (Steve Pieper)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Editor|Editor]] (Steve Pieper)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/Editor/WatershedFromMarkers|WatershedFromMarkers]] (Bradley Lowekamp) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Markups|Markups]] (Nicole Aucoin)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Models|Models]] (Nicole Aucoin)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/SceneViews|SceneViews]] (Nicole Aucoin) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Transforms|Transforms]] (Alex Yarmarkovich) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ViewControllers|View Controllers]] (Jim Miller) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Volumes|Volumes]] (Steve Pieper)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/VolumeRendering|Volume Rendering]] (Julien Finet)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/SlicerWelcome|Welcome to Slicer]] (Wendy Plesniak)&lt;br /&gt;
&lt;br /&gt;
==Wizards==&lt;br /&gt;
&lt;br /&gt;
==Informatics==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/DataStore|Data Store]] (Charles Marion)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/SampleData|Sample Data]] (Steve Pieper)&lt;br /&gt;
&lt;br /&gt;
==Registration==&lt;br /&gt;
*[[:Category:Documentation/{{documentation/version}}/Modules/Registration|Introduction to Registration]] (Dominik Meier)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/BRAINSFit|General Brainsfit Registration]] (Hans Johnson)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/BRAINSResample|Resample Image (BRAINS)]] (Hans Johnson)&lt;br /&gt;
*Specialized&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/ACPCTransform|ACPC Transform]] (Nicole Aucoin)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/BRAINSDemonWarp|Demon Registration (BRAINS)]] (Hans Johnson)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/FiducialRegistration|Fiducial Registration]] (Stephen Aylward) {{wip}}&lt;br /&gt;
**Vector Demon Registration (Hans Johnson)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/Reformat|Reformat]] (Michael Jeulin-Lagarrigue)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/SegmentationAidedRegistration|Segmentation Aided Registration]] (Yi Gao) {{wip}}&lt;br /&gt;
&lt;br /&gt;
==Segmentation==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/EMSegment Easy|EMSegment Easy (no atlas)]] (Kilian Pohl) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/EMSegmenter|EMSegment (with atlas)]] (Kilian Pohl) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/SimpleRegionGrowingSegmentation|Simple Region Growing Segmentation]] (Jim Miller, Harini Veeraraghavan) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Editor|Editor]] (Steve Pieper)&lt;br /&gt;
*Specialized&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/EMSegment Command-line | EMSegment Command-line]] (Kilian Pohl)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/ForegroundMasking|Foreground Masking (BRAINS)]] (Hans Johnson)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/RobustStatisticsSegmenter|Robust Statistics Segmenter]] (Yi Gao)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/LAScarSegmenter|Left Atrial Scar Segmenter]] (Liangjia Zhu)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/LASegmenter|Left Atrium Segmenter]] (Liangjia Zhu)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/FastGrowCut|Fast GrowCut]] (Liangjia Zhu) {{wip}}&lt;br /&gt;
&lt;br /&gt;
==Quantification==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/DataProbe|Data Probe]] (Steve Pieper)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/LabelStatistics|Label Statistics]] (Steve Pieper)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/PETStandardUptakeValueComputation|PET Standard Uptake Value Computation]] (Nicole Aucoin)&lt;br /&gt;
&lt;br /&gt;
==Diffusion== &lt;br /&gt;
*DWI to Full Brain Tractography (Demian Wasserman) {{wip}}&lt;br /&gt;
*Denoising&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/DWIJointRicianLMMSEFilter|DWI Joint Rician LMMSE Image Filter]] (Demian Wasserman) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/DWIRicianLMMSEFilter|DWI Rician LMMSE Filter]] (Demian Wasserman) {{wip}}&lt;br /&gt;
*Tractography&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/TractographyDisplay|Tractography Display]] (Demian Wasserman) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/TractographyFiducialSeeding|Tractography Interactive Seeding]] (Alex Yarmarkovich)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/TractographyLabelMapSeeding|Tractography Label Map Seeding]] (Demian Wasserman) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/UKFTractography|UKF Tractography]]&lt;br /&gt;
*Utilities&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/DWIToDTIEstimation|DWI To DTI Estimation]] (Demian Wasserman) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/DiffusionTensorScalarMeasurements|Diffusion Tensor Scalar Measurements]] (Demian Wasserman) &lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/DiffusionWeightedVolumeMasking|Diffusion Weighted Volume Masking]] (Demian Wasserman) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/ResampleDTIVolume|Resample DTI Volume]] (Demian Wasserman) {{wip}}&lt;br /&gt;
*Data Conversion&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/DTIImport|DTIImport]] {{wip}} (Sonia Pujol) &lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/DTIExport|DTIExport]] {{wip}} (Sonia Pujol)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/FiberBundleToLabelMap|Fiber Bundle to Label Map]] (Steve Pieper)&lt;br /&gt;
&lt;br /&gt;
==IGT==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/OpenIGTLinkIF| OpenIGTLink IF]] (Junichi Tokuda) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Extensions/SlicerIGT| SlicerIGT]] (Tamas Ungi, Junichi Tokuda) {{wip}}&lt;br /&gt;
&lt;br /&gt;
==Filtering==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/N4ITKBiasFieldCorrection | N4ITK Bias Field Correction]] (Andrey Fedorov)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/CheckerBoardFilter|CheckerBoard Filter]] (Jim Miller) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ExtractSkeleton|Extract Skeleton]] (Jim Miller) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/HistogramMatching|Histogram Matching]] (Jim Miller) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ImageLabelCombine|Image Label Combine]] (Alex Yarmarkovich) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ResampleScalarVectorDWIVolume|Resample Scalar/Vector/DWI Volume]] (Francois Budin) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ThresholdScalarVolume|Threshold Scalar Volume]] (Nicole Aucoin) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/VotingBinaryHoleFillingImageFilter|Voting Binary Hole Filling Image Filter]] (Jim Miller) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/SimpleFilters|Simple Filters]] (Bradley Lowekamp) {{wip}}&lt;br /&gt;
*Arithmetic &lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/AddScalarVolumes|Add Scalar Volumes]] (Jim Miller) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/CastScalarVolume| Cast Scalar Volume]] (Nicole Aucoin) &lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/MaskScalarVolume| Mask Scalar Volume]] (Nicole Aucoin) &lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/MultiplyScalarVolumes| Multiply Scalar Volumes]] (Jim Miller) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/SubtractScalarVolumes| Subtract Scalar Volumes]] (Jim Miller) {{wip}}&lt;br /&gt;
*Denoising&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/GradientAnisotropicDiffusion |Gradient Anisotropic Diffusion]] (Jim Miller) {{wip}} &lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/CurvatureAnisotropicDiffusion|Curvature Anisotropic Diffusion]] (Jim Miller) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/GaussianBlurImageFilter|Gaussian Blur Image Filter]] (Stephen Aylward) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/MedianImageFilter|Median Image Filter]] (Jim Miller) {{wip}}&lt;br /&gt;
*Morphology&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/GrayscaleFillHoleImageFilter|Grayscale Fill Hole Image Filter]] (Jim Miller)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/GrayscaleGrindPeakImageFilter|Grayscale Grind Peak Image Filter]] (Jim Miller) {{wip}}&lt;br /&gt;
&lt;br /&gt;
==Surface Models==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/GrayscaleModelMaker| Grayscale Model Maker]] (Jim Miller) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/LabelMapSmoothing|Label Map Smoothing]] {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/MergeModels| Merge Models]] (Nicole Aucoin) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ModelMaker| Model Maker]] (Nicole Aucoin) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ModelToLabelMap| Model To LabelMap]] (Nicole Aucoin) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ProbeVolumeWithModel| Probe Volume With Model]] (Lauren O'Donnell) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/SurfaceToolbox| SurfaceToolbox]] (Luca Antiga)&lt;br /&gt;
&lt;br /&gt;
==Converters==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/CreateDICOMSeries|Create DICOM Series]] (Jim Miller) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Crop Volume|Crop Volume]] (Andrey Fedorov)&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/DicomToNrrdConverter|Dicom to Nrrd Converter]] (Jim Miller) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/OrientScalarVolume| Orient Scalar Volume]] (Jim Miller) &lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/VectorToScalarVolume| Vector to Scalar Volume]] (Steve Pieper) &lt;br /&gt;
{{wip}}&lt;br /&gt;
&lt;br /&gt;
==Endoscopy==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Endoscopy|Endoscopy]] (Steve Pieper)&lt;br /&gt;
&lt;br /&gt;
=={{wip}} Work in Progress {{wip}}==&lt;br /&gt;
* MultiVolume Support&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/MultiVolumeImporter|MultiVolume Importer]] (Andrey Fedorov)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/MultiVolumeExplorer|MultiVolume Explorer]] (Andrey Fedorov)&lt;br /&gt;
&lt;br /&gt;
==Developer Tools==&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/Cameras|Cameras]] (Julien Finet) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/EventBroker|Event Broker]] (Julien Finet) {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ExecutionModelTour |Execution Model Tour]] (JC Fillion-Robin)  {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/ExtensionWizard |Extension Wizard]] (Matthew Woehlke)  {{wip}}&lt;br /&gt;
*[[Documentation/{{documentation/version}}/Modules/YOURMODULENAME|Module Template]] (JC Fillion-Robin)&lt;br /&gt;
*Performance Tests&lt;br /&gt;
*Tractography&lt;br /&gt;
&lt;br /&gt;
==Legacy==&lt;br /&gt;
*Converters&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/BSplineToDeformationField|BSpline To Deformation Field]]&lt;br /&gt;
*Diffusion&lt;br /&gt;
**Denoising&lt;br /&gt;
***[[Documentation/{{documentation/version}}/Modules/DWIUnbiasedNonLocalMeansFilter|DWI Unbiased Non Local Means Filter]]&lt;br /&gt;
*Filtering&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/MRIBiasFieldCorrection|MRI Bias Field Correction]] (Sylvain Jaume) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/OtsuThresholdImageFilter|Otsu Threshold Image Filter]] (Bill Lorensen) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/ResampleScalarVolume|Resample Scalar Volume]] (Jim Miller) {{wip}}&lt;br /&gt;
*Registration&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/RigidRegistration|Rigid Registration]] (Jim Miller)  {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/AffineRegistration|Affine Registration]] (Daniel Blezek) {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/BSplineDeformableRegistration|BSpline Deformable Registration]] {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/ExpertAutomatedRegistration|Expert Automated Registration]] {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/LinearRegistration|Linear Registration]] {{wip}}&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/MultiResolutionAffineRegistration|MultiResolution Affine Registration]] (Casey Goodlett){{wip}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/TestGridTransformRegistration|Test Grid Transform Registration]] {{wip}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*Segmentation&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Modules/OtsuThresholdSegmentation|Otsu Threshold Segmentation]] (Bill Lorensen) {{wip}}&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=38080</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=38080"/>
		<updated>2014-06-02T22:25:21Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Invoking the Wizard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
If you already have git (or won't be using the operations that require git), the easiest way to let the Slicer superbuild build its own Python, which will also build the various required Python packages. For full functionality, you will also need [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows).&lt;br /&gt;
&lt;br /&gt;
If you want to use your own (e.g. system) Python, you will need:&lt;br /&gt;
&lt;br /&gt;
* '''For all operations:'''&lt;br /&gt;
** [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;)&lt;br /&gt;
* '''For full functionality:'''&lt;br /&gt;
** [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
** [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
** [http://jacquev6.github.io/PyGithub/ PyGithub] = v1&lt;br /&gt;
** [https://github.com/chardet/chardet chardet]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
=== Invoking the Wizard ===&lt;br /&gt;
&lt;br /&gt;
In your favorite terminal program running a POSIX-compliant shell (on Windows, &amp;quot;git bash&amp;quot; is strongly recommended), run:&lt;br /&gt;
&lt;br /&gt;
 /path/to/slicer/bin/slicerExtensionWizard&lt;br /&gt;
&lt;br /&gt;
...replacing '&amp;lt;code&amp;gt;/path/to/slicer&amp;lt;/code&amp;gt;' with the (relative or absolute) path to your Slicer build or install.&lt;br /&gt;
&lt;br /&gt;
{{notice|You can also add '&amp;lt;code&amp;gt;''/path/to/slicer''/bin&amp;lt;/code&amp;gt;' to your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;. For the sake of brevity, we'll assume that you've done so for the remainder of this document.}}&lt;br /&gt;
&lt;br /&gt;
The launcher script will ensure that your Python and library paths are set correctly to find packages and libraries that are provided by Slicer, and will invoke the correct Python binary if provided by Slicer.&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 slicerExtensionWizard --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 slicerExtensionWizard --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 slicerExtensionWizard --addModule loadable:MyCppModule&lt;br /&gt;
 slicerExtensionWizard --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 slicerExtensionWizard --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 slicerExtensionWizard --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
More detailed information about the various module types in Slicer can be found [[Documentation/{{documentation/version}}/Developers/Modules|here]].&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 slicerExtensionWizard --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 slicerExtensionWizard --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy:&lt;br /&gt;
&lt;br /&gt;
 # Make a copy of an existing module in the same extension&lt;br /&gt;
 slicerExtensionWizard --templatePath modules=~/code/MyExtension \&lt;br /&gt;
                       --templateKey ModuleOne=ModuleOne \&lt;br /&gt;
                       --addModule ModuleOne:ModuleTwo \&lt;br /&gt;
                       ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
Here is a simple recipe that will work in many cases (assumes you are on not-Windows or using the git-msys shell):&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # You may also want to pass '-G &amp;quot;&amp;amp;lt;generator&amp;amp;gt;&amp;quot;' here (required on Windows)&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
{{notice|If the above leaves you scratching your head, don't worry; the default behavior if you haven't configured anything else is simply to prompt you for your user name and password. Setting up either a password manager or credential caching is recommended however, as some operations may otherwise require you to provide your password more than once.}}&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 slicerExtensionWizard --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 slicerExtensionWizard --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 slicerExtensionWizard --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=38079</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=38079"/>
		<updated>2014-06-02T22:24:41Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Requirements */ remove redundant notice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
If you already have git (or won't be using the operations that require git), the easiest way to let the Slicer superbuild build its own Python, which will also build the various required Python packages. For full functionality, you will also need [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows).&lt;br /&gt;
&lt;br /&gt;
If you want to use your own (e.g. system) Python, you will need:&lt;br /&gt;
&lt;br /&gt;
* '''For all operations:'''&lt;br /&gt;
** [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;)&lt;br /&gt;
* '''For full functionality:'''&lt;br /&gt;
** [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
** [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
** [http://jacquev6.github.io/PyGithub/ PyGithub] = v1&lt;br /&gt;
** [https://github.com/chardet/chardet chardet]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
=== Invoking the Wizard ===&lt;br /&gt;
&lt;br /&gt;
In your favorite terminal program running a POSIX-compliant shell (on Windows, &amp;quot;git bash&amp;quot; is strongly recommended), run:&lt;br /&gt;
&lt;br /&gt;
 /path/to/slicer/bin/slicerExtensionWizard&lt;br /&gt;
&lt;br /&gt;
...replacing '&amp;lt;code&amp;gt;/path/to&amp;lt;/code&amp;gt;' with the (relative or absolute) path to your Slicer build or install.&lt;br /&gt;
&lt;br /&gt;
{{notice|You can also add '&amp;lt;code&amp;gt;''/path/to/slicer''/bin&amp;lt;/code&amp;gt;' to your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;. For the sake of brevity, we'll assume that you've done so for the remainder of this document.}}&lt;br /&gt;
&lt;br /&gt;
The launcher script will ensure that your Python and library paths are set correctly to find packages and libraries that are provided by Slicer, and will invoke the correct Python binary if provided by Slicer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 slicerExtensionWizard --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 slicerExtensionWizard --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 slicerExtensionWizard --addModule loadable:MyCppModule&lt;br /&gt;
 slicerExtensionWizard --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 slicerExtensionWizard --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 slicerExtensionWizard --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
More detailed information about the various module types in Slicer can be found [[Documentation/{{documentation/version}}/Developers/Modules|here]].&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 slicerExtensionWizard --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 slicerExtensionWizard --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy:&lt;br /&gt;
&lt;br /&gt;
 # Make a copy of an existing module in the same extension&lt;br /&gt;
 slicerExtensionWizard --templatePath modules=~/code/MyExtension \&lt;br /&gt;
                       --templateKey ModuleOne=ModuleOne \&lt;br /&gt;
                       --addModule ModuleOne:ModuleTwo \&lt;br /&gt;
                       ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
Here is a simple recipe that will work in many cases (assumes you are on not-Windows or using the git-msys shell):&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # You may also want to pass '-G &amp;quot;&amp;amp;lt;generator&amp;amp;gt;&amp;quot;' here (required on Windows)&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
{{notice|If the above leaves you scratching your head, don't worry; the default behavior if you haven't configured anything else is simply to prompt you for your user name and password. Setting up either a password manager or credential caching is recommended however, as some operations may otherwise require you to provide your password more than once.}}&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 slicerExtensionWizard --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 slicerExtensionWizard --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 slicerExtensionWizard --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=38078</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=38078"/>
		<updated>2014-06-02T22:23:19Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: update instructions for recently added wizard launcher script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
If you already have git (or won't be using the operations that require git), the easiest way to let the Slicer superbuild build its own Python, which will also build the various required Python packages. For full functionality, you will also need [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows).&lt;br /&gt;
&lt;br /&gt;
{{notice|On Windows, you will also need [http://www.gnu.org/software/bash/ bash] to use the launcher script. The &amp;quot;git bash&amp;quot; that comes with msys git should suffice.}}&lt;br /&gt;
&lt;br /&gt;
If you want to use your own (e.g. system) Python, you will need:&lt;br /&gt;
&lt;br /&gt;
* '''For all operations:'''&lt;br /&gt;
** [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;)&lt;br /&gt;
* '''For full functionality:'''&lt;br /&gt;
** [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
** [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
** [http://jacquev6.github.io/PyGithub/ PyGithub] = v1&lt;br /&gt;
** [https://github.com/chardet/chardet chardet]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
=== Invoking the Wizard ===&lt;br /&gt;
&lt;br /&gt;
In your favorite terminal program running a POSIX-compliant shell (on Windows, &amp;quot;git bash&amp;quot; is strongly recommended), run:&lt;br /&gt;
&lt;br /&gt;
 /path/to/slicer/bin/slicerExtensionWizard&lt;br /&gt;
&lt;br /&gt;
...replacing '&amp;lt;code&amp;gt;/path/to&amp;lt;/code&amp;gt;' with the (relative or absolute) path to your Slicer build or install.&lt;br /&gt;
&lt;br /&gt;
{{notice|You can also add '&amp;lt;code&amp;gt;''/path/to/slicer''/bin&amp;lt;/code&amp;gt;' to your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt;. For the sake of brevity, we'll assume that you've done so for the remainder of this document.}}&lt;br /&gt;
&lt;br /&gt;
The launcher script will ensure that your Python and library paths are set correctly to find packages and libraries that are provided by Slicer, and will invoke the correct Python binary if provided by Slicer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 slicerExtensionWizard --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 slicerExtensionWizard --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 slicerExtensionWizard --addModule loadable:MyCppModule&lt;br /&gt;
 slicerExtensionWizard --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 slicerExtensionWizard --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 slicerExtensionWizard --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
More detailed information about the various module types in Slicer can be found [[Documentation/{{documentation/version}}/Developers/Modules|here]].&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 slicerExtensionWizard --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 slicerExtensionWizard --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy:&lt;br /&gt;
&lt;br /&gt;
 # Make a copy of an existing module in the same extension&lt;br /&gt;
 slicerExtensionWizard --templatePath modules=~/code/MyExtension \&lt;br /&gt;
                       --templateKey ModuleOne=ModuleOne \&lt;br /&gt;
                       --addModule ModuleOne:ModuleTwo \&lt;br /&gt;
                       ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
Here is a simple recipe that will work in many cases (assumes you are on not-Windows or using the git-msys shell):&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # You may also want to pass '-G &amp;quot;&amp;amp;lt;generator&amp;amp;gt;&amp;quot;' here (required on Windows)&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
{{notice|If the above leaves you scratching your head, don't worry; the default behavior if you haven't configured anything else is simply to prompt you for your user name and password. Setting up either a password manager or credential caching is recommended however, as some operations may otherwise require you to provide your password more than once.}}&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 slicerExtensionWizard --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 slicerExtensionWizard --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 slicerExtensionWizard --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=38016</id>
		<title>Documentation/Labs/ExtensionsFrameworkRoadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=38016"/>
		<updated>2014-05-21T20:46:48Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves as roadmap for the Slicer Extensions framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Extension contribution process =&lt;br /&gt;
&lt;br /&gt;
The goal here is to simplify the number of steps allowing people to contribute extension. &lt;br /&gt;
&lt;br /&gt;
More specifically, we would like to make it very easy for people to create a python extension by:&lt;br /&gt;
* removing the need for a Slicer build tree&lt;br /&gt;
* reducing the number of steps required to create and load an extension from a template&lt;br /&gt;
* simplifying how an extension is contributed to the index&lt;br /&gt;
* simplifying how an extension can be uploaded to the extension server&lt;br /&gt;
&lt;br /&gt;
== Current process ==&lt;br /&gt;
&lt;br /&gt;
The current process to create an empty extension is documented [[Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions|here]], then the steps to contribute the extension are documented [[Documentation/Nightly/Developers/Tutorials/Contribute_Extension_Description_File|here]].&lt;br /&gt;
&lt;br /&gt;
For all type of extension (C++ or python), the steps can then be summarized as:&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''5 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Github: Create a repository&lt;br /&gt;
# Workstation -&amp;gt; Github: Push local work on Github&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to Index ===&lt;br /&gt;
# SlicerWiki: Create documentation page&lt;br /&gt;
# Extension Server: Create an account&lt;br /&gt;
# Extension Server: Join community&lt;br /&gt;
# Extension Server: Ask permission for experimental folder.&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Github: Fork ExtensionsIndex&lt;br /&gt;
# Workstation: Clone fork locally&lt;br /&gt;
# Workstation: Create branch add-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Push the topic to fork&lt;br /&gt;
# Github: Click on Pull request button &lt;br /&gt;
&lt;br /&gt;
=== To update an extension in Index ===&lt;br /&gt;
# SlicerWiki: Update documentation page&lt;br /&gt;
# Workstation: In extension index clone: '''5 commands to type'''&lt;br /&gt;
# Workstation: Create branch update-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Create pull request manually creating the URL&lt;br /&gt;
# Github: Add a comment in the pull request with a Compare link also manually generated&lt;br /&gt;
&lt;br /&gt;
== Proposed changes ==&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''1 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For scripted extensions, creation directly from within Slicer:&lt;br /&gt;
&lt;br /&gt;
# Slicer: Modules -&amp;gt; Developer -&amp;gt; ExtensionWizard&lt;br /&gt;
# ExtensionWizard module: Set name, description, contributors etc ... then click on Create&lt;br /&gt;
## Set the working directory ? Where to create.&lt;br /&gt;
## External link to the github account creation page (will open web browswer or tab in the extension manager ?)&lt;br /&gt;
## Optionally create github repo and pre-populate repo ...&lt;br /&gt;
# Path to the module(s) in extension should be added to the additional module path.&lt;br /&gt;
# Slicer: Restart - 'Foo' module should show up. ''Note: This last step could probably be removed''&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Workstation -&amp;gt; Github: Create repository done with '''1 command'''. &amp;lt;code&amp;gt;ExtensionWizard.py --publish ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For scripted extensions:&lt;br /&gt;
&lt;br /&gt;
# initial publish on github done from the ExtensionWizard module. See above&lt;br /&gt;
&lt;br /&gt;
=== To publish extension code update===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the workflow is:&lt;br /&gt;
&lt;br /&gt;
# git commit, ..., git push&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to the Index  ===&lt;br /&gt;
# SlicerWiki: Create documentation page.&lt;br /&gt;
## Need to check with BHW if wiki version can be updated so that any IP could use the mediawiki API&lt;br /&gt;
# Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]&lt;br /&gt;
## Create a &amp;quot;Slicer Extensions&amp;quot; community where user have to request access&lt;br /&gt;
## Folks belonging to the &amp;quot;Slicer Extensions&amp;quot; would be automatically be granted access&lt;br /&gt;
## Jc: Check with Midas team with user can request access to community&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
## Update [[Documentation/Nightly/Developers/Tutorials/ObtainExtensionServerApiKey|documentation]] to explain that MIDAS_API_* variable can be set in the env.&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Add extension to the index using '''1 command''': &amp;lt;code&amp;gt;ExtensionWizard.py --contribute --target master ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Improve Wizard to create empty extension: reduce number of terminal commands to 1&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3566 3566: Wizard: Simplify creation of extensions/modules]: {{done}} Completed - Review in progress&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add ExtensionWizard wiki page]: {{done}} Completed - Review in progress -See [[Documentation/Nightly/Developers/ExtensionWizard]]&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add developer documentation for ExtensionWizard]: {{done}} Completed - Review in progress - See [http://mwoehlke-kitware.github.io/Slicer/SlicerWizard/]&lt;br /&gt;
* Publish extension on Github by creating github repo - {{done}} Completed - Review in progress&lt;br /&gt;
&lt;br /&gt;
* In case of Python extension, remove the need for a Slicer build tree: '''50%''' &lt;br /&gt;
** Wizard: Remove dependency on build tree or CMake generated file. {{done}} - Review in progress&lt;br /&gt;
** Add install rules for the template source code - To make them available from an installed Slicer&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3269 3269: Simplify contribution of scripted extension]: '''50%'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3603 3603 Slicer: Creation of python extension directly from Slicer.] {{review}} '''Awaiting Review'''&lt;br /&gt;
*** Slicer: Optional Restart.  '''ToBeDone''' (do we actually need this?)&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3604 3604 ExtensionServer: Consolidate ExtensionsIndex account creation.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3605 3605 SlicerWiki: Automatic creation of extension wiki page.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3606 3606 Slicer: Given an extension python script. Should be possible to upload the extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
= Extensions Catalog / Manager =&lt;br /&gt;
&lt;br /&gt;
The goal here is to improve the overall user experience associated with the extension catalog. &lt;br /&gt;
&lt;br /&gt;
When accessed from within Slicer the catalog is also referred as extensions manager.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3564 3564: Add search option in extension manager].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3602 3602: ExensionsManager - Add a &amp;quot;Show url&amp;quot; link'].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2089 2089: Either on-demand or when slicer starts, check if there are available extensions update.]. '''ToBeDone'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3607 3607: ExtensionManager: Exclude category &amp;quot;Example&amp;quot; from &amp;quot;All&amp;quot; listing ].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2779 2779: Mechanism to keep track of the installed extensions across version]. '''ToBeDone'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=2912 2912: Install dependent extensions ].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
&lt;br /&gt;
* Low priority:&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2334 2334: Differentiate different type of extenions in extension manager: Concept of channel]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2778 2778: Add &amp;quot;Download stats&amp;quot; on each extension page ]. '''ToBeDone'''&lt;br /&gt;
** &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3608 3608: ExtensionsManager: Display description for installed extensions.].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
** Consolidate rating across extension version. See [https://github.com/midasplatform/slicerappstore/issues/9#issuecomment-15643678 midasplatform/slicerappstore/issues/9]&lt;br /&gt;
&lt;br /&gt;
= Extension developer documentation =&lt;br /&gt;
&lt;br /&gt;
The goal is to consolidate the existing documentation so that it is easy to understand what is the python API available to the Slicer python extension developer.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Generate Slicer python API documentation. '''In progress'''. See experiment http://mwoehlke-kitware.github.io/Slicer/Base/&lt;br /&gt;
&lt;br /&gt;
= Extensions Wizard UI =&lt;br /&gt;
&lt;br /&gt;
The wizard UI will provide a Slicer module allowing to:&lt;br /&gt;
* easily create / publish / contribute extensions directly from Slicer. &lt;br /&gt;
* directly load scripted modules after they are created.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-in-app-wizard1.png|250px]]&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
See issues [http://na-mic.org/Mantis/view.php?id=3603 #3603], [http://na-mic.org/Mantis/view.php?id=3606 #3606] listed above.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37885</id>
		<title>Documentation/Labs/ExtensionsFrameworkRoadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37885"/>
		<updated>2014-05-05T21:15:03Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves as roadmap for the Slicer Extensions framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Extension contribution process =&lt;br /&gt;
&lt;br /&gt;
The goal here is to simplify the number of steps allowing people to contribute extension. &lt;br /&gt;
&lt;br /&gt;
More specifically, we would like to make it very easy for people to create a python extension by:&lt;br /&gt;
* removing the need for a Slicer build tree&lt;br /&gt;
* reducing the number of steps required to create and load an extension from a template&lt;br /&gt;
* simplifying how an extension is contributed to the index&lt;br /&gt;
* simplifying how an extension can be uploaded to the extension server&lt;br /&gt;
&lt;br /&gt;
== Current process ==&lt;br /&gt;
&lt;br /&gt;
The current process to create an empty extension is documented [[Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions|here]], then the steps to contribute the extension are documented [[Documentation/Nightly/Developers/Tutorials/Contribute_Extension_Description_File|here]].&lt;br /&gt;
&lt;br /&gt;
For all type of extension (C++ or python), the steps can then be summarized as:&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''5 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Github: Create a repository&lt;br /&gt;
# Workstation -&amp;gt; Github: Push local work on Github&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to Index ===&lt;br /&gt;
# SlicerWiki: Create documentation page&lt;br /&gt;
# Extension Server: Create an account&lt;br /&gt;
# Extension Server: Join community&lt;br /&gt;
# Extension Server: Ask permission for experimental folder.&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Github: Fork ExtensionsIndex&lt;br /&gt;
# Workstation: Clone fork locally&lt;br /&gt;
# Workstation: Create branch add-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Push the topic to fork&lt;br /&gt;
# Github: Click on Pull request button &lt;br /&gt;
&lt;br /&gt;
=== To update an extension in Index ===&lt;br /&gt;
# SlicerWiki: Update documentation page&lt;br /&gt;
# Workstation: In extension index clone: '''5 commands to type'''&lt;br /&gt;
# Workstation: Create branch update-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Create pull request manually creating the URL&lt;br /&gt;
# Github: Add a comment in the pull request with a Compare link also manually generated&lt;br /&gt;
&lt;br /&gt;
== Proposed changes ==&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''1 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For scripted extensions, creation directly from within Slicer:&lt;br /&gt;
&lt;br /&gt;
# Slicer: Modules -&amp;gt; Developer -&amp;gt; ExtensionWizard&lt;br /&gt;
# ExtensionWizard module: Set name, description, contributors etc ... then click on Create&lt;br /&gt;
## Set the working directory ? Where to create.&lt;br /&gt;
## External link to the github account creation page (will open web browswer or tab in the extension manager ?)&lt;br /&gt;
## Optionally create github repo and pre-populate repo ...&lt;br /&gt;
# Path to the module(s) in extension should be added to the additional module path.&lt;br /&gt;
# Slicer: Restart - 'Foo' module should show up. ''Note: This last step could probably be removed''&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Workstation -&amp;gt; Github: Create repository done with '''1 command'''. &amp;lt;code&amp;gt;ExtensionWizard.py --publish ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For scripted extensions:&lt;br /&gt;
&lt;br /&gt;
# initial publish on github done from the ExtensionWizard module. See above&lt;br /&gt;
&lt;br /&gt;
=== To publish extension code update===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the workflow is:&lt;br /&gt;
&lt;br /&gt;
# git commit, ..., git push&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to the Index  ===&lt;br /&gt;
# SlicerWiki: Create documentation page.&lt;br /&gt;
## Need to check with BHW if wiki version can be updated so that any IP could use the mediawiki API&lt;br /&gt;
# Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]&lt;br /&gt;
## Create a &amp;quot;Slicer Extensions&amp;quot; community where user have to request access&lt;br /&gt;
## Folks belonging to the &amp;quot;Slicer Extensions&amp;quot; would be automatically be granted access&lt;br /&gt;
## Jc: Check with Midas team with user can request access to community&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
## Update [[Documentation/Nightly/Developers/Tutorials/ObtainExtensionServerApiKey|documentation]] to explain that MIDAS_API_* variable can be set in the env.&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Add extension to the index using '''1 command''': &amp;lt;code&amp;gt;ExtensionWizard.py --contribute --target master ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Improve Wizard to create empty extension: reduce number of terminal commands to 1&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3566 3566: Wizard: Simplify creation of extensions/modules]: {{done}} Completed - Review in progress&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add ExtensionWizard wiki page]: {{done}} Completed - Review in progress -See [[Documentation/Nightly/Developers/ExtensionWizard]]&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add developer documentation for ExtensionWizard]: {{done}} Completed - Review in progress - See [http://mwoehlke-kitware.github.io/Slicer/SlicerWizard/]&lt;br /&gt;
* Publish extension on Github by creating github repo - {{done}} Completed - Review in progress&lt;br /&gt;
&lt;br /&gt;
* In case of Python extension, remove the need for a Slicer build tree: '''50%''' &lt;br /&gt;
** Wizard: Remove dependency on build tree or CMake generated file. {{done}} - Review in progress&lt;br /&gt;
** Add install rules for the template source code - To make them available from an installed Slicer&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3269 3269: Simplify contribution of scripted extension]: '''50%'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3603 3603 Slicer: Creation of python extension directly from Slicer.] {{review}} '''Awaiting Review'''&lt;br /&gt;
*** Slicer: Optional Restart.  '''ToBeDone''' (do we actually need this?)&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3604 3604 ExtensionServer: Consolidate ExtensionsIndex account creation.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3605 3605 SlicerWiki: Automatic creation of extension wiki page.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3606 3606 Slicer: Given an extension python script. Should be possible to upload the extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
= Extensions Catalog / Manager =&lt;br /&gt;
&lt;br /&gt;
The goal here is to improve the overall user experience associated with the extension catalog. &lt;br /&gt;
&lt;br /&gt;
When accessed from within Slicer the catalog is also referred as extensions manager.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3564 3564: Add search option in extension manager].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3602 3602: ExensionsManager - Add a &amp;quot;Show url&amp;quot; link'].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2089 2089: Either on-demand or when slicer starts, check if there are available extensions update.]. '''ToBeDone'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3607 3607: ExtensionManager: Exclude category &amp;quot;Example&amp;quot; from &amp;quot;All&amp;quot; listing ].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2779 2779: Mechanism to keep track of the installed extensions across version]. '''ToBeDone'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2912 2912: Install dependent extensions ]. '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* Low priority:&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2334 2334: Differentiate different type of extenions in extension manager: Concept of channel]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2778 2778: Add &amp;quot;Download stats&amp;quot; on each extension page ]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3608 3608: ExtensionsManager: Display description for installed extensions.]. {{review}} '''Awaiting Review'''&lt;br /&gt;
** Consolidate rating across extension version. See [https://github.com/midasplatform/slicerappstore/issues/9#issuecomment-15643678 midasplatform/slicerappstore/issues/9]&lt;br /&gt;
&lt;br /&gt;
= Extension developer documentation =&lt;br /&gt;
&lt;br /&gt;
The goal is to consolidate the existing documentation so that it is easy to understand what is the python API available to the Slicer python extension developer.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Generate Slicer python API documentation. '''In progress'''. See experiment http://mwoehlke-kitware.github.io/Slicer/Base/&lt;br /&gt;
&lt;br /&gt;
= Extensions Wizard UI =&lt;br /&gt;
&lt;br /&gt;
The wizard UI will provide a Slicer module allowing to:&lt;br /&gt;
* easily create / publish / contribute extensions directly from Slicer. &lt;br /&gt;
* directly load scripted modules after they are created.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-in-app-wizard1.png|250px]]&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
See issues [http://na-mic.org/Mantis/view.php?id=3603 #3603], [http://na-mic.org/Mantis/view.php?id=3606 #3606] listed above.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37637</id>
		<title>Documentation/Labs/ExtensionsFrameworkRoadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37637"/>
		<updated>2014-04-18T18:17:51Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves as roadmap for the Slicer Extensions framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Extension contribution process =&lt;br /&gt;
&lt;br /&gt;
The goal here is to simplify the number of steps allowing people to contribute extension. &lt;br /&gt;
&lt;br /&gt;
More specifically, we would like to make it very easy for people to create a python extension by:&lt;br /&gt;
* removing the need for a Slicer build tree&lt;br /&gt;
* reducing the number of steps required to create and load an extension from a template&lt;br /&gt;
* simplifying how an extension is contributed to the index&lt;br /&gt;
* simplifying how an extension can be uploaded to the extension server&lt;br /&gt;
&lt;br /&gt;
== Current process ==&lt;br /&gt;
&lt;br /&gt;
The current process to create an empty extension is documented [[Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions|here]], then the steps to contribute the extension are documented [[Documentation/Nightly/Developers/Tutorials/Contribute_Extension_Description_File|here]].&lt;br /&gt;
&lt;br /&gt;
For all type of extension (C++ or python), the steps can then be summarized as:&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''5 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Github: Create a repository&lt;br /&gt;
# Workstation -&amp;gt; Github: Push local work on Github&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to Index ===&lt;br /&gt;
# SlicerWiki: Create documentation page&lt;br /&gt;
# Extension Server: Create an account&lt;br /&gt;
# Extension Server: Join community&lt;br /&gt;
# Extension Server: Ask permission for experimental folder.&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Github: Fork ExtensionsIndex&lt;br /&gt;
# Workstation: Clone fork locally&lt;br /&gt;
# Workstation: Create branch add-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Push the topic to fork&lt;br /&gt;
# Github: Click on Pull request button &lt;br /&gt;
&lt;br /&gt;
=== To update an extension in Index ===&lt;br /&gt;
# SlicerWiki: Update documentation page&lt;br /&gt;
# Workstation: In extension index clone: '''5 commands to type'''&lt;br /&gt;
# Workstation: Create branch update-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Create pull request manually creating the URL&lt;br /&gt;
# Github: Add a comment in the pull request with a Compare link also manually generated&lt;br /&gt;
&lt;br /&gt;
== Proposed changes ==&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''1 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For scripted extensions, creation directly from within Slicer:&lt;br /&gt;
&lt;br /&gt;
# Slicer: Modules -&amp;gt; Developer -&amp;gt; ExtensionWizard&lt;br /&gt;
# ExtensionWizard module: Set name, description, contributors etc ... then click on Create&lt;br /&gt;
## Set the working directory ? Where to create.&lt;br /&gt;
## External link to the github account creation page (will open web browswer or tab in the extension manager ?)&lt;br /&gt;
## Optionally create github repo and pre-populate repo ...&lt;br /&gt;
# Path to the module(s) in extension should be added to the additional module path.&lt;br /&gt;
# Slicer: Restart - 'Foo' module should show up. ''Note: This last step could probably be removed''&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Workstation -&amp;gt; Github: Create repository done with '''1 command'''. &amp;lt;code&amp;gt;ExtensionWizard.py --publish ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For scripted extensions:&lt;br /&gt;
&lt;br /&gt;
# initial publish on github done from the ExtensionWizard module. See above&lt;br /&gt;
&lt;br /&gt;
=== To publish extension code update===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the workflow is:&lt;br /&gt;
&lt;br /&gt;
# git commit, ..., git push&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to the Index  ===&lt;br /&gt;
# SlicerWiki: Create documentation page.&lt;br /&gt;
## Need to check with BHW if wiki version can be updated so that any IP could use the mediawiki API&lt;br /&gt;
# Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]&lt;br /&gt;
## Create a &amp;quot;Slicer Extensions&amp;quot; community where user have to request access&lt;br /&gt;
## Folks belonging to the &amp;quot;Slicer Extensions&amp;quot; would be automatically be granted access&lt;br /&gt;
## Jc: Check with Midas team with user can request access to community&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
## Update [[Documentation/Nightly/Developers/Tutorials/ObtainExtensionServerApiKey|documentation]] to explain that MIDAS_API_* variable can be set in the env.&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Add extension to the index using '''1 command''': &amp;lt;code&amp;gt;ExtensionWizard.py --contribute --target master ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Improve Wizard to create empty extension: reduce number of terminal commands to 1&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3566 3566: Wizard: Simplify creation of extensions/modules]: {{done}} Completed - Review in progress&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add ExtensionWizard wiki page]: {{done}} Completed - Review in progress -See [[Documentation/Nightly/Developers/ExtensionWizard]]&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add developer documentation for ExtensionWizard]: {{done}} Completed - Review in progress - See [http://mwoehlke-kitware.github.io/Slicer/SlicerWizard/]&lt;br /&gt;
* Publish extension on Github by creating github repo - {{done}} Completed - Review in progress&lt;br /&gt;
&lt;br /&gt;
* In case of Python extension, remove the need for a Slicer build tree: '''50%''' &lt;br /&gt;
** Wizard: Remove dependency on build tree or CMake generated file. {{done}} - Review in progress&lt;br /&gt;
** Add install rules for the template source code - To make them available from an installed Slicer&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3269 3269: Simplify contribution of scripted extension]: '''50%'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3603 3603 Slicer: Creation of python extension directly from Slicer.] {{review}} '''Awaiting Review'''&lt;br /&gt;
*** Slicer: Optional Restart.  '''ToBeDone''' (do we actually need this?)&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3604 3604 ExtensionServer: Consolidate ExtensionsIndex account creation.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3605 3605 SlicerWiki: Automatic creation of extension wiki page.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3606 3606 Slicer: Given an extension python script. Should be possible to upload the extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
= Extensions Catalog / Manager =&lt;br /&gt;
&lt;br /&gt;
The goal here is to improve the overall user experience associated with the extension catalog. &lt;br /&gt;
&lt;br /&gt;
When accessed from within Slicer the catalog is also referred as extensions manager.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3564 3564: Add search option in extension manager]. {{review}} '''Awaiting Review'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3602 3602: ExensionsManager - Add a &amp;quot;Show url&amp;quot; link'].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2089 2089: Either on-demand or when slicer starts, check if there are available extensions update.]. '''ToBeDone'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3607 3607: ExtensionManager: Exclude category &amp;quot;Example&amp;quot; from &amp;quot;All&amp;quot; listing ].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2779 2779: Mechanism to keep track of the installed extensions across version]. '''ToBeDone'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2912 2912: Install dependent extensions ]. '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* Low priority:&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2334 2334: Differentiate different type of extenions in extension manager: Concept of channel]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2778 2778: Add &amp;quot;Download stats&amp;quot; on each extension page ]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3608 3608: ExtensionsManager: Display description for installed extensions.]. Code complete, waiting on [http://na-mic.org/Mantis/view.php?id=3564 3564] to be merged&lt;br /&gt;
** Consolidate rating across extension version. See [https://github.com/midasplatform/slicerappstore/issues/9#issuecomment-15643678 midasplatform/slicerappstore/issues/9]&lt;br /&gt;
&lt;br /&gt;
= Extension developer documentation =&lt;br /&gt;
&lt;br /&gt;
The goal is to consolidate the existing documentation so that it is easy to understand what is the python API available to the Slicer python extension developer.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Generate Slicer python API documentation. '''In progress'''. See experiment http://mwoehlke-kitware.github.io/Slicer/Base/&lt;br /&gt;
&lt;br /&gt;
= Extensions Wizard UI =&lt;br /&gt;
&lt;br /&gt;
The wizard UI will provide a Slicer module allowing to:&lt;br /&gt;
* easily create / publish / contribute extensions directly from Slicer. &lt;br /&gt;
* directly load scripted modules after they are created.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-in-app-wizard1.png|250px]]&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
See issues [http://na-mic.org/Mantis/view.php?id=3603 #3603], [http://na-mic.org/Mantis/view.php?id=3606 #3606] listed above.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37595</id>
		<title>Documentation/Labs/ExtensionsFrameworkRoadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37595"/>
		<updated>2014-04-15T15:33:02Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves as roadmap for the Slicer Extensions framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Extension contribution process =&lt;br /&gt;
&lt;br /&gt;
The goal here is to simplify the number of steps allowing people to contribute extension. &lt;br /&gt;
&lt;br /&gt;
More specifically, we would like to make it very easy for people to create a python extension by:&lt;br /&gt;
* removing the need for a Slicer build tree&lt;br /&gt;
* reducing the number of steps required to create and load an extension from a template&lt;br /&gt;
* simplifying how an extension is contributed to the index&lt;br /&gt;
* simplifying how an extension can be uploaded to the extension server&lt;br /&gt;
&lt;br /&gt;
== Current process ==&lt;br /&gt;
&lt;br /&gt;
The current process to create an empty extension is documented [[Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions|here]], then the steps to contribute the extension are documented [[Documentation/Nightly/Developers/Tutorials/Contribute_Extension_Description_File|here]].&lt;br /&gt;
&lt;br /&gt;
For all type of extension (C++ or python), the steps can then be summarized as:&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''5 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Github: Create a repository&lt;br /&gt;
# Workstation -&amp;gt; Github: Push local work on Github&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to Index ===&lt;br /&gt;
# SlicerWiki: Create documentation page&lt;br /&gt;
# Extension Server: Create an account&lt;br /&gt;
# Extension Server: Join community&lt;br /&gt;
# Extension Server: Ask permission for experimental folder.&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Github: Fork ExtensionsIndex&lt;br /&gt;
# Workstation: Clone fork locally&lt;br /&gt;
# Workstation: Create branch add-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Push the topic to fork&lt;br /&gt;
# Github: Click on Pull request button &lt;br /&gt;
&lt;br /&gt;
=== To update an extension in Index ===&lt;br /&gt;
# SlicerWiki: Update documentation page&lt;br /&gt;
# Workstation: In extension index clone: '''5 commands to type'''&lt;br /&gt;
# Workstation: Create branch update-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Create pull request manually creating the URL&lt;br /&gt;
# Github: Add a comment in the pull request with a Compare link also manually generated&lt;br /&gt;
&lt;br /&gt;
== Proposed changes ==&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''1 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For scripted extensions, creation directly from within Slicer:&lt;br /&gt;
&lt;br /&gt;
# Slicer: Modules -&amp;gt; Developer -&amp;gt; ExtensionWizard&lt;br /&gt;
# ExtensionWizard module: Set name, description, contributors etc ... then click on Create&lt;br /&gt;
## Set the working directory ? Where to create.&lt;br /&gt;
## External link to the github account creation page (will open web browswer or tab in the extension manager ?)&lt;br /&gt;
## Optionally create github repo and pre-populate repo ...&lt;br /&gt;
# Path to the module(s) in extension should be added to the additional module path.&lt;br /&gt;
# Slicer: Restart - 'Foo' module should show up. ''Note: This last step could probably be removed''&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Workstation -&amp;gt; Github: Create repository done with '''1 command'''. &amp;lt;code&amp;gt;ExtensionWizard.py --publish ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For scripted extensions:&lt;br /&gt;
&lt;br /&gt;
# initial publish on github done from the ExtensionWizard module. See above&lt;br /&gt;
&lt;br /&gt;
=== To publish extension code update===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the workflow is:&lt;br /&gt;
&lt;br /&gt;
# git commit, ..., git push&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to the Index  ===&lt;br /&gt;
# SlicerWiki: Create documentation page.&lt;br /&gt;
## Need to check with BHW if wiki version can be updated so that any IP could use the mediawiki API&lt;br /&gt;
# Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]&lt;br /&gt;
## Create a &amp;quot;Slicer Extensions&amp;quot; community where user have to request access&lt;br /&gt;
## Folks belonging to the &amp;quot;Slicer Extensions&amp;quot; would be automatically be granted access&lt;br /&gt;
## Jc: Check with Midas team with user can request access to community&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
## Update [[Documentation/Nightly/Developers/Tutorials/ObtainExtensionServerApiKey|documentation]] to explain that MIDAS_API_* variable can be set in the env.&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Add extension to the index using '''1 command''': &amp;lt;code&amp;gt;ExtensionWizard.py --contribute --target master ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Improve Wizard to create empty extension: reduce number of terminal commands to 1&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3566 3566: Wizard: Simplify creation of extensions/modules]: {{done}} Completed - Review in progress&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add ExtensionWizard wiki page]: {{done}} Completed - Review in progress -See [[Documentation/Nightly/Developers/ExtensionWizard]]&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add developer documentation for ExtensionWizard]: {{done}} Completed - Review in progress - See [http://mwoehlke-kitware.github.io/Slicer/SlicerWizard/]&lt;br /&gt;
* Publish extension on Github by creating github repo - {{done}} Completed - Review in progress&lt;br /&gt;
&lt;br /&gt;
* In case of Python extension, remove the need for a Slicer build tree: '''50%''' &lt;br /&gt;
** Wizard: Remove dependency on build tree or CMake generated file. {{done}} - Review in progress&lt;br /&gt;
** Add install rules for the template source code - To make them available from an installed Slicer&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3269 3269: Simplify contribution of scripted extension]: '''50%'''&lt;br /&gt;
** Slicer: Creation of python extension directly from within Slicer. '''ToBeDone'''&lt;br /&gt;
*** Slicer: Optional Restart.  '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3603 3603 Slicer: Creation of python extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3604 3604 ExtensionServer: Consolidate ExtensionsIndex account creation.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3605 3605 SlicerWiki: Automatic creation of extension wiki page.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3606 3606 Slicer: Given an extension python script. Should be possible to upload the extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
= Extensions Catalog / Manager =&lt;br /&gt;
&lt;br /&gt;
The goal here is to improve the overall user experience associated with the extension catalog. &lt;br /&gt;
&lt;br /&gt;
When accessed from within Slicer the catalog is also referred as extensions manager.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3564 3564: Add search option in extension manager]. {{review}} '''Awaiting Review'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3602 3602: ExensionsManager - Add a &amp;quot;Show url&amp;quot; link'].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2089 2089: Either on-demand or when slicer starts, check if there are available extensions update.]. '''ToBeDone'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3607 3607: ExtensionManager: Exclude category &amp;quot;Example&amp;quot; from &amp;quot;All&amp;quot; listing ].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2779 2779: Mechanism to keep track of the installed extensions across version]. '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* Low priority:&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2334 2334: Differentiate different type of extenions in extension manager: Concept of channel]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2778 2778: Add &amp;quot;Download stats&amp;quot; on each extension page ]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3608 3608: ExtensionsManager: Display description for installed extensions.]. Code complete, waiting on [http://na-mic.org/Mantis/view.php?id=3564 3564] to be merged&lt;br /&gt;
** Consolidate rating across extension version. See [https://github.com/midasplatform/slicerappstore/issues/9#issuecomment-15643678 midasplatform/slicerappstore/issues/9]&lt;br /&gt;
&lt;br /&gt;
= Extension developer documentation =&lt;br /&gt;
&lt;br /&gt;
The goal is to consolidate the existing documentation so that it is easy to understand what is the python API available to the Slicer python extension developer.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Generate Slicer python API documentation. '''In progress'''. See experiment http://mwoehlke-kitware.github.io/Slicer/Base/&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/FHSCompliantDirectoryStructure&amp;diff=37578</id>
		<title>Documentation/Labs/FHSCompliantDirectoryStructure</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/FHSCompliantDirectoryStructure&amp;diff=37578"/>
		<updated>2014-04-10T20:52:24Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current install tree structure as documented on [[Documentation/Nightly/Developers]] is not fully compliant with the [https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard Filesystem Hierarchy Standard]. This page aims at documentation how the structure could be updated.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
For reasons that hopefully do not require enumeration, it is desirable for Slicer to install in a reasonable manner to a system standard prefix, e.g. &amp;lt;tt&amp;gt;/usr/local&amp;lt;/tt&amp;gt; or even &amp;lt;tt&amp;gt;/usr&amp;lt;/tt&amp;gt;. Ultimately, it would be very cool if distributions were able to package slicer, for which reasonable FHS compliance is a requirement.&lt;br /&gt;
&lt;br /&gt;
== Proposal ==&lt;br /&gt;
&lt;br /&gt;
(Originally by Matthew Woehlke - April 10, 2014)&lt;br /&gt;
&lt;br /&gt;
* move &amp;lt;tt&amp;gt;/Slicer&amp;lt;/tt&amp;gt;&amp;lt;sup&amp;gt;[[#fn1|[1]]]&amp;lt;/sup&amp;gt; to &amp;lt;tt&amp;gt;/bin/&amp;lt;/tt&amp;gt;&lt;br /&gt;
* move &amp;lt;tt&amp;gt;/bin/Python&amp;lt;/tt&amp;gt;&amp;lt;sup&amp;gt;[[#fn2|[2]]]&amp;lt;/sup&amp;gt; to one&amp;lt;sup&amp;gt;[[#fn3|[3]]]&amp;lt;/sup&amp;gt; of:&lt;br /&gt;
** &amp;lt;tt&amp;gt;/lib/python-${PyVer}/site-packages&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;/lib/python-${PyVer}/site-packages/slicer${VerMajor}&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;/share/Slicer-${Ver}/&amp;lt;/tt&amp;gt;&lt;br /&gt;
*** ...and move &amp;lt;tt&amp;gt;/bin/Python/SlicerWizard&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;/lib/python-${PyVer}/site-packages&amp;lt;/tt&amp;gt;&lt;br /&gt;
* move &amp;lt;tt&amp;gt;/lib/Python/*&amp;lt;/tt&amp;gt;&amp;lt;sup&amp;gt;[[#fn4|[4]]]&amp;lt;/sup&amp;gt; to &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
* move &amp;lt;tt&amp;gt;/lib/TclTk/*&amp;lt;/tt&amp;gt;&amp;lt;sup&amp;gt;[[#fn4|[4]]]&amp;lt;/sup&amp;gt; to &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
* move &amp;lt;tt&amp;gt;/lib/QtPlugins&amp;lt;/tt&amp;gt;&amp;lt;sup&amp;gt;[[#fn5|[5]]]&amp;lt;/sup&amp;gt; to &amp;lt;tt&amp;gt;/lib/Slicer-${Ver}/&amp;lt;/tt&amp;gt;&lt;br /&gt;
* move &amp;lt;tt&amp;gt;/lib/Slicer*/&amp;amp;lt;third party libs&amp;amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;sup&amp;gt;[[#fn4|[4]]]&amp;lt;/sup&amp;gt; to &amp;lt;tt&amp;gt;/lib/&amp;lt;/tt&amp;gt;&lt;br /&gt;
* move &amp;lt;tt&amp;gt;/bin/Slicer{LauncherSettings.ini,SplashScreen.png}&amp;lt;/tt&amp;gt;&amp;lt;sup&amp;gt;[[#fn6|[6]]]&amp;lt;/sup&amp;gt; to &amp;lt;tt&amp;gt;/share/Slicer-${Ver}/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(As a side note, honoring LIB_SUFFIX also would be nice. This is common idiom in e.g. [http://www.fedoraproject.org Fedora] packaging to install libraries to &amp;lt;tt&amp;gt;lib64&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt;, when building for architectures where that is appropriate.)&lt;br /&gt;
&lt;br /&gt;
=== Footnotes ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;span id=&amp;quot;fn1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; The FHS (e.g. 3.1) strongly discourages adding entries to &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/usr&amp;lt;/tt&amp;gt;. Anyway, this clearly should be in &amp;lt;tt&amp;gt;/bin&amp;lt;/tt&amp;gt; so that it is in a reasonable &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. On UNIX systems where &amp;lt;tt&amp;gt;PREFIX=/opt/&amp;lt;i&amp;gt;&amp;amp;lt;product&amp;amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt; (or perhaps as a CMake option), it might be okay to install a symlink in &amp;lt;tt&amp;gt;${PREFIX}&amp;lt;/tt&amp;gt;. On Windows, a shortcut could be used similarly.&lt;br /&gt;
# &amp;lt;span id=&amp;quot;fn2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; 3.4.2 forbids subdirectories in &amp;lt;tt&amp;gt;/bin&amp;lt;/tt&amp;gt;. While not stated explicitly for &amp;lt;tt&amp;gt;/usr/bin&amp;lt;/tt&amp;gt;, many systems now symlink &amp;lt;tt&amp;gt;/bin&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;/usr/bin&amp;lt;/tt&amp;gt;, implicitly forwarding the prohibition. Additionally, the files contained herein are not executables but are library code that clearly belong under &amp;lt;tt&amp;gt;/lib&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/share&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# &amp;lt;span id=&amp;quot;fn3&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Which option is selected is left to discussion. One of the &amp;lt;tt&amp;gt;/lib&amp;lt;/tt&amp;gt; choices is probably more conformant, but would make these modules accessible from a standard Python shell, which may not be desirable (except for SlicerWizard).&lt;br /&gt;
# &amp;lt;span id=&amp;quot;fn4&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; For a standard installation, all products should be installed to &amp;lt;tt&amp;gt;${PREFIX}&amp;lt;/tt&amp;gt;; &amp;lt;tt&amp;gt;&amp;lt;i&amp;gt;&amp;amp;lt;product&amp;amp;gt;&amp;lt;/i&amp;gt;_PREFIX=${Slicer_PREFIX}/lib/&amp;lt;i&amp;gt;&amp;amp;lt;product&amp;amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt; is non-standard.&lt;br /&gt;
# &amp;lt;span id=&amp;quot;fn5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Convention for third party Qt plugins (e.g. see KDE) is a subdirectory (e.g. &amp;lt;tt&amp;gt;plugins&amp;lt;/tt&amp;gt;) of &amp;lt;tt&amp;gt;/lib/&amp;lt;i&amp;gt;&amp;amp;lt;product&amp;amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# &amp;lt;span id=&amp;quot;fn6&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; These non-executable files do not belong in &amp;lt;tt&amp;gt;/bin&amp;lt;/tt&amp;gt;. While the &amp;lt;tt&amp;gt;.ini&amp;lt;/tt&amp;gt; could possible be placed in &amp;lt;tt&amp;gt;/etc&amp;lt;/tt&amp;gt;, this requires special handling in the case that &amp;lt;tt&amp;gt;PREFIX=/usr&amp;lt;/tt&amp;gt;; &amp;lt;tt&amp;gt;/share/Slicer-&amp;lt;i&amp;gt;&amp;amp;lt;Version&amp;amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt; also seems like a reasonable location and does not have this issue.&lt;br /&gt;
&lt;br /&gt;
Section references in the above are given for [http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.pdf the PDF version of FHS 2.3]. (The HTML version unfortunately does not number sections.)&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37545</id>
		<title>Documentation/Labs/ExtensionsFrameworkRoadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37545"/>
		<updated>2014-03-28T21:16:09Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves as roadmap for the Slicer Extensions framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Extension contribution process =&lt;br /&gt;
&lt;br /&gt;
The goal here is to simplify the number of steps allowing people to contribute extension. &lt;br /&gt;
&lt;br /&gt;
More specifically, we would like to make it very easy for people to create a python extension by:&lt;br /&gt;
* removing the need for a Slicer build tree&lt;br /&gt;
* reducing the number of steps required to create and load an extension from a template&lt;br /&gt;
* simplifying how an extension is contributed to the index&lt;br /&gt;
* simplifying how an extension can be uploaded to the extension server&lt;br /&gt;
&lt;br /&gt;
== Current process ==&lt;br /&gt;
&lt;br /&gt;
The current process to create an empty extension is documented [[Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions|here]], then the steps to contribute the extension are documented [[Documentation/Nightly/Developers/Tutorials/Contribute_Extension_Description_File|here]].&lt;br /&gt;
&lt;br /&gt;
For all type of extension (C++ or python), the steps can then be summarized as:&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''5 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Github: Create a repository&lt;br /&gt;
# Workstation -&amp;gt; Github: Push local work on Github&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to Index ===&lt;br /&gt;
# SlicerWiki: Create documentation page&lt;br /&gt;
# Extension Server: Create an account&lt;br /&gt;
# Extension Server: Join community&lt;br /&gt;
# Extension Server: Ask permission for experimental folder.&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Github: Fork ExtensionsIndex&lt;br /&gt;
# Workstation: Clone fork locally&lt;br /&gt;
# Workstation: Create branch add-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Push the topic to fork&lt;br /&gt;
# Github: Click on Pull request button &lt;br /&gt;
&lt;br /&gt;
=== To update an extension in Index ===&lt;br /&gt;
# SlicerWiki: Update documentation page&lt;br /&gt;
# Workstation: In extension index clone: '''5 commands to type'''&lt;br /&gt;
# Workstation: Create branch update-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Create pull request manually creating the URL&lt;br /&gt;
# Github: Add a comment in the pull request with a Compare link also manually generated&lt;br /&gt;
&lt;br /&gt;
== Proposed changes ==&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''1 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For scripted extensions, creation directly from within Slicer:&lt;br /&gt;
&lt;br /&gt;
# Slicer: Modules -&amp;gt; Developer -&amp;gt; ExtensionWizard&lt;br /&gt;
# ExtensionWizard module: Set name, description, contributors etc ... then click on Create&lt;br /&gt;
## Set the working directory ? Where to create.&lt;br /&gt;
## External link to the github account creation page (will open web browswer or tab in the extension manager ?)&lt;br /&gt;
## Optionally create github repo and pre-populate repo ...&lt;br /&gt;
# Path to the module(s) in extension should be added to the additional module path.&lt;br /&gt;
# Slicer: Restart - 'Foo' module should show up. ''Note: This last step could probably be removed''&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Workstation -&amp;gt; Github: Create repository done with '''1 command'''. &amp;lt;code&amp;gt;ExtensionWizard.py --publish ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For scripted extensions:&lt;br /&gt;
&lt;br /&gt;
# initial publish on github done from the ExtensionWizard module. See above&lt;br /&gt;
&lt;br /&gt;
=== To publish extension code update===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the workflow is:&lt;br /&gt;
&lt;br /&gt;
# git commit, ..., git push&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to the Index  ===&lt;br /&gt;
# SlicerWiki: Create documentation page.&lt;br /&gt;
## Need to check with BHW if wiki version can be updated so that any IP could use the mediawiki API&lt;br /&gt;
# Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]&lt;br /&gt;
## Create a &amp;quot;Slicer Extensions&amp;quot; community where user have to request access&lt;br /&gt;
## Folks belonging to the &amp;quot;Slicer Extensions&amp;quot; would be automatically be granted access&lt;br /&gt;
## Jc: Check with Midas team with user can request access to community&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
## Update [[Documentation/Nightly/Developers/Tutorials/ObtainExtensionServerApiKey|documentation]] to explain that MIDAS_API_* variable can be set in the env.&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Add extension to the index using '''1 command''': &amp;lt;code&amp;gt;ExtensionWizard.py --contribute --target master ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Improve Wizard to create empty extension: reduce number of terminal commands to 1&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3566 3566: Wizard: Simplify creation of extensions/modules]: {{done}} Completed - Review in progress&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add ExtensionWizard wiki page]: {{done}} Completed - Review in progress -See [[Documentation/Nightly/Developers/ExtensionWizard]]&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add developer documentation for ExtensionWizard]: {{done}} Completed - Review in progress - See [http://mwoehlke-kitware.github.io/Slicer/SlicerWizard/]&lt;br /&gt;
* Publish extension on Github by creating github repo - {{done}} Completed - Review in progress&lt;br /&gt;
&lt;br /&gt;
* In case of Python extension, remove the need for a Slicer build tree: '''50%''' &lt;br /&gt;
** Wizard: Remove dependency on build tree or CMake generated file. {{done}} - Review in progress&lt;br /&gt;
** Add install rules for the template source code - To make them available from an installed Slicer&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3269 3269: Simplify contribution of scripted extension]: '''50%'''&lt;br /&gt;
** Slicer: Creation of python extension directly from within Slicer. '''ToBeDone'''&lt;br /&gt;
*** Slicer: Optional Restart.  '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3603 3603 Slicer: Creation of python extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3604 3604 ExtensionServer: Consolidate ExtensionsIndex account creation.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3605 3605 SlicerWiki: Automatic creation of extension wiki page.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3606 3606 Slicer: Given an extension python script. Should be possible to upload the extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
= Extensions Catalog / Manager =&lt;br /&gt;
&lt;br /&gt;
The goal here is to improve the overall user experience associated with the extension catalog. &lt;br /&gt;
&lt;br /&gt;
When accessed from within Slicer the catalog is also referred as extensions manager.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3564 3564: Add search option in extension manager]. {{review}} '''Awaiting Review'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3602 3602: ExensionsManager - Add a &amp;quot;Show url&amp;quot; link']. {{review}} '''Awaiting Review'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2089 2089: Either on-demand or when slicer starts, check if there are available extensions update.]. '''ToBeDone'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3607 3607: ExtensionManager: Exclude category &amp;quot;Example&amp;quot; from &amp;quot;All&amp;quot; listing ].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2779 2779: Mechanism to keep track of the installed extensions across version]. '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* Low priority:&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2334 2334: Differentiate different type of extenions in extension manager: Concept of channel]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2778 2778: Add &amp;quot;Download stats&amp;quot; on each extension page ]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3608 3608: ExtensionsManager: Display description for installed extensions.]. Code complete, waiting on [http://na-mic.org/Mantis/view.php?id=3564 3564] to be merged&lt;br /&gt;
** Consolidate rating across extension version. See [https://github.com/midasplatform/slicerappstore/issues/9#issuecomment-15643678 midasplatform/slicerappstore/issues/9]&lt;br /&gt;
&lt;br /&gt;
= Extension developer documentation =&lt;br /&gt;
&lt;br /&gt;
The goal is to consolidate the existing documentation so that it is easy to understand what is the python API available to the Slicer python extension developer.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Generate Slicer python API documentation. '''In progress'''. See experiment http://mwoehlke-kitware.github.io/Slicer/Base/&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Template:Review&amp;diff=37532</id>
		<title>Template:Review</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Template:Review&amp;diff=37532"/>
		<updated>2014-03-26T18:13:51Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: Created page with '&amp;lt;includeonly&amp;gt; &amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt; == Usage == &amp;lt;pre&amp;gt;{{Review}}&amp;lt;/pre&amp;gt; {{Review}}   {{PAGENAME}} &amp;lt;/noinclude&amp;gt;'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;[[Image:Review.png|16px| ]]&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Review}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Review}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Templates|{{PAGENAME}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37531</id>
		<title>Documentation/Labs/ExtensionsFrameworkRoadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ExtensionsFrameworkRoadmap&amp;diff=37531"/>
		<updated>2014-03-26T18:13:03Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves as roadmap for the Slicer Extensions framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Extension contribution process =&lt;br /&gt;
&lt;br /&gt;
The goal here is to simplify the number of steps allowing people to contribute extension. &lt;br /&gt;
&lt;br /&gt;
More specifically, we would like to make it very easy for people to create a python extension by:&lt;br /&gt;
* removing the need for a Slicer build tree&lt;br /&gt;
* reducing the number of steps required to create and load an extension from a template&lt;br /&gt;
* simplifying how an extension is contributed to the index&lt;br /&gt;
* simplifying how an extension can be uploaded to the extension server&lt;br /&gt;
&lt;br /&gt;
== Current process ==&lt;br /&gt;
&lt;br /&gt;
The current process to create an empty extension is documented [[Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions|here]], then the steps to contribute the extension are documented [[Documentation/Nightly/Developers/Tutorials/Contribute_Extension_Description_File|here]].&lt;br /&gt;
&lt;br /&gt;
For all type of extension (C++ or python), the steps can then be summarized as:&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''5 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Github: Create a repository&lt;br /&gt;
# Workstation -&amp;gt; Github: Push local work on Github&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to Index ===&lt;br /&gt;
# SlicerWiki: Create documentation page&lt;br /&gt;
# Extension Server: Create an account&lt;br /&gt;
# Extension Server: Join community&lt;br /&gt;
# Extension Server: Ask permission for experimental folder.&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Github: Fork ExtensionsIndex&lt;br /&gt;
# Workstation: Clone fork locally&lt;br /&gt;
# Workstation: Create branch add-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Push the topic to fork&lt;br /&gt;
# Github: Click on Pull request button &lt;br /&gt;
&lt;br /&gt;
=== To update an extension in Index ===&lt;br /&gt;
# SlicerWiki: Update documentation page&lt;br /&gt;
# Workstation: In extension index clone: '''5 commands to type'''&lt;br /&gt;
# Workstation: Create branch update-YourExtensionName&lt;br /&gt;
# Workstation: Commit description file obtained from build tree&lt;br /&gt;
# Workstation -&amp;gt; Github: Create pull request manually creating the URL&lt;br /&gt;
# Github: Add a comment in the pull request with a Compare link also manually generated&lt;br /&gt;
&lt;br /&gt;
== Proposed changes ==&lt;br /&gt;
&lt;br /&gt;
=== To create an extension ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Workstation: Build Slicer application in Release&lt;br /&gt;
# Workstation: Use the Wizard to create an extension '''1 commands to enter in a terminal'''&lt;br /&gt;
# Workstation: Initialize git repository '''1 command'''&lt;br /&gt;
# Workstation: Implement extension / local commits&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For scripted extensions, creation directly from within Slicer:&lt;br /&gt;
&lt;br /&gt;
# Slicer: Modules -&amp;gt; Developer -&amp;gt; ExtensionWizard&lt;br /&gt;
# ExtensionWizard module: Set name, description, contributors etc ... then click on Create&lt;br /&gt;
## Set the working directory ? Where to create.&lt;br /&gt;
## External link to the github account creation page (will open web browswer or tab in the extension manager ?)&lt;br /&gt;
## Optionally create github repo and pre-populate repo ...&lt;br /&gt;
# Path to the module(s) in extension should be added to the additional module path.&lt;br /&gt;
# Slicer: Restart - 'Foo' module should show up. ''Note: This last step could probably be removed''&lt;br /&gt;
&lt;br /&gt;
=== To save extension code ===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the simplified workflow is:&lt;br /&gt;
&lt;br /&gt;
# Github: Create an account&lt;br /&gt;
# Workstation -&amp;gt; Github: Create repository done with '''1 command'''. &amp;lt;code&amp;gt;ExtensionWizard.py --publish ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For scripted extensions:&lt;br /&gt;
&lt;br /&gt;
# initial publish on github done from the ExtensionWizard module. See above&lt;br /&gt;
&lt;br /&gt;
=== To publish extension code update===&lt;br /&gt;
&lt;br /&gt;
For all type of extensions, the workflow is:&lt;br /&gt;
&lt;br /&gt;
# git commit, ..., git push&lt;br /&gt;
&lt;br /&gt;
=== To contribute an extension to the Index  ===&lt;br /&gt;
# SlicerWiki: Create documentation page.&lt;br /&gt;
## Need to check with BHW if wiki version can be updated so that any IP could use the mediawiki API&lt;br /&gt;
# Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]&lt;br /&gt;
## Create a &amp;quot;Slicer Extensions&amp;quot; community where user have to request access&lt;br /&gt;
## Folks belonging to the &amp;quot;Slicer Extensions&amp;quot; would be automatically be granted access&lt;br /&gt;
## Jc: Check with Midas team with user can request access to community&lt;br /&gt;
# Workstation: Configure upload credential&lt;br /&gt;
## Update [[Documentation/Nightly/Developers/Tutorials/ObtainExtensionServerApiKey|documentation]] to explain that MIDAS_API_* variable can be set in the env.&lt;br /&gt;
# Workstation -&amp;gt; ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]&lt;br /&gt;
# Add extension to the index using '''1 command''': &amp;lt;code&amp;gt;ExtensionWizard.py --contribute --target master ~/code/MyExtension&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Improve Wizard to create empty extension: reduce number of terminal commands to 1&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3566 3566: Wizard: Simplify creation of extensions/modules]: {{done}} Completed - Review in progress&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add ExtensionWizard wiki page]: {{done}} Completed - Review in progress -See [[Documentation/Nightly/Developers/ExtensionWizard]]&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add developer documentation for ExtensionWizard]: {{done}} Completed - Review in progress - See [http://mwoehlke-kitware.github.io/Slicer/SlicerWizard/]&lt;br /&gt;
* Publish extension on Github by creating github repo - {{done}} Completed - Review in progress&lt;br /&gt;
&lt;br /&gt;
* In case of Python extension, remove the need for a Slicer build tree: '''50%''' &lt;br /&gt;
** Wizard: Remove dependency on build tree or CMake generated file. {{done}} - Review in progress&lt;br /&gt;
** Add install rules for the template source code - To make them available from an installed Slicer&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3269 3269: Simplify contribution of scripted extension]: '''50%'''&lt;br /&gt;
** Slicer: Creation of python extension directly from within Slicer. '''ToBeDone'''&lt;br /&gt;
*** Slicer: Optional Restart.  '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3603 3603 Slicer: Creation of python extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3604 3604 ExtensionServer: Consolidate ExtensionsIndex account creation.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3605 3605 SlicerWiki: Automatic creation of extension wiki page.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3606 3606 Slicer: Given an extension python script. Should be possible to upload the extension directly from Slicer.] '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
= Extensions Catalog / Manager =&lt;br /&gt;
&lt;br /&gt;
The goal here is to improve the overall user experience associated with the extension catalog. &lt;br /&gt;
&lt;br /&gt;
When accessed from within Slicer the catalog is also referred as extensions manager.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3564 3564: Add search option in extension manager]. {{review}} '''Awaiting Review'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=3602 3602: ExensionsManager - Add a &amp;quot;Show url&amp;quot; link']. '''ToBeDone'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2089 2089: Either on-demand or when slicer starts, check if there are available extensions update.]. '''ToBeDone'''&lt;br /&gt;
* &amp;lt;s&amp;gt;[http://na-mic.org/Mantis/view.php?id=3607 3607: ExtensionManager: Exclude category &amp;quot;Example&amp;quot; from &amp;quot;All&amp;quot; listing ].&amp;lt;/s&amp;gt; {{done}} '''Completed'''&lt;br /&gt;
* [http://na-mic.org/Mantis/view.php?id=2779 2779: Mechanism to keep track of the installed extensions across version]. '''ToBeDone'''&lt;br /&gt;
&lt;br /&gt;
* Low priority:&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2334 2334: Differentiate different type of extenions in extension manager: Concept of channel]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=2778 2778: Add &amp;quot;Download stats&amp;quot; on each extension page ]. '''ToBeDone'''&lt;br /&gt;
** [http://na-mic.org/Mantis/view.php?id=3608 3608: ExtensionsManager: Display description for installed extensions.]. Code complete, waiting on [http://na-mic.org/Mantis/view.php?id=3564 3564] to be merged&lt;br /&gt;
** Consolidate rating across extension version. See [https://github.com/midasplatform/slicerappstore/issues/9#issuecomment-15643678 midasplatform/slicerappstore/issues/9]&lt;br /&gt;
&lt;br /&gt;
= Extension developer documentation =&lt;br /&gt;
&lt;br /&gt;
The goal is to consolidate the existing documentation so that it is easy to understand what is the python API available to the Slicer python extension developer.&lt;br /&gt;
&lt;br /&gt;
== Progress ==&lt;br /&gt;
&lt;br /&gt;
* Generate Slicer python API documentation. '''In progress'''. See experiment http://mwoehlke-kitware.github.io/Slicer/Base/&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:Review.png&amp;diff=37530</id>
		<title>File:Review.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:Review.png&amp;diff=37530"/>
		<updated>2014-03-26T18:10:23Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: [http://www.inkscape.org/ Inkscape] rendered version of Review.svg, as the server is not rendering it correctly.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.inkscape.org/ Inkscape] rendered version of [[:File:Review.svg|Review.svg]], as the server is not rendering it correctly.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:Review.svg&amp;diff=37529</id>
		<title>File:Review.svg</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:Review.svg&amp;diff=37529"/>
		<updated>2014-03-26T17:38:54Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:Check.svg&amp;diff=37528</id>
		<title>File:Check.svg</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:Check.svg&amp;diff=37528"/>
		<updated>2014-03-26T16:59:33Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: uploaded a new version of &amp;quot;File:Check.svg&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Template:Done&amp;diff=37527</id>
		<title>Template:Done</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Template:Done&amp;diff=37527"/>
		<updated>2014-03-26T16:55:25Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;[[Image:Check.svg|16px| ]]&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Done}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Done}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Templates|{{PAGENAME}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:Check.svg&amp;diff=37526</id>
		<title>File:Check.svg</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:Check.svg&amp;diff=37526"/>
		<updated>2014-03-26T16:52:26Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/SelfTestModule&amp;diff=37525</id>
		<title>Documentation/Nightly/Developers/Tutorials/SelfTestModule</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/SelfTestModule&amp;diff=37525"/>
		<updated>2014-03-26T14:57:42Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Goal */ fix wrong-version link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
After [http://www.na-mic.org/Wiki/index.php/2012_Summer_Project_Week:SelfTesting review and work by the slicer community], a framework is in place that supports Built In Self Tests for slicer.  &lt;br /&gt;
&lt;br /&gt;
Important features include:&lt;br /&gt;
* Tests are available as part of the binary distributions of slicer, so users can confirm correct behavior on their systems&lt;br /&gt;
* The same tests are run as part of the nightly test process and submitted to [http://slicer.cdash.org/index.php?project=Slicer4 the slicer dashboard].&lt;br /&gt;
* Developers can efficiently develop the tests by reloading python scripts without needing to exit slicer.&lt;br /&gt;
&lt;br /&gt;
This page provides an overview of the implementation and use of these scripts.&lt;br /&gt;
&lt;br /&gt;
The approach described here can be used in a number of ways:&lt;br /&gt;
* When developing a new scripted module, you can create a test script at the same time.  This way you can use the script to help you test the code as you develop it (by reloading and testing as you write the code without even exiting slicer) and also verify that your code still works as you refactor and improve the code.  Plus, you can easily test the code on multiple platforms without a lot of tedious clicking to reload data.&lt;br /&gt;
* Self Tests of the core slicer functionality can be used equally in build-time and run-time scenarios.&lt;br /&gt;
* [[Documentation/{{documentation/version}}/Developers/Modules|Any type of module or extension]] can also include self tests (and should!).&lt;br /&gt;
&lt;br /&gt;
== Caveats ==&lt;br /&gt;
This project is actively evolving and is being worked on and some of the implementation details will change in future versions.&lt;br /&gt;
&lt;br /&gt;
These instructions assume you are working with a local build of slicer.&lt;br /&gt;
&lt;br /&gt;
== Creating the Skeleton ==&lt;br /&gt;
&lt;br /&gt;
=== Use the ModuleWizard ===&lt;br /&gt;
Start by using the [[Documentation/{{documentation/version}}/Developers/ModuleWizard|module wizard]] to create a new scripted module.  &lt;br /&gt;
&lt;br /&gt;
Give the module a descriptive name based on the functionality you intend to test.  If the module is created to recreated the steps described in a bug report, append the bug report name to the end of the test.  For example, one test is [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Applications/SlicerApp/Testing/Python/sceneImport2428.py?view=markup sceneImport2428.py] which tests [http://www.na-mic.org/Bug/view.php?id=2428 issue #2428].&lt;br /&gt;
&lt;br /&gt;
At first, put the new module in a dedicated directory:&lt;br /&gt;
&lt;br /&gt;
 cd &amp;lt;Slicer source dir&amp;gt;&lt;br /&gt;
 ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/ScriptedLoadableExtensionTemplate/ScriptedLoadableModuleTemplate --target ../NeurosurgeryTutorial NeurosurgeryTutorial&lt;br /&gt;
&lt;br /&gt;
This will create a new extension directory with a skeleton NeurosurgeryTutorial.py file ready to work on.&lt;br /&gt;
&lt;br /&gt;
=== Edit the new module ===&lt;br /&gt;
In the editor, change a few of the fields:&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
    parent.categories = [&amp;quot;Examples&amp;quot;]&lt;br /&gt;
to:&lt;br /&gt;
    parent.categories = [&amp;quot;Testing.TestCases&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
Also change the contributor names, the acknowledgement text, and any other general fields to customize the module.&lt;br /&gt;
&lt;br /&gt;
=== Configure Slicer ===&lt;br /&gt;
In slicer, go into the Application Settings-&amp;gt;Module Settings and add a path to the NeurosurgeryTutorial directory and restart slicer.&lt;br /&gt;
&lt;br /&gt;
=== Restart Slicer and Test ===&lt;br /&gt;
&lt;br /&gt;
When slicer comes back up you should find your module in the Modules-&amp;gt;Testing-&amp;gt;TestCases menu.&lt;br /&gt;
&lt;br /&gt;
If you click the Reload and Test button, a default test will run and it should pass.  &lt;br /&gt;
&lt;br /&gt;
You are now ready to customize this test for your own use.&lt;br /&gt;
&lt;br /&gt;
== Test Data ==&lt;br /&gt;
&lt;br /&gt;
Test data should be uploaded [http://slicer.kitware.com slicer's midas instance].  If you need to upload new data, consult the midas documentation to get an account and request access to the NA-MIC community.&lt;br /&gt;
&lt;br /&gt;
Toward the bottom of your python script (in the method test_NeurosurgeryTutorial1) you can see how data is downloaded from midas and loaded into slicer.  In the template, a single volume file is downloaded:&lt;br /&gt;
&lt;br /&gt;
    downloads = (&lt;br /&gt;
        ('http://slicer.kitware.com/midas3/download?items=5767', 'FA.nrrd', slicer.util.loadVolume),&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
[http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Applications/SlicerApp/Testing/Python/ other self test scripts] load multiple datasets and/or scene files.&lt;br /&gt;
&lt;br /&gt;
Note that the current test template will re-use any existing file in the temp directory that has non-zero size.  If you change the test data, give it a new name for the download.&lt;br /&gt;
&lt;br /&gt;
=== Accessing Test Data Through A Firewall ===&lt;br /&gt;
&lt;br /&gt;
The SelfTest modules use python urllib to download data.  If you are behind a firewall, you can configure urllib to use a proxy server by setting the environment variable&lt;br /&gt;
&lt;br /&gt;
  export http_proxy=http://proxyhost:proxyport&lt;br /&gt;
&lt;br /&gt;
Note the use of &amp;quot;http://&amp;quot; at the start of the url.  The environment variable http_proxy is also used by git and wget but they do not require the &amp;quot;http://&amp;quot; but will accept it if there.&lt;br /&gt;
&lt;br /&gt;
== Writing/Refining the Code ==&lt;br /&gt;
&lt;br /&gt;
Note that you can click the Reload and Test button as many times as you want and to re-run the test.&lt;br /&gt;
&lt;br /&gt;
Now, you can experiment with changing the code.  Add another line to the beginning of the test_NeurosurgeryTutorial1 method like:&lt;br /&gt;
&lt;br /&gt;
 self.delayDisplay(&amp;quot;My modified test&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Save the file and click Reload and Test.  You should see your new message as a dialog and you should also see it printed in the console.&lt;br /&gt;
&lt;br /&gt;
From here, you &amp;quot;only&amp;quot; need to implement the python code that performs your test.  For that, you can rely on the python wrappings of Qt, VTK, numpy, etc. [http://www.slicer.org/slicerWiki/index.php/Slicer4:Python Python in Slicer4]&lt;br /&gt;
&lt;br /&gt;
To open up the GUI for a specific module, for instance the Volumes modules, you can use:&lt;br /&gt;
&lt;br /&gt;
    m = slicer.util.mainWindow()&lt;br /&gt;
    m.moduleSelector().selectModule('Volumes')&lt;br /&gt;
    self.delayDisplay(&amp;quot;Entered Volumes module&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Screen shots ===&lt;br /&gt;
&lt;br /&gt;
To capture screen shots, when the Enable Screenshots button in the GUI is clicked, or the default setting is changed in your code , then add this line after parts of your code that sets up the GUI into configurations that you want to capture:&lt;br /&gt;
&lt;br /&gt;
  self.takeScreenshot('TestName-ScreenshotName','Screenshot description',-1)&lt;br /&gt;
&lt;br /&gt;
The last argument defines what parts of Slicer to capture, -1 is for the whole window, you can also use these options:&lt;br /&gt;
&lt;br /&gt;
  slicer.qMRMLScreenShotDialog().FullLayout&lt;br /&gt;
  slicer.qMRMLScreenShotDialog().ThreeD&lt;br /&gt;
  slicer.qMRMLScreenShotDialog().Red&lt;br /&gt;
  slicer.qMRMLScreenShotDialog().Yellow&lt;br /&gt;
  slicer.qMRMLScreenShotDialog().Green&lt;br /&gt;
&lt;br /&gt;
To enable screen shots by default, change this line:&lt;br /&gt;
&lt;br /&gt;
  self.enableScreenshotsFlagCheckBox.checked = 0&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
  self.enableScreenshotsFlagCheckBox.checked = 1&lt;br /&gt;
&lt;br /&gt;
== Adding the Result to Slicer ==&lt;br /&gt;
&lt;br /&gt;
When you are satisfied that your test captures the intended functionality, you can add it to the main repository (or, if you don't have write access, coordinate with a developer who does have write access).&lt;br /&gt;
&lt;br /&gt;
To make this a self test, copy the NeurosurgeryTutorial.py into Applications/SlicerApp/Testing/Python/ and edit the Applications/SlicerApp/Testing/Python/CMakeLists.txt file.&lt;br /&gt;
&lt;br /&gt;
In the SelfTests section, add a line like:&lt;br /&gt;
&lt;br /&gt;
 slicer_add_python_unittest(SCRIPT NeurosurgeryTutorial.py)&lt;br /&gt;
&lt;br /&gt;
and add NeurosurgeryTutorial.py to the KIT_PYTHON_SCRIPTS list.&lt;br /&gt;
&lt;br /&gt;
== That's it! ==&lt;br /&gt;
&lt;br /&gt;
Now your test will be run as part of the nightly dashboard process and will be available to users so they can verify that your code is operating as designed on their platform.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/FAQ/Extensions&amp;diff=37494</id>
		<title>Documentation/Nightly/Developers/FAQ/Extensions</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/FAQ/Extensions&amp;diff=37494"/>
		<updated>2014-03-17T18:48:21Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Where can I find the extension templates ? */  Point to new Extension Wizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;__TOC__&lt;br /&gt;
={{#titleparts: {{PAGENAME}} | | -1 }}=&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&lt;br /&gt;
='''Developer FAQ: {{{1}}}'''=&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Should the name of the source repository match the name of the extension ? ==&lt;br /&gt;
&lt;br /&gt;
Assuming your extension is named &amp;lt;code&amp;gt;AwesomeFilter&amp;lt;/code&amp;gt;, generally, we suggest to name the extension repository either &amp;lt;code&amp;gt;SlicerAwesomeFilter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer-AwesomeFilter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_AwesomeFilter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SlicerExtension-AwesomeFilter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SlicerExtension_AwesomeFilter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Doing so will minimize confusion by clearly stating that the code base is associated with Slicer.&lt;br /&gt;
&lt;br /&gt;
== What is the Extensions Index ? ==&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/{{documentation/version}}/Developers/Extensions/Index}}&lt;br /&gt;
&lt;br /&gt;
== What is an API Key ? ==&lt;br /&gt;
&lt;br /&gt;
See http://en.wikipedia.org/wiki/Application_programming_interface_key&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to obtain an API key to submit on the extension server ? ==&lt;br /&gt;
{{:Documentation/{{documentation/version}}/Developers/Tutorials/ObtainExtensionServerApiKey}}&lt;br /&gt;
&lt;br /&gt;
== Where can I find the extension templates ? ==&lt;br /&gt;
&lt;br /&gt;
The module and extension templates are available in the Slicer source tree: https://github.com/Slicer/Slicer/tree/master/Utilities/Templates/&lt;br /&gt;
&lt;br /&gt;
Using the [[Documentation/{{documentation/version}}/Developers/ExtensionWizard|Extension Wizard]], you could easily create a new extension without having to copy, rename and update manually every files.&lt;br /&gt;
&lt;br /&gt;
== How to build an extension ? ==&lt;br /&gt;
&lt;br /&gt;
Assuming that the source code of your extension is located in folder &amp;lt;code&amp;gt;MyExtension&amp;lt;/code&amp;gt;, this could be achieved doing:&lt;br /&gt;
&lt;br /&gt;
{|width = &amp;quot;100%&amp;quot;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; style=&amp;quot;border-bottom: 1px solid darkgrey;font-size: 75%;&amp;quot;| Makefile&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; style=&amp;quot;border-bottom: 1px solid darkgrey;font-size: 75%;&amp;quot;| Visual Studio&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
{{pre2|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ mkdir MyExtension-build&lt;br /&gt;
$ cd MyExtension-build&lt;br /&gt;
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DSlicer_DIR:PATH=/path/to/Slicer-Superbuild/Slicer-build ../MyExtension&lt;br /&gt;
$ make&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start CMake, select source and build directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add &amp;lt;code&amp;gt;Slicer_DIR&amp;lt;/code&amp;gt; entry to the cache&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click on &amp;lt;code&amp;gt;Configure&amp;lt;/code&amp;gt;, select generator, then click on &amp;lt;code&amp;gt;Generate&amp;lt;/code&amp;gt; button.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open &amp;lt;code&amp;gt;MyExtension.sln&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt; configuration, then menu &amp;lt;code&amp;gt;Project -&amp;gt; Build Solution&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== How to package an extension ? ==&lt;br /&gt;
&lt;br /&gt;
Assuming your extension has been built into folder &amp;lt;code&amp;gt;MyExtension-build&amp;lt;/code&amp;gt;, this could be achieved doing:&lt;br /&gt;
&lt;br /&gt;
{|width = &amp;quot;100%&amp;quot;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; style=&amp;quot;border-bottom: 1px solid darkgrey;font-size: 75%;&amp;quot;| Makefile&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; style=&amp;quot;border-bottom: 1px solid darkgrey;font-size: 75%;&amp;quot;| Visual Studio&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
{{pre2|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ make package&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open &amp;lt;code&amp;gt;MyExtension.sln&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select &amp;lt;code&amp;gt;PACKAGES&amp;lt;/code&amp;gt; project, then right click and select &amp;lt;code&amp;gt;Build&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== How to upload an extension ? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type:none; border-left:thick solid red; padding-left:1em;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{:Documentation/{{documentation/version}}/Developers/Tutorials/BuildTestPackageDistributeExtensions/ExperimentalFolderAccess}}&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming your extension has been built and packaged into folder &amp;lt;code&amp;gt;MyExtension-build&amp;lt;/code&amp;gt;, this could be achieved by first re-configuring the project providing your [[#How_to_obtain_an_API_key_to_submit_on_the_extension_server_.3F|midas credentials]] and then building the &amp;lt;code&amp;gt;ExperimentalUploadOnly&amp;lt;/code&amp;gt; target:&lt;br /&gt;
&lt;br /&gt;
{|width = &amp;quot;100%&amp;quot;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; style=&amp;quot;border-bottom: 1px solid darkgrey;font-size: 75%;&amp;quot;| Makefile&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; style=&amp;quot;border-bottom: 1px solid darkgrey;font-size: 75%;&amp;quot;| Visual Studio&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
{{pre2|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ cmake -DMIDAS_PACKAGE_EMAIL:STRING=&amp;lt;YOUR-MIDAS-LOGIN&amp;gt; -DMIDAS_PACKAGE_API_KEY:STRING=&amp;lt;YOUR-MIDAS-APIKEY&amp;gt; .&lt;br /&gt;
$ make ExperimentalUploadOnly&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start CMake, select source and build directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add &amp;lt;code&amp;gt;MIDAS_PACKAGE_EMAIL&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;MIDAS_PACKAGE_API_KEY&amp;lt;/code&amp;gt; entries to the cache&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open &amp;lt;code&amp;gt;MyExtension.sln&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt; configuration&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select &amp;lt;code&amp;gt;ExperimentalUploadOnly&amp;lt;/code&amp;gt; project, then right click and select &amp;lt;code&amp;gt;Build&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== What are the extension specific targets: ExperimentalUpload, ExperimentalUploadOnly, ... ? ==&lt;br /&gt;
&lt;br /&gt;
Slicer extension build system provides the developer with a set of convenient targets allowing to build and upload extensions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;alternate&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Target name&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;code&amp;gt;Experimental&amp;lt;/code&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Configure, build, test the extension and publish result on CDash.&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;code&amp;gt;ExperimentalUpload&amp;lt;/code&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Equivalent to Experimental target followed by packaging and upload of the extension on the extension server.&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;code&amp;gt;ExperimentalUploadOnly&amp;lt;/code&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Only proceed to the upload of the extension on the extension server.&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;code&amp;gt;test&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BUILD_TESTS&amp;lt;/code&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Locally execute the test&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PACKAGE&amp;lt;/code&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Locally package the extension&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Is --launch flag available for a MacOSX installed Slicer.app ?==&lt;br /&gt;
&lt;br /&gt;
On MacOSx, running Slicer with the --help argument does NOT list the usual launcher related options.&lt;br /&gt;
&lt;br /&gt;
 $ ./Slicer.app/Contents/MacOS/Slicer --help&lt;br /&gt;
 Usage&lt;br /&gt;
  Slicer [options]&lt;br /&gt;
  &lt;br /&gt;
  Options&lt;br /&gt;
    --, --ignore-rest                     Ignores the rest of the labeled arguments following this flag. (default: false)&lt;br /&gt;
    -h, --help                            Display available command line arguments.&lt;br /&gt;
    [...]&lt;br /&gt;
    --version                             Displays version information and exits.&lt;br /&gt;
&lt;br /&gt;
To provide some background information, when generating the package that will be distributed, an application bundle &amp;lt;code&amp;gt;Slicer.app&amp;lt;/code&amp;gt; is created. As explained [http://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/Introduction/Introduction.html here], a bundle is a directory with a standardized hierarchical structure that holds executable code and the resources used by that code. It means that since all libraries contained within a bundle are referenced relatively to the location of either the CLI or the Slicer executable, the use of launcher does NOT make sens.&lt;br /&gt;
&lt;br /&gt;
To help fixing-up the libraries, executables and plugins so that they reference each other in a relative way, CMake provides us with the [http://www.cmake.org/cmake/help/v2.8.8/cmake.html#module:BundleUtilities BundleUtilities] module.&lt;br /&gt;
&lt;br /&gt;
This module is used in two situations:&lt;br /&gt;
# Fixup of Slicer application itself. See [https://github.com/Slicer/Slicer/blob/master/CMake/SlicerCPack.cmake#L36-68 SlicerCPack.cmake#L36-68] and [https://github.com/Slicer/Slicer/blob/master/CMake/SlicerCPackBundleFixup.cmake.in SlicerCPackBundleFixup.cmake.in]&lt;br /&gt;
# Fixup of an extension package. See [https://github.com/Slicer/Slicer/blob/master/CMake/SlicerExtensionCPack.cmake#L126-143 SlicerExtensionCPack.cmake#L126-143] and [https://github.com/Slicer/Slicer/blob/master/CMake/SlicerExtensionCPackBundleFixup.cmake.in SlicerExtensionCPackBundleFixup.cmake.in]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is the difference between Documentation/Nightly/Modules and Documentation/Nightly/Extensions ? ==&lt;br /&gt;
&lt;br /&gt;
As suggested by the namespace names:&lt;br /&gt;
* All module documentation pages should be located under &amp;lt;code&amp;gt;Documentation/Nightly/Modules&amp;lt;/code&amp;gt;&lt;br /&gt;
* All extension documentation pages should be located under &amp;lt;code&amp;gt;Documentation/Nightly/Extensions&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if an an extension named &amp;lt;code&amp;gt;DoSomethingGreat&amp;lt;/code&amp;gt; bundles three modules &amp;lt;code&amp;gt;ModuleA&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ModuleB&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ModuleC&amp;lt;/code&amp;gt;. The following pages should be created:&lt;br /&gt;
* &amp;lt;code&amp;gt;Documentation/Nightly/Extensions/DoSomethingGreat&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Documentation/Nightly/Modules/ModuleA&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Documentation/Nightly/Modules/ModuleB&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Documentation/Nightly/Modules/ModuleC&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case your extension bundles only one module, the extension name is expected to match the module name. For example, if your extension is named &amp;lt;code&amp;gt;DoSomethingAwesome&amp;lt;/code&amp;gt;, the associated module is expected to be named &amp;lt;code&amp;gt;DoSomethingAwesome&amp;lt;/code&amp;gt;. The following pages will then be created:&lt;br /&gt;
* &amp;lt;code&amp;gt;Documentation/Nightly/Extensions/DoSomethingAwesome&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Documentation/Nightly/Modules/DoSomethingAwesome&amp;lt;/code&amp;gt;&lt;br /&gt;
where page &amp;lt;code&amp;gt;Extensions/DoSomethingAwesome&amp;lt;/code&amp;gt; redirect to page &amp;lt;code&amp;gt;Modules/DoSomethingAwesome&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To setup a redirection, simply add the following text to page &amp;lt;code&amp;gt;Extensions/DoSomethingAwesome&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#REDIRECT [[Documentation/Nightly/Modules/DoSomethingAwesome]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For an example, see [http://www.slicer.org/slicerWiki/index.php?title=Documentation/Nightly/Extensions/SkullStripper&amp;amp;action=edit here]&lt;br /&gt;
&lt;br /&gt;
More details about redirection are available here: http://www.mediawiki.org/wiki/Help:Redirects&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Which URL should be associated with EXTENSION_HOMEPAGE metadata ? ==&lt;br /&gt;
&lt;br /&gt;
Extensions available through the Slicer Extensions Catalog are expected to have a page created under the &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; documentation namespace. The corresponding URL should be associated with the &amp;lt;code&amp;gt;EXTENSION_HOMEPAGE&amp;lt;/code&amp;gt; metadata.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;set(EXTENSION_HOMEPAGE &amp;quot;http://slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/DoSomethingGreat&amp;quot;)&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;set(EXTENSION_HOMEPAGE &amp;quot;http://slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/DoSomethingAwesome&amp;quot;)&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this also apply for extension bundling only one module. Indeed, in this case the page will redirect to the appropriate module page. For example: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/SkullStripper&lt;br /&gt;
&lt;br /&gt;
== How to rename an extension to add new features ? ==&lt;br /&gt;
&lt;br /&gt;
If you created an extension to perform Task1, but later on, your module is getting more generic and you add some other tasks, the name of your extension might change.&lt;br /&gt;
In order to rename, your extension, you should:&lt;br /&gt;
* Remove your old extension from the ExtensionsIndex&lt;br /&gt;
* Then, submit your extension again (including new features) with a new name&lt;br /&gt;
* Make also sure to add redirection from the &amp;quot;deprecated&amp;quot; module documentation to the &amp;quot;new&amp;quot; pages. On the Slicer wiki, this could be using the [http://www.mediawiki.org/wiki/Help:Redirects #REDIRECT] instruction.&lt;br /&gt;
&lt;br /&gt;
== How to check if an extension is built by Slicer Extensions build system ? ==&lt;br /&gt;
&lt;br /&gt;
Sometimes an extension could be built either as a standalone package or as a Slicer extension. &lt;br /&gt;
&lt;br /&gt;
To differenciate the two cases, the developer could check for the value of:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;ExtensionName&amp;gt;_BUILD_SLICER_EXTENSION&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This variable will be set to ON when the extension is built by the Slicer Extensions build system.&lt;br /&gt;
&lt;br /&gt;
For details: https://github.com/Slicer/Slicer/blob/ff5f5a866d8afcaa0f2e6f615cc8f8cf07361741/Extensions/CMake/SlicerBlockBuildPackageAndUploadExtension.cmake#L95&lt;br /&gt;
&lt;br /&gt;
== How often extensions are uploaded on the extensions server ? ==&lt;br /&gt;
&lt;br /&gt;
Slicer extensions are built and uploaded on the [[Documentation/{{documentation/version}}/Developers/Extensions/Server|extensions server]] every day.&lt;br /&gt;
&lt;br /&gt;
To be more specific, the frequency of extensions build and upload associated with:&lt;br /&gt;
* Slicer nightly package occurs '''every night''' and also '''continuously''' during the day.&lt;br /&gt;
* Slicer {{documentation/currentversion}} lastest stable release package occurs '''every night'''.&lt;br /&gt;
&lt;br /&gt;
== Will an extension be uploaded if associated tests are failing ? ==&lt;br /&gt;
&lt;br /&gt;
Independently of the extension test results, if the extension could be successfully packaged, it will be uploaded on the [[Documentation/{{documentation/version}}/Developers/Extensions/Server|extensions server]].&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ModuleWizard&amp;diff=37490</id>
		<title>Documentation/Nightly/Developers/ModuleWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ModuleWizard&amp;diff=37490"/>
		<updated>2014-03-14T20:34:17Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: mark as deprecated, direct to Extension Wizard instead&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ambox&lt;br /&gt;
| type  = warning&lt;br /&gt;
| text  = '''Deprecated'''&amp;lt;p&amp;gt;This page describes a utility which has been deprecated. If you are using Slicer 4.4 or later, it is recommended to use the [[Documentation/{{documentation/version}}/Developers/ExtensionWizard|Extension Wizard]] instead.&amp;lt;/p&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Slicer modules typically consist of several files of various types, such as CMake files, source files, and binary files.&lt;br /&gt;
&lt;br /&gt;
In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile.&lt;br /&gt;
&lt;br /&gt;
Also, it is not uncommon to want to use one module as the starting point for implementing similar functionality.&lt;br /&gt;
&lt;br /&gt;
For development, we suggest starting with the structure of an Extension that can contains one or more modules.  The [[Documentation/{{documentation/version}}/Developers/Modules|modules]] can be of different types, such as python scripted module or pure C++ modules or a combination.&lt;br /&gt;
&lt;br /&gt;
The ModuleWizard will do most of the copying and renaming for you, but you will also need to manually configure some steps (specifically, you need to edit the CMakeLists.txt file when you add a module to an extension).&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
* The ''template'' is a directory containing a slicer module&lt;br /&gt;
* The ''templateKey'' is a text string, typically the name of the module, that is used in both filename and identifiers inside the module.&lt;br /&gt;
* The ''target'' is a directory where you want the new module to be placed&lt;br /&gt;
* The ''moduleName'' is the string that you want to use in place of the ''templateKey'' &lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 ModuleWizard [--template &amp;lt;dir&amp;gt;] [--templateKey &amp;lt;key&amp;gt;] [--target &amp;lt;dir&amp;gt;] &amp;lt;moduleName&amp;gt;&lt;br /&gt;
  --template default ./Extensions/Testing/LoadableExtensionTemplate&lt;br /&gt;
  --templateKey default is dirname of template&lt;br /&gt;
  --target default ./Modules/Loadable/&amp;lt;moduleName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step by Step ==&lt;br /&gt;
&lt;br /&gt;
The idea of the wizard is to create a new self-contained directory that is a working module from the slicer perspective.  This means that for C++ extensions, you only need to compile the extension and it will work with slicer.  For scripted (python) extensions, you don't even need to compile.&lt;br /&gt;
&lt;br /&gt;
Running this wizard will create the module in the specified target directory and will give it the name you specify on the command line.&lt;br /&gt;
&lt;br /&gt;
=== Creating an Extension ===&lt;br /&gt;
&lt;br /&gt;
For example, running this command:&lt;br /&gt;
&lt;br /&gt;
 ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/ScriptedLoadableExtensionTemplate --target ../MyExtension MyExtension &lt;br /&gt;
&lt;br /&gt;
should be done from within the slicer source directory, so that the &amp;lt;code&amp;gt;ModuleWizard.py&amp;lt;/code&amp;gt; script is found, and so that the template path points to the correct spot.  This command relies on your machine having an installed python interpreter to run the wizard (any version of python should work, you don't need to use the one that gets built with slicer).&lt;br /&gt;
&lt;br /&gt;
This command will create a new directory parallel to the Slicer source directory, in this case called MyExtension.&lt;br /&gt;
&lt;br /&gt;
The resulting extension will include a sample module in a directory called &amp;quot;ScriptedLoadableModuleTemplate&amp;quot; -- ''you should delete this directory since we will replace it in the next step.''&lt;br /&gt;
&lt;br /&gt;
Edit the MyExtension/CMakeLists.txt file to customize it for your work.  For example, list yourself and your colleagues as contributors and add the proper links to your project pages and icons.  You should also make a custom icon for extension, that will represent it in the ExtensionManager.&lt;br /&gt;
&lt;br /&gt;
=== Adding a Module ===&lt;br /&gt;
&lt;br /&gt;
Instead of the generic module, we'll want a new one with a custom name, you can use the ModuleWizard again to rename the file and the contents from the template:&lt;br /&gt;
&lt;br /&gt;
 ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/ScriptedLoadableExtensionTemplate/ScriptedLoadableModuleTemplate --target ../MyExtension/MyScriptedModule MyScriptedModule &lt;br /&gt;
&lt;br /&gt;
Now you will need to edit the ../MyExtension/CMakeLists.txt and change the following line:&lt;br /&gt;
&lt;br /&gt;
 add_subdirectory(ScriptedLoadableModuleTemplate)&lt;br /&gt;
&lt;br /&gt;
to read:&lt;br /&gt;
&lt;br /&gt;
 add_subdirectory(MyScriptedModule)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since we used the ScriptedLoadableExtensionTemplate, the only thing we need to do is set the additional module path to point to the full path to MyExtension/MyScriptedModule in the [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog. &lt;br /&gt;
&lt;br /&gt;
Then when you restart slicer, you should select your module using in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Adding More Modules ===&lt;br /&gt;
&lt;br /&gt;
Note that you can repeat the steps for adding modules so that your extension can contain many modules of different types.  Just run the ModuleWizard with the path to the appropriate template, and add the directory to the CMakeLists.txt.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
To create a [[Documentation/{{documentation/version}}/Developers/Modules#Command_Line_Interface_.28CLI.29|CLI]] Extension:&lt;br /&gt;
&lt;br /&gt;
  ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/CLIExtensionTemplate/CLIModuleTemplate --target ../MyExtension/MyCLIModule MyCLIModule&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;MyFooExtension&amp;lt;/code&amp;gt; is the name of your extension&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a [[Documentation/{{documentation/version}}/Developers/Tutorials/CreateLoadableModule|Loadable]] Module:&lt;br /&gt;
&lt;br /&gt;
  ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/LoadableExtensionTemplate/LoadableModuleTemplate --target ../MyExtension/MyLoadableModule MyLoadableModule&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a [[Documentation/{{documentation/version}}/Developers/Modules#Scripted_Modules|Scripted Loadable]] Module:&lt;br /&gt;
&lt;br /&gt;
  ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/ScriptedLoadableExtensionTemplate/ScriptedLoadableModuleTemplate --target ../MyExtension/MyScriptedModule MyScriptedModule&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create an [[Documentation/{{documentation/version}}/Developers/EditorExtension|EditorEffect]] Extension&lt;br /&gt;
  ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/EditorExtensionTemplate/EditorEffectTemplate --target ../MyExtension/MyEditorEffect MyEditorEffect&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For reference, an extension directory that results from the steps above can be found [https://github.com/pieper/MyExtension in this git repository].&lt;br /&gt;
&lt;br /&gt;
=== Creating and Testing a Loadable Module ===&lt;br /&gt;
&lt;br /&gt;
The following code can be run from the SuperBuild directory (mac and linux):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NEWMODULE=NewModule&lt;br /&gt;
SLICERSUPERBUILD=`pwd`&lt;br /&gt;
&lt;br /&gt;
../Slicer/Utilities/Scripts/ModuleWizard.py --template ../Slicer/Extensions/Testing/LoadableExtensionTemplate --target /tmp/${NEWMODULE} ${NEWMODULE}&lt;br /&gt;
mkdir /tmp/${NEWMODULE}-build&lt;br /&gt;
(cd /tmp/${NEWMODULE}-build; cmake /tmp/${NEWMODULE} -DSlicer_DIR:PATH=${SLICERSUPERBUILD}/Slicer-build; make)&lt;br /&gt;
./Slicer-build/Slicer --additional-module-paths /tmp/${NEWMODULE}-build/lib/Slicer-4.2/qt-loadable-modules&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After running this command, Slicer will start, and you will find the default LoadableModuleTempate in the modules menu under Examples.  In the python interpreter, you can access the wrapped logic with:&lt;br /&gt;
&lt;br /&gt;
 logic = slicer.modules.loadablemoduletemplate.logic()&lt;br /&gt;
&lt;br /&gt;
From here, you can add additional methods to the logic and develop the GUI.&lt;br /&gt;
&lt;br /&gt;
''Note: use the latest version of CMake (2.8.11) on mac''&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Modules&amp;diff=37489</id>
		<title>Documentation/Nightly/Developers/Modules</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Modules&amp;diff=37489"/>
		<updated>2014-03-14T20:11:01Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: change module wizard references to point to new extension wizard instead&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Slicer supports three types of modules. While the developer has to choose between one of the three types to implement its module, the end user won't notice the difference as they all share the same look &amp;amp; feel. The choice for a given type of module is usually based on the type of inputs/parameters for a given module.&lt;br /&gt;
&lt;br /&gt;
= Command Line Interface (CLI) =&lt;br /&gt;
CLIs are standalone executables with a limited input/output arguments complexity (simple argument types, no user interactions...). They are typically implemented using [http://www.itk.org ITK].&lt;br /&gt;
* Shared lib or executable&lt;br /&gt;
* UI automatically generated&lt;br /&gt;
* Where to start ?&lt;br /&gt;
# Create initial skeleton using the [[Documentation/{{documentation/version}}/Developers/ExtensionWizard|Extension Wizard]]&lt;br /&gt;
# Read [[Documentation/{{documentation/version}}/Developers/Build_Module|Compiling slicer modules outside of the slicer source tree.]]&lt;br /&gt;
# Learn from [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Modules/CLI/ existing modules]&lt;br /&gt;
* Links:&lt;br /&gt;
** [[Slicer3:Execution_Model_Documentation|Slicer3 execution model]] (Slicer4 is very similar)&lt;br /&gt;
** [http://www.na-mic.org/Wiki/index.php/File:Slicer4_CLI.ppt CLI in Slicer4] (presentation of 2012 NAMIC AHM)&lt;br /&gt;
&lt;br /&gt;
= Loadable Modules =&lt;br /&gt;
Loadable modules are [http://en.wikipedia.org/wiki/C%2B%2B C++] plugins that are built against Slicer. They define custom GUIs for their specific behavior as they have full control over the application.&lt;br /&gt;
* C++ shared library&lt;br /&gt;
* Full control over the UI (based on [http://qt.nokia.com/products/ Qt]) and Slicer internals (MRML, logics, display managers...)&lt;br /&gt;
* Optimized for heavy computations&lt;br /&gt;
* Where to start ?&lt;br /&gt;
# Create initial skeleton using the [[Documentation/{{documentation/version}}/Developers/ExtensionWizard|Extension Wizard]]&lt;br /&gt;
# Read [[Documentation/{{documentation/version}}/Developers/Build_Module|Compiling slicer modules outside of the slicer source tree.]]&lt;br /&gt;
# Learn from [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Modules/Loadable/ existing modules]&lt;br /&gt;
* Links:&lt;br /&gt;
**[http://www.na-mic.org/Wiki/index.php/File:LoadableModules.pptx Loadable modules] (presentation of 2012 NAMIC AHM)&lt;br /&gt;
**[[Documentation/{{documentation/version}}/Developers/Tutorials/CreateLoadableModule|How to write a loadable module]]&lt;br /&gt;
&lt;br /&gt;
= Scripted Modules =&lt;br /&gt;
Scripted modules are written in [http://www.python.org/ Python]. &lt;br /&gt;
&lt;br /&gt;
An extensive tutorial and reference page was created [http://www.na-mic.org/Wiki/index.php/2013_Project_Week_Breakout_Session:Slicer4Python for the Slicer/Python breakout session at the NA-MIC 2014 Summer Project Week].  Please read through this and many of your questions will be answered.&lt;br /&gt;
  &lt;br /&gt;
* Python Console&lt;br /&gt;
* Full access to the API: [http://www.vtk.org VTK], MRML, [http://qt.nokia.com/products/ Qt] and Slicer are fully wrapped&lt;br /&gt;
* Recommended for fast prototyping&lt;br /&gt;
* Where to start ?&lt;br /&gt;
# Read the [http://www.na-mic.org/Wiki/index.php/2013_Project_Week_Breakout_Session:Slicer4Python  Slicer/Python breakout session at the NA-MIC 2014 Summer Project Week] tutorial.&lt;br /&gt;
# Create initial skeleton using the [[Documentation/{{documentation/version}}/Developers/ExtensionWizard|Extension Wizard]]&lt;br /&gt;
# Read [[Documentation/{{documentation/version}}/Developers/Build_Module|Compiling slicer modules outside of the slicer source tree.]]&lt;br /&gt;
# Learn from [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Modules/Scripted/ existing modules]&lt;br /&gt;
* Links:&lt;br /&gt;
** [http://www.slicer.org/slicerWiki/index.php/Documentation/{{documentation/version}}/Developers/Python_scripting Python Scripting]&lt;br /&gt;
** [[Documentation/{{documentation/version}}/Training#Slicer4_Programming_Tutorial|Python Scripting Tutorial]]&lt;br /&gt;
&lt;br /&gt;
=Module Factory=&lt;br /&gt;
Loading modules into slicer happens in multiple steps:&lt;br /&gt;
*module factories must be registered into the factory manager&lt;br /&gt;
* directories where the modules to load are located must be passed to the factory manager&lt;br /&gt;
* Optionally specify module names to ignore&lt;br /&gt;
* scan the directories and test which file is a module and register it (not instantiated yet) &lt;br /&gt;
* Instantiate all the register modules&lt;br /&gt;
* Connect each module with the scene and the application&lt;br /&gt;
More details can be found in the [http://slicer.org/doc/html/classqSlicerAbstractModuleFactoryManager.html online doc]&lt;br /&gt;
&lt;br /&gt;
==ToDo==&lt;br /&gt;
* Transform all core modules into Loadable modules.&lt;br /&gt;
** the factory manager only support file based modules, core modules are not file based (linked into the core factory itself)&lt;br /&gt;
* Move factory registration in qSlicerApplication (or a general application library) to support module discovery/loading without needing to instantiate Slicer.&lt;br /&gt;
** Currently can't be moved into qSlicerApplication as the CLI factories that are in QTCLI depend on QTGUI&lt;br /&gt;
** QtTesting is also limited with the QTCLI dependency on QtGUI (-&amp;gt;qSlicerApplication would need to access QtTesting code from QtCli)&lt;br /&gt;
** Proposed architecture&lt;br /&gt;
 Base&lt;br /&gt;
   Application -&amp;gt; classes that are useful to build an application (mix of qSlicerCoreApplication, qSlicerApplication, Main.cxx...)&lt;br /&gt;
   Core -&amp;gt; formally QtCore&lt;br /&gt;
   Modules -&amp;gt; contains the factories and module specific code&lt;br /&gt;
      Loadable&lt;br /&gt;
      CLI&lt;br /&gt;
      Scripted&lt;br /&gt;
   Scripted -&amp;gt; all that is python specific&lt;br /&gt;
      Cxx&lt;br /&gt;
      Python&lt;br /&gt;
   Widgets -&amp;gt; formally QtGUI&lt;br /&gt;
* Add category hierarchy in the Settings module panel&lt;br /&gt;
* Register factory settings/command-options(e.g. disable-loadable-modules) when registering module factories&lt;br /&gt;
** To have the settings panel be generic but have the code proper of each registered factory somewhere else&lt;br /&gt;
* Add mechanism for modules to register dialogs (toolbars that open dialogs),  e.g. the sceneview module needs to register the sceneView dialog into an icon.&lt;br /&gt;
* Ignore modules from the launcher command line.&lt;br /&gt;
* cloning&amp;quot; of module panels at run time. See [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2012/008965.html &amp;quot;here] and [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2012/008039.html here]&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Versioning&amp;diff=37488</id>
		<title>Documentation/Nightly/Developers/Versioning</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Versioning&amp;diff=37488"/>
		<updated>2014-03-14T19:26:23Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Release */ improve step organization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
= How to create a Slicer package =&lt;br /&gt;
&lt;br /&gt;
== Locally on your machine ==&lt;br /&gt;
&lt;br /&gt;
After Slicer correctly build and test, to create a binary package on mac/unix:&lt;br /&gt;
&lt;br /&gt;
 $ cd Slicer-Superbuild/Slicer-build&lt;br /&gt;
 $ make package&lt;br /&gt;
&lt;br /&gt;
For Visual Studio on Windows, the inner Slicer (not superbuild) solution file contains a 'PACKAGE' project, just build it. You might have to install [http://nsis.sourceforge.net/Download NSIS] prior.&lt;br /&gt;
&lt;br /&gt;
On Mac OS X, a 'dmg' file is generated, on unix it's a tar.gz archive and on Windows it's a exe installer.&lt;br /&gt;
&lt;br /&gt;
== Automatically expose it to the Slicer community ==&lt;br /&gt;
&lt;br /&gt;
CTest can automatically create a package and upload it on [http://slicer.cdash.org slicer.cdash.org] and [http://download.slicer.org download.slicer.org] to be available to the community.&lt;br /&gt;
&lt;br /&gt;
You need to create a script following the template [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/CMake/SlicerDashboardScript.TEMPLATE.cmake?view=markup Slicer/CMake/SlicerDashboardScript.TEMPLATE.cmake]. Change the following variables &amp;lt;code&amp;gt;WITH_PACKAGES&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SCRIPT_MODE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;experimental&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then you can run your script:&lt;br /&gt;
 $ ctest -S /path/to/SlicerPackageScript.cmake -VV &amp;gt; /path/to/logs.txt 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
Please note that the source and build directories should not be located in '''/usr'''. The libraries would be considered by the packaging mechanism as &amp;quot;system&amp;quot; libraries.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Versioning =&lt;br /&gt;
&lt;br /&gt;
== Project fork ==&lt;br /&gt;
&lt;br /&gt;
While Slicer specific patches related to dependent project (i.e. VTK) are integrated upstream, it is not uncommon to build Slicer against a Slicer specific fork of the project.&lt;br /&gt;
&lt;br /&gt;
For example: https://github.com/Slicer/VTK&lt;br /&gt;
&lt;br /&gt;
=== Patches for tagged release ===&lt;br /&gt;
&lt;br /&gt;
For each version of the project requiring some specific patches, a branch following that convention will be created: &amp;lt;code&amp;gt;slicer-vX.Y.Z&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;X.Y.Z&amp;lt;/code&amp;gt; corresponds to the version of the project.&lt;br /&gt;
&lt;br /&gt;
For example, in case of the SlicerVTK fork, the branch &amp;lt;code&amp;gt;slicer-v5.10.1&amp;lt;/code&amp;gt; has been created.&lt;br /&gt;
&lt;br /&gt;
=== Patches for development branch ===&lt;br /&gt;
&lt;br /&gt;
In this case, since there is no tag associated with the branch, the Slicer specific patch should be added to a branch named using the date of the commit parent of the Slicer branch: &amp;lt;code&amp;gt;slicer-YEAR-MONTH-DAY-vX.Y&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; corresponds to the fork release.&lt;br /&gt;
&lt;br /&gt;
== Create release dashboard scripts ==&lt;br /&gt;
&lt;br /&gt;
{{wip}}&lt;br /&gt;
&lt;br /&gt;
== Feature freeze ==&lt;br /&gt;
&lt;br /&gt;
Usually ~1 month before release.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Update modules documentation link in help section (loadable, scripted and cli)&lt;br /&gt;
** And some html links in Welcome module (Modules/Loadable/SlicerWelcome/Resources/HTML)&lt;br /&gt;
** Update CLI XML description files&lt;br /&gt;
&lt;br /&gt;
Commit message: &amp;lt;code&amp;gt;Update Documentation to X.Y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example: [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22407 r22407]&lt;br /&gt;
&lt;br /&gt;
== Release-candidate ==&lt;br /&gt;
&lt;br /&gt;
Since there all development occurs on &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;, each time version is updated, two commits will be required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;RC&amp;gt;&amp;lt;/code&amp;gt; corresponds to the release candidate number. It is greater or equal to one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the release candidate:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, uncomment and set:&amp;lt;/p&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;Slicer_VERSION_RC&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;RC&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;...and if this is the first release candidate, update at least one these variables: &amp;lt;code&amp;gt;Slicer_VERSION_MAJOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_MINOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_PATCH&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Slicer X.Y.Z-rc&amp;lt;RC&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate packages based on REVISION associated with step 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the development:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, comment &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; so that the next builds will contain the date associated with the last commit.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Begin post-X.Y.Z-rc&amp;lt;RC&amp;gt; development&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Release ==&lt;br /&gt;
&lt;br /&gt;
Since there all development occurs on &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;, each time version is updated, two commits will be required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the release:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, uncomment and set &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;...and if this no release candidate has been made, update at least one these variables: &amp;lt;code&amp;gt;Slicer_VERSION_MAJOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_MINOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_PATCH&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Slicer X.Y.Z&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate packages based on REVISION associated with step 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Tag the repository:&amp;lt;/p&amp;gt;&lt;br /&gt;
 svn copy -r&amp;lt;REVISION&amp;gt; http://svn.slicer.org/Slicer4/trunk  \&lt;br /&gt;
      http://svn.slicer.org/Slicer4/tags/Slicer-X-Y  \&lt;br /&gt;
     -m &amp;quot;ENH: Tag of X.Y.Z release based on r&amp;lt;REVISION&amp;gt;.&amp;quot;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the development:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, comment and set:&amp;lt;/p&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; so that the next builds will contain the date associated with the last commit.&lt;br /&gt;
* &amp;lt;code&amp;gt;Slicer_VERSION_RC&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Begin post-X.Y.Z development&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Post release ==&lt;br /&gt;
&lt;br /&gt;
=== Create a release branch ===&lt;br /&gt;
&lt;br /&gt;
 svn copy -r &amp;lt;REVISION&amp;gt; http://svn.slicer.org/Slicer4/trunk http://svn.slicer.org/Slicer4/branches/Slicer-X-Y \&lt;br /&gt;
  -m &amp;quot;ENH: Branching from trunk to Slicer-X-Y at &amp;lt;REVISION&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  svn checkout http://svn.slicer.org/Slicer4/branches/Slicer-X-Y&lt;br /&gt;
&lt;br /&gt;
=== Generate ChangeLog ===&lt;br /&gt;
&lt;br /&gt;
* See [https://raw.github.com/cryos/avogadro/master/scripts/gitlog2changelog.py gitlog2changelog.py]. More details [http://blog.cryos.net/archives/202-Git-and-Automatic-ChangeLog-Generation.html here].&lt;br /&gt;
&lt;br /&gt;
* Update [[Release Details]] page using generated ChangeLog&lt;br /&gt;
&lt;br /&gt;
=== Update Mantis ===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Release&amp;quot; current target&lt;br /&gt;
* Create new target&lt;br /&gt;
* Check the &amp;quot;fixed in&amp;quot; fields&lt;br /&gt;
&lt;br /&gt;
=== Midas ===&lt;br /&gt;
&lt;br /&gt;
==== Tag release packages ====&lt;br /&gt;
&lt;br /&gt;
* If needed, create a X.Y.Z folder in [http://slicer.kitware.com/midas3/folder/274 Slicer/Packages/Application/Release]&lt;br /&gt;
** Copy uploaded packages into the folder created above&lt;br /&gt;
** Identify the item_id associated with uploaded packages. For example: 11926, 11925, 11927, 11992&lt;br /&gt;
** SSH connect to &amp;lt;code&amp;gt;jcfr@slicer.kitwarein.com&amp;lt;/code&amp;gt;&lt;br /&gt;
** Connect to mysql using &amp;lt;code&amp;gt;mysql -u midas -p&amp;lt;/code&amp;gt;&lt;br /&gt;
*** See file &amp;lt;code&amp;gt;/var/www/midas3/core/configs/database.local.ini&amp;lt;/code&amp;gt; for password&lt;br /&gt;
*** Choose midas database: &amp;lt;code&amp;gt;use midas&amp;lt;/code&amp;gt;&lt;br /&gt;
** List packages associated with identified items and check they are the appropriate ones:&lt;br /&gt;
*** &amp;lt;code&amp;gt;select *  from slicerpackages_package as p , item as i where i.item_id = p.item_id and p.item_id in (11926, 11925, 11927, 11992);&amp;lt;/code&amp;gt;&lt;br /&gt;
** Set release field&lt;br /&gt;
*** &amp;lt;code&amp;gt;update slicerpackages_package set `release`=&amp;quot;4.2.2-1&amp;quot; where item_id in (11926, 11925, 11927, 11992);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Version NA-MIC data tree ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;[[Documentation/{{documentation/version}}/Developers/Tutorials/ObtainExtensionServerApiKey|Create an account on the extension server and obtain an API Key]]. You will then use your midas login and api key to substitute &amp;lt;code&amp;gt;&amp;lt;YOUR-MIDAS-LOGIN&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;YOUR-MIDAS-APIKEY&amp;gt;&amp;lt;/code&amp;gt; in the examples.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;If not already done, go to [http://slicer.kitware.com/midas3/community/23 NA-MIC community] and click on &amp;lt;code&amp;gt;Join community&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Send an email on the developer list asking to be added to the &amp;lt;code&amp;gt;DataManager&amp;lt;/code&amp;gt; group on NA-MIC community. That will grant you read/write permissions to the &amp;lt;code&amp;gt;Data&amp;lt;/code&amp;gt; folder and sub-folders.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Install prerequisites&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo pip install pydas&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Identify &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; of the &amp;lt;code&amp;gt;Data&amp;lt;/code&amp;gt; folder. For example [http://slicer.kitware.com/midas3/folder/301 301]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simulate creation of &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; data folders based &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; ones&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Slicer/Base/Python/slicer/release&lt;br /&gt;
$ python midasdata.py --url=http://slicer.kitware.com/midas3 --data_id=301 \&lt;br /&gt;
  --email=&amp;lt;YOUR-MIDAS-LOGIN&amp;gt; --apikey=&amp;lt;YOUR-MIDAS-APIKEY&amp;gt; --source_version=Nightly --dest_version=X.Y --dry-run&lt;br /&gt;
Application ( folder_id: 302 )&lt;br /&gt;
'-Nightly ( folder_id: 831 )&lt;br /&gt;
'-'-Testing ( folder_id: 832 )&lt;br /&gt;
'-'-'-Baseline ( folder_id: 889 )&lt;br /&gt;
'-'-'-'-DiffusionTensorImagingTutorial.png ( item_id: 12067 )&lt;br /&gt;
'-'-'-'-NeurosurgicalPlanningTutorial.png ( item_id: 12066 )&lt;br /&gt;
'-'-'-'-SlicerTestingTest.png ( item_id: 17760 )&lt;br /&gt;
'-'-'-Input ( folder_id: 833 )&lt;br /&gt;
'-'-'-'-AtlasTests ( folder_id: 834 )&lt;br /&gt;
'-'-'-'-'-2012-10-26-BrainAtlas.mrb ( item_id: 10276 )&lt;br /&gt;
[...]&lt;br /&gt;
Module: VotingBinaryHoleFillingImageFilter ( folder_id: 1491 )&lt;br /&gt;
'-Nightly ( folder_id: 1491 )&lt;br /&gt;
'-'-Testing ( folder_id: 1492 )&lt;br /&gt;
'-'-'-Baseline ( folder_id: 1493 )&lt;br /&gt;
'-'-'-'-VotingBinaryHoleFillingImageFilterTest.nhdr ( item_id: 103418 )&lt;br /&gt;
'-'-'-'-VotingBinaryHoleFillingImageFilterTest.raw.gz ( item_id: 103419 )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Create &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; data tree based &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; ones&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ python midasdata.py --url=http://slicer.kitware.com/midas3 --data_id=301 \&lt;br /&gt;
  --email=&amp;lt;YOUR-MIDAS-LOGIN&amp;gt; --apikey=&amp;lt;YOUR-MIDAS-APIKEY&amp;gt; --source_version=Nightly --dest_version=X.Y&lt;br /&gt;
&lt;br /&gt;
Versioning of the NA-MIC Data tree for release X.Y...&lt;br /&gt;
Versioning Modules...&lt;br /&gt;
[...]&lt;br /&gt;
Versioning Modules...[DONE]&lt;br /&gt;
Versioning Application...&lt;br /&gt;
Creating folder X.Y under Application directory&lt;br /&gt;
Duplicating subfolders from Nightly to X.Y...&lt;br /&gt;
Duplicating subfolders from Nightly to X.Y...[DONE]&lt;br /&gt;
Versioning Application...[DONE]&lt;br /&gt;
Versioning of the NA-MIC Data tree for release X.Y...[DONE]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Slicer wiki ===&lt;br /&gt;
&lt;br /&gt;
The copy of the pages associated with the &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; namespace into the &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; namespace is done using the convenience python module [https://github.com/jcfr/mwdoc#readme mwdoc].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check with &amp;lt;email&amp;gt;jchris.fillionr@kitware.com&amp;lt;/email&amp;gt; to get the credential associated with &amp;lt;code&amp;gt;UpdateBot&amp;lt;/code&amp;gt; user.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Copy &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; pages into &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ~/Projects&lt;br /&gt;
&lt;br /&gt;
$ sudo pip install mwclient&lt;br /&gt;
&lt;br /&gt;
$ git clone git://github.com/jcfr/mwdoc&lt;br /&gt;
&lt;br /&gt;
$ cd mwdoc&lt;br /&gt;
&lt;br /&gt;
$ python&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import mwdoc&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc = mwdoc.Documentation('slicer.org', '/slicerWiki/')&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc.login('UpdateBot', 'XXXXXXX')&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc.versionPages('Nightly', '4.3', ['Documentation', 'Template:Documentation'])&lt;br /&gt;
[INFO] Page successfully created: 'Documentation/4.3/Extensions/ErodeDilateLabel'&lt;br /&gt;
[...]&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module-header'&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module-section'&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module/footer'&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/nextversion]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/currentversion]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/versionlist]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[FAQ]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/Release]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/Release/Announcements]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/UserTraining]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/UserOrientation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/DeveloperOrientation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CDash ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Create new CDash groups for extension submissions associated with &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; release:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Extensions-X.Y-Nightly&lt;br /&gt;
Extensions-X.Y-Continuous&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update external website ===&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/3DSlicer&lt;br /&gt;
* http://www.nitrc.org/projects/slicer/&lt;br /&gt;
&lt;br /&gt;
=== Backport commit into release branch ===&lt;br /&gt;
&lt;br /&gt;
The following steps will lead to the creation of new git-svn clone having two branches:&lt;br /&gt;
* &amp;lt;code&amp;gt;git-svn&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;git-svn-XY&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: http://www.dmo.ca/blog/20070608113513/&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Checkout sources ====&lt;br /&gt;
&lt;br /&gt;
 git clone git://github.com/Slicer/Slicer.git Slicer-X.Y&lt;br /&gt;
 cd Slicer-X.Y&lt;br /&gt;
 git svn init http://svn.slicer.org/Slicer4/trunk&lt;br /&gt;
 git update-ref refs/remotes/git-svn refs/remotes/origin/master&lt;br /&gt;
 git checkout master&lt;br /&gt;
 git svn rebase&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Add release branch remote ====&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;.git/config&amp;lt;/code&amp;gt;, and in addition to the existing 'git-svn' remote, add the following one:&lt;br /&gt;
&lt;br /&gt;
 [svn-remote &amp;quot;svn-XY&amp;quot;]&lt;br /&gt;
    url = http://svn.slicer.org/Slicer4/branches/Slicer-X-Y&lt;br /&gt;
    fetch = :refs/remotes/git-svn-XY&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Pull associated SVN branch ====&lt;br /&gt;
&lt;br /&gt;
 git svn fetch svn-XY&lt;br /&gt;
 git checkout -b master-XY git-svn-XY&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Backport ====&lt;br /&gt;
&lt;br /&gt;
We can now cherry pick commit associated with master (trunk) into &amp;lt;code&amp;gt;master-XY&amp;lt;/code&amp;gt; (Slicer-X-Y)&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Create a patch release ====&lt;br /&gt;
&lt;br /&gt;
{{wip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Slicer trunk: Update Major/Minor/Patch version to match latest release&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slicer Package naming scheme =&lt;br /&gt;
{{ambox|text=The following information is for Slicer maintainers only}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Slicer-&amp;amp;lt;MAJOR_VERSION&amp;amp;gt;.&amp;amp;lt;MINOR_VERSION&amp;amp;gt;.&amp;amp;lt;PATCH_VERSION&amp;amp;gt;[-rc{1|2|3...}][-&amp;amp;lt;TWEAK_VERSION&amp;amp;gt;][-&amp;amp;lt;DATE&amp;amp;gt;][-svn&amp;amp;lt;REV&amp;amp;gt;][-dirty]-&amp;amp;lt;ARCH&amp;amp;gt;-&amp;amp;lt;PLATFORM&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are 2 types of builds, releases and developments:&lt;br /&gt;
; Release&lt;br /&gt;
: Special builds made on a given revision (e.g. r19033: &amp;quot;ENH: Slicer 4.0.1&amp;quot;)&lt;br /&gt;
: Don't contain date or revision number.&lt;br /&gt;
: The optional suffix '''-rc{1|2|3|...}''' identifies the release candidates leading to a final release.&lt;br /&gt;
: Eventually, a tweak number can be added (e.g. 4.0.1-1)&lt;br /&gt;
; Development&lt;br /&gt;
: Nightly or experimental builds&lt;br /&gt;
: Contains suffixes after the major.minor.patch version &lt;br /&gt;
: The suffix '''svn&amp;amp;lt;REV&amp;amp;gt;''' allows to identify the revision associated with the current package.&lt;br /&gt;
: The '''-dirty''' prefix indicates if the package has been generated from a locally modified source tree.&lt;br /&gt;
&lt;br /&gt;
== Example of linux 64bits packages ==&lt;br /&gt;
 [              File name               ][   date   ][ build type ][                      note                     ]&lt;br /&gt;
 Slicer-4.0.0-linux-amd64                 2011-11-24    release     release of Slicer 4.0.0&lt;br /&gt;
 Slicer-4.0.0-2011-12-10-linux-amd64      2011-11-25  development   nightly build after 4.0.0&lt;br /&gt;
 Slicer-4.0.1-rc1-linux-amd64             2012-01-04    release     release candidate 1 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-rc1-2012-01-05-linux-amd64  2012-01-05  development   nightly build after the release candidate&lt;br /&gt;
 Slicer-4.0.1-rc2-linux-amd64             2012-01-11    release     release candidate 2 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-rc2-2012-01-12-linux-amd64  2012-01-12  development   nightly build after the release candidate&lt;br /&gt;
 Slicer-4.0.1-linux-amd64                 2012-01-14    release     release of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-2012-01-20-linux-amd64      2012-01-20  development   nightly build after 4.0.1&lt;br /&gt;
 Slicer-4.0.1-1-linux-amd64               2012-01-28    release     tweak version 1 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.2-linux.amd64                 2012-06-05    release     release of Slicer 4.0.2&lt;br /&gt;
&lt;br /&gt;
= Extension package - Naming scheme =&lt;br /&gt;
&lt;br /&gt;
* Create &amp;lt;code&amp;gt;Extensions-XYZ-Nightly&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Extensions-XYZ-Continuous&amp;lt;/code&amp;gt; tracks on CDash&lt;br /&gt;
&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Versioning&amp;diff=37487</id>
		<title>Documentation/Nightly/Developers/Versioning</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Versioning&amp;diff=37487"/>
		<updated>2014-03-14T19:24:21Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Release-candidate */ document update process for __version__.py, improve step organization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
= How to create a Slicer package =&lt;br /&gt;
&lt;br /&gt;
== Locally on your machine ==&lt;br /&gt;
&lt;br /&gt;
After Slicer correctly build and test, to create a binary package on mac/unix:&lt;br /&gt;
&lt;br /&gt;
 $ cd Slicer-Superbuild/Slicer-build&lt;br /&gt;
 $ make package&lt;br /&gt;
&lt;br /&gt;
For Visual Studio on Windows, the inner Slicer (not superbuild) solution file contains a 'PACKAGE' project, just build it. You might have to install [http://nsis.sourceforge.net/Download NSIS] prior.&lt;br /&gt;
&lt;br /&gt;
On Mac OS X, a 'dmg' file is generated, on unix it's a tar.gz archive and on Windows it's a exe installer.&lt;br /&gt;
&lt;br /&gt;
== Automatically expose it to the Slicer community ==&lt;br /&gt;
&lt;br /&gt;
CTest can automatically create a package and upload it on [http://slicer.cdash.org slicer.cdash.org] and [http://download.slicer.org download.slicer.org] to be available to the community.&lt;br /&gt;
&lt;br /&gt;
You need to create a script following the template [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/CMake/SlicerDashboardScript.TEMPLATE.cmake?view=markup Slicer/CMake/SlicerDashboardScript.TEMPLATE.cmake]. Change the following variables &amp;lt;code&amp;gt;WITH_PACKAGES&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SCRIPT_MODE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;experimental&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then you can run your script:&lt;br /&gt;
 $ ctest -S /path/to/SlicerPackageScript.cmake -VV &amp;gt; /path/to/logs.txt 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
Please note that the source and build directories should not be located in '''/usr'''. The libraries would be considered by the packaging mechanism as &amp;quot;system&amp;quot; libraries.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Versioning =&lt;br /&gt;
&lt;br /&gt;
== Project fork ==&lt;br /&gt;
&lt;br /&gt;
While Slicer specific patches related to dependent project (i.e. VTK) are integrated upstream, it is not uncommon to build Slicer against a Slicer specific fork of the project.&lt;br /&gt;
&lt;br /&gt;
For example: https://github.com/Slicer/VTK&lt;br /&gt;
&lt;br /&gt;
=== Patches for tagged release ===&lt;br /&gt;
&lt;br /&gt;
For each version of the project requiring some specific patches, a branch following that convention will be created: &amp;lt;code&amp;gt;slicer-vX.Y.Z&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;X.Y.Z&amp;lt;/code&amp;gt; corresponds to the version of the project.&lt;br /&gt;
&lt;br /&gt;
For example, in case of the SlicerVTK fork, the branch &amp;lt;code&amp;gt;slicer-v5.10.1&amp;lt;/code&amp;gt; has been created.&lt;br /&gt;
&lt;br /&gt;
=== Patches for development branch ===&lt;br /&gt;
&lt;br /&gt;
In this case, since there is no tag associated with the branch, the Slicer specific patch should be added to a branch named using the date of the commit parent of the Slicer branch: &amp;lt;code&amp;gt;slicer-YEAR-MONTH-DAY-vX.Y&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; corresponds to the fork release.&lt;br /&gt;
&lt;br /&gt;
== Create release dashboard scripts ==&lt;br /&gt;
&lt;br /&gt;
{{wip}}&lt;br /&gt;
&lt;br /&gt;
== Feature freeze ==&lt;br /&gt;
&lt;br /&gt;
Usually ~1 month before release.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Update modules documentation link in help section (loadable, scripted and cli)&lt;br /&gt;
** And some html links in Welcome module (Modules/Loadable/SlicerWelcome/Resources/HTML)&lt;br /&gt;
** Update CLI XML description files&lt;br /&gt;
&lt;br /&gt;
Commit message: &amp;lt;code&amp;gt;Update Documentation to X.Y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example: [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22407 r22407]&lt;br /&gt;
&lt;br /&gt;
== Release-candidate ==&lt;br /&gt;
&lt;br /&gt;
Since there all development occurs on &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;, each time version is updated, two commits will be required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;RC&amp;gt;&amp;lt;/code&amp;gt; corresponds to the release candidate number. It is greater or equal to one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the release candidate:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, uncomment and set:&amp;lt;/p&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;Slicer_VERSION_RC&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;RC&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;...and if this is the first release candidate, update at least one these variables: &amp;lt;code&amp;gt;Slicer_VERSION_MAJOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_MINOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_PATCH&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Slicer X.Y.Z-rc&amp;lt;RC&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate packages based on REVISION associated with step 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the development:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, comment &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; so that the next builds will contain the date associated with the last commit.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Begin post-X.Y.Z-rc&amp;lt;RC&amp;gt; development&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Release ==&lt;br /&gt;
&lt;br /&gt;
Since there all development occurs on &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;, each time version is updated, two commits will be required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the release:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, uncomment and set &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;...and if this no release candidate has been made, update at least one these variables: &amp;lt;code&amp;gt;Slicer_VERSION_MAJOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_MINOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_PATCH&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Slicer X.Y.Z&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Generate packages based on REVISION associated with step1.&amp;lt;/p&amp;gt;&lt;br /&gt;
Tag the repository:&lt;br /&gt;
 svn copy -r&amp;lt;REVISION&amp;gt; http://svn.slicer.org/Slicer4/trunk  \&lt;br /&gt;
      http://svn.slicer.org/Slicer4/tags/Slicer-X-Y  \&lt;br /&gt;
     -m &amp;quot;ENH: Tag of X.Y.Z release based on r&amp;lt;REVISION&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the development:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, comment and set:&amp;lt;/p&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; so that the next builds will contain the date associated with the last commit.&lt;br /&gt;
* &amp;lt;code&amp;gt;Slicer_VERSION_RC&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Begin post-X.Y.Z development&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Post release ==&lt;br /&gt;
&lt;br /&gt;
=== Create a release branch ===&lt;br /&gt;
&lt;br /&gt;
 svn copy -r &amp;lt;REVISION&amp;gt; http://svn.slicer.org/Slicer4/trunk http://svn.slicer.org/Slicer4/branches/Slicer-X-Y \&lt;br /&gt;
  -m &amp;quot;ENH: Branching from trunk to Slicer-X-Y at &amp;lt;REVISION&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  svn checkout http://svn.slicer.org/Slicer4/branches/Slicer-X-Y&lt;br /&gt;
&lt;br /&gt;
=== Generate ChangeLog ===&lt;br /&gt;
&lt;br /&gt;
* See [https://raw.github.com/cryos/avogadro/master/scripts/gitlog2changelog.py gitlog2changelog.py]. More details [http://blog.cryos.net/archives/202-Git-and-Automatic-ChangeLog-Generation.html here].&lt;br /&gt;
&lt;br /&gt;
* Update [[Release Details]] page using generated ChangeLog&lt;br /&gt;
&lt;br /&gt;
=== Update Mantis ===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Release&amp;quot; current target&lt;br /&gt;
* Create new target&lt;br /&gt;
* Check the &amp;quot;fixed in&amp;quot; fields&lt;br /&gt;
&lt;br /&gt;
=== Midas ===&lt;br /&gt;
&lt;br /&gt;
==== Tag release packages ====&lt;br /&gt;
&lt;br /&gt;
* If needed, create a X.Y.Z folder in [http://slicer.kitware.com/midas3/folder/274 Slicer/Packages/Application/Release]&lt;br /&gt;
** Copy uploaded packages into the folder created above&lt;br /&gt;
** Identify the item_id associated with uploaded packages. For example: 11926, 11925, 11927, 11992&lt;br /&gt;
** SSH connect to &amp;lt;code&amp;gt;jcfr@slicer.kitwarein.com&amp;lt;/code&amp;gt;&lt;br /&gt;
** Connect to mysql using &amp;lt;code&amp;gt;mysql -u midas -p&amp;lt;/code&amp;gt;&lt;br /&gt;
*** See file &amp;lt;code&amp;gt;/var/www/midas3/core/configs/database.local.ini&amp;lt;/code&amp;gt; for password&lt;br /&gt;
*** Choose midas database: &amp;lt;code&amp;gt;use midas&amp;lt;/code&amp;gt;&lt;br /&gt;
** List packages associated with identified items and check they are the appropriate ones:&lt;br /&gt;
*** &amp;lt;code&amp;gt;select *  from slicerpackages_package as p , item as i where i.item_id = p.item_id and p.item_id in (11926, 11925, 11927, 11992);&amp;lt;/code&amp;gt;&lt;br /&gt;
** Set release field&lt;br /&gt;
*** &amp;lt;code&amp;gt;update slicerpackages_package set `release`=&amp;quot;4.2.2-1&amp;quot; where item_id in (11926, 11925, 11927, 11992);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Version NA-MIC data tree ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;[[Documentation/{{documentation/version}}/Developers/Tutorials/ObtainExtensionServerApiKey|Create an account on the extension server and obtain an API Key]]. You will then use your midas login and api key to substitute &amp;lt;code&amp;gt;&amp;lt;YOUR-MIDAS-LOGIN&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;YOUR-MIDAS-APIKEY&amp;gt;&amp;lt;/code&amp;gt; in the examples.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;If not already done, go to [http://slicer.kitware.com/midas3/community/23 NA-MIC community] and click on &amp;lt;code&amp;gt;Join community&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Send an email on the developer list asking to be added to the &amp;lt;code&amp;gt;DataManager&amp;lt;/code&amp;gt; group on NA-MIC community. That will grant you read/write permissions to the &amp;lt;code&amp;gt;Data&amp;lt;/code&amp;gt; folder and sub-folders.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Install prerequisites&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo pip install pydas&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Identify &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; of the &amp;lt;code&amp;gt;Data&amp;lt;/code&amp;gt; folder. For example [http://slicer.kitware.com/midas3/folder/301 301]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simulate creation of &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; data folders based &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; ones&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Slicer/Base/Python/slicer/release&lt;br /&gt;
$ python midasdata.py --url=http://slicer.kitware.com/midas3 --data_id=301 \&lt;br /&gt;
  --email=&amp;lt;YOUR-MIDAS-LOGIN&amp;gt; --apikey=&amp;lt;YOUR-MIDAS-APIKEY&amp;gt; --source_version=Nightly --dest_version=X.Y --dry-run&lt;br /&gt;
Application ( folder_id: 302 )&lt;br /&gt;
'-Nightly ( folder_id: 831 )&lt;br /&gt;
'-'-Testing ( folder_id: 832 )&lt;br /&gt;
'-'-'-Baseline ( folder_id: 889 )&lt;br /&gt;
'-'-'-'-DiffusionTensorImagingTutorial.png ( item_id: 12067 )&lt;br /&gt;
'-'-'-'-NeurosurgicalPlanningTutorial.png ( item_id: 12066 )&lt;br /&gt;
'-'-'-'-SlicerTestingTest.png ( item_id: 17760 )&lt;br /&gt;
'-'-'-Input ( folder_id: 833 )&lt;br /&gt;
'-'-'-'-AtlasTests ( folder_id: 834 )&lt;br /&gt;
'-'-'-'-'-2012-10-26-BrainAtlas.mrb ( item_id: 10276 )&lt;br /&gt;
[...]&lt;br /&gt;
Module: VotingBinaryHoleFillingImageFilter ( folder_id: 1491 )&lt;br /&gt;
'-Nightly ( folder_id: 1491 )&lt;br /&gt;
'-'-Testing ( folder_id: 1492 )&lt;br /&gt;
'-'-'-Baseline ( folder_id: 1493 )&lt;br /&gt;
'-'-'-'-VotingBinaryHoleFillingImageFilterTest.nhdr ( item_id: 103418 )&lt;br /&gt;
'-'-'-'-VotingBinaryHoleFillingImageFilterTest.raw.gz ( item_id: 103419 )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Create &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; data tree based &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; ones&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ python midasdata.py --url=http://slicer.kitware.com/midas3 --data_id=301 \&lt;br /&gt;
  --email=&amp;lt;YOUR-MIDAS-LOGIN&amp;gt; --apikey=&amp;lt;YOUR-MIDAS-APIKEY&amp;gt; --source_version=Nightly --dest_version=X.Y&lt;br /&gt;
&lt;br /&gt;
Versioning of the NA-MIC Data tree for release X.Y...&lt;br /&gt;
Versioning Modules...&lt;br /&gt;
[...]&lt;br /&gt;
Versioning Modules...[DONE]&lt;br /&gt;
Versioning Application...&lt;br /&gt;
Creating folder X.Y under Application directory&lt;br /&gt;
Duplicating subfolders from Nightly to X.Y...&lt;br /&gt;
Duplicating subfolders from Nightly to X.Y...[DONE]&lt;br /&gt;
Versioning Application...[DONE]&lt;br /&gt;
Versioning of the NA-MIC Data tree for release X.Y...[DONE]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Slicer wiki ===&lt;br /&gt;
&lt;br /&gt;
The copy of the pages associated with the &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; namespace into the &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; namespace is done using the convenience python module [https://github.com/jcfr/mwdoc#readme mwdoc].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check with &amp;lt;email&amp;gt;jchris.fillionr@kitware.com&amp;lt;/email&amp;gt; to get the credential associated with &amp;lt;code&amp;gt;UpdateBot&amp;lt;/code&amp;gt; user.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Copy &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; pages into &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ~/Projects&lt;br /&gt;
&lt;br /&gt;
$ sudo pip install mwclient&lt;br /&gt;
&lt;br /&gt;
$ git clone git://github.com/jcfr/mwdoc&lt;br /&gt;
&lt;br /&gt;
$ cd mwdoc&lt;br /&gt;
&lt;br /&gt;
$ python&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import mwdoc&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc = mwdoc.Documentation('slicer.org', '/slicerWiki/')&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc.login('UpdateBot', 'XXXXXXX')&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc.versionPages('Nightly', '4.3', ['Documentation', 'Template:Documentation'])&lt;br /&gt;
[INFO] Page successfully created: 'Documentation/4.3/Extensions/ErodeDilateLabel'&lt;br /&gt;
[...]&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module-header'&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module-section'&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module/footer'&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/nextversion]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/currentversion]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/versionlist]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[FAQ]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/Release]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/Release/Announcements]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/UserTraining]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/UserOrientation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/DeveloperOrientation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CDash ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Create new CDash groups for extension submissions associated with &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; release:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Extensions-X.Y-Nightly&lt;br /&gt;
Extensions-X.Y-Continuous&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update external website ===&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/3DSlicer&lt;br /&gt;
* http://www.nitrc.org/projects/slicer/&lt;br /&gt;
&lt;br /&gt;
=== Backport commit into release branch ===&lt;br /&gt;
&lt;br /&gt;
The following steps will lead to the creation of new git-svn clone having two branches:&lt;br /&gt;
* &amp;lt;code&amp;gt;git-svn&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;git-svn-XY&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: http://www.dmo.ca/blog/20070608113513/&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Checkout sources ====&lt;br /&gt;
&lt;br /&gt;
 git clone git://github.com/Slicer/Slicer.git Slicer-X.Y&lt;br /&gt;
 cd Slicer-X.Y&lt;br /&gt;
 git svn init http://svn.slicer.org/Slicer4/trunk&lt;br /&gt;
 git update-ref refs/remotes/git-svn refs/remotes/origin/master&lt;br /&gt;
 git checkout master&lt;br /&gt;
 git svn rebase&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Add release branch remote ====&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;.git/config&amp;lt;/code&amp;gt;, and in addition to the existing 'git-svn' remote, add the following one:&lt;br /&gt;
&lt;br /&gt;
 [svn-remote &amp;quot;svn-XY&amp;quot;]&lt;br /&gt;
    url = http://svn.slicer.org/Slicer4/branches/Slicer-X-Y&lt;br /&gt;
    fetch = :refs/remotes/git-svn-XY&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Pull associated SVN branch ====&lt;br /&gt;
&lt;br /&gt;
 git svn fetch svn-XY&lt;br /&gt;
 git checkout -b master-XY git-svn-XY&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Backport ====&lt;br /&gt;
&lt;br /&gt;
We can now cherry pick commit associated with master (trunk) into &amp;lt;code&amp;gt;master-XY&amp;lt;/code&amp;gt; (Slicer-X-Y)&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Create a patch release ====&lt;br /&gt;
&lt;br /&gt;
{{wip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Slicer trunk: Update Major/Minor/Patch version to match latest release&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slicer Package naming scheme =&lt;br /&gt;
{{ambox|text=The following information is for Slicer maintainers only}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Slicer-&amp;amp;lt;MAJOR_VERSION&amp;amp;gt;.&amp;amp;lt;MINOR_VERSION&amp;amp;gt;.&amp;amp;lt;PATCH_VERSION&amp;amp;gt;[-rc{1|2|3...}][-&amp;amp;lt;TWEAK_VERSION&amp;amp;gt;][-&amp;amp;lt;DATE&amp;amp;gt;][-svn&amp;amp;lt;REV&amp;amp;gt;][-dirty]-&amp;amp;lt;ARCH&amp;amp;gt;-&amp;amp;lt;PLATFORM&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are 2 types of builds, releases and developments:&lt;br /&gt;
; Release&lt;br /&gt;
: Special builds made on a given revision (e.g. r19033: &amp;quot;ENH: Slicer 4.0.1&amp;quot;)&lt;br /&gt;
: Don't contain date or revision number.&lt;br /&gt;
: The optional suffix '''-rc{1|2|3|...}''' identifies the release candidates leading to a final release.&lt;br /&gt;
: Eventually, a tweak number can be added (e.g. 4.0.1-1)&lt;br /&gt;
; Development&lt;br /&gt;
: Nightly or experimental builds&lt;br /&gt;
: Contains suffixes after the major.minor.patch version &lt;br /&gt;
: The suffix '''svn&amp;amp;lt;REV&amp;amp;gt;''' allows to identify the revision associated with the current package.&lt;br /&gt;
: The '''-dirty''' prefix indicates if the package has been generated from a locally modified source tree.&lt;br /&gt;
&lt;br /&gt;
== Example of linux 64bits packages ==&lt;br /&gt;
 [              File name               ][   date   ][ build type ][                      note                     ]&lt;br /&gt;
 Slicer-4.0.0-linux-amd64                 2011-11-24    release     release of Slicer 4.0.0&lt;br /&gt;
 Slicer-4.0.0-2011-12-10-linux-amd64      2011-11-25  development   nightly build after 4.0.0&lt;br /&gt;
 Slicer-4.0.1-rc1-linux-amd64             2012-01-04    release     release candidate 1 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-rc1-2012-01-05-linux-amd64  2012-01-05  development   nightly build after the release candidate&lt;br /&gt;
 Slicer-4.0.1-rc2-linux-amd64             2012-01-11    release     release candidate 2 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-rc2-2012-01-12-linux-amd64  2012-01-12  development   nightly build after the release candidate&lt;br /&gt;
 Slicer-4.0.1-linux-amd64                 2012-01-14    release     release of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-2012-01-20-linux-amd64      2012-01-20  development   nightly build after 4.0.1&lt;br /&gt;
 Slicer-4.0.1-1-linux-amd64               2012-01-28    release     tweak version 1 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.2-linux.amd64                 2012-06-05    release     release of Slicer 4.0.2&lt;br /&gt;
&lt;br /&gt;
= Extension package - Naming scheme =&lt;br /&gt;
&lt;br /&gt;
* Create &amp;lt;code&amp;gt;Extensions-XYZ-Nightly&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Extensions-XYZ-Continuous&amp;lt;/code&amp;gt; tracks on CDash&lt;br /&gt;
&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Versioning&amp;diff=37486</id>
		<title>Documentation/Nightly/Developers/Versioning</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Versioning&amp;diff=37486"/>
		<updated>2014-03-14T19:15:57Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Release */ document update process for __version__.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
= How to create a Slicer package =&lt;br /&gt;
&lt;br /&gt;
== Locally on your machine ==&lt;br /&gt;
&lt;br /&gt;
After Slicer correctly build and test, to create a binary package on mac/unix:&lt;br /&gt;
&lt;br /&gt;
 $ cd Slicer-Superbuild/Slicer-build&lt;br /&gt;
 $ make package&lt;br /&gt;
&lt;br /&gt;
For Visual Studio on Windows, the inner Slicer (not superbuild) solution file contains a 'PACKAGE' project, just build it. You might have to install [http://nsis.sourceforge.net/Download NSIS] prior.&lt;br /&gt;
&lt;br /&gt;
On Mac OS X, a 'dmg' file is generated, on unix it's a tar.gz archive and on Windows it's a exe installer.&lt;br /&gt;
&lt;br /&gt;
== Automatically expose it to the Slicer community ==&lt;br /&gt;
&lt;br /&gt;
CTest can automatically create a package and upload it on [http://slicer.cdash.org slicer.cdash.org] and [http://download.slicer.org download.slicer.org] to be available to the community.&lt;br /&gt;
&lt;br /&gt;
You need to create a script following the template [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/CMake/SlicerDashboardScript.TEMPLATE.cmake?view=markup Slicer/CMake/SlicerDashboardScript.TEMPLATE.cmake]. Change the following variables &amp;lt;code&amp;gt;WITH_PACKAGES&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SCRIPT_MODE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;experimental&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then you can run your script:&lt;br /&gt;
 $ ctest -S /path/to/SlicerPackageScript.cmake -VV &amp;gt; /path/to/logs.txt 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
Please note that the source and build directories should not be located in '''/usr'''. The libraries would be considered by the packaging mechanism as &amp;quot;system&amp;quot; libraries.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Versioning =&lt;br /&gt;
&lt;br /&gt;
== Project fork ==&lt;br /&gt;
&lt;br /&gt;
While Slicer specific patches related to dependent project (i.e. VTK) are integrated upstream, it is not uncommon to build Slicer against a Slicer specific fork of the project.&lt;br /&gt;
&lt;br /&gt;
For example: https://github.com/Slicer/VTK&lt;br /&gt;
&lt;br /&gt;
=== Patches for tagged release ===&lt;br /&gt;
&lt;br /&gt;
For each version of the project requiring some specific patches, a branch following that convention will be created: &amp;lt;code&amp;gt;slicer-vX.Y.Z&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;X.Y.Z&amp;lt;/code&amp;gt; corresponds to the version of the project.&lt;br /&gt;
&lt;br /&gt;
For example, in case of the SlicerVTK fork, the branch &amp;lt;code&amp;gt;slicer-v5.10.1&amp;lt;/code&amp;gt; has been created.&lt;br /&gt;
&lt;br /&gt;
=== Patches for development branch ===&lt;br /&gt;
&lt;br /&gt;
In this case, since there is no tag associated with the branch, the Slicer specific patch should be added to a branch named using the date of the commit parent of the Slicer branch: &amp;lt;code&amp;gt;slicer-YEAR-MONTH-DAY-vX.Y&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; corresponds to the fork release.&lt;br /&gt;
&lt;br /&gt;
== Create release dashboard scripts ==&lt;br /&gt;
&lt;br /&gt;
{{wip}}&lt;br /&gt;
&lt;br /&gt;
== Feature freeze ==&lt;br /&gt;
&lt;br /&gt;
Usually ~1 month before release.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Update modules documentation link in help section (loadable, scripted and cli)&lt;br /&gt;
** And some html links in Welcome module (Modules/Loadable/SlicerWelcome/Resources/HTML)&lt;br /&gt;
** Update CLI XML description files&lt;br /&gt;
&lt;br /&gt;
Commit message: &amp;lt;code&amp;gt;Update Documentation to X.Y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example: [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22407 r22407]&lt;br /&gt;
&lt;br /&gt;
== Release-candidate ==&lt;br /&gt;
&lt;br /&gt;
Since there all development occurs on &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;, each time version is updated, two commits will be required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;RC&amp;gt;&amp;lt;/code&amp;gt; corresponds to the release candidate number. It is greater or equal to one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, uncomment and set:&lt;br /&gt;
*&amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;Slicer_VERSION_RC&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;... and if this is the first release candidate, update at least one these variables: &amp;lt;code&amp;gt;Slicer_VERSION_MAJOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_MINOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_PATCH&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt; changes using this message:&amp;lt;/p&amp;gt;&amp;lt;pre&amp;gt;ENH: Slicer X.Y.Z-rc&amp;lt;RC&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Generate packages based on REVISION associated with step1.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, comment &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; so that the next builds will contain the date associated with the last commit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Commit &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt; changes using this message:&amp;lt;/p&amp;gt; &amp;lt;pre&amp;gt;ENH: Begin post-X.Y.Z-rc&amp;lt;RC&amp;gt; development&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Release ==&lt;br /&gt;
&lt;br /&gt;
Since there all development occurs on &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;, each time version is updated, two commits will be required.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the release:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, uncomment and set &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;...and if this no release candidate has been made, update at least one these variables: &amp;lt;code&amp;gt;Slicer_VERSION_MAJOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_MINOR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slicer_VERSION_PATCH&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Slicer X.Y.Z&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Generate packages based on REVISION associated with step1.&amp;lt;/p&amp;gt;&lt;br /&gt;
Tag the repository:&lt;br /&gt;
 svn copy -r&amp;lt;REVISION&amp;gt; http://svn.slicer.org/Slicer4/trunk  \&lt;br /&gt;
      http://svn.slicer.org/Slicer4/tags/Slicer-X-Y  \&lt;br /&gt;
     -m &amp;quot;ENH: Tag of X.Y.Z release based on r&amp;lt;REVISION&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update the Slicer version information for the development:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-roman;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt;, comment and set:&amp;lt;/p&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Slicer_VERSION_TWEAK&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; so that the next builds will contain the date associated with the last commit.&lt;br /&gt;
* &amp;lt;code&amp;gt;Slicer_VERSION_RC&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-run CMake in order to update &amp;lt;code&amp;gt;Utilities/Scripts/SlicerWizard/__version__.py&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Commit the above changes using this message:&amp;lt;/p&amp;gt;&lt;br /&gt;
 ENH: Begin post-X.Y.Z development&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Post release ==&lt;br /&gt;
&lt;br /&gt;
=== Create a release branch ===&lt;br /&gt;
&lt;br /&gt;
 svn copy -r &amp;lt;REVISION&amp;gt; http://svn.slicer.org/Slicer4/trunk http://svn.slicer.org/Slicer4/branches/Slicer-X-Y \&lt;br /&gt;
  -m &amp;quot;ENH: Branching from trunk to Slicer-X-Y at &amp;lt;REVISION&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  svn checkout http://svn.slicer.org/Slicer4/branches/Slicer-X-Y&lt;br /&gt;
&lt;br /&gt;
=== Generate ChangeLog ===&lt;br /&gt;
&lt;br /&gt;
* See [https://raw.github.com/cryos/avogadro/master/scripts/gitlog2changelog.py gitlog2changelog.py]. More details [http://blog.cryos.net/archives/202-Git-and-Automatic-ChangeLog-Generation.html here].&lt;br /&gt;
&lt;br /&gt;
* Update [[Release Details]] page using generated ChangeLog&lt;br /&gt;
&lt;br /&gt;
=== Update Mantis ===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Release&amp;quot; current target&lt;br /&gt;
* Create new target&lt;br /&gt;
* Check the &amp;quot;fixed in&amp;quot; fields&lt;br /&gt;
&lt;br /&gt;
=== Midas ===&lt;br /&gt;
&lt;br /&gt;
==== Tag release packages ====&lt;br /&gt;
&lt;br /&gt;
* If needed, create a X.Y.Z folder in [http://slicer.kitware.com/midas3/folder/274 Slicer/Packages/Application/Release]&lt;br /&gt;
** Copy uploaded packages into the folder created above&lt;br /&gt;
** Identify the item_id associated with uploaded packages. For example: 11926, 11925, 11927, 11992&lt;br /&gt;
** SSH connect to &amp;lt;code&amp;gt;jcfr@slicer.kitwarein.com&amp;lt;/code&amp;gt;&lt;br /&gt;
** Connect to mysql using &amp;lt;code&amp;gt;mysql -u midas -p&amp;lt;/code&amp;gt;&lt;br /&gt;
*** See file &amp;lt;code&amp;gt;/var/www/midas3/core/configs/database.local.ini&amp;lt;/code&amp;gt; for password&lt;br /&gt;
*** Choose midas database: &amp;lt;code&amp;gt;use midas&amp;lt;/code&amp;gt;&lt;br /&gt;
** List packages associated with identified items and check they are the appropriate ones:&lt;br /&gt;
*** &amp;lt;code&amp;gt;select *  from slicerpackages_package as p , item as i where i.item_id = p.item_id and p.item_id in (11926, 11925, 11927, 11992);&amp;lt;/code&amp;gt;&lt;br /&gt;
** Set release field&lt;br /&gt;
*** &amp;lt;code&amp;gt;update slicerpackages_package set `release`=&amp;quot;4.2.2-1&amp;quot; where item_id in (11926, 11925, 11927, 11992);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Version NA-MIC data tree ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;[[Documentation/{{documentation/version}}/Developers/Tutorials/ObtainExtensionServerApiKey|Create an account on the extension server and obtain an API Key]]. You will then use your midas login and api key to substitute &amp;lt;code&amp;gt;&amp;lt;YOUR-MIDAS-LOGIN&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;YOUR-MIDAS-APIKEY&amp;gt;&amp;lt;/code&amp;gt; in the examples.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;If not already done, go to [http://slicer.kitware.com/midas3/community/23 NA-MIC community] and click on &amp;lt;code&amp;gt;Join community&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Send an email on the developer list asking to be added to the &amp;lt;code&amp;gt;DataManager&amp;lt;/code&amp;gt; group on NA-MIC community. That will grant you read/write permissions to the &amp;lt;code&amp;gt;Data&amp;lt;/code&amp;gt; folder and sub-folders.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Install prerequisites&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo pip install pydas&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Identify &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; of the &amp;lt;code&amp;gt;Data&amp;lt;/code&amp;gt; folder. For example [http://slicer.kitware.com/midas3/folder/301 301]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simulate creation of &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; data folders based &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; ones&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Slicer/Base/Python/slicer/release&lt;br /&gt;
$ python midasdata.py --url=http://slicer.kitware.com/midas3 --data_id=301 \&lt;br /&gt;
  --email=&amp;lt;YOUR-MIDAS-LOGIN&amp;gt; --apikey=&amp;lt;YOUR-MIDAS-APIKEY&amp;gt; --source_version=Nightly --dest_version=X.Y --dry-run&lt;br /&gt;
Application ( folder_id: 302 )&lt;br /&gt;
'-Nightly ( folder_id: 831 )&lt;br /&gt;
'-'-Testing ( folder_id: 832 )&lt;br /&gt;
'-'-'-Baseline ( folder_id: 889 )&lt;br /&gt;
'-'-'-'-DiffusionTensorImagingTutorial.png ( item_id: 12067 )&lt;br /&gt;
'-'-'-'-NeurosurgicalPlanningTutorial.png ( item_id: 12066 )&lt;br /&gt;
'-'-'-'-SlicerTestingTest.png ( item_id: 17760 )&lt;br /&gt;
'-'-'-Input ( folder_id: 833 )&lt;br /&gt;
'-'-'-'-AtlasTests ( folder_id: 834 )&lt;br /&gt;
'-'-'-'-'-2012-10-26-BrainAtlas.mrb ( item_id: 10276 )&lt;br /&gt;
[...]&lt;br /&gt;
Module: VotingBinaryHoleFillingImageFilter ( folder_id: 1491 )&lt;br /&gt;
'-Nightly ( folder_id: 1491 )&lt;br /&gt;
'-'-Testing ( folder_id: 1492 )&lt;br /&gt;
'-'-'-Baseline ( folder_id: 1493 )&lt;br /&gt;
'-'-'-'-VotingBinaryHoleFillingImageFilterTest.nhdr ( item_id: 103418 )&lt;br /&gt;
'-'-'-'-VotingBinaryHoleFillingImageFilterTest.raw.gz ( item_id: 103419 )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Create &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; data tree based &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; ones&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ python midasdata.py --url=http://slicer.kitware.com/midas3 --data_id=301 \&lt;br /&gt;
  --email=&amp;lt;YOUR-MIDAS-LOGIN&amp;gt; --apikey=&amp;lt;YOUR-MIDAS-APIKEY&amp;gt; --source_version=Nightly --dest_version=X.Y&lt;br /&gt;
&lt;br /&gt;
Versioning of the NA-MIC Data tree for release X.Y...&lt;br /&gt;
Versioning Modules...&lt;br /&gt;
[...]&lt;br /&gt;
Versioning Modules...[DONE]&lt;br /&gt;
Versioning Application...&lt;br /&gt;
Creating folder X.Y under Application directory&lt;br /&gt;
Duplicating subfolders from Nightly to X.Y...&lt;br /&gt;
Duplicating subfolders from Nightly to X.Y...[DONE]&lt;br /&gt;
Versioning Application...[DONE]&lt;br /&gt;
Versioning of the NA-MIC Data tree for release X.Y...[DONE]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Slicer wiki ===&lt;br /&gt;
&lt;br /&gt;
The copy of the pages associated with the &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; namespace into the &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; namespace is done using the convenience python module [https://github.com/jcfr/mwdoc#readme mwdoc].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check with &amp;lt;email&amp;gt;jchris.fillionr@kitware.com&amp;lt;/email&amp;gt; to get the credential associated with &amp;lt;code&amp;gt;UpdateBot&amp;lt;/code&amp;gt; user.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Copy &amp;lt;code&amp;gt;Nightly&amp;lt;/code&amp;gt; pages into &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ~/Projects&lt;br /&gt;
&lt;br /&gt;
$ sudo pip install mwclient&lt;br /&gt;
&lt;br /&gt;
$ git clone git://github.com/jcfr/mwdoc&lt;br /&gt;
&lt;br /&gt;
$ cd mwdoc&lt;br /&gt;
&lt;br /&gt;
$ python&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import mwdoc&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc = mwdoc.Documentation('slicer.org', '/slicerWiki/')&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc.login('UpdateBot', 'XXXXXXX')&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; doc.versionPages('Nightly', '4.3', ['Documentation', 'Template:Documentation'])&lt;br /&gt;
[INFO] Page successfully created: 'Documentation/4.3/Extensions/ErodeDilateLabel'&lt;br /&gt;
[...]&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module-header'&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module-section'&lt;br /&gt;
[INFO] Page successfully created: 'Template:Documentation/4.3/module/footer'&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/nextversion]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/currentversion]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Template:Documentation/versionlist]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[FAQ]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/Release]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/Release/Announcements]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/UserTraining]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/UserOrientation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Update [[Documentation/DeveloperOrientation]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CDash ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Create new CDash groups for extension submissions associated with &amp;lt;code&amp;gt;X.Y&amp;lt;/code&amp;gt; release:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Extensions-X.Y-Nightly&lt;br /&gt;
Extensions-X.Y-Continuous&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update external website ===&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/3DSlicer&lt;br /&gt;
* http://www.nitrc.org/projects/slicer/&lt;br /&gt;
&lt;br /&gt;
=== Backport commit into release branch ===&lt;br /&gt;
&lt;br /&gt;
The following steps will lead to the creation of new git-svn clone having two branches:&lt;br /&gt;
* &amp;lt;code&amp;gt;git-svn&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;git-svn-XY&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: http://www.dmo.ca/blog/20070608113513/&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Checkout sources ====&lt;br /&gt;
&lt;br /&gt;
 git clone git://github.com/Slicer/Slicer.git Slicer-X.Y&lt;br /&gt;
 cd Slicer-X.Y&lt;br /&gt;
 git svn init http://svn.slicer.org/Slicer4/trunk&lt;br /&gt;
 git update-ref refs/remotes/git-svn refs/remotes/origin/master&lt;br /&gt;
 git checkout master&lt;br /&gt;
 git svn rebase&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Add release branch remote ====&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;.git/config&amp;lt;/code&amp;gt;, and in addition to the existing 'git-svn' remote, add the following one:&lt;br /&gt;
&lt;br /&gt;
 [svn-remote &amp;quot;svn-XY&amp;quot;]&lt;br /&gt;
    url = http://svn.slicer.org/Slicer4/branches/Slicer-X-Y&lt;br /&gt;
    fetch = :refs/remotes/git-svn-XY&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Pull associated SVN branch ====&lt;br /&gt;
&lt;br /&gt;
 git svn fetch svn-XY&lt;br /&gt;
 git checkout -b master-XY git-svn-XY&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Backport ====&lt;br /&gt;
&lt;br /&gt;
We can now cherry pick commit associated with master (trunk) into &amp;lt;code&amp;gt;master-XY&amp;lt;/code&amp;gt; (Slicer-X-Y)&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Create a patch release ====&lt;br /&gt;
&lt;br /&gt;
{{wip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Slicer trunk: Update Major/Minor/Patch version to match latest release&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slicer Package naming scheme =&lt;br /&gt;
{{ambox|text=The following information is for Slicer maintainers only}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Slicer-&amp;amp;lt;MAJOR_VERSION&amp;amp;gt;.&amp;amp;lt;MINOR_VERSION&amp;amp;gt;.&amp;amp;lt;PATCH_VERSION&amp;amp;gt;[-rc{1|2|3...}][-&amp;amp;lt;TWEAK_VERSION&amp;amp;gt;][-&amp;amp;lt;DATE&amp;amp;gt;][-svn&amp;amp;lt;REV&amp;amp;gt;][-dirty]-&amp;amp;lt;ARCH&amp;amp;gt;-&amp;amp;lt;PLATFORM&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are 2 types of builds, releases and developments:&lt;br /&gt;
; Release&lt;br /&gt;
: Special builds made on a given revision (e.g. r19033: &amp;quot;ENH: Slicer 4.0.1&amp;quot;)&lt;br /&gt;
: Don't contain date or revision number.&lt;br /&gt;
: The optional suffix '''-rc{1|2|3|...}''' identifies the release candidates leading to a final release.&lt;br /&gt;
: Eventually, a tweak number can be added (e.g. 4.0.1-1)&lt;br /&gt;
; Development&lt;br /&gt;
: Nightly or experimental builds&lt;br /&gt;
: Contains suffixes after the major.minor.patch version &lt;br /&gt;
: The suffix '''svn&amp;amp;lt;REV&amp;amp;gt;''' allows to identify the revision associated with the current package.&lt;br /&gt;
: The '''-dirty''' prefix indicates if the package has been generated from a locally modified source tree.&lt;br /&gt;
&lt;br /&gt;
== Example of linux 64bits packages ==&lt;br /&gt;
 [              File name               ][   date   ][ build type ][                      note                     ]&lt;br /&gt;
 Slicer-4.0.0-linux-amd64                 2011-11-24    release     release of Slicer 4.0.0&lt;br /&gt;
 Slicer-4.0.0-2011-12-10-linux-amd64      2011-11-25  development   nightly build after 4.0.0&lt;br /&gt;
 Slicer-4.0.1-rc1-linux-amd64             2012-01-04    release     release candidate 1 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-rc1-2012-01-05-linux-amd64  2012-01-05  development   nightly build after the release candidate&lt;br /&gt;
 Slicer-4.0.1-rc2-linux-amd64             2012-01-11    release     release candidate 2 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-rc2-2012-01-12-linux-amd64  2012-01-12  development   nightly build after the release candidate&lt;br /&gt;
 Slicer-4.0.1-linux-amd64                 2012-01-14    release     release of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.1-2012-01-20-linux-amd64      2012-01-20  development   nightly build after 4.0.1&lt;br /&gt;
 Slicer-4.0.1-1-linux-amd64               2012-01-28    release     tweak version 1 of Slicer 4.0.1&lt;br /&gt;
 Slicer-4.0.2-linux.amd64                 2012-06-05    release     release of Slicer 4.0.2&lt;br /&gt;
&lt;br /&gt;
= Extension package - Naming scheme =&lt;br /&gt;
&lt;br /&gt;
* Create &amp;lt;code&amp;gt;Extensions-XYZ-Nightly&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Extensions-XYZ-Continuous&amp;lt;/code&amp;gt; tracks on CDash&lt;br /&gt;
&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37356</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37356"/>
		<updated>2014-02-20T22:19:51Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: Add 'custom template' example, move templates information to correct section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* '''For all operations:'''&lt;br /&gt;
** [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your $PATH)&lt;br /&gt;
* '''For full functionality:'''&lt;br /&gt;
** [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
** [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
** [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
More detailed information about the various module types in Slicer can be found [[Documentation/{{documentation/version}}/Developers/Modules|here]].&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy:&lt;br /&gt;
&lt;br /&gt;
 # Make a copy of an existing module in the same extension&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/MyExtension \&lt;br /&gt;
                    --templateKey ModuleOne=ModuleOne \&lt;br /&gt;
                    --addModule ModuleOne:ModuleTwo \&lt;br /&gt;
                    ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
Here is a simple recipe that will work in many cases (assumes you are on not-Windows or using the git-msys shell):&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # You may also want to pass '-G &amp;quot;&amp;amp;lt;generator&amp;amp;gt;&amp;quot;' here (required on Windows)&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
{{notice|If the above leaves you scratching your head, don't worry; the default behavior if you haven't configured anything else is simply to prompt you for your user name and password. Setting up either a password manager or credential caching is recommended however, as some operations may otherwise require you to provide your password more than once.}}&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 ExtensionWizard.py --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 ExtensionWizard.py --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 ExtensionWizard.py --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37355</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37355"/>
		<updated>2014-02-20T20:54:28Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: Add additional tip, additional cross-reference link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* '''For all operations:'''&lt;br /&gt;
** [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your $PATH)&lt;br /&gt;
* '''For full functionality:'''&lt;br /&gt;
** [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
** [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
** [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
Here is a simple recipe that will work in many cases (assumes you are on not-Windows or using the git-msys shell):&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # You may also want to pass '-G &amp;quot;&amp;amp;lt;generator&amp;amp;gt;&amp;quot;' here (required on Windows)&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
More detailed information about the various module types in Slicer can be found [[Documentation/{{documentation/version}}/Developers/Modules|here]].&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy.&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
{{notice|If the above leaves you scratching your head, don't worry; the default behavior if you haven't configured anything else is simply to prompt you for your user name and password. Setting up either a password manager or credential caching is recommended however, as some operations may otherwise require you to provide your password more than once.}}&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 ExtensionWizard.py --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 ExtensionWizard.py --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 ExtensionWizard.py --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37312</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37312"/>
		<updated>2014-02-18T23:11:10Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Requirements */ git is now a &amp;quot;soft&amp;quot; dependency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* '''For all operations:'''&lt;br /&gt;
** [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your $PATH)&lt;br /&gt;
* '''For full functionality:'''&lt;br /&gt;
** [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
** [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
** [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
Here is a simple recipe that will work in many cases (assumes you are on not-Windows or using the git-msys shell):&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # You may also want to pass '-G &amp;quot;&amp;amp;lt;generator&amp;amp;gt;&amp;quot;' here (required on Windows)&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy.&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 ExtensionWizard.py --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 ExtensionWizard.py --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 ExtensionWizard.py --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37289</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37289"/>
		<updated>2014-02-14T23:20:11Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: /* Building */ Mention '-G' argument to CMake&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your $PATH)&lt;br /&gt;
* [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
* [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
* [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
Here is a simple recipe that will work in many cases (assumes you are on not-Windows or using the git-msys shell):&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # You may also want to pass '-G &amp;quot;&amp;amp;lt;generator&amp;amp;gt;&amp;quot;' here (required on Windows)&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy.&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 ExtensionWizard.py --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 ExtensionWizard.py --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 ExtensionWizard.py --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37288</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37288"/>
		<updated>2014-02-14T21:24:36Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: Update for new wizard behavior to prompt before changing extension information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your $PATH)&lt;br /&gt;
* [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
* [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
* [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
To build your extension:&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy.&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 ExtensionWizard.py --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
If you have already changed your extension's homepage or icon URL, the wizard will ask if you want to keep the current URL or use the new URL referring to the new github repository. Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 ExtensionWizard.py --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 ExtensionWizard.py --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37276</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37276"/>
		<updated>2014-02-13T20:21:45Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: add dependency install instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your $PATH)&lt;br /&gt;
* [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
* [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
* [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
==== OS/X ====&lt;br /&gt;
&lt;br /&gt;
Git is available via [http://www.macports.org/ MacPorts]:&lt;br /&gt;
&lt;br /&gt;
 sudo port install git-core&lt;br /&gt;
&lt;br /&gt;
For Python and the Python dependencies, use of a Python [http://www.virtualenv.org/en/latest/ Virtual Environment] is recommended.&lt;br /&gt;
&lt;br /&gt;
In your activated virtualenv, run:&lt;br /&gt;
&lt;br /&gt;
 pip install gitpython&lt;br /&gt;
 pip install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
After obtaining and installing Python and git, run:&lt;br /&gt;
&lt;br /&gt;
 easy_install gitpython&lt;br /&gt;
 easy_install PyGithub&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
 yum install git GitPython python-PyGithub&lt;br /&gt;
 # Python is already installed&lt;br /&gt;
&lt;br /&gt;
==== Other Linux ====&lt;br /&gt;
&lt;br /&gt;
Check your distribution for packages and/or use a virtualenv (see OS/X instructions).&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
To build your extension:&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy.&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 ExtensionWizard.py --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
This command is intended to be used on new extensions, especially those created using the wizard (which initially have a placeholder homepage). If your extension already has a separate homepage that you would like to continue to use, you may wish to do the following after publishing:&lt;br /&gt;
&lt;br /&gt;
 vi CMakeLists.txt # or use your favorite editor to restore the old homepage&lt;br /&gt;
 git add -p CMakeLists.txt&lt;br /&gt;
 git commit --amend # Don't have other files staged when you do this!&lt;br /&gt;
 git push origin +HEAD&lt;br /&gt;
&lt;br /&gt;
This will amend the commit which changed your extension information and force-push the change to your new public github repository.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 ExtensionWizard.py --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 ExtensionWizard.py --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37220</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37220"/>
		<updated>2014-02-07T22:17:39Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your $PATH)&lt;br /&gt;
* [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
* [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
* [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to include the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate description, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
To build your extension:&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir ../MyExtension-build&lt;br /&gt;
 cd ../MyExtension-build&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ../MyExtension&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy.&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 ExtensionWizard.py --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
This command is intended to be used on new extensions, especially those created using the wizard (which initially have a placeholder homepage). If your extension already has a separate homepage that you would like to continue to use, you may wish to do the following after publishing:&lt;br /&gt;
&lt;br /&gt;
 vi CMakeLists.txt # or use your favorite editor to restore the old homepage&lt;br /&gt;
 git add -p CMakeLists.txt&lt;br /&gt;
 git commit --amend # Don't have other files staged when you do this!&lt;br /&gt;
 git push origin +HEAD&lt;br /&gt;
&lt;br /&gt;
This will amend the commit which changed your extension information and force-push the change to your new public github repository.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 ExtensionWizard.py --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 ExtensionWizard.py --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37218</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37218"/>
		<updated>2014-02-07T19:25:57Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: add documentation for contributing extensions, plus other minor tweaks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.python.org/ Python] &amp;amp;ge; 2.6 ('python' should be in your $PATH)&lt;br /&gt;
* [http://git-scm.com git] &amp;amp;ge; 1.7.10 (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
* [http://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
* [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to build the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate destination, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
To build your extension:&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ..&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy.&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;br /&gt;
&lt;br /&gt;
== Contributing Extensions ==&lt;br /&gt;
&lt;br /&gt;
Once your extension is in a state that you want to make it available via Slicer's public [http://slicer.kitware.com/midas3/slicerappstore Extensions Catalog], you'll need to do two things:&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;Publish&amp;quot; your extension by making it available on a publicly accessible repository.&lt;br /&gt;
# Request that your extension be added to the [http://github.com/Slicer/ExtensionsIndex public extension index].&lt;br /&gt;
&lt;br /&gt;
Before you begin, you'll need a [http://github.com github] account.&lt;br /&gt;
&lt;br /&gt;
The wizard uses [http://git-scm.com/docs/gitcredentials.html git credentials] to manage your user name and password. This means it will e.g. honor &amp;lt;code&amp;gt;$GIT_ASKPASS&amp;lt;/code&amp;gt; when git would, and cache your login information if git is configured to do so.&lt;br /&gt;
&lt;br /&gt;
If you aren't using a password manager and want git to remember your user name, you may wish to run:&lt;br /&gt;
&lt;br /&gt;
 git config ''[''--global'']'' &amp;lt;nowiki&amp;gt;credential.https://github.com.username&amp;lt;/nowiki&amp;gt; ''&amp;lt;your_user_name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
=== Publishing Extensions ===&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard can be used to publish your extension to a github repository:&lt;br /&gt;
&lt;br /&gt;
 ExtensionWizard.py --publish ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will:&lt;br /&gt;
&lt;br /&gt;
* Create a git repository, if your extension is not already managed by git.&lt;br /&gt;
* Create a github repository for your extension and add this as a remote of your local repository.&lt;br /&gt;
* Update your extension information so that the homepage and icon URL refer to the github repository.&lt;br /&gt;
* Commit the above changes (or make an initial commit, if you didn't already have a git repository).&lt;br /&gt;
* Push your extension to the github repository.&lt;br /&gt;
&lt;br /&gt;
{{notice|You should not use this command if your extension already has a public repository and/or is using Subversion for source code management.}}&lt;br /&gt;
&lt;br /&gt;
Once your extension has a public repository, you should commit (svn) or push (git) changes using your SCM tool's usual workflow.&lt;br /&gt;
&lt;br /&gt;
This command is intended to be used on new extensions, especially those created using the wizard (which initially have a placeholder homepage). If your extension already has a separate homepage that you would like to continue to use, you may wish to do the following after publishing:&lt;br /&gt;
&lt;br /&gt;
 vi CMakeLists.txt # or use your favorite editor to restore the old homepage&lt;br /&gt;
 git add -p CMakeLists.txt&lt;br /&gt;
 git commit --amend # Don't have other files staged when you do this!&lt;br /&gt;
 git push origin +HEAD&lt;br /&gt;
&lt;br /&gt;
This will amend the commit which changed your extension information and force-push the change to your new public github repository.&lt;br /&gt;
&lt;br /&gt;
=== Contributing Extensions to the Index ===&lt;br /&gt;
&lt;br /&gt;
When your extension is ready for wider distribution/use, you can request that it be added to the public extension catalog. To do this, run:&lt;br /&gt;
&lt;br /&gt;
 # First check that your extension description looks okay:&lt;br /&gt;
 ExtensionWizard.py --describe ~/code/MyExtension&lt;br /&gt;
 &amp;lt;nowiki/&amp;gt;&lt;br /&gt;
 # If it does:&lt;br /&gt;
 ExtensionWizard.py --contribute --target master ~/code/MyExtension&lt;br /&gt;
&lt;br /&gt;
This will fork and clone the [http://github.com/Slicer/ExtensionsIndex extension index repository], add your extension description, and create a pull request to merge your addition to the index to the primary (upstream) index. If your extension already exists, the description is instead updated, and the pull request will include a link to the changes that have been made to your extension since the existing upstream version.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--target&amp;lt;/code&amp;gt; option may be used to specify the branch of slicer for which your extension is intended, e.g. &amp;lt;code&amp;gt;4.3&amp;lt;/code&amp;gt;. This parameter is optional, defaulting to &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default, the extension index is cloned to a directory inside the &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; directory of your extension. The &amp;lt;code&amp;gt;--index&amp;lt;/code&amp;gt; option may be used to specify an alternate location or existing extension index clone.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37215</id>
		<title>Documentation/Nightly/Developers/ExtensionWizard</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/ExtensionWizard&amp;diff=37215"/>
		<updated>2014-02-06T20:31:13Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: initial documentation; just create/build for now&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page describes the Slicer Extension Wizard. To avoid redundancy and reduce the effort needed to maintain this page, generic usage is not provided here; run the wizard with the --help option instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Replace with 'git slicer-extension' once implemented //--&amp;gt;&lt;br /&gt;
{{notice|For brevity, the remainder of this document assumes that ExtensionWizard.py, located in the &amp;lt;code&amp;gt;Utilities/Scripts&amp;lt;/code&amp;gt; directory of your Slicer source directory, is in your $PATH.}}&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
[[Documentation/{{documentation/version}}/Developers/Modules|Slicer modules]] typically consist of several files of various types, such as CMake files, source files, and resource files. In many cases, the names of the files and the names of text strings inside the files are related and need to be in sync in order for things to compile. An extension encapsulates one or mode modules (which can be of different types) in a package that can be loaded by Slicer.&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard is a tool to simplify the process of creating and contributing extensions.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.python.org/ Python] &amp;gt;= 2.5 ('python' should be in your $PATH)&lt;br /&gt;
* [http://git-scm.com git] (use [http://msysgit.github.io/ msys git] on Windows)&lt;br /&gt;
* [https://github.com/gitpython-developers/GitPython/ GitPython]&lt;br /&gt;
* [http://jacquev6.github.io/PyGithub/ PyGithub]&lt;br /&gt;
&lt;br /&gt;
You should also ensure that the python interpreter ('&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt;') is in your $PATH. On Windows, using the wizard from an msys git prompt is recommended.&lt;br /&gt;
&lt;br /&gt;
Note that you do ''not'' need to use the version of Python that is built with Slicer.&lt;br /&gt;
&lt;br /&gt;
== Creating Extensions ==&lt;br /&gt;
&lt;br /&gt;
The Extension Wizard simplifies the process of creating extensions by providing a mechanism to create extensions and modules from templates. This process will automatically create files for you with appropriate names, and make some crucial content substitutions within the templates in order to produce code that can be built immediately.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
; template : A directory containing files that are used to create a new entity (e.g. extension or module).&lt;br /&gt;
; templateKey : A text string that is used in both filename and identifiers inside the module. For Slicer-provided extensions, this is &amp;quot;TemplateKey&amp;quot;.&lt;br /&gt;
; destination : The directory under which you want the new code to be placed.&lt;br /&gt;
; name : The name of the new entity (e.g. extension, module) you want to create. The code will be placed in a subdirectory by this name, and the ''templateKey'' will be replaced with this name.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
 # List available templates&lt;br /&gt;
 ExtensionWizard.py --listTemplates&lt;br /&gt;
 # Create an extension with two modules; one written in C++, and one in Python&lt;br /&gt;
 ExtensionWizard.py --create MyExtension ~/code/&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 ExtensionWizard.py --addModule loadable:MyCppModule&lt;br /&gt;
 ExtensionWizard.py --addModule scripted:MyPythonModule&lt;br /&gt;
 # Create a superbuild extension with a CLI module&lt;br /&gt;
 ExtensionWizard.py --create superbuild:MyCLIExtension ~/code/&lt;br /&gt;
 ExtensionWizard.py --addModule cli:MyCLI ~/code/MyCLIExtension&lt;br /&gt;
&lt;br /&gt;
The wizard attempts to update your extension CMakeLists.txt to build the new module. The stock module templates include a placeholder which indicates where the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; should be inserted. (If this placeholder is not present, the wizard attempts to add the new &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt; after the last existing &amp;lt;code&amp;gt;add_subdirectory&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
Note that the destination (extension) directory is optional, defaulting to the current directory. In the above example, we &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created extension directory, which allows us to omit this argument for subsequent operations.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to create a git repository to keep track of your work:&lt;br /&gt;
&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 git init .&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit&lt;br /&gt;
&lt;br /&gt;
After creating your extension or adding modules, you should edit the newly created files to update the extension or module information with your name, an appropriate destination, and any acknowledgments. You may also wish to replace the extension icon with a 128x128 icon of your choosing.&lt;br /&gt;
&lt;br /&gt;
== Using Extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
If your extension is not pure Python, you will need to compile it in order to use it. (Even if it is, you may wish to build your extension in order to use it from the build tree.)&lt;br /&gt;
&lt;br /&gt;
To build your extension:&lt;br /&gt;
&lt;br /&gt;
 Slicer_DIR=/path/to/slicer/superbuild&lt;br /&gt;
 cd ~/code/MyExtension&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake -DSlicer_DIR:PATH=${Slicer_DIR} ..&lt;br /&gt;
 cmake --build .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Installation&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
You don't need to &amp;quot;install&amp;quot; your extension, as such, but you do need to tell Slicer where to find it. After building your extension (if needed; you can skip this for pure-Python extensions), open Slicer's [[Documentation/{{documentation/version}}/SlicerApplication/ApplicationSettings|Application Settings]] dialog, select &amp;quot;Modules&amp;quot; from the list, and add additional module paths to point to the full path to your extension. For example:&lt;br /&gt;
&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-loadable-modules&lt;br /&gt;
* ~/code/MyExtension/build/lib/Slicer-''&amp;lt;version&amp;gt;''/qt-scripted-modules&lt;br /&gt;
* ~/code/MyExtension/MyPythonModule&lt;br /&gt;
&lt;br /&gt;
The second item above is used for Python modules if you are building your extension (which may be convenient if you have several modules). The third item references a ''single'' Python module directly from the source tree. For a given extension, you should use one form or the other; not both.&lt;br /&gt;
&lt;br /&gt;
After restarting Slicer, your module should show up in the [[Documentation/{{documentation/version}}/SlicerApplication/MainApplicationGUI#Module_Selection_.26_Navigation|Module Navigation]] interface.&lt;br /&gt;
&lt;br /&gt;
=== Stock Templates ===&lt;br /&gt;
&lt;br /&gt;
The following templates are provided with Slicer:&lt;br /&gt;
&lt;br /&gt;
==== Extensions ====&lt;br /&gt;
&lt;br /&gt;
; default : A basic extension.&lt;br /&gt;
; superbuild : An extension which is intended to be integrated with a Slicer superbuild.&lt;br /&gt;
&lt;br /&gt;
==== Modules ====&lt;br /&gt;
&lt;br /&gt;
; cli : A module which provides a custom command line interface.&lt;br /&gt;
; loadable : A C++ module which provides new functionality in Slicer.&lt;br /&gt;
; scripted : A Python module which provides new functionality in Slicer.&lt;br /&gt;
&lt;br /&gt;
=== Using Custom Templates ===&lt;br /&gt;
&lt;br /&gt;
By default, the Extension Wizard uses a set of templates that are provided with Slicer. You can add your own templates with the &amp;lt;code&amp;gt;--templatePath&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
&lt;br /&gt;
 # Add custom templates; expects to find subdirectories under the path matching&lt;br /&gt;
 # a template type, e.g. 'modules'&lt;br /&gt;
 ExtensionWizard.py --templatePath ~/code/Templates&lt;br /&gt;
 # Add custom module templates&lt;br /&gt;
 ExtensionWizard.py --templatePath modules=~/code/Templates&lt;br /&gt;
&lt;br /&gt;
This can also be used to make a copy of an existing module. When doing so, you will likely also want to use the &amp;lt;code&amp;gt;--templateKey&amp;lt;/code&amp;gt; option to specify the text that should be replaced when making the copy.&lt;br /&gt;
&lt;br /&gt;
Note that these options apply only to the invocation of the wizard for which they are used.&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Template:Notice&amp;diff=37214</id>
		<title>Template:Notice</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Template:Notice&amp;diff=37214"/>
		<updated>2014-02-06T17:48:38Z</updated>

		<summary type="html">&lt;p&gt;Matthew.woehlke: Created page with '{{mbox | name = Notice | subst = &amp;lt;includeonly&amp;gt;{{subst:&amp;lt;/includeonly&amp;gt;&amp;lt;includeonly&amp;gt;substcheck}}&amp;lt;/includeonly&amp;gt; | demospace = {{{demospace|}}} | image = {{#if:{{{image|}}}| [[Image:{…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mbox&lt;br /&gt;
| name = Notice&lt;br /&gt;
| subst = &amp;lt;includeonly&amp;gt;{{subst:&amp;lt;/includeonly&amp;gt;&amp;lt;includeonly&amp;gt;substcheck}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
| demospace = {{{demospace|}}}&lt;br /&gt;
| image = {{#if:{{{image|}}}| [[Image:{{{image}}}|40px|Notice]] }}&lt;br /&gt;
| text = &lt;br /&gt;
  {{#if:{{{header|}}}&lt;br /&gt;
  | &amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;'''{{{header}}}'''&amp;lt;/div&amp;gt; &lt;br /&gt;
  }}{{{1|{{{text}}}}}}&lt;br /&gt;
| small = {{{small|}}}&lt;br /&gt;
| smallimage = {{#if:{{{image|}}}| [[File:{{{image}}}|30px|Notice]] }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Imported from http://www.mediawiki.org/wiki/Template:Notice&lt;br /&gt;
&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Add categories and interwikis to the /doc subpage, not here! --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthew.woehlke</name></author>
		
	</entry>
</feed>