<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.2%2FDevelopers%2FModules</id>
	<title>Documentation/4.2/Developers/Modules - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.2%2FDevelopers%2FModules"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.2/Developers/Modules&amp;action=history"/>
	<updated>2026-05-17T02:51:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.2/Developers/Modules&amp;diff=61737&amp;oldid=prev</id>
		<title>Unknown user: Text replacement - &quot;slicerWiki/index.php&quot; to &quot;wiki&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.2/Developers/Modules&amp;diff=61737&amp;oldid=prev"/>
		<updated>2019-11-21T17:04:50Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;slicerWiki/index.php&amp;quot; to &amp;quot;wiki&amp;quot;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:04, 21 November 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot; &gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Learn from existing [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Modules/Scripted/ existing modules]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Learn from existing [http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Modules/Scripted/ existing modules]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Links:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Links:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** [http://www.slicer.org/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;slicerWiki/index.php&lt;/del&gt;/Documentation/{{documentation/version}}/Developers/Python_scripting Python Scripting]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** [http://www.slicer.org/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wiki&lt;/ins&gt;/Documentation/{{documentation/version}}/Developers/Python_scripting Python Scripting]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** [[Documentation/{{documentation/version}}/Training#Slicer4_Programming_Tutorial|Python Scripting Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** [[Documentation/{{documentation/version}}/Training#Slicer4_Programming_Tutorial|Python Scripting Tutorial]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Unknown user</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.2/Developers/Modules&amp;diff=32747&amp;oldid=prev</id>
		<title>UpdateBot: Prepend documentation/versioncheck template. See http://na-mic.org/Mantis/view.php?id=2887</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.2/Developers/Modules&amp;diff=32747&amp;oldid=prev"/>
		<updated>2013-06-14T07:43:26Z</updated>

		<summary type="html">&lt;p&gt;Prepend documentation/versioncheck template. See http://na-mic.org/Mantis/view.php?id=2887&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 07:43, 14 June 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&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;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>UpdateBot</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.2/Developers/Modules&amp;diff=28752&amp;oldid=prev</id>
		<title>UpdateBot: Nightly -&gt; 4.2</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.2/Developers/Modules&amp;diff=28752&amp;oldid=prev"/>
		<updated>2012-10-31T21:59:00Z</updated>

		<summary type="html">&lt;p&gt;Nightly -&amp;gt; 4.2&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&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 [[Documentation/{{documentation/version}}/Developers/ModuleWizard|module 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 existing [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 [[Documentation/{{documentation/version}}/Developers/ModuleWizard|module 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 existing [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] and typically but not necessarily use the high level API of Slicer and toolkits.   &lt;br /&gt;
* Python Console&lt;br /&gt;
* Full access to the API: [http://www.vtk.org VTK], [http://www.itk.org ITK], 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;
# Create initial skeleton using [[Documentation/{{documentation/version}}/Developers/ModuleWizard|module 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 existing [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>UpdateBot</name></author>
		
	</entry>
</feed>