<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.na-mic.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Klawson1</id>
	<title>NAMIC Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.na-mic.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Klawson1"/>
	<link rel="alternate" type="text/html" href="https://www.na-mic.org/wiki/Special:Contributions/Klawson1"/>
	<updated>2026-05-03T19:38:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Downloads&amp;diff=13892</id>
		<title>Slicer3:Downloads</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Downloads&amp;diff=13892"/>
		<updated>2007-07-27T15:13:02Z</updated>

		<summary type="html">&lt;p&gt;Klawson1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;toccolours&amp;quot; style=&amp;quot;margin-right: 25px&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
! bgcolor=&amp;quot;#ccccff&amp;quot; align=&amp;quot;center&amp;quot; | Slicer3&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3|Home]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:About|About]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:FAQ|FAQ]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Status|Status]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Downloads'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Documentation|Documentation]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Community_Support|Community Support]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Developers|Developers]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Acknowledgements|Acknowledgements]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Links|Links]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==About Slicer3==&lt;br /&gt;
&lt;br /&gt;
Slicer3 is a project under active development. See [[Slicer3:Status|the Status Page]] for more information on what the software does and the current status of product features. Release notes for Slicer3 are available [[Slicer3:Slicer3_Alpha_Release_Notes|here]]&lt;br /&gt;
&lt;br /&gt;
As Slicer3 is changing on a daily basis, some features may not be implemented or will be in various stages of completion.  Slicer2.6 is the current fully supported release of Slicer.  For information about the current release of Slicer2.6, see [[Slicer:Slicer2.6_Getting_Started|Slicer2.6 Getting Started]].&lt;br /&gt;
&lt;br /&gt;
There are a couple different ways to obtain Slicer3 to run on your own computer.  You can either download a precompiled Slicer3 installer for your platform, or build it yourself from an SVN checkout.&lt;br /&gt;
&lt;br /&gt;
==Obtaining a Precompiled Binary== &lt;br /&gt;
&lt;br /&gt;
Compiled '''Slicer3 executables''' are [http://www.na-mic.org/Slicer/Download/Snapshots/ '''available here'''].  From the Snapshots directory, select your architecture.   &lt;br /&gt;
&lt;br /&gt;
The current supported architectures are:&lt;br /&gt;
&lt;br /&gt;
* darwin-x86: Mac OSX - Darwin x86 Intel&lt;br /&gt;
* darwin-ppc: Mac OSX - Darwin Power PC&lt;br /&gt;
* linux-x86: Linux-x86 - Linux 32-bit&lt;br /&gt;
* linux-x86_64: Linux-x86_64 - Linux 64-bit&lt;br /&gt;
* win32: Windows&lt;br /&gt;
&lt;br /&gt;
The Snapshots directory contains both Slicer2 and Slicer3 binaries.  For the latest build, select the filename that begins with &amp;quot;Slicer3&amp;quot; and has the most recent date.  For the beta binary released prior to the January 2007 All Hands Meeting, choose the file with &amp;quot;PreAHM&amp;quot; in the filename.  These are all beta builds, so you might find some bugs.  If you do, or are having trouble installing Slicer3, please email slicer-users@bwh.harvard.edu so we can continue to improve Slicer3.   &lt;br /&gt;
&lt;br /&gt;
===Installing on Mac OSX===&lt;br /&gt;
&lt;br /&gt;
The latest Mac OSX builds are either tar.gz files or .sh files.  To install Slicer3, open up an X11 terminal window and copy the binary to the location where you want to install.  Change the filename in the examples below to reflect the binary you downloaded.  &lt;br /&gt;
&lt;br /&gt;
=====Unpacking .tar.gz Files=====&lt;br /&gt;
&lt;br /&gt;
To unzip and untar the .tar.gz binary, type:&lt;br /&gt;
&lt;br /&gt;
 gunzip ./Slicer3-3.0.2007-01-10-Darwin-x86.tar.gz&lt;br /&gt;
 tar -xvf ./Slicer3-3.0.2007-01-10-Darwin-x86.tar&lt;br /&gt;
&lt;br /&gt;
=====Unpacking .sh Files=====&lt;br /&gt;
&lt;br /&gt;
To unpack the .sh binary, type:&lt;br /&gt;
&lt;br /&gt;
 ./Slicer3-3.0.2007-01-10-Darwin-x86.sh&lt;br /&gt;
&lt;br /&gt;
You will be prompted to accept the license agreement, and asked where you want to install it.  Respond &amp;quot;Y&amp;quot; to both questions.&lt;br /&gt;
&lt;br /&gt;
=====Running Slicer3=====&lt;br /&gt;
&lt;br /&gt;
To run Slicer3, cd into the Slicer3-3.0.2007-xx-xx/ directory and type:&lt;br /&gt;
&lt;br /&gt;
 ./Slicer3&lt;br /&gt;
&lt;br /&gt;
===Installing on Linux===&lt;br /&gt;
&lt;br /&gt;
After downloading the file, move it to where you would like to install Slicer3, and then execute the .sh binary.  To do this, simply do the following (replace the filename with the one you downloaded):&lt;br /&gt;
&lt;br /&gt;
 ./Slicer3-3.0.2007-01-08-Linux-x86_64.sh&lt;br /&gt;
&lt;br /&gt;
If the file doesn't execute, make sure that you have execute permission set.  To add execute permission, type:&lt;br /&gt;
&lt;br /&gt;
 chmod a+x ./Slicer3-3.0.2007-01-08-Linux-x86_64.sh&lt;br /&gt;
&lt;br /&gt;
Some shells have problems executing the script.  If so, you might need to specify which shell you want to execute the script, e.g.:&lt;br /&gt;
&lt;br /&gt;
 /bin/sh ./Slicer3-3.0.2007-01-08-Linux-x86_64.sh&lt;br /&gt;
&lt;br /&gt;
To run Slicer3, cd into the Slicer3-3.0.2007-xx-xx/bin directory and type:&lt;br /&gt;
&lt;br /&gt;
 ./Slicer3&lt;br /&gt;
&lt;br /&gt;
===Installing on Windows===&lt;br /&gt;
&lt;br /&gt;
After downloading the file, simply double-click on it to start the installation process.  To uninstall Slicer3, double-click the Uninstall icon in the Slicer3 directory.  To run Slicer, go to Start -&amp;gt; Programs -&amp;gt; Slicer3-3.0.2007.xx-xx -&amp;gt; Slicer&lt;br /&gt;
&lt;br /&gt;
==Build Slicer3 Yourself==&lt;br /&gt;
&lt;br /&gt;
If you would like to build Slicer3 yourself from an SVN checkout, you can find detailed instructions [[Slicer3:Build_Instructions|here]].&lt;/div&gt;</summary>
		<author><name>Klawson1</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Downloads&amp;diff=13891</id>
		<title>Slicer3:Downloads</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Downloads&amp;diff=13891"/>
		<updated>2007-07-27T15:12:33Z</updated>

		<summary type="html">&lt;p&gt;Klawson1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;toccolours&amp;quot; style=&amp;quot;margin-right: 25px&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
! bgcolor=&amp;quot;#ccccff&amp;quot; align=&amp;quot;center&amp;quot; | Slicer3&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3|Home]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:About|About]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:FAQ|FAQ]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Status|Status]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Downloads'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Documentation|Documentation]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Community_Support|Community Support]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Developers|Developers]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Acknowledgements|Acknowledgements]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Slicer3:Links|Links]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==About Slicer3==&lt;br /&gt;
&lt;br /&gt;
Slicer 3 is a project under active development. See [[Slicer3:Status|the Status Page]] for more information on what the software does and the current status of product features. Release notes for Slicer 3 are available [[Slicer3:Slicer3_Alpha_Release_Notes|here]]&lt;br /&gt;
&lt;br /&gt;
As Slicer3 is changing on a daily basis, some features may not be implemented or will be in various stages of completion.  Slicer2.6 is the current fully supported release of Slicer.  For information about the current release of Slicer2.6, see [[Slicer:Slicer2.6_Getting_Started|Slicer2.6 Getting Started]].&lt;br /&gt;
&lt;br /&gt;
There are a couple different ways to obtain Slicer3 to run on your own computer.  You can either download a precompiled Slicer3 installer for your platform, or build it yourself from an SVN checkout.&lt;br /&gt;
&lt;br /&gt;
==Obtaining a Precompiled Binary== &lt;br /&gt;
&lt;br /&gt;
Compiled '''Slicer3 executables''' are [http://www.na-mic.org/Slicer/Download/Snapshots/ '''available here'''].  From the Snapshots directory, select your architecture.   &lt;br /&gt;
&lt;br /&gt;
The current supported architectures are:&lt;br /&gt;
&lt;br /&gt;
* darwin-x86: Mac OSX - Darwin x86 Intel&lt;br /&gt;
* darwin-ppc: Mac OSX - Darwin Power PC&lt;br /&gt;
* linux-x86: Linux-x86 - Linux 32-bit&lt;br /&gt;
* linux-x86_64: Linux-x86_64 - Linux 64-bit&lt;br /&gt;
* win32: Windows&lt;br /&gt;
&lt;br /&gt;
The Snapshots directory contains both Slicer2 and Slicer3 binaries.  For the latest build, select the filename that begins with &amp;quot;Slicer3&amp;quot; and has the most recent date.  For the beta binary released prior to the January 2007 All Hands Meeting, choose the file with &amp;quot;PreAHM&amp;quot; in the filename.  These are all beta builds, so you might find some bugs.  If you do, or are having trouble installing Slicer3, please email slicer-users@bwh.harvard.edu so we can continue to improve Slicer3.   &lt;br /&gt;
&lt;br /&gt;
===Installing on Mac OSX===&lt;br /&gt;
&lt;br /&gt;
The latest Mac OSX builds are either tar.gz files or .sh files.  To install Slicer3, open up an X11 terminal window and copy the binary to the location where you want to install.  Change the filename in the examples below to reflect the binary you downloaded.  &lt;br /&gt;
&lt;br /&gt;
=====Unpacking .tar.gz Files=====&lt;br /&gt;
&lt;br /&gt;
To unzip and untar the .tar.gz binary, type:&lt;br /&gt;
&lt;br /&gt;
 gunzip ./Slicer3-3.0.2007-01-10-Darwin-x86.tar.gz&lt;br /&gt;
 tar -xvf ./Slicer3-3.0.2007-01-10-Darwin-x86.tar&lt;br /&gt;
&lt;br /&gt;
=====Unpacking .sh Files=====&lt;br /&gt;
&lt;br /&gt;
To unpack the .sh binary, type:&lt;br /&gt;
&lt;br /&gt;
 ./Slicer3-3.0.2007-01-10-Darwin-x86.sh&lt;br /&gt;
&lt;br /&gt;
You will be prompted to accept the license agreement, and asked where you want to install it.  Respond &amp;quot;Y&amp;quot; to both questions.&lt;br /&gt;
&lt;br /&gt;
=====Running Slicer3=====&lt;br /&gt;
&lt;br /&gt;
To run Slicer3, cd into the Slicer3-3.0.2007-xx-xx/ directory and type:&lt;br /&gt;
&lt;br /&gt;
 ./Slicer3&lt;br /&gt;
&lt;br /&gt;
===Installing on Linux===&lt;br /&gt;
&lt;br /&gt;
After downloading the file, move it to where you would like to install Slicer3, and then execute the .sh binary.  To do this, simply do the following (replace the filename with the one you downloaded):&lt;br /&gt;
&lt;br /&gt;
 ./Slicer3-3.0.2007-01-08-Linux-x86_64.sh&lt;br /&gt;
&lt;br /&gt;
If the file doesn't execute, make sure that you have execute permission set.  To add execute permission, type:&lt;br /&gt;
&lt;br /&gt;
 chmod a+x ./Slicer3-3.0.2007-01-08-Linux-x86_64.sh&lt;br /&gt;
&lt;br /&gt;
Some shells have problems executing the script.  If so, you might need to specify which shell you want to execute the script, e.g.:&lt;br /&gt;
&lt;br /&gt;
 /bin/sh ./Slicer3-3.0.2007-01-08-Linux-x86_64.sh&lt;br /&gt;
&lt;br /&gt;
To run Slicer3, cd into the Slicer3-3.0.2007-xx-xx/bin directory and type:&lt;br /&gt;
&lt;br /&gt;
 ./Slicer3&lt;br /&gt;
&lt;br /&gt;
===Installing on Windows===&lt;br /&gt;
&lt;br /&gt;
After downloading the file, simply double-click on it to start the installation process.  To uninstall Slicer3, double-click the Uninstall icon in the Slicer3 directory.  To run Slicer, go to Start -&amp;gt; Programs -&amp;gt; Slicer3-3.0.2007.xx-xx -&amp;gt; Slicer&lt;br /&gt;
&lt;br /&gt;
==Build Slicer3 Yourself==&lt;br /&gt;
&lt;br /&gt;
If you would like to build Slicer3 yourself from an SVN checkout, you can find detailed instructions [[Slicer3:Build_Instructions|here]].&lt;/div&gt;</summary>
		<author><name>Klawson1</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Large_scale_experiment_control_brainstorming&amp;diff=13239</id>
		<title>Slicer3:Large scale experiment control brainstorming</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Large_scale_experiment_control_brainstorming&amp;diff=13239"/>
		<updated>2007-07-01T03:21:19Z</updated>

		<summary type="html">&lt;p&gt;Klawson1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Bold text'''== Goal ==&lt;br /&gt;
&lt;br /&gt;
To provide Slicer3 with a mechanism for submitting, monitoring, and summarizing large scale experiments that utilize Slicer3 modules, particularly the Command Line Modules.  This page summarizes our thoughts, requirements, and experiments to date, mostly accomplished during the [[Slicer3:MiniRetreat March 29, 30, 2007 | March 2007 Slicer3 MiniRetreat]].&lt;br /&gt;
&lt;br /&gt;
There are two introductory use cases that we wish to support:&lt;br /&gt;
&lt;br /&gt;
# Slicer3 is used interactively to select a set of parameters for an algorithm or workflow on a single dataset.  Then, these parameters are applied to N datasets non-interactively.&lt;br /&gt;
# Slicer3 is used interactively to select a subset of parameters for an algorithm or workflow on a single dataset.  Then, the remaining parameter space is searched non-interactively. Various parameter space evaluation techniques could be employed, the simplest of which is to sample the space of (param1, param2, param3).&lt;br /&gt;
&lt;br /&gt;
Note, that with the above two use cases, we are only trying to address large scale experiment control from the standpoint of what it means to Slicer3.  We are '''not''' trying to solve the general case of large scale experiment control.&lt;br /&gt;
&lt;br /&gt;
== Assumptions and restrictions ==&lt;br /&gt;
&lt;br /&gt;
# Computing configuration.&lt;br /&gt;
#: We shall support a variety of computing infrastructures which include&lt;br /&gt;
#:# single computer systems,&lt;br /&gt;
#:# clusters, &lt;br /&gt;
#:# grids (optional)&lt;br /&gt;
# Access to compute nodes. &lt;br /&gt;
#: We shall have no direct access to the compute nodes.  All '''job submissions''' shall be to some sort of submit node. Exception may be when operating on a single computer system configuration.&lt;br /&gt;
# Staged data&lt;br /&gt;
#: The compute nodes shall mount a filesystem outside of the node on which data is staged.  We are not providing Slicer3 with the mechanisms to stage data.  We assume that all data is staged outside of Slicer3.&lt;br /&gt;
# Staged programs&lt;br /&gt;
#: The compute nodes shall have access to the Slicer3 processing modules. Like the case for data, the processing modules are staged outside of the Slicer3 environment.&lt;br /&gt;
# Experiment scheduling&lt;br /&gt;
#: A given experiment shall result in one or more processing jobs being submitted to the computing resources.&lt;br /&gt;
# Job submission&lt;br /&gt;
#: Submitting a job to the computing infrastructure shall result in a job submission token such that that job can be&lt;br /&gt;
#:# monitored for status: scheduled, running, completed&lt;br /&gt;
#:# terminated&lt;br /&gt;
# Experiment control&lt;br /&gt;
#: We shall be able to monitor an experiment to see its status.&lt;br /&gt;
#: We shall be able to interrupt an experiment. This may involve removing jobs from the queue and terminating jobs in process.&lt;br /&gt;
#: We shall be able to resume an experiment without re-running the entire experiment. Previously terminated jobs will be resubmitted.  Previously completed jobs will not be rerun.&lt;br /&gt;
#: We shall be able to rerun an experiment, overwriting previous results.&lt;br /&gt;
# Job execution robustness&lt;br /&gt;
#: Jobs terminating unsuccessfully shall be automatically resubmitted to the computing environment upon the experiment designers request. Jobs may be resubmitted zero times, K times, or until successful.&lt;br /&gt;
# Platform&lt;br /&gt;
#: The cluster head node is expected to be a linux machine with standard packages installed.&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
To address the application scenario, we considered the following:&lt;br /&gt;
&lt;br /&gt;
=== Completion of a Single Execution Step ===&lt;br /&gt;
&lt;br /&gt;
Given that any job submission may fail (for example, if the cluster or a node goes down) we need to be able to distinguish the following cases when starting a job:&lt;br /&gt;
&lt;br /&gt;
 1. job has not been started&lt;br /&gt;
 2. job has been started (i.e. we are reattaching to a running job)&lt;br /&gt;
 2a job still running&lt;br /&gt;
 2b job not running&lt;br /&gt;
 3 job has completed successfully&lt;br /&gt;
&lt;br /&gt;
We want to provide the following capabilities:&lt;br /&gt;
* the job can started (i.e. we have a back-end for different job control systems)&lt;br /&gt;
* we can check the status of jobs (we save the job token)&lt;br /&gt;
* we can restart a job that has died&lt;br /&gt;
* we don't start a job if it is alreay running&lt;br /&gt;
* we don't re-run a job that already has completed successfully&lt;br /&gt;
* we can clean up the state so the whole job can be re-run&lt;br /&gt;
&lt;br /&gt;
=== Overall Experiment Control ===&lt;br /&gt;
&lt;br /&gt;
We would like tools to provide the following controls:&lt;br /&gt;
&lt;br /&gt;
* Be able to start and experiment&lt;br /&gt;
* Be able to check the status of an experiment that is running&lt;br /&gt;
* Be able to confirm that the experiment has completed&lt;br /&gt;
* Be able to restart an experiment in the middle if the cluster crashed or jobs failed.&lt;br /&gt;
&lt;br /&gt;
== Thought experiments ==&lt;br /&gt;
&lt;br /&gt;
Below are a few thought experiments to address the above. These will be used to see how the above needs can be addressed.&lt;br /&gt;
&lt;br /&gt;
=== Makefiles + the Looping Launcher ===&lt;br /&gt;
&lt;br /&gt;
We considered the running of the experiment as a dependency graph, and realized that the 'make' utitlity is a powerful system for expressing and resolving dependencies, and that it has parallel exeucution features with the -j flag.  We'd like to be able to say 'make Experiment' and have the results generated.  Make is good at re-running only what is needed.&lt;br /&gt;
&lt;br /&gt;
We looked at three issues:&lt;br /&gt;
# Makefiles are not friendly to write (particularly with large numbers of dependencies), so some helper utilities would be needed.  we anticipate 100s or 1000s of file dependencies in an experiment, but this is doable by make.&lt;br /&gt;
# We needed a 'looping launcher' (a.k.a. loopy) that would submit a job and monitor it for successful completion.  If the job fails, the launcher resubmits the job for a pre-set number of times.&lt;br /&gt;
# Make works on the dependencies at the file level, whereas some steps in an experiment may write several files or write to a database.  So a wrapper utility is needed to monitor the job status and create a file that make can use to determine dependencies.   The loopy command includes this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Example Makefile Using the Looping Launcher ====&lt;br /&gt;
&lt;br /&gt;
The following example illustrates the concept on a simple example of 2 input data sets, each of which needs to be segmented before a summary statistics program can be run.  We simulated the cluster submit with a program called 'randomFail' which accepts a 'probability of failure' argument so we can test the approach's ability to recover from individual job failures.  This makefile would be run on the head node of a cluster.&lt;br /&gt;
&lt;br /&gt;
In this case, the program &amp;lt;loopy&amp;gt; accepts two important parameters &lt;br /&gt;
 --retries tells loopy how many times to try running the job before considering it a failure&lt;br /&gt;
 -d is the &amp;quot;done file&amp;quot; which tells loopy that it's target command has completed successfully&lt;br /&gt;
&lt;br /&gt;
Internally the loopy code [http://www.na-mic.org/ViewVC/index.cgi/trunk/Utilities/ETC/loopy?view=log (in slicer3 snv here)] starts the job and monitors it for completion.  Loopy saves the job id associated with a given job in a file name of the &amp;quot;done file&amp;quot; with the addition of a .started suffix.  This allows subsequent invokations of loopy to determine what state the job is in.  The .started file is deleted when the job completes successfully.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LOOPY=../../loopy --retries 10&lt;br /&gt;
SEGMENTER=./randomFail --p-fail 0.0 --delay 2000&lt;br /&gt;
STATISTICS=./randomFail --p-fail 0.0 --delay 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all: data/summary-statistics.out&lt;br /&gt;
        @echo job complete&lt;br /&gt;
&lt;br /&gt;
data/summary-statistics.out: data/ex1.out data/ex2.out&lt;br /&gt;
        @echo making summary&lt;br /&gt;
        $(LOOPY) -d data/summary-statistics.out &amp;quot;$(STATISTICS) -o data/summary-statistics.out&amp;quot;&lt;br /&gt;
&lt;br /&gt;
data/ex1.out:&lt;br /&gt;
        @echo making ex1&lt;br /&gt;
        $(LOOPY) -d data/ex1.out &amp;quot;$(SEGMENTER) -o data/ex1.out&amp;quot;&lt;br /&gt;
data/ex2.out:&lt;br /&gt;
        @echo making ex2&lt;br /&gt;
        $(LOOPY) -d data/ex2.out &amp;quot;$(SEGMENTER) -o data/ex2.out&amp;quot;&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
        rm -f data/ex1.out data/ex2.out data/summary-statistics.out&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Utility to help Generate Experiment Makefiles ====&lt;br /&gt;
&lt;br /&gt;
A set of experiment control helper code [http://www.na-mic.org/ViewVC/index.cgi/trunk/Utilities/ETC/Examples/RandomFail/Experiment.tcl?revision=3093&amp;amp;view=markup (in slicer3 snv here)] was prototyped.  This code, called ETC for now, allows you to make simple high level looping constructs to build up the dependencies needed for a complex experiment.&lt;br /&gt;
&lt;br /&gt;
In the following example, 50 experimental subjects are generated where each one must complete successfully before the summary statistics can be executed.  The ETC code generates a Makefile.ETC which uses the loopy code internally to implement a robust and restartable experiment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ../../ETC.tcl&lt;br /&gt;
&lt;br /&gt;
::ETC::SetProject ExampleSegmentation&lt;br /&gt;
&lt;br /&gt;
::ETC::SetWorkingDirectory .&lt;br /&gt;
for {set i 0} {$i &amp;lt; 50} {incr i} {&lt;br /&gt;
  lappend SubjectList ex$i&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
foreach Subject $SubjectList {&lt;br /&gt;
  ::ETC::Schedule -name EM$Subject &amp;quot;./randomFail -d 1000 -p 0.6 -o data/$Subject&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
::ETC::Schedule -name Summary -depends EM* &amp;quot;&amp;quot;&lt;br /&gt;
::ETC::RootTask Summary&lt;br /&gt;
&lt;br /&gt;
::ETC::Generate Makefile.ETC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BatchMake ===&lt;br /&gt;
&lt;br /&gt;
BatchMake allows for large scale experiments to be designed using a scripting language similar to CMake scripts.  BatchMake provides a number of looping constructs which can be used to design experiments and parameter searches&lt;br /&gt;
* foreach&lt;br /&gt;
* sequence&lt;br /&gt;
* randomize&lt;br /&gt;
* fornfold&lt;br /&gt;
Here is a BatchMake script to search the parameter space of a median filter&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SetApp(median @'Median Filter')&lt;br /&gt;
SetAppOption(median.inputVolume 'c:/projects/I2/Insight/Testing/Data/Input/cthead1.png')&lt;br /&gt;
&lt;br /&gt;
Set(kernels '1,1,1' '2,2,1' '3,3,1' '4,4,1' '5,5,1')&lt;br /&gt;
Set(outVolumePrefix 'c:/projects/Temp/Slicer3/median')&lt;br /&gt;
&lt;br /&gt;
foreach(kernel ${kernels})&lt;br /&gt;
  RegEx(kernelText ${kernel} ',' REPLACE '_')&lt;br /&gt;
  SetAppOption(median.outputVolume ${outVolumePrefix}${kernelText}.png)&lt;br /&gt;
  SetAppOption(median.neighborhood ${kernel})&lt;br /&gt;
&lt;br /&gt;
  Run(output ${median})&lt;br /&gt;
&lt;br /&gt;
endforeach(kernel)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We have extended the [[Slicer3:Execution Model Documentation | ModuleDescription library]] in Slicer3 to generate a BatchMake XML Application Wrapper from a ModuleDescription object.  This allows Slicer3 Command Line Modules to be loaded into BatchMake and used as BatchMake application objects in BatchMake scripts. This code has yet to be integrated into Slicer3 permanently because there a number of design decisions outstanding. Here is the ModuleDescription XML file that Slicer uses&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;executable&amp;gt;&lt;br /&gt;
  &amp;lt;category&amp;gt;&lt;br /&gt;
  Filtering.Denoising&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;gt;&lt;br /&gt;
  Median Filter&lt;br /&gt;
  &amp;lt;/title&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt;&lt;br /&gt;
The MedianImageFilter is commonly used as a robust approach for&lt;br /&gt;
noise reduction. This filter is particularly efficient against&lt;br /&gt;
&amp;quot;salt-and-pepper&amp;quot; noise. In other words, it is robust to the presence&lt;br /&gt;
of gray-level outliers. MedianImageFilter computes the value of each output&lt;br /&gt;
pixel as the statistical median of the neighborhood of values around the&lt;br /&gt;
corresponding input pixel.&lt;br /&gt;
  &amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;version&amp;gt;0.1.0.$Revision: 2085 $(alpha)&amp;lt;/version&amp;gt;&lt;br /&gt;
  &amp;lt;documentation-url&amp;gt;&amp;lt;/documentation-url&amp;gt;&lt;br /&gt;
  &amp;lt;license&amp;gt;&amp;lt;/license&amp;gt;&lt;br /&gt;
  &amp;lt;contributor&amp;gt;Bill Lorensen&amp;lt;/contributor&amp;gt;&lt;br /&gt;
  &amp;lt;acknowledgements&amp;gt;This command module was derived from Insight/Examples/Filtering/MedianImageFilter (copyright) Insight Software Consortium&amp;lt;/acknowledgements&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;Median Filter Parameters&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;Parameters for the median filter&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;integer-vector&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;neighborhood&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;longflag&amp;gt;--neighborhood&amp;lt;/longflag&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;The size of the neighborhood in each dimension&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;label&amp;gt;Neighborhood Size&amp;lt;/label&amp;gt;&lt;br /&gt;
      &amp;lt;default&amp;gt;1,1,1&amp;lt;/default&amp;gt;&lt;br /&gt;
    &amp;lt;/integer-vector&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
  &amp;lt;parameters&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;IO&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;Input/output parameters&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;inputVolume&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;label&amp;gt;Input Volume&amp;lt;/label&amp;gt;&lt;br /&gt;
      &amp;lt;channel&amp;gt;input&amp;lt;/channel&amp;gt;&lt;br /&gt;
      &amp;lt;index&amp;gt;0&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Input volume to be filtered&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;/image&amp;gt;&lt;br /&gt;
    &amp;lt;image&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;outputVolume&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;label&amp;gt;Output Volume&amp;lt;/label&amp;gt;&lt;br /&gt;
      &amp;lt;channel&amp;gt;output&amp;lt;/channel&amp;gt;&lt;br /&gt;
      &amp;lt;index&amp;gt;1&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;Output filtered&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;/image&amp;gt;&lt;br /&gt;
  &amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/executable&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here is the resulting BatchMake XML Application wrapper&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;BatchMakeApplicationWrapper&amp;gt;&lt;br /&gt;
  &amp;lt;BatchMakeApplicationWrapperVersion&amp;gt;1.0&amp;lt;/BatchMakeApplicationWrapper&amp;gt;&lt;br /&gt;
  &amp;lt;Module&amp;gt;&lt;br /&gt;
    &amp;lt;Name&amp;gt;Median Filter&amp;lt;/Name&amp;gt;&lt;br /&gt;
    &amp;lt;Version&amp;gt;0.1.0.$Revision: 2085 $(alpha)&amp;lt;/Version&amp;gt;&lt;br /&gt;
    &amp;lt;Path&amp;gt;c:/projects/Slicer3-clean-net2005/bin/RelWithDebInfo/../../lib/Slicer3/Plugins/RelWithDebInfo/MedianImageFilter.exe&amp;lt;/Path&amp;gt;&lt;br /&gt;
    &amp;lt;Parameters&amp;gt;&lt;br /&gt;
      &amp;lt;Param&amp;gt;&lt;br /&gt;
        &amp;lt;Type&amp;gt;1&amp;lt;/Type&amp;gt;&lt;br /&gt;
        &amp;lt;Name&amp;gt;neighborhood.flag&amp;lt;/Name&amp;gt;&lt;br /&gt;
        &amp;lt;Value&amp;gt;--neighborhood&amp;lt;/Value&amp;gt;&lt;br /&gt;
        &amp;lt;Parent&amp;gt;0&amp;lt;/Parent&amp;gt;&lt;br /&gt;
        &amp;lt;External&amp;gt;0&amp;lt;/External&amp;gt;&lt;br /&gt;
        &amp;lt;Optional&amp;gt;1&amp;lt;/Optional&amp;gt;&lt;br /&gt;
      &amp;lt;/Param&amp;gt;&lt;br /&gt;
      &amp;lt;Param&amp;gt;&lt;br /&gt;
        &amp;lt;Type&amp;gt;4&amp;lt;/Type&amp;gt;&lt;br /&gt;
        &amp;lt;Name&amp;gt;neighborhood&amp;lt;/Name&amp;gt;&lt;br /&gt;
        &amp;lt;Value&amp;gt;1,1,1&amp;lt;/Value&amp;gt;&lt;br /&gt;
        &amp;lt;Parent&amp;gt;1&amp;lt;/Parent&amp;gt;&lt;br /&gt;
        &amp;lt;External&amp;gt;0&amp;lt;/External&amp;gt;&lt;br /&gt;
        &amp;lt;Optional&amp;gt;0&amp;lt;/Optional&amp;gt;&lt;br /&gt;
      &amp;lt;/Param&amp;gt;&lt;br /&gt;
      &amp;lt;Param&amp;gt;&lt;br /&gt;
        &amp;lt;Type&amp;gt;0&amp;lt;/Type&amp;gt;&lt;br /&gt;
        &amp;lt;Name&amp;gt;inputVolume&amp;lt;/Name&amp;gt;&lt;br /&gt;
        &amp;lt;Value&amp;gt;&amp;lt;/Value&amp;gt;&lt;br /&gt;
        &amp;lt;Parent&amp;gt;0&amp;lt;/Parent&amp;gt;&lt;br /&gt;
        &amp;lt;External&amp;gt;1&amp;lt;/External&amp;gt;&lt;br /&gt;
        &amp;lt;Optional&amp;gt;0&amp;lt;/Optional&amp;gt;&lt;br /&gt;
      &amp;lt;/Param&amp;gt;&lt;br /&gt;
      &amp;lt;Param&amp;gt;&lt;br /&gt;
        &amp;lt;Type&amp;gt;0&amp;lt;/Type&amp;gt;&lt;br /&gt;
        &amp;lt;Name&amp;gt;outputVolume&amp;lt;/Name&amp;gt;&lt;br /&gt;
        &amp;lt;Value&amp;gt;&amp;lt;/Value&amp;gt;&lt;br /&gt;
        &amp;lt;Parent&amp;gt;0&amp;lt;/Parent&amp;gt;&lt;br /&gt;
        &amp;lt;External&amp;gt;2&amp;lt;/External&amp;gt;&lt;br /&gt;
        &amp;lt;Optional&amp;gt;0&amp;lt;/Optional&amp;gt;&lt;br /&gt;
      &amp;lt;/Param&amp;gt;&lt;br /&gt;
    &amp;lt;/Parameters&amp;gt;&lt;br /&gt;
  &amp;lt;/Module&amp;gt;&lt;br /&gt;
&amp;lt;/BatchMakeApplicationWrapper&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== BatchMake and the Computing Infrastructure ====&lt;br /&gt;
&lt;br /&gt;
* What is needed to make BatchMake submit to a cluster?&lt;br /&gt;
* To a grid?&lt;br /&gt;
&lt;br /&gt;
==== BatchMake and Job Control ====&lt;br /&gt;
&lt;br /&gt;
# Can BatchMake terminate a job?&lt;br /&gt;
# Can BatchMake resubmit a job until it completes successfully?&lt;br /&gt;
&lt;br /&gt;
==== BatchMake and Experiment Control ====&lt;br /&gt;
&lt;br /&gt;
Can BatchMake interrupt, continue, and rerun an experiment?&lt;/div&gt;</summary>
		<author><name>Klawson1</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Data_Model&amp;diff=11821</id>
		<title>Slicer3:Data Model</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Data_Model&amp;diff=11821"/>
		<updated>2007-06-17T21:47:21Z</updated>

		<summary type="html">&lt;p&gt;Klawson1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer3 MRML Overview =&lt;br /&gt;
&lt;br /&gt;
*MRML Library provides API for managing medical image data types (Volumes, Models, Transforms, Fiducials, Cameras, etc) and their visualization. &lt;br /&gt;
*Each data type is represented by a special MRML node. &lt;br /&gt;
*MRML Scene is a collection of MRML nodes. &lt;br /&gt;
*Slicer MRML data model is implemented independent of the visualization and algorithmic components of the system. &lt;br /&gt;
*Other Slicer components (Logic and GUI) observe changes in MRML scene and individual nodes and process change MRML events.&lt;br /&gt;
&lt;br /&gt;
For more details on MRML architecture see [http://www.na-mic.org/Wiki/images/e/e3/Slicer_3-alpha-2006-04-03.ppt Architecture Slides].&lt;br /&gt;
&lt;br /&gt;
= MRML Scene =&lt;br /&gt;
&lt;br /&gt;
*MRML Scene manages MRML nodes : add, delete, find, find by type, etc.&lt;br /&gt;
*MRML Scene provides persistence of MRML nodes (reading/writing to/from XML file). &lt;br /&gt;
*MRML  Scene provides Undo/Redo mechanism that restores a previous state of the scene and individual nodes.&lt;br /&gt;
&lt;br /&gt;
= MRML Nodes =&lt;br /&gt;
 &lt;br /&gt;
*The MRML nodes are designed to store the state of the Slicer application, both raw data and visualization parameters.&lt;br /&gt;
&lt;br /&gt;
There following is a set of core MRLN nodes that store the state of core Slicer modules:&lt;br /&gt;
&lt;br /&gt;
* vtkMRMLCameraNode&lt;br /&gt;
* vtkMRMLClipModelsNode&lt;br /&gt;
* vtkMRMLSliceCompositeNode&lt;br /&gt;
* vtkMRMLSliceNode&lt;br /&gt;
* vtkMRMLColorNode&lt;br /&gt;
* vtkMRMLTransformNode&lt;br /&gt;
* vtkMRMLLinearTransformNode&lt;br /&gt;
* vtkMRMLTransformableNode&lt;br /&gt;
* vtkMRMLFiducialListNode&lt;br /&gt;
* vtkMRMLModelNode&lt;br /&gt;
* vtkMRMLModelDisplayNode&lt;br /&gt;
* vtkMRMLStorageNode&lt;br /&gt;
* vtkMRMLModelStorageNode&lt;br /&gt;
* vtkMRMLVolumeNode&lt;br /&gt;
* vtkMRMLScalarVolumeNode&lt;br /&gt;
* vtkMRMLVectorVolumeNode&lt;br /&gt;
* vtkMRMLTensorVolumeNode&lt;br /&gt;
* vtkMRMLDiffusionTensorVolumeNode&lt;br /&gt;
* vtkMRMLDiffusionWeightedVolumeNode&lt;br /&gt;
* vtkMRMLVolumeDisplayNode&lt;br /&gt;
* vtkMRMLVectorVolumeDisplayNode&lt;br /&gt;
* vtkMRMLDiffusionTensorVolumeDisplayNode&lt;br /&gt;
* vtkMRMLDiffusionWeightedVolumeDisplayNode&lt;br /&gt;
* vtkMRMLVolumeHeaderlessStorageNode&lt;br /&gt;
* vtkMRMLVolumeArchetypeStorageNode&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt; &lt;br /&gt;
*MRML nodes are organized into C++ class hierarchies, all derived from vtkMRMLNode class. &lt;br /&gt;
*For example vtkMRMLTransformableNode is the parent class of Volume, Model, Fiducial, and Transformation nodes; vtkVolumeNode is a parent of vtkMRMLScalarVolumeNode and vtkMRMLVectorVolumeNode&lt;br /&gt;
*All MRML nodes have to implement certain standard API: ReadAttributes, WriteAttributes, Copy, etc.&lt;br /&gt;
{|&lt;br /&gt;
|[[Image: Slicer3_MRML_Node_Hier.jpg|thumb|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= References to MRML Nodes =&lt;br /&gt;
&lt;br /&gt;
*Some MRML nodes have references to other nodes. &lt;br /&gt;
*Transformable Node has a reference to a Transformation node. Transformation node has a reference to its parent Transformation node. &lt;br /&gt;
*References are stored by node ID.&lt;br /&gt;
*Use vtkSetReferenceStringMacro to set reference ID (it registers reference with the scene).&lt;br /&gt;
*Access methods should check if the referenced node is still in the MRML scene using its ID.&lt;br /&gt;
{|&lt;br /&gt;
|[[Image: Slicer3_MRML_Trans_Ref.jpg|thumb|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= MRML Events and Observers =&lt;br /&gt;
&lt;br /&gt;
*Changes in MRML scene and individual nodes propagate to other observing nodes, GUI and Logic objects via vtk events and command-observer mechanism.&lt;br /&gt;
*Use vtk AddObserver() and InvokeEvent() methods. vtk SetMacro generates ModifiedEvent.&lt;br /&gt;
*The command-observer mechanism for MRML is implemented using  helper vtkObserverManager, class, MRML Observer macros, and ProcessMRMLEvents method.&lt;br /&gt;
*Observers should store a registered pointer to a MRML node to prevent callbacks on a deleted object. &lt;br /&gt;
{|&lt;br /&gt;
|[[Image: Slicer3_MRML_Observ.jpg|thumb|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*MRML observer macros are defined in Libs/MRML/vtkMRMLNode.h&lt;br /&gt;
*VtkSetMRMLObjectMacro - registers MRML node with another vtk object (another MRML node, Logic or GUI). No observers added.&lt;br /&gt;
*VtkSetAndObserveMRMLObjectMacro - registers MRML node and adds an observer for vtkCommand::ModifyEvent. &lt;br /&gt;
*VtkSetAndObserveMRMLObjectEventsMacro - registers MRML node and adds an observer for a specified set of events. &lt;br /&gt;
*SetAndObserveMRMLScene[Events]() method is used in GUI and Logic to observe Modify, NewScene, NodeAdded, etc. events.&lt;br /&gt;
*ProcessMRMLEvents method should be implemented in MRML nodes, Logic, and GUI classes in order to process events from the observed nodes.&lt;br /&gt;
&lt;br /&gt;
= Creating Custom MRML Node Classes=&lt;br /&gt;
&lt;br /&gt;
*Custom MRML nodes provide persistent storage for the module parameters. &lt;br /&gt;
*Custom MRML nodes should be registered with the MRML scene using RegisterNodeClass() so they can be saved and restored from a scene file. &lt;br /&gt;
*Classes should implement the following methods: &lt;br /&gt;
*CreateNodeInstance() – similar to VTK New() method only not static. &lt;br /&gt;
*GetNodeTagName() – return a unique XML tag for this node. &lt;br /&gt;
*ReadXMLAttributes() – reads node attributes from XML file as name-value pairs. &lt;br /&gt;
*WriteXML() – writes node attributes to output stream (as in interpolate=&amp;quot;1&amp;quot; ).&lt;br /&gt;
*Copy() – copies node attributes. &lt;br /&gt;
&lt;br /&gt;
*If the node has references to other nodes the following additional methods should be implemented: &lt;br /&gt;
 –UpdateReferenceID() - updates the stored reference to another node. &lt;br /&gt;
 –UpdateScene()- updates other nodes in the scene depending on this node or updates this node if it depends on other nodes when the scene is read in. &lt;br /&gt;
   This method is called automatically by XML parser after all nodes are created. &lt;br /&gt;
*An example of a custom MRML node implementation: vtkMRMLGradientAnisotropicDiffusionFilterNode in Modules/GradientAnisotropicDiffusionFilter directory. &lt;br /&gt;
*To add node to the MRML scene: &lt;br /&gt;
 –In the code: use standard vtk New() and add node to the scene using vtkMRMLScene::AddNode(vtkMRMLNode *)&lt;br /&gt;
 –By user request: use vtkSlicerNodeSelectorWidget that creates a new node from the module’s UI. &lt;br /&gt;
&lt;br /&gt;
= Undo/Redo Mechanism =&lt;br /&gt;
&lt;br /&gt;
*Undo/Redo is based on saving and restoring the state of MRML nodes in the Scene. &lt;br /&gt;
*MRML scene can save snapshot of all nodes into a special Undo and Redo stacks. &lt;br /&gt;
*The Undo and Redo stacks store copies of nodes that have changed from the previous snapshot. The node that have not changes are stored by a reference (pointer). &lt;br /&gt;
*When an Undo is called on the scene, the current state of Undo stack is copied into the current scene and also into Redo stack. &lt;br /&gt;
*  All Undoable operations must store their data as MRML nodes&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[Image: Slicer3_MRML_Undo.jpg|thumb|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Developer controls at what point the snapshot is saved by calling SaveStateForUndo method on the MRML scene. &lt;br /&gt;
–SaveStateForUndo() - saves the state of all nodes in the scene &lt;br /&gt;
&amp;lt;br /&amp;gt;–SetActiveScene(vtkMRMLScene *) - saves the state of the specified node. &lt;br /&gt;
&amp;lt;br /&amp;gt;–SetActiveScene(vtkCollection*) - saves the state of the specified collection of nodes. &lt;br /&gt;
*SaveStateForUndo() should be called in GUI/Logic classes before changing the state of MRML nodes. Usually done in the ProcessGUIEvents method that processes events from the user interactions with GUI widgets. &lt;br /&gt;
*SaveStateForUndo() should not be called while processing transient events such as continuous events sent by KW UI while dragging a slider (for example vtkKWScale::ScaleValueStartChangingEvent). &lt;br /&gt;
&lt;br /&gt;
The following methods on the MRML scene are used to manage Undo/Redo stacks:&lt;br /&gt;
&lt;br /&gt;
* vtkMRMLScene::Undo() – restore the previously saved state of the MRML scene.&lt;br /&gt;
* vtkMRMLScene::Redo() – restore the previously undone state of the MREML scene.&lt;br /&gt;
* vtkMRMLScene::SetUndoOff() – ignore following SaveStateForUndo calls (usefull when making multiple changes to the scene/nodes that does not need to be undone). &lt;br /&gt;
* vtkMRMLScene::SetUndoOn() – enable following SaveStateForUndo calls.&lt;br /&gt;
* vtkMRMLScene::ClearUndoStack() – clears the undo history.&lt;br /&gt;
* vtkMRMLScene::ClearRedoStack() – clears the redo history.&lt;br /&gt;
&lt;br /&gt;
Slicer Module developers should call vtkMRMLScne::SaveStateForUndo() method in their modules before changing the state of MRML nodes. This is usually done in the ProcessGUIEvents method that processes events from the user interactions with GUI widgets. Note, that vtkMRMLScne::SaveStateForUndo() method should not be called while processing transient events such as continuos events sent by UI while dragging a slider (for example vtkKWScale::ScaleValueStartChangingEvent).&lt;br /&gt;
&lt;br /&gt;
= Other Useful References =&lt;br /&gt;
&lt;br /&gt;
== MRML API Documentation ==&lt;br /&gt;
&lt;br /&gt;
The detailed documentation of MRML API can be found in [http://www.na-mic.org/Slicer/Documentation/Slicer3/html/classes.html &amp;lt;nowiki&amp;gt; Slicer3 Doxygen pages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
See Data Model notes in [[AHM_2006:ProjectsSlicerDataModel|AHM 2006 Programming week project]].&lt;br /&gt;
&lt;br /&gt;
== Path-based MRML proposal ==&lt;br /&gt;
&lt;br /&gt;
Mike's proposal for a [[Slicer3:MRML3_Path|path-based MRML3 representation]], based on extending the Coordinate Space Manager ideas to the entire MRML3 tree&lt;br /&gt;
&lt;br /&gt;
== Slicer Daemon ==&lt;br /&gt;
&lt;br /&gt;
The goal of the [[Slicer3:Slicer_Daemon|Slicer Daemon]] project is to allow remote editing of the MRML data model by external programs over a socket.&lt;br /&gt;
&lt;br /&gt;
= Slicer 2.6 MRML =&lt;br /&gt;
&lt;br /&gt;
== Data Represented in MRML in Slicer 2.6 ==&lt;br /&gt;
&lt;br /&gt;
* Volumes&lt;br /&gt;
** IJK-&amp;gt;RAS (VTK-&amp;gt;RAS)&lt;br /&gt;
** Scalar Types&lt;br /&gt;
** Multicomponent (RGB, Displacement Vector)&lt;br /&gt;
** Tensor Volumes&lt;br /&gt;
** Label Maps&lt;br /&gt;
** Reference to Lookup Table&lt;br /&gt;
&lt;br /&gt;
* Models&lt;br /&gt;
** vtkPolyData&lt;br /&gt;
*** Named Field Data (scalars, vectors, labels) at points and cells (FreeSurferReaders)&lt;br /&gt;
*** Polylines with tensor point data (DTMRI Module)&lt;br /&gt;
** Color, Clipping State, Visibility, Scalar Visibility, LookupTable&lt;br /&gt;
&lt;br /&gt;
* Transforms&lt;br /&gt;
** Matrix4x4&lt;br /&gt;
&lt;br /&gt;
* Lookup Tables&lt;br /&gt;
** vtkLookupTable info&lt;br /&gt;
&lt;br /&gt;
* Fiducials&lt;br /&gt;
** Position, Quaternion&lt;br /&gt;
** Name, Selection State, Type (endoscopic, normal)&lt;br /&gt;
** Glyph Size, Text Size&lt;br /&gt;
&lt;br /&gt;
* Fiducial Lists&lt;br /&gt;
** Name, Slze, Color, Selection State&lt;br /&gt;
&lt;br /&gt;
* Colors&lt;br /&gt;
** Name, Label#, Diffuse/Ambient/Specular&lt;br /&gt;
&lt;br /&gt;
* Model Groups&lt;br /&gt;
&lt;br /&gt;
* Application State (not to be carried to Slicer3 MRML)&lt;br /&gt;
* Locator (not to be carried to Slicer3 MRML)&lt;br /&gt;
* Module Specific Parameters (not to be carried to Slicer3 MRML)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operations On MRML Scene ==&lt;br /&gt;
&lt;br /&gt;
* Load from File&lt;br /&gt;
* Save to File&lt;br /&gt;
* Traverse Nodes in Tree&lt;br /&gt;
* Insert Node&lt;br /&gt;
* Delete Node&lt;br /&gt;
* Register Tree Observer&lt;br /&gt;
* Update MRML&lt;br /&gt;
* Get Transformations (e.g. IJK to World through transform tree)&lt;br /&gt;
&lt;br /&gt;
* Data Type Specific Operations&lt;br /&gt;
** Get/Set Node MetaData&lt;br /&gt;
** Get/Set Data (e.g. as vtkImageData)&lt;br /&gt;
&lt;br /&gt;
== General References on XML ==&lt;br /&gt;
&lt;br /&gt;
A wikibook on XML: http://en.wikibooks.org/wiki/XML:_Managing_Data_Exchange&lt;br /&gt;
&lt;br /&gt;
The section on ID/IDREF implementations which are similar to what we use in MRML: http://en.wikibooks.org/wiki/XML:_Managing_Data_Exchange/The_many-to-many_relationship#ID.2FIDRE&lt;/div&gt;</summary>
		<author><name>Klawson1</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Event_Bindings&amp;diff=11817</id>
		<title>Event Bindings</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Event_Bindings&amp;diff=11817"/>
		<updated>2007-06-15T17:58:28Z</updated>

		<summary type="html">&lt;p&gt;Klawson1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Keyboard accelerators =&lt;br /&gt;
&lt;br /&gt;
A list of global &amp;quot;hot-keys&amp;quot; and module-specific &amp;quot;hot-keys&amp;quot; for Slicer2 and Slicer3 is being actively compiled below. (This page is a little out of sync with development -- please make current!) With respect to the specification of keyboard accelerators, please follow these three recommendations;&lt;br /&gt;
&lt;br /&gt;
* Before assigning &amp;quot;hot-keys&amp;quot; to functionality, either in the main Slicer application or in a new module, please consult the list below to make sure the key is not already mapped. &lt;br /&gt;
* Across Slicer modules, try to use similar &amp;quot;hot-key&amp;quot; assignments for similar functionality, and try to observe existing paradigms outlined below; this consistency makes Slicer easier for users to learn.&lt;br /&gt;
* Once you assign &amp;quot;hot-keys&amp;quot; in your module, please add those mappings to the list below for others to reference.&lt;br /&gt;
&lt;br /&gt;
== Design paradigms ==&lt;br /&gt;
&lt;br /&gt;
* use CTRL-modified keys as global, and non-modified keys for module-specific accelerators.&lt;br /&gt;
* use ALT modifiers to access menu items&lt;br /&gt;
* SHIFT modifiers should apply to all instances of the same type as the current window&lt;br /&gt;
&lt;br /&gt;
== Design ideas ==&lt;br /&gt;
&lt;br /&gt;
* using CTRL-1, CTRL-2 CTRL-3 to navigate to most commonly used modules in the base (for instance, Data, Volumes, Editor?).&lt;br /&gt;
* having hotkeys to toggle between axial, saggital, and coronal views in a slice window.&lt;br /&gt;
* having a hotkey to toggle any window the mouse is inside between full screen and current size.&lt;br /&gt;
* consistent set of mouse actions in 2D, 3D and control windows&lt;br /&gt;
* consistent set of mouse-mode switches in 2D, 3D windows&lt;br /&gt;
* use the right menu button to bring up a context-dependent menu (e.g. actions appropriate for the item under the cursor).&lt;br /&gt;
&lt;br /&gt;
== Global &amp;quot;hot-keys&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
=== Window Behavior ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#c2c2c2; color:black&amp;quot; align=&amp;quot;eft&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:20%&amp;quot; | Action&lt;br /&gt;
| style=&amp;quot;width:15%&amp;quot; | Slicer3 Key&lt;br /&gt;
| style=&amp;quot;width:40%&amp;quot; | Meaning&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | Slicer3 Key&lt;br /&gt;
|-&lt;br /&gt;
| Toggle Maximize current window&lt;br /&gt;
| Control-m&lt;br /&gt;
| Make the current Slice or 3D View expand to full view space or return to previous size depending on current state&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Toggle Control Pane View&lt;br /&gt;
| F5 (KWW default)&lt;br /&gt;
| Show or hide the Control Pane depending on state&lt;br /&gt;
| None&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MRML ===&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#c2c2c2; color:black&amp;quot; align=&amp;quot;eft&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:20%&amp;quot; | Action&lt;br /&gt;
| style=&amp;quot;width:15%&amp;quot; | Slicer3 Key&lt;br /&gt;
| style=&amp;quot;width:40%&amp;quot; | Meaning&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | Slicer3 Key&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Open Scene...&lt;br /&gt;
| Control-O&lt;br /&gt;
| Bring up file browser to locate .mrml file&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Save Scene&lt;br /&gt;
| Control-S&lt;br /&gt;
| Save current scene no browser, disabled if no current file. If no current scene, does Save As...&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Save Scene As...&lt;br /&gt;
| None&lt;br /&gt;
| Bring up file browser to locate .mrml file&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Undo&lt;br /&gt;
| Control-Z&lt;br /&gt;
| Revert to last undo point&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Redo&lt;br /&gt;
| Control-Y&lt;br /&gt;
| Revert to last redo point&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Other Menu Items&lt;br /&gt;
| Alt-&amp;lt;letter&amp;gt;&lt;br /&gt;
| Bring up or invoke menu or menu item corresponding to letter&lt;br /&gt;
| Same&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slice Manipulation ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#c2c2c2; color:black&amp;quot; align=&amp;quot;eft&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:20%&amp;quot; | Action&lt;br /&gt;
| style=&amp;quot;width:15%&amp;quot; | Slicer3 Key&lt;br /&gt;
| style=&amp;quot;width:40%&amp;quot; | Meaning&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | Slicer3 Key&lt;br /&gt;
|-&lt;br /&gt;
| Next slice&lt;br /&gt;
| Right Arrow and Up Arrow&lt;br /&gt;
| Axial: move Superior, Sag: Right, Cor: Anterior&lt;br /&gt;
| Right Arrow&lt;br /&gt;
|-&lt;br /&gt;
| Previous slice&lt;br /&gt;
| Left Arrow and Down Arrow&lt;br /&gt;
| Axial: move Inferior, Sag: Left, Cor: Posterior&lt;br /&gt;
| Left Arrow&lt;br /&gt;
|-&lt;br /&gt;
| Linked Motion&lt;br /&gt;
| Shift Key&lt;br /&gt;
| Cause other slice windows to scroll to RAS point at current cursor location&lt;br /&gt;
| Same&lt;br /&gt;
|-&lt;br /&gt;
| Toggle Slice Visible&lt;br /&gt;
| v&lt;br /&gt;
| Make the current slice window show as a plane in the 3D view&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Toggle All Slices Visible&lt;br /&gt;
| V&lt;br /&gt;
| Make all slices show in 3D View&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Toggle Foreground/Background Opacity&lt;br /&gt;
| T&lt;br /&gt;
| Change opacity of foreground overlay&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Toggle Label Overlay&lt;br /&gt;
| g&lt;br /&gt;
| Show/Hide Label for this slice&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Toggle Label Overlay&lt;br /&gt;
| G&lt;br /&gt;
| Show/Hide Label for all slices&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Cycle Orientations&lt;br /&gt;
| Tab&lt;br /&gt;
| Cycle through Axial/Sagittal/Coronal&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Cycle All Orientations&lt;br /&gt;
| Shift-Tab&lt;br /&gt;
| Cycle through Axial/Sagittal/Coronal in all slice windows&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Fit to volume&lt;br /&gt;
| f&lt;br /&gt;
| Set the field of view to match the full extent of the foreground and background volumes&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Fit to volumes all&lt;br /&gt;
| Shift-F&lt;br /&gt;
| Set the field of view in all slices to match the full extent of the foreground and background volumes&lt;br /&gt;
| None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3D Manipulation ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#c2c2c2; color:black&amp;quot; align=&amp;quot;eft&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:20%&amp;quot; | Action&lt;br /&gt;
| style=&amp;quot;width:15%&amp;quot; | Slicer3 Key&lt;br /&gt;
| style=&amp;quot;width:40%&amp;quot; | Meaning&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | Slicer3 Key&lt;br /&gt;
|-&lt;br /&gt;
| Wireframe&lt;br /&gt;
| w&lt;br /&gt;
| change render mode to wireframe&lt;br /&gt;
| Same&lt;br /&gt;
|-&lt;br /&gt;
| Shaded&lt;br /&gt;
| s&lt;br /&gt;
| change render mode to shaded&lt;br /&gt;
| Same&lt;br /&gt;
|-&lt;br /&gt;
| Reset View&lt;br /&gt;
| r&lt;br /&gt;
| Set camera to see all objects&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Toggle Rock Mode&lt;br /&gt;
| TBD&lt;br /&gt;
| Toggle rock mode&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Toggle Spin Mode&lt;br /&gt;
| TBD&lt;br /&gt;
| Toggle spin mode&lt;br /&gt;
| None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Navigating Application ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#c2c2c2; color:black&amp;quot; align=&amp;quot;eft&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:20%&amp;quot; | Action&lt;br /&gt;
| style=&amp;quot;width:15%&amp;quot; | Slicer3 Key&lt;br /&gt;
| style=&amp;quot;width:40%&amp;quot; | Meaning&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | Slicer3 Key&lt;br /&gt;
|-&lt;br /&gt;
| Application Menu&lt;br /&gt;
| Space Bar&lt;br /&gt;
| Brings up a popup menu with all the application operations and their key binding information&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Module Navigation&lt;br /&gt;
| Control-&amp;lt;number&amp;gt;&lt;br /&gt;
| Jumps to the numbered module (number order is the same as the order of the shortcut icons in the toolbar at the top of the application.&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Move through module history&lt;br /&gt;
| Control-PageUp/PageDown&lt;br /&gt;
| Short cuts for the two arrow buttons next to the module popup menu&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| Search for Module&lt;br /&gt;
| Control-F&lt;br /&gt;
| Starts an incremental search through the module names and descriptions, terminated by Enter to jump to the module. Probably needs a dialog box.&lt;br /&gt;
| None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Module-specific hot-keys ==&lt;br /&gt;
&lt;br /&gt;
=== Fiducials ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#c2c2c2; color:black&amp;quot; align=&amp;quot;eft&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:20%&amp;quot; | Action&lt;br /&gt;
| style=&amp;quot;width:15%&amp;quot; | Slicer3 Key&lt;br /&gt;
| style=&amp;quot;width:40%&amp;quot; | Meaning&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | Slicer3 Key&lt;br /&gt;
|-&lt;br /&gt;
| Add Fiducial&lt;br /&gt;
| Control-p&lt;br /&gt;
| Adds fiducial at current pointer position&lt;br /&gt;
| Same&lt;br /&gt;
|-&lt;br /&gt;
| Delete Fiducial&lt;br /&gt;
| Control-d&lt;br /&gt;
| Deletes the fiducial picked from current mouse position (ignored if no fiducial is under mouse)&lt;br /&gt;
| Same&lt;br /&gt;
|-&lt;br /&gt;
| Select Fiducial&lt;br /&gt;
| Control-q&lt;br /&gt;
| Selects/Deselects the fiducial under the mouse&lt;br /&gt;
| q&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Editor ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#c2c2c2; color:black&amp;quot; align=&amp;quot;eft&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:20%&amp;quot; | Action&lt;br /&gt;
| style=&amp;quot;width:15%&amp;quot; | Slicer3 Key&lt;br /&gt;
| style=&amp;quot;width:40%&amp;quot; | Meaning&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | Slicer3 Key&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Mouse Actions =&lt;br /&gt;
&lt;br /&gt;
== Button Use Constraints ==&lt;br /&gt;
&lt;br /&gt;
* Alt-Left mouse button should always be available as a substitute for the middle mouse button to support two button mice. On Mac, you can also use the command key with a mouse click to get middle mouse events.&lt;br /&gt;
* Contrl-Left mouse button should always be available as a substitute for the right mouse button to support one button mice (on Mac).&lt;br /&gt;
&lt;br /&gt;
== Toolbar ==&lt;br /&gt;
&lt;br /&gt;
The current mouse mode will always be visible in a toolbar in the slicer display. There will also be hot keys to select specify mouse modes. Instead of (or in addition to) a toolbar we may want to use a WWidget in the overlay planes to reflect the mouse mode.&lt;/div&gt;</summary>
		<author><name>Klawson1</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Interface_Design_and_Usability&amp;diff=11800</id>
		<title>Slicer3:Interface Design and Usability</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Interface_Design_and_Usability&amp;diff=11800"/>
		<updated>2007-06-14T21:59:28Z</updated>

		<summary type="html">&lt;p&gt;Klawson1: /* Event Bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''[[Slicer3|&amp;lt;&amp;lt; Back to Slicer3 main page]]'''&lt;br /&gt;
&lt;br /&gt;
[[Slicer3:Developers |Go to Slicer3 Developer Info &amp;gt;&amp;gt; ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Project goals =&lt;br /&gt;
&lt;br /&gt;
Design and engineer Slicer3 UI. Employ a user-centered approach and establish usability guidelines.&lt;br /&gt;
&lt;br /&gt;
= Project reporting =&lt;br /&gt;
&lt;br /&gt;
The scope of this effort is sorted into four categories: Engineering, UI design, Usability and Slicer3 branding. The subtasks of each category are itemized below and specific information about each category is located on the linked pages.&lt;br /&gt;
&lt;br /&gt;
=== [[Slicer3:UIEngineering|UI Architecture &amp;amp; Engineering]] ===&lt;br /&gt;
&lt;br /&gt;
Tasks: (more detailed UI Architecture &amp;amp; Engineering information can be found [[Slicer3:UIEngineering|here]]).&lt;br /&gt;
&lt;br /&gt;
* design thin GUI layer, separate from the control logic and data model;&lt;br /&gt;
* design a model for representing the UI and managing local events;&lt;br /&gt;
* extend the model for handling remote events;&lt;br /&gt;
* design means of mapping KWWidgets onto that model;&lt;br /&gt;
* set priorities with Kitware involving extensions &amp;amp; modifications to KWWidgets;&lt;br /&gt;
* determine the api to application logic, used by GUI and by scripts;&lt;br /&gt;
* design set of base classes that give module developers an easy pattern to follow;&lt;br /&gt;
* develop guidelines for slicer base developers and module developers;&lt;br /&gt;
* design mechanism for centrally specifying look &amp;amp; feel (and permitting overrides);&lt;br /&gt;
&lt;br /&gt;
=== [[Slicer3:UIDesign|UI Design &amp;amp; Prototypes]] ===&lt;br /&gt;
&lt;br /&gt;
Tasks: (more detailed UI Design &amp;amp; Prototype information can be found [[Slicer3:UIDesign|here ]]).&lt;br /&gt;
&lt;br /&gt;
* design overall look to Slicer3 application in keeping with core values;&lt;br /&gt;
* design look &amp;amp; feel applied to developer modules;&lt;br /&gt;
* design KWWidgets class to specify custom widgets for Slicer main app &amp;amp; modules;&lt;br /&gt;
* implement Slicer3 Application GUI&lt;br /&gt;
* design conventions for specifying global and module-specific keyboard accelerators;&lt;br /&gt;
* specify and document global keyboard accelerators;&lt;br /&gt;
* iterate on prototype(s) and present them for comments and suggestions;&lt;br /&gt;
&lt;br /&gt;
=== [[Slicer3:Usability|Usability]] ===&lt;br /&gt;
&lt;br /&gt;
Tasks: (more detailed Usability information can be found [[Slicer3:Usability|here ]]).&lt;br /&gt;
&lt;br /&gt;
* develop and publish a user-centered design practice that support usability and software consistency.&lt;br /&gt;
* use this process to design and implement main application interface, and some core functionality.&lt;br /&gt;
&lt;br /&gt;
=== [[Slicer3:Slicer3Brand|3DSlicer Brand]] ===&lt;br /&gt;
&lt;br /&gt;
Tasks: (Slicer3 brand sketches can be found[[Slicer3:Slicer3Brand| here ]]).&lt;br /&gt;
&lt;br /&gt;
* fully express new 3DSlicer brand: design logo, splash screen, style sheets for web presence;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= First steps: How to build a Slicer3 Module GUI =&lt;br /&gt;
&lt;br /&gt;
== Virtual Methods ==&lt;br /&gt;
&lt;br /&gt;
At the slicer-developers tcon 2007-02-13, we discussed some adjustments to the virtual methods in vtkSlicerModuleGUI for better consistency and utility.  The following list defines the methods that a module needs to implement so the main application (Slicer3.cxx) can operate on all modules generically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 40%; float: left; padding-right: 3%;&amp;quot;&amp;gt;&lt;br /&gt;
The following methods are defined by the vtkSlicerModuleGUI and typically won't be overriden:&lt;br /&gt;
&lt;br /&gt;
* '''Enter'''&lt;br /&gt;
** ''called when module is raised''&lt;br /&gt;
** ''calls CreateGUI if needed (instance variable tracks create state)''&lt;br /&gt;
** ''calls AddGUIObservers''&lt;br /&gt;
** ''calls UpdateGUI''&lt;br /&gt;
* '''Exit'''&lt;br /&gt;
** ''called when module is replaced by another''&lt;br /&gt;
** ''calls RemoveMRMLObservers''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 40%; float: left; padding-right: 3%;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods should be defined by the Module to implement the specific behavior:&lt;br /&gt;
&lt;br /&gt;
* '''CreateGUI'''&lt;br /&gt;
** ''instances and packs widgets''&lt;br /&gt;
* '''DestroyGUI'''&lt;br /&gt;
** ''typically called only by destructor''&lt;br /&gt;
** ''breaks any reference cycles''&lt;br /&gt;
** ''Deletes widgets''&lt;br /&gt;
* '''ProcessGUIEvents'''&lt;br /&gt;
** ''responds to events from widgets or slicer GUI classes''&lt;br /&gt;
** ''propagates data from GUI into MRML nodes''&lt;br /&gt;
* '''ProcessMRMLEvents'''&lt;br /&gt;
** ''responds to updates to MRML nodes''&lt;br /&gt;
** ''propagates data from MRML to widgets''&lt;br /&gt;
* '''AddGUIObservers'''&lt;br /&gt;
** ''set observers on widgets and GUI classes (use GUICallbackCommand local instance -- it will call ProcessGUIEvents)''&lt;br /&gt;
* '''AddMRMLObservers'''&lt;br /&gt;
** ''set observers on MRML nodes and scene (use MRMLCallbackCommand local instance -- it will call ProcessMRMLEvents)''&lt;br /&gt;
* '''RemoveGUIObservers'''&lt;br /&gt;
* '''RemoveMRMLObservers'''&lt;br /&gt;
* '''UpdateGUI'''&lt;br /&gt;
** ''copy state from MRML nodes to GUI/Widgets''&lt;br /&gt;
** ''if needed for efficiency, check the MTime for the MRML Node and the corresponding GUI and only update if needed (e.g. for a MultiColumnList or other widget the holds a lot of data)'' &lt;br /&gt;
* '''UpdateMRML'''&lt;br /&gt;
** ''copy state from GUI/Widgets to MRML''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
'''NOTE: this description will change due to current ongoing changes to the module GUI base classes.'''&lt;br /&gt;
The figure below shows a current overview of the three classes a new module (called MyModule for example) will need to define (vtkSlicerMyModuleGUI, vtkSlicerMyModuleLogic and vtkMRMLMyModuleNode) and some of the methods those classes should include to utilize the Slicer3 infrastructure. These classes should reside in the slicer3/Modules/MyModule/ directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Slicer3MyModule.png|[[Image:Slicer3MyModule.png| Base classes for GUI, Logic and MRML ]]]]&lt;br /&gt;
&lt;br /&gt;
'''Deriving your GUI class:''' To create a Module GUI that expresses its interface in Slicer's shared UIpanel, derive your class (vtkSlicerMyModuleGUI) from vtkSlicerModuleGUI. For a Module GUI that expresses its interface in a different panel of the Main Slicer Window, or in a toplevel widget, derive vtkSlicerMyModuleGUI from vtkSlicerComponentGUI instead. Your GUI class will inherit application logic and MRML pointers, an API for setting and observing them, and a framework for defining MRML, Logic and GUI callbacks from its parent class. Specific mediator methods, other logic and MRML node pointers can be added to the module's class definition. Importantly, keep logic and MRML classes independent of the GUI to facilitate testing and command-line execution possible *without* instantiating the Slicer3 GUI.&lt;br /&gt;
&lt;br /&gt;
'''Example:''' An early example to work from is the GradientAnisotropicDiffusionFilter Module; define all the widgets you need within the class and create Get Macros for each of them. Define the methods you need from vtkSlicerModuleGUI and its parent class vtkSlicerComponentGUI, including BuildGUI(); in this method, you'll first add a page to the class's UIPanel (for now, only create one page).&lt;br /&gt;
&lt;br /&gt;
=== Two GUI styles ===&lt;br /&gt;
'''Two styles:''' Depending on whether you want a notebook-style GUI for your module (similar to the style used in Slicer2) or a set of stacked collapsible frames to contain different logical sections of your interface like &amp;quot;help&amp;quot; and &amp;quot;display&amp;quot;, your BuildGUI() method can be written in one of two ways. The '''notebook style''' may be appropriate for modules with long logical sections within their GUI, to minimize the amount of scrolling required of a user. The '''collapsing style''' may be appropriate for modules that have numerous logical sections, since the amount of horizontal space across which a notebook would array them is limited. The way these two styles are expressed in Slicer3's GUI panel is shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:S3ModuleStyles.png]]&lt;br /&gt;
&lt;br /&gt;
'''''Collapsing style:''''' The GradientAnisotropicDiffusionFilter Module example implements the collapsible style, first adding a single new Page in its UIPanel:&lt;br /&gt;
&lt;br /&gt;
  this-&amp;gt;UIPanel-&amp;gt;AddPage ( &amp;quot;MyModule&amp;quot;, &amp;quot;MyModule&amp;quot;, NULL );&lt;br /&gt;
&lt;br /&gt;
then creating a vtkSlicerModuleCollapsibleFrame widget for each logical section in the GUI, parenting each to the UIPanel's single PageWidget, then creating, configuring and packing them from top to bottom in the UIPanel's PageWidget. Each logical section's widgets can be organized inside each of the vtkSlicerModuleCollapsibleFrames. The superclass has some helper methods to construct consisten Help&amp;amp;About Frames across modules.&lt;br /&gt;
&lt;br /&gt;
  //--- help and about frame&lt;br /&gt;
  const char *help = &amp;quot;MyModule does the following...&amp;quot;;&lt;br /&gt;
  const char *about = &amp;quot;This work was supported by...&amp;quot;;&lt;br /&gt;
  vtkKWWidget *page = this-&amp;gt;UIPanel-&amp;gt;GetPageWidget (&amp;quot;MyModule&amp;quot;);&lt;br /&gt;
  this-&amp;gt;BuildHelpAndAboutFrame ( page, help, about );&lt;br /&gt;
&lt;br /&gt;
  //--- rest of the frames&lt;br /&gt;
  vtkSlicerModuleCollapsibleFrame *firstFrame = vtkSlicerModuleCollapsibleFrame::New ( );&lt;br /&gt;
  vtkSlicerModuleCollapsibleFrame *secondFrame = vtkSlicerModuleCollapsibleFrame::New ( );&lt;br /&gt;
  vtkSlicerModuleCollapsibleFrame *thirdFrame = vtkSlicerModuleCollapsibleFrame::New ( );&lt;br /&gt;
  vtkSlicerModuleCollapsibleFrame *forthFrame = vtkSlicerModuleCollapsibleFrame::New ( );&lt;br /&gt;
  ...&lt;br /&gt;
  //--- parenting the frames to the same UIpanel page&lt;br /&gt;
  firstFrame-&amp;gt;SetParent ( page );&lt;br /&gt;
  secondFrame-&amp;gt;SetParent ( page );&lt;br /&gt;
  ...&lt;br /&gt;
  //--- parenting widgets to the various frames&lt;br /&gt;
  this-&amp;gt;widget2-&amp;gt;SetParent ( firstFrame-&amp;gt;GetFrame () );&lt;br /&gt;
  this-&amp;gt;widget3-&amp;gt;SetParent ( secondFrame-&amp;gt;GetFrame () );&lt;br /&gt;
&lt;br /&gt;
'''''Notebook style:''''' To create a notebook style GUI (as there is no example yet, a little code will be included here), a new Page must be added to the UIPanel for every tab in the notebook:&lt;br /&gt;
&lt;br /&gt;
  //--- get a pointer to the KWUserInterfaceManagerNotebook&lt;br /&gt;
  vtkKWUserInterfaceManagerNotebook *nbm = vtkKWUserInterfaceManagerNotebook::SafeDownCast ( this-&amp;gt;UIPanel-&amp;gt;GetUserInterfaceManager());&lt;br /&gt;
  //--- help and about frame&lt;br /&gt;
  this-&amp;gt;UIPanel-&amp;gt;AddPage ( &amp;quot;Help&amp;amp;About&amp;quot;, &amp;quot;Information about using this module&amp;quot;, NULL );&lt;br /&gt;
  const char *help = &amp;quot;MyModule does the following...&amp;quot;;&lt;br /&gt;
  const char *about = &amp;quot;This work was supported by...&amp;quot;;&lt;br /&gt;
  vtkKWWidget *page = this-&amp;gt;UIPanel-&amp;gt;GetPageWidget (&amp;quot;Help&amp;quot;);&lt;br /&gt;
  this-&amp;gt;BuildHelpAndAboutFrame ( page, help, about );&lt;br /&gt;
&lt;br /&gt;
  //--- pages for other frames&lt;br /&gt;
  int page1ID = this-&amp;gt;UIPanel-&amp;gt;AddPage ( &amp;quot;First&amp;quot;, &amp;quot;Functionality for some logical piece of module&amp;quot;, NULL );&lt;br /&gt;
  int page2ID = this-&amp;gt;UIPanel-&amp;gt;AddPage ( &amp;quot;Second&amp;quot;, &amp;quot;Functionality for another logical piece of module&amp;quot;, NULL );&lt;br /&gt;
&lt;br /&gt;
  //--- enabling or disabling notebook tabs&lt;br /&gt;
  nbm-&amp;gt;GetNotebook()-&amp;gt;SetPageEnabled ( page1ID, 1 );&lt;br /&gt;
  nbm-&amp;gt;GetNotebook()-&amp;gt;SetPageEnabled ( page2ID, 0 );&lt;br /&gt;
&lt;br /&gt;
Widgets to be packed within each notebook page are parented to the PageWidget:&lt;br /&gt;
&lt;br /&gt;
  this-&amp;gt;widget2-&amp;gt;SetParent ( this-&amp;gt;UIPanel-&amp;gt;GetPageWidget ( &amp;quot;First&amp;quot; ) );&lt;br /&gt;
  this-&amp;gt;widget3-&amp;gt;SetParent ( this-&amp;gt;UIPanel-&amp;gt;GetPageWidget ( &amp;quot;Second&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
or can be parented to a widget already parented to the PageWidget. Then they themselves can be created, configured, and packed in the same manner as they are in the GradientAnisotropicDiffusionFilter Module.&lt;br /&gt;
&lt;br /&gt;
=== Defining methods ===&lt;br /&gt;
'''Methods to define:''' Define the methods you require from vtkSlicerComponentGUI base class, like: AddGUIObservers(), RemoveGUIObservers(), ProcessLogicEvents(), ProcessGUIEevents(), ProcessMRMLEvents(), Enter() and Exit(); and whatever else your module needs. (Eventually, available modules will be automatically detected, but this is not yet implemented; then, the Enter() method will probably be made to call the BuildGUI() method. For now, instantiate your class in Slicer3.cxx and call its BuildGUI() and other methods, following the pattern for other modules established there.)&lt;br /&gt;
&lt;br /&gt;
=== Adding and removing observers ===&lt;br /&gt;
'''Adding observers:''' In AddGUIObservers, add an observer on each widget whose events you want to process. When an event is observed, the ProcessGUIEvents() method is called via the GUICallbackCommand; define this class to propagate information from the GUI to logic and MRML. Though it is tempting, try not to use ProcessGUIEvents() to update the GUI state directly -- just modify the Logic state, and allow observers on the logic and subsequent processing in ProcessLogicEvents() and ProcessMRMLEvents() to bring that state change BACK into the GUI.&lt;br /&gt;
&lt;br /&gt;
'''Removing observers:''' In RemoveGUIObservers, make sure you remove every observer you've added to widgets in the GUI before calling Delete() on your widget. Make sure you call SetAndObserveMRML() and SetAndObserveLogic( ) with NULL pointers in your GUI class destructor to remove all observers on MRML and Logic that you have created.&lt;br /&gt;
&lt;br /&gt;
=== Adding and removing references ===&lt;br /&gt;
For convenience, you may want to define pointers to Slicer's MainViewer, or to the SliceViewers, etc. Before Delete() can be called on anything you are referencing, you'll need to release the references. (Failure to release references can result in vtkDebugLeak reports on Application exit). The virtual method TearDownGUI() (inherited from vtkSlicerComponentGUI) can be defined for this purpose. References may be released in this method, and you can also use this method to call RemoveGUIObservers() if you don't want to explicitly call that method.&lt;br /&gt;
&lt;br /&gt;
=== Defining new widgets ===&lt;br /&gt;
'''Defining your own widgets:''' The framework for doing this is still evolving. Currently there are two types of new widgets, those defined as extensions to vtkKW (like vtkKWWindowLevelThresholdEditor.h/cxx) and those defined as Slicer-specific widgets, (like vtkSlicerSliceControlWidget.h/cxx, derived from the vtkSlicerWidget.h/cxx base class). The Slicer widgets have methods for putting observers on their widget components, Logic and MRML, and processing events as well. Thus GUI classes that instance them do not have to manage events for them if the widgets' methods are used instead.&lt;br /&gt;
&lt;br /&gt;
=== Using Undo and Redo ===&lt;br /&gt;
'''Undo:''' Make sure you process those events that mark junctures at which MRML state should be saved for Undo/Redo (using MRML's SaveStateForUndo() method. For instance, when an entry widget's value has changed, before changing a parameter in the appropriate MRML node, make a call to the MRMLScene's SaveStateForUndo() method with that node as a parameter. Save MRML state at reasonable junctures: for instance, for scale widgets, save MRML state when the scale starts changing, rather than continuously as the scale changes. For an example of they way SaveStateForUndo() is called, see slicer3/Base/GUI/vtkSlicerSliceControllerWidget.cxx. A detailed description of how undo/redo works, and how to use it in your module is available [[Slicer3:Data_Model#Undo.2FRedo_Mechanism | here]].&lt;br /&gt;
&lt;br /&gt;
=== Adding the module to the rest of Slicer3 ===&lt;br /&gt;
'''Other files you will have to touch:''' For now, to add your module to Slicer3, create a new instance of vtkSlicerMyModuleLogic and vtkSlicerMyModuleGUI in Applications/GUI/Slicer3.cxx, and follow the pattern used by the GradientAnisotropicDiffusionFilter module for now, until the framework is developed for Slicer3 to autodetect your module and do the right things. Then:&lt;br /&gt;
&lt;br /&gt;
* create your own CMakeLists.txt file and your own vtkMyModuleWin32Header.h file following the pattern set by other Modules.&lt;br /&gt;
* add your module SUBDIR to the CMakeLists.txt file in the Slicer3/Modules directory above.&lt;br /&gt;
* to add your module to Slicer3, create a new instance of vtkSlicerMyModuleLogic and vtkSlicerMyModuleGUI in Slicer3/Applications/GUI/Slicer3.cxx, and follow the pattern used by other modules, like the GradientAnisotropicDiffusionFilter module.&lt;br /&gt;
* include relevant .h files in Slicer3/Applications/GUI/Slicer3.cxx, and&lt;br /&gt;
* specify your module's source and binary Include directories in Slicer3/Application/GUI/CMakeLists.txt&lt;br /&gt;
* and include your module in the CMakeLists.txt target link libraries&lt;br /&gt;
&lt;br /&gt;
===Add a module-switch in CMake===&lt;br /&gt;
You can add an automatic on/off switch to the ccmake configuration GUI, which will make compilation and development for the user easier.&lt;br /&gt;
To do this add the following to two CMakeLists.txt und the Slicer3.cxx files:&lt;br /&gt;
&lt;br /&gt;
* add the following lines to your Slicer3/Module/MyModule/CMakeLists.txt&lt;br /&gt;
 PROJECT(MyModule)&lt;br /&gt;
 &lt;br /&gt;
 OPTION(MYMODULE &amp;quot;Do you want to build the MyModule?&amp;quot;)&lt;br /&gt;
 IF(MYMODULE)&lt;br /&gt;
 ... (Rest of the file)&lt;br /&gt;
 ENDIF(MYMODULE)&lt;br /&gt;
&lt;br /&gt;
* after this you have MYMODULE as a variable which says if your module is build or not&lt;br /&gt;
* but we want also to exclude the module library and our source in the Slicer3.cxx file if the module is not build&lt;br /&gt;
* in /Slicer3/Applications/GUI/CMakeLists.txt add the following directly above TARGET_LINK_LIBRARIES(...&lt;br /&gt;
 IF(MYMODULE)&lt;br /&gt;
  SET(MYMODULE_LINK_LIB MyModule)&lt;br /&gt;
 ELSE(MYMODULE)&lt;br /&gt;
  ADD_DEFINITIONS(-DMYMODULE_DEBUG)&lt;br /&gt;
 ENDIF(MYMODULE)&lt;br /&gt;
* then add to the TARGET_LINK_LIBRARIES(...${MYMODULE_LINK_LIB}) instead of your previous entry&lt;br /&gt;
* the ''ADD_DEFINITIONS'' declaration adds a preprocessor symbol to the compile which we use to exclude our code from the /Slicer3/Applications/GUI/Slicer3.cxx&lt;br /&gt;
* just border your code in /Slicer3/Applications/GUI/Slicer3.cxx with the following:&lt;br /&gt;
 #ifndef MYMODULE_DEBUG&lt;br /&gt;
 ...(your code/includes)&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
'''Helpful tips:'''&lt;br /&gt;
* Make the vtkModuleCollapsibleFrames which contain the major logical sections of your module members of your module GUI class and expose them through your API. Doing so helps other developers, who may want to offer a jump to your module's functionality, to programmatically raise your UIpanel and expand the frame they're interested in. This paradigm will help to promote fluid navigation of slicer's interface and the reuse of existing functionality.&lt;br /&gt;
&lt;br /&gt;
= Human Interface and Style Guide for Developers (STILL UNDER DEVELOPMENT) =&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
These following sections (work in progress) describe how to create 3DSlicer modules that conform to the application's look and feel and behave in a manner consistent with the rest of 3DSlicer. Provided is  information on basic interface elements, advice on the effective GUI construction with the available widget set, and some recommended design principles that will help your module integrate well with the rest of 3DSlicer. These guidelines are also intended to enhance 3DSlicer's usability. Following the simple design philosophy outlined here will support the following important goals: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Users will learn to use your module faster, because interface elements will look and behave in an expected manner across the application.&lt;br /&gt;
* Your module will have a nice look &amp;amp; feel that fits within the 3DSlicer environment.&lt;br /&gt;
* Your module will be accessible to users at all levels (novice, intermediate and expert).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Look and Feel ===&lt;br /&gt;
&lt;br /&gt;
'''GUI Style:''' Try not to add style elements (like foreground and background color, font, relief, etc.) to the interface you create; let the options database (as set up by the vtkSlicerTheme class) specify the style for the widgets in your module so that all modules appear consistent within the Slicer3 application.&lt;br /&gt;
&lt;br /&gt;
=== Module style ===&lt;br /&gt;
&lt;br /&gt;
=== Pop-up windows ===&lt;br /&gt;
&lt;br /&gt;
=== Confirm on Delete ===&lt;br /&gt;
&lt;br /&gt;
Check vtkSlicerApplication::ConfirmDelete setting; if a user has requested to be presented with a confirm on delete, then give them that option.&lt;br /&gt;
&lt;br /&gt;
=== [[Event Bindings]] ===&lt;br /&gt;
&lt;br /&gt;
With respect to the specification of keyboard accelerators, please follow these three recommendations;&lt;br /&gt;
&lt;br /&gt;
* Before assigning &amp;quot;hot-keys&amp;quot; to functionality, either in the main Slicer application or in a new module, please consult the table (and design plan) linked below to make sure the key is not already assigned.&lt;br /&gt;
* Across Slicer modules, try to use similar &amp;quot;hot-key&amp;quot; assignments for similar functionality; this consistency makes Slicer easier to learn.&lt;br /&gt;
* Once you assign &amp;quot;hot-keys&amp;quot; in your module, please add those mappings to the table for others to reference.&lt;br /&gt;
&lt;br /&gt;
=== Application Font ===&lt;br /&gt;
Verdana is the font chosen for the 3DSlicer brand. &lt;br /&gt;
&lt;br /&gt;
Maintaining consistency of type is an important component of maintaining a coherent look and feel for 3DSlicer and any related or derived visual communications. Verdana was designed specifically to be read on a digital display; it is recommended that we use Verdana (or Geneva) wherever possible in 3DSlicer's web presence and online tutorial materials, and wherever reasonable and appropriate in formal printed materials. &lt;br /&gt;
&lt;br /&gt;
Within the software, since it can't be guaranteed that these fonts will be widely available on all platforms, Helvetica or Arial should be used as a substitute. Slicer's theme sets the application font to be Helvetica 8 normal. Please avoid typefaces with serifs.&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
&lt;br /&gt;
Icons can be a powerful way to represent complicated information within a small footprint on the GUI panel. They associate a visual image with data, state, or a particular operation.&lt;br /&gt;
&lt;br /&gt;
* They should be easy to parse, convey a strong metaphor, and not require significant time for a user to interpret.&lt;br /&gt;
* They should be memorable so that a user can recognize them quickly in future sessions with your module.&lt;br /&gt;
* If an icon already exists within 3DSlicer to represent the data, state or operation you want to indicate, then re-use that icon (indicate visibility with the open/shutting eye, for example.)&lt;br /&gt;
* Note: if the concept is too difficult to represent with a picture, then a text label can always be used instead!&lt;br /&gt;
&lt;br /&gt;
When designing icons, do bear in mind that it's possible to offend users with images that have cultural or polictal connotations. Even colors can have connotations for users in different parts of the world that may be surprising and unintended for the designer and developer. Generally speaking, it's useful to avoid images that contain:&lt;br /&gt;
&lt;br /&gt;
* icons that depict only hands or feet&lt;br /&gt;
* images of animals&lt;br /&gt;
* maps containing disputed boundaries or region names.&lt;br /&gt;
* lists of countries that are not in alphabetical order.&lt;br /&gt;
* pictures of flags&lt;br /&gt;
* pictures of money&lt;br /&gt;
&lt;br /&gt;
====Slicer icon conventions====&lt;br /&gt;
3DSlicer icons should all be of dimension 21x21 pixels.&lt;br /&gt;
&lt;br /&gt;
'''Enabled''' or '''Enabled + Selected''' icons should have:&lt;br /&gt;
&lt;br /&gt;
* a white background (r=255, g=255, b=255, or #FF FF FF)&lt;br /&gt;
* a black hairline along the perimeter (r=0,g=0,b=0, or #00 00 00). &lt;br /&gt;
&lt;br /&gt;
'''Disabled''' or '''Enabled + Deselected''' icons should have:&lt;br /&gt;
* a grey background, value (r=230, g=230, b=230, or hex value #E6 E6 E6) &lt;br /&gt;
* a grey hairline perimeter of value (r=178, g=178, b=178, hex value #B2 B2 B2).&lt;br /&gt;
&lt;br /&gt;
====Downloadable blank icons:====&lt;br /&gt;
These icon blanks are provided for download and use:&lt;br /&gt;
&lt;br /&gt;
* Enabled or Enabled+Selected: [[image:IconBlank.png | conventional Slicer icon ]] &lt;br /&gt;
* Disabled or Enabled+Deselected: [[image:IconBlankLow.png | &amp;quot;deselected&amp;quot; Slicer icon]]&lt;br /&gt;
* Enabled Menubutton: [[image:MenuButtonIconBlank.png | conventional Slicer menubutton icon]]&lt;br /&gt;
* Disabled Menubutton: [[image:MenuButtonIconBlankDisabled.png | &amp;quot;disabled&amp;quot; Slicer menubutton icon]]&lt;br /&gt;
&lt;br /&gt;
====Icons currently used in Slicer's Base====&lt;br /&gt;
Below is a figure of icons currently in use in 3DSlicer. If the icon you need is already used in Slicer, we encourage its re-use in your own module (the visibility icon is a good example). However, if an icon is re-used, make sure you are using it to convey the same meaning/function -- icons shouldn't have different meanings in different places. Finally, make sure any new icons designed for a module don't duplicate ones already in use elsewhere in Slicer. &lt;br /&gt;
&lt;br /&gt;
[[Image:SlicerToolbarIcons2.png | Slicer icons ]]&lt;br /&gt;
&lt;br /&gt;
=== Widget-specific patterns to follow ===&lt;br /&gt;
&lt;br /&gt;
=== Providing help ===&lt;br /&gt;
&lt;br /&gt;
=== Popup messages (dialog, warning, error, confirm, etc.) ===&lt;br /&gt;
&lt;br /&gt;
=== Language ===&lt;br /&gt;
&lt;br /&gt;
=== Credit and Logos ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Controls and Layout ===&lt;br /&gt;
&lt;br /&gt;
=== Progress Feedback ===&lt;br /&gt;
&lt;br /&gt;
=== Colors: application palette ===&lt;br /&gt;
&lt;br /&gt;
The draft slicer color palette is shown below (this palette will still evolve as the UI design evolves -- in particular to accommodate colors used in the final Slicer3 logo). Developers of code, web content and training materials are encouraged to make color choices for GUI components according to this palette, bearing in mind that some of the colors are linked with special meaning, such as error (red), warning (bright yellow), and system (mediumBlue) messages, and unsaved data in drop-down menus and selection boxes (warmMediumGrey).&lt;br /&gt;
&lt;br /&gt;
[[Image:Slicer3Palette.jpg|[[Image:Slicer3Palette.jpg| Slicer GUI color palette (not applicable to visualization)]]]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#ffffff&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! color&lt;br /&gt;
! R&lt;br /&gt;
! G&lt;br /&gt;
! B&lt;br /&gt;
! hex&lt;br /&gt;
! use in slicer&lt;br /&gt;
|-&lt;br /&gt;
| black&lt;br /&gt;
| bgcolor=&amp;quot;#000000&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0&lt;br /&gt;
| #000000&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| white&lt;br /&gt;
| bgcolor=&amp;quot;#ffffff&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 255&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 255&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 255&lt;br /&gt;
| #ffffff&lt;br /&gt;
| GUI background&lt;br /&gt;
|-&lt;br /&gt;
| darkWarmGrey&lt;br /&gt;
| bgcolor=&amp;quot;#605e53&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 96&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 94&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 83&lt;br /&gt;
| #605e53&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mediumWarmGrey&lt;br /&gt;
| bgcolor=&amp;quot;#8b8878&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 139&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 136&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 120&lt;br /&gt;
| #8b8878&lt;br /&gt;
| unsaved data ?&lt;br /&gt;
|-&lt;br /&gt;
| lightWarmGrey&lt;br /&gt;
| bgcolor=&amp;quot;#cdc8b1&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 205&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 200&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 177&lt;br /&gt;
| #cdc8b1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| warmGreyTint&lt;br /&gt;
| bgcolor=&amp;quot;#eee8dc&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 238&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 232&lt;br /&gt;
| 220&lt;br /&gt;
| #eee8dc&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| darkOrange&lt;br /&gt;
| bgcolor=&amp;quot;#c44a1a&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 196&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 74&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 26&lt;br /&gt;
| #c44a1a&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| brightOrange&lt;br /&gt;
| bgcolor=&amp;quot;#e06f13&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 224&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 111&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 19&lt;br /&gt;
| #e06f13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| brightYellow&lt;br /&gt;
| bgcolor=&amp;quot;#e7d13e&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 231&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 209&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 62&lt;br /&gt;
| #e7d13e&lt;br /&gt;
| warning message code&lt;br /&gt;
|-&lt;br /&gt;
| yellowTint&lt;br /&gt;
| bgcolor=&amp;quot;#eed680&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 238&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 214&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 128&lt;br /&gt;
| #eed680&lt;br /&gt;
| sag slice&lt;br /&gt;
|-&lt;br /&gt;
| darkCocoa&lt;br /&gt;
| bgcolor=&amp;quot;#826647&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 130&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 102&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 71&lt;br /&gt;
| #826647&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lightCocoa&lt;br /&gt;
| bgcolor=&amp;quot;#b39169&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 179&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 145&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 105&lt;br /&gt;
| #b39169&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| stone&lt;br /&gt;
| bgcolor=&amp;quot;#e0c39e&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 224&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 195&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 158&lt;br /&gt;
| #e0c39e&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| stoneTint&lt;br /&gt;
| bgcolor=&amp;quot;#efe0cd&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 239&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 224&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 205&lt;br /&gt;
| #efe0cd&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| red&lt;br /&gt;
| bgcolor=&amp;quot;#c32e10&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 195&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 46&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 15&lt;br /&gt;
| #c32e10&lt;br /&gt;
| error message code&lt;br /&gt;
|-&lt;br /&gt;
| brick&lt;br /&gt;
| bgcolor=&amp;quot;#ba462b&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 186&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 70&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 43&lt;br /&gt;
| #ba462b&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lightBrick&lt;br /&gt;
| bgcolor=&amp;quot;#c17350&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 193&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 115&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 80&lt;br /&gt;
| #c17350&lt;br /&gt;
| axi slice&lt;br /&gt;
|-&lt;br /&gt;
| redTint&lt;br /&gt;
| bgcolor=&amp;quot;#e0b6af&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 224&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 182&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 175&lt;br /&gt;
| #e0b6af&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| darkGreen&lt;br /&gt;
| bgcolor=&amp;quot;#445632&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 68&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 86&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 50&lt;br /&gt;
| #445632&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| brightGreen&lt;br /&gt;
| bgcolor=&amp;quot;#688f42&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 104&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 143&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 66&lt;br /&gt;
| #688f42&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| dustyGreen&lt;br /&gt;
| bgcolor=&amp;quot;#8aa56f&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 138&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 165&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 111&lt;br /&gt;
| #8aa56f&lt;br /&gt;
| cor slice&lt;br /&gt;
|-&lt;br /&gt;
| greenTint&lt;br /&gt;
| bgcolor=&amp;quot;#ccf4a6&amp;quot; |&lt;br /&gt;
| 204&lt;br /&gt;
| 244&lt;br /&gt;
| 166&lt;br /&gt;
| #ccf4a6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| darkBlue&lt;br /&gt;
| bgcolor=&amp;quot;#494066&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 73&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 64&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 102&lt;br /&gt;
| #494066&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mediumBlue&lt;br /&gt;
| bgcolor=&amp;quot;#625b81&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 98&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 91&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 129&lt;br /&gt;
| #625b81&lt;br /&gt;
| system message code&lt;br /&gt;
|-&lt;br /&gt;
| lightBlue&lt;br /&gt;
| bgcolor=&amp;quot;#887fa3&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 136&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 127&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 163&lt;br /&gt;
| #887fa3&lt;br /&gt;
| unsaved data?&lt;br /&gt;
|-&lt;br /&gt;
| slicerBlue&lt;br /&gt;
| bgcolor=&amp;quot;#b3b3e6&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 179&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 179&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 230&lt;br /&gt;
| #b3b3e6&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Feature Requests, Resource Requests and Emerging Conventions =&lt;br /&gt;
&lt;br /&gt;
We are collecting '''[[Slicer3:FeatureRequests|feature, conventions and resource requests]]''' from users and developers. Appropriate entries from [http://www.na-mic.org/Bug Slicer2's bug tracker] will be periodically added to this repository also.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Working questions =&lt;br /&gt;
&lt;br /&gt;
* Getting correct render window size information from vtkKWRenderWidget (answer: yes, vtkKWRenderWidget::GetWidth() is actually its superclass' vtkKWFrame::GetWidth(), which is misleading, it's more a &amp;quot;requested width&amp;quot; kind of option. What you did by calling Tk is OK).&lt;br /&gt;
* First pack/unpack of Nav/Zoom widget interacting with scrollbar, making display flash (answer: fixed, update KWWidgets, in vtkSlicerViewControlGUI::PackZoom/NavWidget replace &amp;quot;-fill x -fill y&amp;quot; by &amp;quot;-fill none&amp;quot; if it is still flashing)&lt;br /&gt;
* Registry and window size (answer: investigating)&lt;br /&gt;
* Progress feedback (answer: vtkKWWindowBase::GetProgressGauge()::SetValue())&lt;br /&gt;
* Using registry (what application and module state is reasonable to save?) (answer: I would recommend: the last selected module, the collapsed state of &amp;quot;Manipulate Slice Views&amp;quot;, &amp;quot;Manipulate 3D View&amp;quot;, the layout (i.e. 1 over 3, or 2x2,etc), if the slice controls are collapsed or not).&lt;br /&gt;
* In the toolbar, the indicator should be off, and we could use a different image for the selected and unselected state of a button. Sadly, doing so still seems to make the button recess/shift when it is selected (answer: investigated this one thoroughly, there is sadly no work around that, it's a Tk problem unfortunately).&lt;br /&gt;
&lt;br /&gt;
[[Slicer3:Interface_Design | Return to Slicer3 Interface Design and Usability ]]&lt;br /&gt;
&lt;br /&gt;
[[Slicer3 | Return to Slicer3 main page ]]&lt;/div&gt;</summary>
		<author><name>Klawson1</name></author>
		
	</entry>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=Slicer3:Interface_Design_and_Usability&amp;diff=11799</id>
		<title>Slicer3:Interface Design and Usability</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=Slicer3:Interface_Design_and_Usability&amp;diff=11799"/>
		<updated>2007-06-14T21:58:59Z</updated>

		<summary type="html">&lt;p&gt;Klawson1: /* Event Bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''[[Slicer3|&amp;lt;&amp;lt; Back to Slicer3 main page]]'''&lt;br /&gt;
&lt;br /&gt;
[[Slicer3:Developers |Go to Slicer3 Developer Info &amp;gt;&amp;gt; ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Project goals =&lt;br /&gt;
&lt;br /&gt;
Design and engineer Slicer3 UI. Employ a user-centered approach and establish usability guidelines.&lt;br /&gt;
&lt;br /&gt;
= Project reporting =&lt;br /&gt;
&lt;br /&gt;
The scope of this effort is sorted into four categories: Engineering, UI design, Usability and Slicer3 branding. The subtasks of each category are itemized below and specific information about each category is located on the linked pages.&lt;br /&gt;
&lt;br /&gt;
=== [[Slicer3:UIEngineering|UI Architecture &amp;amp; Engineering]] ===&lt;br /&gt;
&lt;br /&gt;
Tasks: (more detailed UI Architecture &amp;amp; Engineering information can be found [[Slicer3:UIEngineering|here]]).&lt;br /&gt;
&lt;br /&gt;
* design thin GUI layer, separate from the control logic and data model;&lt;br /&gt;
* design a model for representing the UI and managing local events;&lt;br /&gt;
* extend the model for handling remote events;&lt;br /&gt;
* design means of mapping KWWidgets onto that model;&lt;br /&gt;
* set priorities with Kitware involving extensions &amp;amp; modifications to KWWidgets;&lt;br /&gt;
* determine the api to application logic, used by GUI and by scripts;&lt;br /&gt;
* design set of base classes that give module developers an easy pattern to follow;&lt;br /&gt;
* develop guidelines for slicer base developers and module developers;&lt;br /&gt;
* design mechanism for centrally specifying look &amp;amp; feel (and permitting overrides);&lt;br /&gt;
&lt;br /&gt;
=== [[Slicer3:UIDesign|UI Design &amp;amp; Prototypes]] ===&lt;br /&gt;
&lt;br /&gt;
Tasks: (more detailed UI Design &amp;amp; Prototype information can be found [[Slicer3:UIDesign|here ]]).&lt;br /&gt;
&lt;br /&gt;
* design overall look to Slicer3 application in keeping with core values;&lt;br /&gt;
* design look &amp;amp; feel applied to developer modules;&lt;br /&gt;
* design KWWidgets class to specify custom widgets for Slicer main app &amp;amp; modules;&lt;br /&gt;
* implement Slicer3 Application GUI&lt;br /&gt;
* design conventions for specifying global and module-specific keyboard accelerators;&lt;br /&gt;
* specify and document global keyboard accelerators;&lt;br /&gt;
* iterate on prototype(s) and present them for comments and suggestions;&lt;br /&gt;
&lt;br /&gt;
=== [[Slicer3:Usability|Usability]] ===&lt;br /&gt;
&lt;br /&gt;
Tasks: (more detailed Usability information can be found [[Slicer3:Usability|here ]]).&lt;br /&gt;
&lt;br /&gt;
* develop and publish a user-centered design practice that support usability and software consistency.&lt;br /&gt;
* use this process to design and implement main application interface, and some core functionality.&lt;br /&gt;
&lt;br /&gt;
=== [[Slicer3:Slicer3Brand|3DSlicer Brand]] ===&lt;br /&gt;
&lt;br /&gt;
Tasks: (Slicer3 brand sketches can be found[[Slicer3:Slicer3Brand| here ]]).&lt;br /&gt;
&lt;br /&gt;
* fully express new 3DSlicer brand: design logo, splash screen, style sheets for web presence;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= First steps: How to build a Slicer3 Module GUI =&lt;br /&gt;
&lt;br /&gt;
== Virtual Methods ==&lt;br /&gt;
&lt;br /&gt;
At the slicer-developers tcon 2007-02-13, we discussed some adjustments to the virtual methods in vtkSlicerModuleGUI for better consistency and utility.  The following list defines the methods that a module needs to implement so the main application (Slicer3.cxx) can operate on all modules generically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 40%; float: left; padding-right: 3%;&amp;quot;&amp;gt;&lt;br /&gt;
The following methods are defined by the vtkSlicerModuleGUI and typically won't be overriden:&lt;br /&gt;
&lt;br /&gt;
* '''Enter'''&lt;br /&gt;
** ''called when module is raised''&lt;br /&gt;
** ''calls CreateGUI if needed (instance variable tracks create state)''&lt;br /&gt;
** ''calls AddGUIObservers''&lt;br /&gt;
** ''calls UpdateGUI''&lt;br /&gt;
* '''Exit'''&lt;br /&gt;
** ''called when module is replaced by another''&lt;br /&gt;
** ''calls RemoveMRMLObservers''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;width: 40%; float: left; padding-right: 3%;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods should be defined by the Module to implement the specific behavior:&lt;br /&gt;
&lt;br /&gt;
* '''CreateGUI'''&lt;br /&gt;
** ''instances and packs widgets''&lt;br /&gt;
* '''DestroyGUI'''&lt;br /&gt;
** ''typically called only by destructor''&lt;br /&gt;
** ''breaks any reference cycles''&lt;br /&gt;
** ''Deletes widgets''&lt;br /&gt;
* '''ProcessGUIEvents'''&lt;br /&gt;
** ''responds to events from widgets or slicer GUI classes''&lt;br /&gt;
** ''propagates data from GUI into MRML nodes''&lt;br /&gt;
* '''ProcessMRMLEvents'''&lt;br /&gt;
** ''responds to updates to MRML nodes''&lt;br /&gt;
** ''propagates data from MRML to widgets''&lt;br /&gt;
* '''AddGUIObservers'''&lt;br /&gt;
** ''set observers on widgets and GUI classes (use GUICallbackCommand local instance -- it will call ProcessGUIEvents)''&lt;br /&gt;
* '''AddMRMLObservers'''&lt;br /&gt;
** ''set observers on MRML nodes and scene (use MRMLCallbackCommand local instance -- it will call ProcessMRMLEvents)''&lt;br /&gt;
* '''RemoveGUIObservers'''&lt;br /&gt;
* '''RemoveMRMLObservers'''&lt;br /&gt;
* '''UpdateGUI'''&lt;br /&gt;
** ''copy state from MRML nodes to GUI/Widgets''&lt;br /&gt;
** ''if needed for efficiency, check the MTime for the MRML Node and the corresponding GUI and only update if needed (e.g. for a MultiColumnList or other widget the holds a lot of data)'' &lt;br /&gt;
* '''UpdateMRML'''&lt;br /&gt;
** ''copy state from GUI/Widgets to MRML''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
'''NOTE: this description will change due to current ongoing changes to the module GUI base classes.'''&lt;br /&gt;
The figure below shows a current overview of the three classes a new module (called MyModule for example) will need to define (vtkSlicerMyModuleGUI, vtkSlicerMyModuleLogic and vtkMRMLMyModuleNode) and some of the methods those classes should include to utilize the Slicer3 infrastructure. These classes should reside in the slicer3/Modules/MyModule/ directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Slicer3MyModule.png|[[Image:Slicer3MyModule.png| Base classes for GUI, Logic and MRML ]]]]&lt;br /&gt;
&lt;br /&gt;
'''Deriving your GUI class:''' To create a Module GUI that expresses its interface in Slicer's shared UIpanel, derive your class (vtkSlicerMyModuleGUI) from vtkSlicerModuleGUI. For a Module GUI that expresses its interface in a different panel of the Main Slicer Window, or in a toplevel widget, derive vtkSlicerMyModuleGUI from vtkSlicerComponentGUI instead. Your GUI class will inherit application logic and MRML pointers, an API for setting and observing them, and a framework for defining MRML, Logic and GUI callbacks from its parent class. Specific mediator methods, other logic and MRML node pointers can be added to the module's class definition. Importantly, keep logic and MRML classes independent of the GUI to facilitate testing and command-line execution possible *without* instantiating the Slicer3 GUI.&lt;br /&gt;
&lt;br /&gt;
'''Example:''' An early example to work from is the GradientAnisotropicDiffusionFilter Module; define all the widgets you need within the class and create Get Macros for each of them. Define the methods you need from vtkSlicerModuleGUI and its parent class vtkSlicerComponentGUI, including BuildGUI(); in this method, you'll first add a page to the class's UIPanel (for now, only create one page).&lt;br /&gt;
&lt;br /&gt;
=== Two GUI styles ===&lt;br /&gt;
'''Two styles:''' Depending on whether you want a notebook-style GUI for your module (similar to the style used in Slicer2) or a set of stacked collapsible frames to contain different logical sections of your interface like &amp;quot;help&amp;quot; and &amp;quot;display&amp;quot;, your BuildGUI() method can be written in one of two ways. The '''notebook style''' may be appropriate for modules with long logical sections within their GUI, to minimize the amount of scrolling required of a user. The '''collapsing style''' may be appropriate for modules that have numerous logical sections, since the amount of horizontal space across which a notebook would array them is limited. The way these two styles are expressed in Slicer3's GUI panel is shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:S3ModuleStyles.png]]&lt;br /&gt;
&lt;br /&gt;
'''''Collapsing style:''''' The GradientAnisotropicDiffusionFilter Module example implements the collapsible style, first adding a single new Page in its UIPanel:&lt;br /&gt;
&lt;br /&gt;
  this-&amp;gt;UIPanel-&amp;gt;AddPage ( &amp;quot;MyModule&amp;quot;, &amp;quot;MyModule&amp;quot;, NULL );&lt;br /&gt;
&lt;br /&gt;
then creating a vtkSlicerModuleCollapsibleFrame widget for each logical section in the GUI, parenting each to the UIPanel's single PageWidget, then creating, configuring and packing them from top to bottom in the UIPanel's PageWidget. Each logical section's widgets can be organized inside each of the vtkSlicerModuleCollapsibleFrames. The superclass has some helper methods to construct consisten Help&amp;amp;About Frames across modules.&lt;br /&gt;
&lt;br /&gt;
  //--- help and about frame&lt;br /&gt;
  const char *help = &amp;quot;MyModule does the following...&amp;quot;;&lt;br /&gt;
  const char *about = &amp;quot;This work was supported by...&amp;quot;;&lt;br /&gt;
  vtkKWWidget *page = this-&amp;gt;UIPanel-&amp;gt;GetPageWidget (&amp;quot;MyModule&amp;quot;);&lt;br /&gt;
  this-&amp;gt;BuildHelpAndAboutFrame ( page, help, about );&lt;br /&gt;
&lt;br /&gt;
  //--- rest of the frames&lt;br /&gt;
  vtkSlicerModuleCollapsibleFrame *firstFrame = vtkSlicerModuleCollapsibleFrame::New ( );&lt;br /&gt;
  vtkSlicerModuleCollapsibleFrame *secondFrame = vtkSlicerModuleCollapsibleFrame::New ( );&lt;br /&gt;
  vtkSlicerModuleCollapsibleFrame *thirdFrame = vtkSlicerModuleCollapsibleFrame::New ( );&lt;br /&gt;
  vtkSlicerModuleCollapsibleFrame *forthFrame = vtkSlicerModuleCollapsibleFrame::New ( );&lt;br /&gt;
  ...&lt;br /&gt;
  //--- parenting the frames to the same UIpanel page&lt;br /&gt;
  firstFrame-&amp;gt;SetParent ( page );&lt;br /&gt;
  secondFrame-&amp;gt;SetParent ( page );&lt;br /&gt;
  ...&lt;br /&gt;
  //--- parenting widgets to the various frames&lt;br /&gt;
  this-&amp;gt;widget2-&amp;gt;SetParent ( firstFrame-&amp;gt;GetFrame () );&lt;br /&gt;
  this-&amp;gt;widget3-&amp;gt;SetParent ( secondFrame-&amp;gt;GetFrame () );&lt;br /&gt;
&lt;br /&gt;
'''''Notebook style:''''' To create a notebook style GUI (as there is no example yet, a little code will be included here), a new Page must be added to the UIPanel for every tab in the notebook:&lt;br /&gt;
&lt;br /&gt;
  //--- get a pointer to the KWUserInterfaceManagerNotebook&lt;br /&gt;
  vtkKWUserInterfaceManagerNotebook *nbm = vtkKWUserInterfaceManagerNotebook::SafeDownCast ( this-&amp;gt;UIPanel-&amp;gt;GetUserInterfaceManager());&lt;br /&gt;
  //--- help and about frame&lt;br /&gt;
  this-&amp;gt;UIPanel-&amp;gt;AddPage ( &amp;quot;Help&amp;amp;About&amp;quot;, &amp;quot;Information about using this module&amp;quot;, NULL );&lt;br /&gt;
  const char *help = &amp;quot;MyModule does the following...&amp;quot;;&lt;br /&gt;
  const char *about = &amp;quot;This work was supported by...&amp;quot;;&lt;br /&gt;
  vtkKWWidget *page = this-&amp;gt;UIPanel-&amp;gt;GetPageWidget (&amp;quot;Help&amp;quot;);&lt;br /&gt;
  this-&amp;gt;BuildHelpAndAboutFrame ( page, help, about );&lt;br /&gt;
&lt;br /&gt;
  //--- pages for other frames&lt;br /&gt;
  int page1ID = this-&amp;gt;UIPanel-&amp;gt;AddPage ( &amp;quot;First&amp;quot;, &amp;quot;Functionality for some logical piece of module&amp;quot;, NULL );&lt;br /&gt;
  int page2ID = this-&amp;gt;UIPanel-&amp;gt;AddPage ( &amp;quot;Second&amp;quot;, &amp;quot;Functionality for another logical piece of module&amp;quot;, NULL );&lt;br /&gt;
&lt;br /&gt;
  //--- enabling or disabling notebook tabs&lt;br /&gt;
  nbm-&amp;gt;GetNotebook()-&amp;gt;SetPageEnabled ( page1ID, 1 );&lt;br /&gt;
  nbm-&amp;gt;GetNotebook()-&amp;gt;SetPageEnabled ( page2ID, 0 );&lt;br /&gt;
&lt;br /&gt;
Widgets to be packed within each notebook page are parented to the PageWidget:&lt;br /&gt;
&lt;br /&gt;
  this-&amp;gt;widget2-&amp;gt;SetParent ( this-&amp;gt;UIPanel-&amp;gt;GetPageWidget ( &amp;quot;First&amp;quot; ) );&lt;br /&gt;
  this-&amp;gt;widget3-&amp;gt;SetParent ( this-&amp;gt;UIPanel-&amp;gt;GetPageWidget ( &amp;quot;Second&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
or can be parented to a widget already parented to the PageWidget. Then they themselves can be created, configured, and packed in the same manner as they are in the GradientAnisotropicDiffusionFilter Module.&lt;br /&gt;
&lt;br /&gt;
=== Defining methods ===&lt;br /&gt;
'''Methods to define:''' Define the methods you require from vtkSlicerComponentGUI base class, like: AddGUIObservers(), RemoveGUIObservers(), ProcessLogicEvents(), ProcessGUIEevents(), ProcessMRMLEvents(), Enter() and Exit(); and whatever else your module needs. (Eventually, available modules will be automatically detected, but this is not yet implemented; then, the Enter() method will probably be made to call the BuildGUI() method. For now, instantiate your class in Slicer3.cxx and call its BuildGUI() and other methods, following the pattern for other modules established there.)&lt;br /&gt;
&lt;br /&gt;
=== Adding and removing observers ===&lt;br /&gt;
'''Adding observers:''' In AddGUIObservers, add an observer on each widget whose events you want to process. When an event is observed, the ProcessGUIEvents() method is called via the GUICallbackCommand; define this class to propagate information from the GUI to logic and MRML. Though it is tempting, try not to use ProcessGUIEvents() to update the GUI state directly -- just modify the Logic state, and allow observers on the logic and subsequent processing in ProcessLogicEvents() and ProcessMRMLEvents() to bring that state change BACK into the GUI.&lt;br /&gt;
&lt;br /&gt;
'''Removing observers:''' In RemoveGUIObservers, make sure you remove every observer you've added to widgets in the GUI before calling Delete() on your widget. Make sure you call SetAndObserveMRML() and SetAndObserveLogic( ) with NULL pointers in your GUI class destructor to remove all observers on MRML and Logic that you have created.&lt;br /&gt;
&lt;br /&gt;
=== Adding and removing references ===&lt;br /&gt;
For convenience, you may want to define pointers to Slicer's MainViewer, or to the SliceViewers, etc. Before Delete() can be called on anything you are referencing, you'll need to release the references. (Failure to release references can result in vtkDebugLeak reports on Application exit). The virtual method TearDownGUI() (inherited from vtkSlicerComponentGUI) can be defined for this purpose. References may be released in this method, and you can also use this method to call RemoveGUIObservers() if you don't want to explicitly call that method.&lt;br /&gt;
&lt;br /&gt;
=== Defining new widgets ===&lt;br /&gt;
'''Defining your own widgets:''' The framework for doing this is still evolving. Currently there are two types of new widgets, those defined as extensions to vtkKW (like vtkKWWindowLevelThresholdEditor.h/cxx) and those defined as Slicer-specific widgets, (like vtkSlicerSliceControlWidget.h/cxx, derived from the vtkSlicerWidget.h/cxx base class). The Slicer widgets have methods for putting observers on their widget components, Logic and MRML, and processing events as well. Thus GUI classes that instance them do not have to manage events for them if the widgets' methods are used instead.&lt;br /&gt;
&lt;br /&gt;
=== Using Undo and Redo ===&lt;br /&gt;
'''Undo:''' Make sure you process those events that mark junctures at which MRML state should be saved for Undo/Redo (using MRML's SaveStateForUndo() method. For instance, when an entry widget's value has changed, before changing a parameter in the appropriate MRML node, make a call to the MRMLScene's SaveStateForUndo() method with that node as a parameter. Save MRML state at reasonable junctures: for instance, for scale widgets, save MRML state when the scale starts changing, rather than continuously as the scale changes. For an example of they way SaveStateForUndo() is called, see slicer3/Base/GUI/vtkSlicerSliceControllerWidget.cxx. A detailed description of how undo/redo works, and how to use it in your module is available [[Slicer3:Data_Model#Undo.2FRedo_Mechanism | here]].&lt;br /&gt;
&lt;br /&gt;
=== Adding the module to the rest of Slicer3 ===&lt;br /&gt;
'''Other files you will have to touch:''' For now, to add your module to Slicer3, create a new instance of vtkSlicerMyModuleLogic and vtkSlicerMyModuleGUI in Applications/GUI/Slicer3.cxx, and follow the pattern used by the GradientAnisotropicDiffusionFilter module for now, until the framework is developed for Slicer3 to autodetect your module and do the right things. Then:&lt;br /&gt;
&lt;br /&gt;
* create your own CMakeLists.txt file and your own vtkMyModuleWin32Header.h file following the pattern set by other Modules.&lt;br /&gt;
* add your module SUBDIR to the CMakeLists.txt file in the Slicer3/Modules directory above.&lt;br /&gt;
* to add your module to Slicer3, create a new instance of vtkSlicerMyModuleLogic and vtkSlicerMyModuleGUI in Slicer3/Applications/GUI/Slicer3.cxx, and follow the pattern used by other modules, like the GradientAnisotropicDiffusionFilter module.&lt;br /&gt;
* include relevant .h files in Slicer3/Applications/GUI/Slicer3.cxx, and&lt;br /&gt;
* specify your module's source and binary Include directories in Slicer3/Application/GUI/CMakeLists.txt&lt;br /&gt;
* and include your module in the CMakeLists.txt target link libraries&lt;br /&gt;
&lt;br /&gt;
===Add a module-switch in CMake===&lt;br /&gt;
You can add an automatic on/off switch to the ccmake configuration GUI, which will make compilation and development for the user easier.&lt;br /&gt;
To do this add the following to two CMakeLists.txt und the Slicer3.cxx files:&lt;br /&gt;
&lt;br /&gt;
* add the following lines to your Slicer3/Module/MyModule/CMakeLists.txt&lt;br /&gt;
 PROJECT(MyModule)&lt;br /&gt;
 &lt;br /&gt;
 OPTION(MYMODULE &amp;quot;Do you want to build the MyModule?&amp;quot;)&lt;br /&gt;
 IF(MYMODULE)&lt;br /&gt;
 ... (Rest of the file)&lt;br /&gt;
 ENDIF(MYMODULE)&lt;br /&gt;
&lt;br /&gt;
* after this you have MYMODULE as a variable which says if your module is build or not&lt;br /&gt;
* but we want also to exclude the module library and our source in the Slicer3.cxx file if the module is not build&lt;br /&gt;
* in /Slicer3/Applications/GUI/CMakeLists.txt add the following directly above TARGET_LINK_LIBRARIES(...&lt;br /&gt;
 IF(MYMODULE)&lt;br /&gt;
  SET(MYMODULE_LINK_LIB MyModule)&lt;br /&gt;
 ELSE(MYMODULE)&lt;br /&gt;
  ADD_DEFINITIONS(-DMYMODULE_DEBUG)&lt;br /&gt;
 ENDIF(MYMODULE)&lt;br /&gt;
* then add to the TARGET_LINK_LIBRARIES(...${MYMODULE_LINK_LIB}) instead of your previous entry&lt;br /&gt;
* the ''ADD_DEFINITIONS'' declaration adds a preprocessor symbol to the compile which we use to exclude our code from the /Slicer3/Applications/GUI/Slicer3.cxx&lt;br /&gt;
* just border your code in /Slicer3/Applications/GUI/Slicer3.cxx with the following:&lt;br /&gt;
 #ifndef MYMODULE_DEBUG&lt;br /&gt;
 ...(your code/includes)&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
'''Helpful tips:'''&lt;br /&gt;
* Make the vtkModuleCollapsibleFrames which contain the major logical sections of your module members of your module GUI class and expose them through your API. Doing so helps other developers, who may want to offer a jump to your module's functionality, to programmatically raise your UIpanel and expand the frame they're interested in. This paradigm will help to promote fluid navigation of slicer's interface and the reuse of existing functionality.&lt;br /&gt;
&lt;br /&gt;
= Human Interface and Style Guide for Developers (STILL UNDER DEVELOPMENT) =&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
These following sections (work in progress) describe how to create 3DSlicer modules that conform to the application's look and feel and behave in a manner consistent with the rest of 3DSlicer. Provided is  information on basic interface elements, advice on the effective GUI construction with the available widget set, and some recommended design principles that will help your module integrate well with the rest of 3DSlicer. These guidelines are also intended to enhance 3DSlicer's usability. Following the simple design philosophy outlined here will support the following important goals: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Users will learn to use your module faster, because interface elements will look and behave in an expected manner across the application.&lt;br /&gt;
* Your module will have a nice look &amp;amp; feel that fits within the 3DSlicer environment.&lt;br /&gt;
* Your module will be accessible to users at all levels (novice, intermediate and expert).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Look and Feel ===&lt;br /&gt;
&lt;br /&gt;
'''GUI Style:''' Try not to add style elements (like foreground and background color, font, relief, etc.) to the interface you create; let the options database (as set up by the vtkSlicerTheme class) specify the style for the widgets in your module so that all modules appear consistent within the Slicer3 application.&lt;br /&gt;
&lt;br /&gt;
=== Module style ===&lt;br /&gt;
&lt;br /&gt;
=== Pop-up windows ===&lt;br /&gt;
&lt;br /&gt;
=== Confirm on Delete ===&lt;br /&gt;
&lt;br /&gt;
Check vtkSlicerApplication::ConfirmDelete setting; if a user has requested to be presented with a confirm on delete, then give them that option.&lt;br /&gt;
&lt;br /&gt;
=== Event Bindings ===&lt;br /&gt;
&lt;br /&gt;
With respect to the specification of keyboard accelerators, please follow these three recommendations;&lt;br /&gt;
&lt;br /&gt;
* Before assigning &amp;quot;hot-keys&amp;quot; to functionality, either in the main Slicer application or in a new module, please consult the table (and design plan) linked below to make sure the key is not already assigned.&lt;br /&gt;
* Across Slicer modules, try to use similar &amp;quot;hot-key&amp;quot; assignments for similar functionality; this consistency makes Slicer easier to learn.&lt;br /&gt;
* Once you assign &amp;quot;hot-keys&amp;quot; in your module, please add those mappings to the table for others to reference. &lt;br /&gt;
&lt;br /&gt;
[[Event bindings]].&lt;br /&gt;
&lt;br /&gt;
=== Application Font ===&lt;br /&gt;
Verdana is the font chosen for the 3DSlicer brand. &lt;br /&gt;
&lt;br /&gt;
Maintaining consistency of type is an important component of maintaining a coherent look and feel for 3DSlicer and any related or derived visual communications. Verdana was designed specifically to be read on a digital display; it is recommended that we use Verdana (or Geneva) wherever possible in 3DSlicer's web presence and online tutorial materials, and wherever reasonable and appropriate in formal printed materials. &lt;br /&gt;
&lt;br /&gt;
Within the software, since it can't be guaranteed that these fonts will be widely available on all platforms, Helvetica or Arial should be used as a substitute. Slicer's theme sets the application font to be Helvetica 8 normal. Please avoid typefaces with serifs.&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
&lt;br /&gt;
Icons can be a powerful way to represent complicated information within a small footprint on the GUI panel. They associate a visual image with data, state, or a particular operation.&lt;br /&gt;
&lt;br /&gt;
* They should be easy to parse, convey a strong metaphor, and not require significant time for a user to interpret.&lt;br /&gt;
* They should be memorable so that a user can recognize them quickly in future sessions with your module.&lt;br /&gt;
* If an icon already exists within 3DSlicer to represent the data, state or operation you want to indicate, then re-use that icon (indicate visibility with the open/shutting eye, for example.)&lt;br /&gt;
* Note: if the concept is too difficult to represent with a picture, then a text label can always be used instead!&lt;br /&gt;
&lt;br /&gt;
When designing icons, do bear in mind that it's possible to offend users with images that have cultural or polictal connotations. Even colors can have connotations for users in different parts of the world that may be surprising and unintended for the designer and developer. Generally speaking, it's useful to avoid images that contain:&lt;br /&gt;
&lt;br /&gt;
* icons that depict only hands or feet&lt;br /&gt;
* images of animals&lt;br /&gt;
* maps containing disputed boundaries or region names.&lt;br /&gt;
* lists of countries that are not in alphabetical order.&lt;br /&gt;
* pictures of flags&lt;br /&gt;
* pictures of money&lt;br /&gt;
&lt;br /&gt;
====Slicer icon conventions====&lt;br /&gt;
3DSlicer icons should all be of dimension 21x21 pixels.&lt;br /&gt;
&lt;br /&gt;
'''Enabled''' or '''Enabled + Selected''' icons should have:&lt;br /&gt;
&lt;br /&gt;
* a white background (r=255, g=255, b=255, or #FF FF FF)&lt;br /&gt;
* a black hairline along the perimeter (r=0,g=0,b=0, or #00 00 00). &lt;br /&gt;
&lt;br /&gt;
'''Disabled''' or '''Enabled + Deselected''' icons should have:&lt;br /&gt;
* a grey background, value (r=230, g=230, b=230, or hex value #E6 E6 E6) &lt;br /&gt;
* a grey hairline perimeter of value (r=178, g=178, b=178, hex value #B2 B2 B2).&lt;br /&gt;
&lt;br /&gt;
====Downloadable blank icons:====&lt;br /&gt;
These icon blanks are provided for download and use:&lt;br /&gt;
&lt;br /&gt;
* Enabled or Enabled+Selected: [[image:IconBlank.png | conventional Slicer icon ]] &lt;br /&gt;
* Disabled or Enabled+Deselected: [[image:IconBlankLow.png | &amp;quot;deselected&amp;quot; Slicer icon]]&lt;br /&gt;
* Enabled Menubutton: [[image:MenuButtonIconBlank.png | conventional Slicer menubutton icon]]&lt;br /&gt;
* Disabled Menubutton: [[image:MenuButtonIconBlankDisabled.png | &amp;quot;disabled&amp;quot; Slicer menubutton icon]]&lt;br /&gt;
&lt;br /&gt;
====Icons currently used in Slicer's Base====&lt;br /&gt;
Below is a figure of icons currently in use in 3DSlicer. If the icon you need is already used in Slicer, we encourage its re-use in your own module (the visibility icon is a good example). However, if an icon is re-used, make sure you are using it to convey the same meaning/function -- icons shouldn't have different meanings in different places. Finally, make sure any new icons designed for a module don't duplicate ones already in use elsewhere in Slicer. &lt;br /&gt;
&lt;br /&gt;
[[Image:SlicerToolbarIcons2.png | Slicer icons ]]&lt;br /&gt;
&lt;br /&gt;
=== Widget-specific patterns to follow ===&lt;br /&gt;
&lt;br /&gt;
=== Providing help ===&lt;br /&gt;
&lt;br /&gt;
=== Popup messages (dialog, warning, error, confirm, etc.) ===&lt;br /&gt;
&lt;br /&gt;
=== Language ===&lt;br /&gt;
&lt;br /&gt;
=== Credit and Logos ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Controls and Layout ===&lt;br /&gt;
&lt;br /&gt;
=== Progress Feedback ===&lt;br /&gt;
&lt;br /&gt;
=== Colors: application palette ===&lt;br /&gt;
&lt;br /&gt;
The draft slicer color palette is shown below (this palette will still evolve as the UI design evolves -- in particular to accommodate colors used in the final Slicer3 logo). Developers of code, web content and training materials are encouraged to make color choices for GUI components according to this palette, bearing in mind that some of the colors are linked with special meaning, such as error (red), warning (bright yellow), and system (mediumBlue) messages, and unsaved data in drop-down menus and selection boxes (warmMediumGrey).&lt;br /&gt;
&lt;br /&gt;
[[Image:Slicer3Palette.jpg|[[Image:Slicer3Palette.jpg| Slicer GUI color palette (not applicable to visualization)]]]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#ffffff&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! color&lt;br /&gt;
! R&lt;br /&gt;
! G&lt;br /&gt;
! B&lt;br /&gt;
! hex&lt;br /&gt;
! use in slicer&lt;br /&gt;
|-&lt;br /&gt;
| black&lt;br /&gt;
| bgcolor=&amp;quot;#000000&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 0&lt;br /&gt;
| #000000&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| white&lt;br /&gt;
| bgcolor=&amp;quot;#ffffff&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 255&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 255&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 255&lt;br /&gt;
| #ffffff&lt;br /&gt;
| GUI background&lt;br /&gt;
|-&lt;br /&gt;
| darkWarmGrey&lt;br /&gt;
| bgcolor=&amp;quot;#605e53&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 96&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 94&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 83&lt;br /&gt;
| #605e53&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mediumWarmGrey&lt;br /&gt;
| bgcolor=&amp;quot;#8b8878&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 139&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 136&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 120&lt;br /&gt;
| #8b8878&lt;br /&gt;
| unsaved data ?&lt;br /&gt;
|-&lt;br /&gt;
| lightWarmGrey&lt;br /&gt;
| bgcolor=&amp;quot;#cdc8b1&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 205&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 200&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 177&lt;br /&gt;
| #cdc8b1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| warmGreyTint&lt;br /&gt;
| bgcolor=&amp;quot;#eee8dc&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 238&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 232&lt;br /&gt;
| 220&lt;br /&gt;
| #eee8dc&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| darkOrange&lt;br /&gt;
| bgcolor=&amp;quot;#c44a1a&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 196&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 74&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 26&lt;br /&gt;
| #c44a1a&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| brightOrange&lt;br /&gt;
| bgcolor=&amp;quot;#e06f13&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 224&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 111&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 19&lt;br /&gt;
| #e06f13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| brightYellow&lt;br /&gt;
| bgcolor=&amp;quot;#e7d13e&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 231&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 209&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 62&lt;br /&gt;
| #e7d13e&lt;br /&gt;
| warning message code&lt;br /&gt;
|-&lt;br /&gt;
| yellowTint&lt;br /&gt;
| bgcolor=&amp;quot;#eed680&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 238&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 214&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 128&lt;br /&gt;
| #eed680&lt;br /&gt;
| sag slice&lt;br /&gt;
|-&lt;br /&gt;
| darkCocoa&lt;br /&gt;
| bgcolor=&amp;quot;#826647&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 130&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 102&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 71&lt;br /&gt;
| #826647&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lightCocoa&lt;br /&gt;
| bgcolor=&amp;quot;#b39169&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 179&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 145&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 105&lt;br /&gt;
| #b39169&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| stone&lt;br /&gt;
| bgcolor=&amp;quot;#e0c39e&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 224&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 195&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 158&lt;br /&gt;
| #e0c39e&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| stoneTint&lt;br /&gt;
| bgcolor=&amp;quot;#efe0cd&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 239&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 224&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 205&lt;br /&gt;
| #efe0cd&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| red&lt;br /&gt;
| bgcolor=&amp;quot;#c32e10&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 195&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 46&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 15&lt;br /&gt;
| #c32e10&lt;br /&gt;
| error message code&lt;br /&gt;
|-&lt;br /&gt;
| brick&lt;br /&gt;
| bgcolor=&amp;quot;#ba462b&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 186&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 70&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 43&lt;br /&gt;
| #ba462b&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lightBrick&lt;br /&gt;
| bgcolor=&amp;quot;#c17350&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 193&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 115&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 80&lt;br /&gt;
| #c17350&lt;br /&gt;
| axi slice&lt;br /&gt;
|-&lt;br /&gt;
| redTint&lt;br /&gt;
| bgcolor=&amp;quot;#e0b6af&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 224&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 182&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 175&lt;br /&gt;
| #e0b6af&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| darkGreen&lt;br /&gt;
| bgcolor=&amp;quot;#445632&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 68&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 86&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 50&lt;br /&gt;
| #445632&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| brightGreen&lt;br /&gt;
| bgcolor=&amp;quot;#688f42&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 104&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 143&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 66&lt;br /&gt;
| #688f42&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| dustyGreen&lt;br /&gt;
| bgcolor=&amp;quot;#8aa56f&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 138&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 165&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 111&lt;br /&gt;
| #8aa56f&lt;br /&gt;
| cor slice&lt;br /&gt;
|-&lt;br /&gt;
| greenTint&lt;br /&gt;
| bgcolor=&amp;quot;#ccf4a6&amp;quot; |&lt;br /&gt;
| 204&lt;br /&gt;
| 244&lt;br /&gt;
| 166&lt;br /&gt;
| #ccf4a6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| darkBlue&lt;br /&gt;
| bgcolor=&amp;quot;#494066&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 73&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 64&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 102&lt;br /&gt;
| #494066&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mediumBlue&lt;br /&gt;
| bgcolor=&amp;quot;#625b81&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 98&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 91&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 129&lt;br /&gt;
| #625b81&lt;br /&gt;
| system message code&lt;br /&gt;
|-&lt;br /&gt;
| lightBlue&lt;br /&gt;
| bgcolor=&amp;quot;#887fa3&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 136&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 127&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 163&lt;br /&gt;
| #887fa3&lt;br /&gt;
| unsaved data?&lt;br /&gt;
|-&lt;br /&gt;
| slicerBlue&lt;br /&gt;
| bgcolor=&amp;quot;#b3b3e6&amp;quot; |&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 179&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 179&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | 230&lt;br /&gt;
| #b3b3e6&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Feature Requests, Resource Requests and Emerging Conventions =&lt;br /&gt;
&lt;br /&gt;
We are collecting '''[[Slicer3:FeatureRequests|feature, conventions and resource requests]]''' from users and developers. Appropriate entries from [http://www.na-mic.org/Bug Slicer2's bug tracker] will be periodically added to this repository also.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Working questions =&lt;br /&gt;
&lt;br /&gt;
* Getting correct render window size information from vtkKWRenderWidget (answer: yes, vtkKWRenderWidget::GetWidth() is actually its superclass' vtkKWFrame::GetWidth(), which is misleading, it's more a &amp;quot;requested width&amp;quot; kind of option. What you did by calling Tk is OK).&lt;br /&gt;
* First pack/unpack of Nav/Zoom widget interacting with scrollbar, making display flash (answer: fixed, update KWWidgets, in vtkSlicerViewControlGUI::PackZoom/NavWidget replace &amp;quot;-fill x -fill y&amp;quot; by &amp;quot;-fill none&amp;quot; if it is still flashing)&lt;br /&gt;
* Registry and window size (answer: investigating)&lt;br /&gt;
* Progress feedback (answer: vtkKWWindowBase::GetProgressGauge()::SetValue())&lt;br /&gt;
* Using registry (what application and module state is reasonable to save?) (answer: I would recommend: the last selected module, the collapsed state of &amp;quot;Manipulate Slice Views&amp;quot;, &amp;quot;Manipulate 3D View&amp;quot;, the layout (i.e. 1 over 3, or 2x2,etc), if the slice controls are collapsed or not).&lt;br /&gt;
* In the toolbar, the indicator should be off, and we could use a different image for the selected and unselected state of a button. Sadly, doing so still seems to make the button recess/shift when it is selected (answer: investigated this one thoroughly, there is sadly no work around that, it's a Tk problem unfortunately).&lt;br /&gt;
&lt;br /&gt;
[[Slicer3:Interface_Design | Return to Slicer3 Interface Design and Usability ]]&lt;br /&gt;
&lt;br /&gt;
[[Slicer3 | Return to Slicer3 main page ]]&lt;/div&gt;</summary>
		<author><name>Klawson1</name></author>
		
	</entry>
</feed>