<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.na-mic.org/w/index.php?action=history&amp;feed=atom&amp;title=Slicer3%3ATransition_of_Slicer2.x_Modules%3ATemplate_Notes</id>
	<title>Slicer3:Transition of Slicer2.x Modules:Template Notes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.na-mic.org/w/index.php?action=history&amp;feed=atom&amp;title=Slicer3%3ATransition_of_Slicer2.x_Modules%3ATemplate_Notes"/>
	<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;action=history"/>
	<updated>2026-04-26T04:12:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;diff=97427&amp;oldid=prev</id>
		<title>Grundlett: Text replacement - &quot;http://www.slicer.org/slicerWiki/index.php/&quot; to &quot;https://www.slicer.org/wiki/&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;diff=97427&amp;oldid=prev"/>
		<updated>2017-07-10T17:55:23Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;http://www.slicer.org/slicerWiki/index.php/&amp;quot; to &amp;quot;https://www.slicer.org/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:55, 10 July 2017&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 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;&amp;lt;big&amp;gt;'''Note:''' We are migrating this content to the slicer.org domain - &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;The newer page is [&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http&lt;/del&gt;://www.slicer.org/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;slicerWiki/index.php&lt;/del&gt;/Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes  here]&amp;lt;/font&amp;gt;&amp;lt;/big&amp;gt;&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;&amp;lt;big&amp;gt;'''Note:''' We are migrating this content to the slicer.org domain - &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;The newer page is [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;https&lt;/ins&gt;://www.slicer.org/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wiki&lt;/ins&gt;/Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes  here]&amp;lt;/font&amp;gt;&amp;lt;/big&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Grundlett</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;diff=25247&amp;oldid=prev</id>
		<title>Marianna: Unprotected &quot;Slicer3:Transition of Slicer2.x Modules:Template Notes&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;diff=25247&amp;oldid=prev"/>
		<updated>2008-05-20T18:21:42Z</updated>

		<summary type="html">&lt;p&gt;Unprotected &amp;quot;&lt;a href=&quot;/wiki/Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&quot; title=&quot;Slicer3:Transition of Slicer2.x Modules:Template Notes&quot;&gt;Slicer3:Transition of Slicer2.x Modules:Template Notes&lt;/a&gt;&amp;quot;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:21, 20 May 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Marianna</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;diff=25246&amp;oldid=prev</id>
		<title>Marianna: Replacing page with '&lt;big&gt;'''Note:''' We are migrating this content to the slicer.org domain - &lt;font color=&quot;orange&quot;&gt;The newer page is [http://www.slicer.org/slicerWiki/index.php/Slicer3:Transition_...'</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;diff=25246&amp;oldid=prev"/>
		<updated>2008-05-20T18:21:32Z</updated>

		<summary type="html">&lt;p&gt;Replacing page with &amp;#039;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; We are migrating this content to the slicer.org domain - &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;The newer page is [http://www.slicer.org/slicerWiki/index.php/Slicer3:Transition_...&amp;#039;&lt;/p&gt;
&lt;a href=&quot;https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;amp;diff=25246&amp;amp;oldid=3220&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Marianna</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;diff=3220&amp;oldid=prev</id>
		<title>Andy: Update from Wiki</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Transition_of_Slicer2.x_Modules:Template_Notes&amp;diff=3220&amp;oldid=prev"/>
		<updated>2006-12-18T13:18:31Z</updated>

		<summary type="html">&lt;p&gt;Update from Wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Creating a New Loadable Module =&lt;br /&gt;
&lt;br /&gt;
The following steps detail how to make a new Slicer3 loadable module called MyModule. To create a new command line interface (CLI) module, see [[Slicer3:Execution_Model_Documentation|Execution Model Documentation]] and [http://www.na-mic.org:8000/svn/Slicer3/trunk/Applications/CLI/ Examples].&lt;br /&gt;
&lt;br /&gt;
Please read the [[Slicer3:Style_and_Conventions|Style and Coding Conventions]] before beginning.&lt;br /&gt;
&lt;br /&gt;
= Set up =&lt;br /&gt;
&lt;br /&gt;
* [[Slicer3:Build_Instructions|Build Slicer3]]&lt;br /&gt;
* Create a directory for your module in Slicer3/Modules&lt;br /&gt;
&lt;br /&gt;
  mkdir Slicer3/Modules/MyModule&lt;br /&gt;
&lt;br /&gt;
* Add the module to the SUBDIRS variable in Slicer3/Modules/CMakeLists.txt&lt;br /&gt;
&lt;br /&gt;
  SUBDIRS(&lt;br /&gt;
    BaseClasses&lt;br /&gt;
    MyModule&lt;br /&gt;
    [...]&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
= CMakeLists.txt =&lt;br /&gt;
&lt;br /&gt;
* Create a CMakeLists.txt file in Slicer3/Modules/MyModule with the following contents:&lt;br /&gt;
&lt;br /&gt;
  PROJECT(MyModule)&lt;br /&gt;
  # Sources&lt;br /&gt;
  SET(MyModule_SRCS&lt;br /&gt;
    vtkMyModuleGUI.cxx&lt;br /&gt;
    vtkMyModuleLogic.cxx&lt;br /&gt;
  # vtkMRMLMyModuleNode.cxx&lt;br /&gt;
  )&lt;br /&gt;
  # Include dirs&lt;br /&gt;
  INCLUDE_DIRECTORIES(&lt;br /&gt;
    ${ModulesBaseClasses_SOURCE_DIR}&lt;br /&gt;
    ${ModulesBaseClasses_BINARY_DIR}&lt;br /&gt;
    ${MyModule_SOURCE_DIR}&lt;br /&gt;
    ${MyModule_BINARY_DIR)&lt;br /&gt;
    ${SlicerBase_SOURCE_DIR}&lt;br /&gt;
    ${SlicerBase_BINARY_DIR}&lt;br /&gt;
    ${SlicerBaseLogic_SOURCE_DIR}&lt;br /&gt;
    ${SlicerBaseLogic_BINARY_DIR}&lt;br /&gt;
    ${SlicerBaseGUI_SOURCE_DIR}&lt;br /&gt;
    ${SlicerBaseGUI_BINARY_DIR}&lt;br /&gt;
    ${vtkITK_SOURCE_DIR}&lt;br /&gt;
    ${vtkITK_BINARY_DIR}&lt;br /&gt;
    ${ITK_INCLUDE_DIR}&lt;br /&gt;
    ${VTK_INCLUDE_DIR}&lt;br /&gt;
    ${MRML_SOURCE_DIR}&lt;br /&gt;
    ${MRML_BINARY_DIR}&lt;br /&gt;
  )&lt;br /&gt;
  # Wrapping&lt;br /&gt;
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})&lt;br /&gt;
  INCLUDE(&amp;quot;${VTK_CMAKE_DIR}/vtkWrapTcl.cmake&amp;quot;)&lt;br /&gt;
  VTK_WRAP_TCL3(MyModule MyModule_TCL_SRCS &amp;quot;${MyModule_SRCS}&amp;quot; &amp;quot;&amp;quot;)&lt;br /&gt;
  # Build the library&lt;br /&gt;
  ADD_LIBRARY(MyModule&lt;br /&gt;
    ${MyModule_SRCS}&lt;br /&gt;
    ${MyModule_TCL_SRCS}&lt;br /&gt;
  )&lt;br /&gt;
  IF(BUILD_SHARED_LIBS)&lt;br /&gt;
    INSTALL_TARGETS(${SLICER3_LIB_INSTALL_DIR} MyModule)&lt;br /&gt;
  ENDIF(BUILD_SHARED_LIBS)&lt;br /&gt;
  TARGET_LINK_LIBRARIES(MyModule&lt;br /&gt;
    ModulesBaseClasses&lt;br /&gt;
    SlicerBaseLogic&lt;br /&gt;
    SlicerBaseGUI&lt;br /&gt;
    MRML&lt;br /&gt;
    vtkITK&lt;br /&gt;
    vtkCommonTCL&lt;br /&gt;
    vtkImagingTCL&lt;br /&gt;
    vtkFilteringTCL&lt;br /&gt;
    vtkIOTCL&lt;br /&gt;
    ITKAlgorithms&lt;br /&gt;
    ITKNumerics&lt;br /&gt;
    ITKCommon&lt;br /&gt;
    ITKBasicFilters&lt;br /&gt;
    ITKNumerics&lt;br /&gt;
    ITKStatistics&lt;br /&gt;
    ITKBasicFilters&lt;br /&gt;
    ITKIO&lt;br /&gt;
    ITKDICOMParser&lt;br /&gt;
    ${KWWidgets_LIBRARIES} )&lt;br /&gt;
  # Testing&lt;br /&gt;
  IF(BUILD_TESTING)&lt;br /&gt;
    SUBDIRS(Testing)&lt;br /&gt;
  ENDIF(BUILD_TESTING)&lt;br /&gt;
  CONFIGURE_FILE(&lt;br /&gt;
    ${MyModule_SOURCE_DIR}/vtkMyModuleConfigure.h.in&lt;br /&gt;
    ${MyModule_BINARY_DIR}/vtkMyModuleConfigure.h&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
= Testing directory =&lt;br /&gt;
&lt;br /&gt;
Make the Testing subdirctory&lt;br /&gt;
&lt;br /&gt;
  mkdir Slicer3/Modules/MyModule/Testing&lt;br /&gt;
&lt;br /&gt;
= Configuration files =&lt;br /&gt;
&lt;br /&gt;
Create the VTK configuration files:&lt;br /&gt;
&lt;br /&gt;
* Slicer3/Modules/MyModule/vtkMyModuleConfigure.h.in&lt;br /&gt;
&lt;br /&gt;
  #if defined(WIN32) &amp;amp;&amp;amp; !defined(VTKSLICER_STATIC)&lt;br /&gt;
  #pragma warning ( disable : 4275 )&lt;br /&gt;
  #endif&lt;br /&gt;
  #cmakedefine CMAKE_WORDS_BIGENDIAN&lt;br /&gt;
  #ifdef CMAKE_WORDS_BIGENDIAN&lt;br /&gt;
    #define WORDS_BIGENDIAN&lt;br /&gt;
  #else&lt;br /&gt;
    #define WORDS_LITTLEENDIAN&lt;br /&gt;
  #endif&lt;br /&gt;
  #cmakedefine BUILD_SHARED_LIBS&lt;br /&gt;
  #ifndef BUILD_SHARED_LIBS&lt;br /&gt;
    #define VTKSLICER_STATIC&lt;br /&gt;
  #endif&lt;br /&gt;
&lt;br /&gt;
* Slicer3/Modules/MyModule/vtkMyModuleWin32Header.h&lt;br /&gt;
&lt;br /&gt;
  #ifndef __vtkMyModule_h&lt;br /&gt;
  #define __vtkMyModule_h&lt;br /&gt;
  #include &amp;lt;vtkMyModuleConfigure.h&amp;gt;&lt;br /&gt;
  #if defined(WIN32) &amp;amp;&amp;amp; !defined(VTKSLICER_STATIC)&lt;br /&gt;
  #if defined(MyModule_EXPORTS)&lt;br /&gt;
  #define VTK_MYMODULE_EXPORT __declspec( dllexport )&lt;br /&gt;
  #else&lt;br /&gt;
  #define VTK_MYMODULE_EXPORT __declspec( dllimport )&lt;br /&gt;
  #endif&lt;br /&gt;
  #else&lt;br /&gt;
  #define VTK_MYMODULE_EXPORT&lt;br /&gt;
  #endif&lt;br /&gt;
  #endif&lt;br /&gt;
&lt;br /&gt;
* Create the header file vtkMyModule.h&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;vtkMyModuleWin32Header.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Logic =&lt;br /&gt;
&lt;br /&gt;
Create the Logic files:&lt;br /&gt;
&lt;br /&gt;
* vtkMyModuleLogic.cxx&lt;br /&gt;
* vtkMyModuleLogic.h&lt;br /&gt;
&lt;br /&gt;
= Gui =&lt;br /&gt;
&lt;br /&gt;
Create the GUI files:&lt;br /&gt;
&lt;br /&gt;
* vtkMyModuleGUI.h&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#ifndef __vtkMyModuleGUI_h&lt;br /&gt;
 #define __vtkMyModuleGUI_h&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;quot;vtkSlicerBaseGUIWin32Header.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkSlicerModuleGUI.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;quot;vtkMRMLScene.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkMyModuleLogic.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 class vtkKWFrame;&lt;br /&gt;
 class vtkKWScaleWithEntry;&lt;br /&gt;
 class vtkKWPushButton;&lt;br /&gt;
 class vtkSlicerNodeSelectorWidget;&lt;br /&gt;
 &lt;br /&gt;
 class VTK_MYMODULE_EXPORT vtkMyModuleGUI : public vtkSlicerModuleGUI&lt;br /&gt;
 {&lt;br /&gt;
    public:&lt;br /&gt;
    static vtkMyModuleGUI *New();&lt;br /&gt;
    vtkTypeMacro(vtkMyModuleGUI,vtkSlicerModuleGUI);&lt;br /&gt;
    void PrintSelf(osstream&amp;amp; os, vtkIndent indent);&lt;br /&gt;
 &lt;br /&gt;
    // Description: Get/Set the Logic&lt;br /&gt;
    vtkGetObjectMacro(Logic, vtkMyModuleLogic);&lt;br /&gt;
    vtkSetObjectMacro(Logic, vtkMyModuleLogic);&lt;br /&gt;
 &lt;br /&gt;
    // Description: Get/Set the MRML node&lt;br /&gt;
    vtkGetObjectMacro(MyModuleNode, vtkMRMLMyModuleNode);&lt;br /&gt;
    vtkSetObjectMacro(MyModuleNode, vtkMRMLMyModuleNode);&lt;br /&gt;
  // Create widgets&lt;br /&gt;
  virtual void BuildGUI ( );&lt;br /&gt;
 &lt;br /&gt;
  // Description:&lt;br /&gt;
  // Add obsereves to GUI widgets&lt;br /&gt;
  virtual void AddGUIObservers ( );&lt;br /&gt;
 &lt;br /&gt;
  // Description:&lt;br /&gt;
  // Remove obsereves to GUI widgets&lt;br /&gt;
  virtual void RemoveGUIObservers ( );&lt;br /&gt;
 &lt;br /&gt;
  // Description:&lt;br /&gt;
  // Process events generated by Logic&lt;br /&gt;
  virtual void ProcessLogicEvents ( vtkObject *caller, unsigned long event,&lt;br /&gt;
                                  void *callData ){};&lt;br /&gt;
 &lt;br /&gt;
  // Description:&lt;br /&gt;
  // Process events generated by GUI widgets&lt;br /&gt;
  virtual void ProcessGUIEvents ( vtkObject *caller, unsigned long event,&lt;br /&gt;
                                  void *callData );&lt;br /&gt;
 &lt;br /&gt;
  // Description:&lt;br /&gt;
  // Process events generated by MRML&lt;br /&gt;
  virtual void ProcessMRMLEvents ( vtkObject *caller, unsigned long event,&lt;br /&gt;
                                  void *callData);&lt;br /&gt;
  // Description:&lt;br /&gt;
  // Describe behavior at module startup and exit.&lt;br /&gt;
  virtual void Enter ( ){};&lt;br /&gt;
  virtual void Exit ( ){};&lt;br /&gt;
 &lt;br /&gt;
 protected:&lt;br /&gt;
  vtkMyModuleGUI();&lt;br /&gt;
  ~vtkMyModuleGUI();&lt;br /&gt;
  vtkMyModuleGUI(const vtkMyModuleGUI&amp;amp;);&lt;br /&gt;
  void operator=(const vtkMyModuleGUI&amp;amp;);&lt;br /&gt;
 &lt;br /&gt;
  // Description:&lt;br /&gt;
  // Updates GUI widgets based on parameters values in MRML node&lt;br /&gt;
  void UpdateGUI();&lt;br /&gt;
 &lt;br /&gt;
  // Description:&lt;br /&gt;
  // Updates parameters values in MRML node based on GUI widgets&lt;br /&gt;
  void UpdateMRML();&lt;br /&gt;
 &lt;br /&gt;
  // Description: widgets&lt;br /&gt;
  vtkKWScaleWithEntry* MyModuleScale;&lt;br /&gt;
  vtkSlicerNodeSelectorWidget* VolumeSelector;&lt;br /&gt;
  vtkKWPushButton* ApplyButton;&lt;br /&gt;
 &lt;br /&gt;
  vtkMyModuleLogic *Logic;&lt;br /&gt;
  vtkMRMLMyModuleNode* MyModuleNode;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 #endif&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* vtkMyModuleGUI.cxx&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;lt;string&amp;gt;&lt;br /&gt;
 #include &amp;lt;iostream&amp;gt;&lt;br /&gt;
 #include &amp;lt;sstream&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;quot;vtkObjectFactory.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;quot;vtkMyModuleGUI.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;quot;vtkCommand.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWApplication.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWWidget.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkSlicerApplication.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkSlicerApplicationLogic.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkSlicerNodeSelectorWidget.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWScaleWithEntry.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWEntryWithLabel.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWMenuButtonWithLabel.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWMenuButton.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWScale.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWMenu.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWEntry.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWFrame.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkSlicerApplication.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWFrameWithLabel.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;vtkKWPushButton.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 //------------------------------------------------------------------------------&lt;br /&gt;
 vtkMyModuleGUI* vtkMyModuleGUI::New()&lt;br /&gt;
 {&lt;br /&gt;
  // First try to create the object from the vtkObjectFactory&lt;br /&gt;
  vtkObject* ret = vtkObjectFactory::CreateInstance(&amp;quot;vtkMyModuleGUI&amp;quot;);&lt;br /&gt;
  if(ret)&lt;br /&gt;
  {&lt;br /&gt;
    return (vtkMyModuleGUI*)ret;&lt;br /&gt;
  }&lt;br /&gt;
  // If the factory was unable to create the object, then create it here.&lt;br /&gt;
  return new vtkMyModuleGUI;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 //----------------------------------------------------------------------------&lt;br /&gt;
 vtkMyModuleGUI::vtkMyModuleGUI()&lt;br /&gt;
 {&lt;br /&gt;
    this-&amp;gt;MyModuleScale = vtkKWScaleWithEntry::New();&lt;br /&gt;
    this-&amp;gt;VolumeSelector = vtkSlicerNodeSelectorWidget::New();&lt;br /&gt;
    this-&amp;gt;ApplyButton = vtkKWPushBUtton::New();&lt;br /&gt;
    this-&amp;gt;Logic = NULL;&lt;br /&gt;
    this-&amp;gt;MyModuleNode = NULL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 //----------------------------------------------------------------------------&lt;br /&gt;
 vtkMyModuleGUI::~vtkMyModuleGUI()&lt;br /&gt;
 {&lt;br /&gt;
   if (this-&amp;gt;MyModuleScale) {&lt;br /&gt;
     this-&amp;gt;MyModuleScale-&amp;gt;Delete();&lt;br /&gt;
     this-&amp;gt;MyModuleScale = NULL;&lt;br /&gt;
   }&lt;br /&gt;
   if (this-&amp;gt;VolumeSelector) {&lt;br /&gt;
        this-&amp;gt;VolumeSelector-&amp;gt;Delete();&lt;br /&gt;
        this-&amp;gt;VolumeSelector = NULL;&lt;br /&gt;
   }&lt;br /&gt;
   if ( this-&amp;gt;ApplyButton ) {&lt;br /&gt;
        this-&amp;gt;ApplyButton-&amp;gt;Delete();&lt;br /&gt;
        this-&amp;gt;ApplyButton = NULL;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
  this-&amp;gt;SetLogic (NULL);&lt;br /&gt;
  if ( this-&amp;gt;MyModuleNode ) {&lt;br /&gt;
      this-&amp;gt;SetAndObserveMRML( vtkObjectPointer(&amp;amp;this-&amp;gt;MyModuleNode), NULL );&lt;br /&gt;
  }&lt;br /&gt;
  this-&amp;gt;SetMyModuleNode (NULL);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 //----------------------------------------------------------------------------&lt;br /&gt;
 void vtkMyModuleGUI::PrintSelf(ostream&amp;amp; os, vtkIndent indent)&lt;br /&gt;
 {&lt;br /&gt;
  os &amp;lt;&amp;lt; indent &amp;lt;&amp;lt; &amp;quot;MyModule:&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= MRML Node =&lt;br /&gt;
&lt;br /&gt;
If you need a MRML node, create:&lt;br /&gt;
&lt;br /&gt;
* vtkMRMLMyModuleNode.cxx&lt;br /&gt;
* vtkMRMLMyModuleNode.h&lt;br /&gt;
&lt;br /&gt;
And uncomment out the relevant lines in the files above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Slicer3:Transition_of_Slicer2.x_Modules|Back to Transition of Slicer 2.x modules]]&lt;/div&gt;</summary>
		<author><name>Andy</name></author>
		
	</entry>
</feed>