<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johan.andruejol&amp;*</id>
	<title>Slicer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johan.andruejol&amp;*"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/wiki/Special:Contributions/Johan.andruejol"/>
	<updated>2026-07-30T06:17:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/ScriptRepository&amp;diff=59151</id>
		<title>Documentation/Nightly/ScriptRepository</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/ScriptRepository&amp;diff=59151"/>
		<updated>2018-06-28T15:16:29Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Subject hierarchy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Community-contributed modules=&lt;br /&gt;
&lt;br /&gt;
The examples in this section are [[Documentation/{{documentation/version}}/Developers/Modules#Scripted_Modules| Scripted Modules]] that provide a user interface in the module panel along with specialized implementation logic.&lt;br /&gt;
&lt;br /&gt;
Usage: save the .py file to a directory, add the directory to the additional module paths in the Slicer application settings (choose in the menu: Edit / Application settings, click Modules, click &amp;gt;&amp;gt; next to Additional module paths, click Add, and choose the .py file's location).&lt;br /&gt;
&lt;br /&gt;
==Filters==&lt;br /&gt;
* [https://raw.github.com/pieper/VolumeMasker/master/VolumeMasker.py VolumeMasker.py]: Update a target volume with the results of setting all input volume voxels to 0 except for those that correspond to a selected label value in an input label map (Used for example in the volume rendering in [https://www.youtube.com/watch?v=dfu2gugHLHs this video).&lt;br /&gt;
&lt;br /&gt;
==DICOM==&lt;br /&gt;
* [https://gist.github.com/pieper/6186477 dicom header browser] to easily scroll through dicom files using dcmdump.&lt;br /&gt;
* [https://github.com/SlicerRt/SlicerRT/tree/master/BatchProcessing SlicerRT batch processing] to batch convert RT structure sets to labelmap NRRD files.&lt;br /&gt;
&lt;br /&gt;
==Informatics==&lt;br /&gt;
* [https://gist.github.com/lassoan/bf0954d93cacc8cbe27cd4a3ad503f2f MarkupsInfo.py]: Compute the total length between all the points of a markup list.&lt;br /&gt;
* [https://gist.github.com/lassoan/0e7acfbec36e4577f8b7b0e07ad53a2a LineProfile.py]: Compute intensity profile in a volume along a line.&lt;br /&gt;
&lt;br /&gt;
=Community-contributed examples=&lt;br /&gt;
&lt;br /&gt;
Usage: Copy-paste the shown code lines or linked .py file contents into Python console in Slicer.  Or save them to a file and run them using execfile.&lt;br /&gt;
&lt;br /&gt;
==Capture==&lt;br /&gt;
* Capture the full Slicer screen and save it into a file&lt;br /&gt;
  img = qt.QPixmap.grabWidget(slicer.util.mainWindow()).toImage()&lt;br /&gt;
  img.save('c:/tmp/test.png')&lt;br /&gt;
* Capture all the views save it into a file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import ScreenCapture&lt;br /&gt;
cap = ScreenCapture.ScreenCaptureLogic()&lt;br /&gt;
cap.showViewControllers(False)&lt;br /&gt;
cap.captureImageFromView(None,'c:/tmp/test.png')&lt;br /&gt;
cap.showViewControllers(True)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Capture a single view:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
viewNodeID = 'vtkMRMLViewNode1'&lt;br /&gt;
import ScreenCapture&lt;br /&gt;
cap = ScreenCapture.ScreenCaptureLogic()&lt;br /&gt;
view = cap.viewFromNode(slicer.mrmlScene.GetNodeByID(viewNodeID))&lt;br /&gt;
cap.captureImageFromView(view,'c:/tmp/test.png')&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Common values for viewNodeID: vtkMRMLSliceNodeRed, vtkMRMLSliceNodeYellow, vtkMRMLSliceNodeGreen, vtkMRMLViewNode1, vtkMRMLViewNode2. &lt;br /&gt;
The ScreenCapture module can also create video animations of rotating views, slice sweeps, etc.&lt;br /&gt;
&lt;br /&gt;
* Capture a slice view sweep into a series of PNG files - for example, Red slice view, 30 images, from position -125.0 to 75.0, into c:/tmp folder, with name image_00001.png, image_00002.png, ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import ScreenCapture&lt;br /&gt;
ScreenCapture.ScreenCaptureLogic().captureSliceSweep(getNode('vtkMRMLSliceNodeRed'), -125.0, 75.0, 30, &amp;quot;c:/tmp&amp;quot;, &amp;quot;image_%05d.png&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Capture 3D view into PNG file with transparent background&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
renderWindow = slicer.app.layoutManager().threeDWidget(0).threeDView().renderWindow()&lt;br /&gt;
renderWindow.SetAlphaBitPlanes(1)&lt;br /&gt;
wti = vtk.vtkWindowToImageFilter()&lt;br /&gt;
wti.SetInputBufferTypeToRGBA()&lt;br /&gt;
wti.SetInput(renderWindow)&lt;br /&gt;
writer = vtk.vtkPNGWriter()&lt;br /&gt;
writer.SetFileName(&amp;quot;c:/tmp/screenshot.png&amp;quot;)&lt;br /&gt;
writer.SetInputConnection(wti.GetOutputPort())&lt;br /&gt;
writer.Write()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launching Slicer==&lt;br /&gt;
* How to open an .mrb file with Slicer at the command line?&lt;br /&gt;
  Slicer.exe --python-code &amp;quot;slicer.util.loadScene( 'f:/2013-08-23-Scene.mrb' )&amp;quot;&lt;br /&gt;
* How to run a script in the Slicer environment in batch mode (without showing any graphical user interface)?&lt;br /&gt;
  Slicer.exe --python-code &amp;quot;doSomething; doSomethingElse; etc.&amp;quot; --testing --no-splash --no-main-window&lt;br /&gt;
&lt;br /&gt;
==Load volume from file==&lt;br /&gt;
When loading a volume from file, it is recommended to set returnNode=True to retrieve the loaded volume node.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[success, loadedVolumeNode] = slicer.util.loadVolume('c:/Users/abc/Documents/MRHead.nrrd', returnNode=True)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a MRML node in the scene based on the node name and call methods of that object. For the MRHead sample data:&lt;br /&gt;
  vol=slicer.util.getNode('MR*')&lt;br /&gt;
  vol.GetImageData().GetDimensions()&lt;br /&gt;
&lt;br /&gt;
==DICOM==&lt;br /&gt;
=== How to access tags of DICOM images imported into Slicer? For example, to print the first patient's first study's first series' &amp;quot;0020,0032&amp;quot; field:===&lt;br /&gt;
  db=slicer.dicomDatabase&lt;br /&gt;
  patientList=db.patients()&lt;br /&gt;
  studyList=db.studiesForPatient(patientList[0])&lt;br /&gt;
  seriesList=db.seriesForStudy(studyList[0])&lt;br /&gt;
  fileList=db.filesForSeries(seriesList[0])&lt;br /&gt;
  print db.fileValue(fileList[0],'0020,0032')&lt;br /&gt;
&lt;br /&gt;
=== How to access tag of a volume loaded from DICOM? For example, get the patient position stored in a volume:===&lt;br /&gt;
  volumeName='2: ENT IMRT'&lt;br /&gt;
  n=slicer.util.getNode(volumeName)&lt;br /&gt;
  instUids=n.GetAttribute('DICOM.instanceUIDs').split()&lt;br /&gt;
  filename=slicer.dicomDatabase.fileForInstance(instUids[0])&lt;br /&gt;
  print slicer.dicomDatabase.fileValue(filename,'0018,5100')&lt;br /&gt;
&lt;br /&gt;
=== How to access tag of an item in the Subject Hierachy tree? For example, get the content time tag of a structure set:===&lt;br /&gt;
  rtStructName = '3: RTSTRUCT: PROS'&lt;br /&gt;
  rtStructNode = slicer.util.getNode(rtStructName)&lt;br /&gt;
  shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)&lt;br /&gt;
  rtStructShItemID = shNode.GetItemByDataNode(rtStructNode)&lt;br /&gt;
  ctSliceInstanceUids = shNode.GetItemAttribute(rtStructShItemID, 'DICOM.ReferencedInstanceUIDs').split()&lt;br /&gt;
  filename = slicer.dicomDatabase.fileForInstance(ctSliceInstanceUids[0])&lt;br /&gt;
  print slicer.dicomDatabase.fileValue(filename,'0008,0033')&lt;br /&gt;
&lt;br /&gt;
=== How to get path and filename of a loaded DICOM volume?===&lt;br /&gt;
  def pathFromNode(node):&lt;br /&gt;
    storageNode=node.GetStorageNode()&lt;br /&gt;
    if storageNode is not None: # loaded via drag-drop&lt;br /&gt;
        filepath=storageNode.GetFullNameFromFileName()&lt;br /&gt;
    else: # loaded via DICOM browser&lt;br /&gt;
        instanceUIDs=node.GetAttribute('DICOM.instanceUIDs').split()&lt;br /&gt;
        filepath=slicer.dicomDatabase.fileForInstance(instUids[0])&lt;br /&gt;
    return filepath&lt;br /&gt;
  &lt;br /&gt;
  # example:&lt;br /&gt;
  node=slicer.util.getNode('volume1')&lt;br /&gt;
  path=self.pathFromNode(node)&lt;br /&gt;
  print(&amp;quot;DICOM path=%s&amp;quot; % path)&lt;br /&gt;
&lt;br /&gt;
=== How can I convert DICOM to NRRD on the command line?===&lt;br /&gt;
&lt;br /&gt;
 /Applications/Slicer-4.6.2.app/Contents/MacOS/Slicer --no-main-window --python-code &amp;quot;node=slicer.util.loadVolume('/tmp/series/im0.dcm', returnNode=True)[1]; slicer.util.saveNode(node, '/tmp/output.nrrd'); exit()&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The same can be done on windows by using the top level Slicer.exe.  Be sure to use forward slashes in the pathnames within quotes on the command line.&lt;br /&gt;
&lt;br /&gt;
=== Export a volume to DICOM file format ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
volumeNode = getNode('CTChest')&lt;br /&gt;
outputFolder = &amp;quot;c:/tmp/dicom-output&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Create patient and study and put the volume under the study&lt;br /&gt;
shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)&lt;br /&gt;
patientItemID = shNode.CreateSubjectItem(shNode.GetSceneItemID(), &amp;quot;test patient&amp;quot;)&lt;br /&gt;
studyItemID = shNode.CreateStudyItem(patientItemID, &amp;quot;test study&amp;quot;)&lt;br /&gt;
volumeShItemID = shNode.GetItemByDataNode(volumeNode)&lt;br /&gt;
shNode.SetItemParent(volumeShItemID, studyItemID)&lt;br /&gt;
&lt;br /&gt;
import DICOMScalarVolumePlugin&lt;br /&gt;
exporter = DICOMScalarVolumePlugin.DICOMScalarVolumePluginClass()&lt;br /&gt;
exportables = exporter.examineForExport(volumeShItemID)&lt;br /&gt;
for exp in exportables:&lt;br /&gt;
  exp.directory = outputFolder&lt;br /&gt;
&lt;br /&gt;
exporter.export(exportables)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Toolbar functions==&lt;br /&gt;
* How to turn on slice intersections in the crosshair menu on the toolbar:&lt;br /&gt;
  viewNodes = slicer.mrmlScene.GetNodesByClass('vtkMRMLSliceCompositeNode')&lt;br /&gt;
  viewNodes.UnRegister(slicer.mrmlScene)&lt;br /&gt;
  viewNodes.InitTraversal()&lt;br /&gt;
  viewNode = viewNodes.GetNextItemAsObject()&lt;br /&gt;
  while viewNode:&lt;br /&gt;
    viewNode.SetSliceIntersectionVisibility(1)&lt;br /&gt;
    viewNode = viewNodes.GetNextItemAsObject()&lt;br /&gt;
&lt;br /&gt;
How to find similar functions? For this one I searched for &amp;quot;slice intersections&amp;quot; text in the whole slicer source code, found that the function is implemented in Base\QTGUI\qSlicerViewersToolBar.cxx, then translated the qSlicerViewersToolBarPrivate::setSliceIntersectionVisible(bool visible) method to Python.&lt;br /&gt;
&lt;br /&gt;
==Manipulating objects in the slice viewer==&lt;br /&gt;
* How to define/edit a circular region of interest in a slice viewer?&lt;br /&gt;
&lt;br /&gt;
Drop two markup points on a slice view and copy-paste the code below into the Python console. After this, as you move the markups you’ll see a circle following the markups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Update the sphere from the fiducial points&lt;br /&gt;
def UpdateSphere(param1, param2):  &lt;br /&gt;
  import math&lt;br /&gt;
  centerPointCoord = [0.0, 0.0, 0.0]&lt;br /&gt;
  markups.GetNthFiducialPosition(0,centerPointCoord)&lt;br /&gt;
  circumferencePointCoord = [0.0, 0.0, 0.0]&lt;br /&gt;
  markups.GetNthFiducialPosition(1,circumferencePointCoord)&lt;br /&gt;
  sphere.SetCenter(centerPointCoord)&lt;br /&gt;
  radius=math.sqrt((centerPointCoord[0]-circumferencePointCoord[0])**2+(centerPointCoord[1]-circumferencePointCoord[1])**2+(centerPointCoord[2]-circumferencePointCoord[2])**2)&lt;br /&gt;
  sphere.SetRadius(radius)&lt;br /&gt;
  sphere.SetPhiResolution(30)&lt;br /&gt;
  sphere.SetThetaResolution(30)&lt;br /&gt;
  sphere.Update()&lt;br /&gt;
&lt;br /&gt;
# Get markup node from scene&lt;br /&gt;
markups=slicer.util.getNode('F')&lt;br /&gt;
sphere = vtk.vtkSphereSource()&lt;br /&gt;
UpdateSphere(0,0)&lt;br /&gt;
 &lt;br /&gt;
# Create model node and add to scene&lt;br /&gt;
modelsLogic = slicer.modules.models.logic()&lt;br /&gt;
model = modelsLogic.AddModel(sphere.GetOutput())&lt;br /&gt;
model.GetDisplayNode().SetSliceIntersectionVisibility(True)&lt;br /&gt;
model.GetDisplayNode().SetSliceIntersectionThickness(3)&lt;br /&gt;
model.GetDisplayNode().SetColor(1,1,0)&lt;br /&gt;
 &lt;br /&gt;
# Call UpdateSphere whenever the fiducials are changed&lt;br /&gt;
markups.AddObserver(&amp;quot;ModifiedEvent&amp;quot;, UpdateSphere, 2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Switching to markup fiducial placement mode ==&lt;br /&gt;
&lt;br /&gt;
To activate a fiducial placement mode, both interaction mode has to be set and a fiducial node has to be selected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interactionNode = slicer.app.applicationLogic().GetInteractionNode()&lt;br /&gt;
selectionNode = slicer.app.applicationLogic().GetSelectionNode()&lt;br /&gt;
selectionNode.SetReferenceActivePlaceNodeClassName(&amp;quot;vtkMRMLMarkupsFiducialNode&amp;quot;)&lt;br /&gt;
fiducialNode = slicer.vtkMRMLMarkupsFiducialNode()&lt;br /&gt;
slicer.mrmlScene.AddNode(fiducialNode)&lt;br /&gt;
fiducialNode.CreateDefaultDisplayNodes() &lt;br /&gt;
selectionNode.SetActivePlaceNodeID(fiducialNode.GetID())&lt;br /&gt;
interactionNode.SetCurrentInteractionMode(interactionNode.Place)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get a notification if a markup point position is modified ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def onMarkupsNodeModified(markupsNode, unusedArg2=None, unusedArg3=None):&lt;br /&gt;
  sliceView = markupsNode.GetAttribute('Markups.MovingInSliceView')&lt;br /&gt;
  if not sliceView:&lt;br /&gt;
    print(&amp;quot;Markup list was modified&amp;quot;)&lt;br /&gt;
    return&lt;br /&gt;
  movingMarkupIndex = markupsNode.GetAttribute('Markups.MovingMarkupIndex')&lt;br /&gt;
  pos = [0,0,0]&lt;br /&gt;
  markupsNode.GetNthFiducialPosition(int(movingMarkupIndex), pos)  &lt;br /&gt;
  print(&amp;quot;Markup {0} was moved in slice view {1} to {2}&amp;quot;.format(movingMarkupIndex, sliceView, pos))&lt;br /&gt;
&lt;br /&gt;
markupsNode = slicer.mrmlScene.AddNewNodeByClass(&amp;quot;vtkMRMLMarkupsFiducialNode&amp;quot;)&lt;br /&gt;
markupsNode.CreateDefaultDisplayNodes()&lt;br /&gt;
markupsNode.AddFiducial(0,0,0)&lt;br /&gt;
markupsNode.AddObserver(vtk.vtkCommand.ModifiedEvent, onMarkupsNodeModified)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Show a context menu when a markup point is clicked in a slice or 3D view ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Example actions to perform&lt;br /&gt;
&lt;br /&gt;
def action1():&lt;br /&gt;
  print('Action1 on markup '+str(slicer.clickedMarkupIndex))&lt;br /&gt;
&lt;br /&gt;
def action2():&lt;br /&gt;
  print('Action2 on markup '+str(slicer.clickedMarkupIndex))&lt;br /&gt;
&lt;br /&gt;
def action3():&lt;br /&gt;
  print('Action3 on markup '+str(slicer.clickedMarkupIndex))&lt;br /&gt;
&lt;br /&gt;
# Clicked markup index is saved here to let the action&lt;br /&gt;
# know which markup needs to be manipulated.&lt;br /&gt;
slicer.clickedMarkupIndex = -1&lt;br /&gt;
  &lt;br /&gt;
# Create a simple menu&lt;br /&gt;
&lt;br /&gt;
menu = qt.QMenu()&lt;br /&gt;
a1 = qt.QAction(&amp;quot;Test&amp;quot;, slicer.util.mainWindow())&lt;br /&gt;
a1.connect('triggered()', action1)&lt;br /&gt;
menu.addAction(a1)&lt;br /&gt;
a2 = qt.QAction(&amp;quot;Action&amp;quot;, slicer.util.mainWindow())&lt;br /&gt;
a2.connect('triggered()', action1)&lt;br /&gt;
menu.addAction(a2)&lt;br /&gt;
a3 = qt.QAction(&amp;quot;Here&amp;quot;, slicer.util.mainWindow())&lt;br /&gt;
a3.connect('triggered()', action1)&lt;br /&gt;
menu.addAction(a3)&lt;br /&gt;
&lt;br /&gt;
# Add observer to a markup fiducial list&lt;br /&gt;
&lt;br /&gt;
@vtk.calldata_type(vtk.VTK_INT)&lt;br /&gt;
def markupClickedCallback(caller, eventId, callData):&lt;br /&gt;
  slicer.clickedMarkupIndex = callData&lt;br /&gt;
  print('Open menu on markup '+str(slicer.clickedMarkupIndex))&lt;br /&gt;
  menu.move(qt.QCursor.pos())&lt;br /&gt;
  menu.show()&lt;br /&gt;
&lt;br /&gt;
markupsNode = getNode('F')&lt;br /&gt;
observerTag = markupsNode.AddObserver(slicer.vtkMRMLMarkupsNode.PointClickedEvent, markupClickedCallback)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Add a texture mapped plane to the scene as a model ==&lt;br /&gt;
Note that model textures are not exposed in the GUI and are not saved in the scene&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# use dummy image data here&lt;br /&gt;
e = vtk.vtkImageEllipsoidSource()&lt;br /&gt;
&lt;br /&gt;
scene = slicer.mrmlScene&lt;br /&gt;
&lt;br /&gt;
# Create model node&lt;br /&gt;
model = slicer.vtkMRMLModelNode()&lt;br /&gt;
model.SetScene(scene)&lt;br /&gt;
model.SetName(scene.GenerateUniqueName(&amp;quot;2DImageModel&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
planeSource = vtk.vtkPlaneSource()&lt;br /&gt;
model.SetAndObservePolyData(planeSource.GetOutput())&lt;br /&gt;
&lt;br /&gt;
# Create display node&lt;br /&gt;
modelDisplay = slicer.vtkMRMLModelDisplayNode()&lt;br /&gt;
modelDisplay.SetColor(1,1,0) # yellow&lt;br /&gt;
modelDisplay.SetBackfaceCulling(0)&lt;br /&gt;
modelDisplay.SetScene(scene)&lt;br /&gt;
scene.AddNode(modelDisplay)&lt;br /&gt;
model.SetAndObserveDisplayNodeID(modelDisplay.GetID())&lt;br /&gt;
&lt;br /&gt;
# Add to scene&lt;br /&gt;
modelDisplay.SetAndObserveTextureImageData(e.GetOutput())&lt;br /&gt;
scene.AddNode(model) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
transform = slicer.vtkMRMLLinearTransformNode()&lt;br /&gt;
scene.AddNode(transform) &lt;br /&gt;
model.SetAndObserveTransformNodeID(transform.GetID())&lt;br /&gt;
&lt;br /&gt;
vTransform = vtk.vtkTransform()&lt;br /&gt;
vTransform.Scale(50,50,50)&lt;br /&gt;
vTransform.RotateX(30)&lt;br /&gt;
transform.SetAndObserveMatrixTransformToParent(vTransform.GetMatrix())&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Export entire scene as VRML ==&lt;br /&gt;
&lt;br /&gt;
Save all surface meshes displayed in the scene (models, markups, etc). Solid colors and coloring by scalar is preserved. Textures are not supported.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exporter = vtk.vtkVRMLExporter()&lt;br /&gt;
exporter.SetRenderWindow(slicer.app.layoutManager().threeDWidget(0).threeDView().renderWindow())&lt;br /&gt;
exporter.SetFileName('C:/tmp/something.wrl')&lt;br /&gt;
exporter.Write()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Export model to Blender, including color by scalar ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
modelNode = getNode(&amp;quot;Model&amp;quot;)&lt;br /&gt;
plyFilePath = &amp;quot;c:/tmp/model.ply&amp;quot;&lt;br /&gt;
&lt;br /&gt;
modelDisplayNode = modelNode.GetDisplayNode()&lt;br /&gt;
triangles = vtk.vtkTriangleFilter()&lt;br /&gt;
triangles.SetInputConnection(modelDisplayNode.GetOutputPolyDataConnection())&lt;br /&gt;
&lt;br /&gt;
plyWriter = vtk.vtkPLYWriter()&lt;br /&gt;
plyWriter.SetInputConnection(triangles.GetOutputPort())&lt;br /&gt;
lut = vtk.vtkLookupTable()&lt;br /&gt;
lut.DeepCopy(modelDisplayNode.GetColorNode().GetLookupTable())&lt;br /&gt;
lut.SetRange(modelDisplayNode.GetScalarRange())&lt;br /&gt;
plyWriter.SetLookupTable(lut)&lt;br /&gt;
plyWriter.SetArrayName(modelDisplayNode.GetActiveScalarName())&lt;br /&gt;
&lt;br /&gt;
plyWriter.SetFileName(plyFilePath)&lt;br /&gt;
plyWriter.Write()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Export a fiber tracts to Blender, including color ==&lt;br /&gt;
&lt;br /&gt;
Note: an interactive version of this script is now included in the [http://dmri.slicer.org/ SlicerDMRI extension] ([https://github.com/SlicerDMRI/SlicerDMRI/tree/master/Modules/Scripted/TractographyExportPLY module code]). &lt;br /&gt;
After installing SlicerDMRI, go to ''Modules -&amp;gt; Diffusion -&amp;gt; Import and Export -&amp;gt; Export tractography to PLY (mesh)''.&lt;br /&gt;
&lt;br /&gt;
The example below shows how to export a tractography &amp;quot;FiberBundleNode&amp;quot; to a PLY file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lineDisplayNode = getNode(&amp;quot;*LineDisplay*&amp;quot;)&lt;br /&gt;
plyFilePath = &amp;quot;/tmp/fibers.ply&amp;quot;&lt;br /&gt;
&lt;br /&gt;
tuber = vtk.vtkTubeFilter()&lt;br /&gt;
tuber.SetInputData(lineDisplayNode.GetOutputPolyData())&lt;br /&gt;
tuber.Update()&lt;br /&gt;
tubes = tuber.GetOutputDataObject(0)&lt;br /&gt;
scalars = tubes.GetPointData().GetArray(0)&lt;br /&gt;
scalars.SetName(&amp;quot;scalars&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
triangles = vtk.vtkTriangleFilter()&lt;br /&gt;
triangles.SetInputData(tubes)&lt;br /&gt;
triangles.Update()&lt;br /&gt;
&lt;br /&gt;
colorNode = lineDisplayNode.GetColorNode()&lt;br /&gt;
lookupTable = vtk.vtkLookupTable()&lt;br /&gt;
lookupTable.DeepCopy(colorNode.GetLookupTable())&lt;br /&gt;
lookupTable.SetTableRange(0,1)&lt;br /&gt;
&lt;br /&gt;
plyWriter = vtk.vtkPLYWriter()&lt;br /&gt;
plyWriter.SetInputData(triangles.GetOutput())&lt;br /&gt;
plyWriter.SetLookupTable(lookupTable)&lt;br /&gt;
plyWriter.SetArrayName(&amp;quot;scalars&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
plyWriter.SetFileName(plyFilePath)&lt;br /&gt;
plyWriter.Write()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clone a volume ==&lt;br /&gt;
This example shows how to clone the MRHead sample volume, including its pixel data and display settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sourceVolumeNode = slicer.util.getNode('MRHead')&lt;br /&gt;
volumesLogic = slicer.modules.volumes.logic()&lt;br /&gt;
clonedVolumeNode = volumesLogic.CloneVolume(slicer.mrmlScene, sourceVolumeNode, 'Cloned volume')&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create a new volume ==&lt;br /&gt;
This example shows how to create a new empty volume.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nodeName = &amp;quot;MyNewVolume&amp;quot;&lt;br /&gt;
imageSize = [512, 512, 512]&lt;br /&gt;
voxelType=vtk.VTK_UNSIGNED_CHAR&lt;br /&gt;
imageOrigin = [0.0, 0.0, 0.0]&lt;br /&gt;
imageSpacing = [1.0, 1.0, 1.0]&lt;br /&gt;
imageDirections = [[1,0,0], [0,1,0], [0,0,1]]&lt;br /&gt;
fillVoxelValue = 0&lt;br /&gt;
&lt;br /&gt;
# Create an empty image volume, filled with fillVoxelValue&lt;br /&gt;
imageData = vtk.vtkImageData()&lt;br /&gt;
imageData.SetDimensions(imageSize)&lt;br /&gt;
imageData.AllocateScalars(voxelType, 1)&lt;br /&gt;
thresholder = vtk.vtkImageThreshold()&lt;br /&gt;
thresholder.SetInputData(imageData)&lt;br /&gt;
thresholder.SetInValue(fillVoxelValue)&lt;br /&gt;
thresholder.SetOutValue(fillVoxelValue)&lt;br /&gt;
thresholder.Update()&lt;br /&gt;
# Create volume node&lt;br /&gt;
volumeNode = slicer.mrmlScene.AddNewNodeByClass(&amp;quot;vtkMRMLScalarVolumeNode&amp;quot;, nodeName)&lt;br /&gt;
volumeNode.SetOrigin(imageOrigin)&lt;br /&gt;
volumeNode.SetSpacing(imageSpacing)&lt;br /&gt;
volumeNode.SetIJKToRASDirections(imageDirections)&lt;br /&gt;
volumeNode.SetAndObserveImageData(thresholder.GetOutput())&lt;br /&gt;
volumeNode.CreateDefaultDisplayNodes()&lt;br /&gt;
volumeNode.CreateDefaultStorageNode()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modify voxels in a volume ==&lt;br /&gt;
&lt;br /&gt;
Typically the fastest and simplest way of modifying voxels is by using numpy operators. Voxels can be retrieved in a numpy array using the `array` method and modified using standard numpy methods. For example, threshold a volume:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nodeName = 'MRHead'&lt;br /&gt;
thresholdValue = 100&lt;br /&gt;
voxelArray = array(nodeName) # get voxels as numpy array&lt;br /&gt;
voxelArray[voxelArray &amp;lt; thresholdValue] = 0 # modify voxel values&lt;br /&gt;
getNode(nodeName).Modified() # at the end of all processing, notify Slicer that the image modification is completed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows how to change voxels values of the MRHead sample volume.&lt;br /&gt;
The values will be computed by function f(r,a,s,) = (r-10)*(r-10)+(a+15)*(a+15)+s*s.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
volumeNode=slicer.util.getNode('MRHead')&lt;br /&gt;
ijkToRas = vtk.vtkMatrix4x4()&lt;br /&gt;
volumeNode.GetIJKToRASMatrix(ijkToRas)&lt;br /&gt;
imageData=volumeNode.GetImageData()&lt;br /&gt;
extent = imageData.GetExtent()&lt;br /&gt;
for k in xrange(extent[4], extent[5]+1):&lt;br /&gt;
  for j in xrange(extent[2], extent[3]+1):&lt;br /&gt;
    for i in xrange(extent[0], extent[1]+1):&lt;br /&gt;
      position_Ijk=[i, j, k, 1]&lt;br /&gt;
      position_Ras=ijkToRas.MultiplyPoint(position_Ijk)&lt;br /&gt;
      r=position_Ras[0]&lt;br /&gt;
      a=position_Ras[1]&lt;br /&gt;
      s=position_Ras[2]      &lt;br /&gt;
      functionValue=(r-10)*(r-10)+(a+15)*(a+15)+s*s&lt;br /&gt;
      imageData.SetScalarComponentFromDouble(i,j,k,0,functionValue)&lt;br /&gt;
imageData.SetScalarComponentFromFloat(distortionVectorPosition_Ijk[0], distortionVectorPosition_Ijk[1], distortionVectorPosition_Ijk[2], 0, fillValue)&lt;br /&gt;
imageData.Modified()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get the values of all voxels for a label value  ==&lt;br /&gt;
&lt;br /&gt;
If you have a background image called ‘Volume’ and a mask called ‘Volume-label’ created with the Editor you could do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
import numpy&lt;br /&gt;
volume = array(‘Volume’)&lt;br /&gt;
label = array(‘Volume-label’)&lt;br /&gt;
points  = numpy.where( label == 1 )  # or use another label number depending on what you segmented&lt;br /&gt;
values  = volume[points] # this will be a list of the label values&lt;br /&gt;
values.mean() # should match the mean value of LabelStatistics calculation as a double-check&lt;br /&gt;
numpy.savetxt(‘values.txt’, values)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Access values in a DTI tensor volume ==&lt;br /&gt;
This example shows how to access individual tensors at the voxel level.&lt;br /&gt;
&lt;br /&gt;
First load your DWI volume and estimate tensors to produce a DTI volume called ‘Output DTI Volume’&lt;br /&gt;
&lt;br /&gt;
Then open the python window: View-&amp;gt;Python interactor&lt;br /&gt;
&lt;br /&gt;
Use this command to access tensors through numpy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tensors = array('Output DTI Volume')&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type the following code into the Python window to access all tensor components using vtk commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
volumeNode=slicer.util.getNode('Output DTI Volume')&lt;br /&gt;
imageData=volumeNode.GetImageData()&lt;br /&gt;
tensors = imageData.GetPointData().GetTensors()&lt;br /&gt;
extent = imageData.GetExtent()&lt;br /&gt;
idx = 0&lt;br /&gt;
for k in xrange(extent[4], extent[5]+1):&lt;br /&gt;
  for j in xrange(extent[2], extent[3]+1):&lt;br /&gt;
    for i in xrange(extent[0], extent[1]+1):&lt;br /&gt;
      tensors.GetTuple9(idx)&lt;br /&gt;
      idx += 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change window/level (brightness/contrast) or colormap of a volume ==&lt;br /&gt;
This example shows how to change window/level of the MRHead sample volume.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
volumeNode = getNode('MRHead')&lt;br /&gt;
displayNode = volumeNode.GetDisplayNode()&lt;br /&gt;
displayNode.AutoWindowLevelOff()&lt;br /&gt;
displayNode.SetWindow(50)&lt;br /&gt;
displayNode.SetLevel(100)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change color mapping from grayscale to rainbow:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
displayNode.SetAndObserveColorNodeID('vtkMRMLColorTableNodeRainbow')&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manipulate a Slice View ==&lt;br /&gt;
&lt;br /&gt;
=== Change the slice offset ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lm = slicer.app.layoutManager()&lt;br /&gt;
red = lm.sliceWidget('Red')&lt;br /&gt;
redLogic = red.sliceLogic()&lt;br /&gt;
# Print current slice offset position&lt;br /&gt;
print redLogic.GetSliceOffset()&lt;br /&gt;
# Change slice position&lt;br /&gt;
redLogic.SetSliceOffset(20)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Iterate over current visible slice views, and modify 3D visibility ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for sliceViewName in layoutManager.sliceViewNames():&lt;br /&gt;
     sliceWidget = layoutManager.sliceWidget(sliceViewName)&lt;br /&gt;
     &lt;br /&gt;
     controller = sliceWidget.sliceController()&lt;br /&gt;
     controller.setSliceVisible(True)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Iterate over current visible slice views, and set foreground and background images ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for sliceViewName in layoutManager.sliceViewNames():&lt;br /&gt;
     sliceWidget = layoutManager.sliceWidget(sliceViewName)&lt;br /&gt;
     &lt;br /&gt;
     # setup background volume&lt;br /&gt;
     compositeNode.SetBackgroundVolumeID(MRVolume.GetID())&lt;br /&gt;
     # setup foreground volume&lt;br /&gt;
     compositeNode.SetForegroundVolumeID(CTVolume.GetID())&lt;br /&gt;
     # change opacity&lt;br /&gt;
     compositeNode.SetForegroundOpacity(0.3)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fit slice plane to markup fiducials ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sliceNode = slicer.mrmlScene.GetNodeByID(&amp;quot;vtkMRMLSliceNodeRed&amp;quot;)&lt;br /&gt;
markupsNode = slicer.mrmlScene.GetFirstNodeByName(&amp;quot;F&amp;quot;)&lt;br /&gt;
# Get markup point positions as numpy arrays&lt;br /&gt;
import numpy as np&lt;br /&gt;
p1 = np.array([0,0,0])&lt;br /&gt;
p2 = np.array([0,0,0])&lt;br /&gt;
p3 = np.array([0,0,0])&lt;br /&gt;
markupsNode.GetNthFiducialPosition(0, p1)&lt;br /&gt;
markupsNode.GetNthFiducialPosition(1, p2)&lt;br /&gt;
markupsNode.GetNthFiducialPosition(2, p3)&lt;br /&gt;
# Get plane axis directions&lt;br /&gt;
n = np.cross(p2-p1, p2-p3) # plane normal direction&lt;br /&gt;
n = n/np.linalg.norm(n)&lt;br /&gt;
t = np.cross([0, 0, 1], n) # plane transverse direction&lt;br /&gt;
t = t/np.linalg.norm(t)&lt;br /&gt;
# Set slice plane orientation and position&lt;br /&gt;
sliceNode.SetSliceToRASByNTP(n[0], n[1], n[2], t[0], t[1], t[2], p1[0], p1[1], p1[2], 0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Save a series of images from a Slice View ==&lt;br /&gt;
&lt;br /&gt;
You can use ScreenCapture module to capture series of images. To do it programmatically, save the following into a file such as '/tmp/record.py' and then in the slicer python console type &amp;quot;execfile('/tmp/record.py')&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
layoutName = 'Green'&lt;br /&gt;
imagePathPattern = '/tmp/image-%03d.png'&lt;br /&gt;
steps = 10&lt;br /&gt;
&lt;br /&gt;
widget = slicer.app.layoutManager().sliceWidget(layoutName)&lt;br /&gt;
view = widget.sliceView()&lt;br /&gt;
logic = widget.sliceLogic()&lt;br /&gt;
bounds = [0,]*6&lt;br /&gt;
logic.GetSliceBounds(bounds)&lt;br /&gt;
&lt;br /&gt;
for step in range(steps):&lt;br /&gt;
    offset = bounds[4] + step/(1.*steps) * (bounds[5]-bounds[4])&lt;br /&gt;
    logic.SetSliceOffset(offset)&lt;br /&gt;
    view.forceRender()&lt;br /&gt;
    image = qt.QPixmap.grabWidget(view).toImage()&lt;br /&gt;
    image.save(imagePathPattern % step)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Save the scene into a new directory ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Create a new directory where the scene will be saved into&lt;br /&gt;
import time&lt;br /&gt;
sceneSaveDirectory = slicer.app.temporaryPath + &amp;quot;/saved-scene-&amp;quot; + time.strftime(&amp;quot;%Y%m%d-%H%M%S&amp;quot;)&lt;br /&gt;
if not os.access(sceneSaveDirectory, os.F_OK):&lt;br /&gt;
  os.makedirs(sceneSaveDirectory)&lt;br /&gt;
&lt;br /&gt;
# Save the scene&lt;br /&gt;
if slicer.app.applicationLogic().SaveSceneToSlicerDataBundleDirectory(sceneSaveDirectory, None):&lt;br /&gt;
  logging.info(&amp;quot;Scene saved to: {0}&amp;quot;.format(sceneSaveDirectory))&lt;br /&gt;
else:&lt;br /&gt;
  logging.error(&amp;quot;Scene saving failed&amp;quot;) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Save the scene into a single MRB file ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Generate file name&lt;br /&gt;
import time&lt;br /&gt;
sceneSaveFilename = slicer.app.temporaryPath + &amp;quot;/saved-scene-&amp;quot; + time.strftime(&amp;quot;%Y%m%d-%H%M%S&amp;quot;) + &amp;quot;.mrb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Save scene&lt;br /&gt;
if slicer.util.saveScene(sceneSaveFilename):&lt;br /&gt;
  logging.info(&amp;quot;Scene saved to: {0}&amp;quot;.format(sceneSaveFilename))&lt;br /&gt;
else:&lt;br /&gt;
  logging.error(&amp;quot;Scene saving failed&amp;quot;) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Save a node to file ==&lt;br /&gt;
&lt;br /&gt;
Save a transform node to file (should work with any other node type, if file extension is set to a supported one):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
myNode = getNode(&amp;quot;LinearTransform_3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
myStorageNode = myNode.CreateDefaultStorageNode()&lt;br /&gt;
myStorageNode.SetFileName(&amp;quot;c:/tmp/something.tfm&amp;quot;)&lt;br /&gt;
myStorageNode.WriteData(myNode)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Show a volume in the Slice Views ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
volumeNode = slicer.util.getNode('YourVolumeNode')&lt;br /&gt;
applicationLogic = slicer.app.applicationLogic()&lt;br /&gt;
selectionNode = applicationLogic.GetSelectionNode()&lt;br /&gt;
selectionNode.SetSecondaryVolumeID(volumeNode.GetID())&lt;br /&gt;
applicationLogic.PropagateForegroundVolumeSelection(0) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
n =  slicer.util.getNode('YourVolumeNode')&lt;br /&gt;
for color in ['Red', 'Yellow', 'Green']:&lt;br /&gt;
    slicer.app.layoutManager().sliceWidget(color).sliceLogic().GetSliceCompositeNode().SetForegroundVolumeID(n.GetID())&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change opacity of foreground volume in the Slice Views ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lm = slicer.app.layoutManager()&lt;br /&gt;
sliceLogic = lm.sliceWidget('Red').sliceLogic()&lt;br /&gt;
compositeNode = sliceLogic.GetSliceCompositeNode()&lt;br /&gt;
compositeNode.SetForegroundOpacity(0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Center the 3D View on the Scene ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
layoutManager = slicer.app.layoutManager()&lt;br /&gt;
threeDWidget = layoutManager.threeDWidget(0)&lt;br /&gt;
threeDView = threeDWidget.threeDView()&lt;br /&gt;
threeDView.resetFocalPoint()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Rotate the 3D View==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
layoutManager = slicer.app.layoutManager()&lt;br /&gt;
threeDWidget = layoutManager.threeDWidget(0)&lt;br /&gt;
threeDView = threeDWidget.threeDView()&lt;br /&gt;
threeDView.yaw()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display text in a 3D view or slice view ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to show information overlaid on a viewer is to use corner annotations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
view=slicer.app.layoutManager().threeDWidget(0).threeDView()&lt;br /&gt;
# Set text to &amp;quot;Something&amp;quot;&lt;br /&gt;
view.cornerAnnotation().SetText(vtk.vtkCornerAnnotation.UpperRight,&amp;quot;Something&amp;quot;)&lt;br /&gt;
# Set color to red&lt;br /&gt;
view.cornerAnnotation().GetTextProperty().SetColor(1,0,0)&lt;br /&gt;
# Update the view&lt;br /&gt;
view.forceRender()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hide slice view annotations (DataProbe) ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Disable slice annotations immediately&lt;br /&gt;
slicer.modules.DataProbeInstance.infoWidget.sliceAnnotations.sliceViewAnnotationsEnabled=False&lt;br /&gt;
slicer.modules.DataProbeInstance.infoWidget.sliceAnnotations.updateSliceViewFromGUI()&lt;br /&gt;
# Disable slice annotations persistently (after Slicer restarts)&lt;br /&gt;
settings = qt.QSettings()&lt;br /&gt;
settings.setValue('DataProbe/sliceViewAnnotations.enabled', 0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Turning off interpolation ==&lt;br /&gt;
&lt;br /&gt;
You can turn off interpolation for newly loaded volumes with this script from Steve Pieper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def NoInterpolate(caller,event):&lt;br /&gt;
  for node in slicer.util.getNodes('*').values():&lt;br /&gt;
    if node.IsA('vtkMRMLScalarVolumeDisplayNode'):&lt;br /&gt;
      node.SetInterpolate(0)&lt;br /&gt;
	&lt;br /&gt;
slicer.mrmlScene.AddObserver(slicer.mrmlScene.NodeAddedEvent, NoInterpolate)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below link explains how to put this in your startup script.&lt;br /&gt;
&lt;br /&gt;
http://www.na-mic.org/Wiki/index.php/AHM2012-Slicer-Python#Refining_the_code_and_UI_with_slicerrc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Customize viewer layout ==&lt;br /&gt;
&lt;br /&gt;
Show a custom layout of a 3D view on top of the red slice view:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
customLayout = (&amp;quot;&amp;lt;layout type=\&amp;quot;vertical\&amp;quot; split=\&amp;quot;true\&amp;quot; &amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot; &amp;lt;item&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;  &amp;lt;view class=\&amp;quot;vtkMRMLViewNode\&amp;quot; singletontag=\&amp;quot;1\&amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;    &amp;lt;property name=\&amp;quot;viewlabel\&amp;quot; action=\&amp;quot;default\&amp;quot;&amp;gt;1&amp;lt;/property&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;  &amp;lt;/view&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot; &amp;lt;/item&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot; &amp;lt;item&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;  &amp;lt;view class=\&amp;quot;vtkMRMLSliceNode\&amp;quot; singletontag=\&amp;quot;Red\&amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;   &amp;lt;property name=\&amp;quot;orientation\&amp;quot; action=\&amp;quot;default\&amp;quot;&amp;gt;Axial&amp;lt;/property&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;   &amp;lt;property name=\&amp;quot;viewlabel\&amp;quot; action=\&amp;quot;default\&amp;quot;&amp;gt;R&amp;lt;/property&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;   &amp;lt;property name=\&amp;quot;viewcolor\&amp;quot; action=\&amp;quot;default\&amp;quot;&amp;gt;#F34A33&amp;lt;/property&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;  &amp;lt;/view&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot; &amp;lt;/item&amp;gt;&amp;quot;&lt;br /&gt;
  &amp;quot;&amp;lt;/layout&amp;gt;&amp;quot;)&lt;br /&gt;
  &lt;br /&gt;
customLayoutId=501&lt;br /&gt;
&lt;br /&gt;
layoutManager = slicer.app.layoutManager()&lt;br /&gt;
layoutManager.layoutLogic().GetLayoutNode().AddLayoutDescription(customLayoutId, customLayout)                                         &lt;br /&gt;
layoutManager.setLayout(customLayoutId)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See description of standard layouts (that can be used as examples) here:&lt;br /&gt;
https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Logic/vtkMRMLLayoutLogic.cxx&lt;br /&gt;
&lt;br /&gt;
== Disable certain user interactions in slice views ==&lt;br /&gt;
&lt;br /&gt;
For example, disable slice browsing using mouse wheel and keyboard shortcuts in the red slice viewer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interactorStyle = slicer.app.layoutManager().sliceWidget('Red').sliceView().sliceViewInteractorStyle()&lt;br /&gt;
interactorStyle.SetActionEnabled(interactorStyle.BrowseSlice, False)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hide all slice view controllers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lm = slicer.app.layoutManager()&lt;br /&gt;
for sliceViewName in lm.sliceViewNames():&lt;br /&gt;
  lm.sliceWidget(sliceViewName).sliceController().setVisible(False)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hide all 3D view controllers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lm = slicer.app.layoutManager()&lt;br /&gt;
for viewIndex in range(slicer.app.layoutManager().threeDViewCount):&lt;br /&gt;
  lm.threeDWidget(0).threeDController().setVisible(False)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change default slice view orientation ==&lt;br /&gt;
&lt;br /&gt;
You can left-right &amp;quot;flip&amp;quot; slice view orientation presets (show patient left side on left/right side of the screen) by copy-pasting the script below to your [[Documentation/{{documentation/version}}/Developers/FAQ/Python_Scripting#How_to_systematically_execute_custom_python_code_at_startup_.3F| .slicerrc.py file]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Axial slice axes:&lt;br /&gt;
#  1 0 0&lt;br /&gt;
#  0 1 0&lt;br /&gt;
#  0 0 1&lt;br /&gt;
axialSliceToRas=vtk.vtkMatrix3x3()&lt;br /&gt;
&lt;br /&gt;
# Coronal slice axes:&lt;br /&gt;
#  1 0 0 &lt;br /&gt;
#  0 0 -1&lt;br /&gt;
#  0 1 0&lt;br /&gt;
coronalSliceToRas=vtk.vtkMatrix3x3()&lt;br /&gt;
coronalSliceToRas.SetElement(1,1, 0)&lt;br /&gt;
coronalSliceToRas.SetElement(1,2, -1)&lt;br /&gt;
coronalSliceToRas.SetElement(2,1, 1)&lt;br /&gt;
coronalSliceToRas.SetElement(2,2, 0)&lt;br /&gt;
&lt;br /&gt;
# Replace orientation presets in all existing slice nodes and in the default slice node&lt;br /&gt;
sliceNodes = slicer.util.getNodesByClass('vtkMRMLSliceNode')&lt;br /&gt;
sliceNodes.append(slicer.mrmlScene.GetDefaultNodeByClass('vtkMRMLSliceNode'))&lt;br /&gt;
for sliceNode in sliceNodes:&lt;br /&gt;
  orientationPresetName = sliceNode.GetOrientation()&lt;br /&gt;
  sliceNode.RemoveSliceOrientationPreset(&amp;quot;Axial&amp;quot;)&lt;br /&gt;
  sliceNode.AddSliceOrientationPreset(&amp;quot;Axial&amp;quot;, axialSliceToRas)&lt;br /&gt;
  sliceNode.RemoveSliceOrientationPreset(&amp;quot;Coronal&amp;quot;)&lt;br /&gt;
  sliceNode.AddSliceOrientationPreset(&amp;quot;Coronal&amp;quot;, coronalSliceToRas)&lt;br /&gt;
  sliceNode.SetOrientation(orientationPresetName)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set all slice views linked by default ==&lt;br /&gt;
&lt;br /&gt;
You can make slice views linked by default (when application starts or the scene is cleared) by copy-pasting the script below to your [[Documentation/{{documentation/version}}/Developers/FAQ/Python_Scripting#How_to_systematically_execute_custom_python_code_at_startup_.3F| .slicerrc.py file]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Set linked slice views  in all existing slice composite nodes and in the default node&lt;br /&gt;
sliceCompositeNodes = slicer.util.getNodesByClass('vtkMRMLSliceCompositeNode')&lt;br /&gt;
defaultSliceCompositeNode = slicer.mrmlScene.GetDefaultNodeByClass('vtkMRMLSliceCompositeNode')&lt;br /&gt;
if not defaultSliceCompositeNode:&lt;br /&gt;
  defaultSliceCompositeNode = slicer.mrmlScene.CreateNodeByClass('vtkMRMLSliceCompositeNode')&lt;br /&gt;
  slicer.mrmlScene.AddDefaultNode(defaultSliceCompositeNode)&lt;br /&gt;
sliceCompositeNodes.append(defaultSliceCompositeNode)&lt;br /&gt;
for sliceCompositeNode in sliceCompositeNodes:&lt;br /&gt;
  sliceCompositeNode.SetLinkedControl(True)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Set up custom units in slice view ruler ==&lt;br /&gt;
&lt;br /&gt;
For microscopy or micro-CT images you may want to switch unit to micrometer instead of the default mm. To do that, 1. change the unit in Application settings / Units and 2. update ruler display settings using the script below (it can be copied to your Application startup script):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lm = slicer.app.layoutManager()&lt;br /&gt;
for sliceViewName in lm.sliceViewNames():&lt;br /&gt;
  sliceView = lm.sliceWidget(sliceViewName).sliceView()&lt;br /&gt;
  displayableManagerCollection = vtk.vtkCollection()&lt;br /&gt;
  sliceView.getDisplayableManagers(displayableManagerCollection)&lt;br /&gt;
  for dmIndex in xrange(displayableManagerCollection.GetNumberOfItems()):&lt;br /&gt;
    displayableManager = displayableManagerCollection.GetItemAsObject(dmIndex)&lt;br /&gt;
    if not displayableManager.IsA(&amp;quot;vtkMRMLRulerDisplayableManager&amp;quot;):&lt;br /&gt;
      continue&lt;br /&gt;
    displayableManager.RemoveAllRulerScalePresets()&lt;br /&gt;
    displayableManager.AddRulerScalePreset(   0.001, 5, 2, &amp;quot;nm&amp;quot;, 1000.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset(   0.010, 5, 2, &amp;quot;nm&amp;quot;, 1000.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset(   0.100, 5, 2, &amp;quot;nm&amp;quot;, 1000.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset(   0.500, 5, 1, &amp;quot;nm&amp;quot;, 1000.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset(   1.0,   5, 2, &amp;quot;um&amp;quot;,    1.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset(   5.0,   5, 1, &amp;quot;um&amp;quot;,    1.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset(  10.0,   5, 2, &amp;quot;um&amp;quot;,    1.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset(  50.0,   5, 1, &amp;quot;um&amp;quot;,    1.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset( 100.0,   5, 2, &amp;quot;um&amp;quot;,    1.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset( 500.0,   5, 1, &amp;quot;um&amp;quot;,    1.0)&lt;br /&gt;
    displayableManager.AddRulerScalePreset(1000.0,   5, 2, &amp;quot;mm&amp;quot;,    0.001)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Show a slice view outside the view layout ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sliceLayoutName = &amp;quot;TestSlice&amp;quot;&lt;br /&gt;
sliceLayoutLabel = &amp;quot;T&amp;quot;&lt;br /&gt;
# ownerNode manages this view instead of the layout manager (it can be any node in the scene)&lt;br /&gt;
viewOwnerNode = slicer.mrmlScene.AddNewNodeByClass(&amp;quot;vtkMRMLScriptedModuleNode&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Create MRML nodes&lt;br /&gt;
sliceNode = slicer.vtkMRMLSliceNode()&lt;br /&gt;
sliceNode.SetName(sliceLayoutName)&lt;br /&gt;
sliceNode.SetLayoutName(sliceLayoutName)&lt;br /&gt;
sliceNode.SetLayoutLabel(sliceLayoutLabel)&lt;br /&gt;
sliceNode.SetLayoutColor(1, 1, 0)&lt;br /&gt;
sliceNode.SetAndObserveParentLayoutNodeID(viewOwnerNode.GetID())&lt;br /&gt;
sliceNode = slicer.mrmlScene.AddNode(sliceNode)&lt;br /&gt;
sliceCompositeNode = slicer.mrmlScene.AddNewNodeByClass(&amp;quot;vtkMRMLSliceCompositeNode&amp;quot;)&lt;br /&gt;
sliceCompositeNode.SetLayoutName(sliceLayoutName)&lt;br /&gt;
&lt;br /&gt;
# Create widget&lt;br /&gt;
sliceWidget = slicer.qMRMLSliceWidget()&lt;br /&gt;
sliceWidget.sliceViewName = sliceLayoutName&lt;br /&gt;
sliceWidget.sliceViewLabel = sliceLayoutLabel&lt;br /&gt;
c = sliceNode.GetLayoutColor()&lt;br /&gt;
sliceWidget.sliceViewColor = qt.QColor.fromRgbF(c[0],c[1],c[2])&lt;br /&gt;
sliceWidget.setMRMLScene(slicer.mrmlScene)&lt;br /&gt;
sliceWidget.setMRMLSliceNode(sliceNode)&lt;br /&gt;
sliceWidget.show()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running an ITK filter in Python using SimpleITK ==&lt;br /&gt;
Open the &amp;quot;Sample Data&amp;quot; module and download &amp;quot;MR Head&amp;quot;, then paste the following snippet in Python interactor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import SimpleITK as sitk&lt;br /&gt;
import sitkUtils&lt;br /&gt;
inputImage = sitkUtils.PullFromSlicer('MRHead')&lt;br /&gt;
filter = sitk.SignedMaurerDistanceMapImageFilter()&lt;br /&gt;
outputImage = filter.Execute(inputImage)&lt;br /&gt;
sitkUtils.PushToSlicer(outputImage,'outputImage')&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information:&lt;br /&gt;
* See the SimpleITK documentation for SimpleITK examples: http://www.itk.org/SimpleITKDoxygen/html/examples.html&lt;br /&gt;
* sitkUtils in Slicer is used for pushing and pulling images from Slicer to SimpleITK: https://github.com/Slicer/Slicer/blob/master/Base/Python/sitkUtils.py&lt;br /&gt;
&lt;br /&gt;
== Get current mouse coordinates in a slice view ==&lt;br /&gt;
&lt;br /&gt;
You can get 3D (RAS) coordinates of the current mouse cursor from the crosshair singleton node as shown in the example below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def onMouseMoved(observer,eventid):  &lt;br /&gt;
  ras=[0,0,0]&lt;br /&gt;
  crosshairNode.GetCursorPositionRAS(ras)&lt;br /&gt;
  print(ras)&lt;br /&gt;
&lt;br /&gt;
crosshairNode=slicer.util.getNode('Crosshair') &lt;br /&gt;
crosshairNode.AddObserver(slicer.vtkMRMLCrosshairNode.CursorPositionModifiedEvent, onMouseMoved)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get DataProbe text ==&lt;br /&gt;
&lt;br /&gt;
You can get the mouse location in pixel coordinates along with the pixel value at the mouse by hitting the '.' (period) key in a slice view after pasting in the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def printDataProbe():&lt;br /&gt;
  infoWidget = slicer.modules.DataProbeInstance.infoWidget&lt;br /&gt;
  for layer in ('B', 'F', 'L'):&lt;br /&gt;
    print(infoWidget.layerNames[layer].text, infoWidget.layerIJKs[layer].text, infoWidget.layerValues[layer].text)&lt;br /&gt;
&lt;br /&gt;
s = qt.QShortcut(qt.QKeySequence('.'), mainWindow())&lt;br /&gt;
s.connect('activated()', printDataProbe)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Thick slab reconstruction and maximum/minimum intensity volume projections ==&lt;br /&gt;
&lt;br /&gt;
Set up 'red' slice viewer to show thick slab reconstructed from 3 slices:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sliceNode = slicer.mrmlScene.GetNodeByID('vtkMRMLSliceNodeRed')&lt;br /&gt;
appLogic = slicer.app.applicationLogic()&lt;br /&gt;
sliceLogic = appLogic.GetSliceLogic(sliceNode)&lt;br /&gt;
sliceLayerLogic = sliceLogic.GetBackgroundLayer()&lt;br /&gt;
reslice = sliceLayerLogic.GetReslice()&lt;br /&gt;
reslice.SetSlabModeToMean()&lt;br /&gt;
reslice.SetSlabNumberOfSlices(10) # mean of 10 slices will computed&lt;br /&gt;
reslice.SetSlabSliceSpacingFraction(0.3) # spacing between each slice is 0.3 pixel (total 10 * 0.3 = 3 pixel neighborhood)&lt;br /&gt;
sliceNode.Modified()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set up 'red' slice viewer to show maximum intensity projection (MIP):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sliceNode = slicer.mrmlScene.GetNodeByID('vtkMRMLSliceNodeRed')&lt;br /&gt;
appLogic = slicer.app.applicationLogic()&lt;br /&gt;
sliceLogic = appLogic.GetSliceLogic(sliceNode)&lt;br /&gt;
sliceLayerLogic = sliceLogic.GetBackgroundLayer()&lt;br /&gt;
reslice = sliceLayerLogic.GetReslice()&lt;br /&gt;
reslice.SetSlabModeToMax()&lt;br /&gt;
reslice.SetSlabNumberOfSlices(600) # use a large number of slices (600) to cover the entire volume&lt;br /&gt;
reslice.SetSlabSliceSpacingFraction(0.5) # spacing between slices are 0.5 pixel (supersampling is useful to reduce interpolation artifacts)&lt;br /&gt;
sliceNode.Modified()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The projected image is available in a ''vtkImageData'' object by calling ''reslice.GetOutput()''.&lt;br /&gt;
&lt;br /&gt;
== Change default file type for nodes (that have never been saved yet) ==&lt;br /&gt;
Default node can be specified that will be used as a basis of all new storage nodes. This can be used for setting default file extension. For example, change file format to STL for model nodes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
defaultModelStorageNode = slicer.vtkMRMLModelStorageNode()&lt;br /&gt;
defaultModelStorageNode.SetDefaultWriteFileExtension('stl')&lt;br /&gt;
slicer.mrmlScene.AddDefaultNode(defaultModelStorageNode)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To permanently change default file extension on your computer, copy-paste the code above into your application startup script (you can find its location in menu: Edit / Application settings / General / Application startup script).&lt;br /&gt;
&lt;br /&gt;
== Change file type for saving for all volumes (with already existing storage nodes) ==&lt;br /&gt;
&lt;br /&gt;
If it is not necessary to preserve file paths then the simplest is to configure default storage node (as shown in the example above), then delete all existing storage nodes. When save dialog is opened, default storage nodes will be recreated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Delete existing model storage nodes so that they will be recreated with default settings&lt;br /&gt;
existingModelStorageNodes = slicer.util.getNodesByClass('vtkMRMLModelStorageNode')&lt;br /&gt;
for modelStorageNode in existingModelStorageNodes:&lt;br /&gt;
  slicer.mrmlScene.RemoveNode(modelStorageNode)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To update existing storage nodes to use new file extension (but keep all other parameters unchanged) you can use this approach (example is for volume storage):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
requiredFileExtension = '.nia'&lt;br /&gt;
originalFileExtension = '.nrrd'&lt;br /&gt;
volumeNodes = slicer.util.getNodesByClass('vtkMRMLScalarVolumeNode')&lt;br /&gt;
for volumeNode in volumeNodes:&lt;br /&gt;
  volumeStorageNode = volumeNode.GetStorageNode()&lt;br /&gt;
  if not volumeStorageNode:&lt;br /&gt;
    volumeNode.AddDefaultStorageNode()&lt;br /&gt;
    volumeStorageNode = volumeNode.GetStorageNode()&lt;br /&gt;
    volumeStorageNode.SetFileName(volumeNode.GetName()+requiredFileExtension)&lt;br /&gt;
  else:&lt;br /&gt;
    volumeStorageNode.SetFileName(volumeStorageNode.GetFileName().replace(originalFileExtension, requiredFileExtension))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Segmentations ==&lt;br /&gt;
&lt;br /&gt;
=== Create a segmentation from a labelmap volume and display in 3D ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
labelmapVolumeNode = getNode('label')&lt;br /&gt;
seg = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLSegmentationNode')&lt;br /&gt;
slicer.modules.segmentations.logic().ImportLabelmapToSegmentationNode(labelmapVolumeNode, seg)&lt;br /&gt;
seg.CreateClosedSurfaceRepresentation()&lt;br /&gt;
slicer.mrmlScene.RemoveNode(labelmapVolumeNode)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last line is optional. It removes the original labelmap volume so that the same information is not shown twice.&lt;br /&gt;
&lt;br /&gt;
=== Export labelmap node from segmentation node ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seg = getNode('Segmentation')&lt;br /&gt;
labelmapVolumeNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLLabelMapVolumeNode')&lt;br /&gt;
slicer.modules.segmentations.logic().ExportAllSegmentsToLabelmapNode(seg, labelmapVolumeNode)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Export model nodes from segmentation node ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seg = getNode('Segmentation')&lt;br /&gt;
exportedModelsNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLModelHierarchyNode')&lt;br /&gt;
slicer.modules.segmentations.logic().ExportAllSegmentsToModelHierarchy(seg, exportedModelsNode)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Show a segmentation in 3D ===&lt;br /&gt;
Segmentation can only be shown in 3D if closed surface representation (or other 3D-displayable representation) is available. To create closed surface representation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
segmentation.CreateClosedSurfaceRepresentation()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get a representation of a segment ===&lt;br /&gt;
Access binary labelmap stored in a segmentation node (without exporting it to a volume node) - if it does not exist, it will return None:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
image = segmentationNode.GetBinaryLabelmapRepresentation(segmentID)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Get closed surface, if it does not exist, it will return None:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
polydata = segmentationNode.GetClosedSurfaceRepresentation(segmentID)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Get binary labelmap representation. If it does not exist then it will be created for that single segment. Applies parent transforms by default (if not desired, another argument needs to be added to the end: false):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import vtkSegmentationCorePython as vtkSegmentationCore&lt;br /&gt;
outputOrientedImageData = vtkSegmentationCore.vtkOrientedImageData()&lt;br /&gt;
slicer.vtkSlicerSegmentationsModuleLogic.GetSegmentBinaryLabelmapRepresentation(segmentationNode, segmentID, outputOrientedImageData)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Same as above, for closed surface representation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
outputPolyData = vtk.vtkPolyData()&lt;br /&gt;
slicer.vtkSlicerSegmentationsModuleLogic.GetSegmentClosedSurfaceRepresentation(segmentationNode, segmentID, outputPolyData)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Convert all segments using default path and conversion parameters ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
segmentationNode.CreateBinaryLabelmapRepresentation()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Convert all segments using custom path or conversion parameters ===&lt;br /&gt;
Change reference image geometry parameter based on an existing referenceImageData image:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import vtkSegmentationCorePython as vtkSegmentationCore&lt;br /&gt;
referenceGeometry = vtkSegmentationCore.vtkSegmentationConverter.SerializeImageGeometry(referenceImageData)&lt;br /&gt;
segmentation.SetConversionParameter(vtkSegmentationCore.vtkSegmentationConverter.GetReferenceImageGeometryParameterName(), referenceGeometry)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Re-convert using a modified conversion parameter ===&lt;br /&gt;
Changing smoothing factor for closed surface generation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import vtkSegmentationCorePython as vtkSegmentationCore&lt;br /&gt;
segmentation = getNode('Segmentation').GetSegmentation()&lt;br /&gt;
&lt;br /&gt;
# Turn of surface smoothing&lt;br /&gt;
segmentation.SetConversionParameter('Smoothing factor','0.0')&lt;br /&gt;
&lt;br /&gt;
# Recreate representation using modified parameters (and default conversion path)&lt;br /&gt;
segmentation.RemoveRepresentation(vtkSegmentationCore.vtkSegmentationConverter.GetSegmentationClosedSurfaceRepresentationName())&lt;br /&gt;
segmentation.CreateRepresentation(vtkSegmentationCore.vtkSegmentationConverter.GetSegmentationClosedSurfaceRepresentationName())&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How to run segment editor effects from a script ===&lt;br /&gt;
&lt;br /&gt;
Editor effects are complex because they need to handle changing master volumes, undo/redo, masking operations, etc. Therefore, instead of using a segment editor effect, it is simpler to run the underlying filters directly from script.&lt;br /&gt;
&lt;br /&gt;
This example demonstrates how to use Segment editor effects (without GUI, using qMRMLSegmentEditorWidget):&lt;br /&gt;
&lt;br /&gt;
* [https://gist.github.com/lassoan/2d5a5b73645f65a5eb6f8d5f97abf31b brain tumor segmentation using grow from seeds effect]&lt;br /&gt;
* [https://gist.github.com/lassoan/1673b25d8e7913cbc245b4f09ed853f9 skin surface extraction using thresholding and smoothing]&lt;br /&gt;
* [https://gist.github.com/lassoan/2f5071c562108dac8efe277c78f2620f mask a volume with segments and compute histogram for each region]&lt;br /&gt;
&lt;br /&gt;
This example shows how to perform operations on segmentations using VTK filters:&lt;br /&gt;
* [https://gist.github.com/lassoan/7c94c334653010696b2bf96abc0ac8e7 brain tumor segmentation using grow from seeds effect]&lt;br /&gt;
&lt;br /&gt;
== Accessing views, renderers, and cameras ==&lt;br /&gt;
&lt;br /&gt;
Iterate through all 3D views in current layout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
layoutManager = slicer.app.layoutManager()&lt;br /&gt;
for threeDViewIndex in range(layoutManager.threeDViewCount) :&lt;br /&gt;
  view = layoutManager.threeDWidget(threeDViewIndex).threeDView()&lt;br /&gt;
  threeDViewNode = view.mrmlViewNode()&lt;br /&gt;
  cameraNode = slicer.modules.cameras.logic().GetViewActiveCameraNode(threeDViewNode)&lt;br /&gt;
  print('View node for 3D widget ' + str(threeDViewIndex))&lt;br /&gt;
  print('  Name: ' + threeDViewNode .GetName())&lt;br /&gt;
  print('  ID: ' + threeDViewNode .GetID())&lt;br /&gt;
  print('  Camera ID: ' + cameraNode.GetID())&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Iterate through all slice views in current layout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
layoutManager = slicer.app.layoutManager()&lt;br /&gt;
for sliceViewName in layoutManager.sliceViewNames():&lt;br /&gt;
  view = layoutManager.sliceWidget(sliceViewName).sliceView()&lt;br /&gt;
  sliceNode = view.mrmlSliceNode()&lt;br /&gt;
  sliceLogic = slicer.app.applicationLogic().GetSliceLogic(sliceNode)&lt;br /&gt;
  compositeNode = sliceLogic.GetSliceCompositeNode()&lt;br /&gt;
  print('Slice view ' + str(sliceViewName))&lt;br /&gt;
  print('  Name: ' + sliceNode.GetName())&lt;br /&gt;
  print('  ID: ' + sliceNode.GetID())&lt;br /&gt;
  print('  Background volume: {0}'.format(compositeNode.GetBackgroundVolumeID()))&lt;br /&gt;
  print('  Foreground volume: {0} (opacity: {1})'.format(compositeNode.GetForegroundVolumeID(), compositeNode.GetForegroundOpacity()))&lt;br /&gt;
  print('  Label volume: {0} (opacity: {1})'.format(compositeNode.GetLabelVolumeID(), compositeNode.GetLabelOpacity()))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For low-level manipulation of views, it is possible to access VTK render windows, renderers and cameras of views in the current layout.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
renderWindow = view.renderWindow()&lt;br /&gt;
renderers = renderWindow.GetRenderers()&lt;br /&gt;
renderer = renderers.GetItemAsObject(0)&lt;br /&gt;
camera = cameraNode.GetCamera()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change 3D view background color ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
renderWindow = slicer.app.layoutManager().threeDWidget(0).threeDView().renderWindow()&lt;br /&gt;
renderer = renderWindow.GetRenderers().GetFirstRenderer()&lt;br /&gt;
renderer.SetBackground(1,0,0)&lt;br /&gt;
renderer.SetBackground2(1,0,0)&lt;br /&gt;
renderWindow.Render()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Subject hierarchy == &lt;br /&gt;
==== Get the pseudo-singleton subject hierarchy node ====&lt;br /&gt;
It manages the whole hierarchy and provides functions to access and manipulate&lt;br /&gt;
  shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)&lt;br /&gt;
&lt;br /&gt;
==== Create subject hierarchy item ====&lt;br /&gt;
  # If it is for a data node, it is automatically created, but the create function can be used to set parent:&lt;br /&gt;
  shNode.CreateItem(parentItemID, dataNode)&lt;br /&gt;
  # If it is a hierarchy item without a data node, then the create function must be used:&lt;br /&gt;
  shNode.CreateSubjectItem(parentItemID, name)&lt;br /&gt;
  shNode.CreateFolderItem(parentItemID, name)&lt;br /&gt;
  shNode.CreateHierarchyItem(parentItemID, name, level) # Advanced method to set level attribute manually (usually subject, study, or folder, but it can be a virtual branch for example)&lt;br /&gt;
&lt;br /&gt;
==== Get subject hierarchy item ====&lt;br /&gt;
Items in subject hierarchy are uniquely identified by integer IDs&lt;br /&gt;
  # Get scene item ID first because it is the root item:&lt;br /&gt;
  sceneItemID = shNode.GetSceneItemID()&lt;br /&gt;
  # Get direct child by name&lt;br /&gt;
  subjectItemID = shNode.GetItemChildWithName(sceneItemID, 'Subject_1')&lt;br /&gt;
  # Get item for data node&lt;br /&gt;
  itemID = shNode.GetItemByDataNode(dataNode)&lt;br /&gt;
  # Get item by UID (such as DICOM)&lt;br /&gt;
  itemID = shNode.GetItemByUID(slicer.vtkMRMLSubjectHierarchyConstants.GetDICOMUIDName(), seriesInstanceUid)&lt;br /&gt;
  itemID = shNode.GetItemByUIDList(slicer.vtkMRMLSubjectHierarchyConstants.GetDICOMInstanceUIDName(), instanceUID)&lt;br /&gt;
  # Invalid item ID for checking validity of a given ID (most functions return the invalid ID when item is not found)&lt;br /&gt;
  invalidItemID = slicer.vtkMRMLSubjectHierarchyNode.GetInvalidItemID()&lt;br /&gt;
&lt;br /&gt;
==== Traverse children of a subject hierarchy item ====&lt;br /&gt;
  children = vtk.vtkIdList()&lt;br /&gt;
  shNode.GetItemChildren(parent, children)&lt;br /&gt;
  for i in xrange(children.GetNumberOfIds()):&lt;br /&gt;
    child = children.GetId(i)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
==== Manipulate subject hierarchy item ====&lt;br /&gt;
Instead of node operations on the individual subject hierarchy nodes, item operations are performed on the one subject hierarchy node.&lt;br /&gt;
  # Set item name&lt;br /&gt;
  shNode.SetItemName(itemID, 'NewName')&lt;br /&gt;
  # Set item parent (reparent)&lt;br /&gt;
  shNode.SetItemParent(itemID, newParentItemID)&lt;br /&gt;
  # Set visibility of data nodes associated to items in a branch (or a leaf item)&lt;br /&gt;
  shNode.SetDisplayVisibilityForBranch(itemID, 1)&lt;br /&gt;
&lt;br /&gt;
==== Filter items in TreeView or ComboBox ====&lt;br /&gt;
Displayed items can be filtered using ''setAttributeFilter'' method. An example of the usage can be found in the  [https://github.com/Slicer/Slicer/blob/e66e3b08e35384526528e6ae678e9ec9f079f286/Applications/SlicerApp/Testing/Python/SubjectHierarchyGenericSelfTest.py#L352-L360 unit test]. Modified version here:&lt;br /&gt;
    print shTreeView.displayedItemCount() # 5&lt;br /&gt;
    shTreeView.setAttributeFilter('DICOM.Modality') # Nodes must have this attribute&lt;br /&gt;
    print shTreeView.displayedItemCount() # 3&lt;br /&gt;
    shTreeView.setAttributeFilter('DICOM.Modality','CT') # Have attribute and equal 'CT'&lt;br /&gt;
    print shTreeView.displayedItemCount() # 1&lt;br /&gt;
    shTreeView.removeAttributeFilter()&lt;br /&gt;
    print shTreeView.displayedItemCount() # 5&lt;br /&gt;
&lt;br /&gt;
=== Listen to subject hierarchy item events ===&lt;br /&gt;
The subject hierarchy node sends the node item id as calldata. Item IDs are vtkIdType, which are NOT vtkObjects. You need to use vtk.calldata_type(vtk.VTK_LONG) (otherwise the application crashes).&lt;br /&gt;
  &lt;br /&gt;
  class MyListenerClass(VTKObservationMixin):&lt;br /&gt;
    def __init__(self):&lt;br /&gt;
      VTKObservationMixin.__init__(self)&lt;br /&gt;
      &lt;br /&gt;
      shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)&lt;br /&gt;
      self.addObserver(shNode, shNode.SubjectHierarchyItemModifiedEvent, self.shItemModifiedEvent)&lt;br /&gt;
     &lt;br /&gt;
    @vtk.calldata_type(vtk.VTK_LONG) &lt;br /&gt;
    def shItemModifiedEvent(self, caller, eventId, callData):&lt;br /&gt;
      print(&amp;quot;SH Node modified&amp;quot;)&lt;br /&gt;
      print(&amp;quot;SH item ID: {0}&amp;quot;.format(callData))&lt;br /&gt;
&lt;br /&gt;
== Plotting ==&lt;br /&gt;
&lt;br /&gt;
=== Create histogram plot of a volume ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Get a volume from SampleData&lt;br /&gt;
import SampleData&lt;br /&gt;
volumeNode = SampleData.SampleDataLogic().downloadMRHead()&lt;br /&gt;
&lt;br /&gt;
# Compute histogram values&lt;br /&gt;
import numpy as np&lt;br /&gt;
histogram = np.histogram(arrayFromVolume(volumeNode), bins=50)&lt;br /&gt;
&lt;br /&gt;
# Save results to a new table node&lt;br /&gt;
tableNode=slicer.mrmlScene.AddNewNodeByClass(&amp;quot;vtkMRMLTableNode&amp;quot;)&lt;br /&gt;
updateTableFromArray(tableNode, histogram)&lt;br /&gt;
tableNode.GetTable().GetColumn(0).SetName(&amp;quot;Count&amp;quot;)&lt;br /&gt;
tableNode.GetTable().GetColumn(1).SetName(&amp;quot;Intensity&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Create plot&lt;br /&gt;
plotSeriesNode = slicer.mrmlScene.AddNewNodeByClass(&amp;quot;vtkMRMLPlotSeriesNode&amp;quot;, volumeNode.GetName() + ' histogram')&lt;br /&gt;
plotSeriesNode.SetAndObserveTableNodeID(tableNode.GetID())&lt;br /&gt;
plotSeriesNode.SetXColumnName(&amp;quot;Intensity&amp;quot;)&lt;br /&gt;
plotSeriesNode.SetYColumnName(&amp;quot;Count&amp;quot;)&lt;br /&gt;
plotSeriesNode.SetPlotType(plotSeriesNode.PlotTypeScatterBar)&lt;br /&gt;
plotSeriesNode.SetColor(0, 0.6, 1.0)&lt;br /&gt;
&lt;br /&gt;
# Create chart and add plot&lt;br /&gt;
plotChartNode = slicer.mrmlScene.AddNewNodeByClass(&amp;quot;vtkMRMLPlotChartNode&amp;quot;)&lt;br /&gt;
plotChartNode.AddAndObservePlotSeriesNodeID(plotSeriesNode.GetID())&lt;br /&gt;
plotChartNode.YAxisRangeAutoOff()&lt;br /&gt;
plotChartNode.SetYAxisRange(0, 500000)&lt;br /&gt;
&lt;br /&gt;
# Show plot in layout&lt;br /&gt;
slicer.modules.plots.logic().ShowChartInLayout(plotChartNode)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Execute external applications ==&lt;br /&gt;
&lt;br /&gt;
How to run external applications from Slicer.&lt;br /&gt;
&lt;br /&gt;
=== Run process in default environment ===&lt;br /&gt;
&lt;br /&gt;
When a process is launched from Slicer then by default Slicer's ITK, VTK, Qt, etc. libraries are used. If an external application has its own version of these libraries, then the application is expected to crash. To prevent crashing, the application must be run in the environment where Slicer started up (without all Slicer-specific library paths). This startup environment can be retrieved using ''slicer.util.startupEnvironment()''.&lt;br /&gt;
&lt;br /&gt;
Example: run Python3 script from Slicer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
command_to_execute = [&amp;quot;/usr/bin/python3&amp;quot;, &amp;quot;-c&amp;quot;, &amp;quot;print('hola')&amp;quot;]&lt;br /&gt;
from subprocess import check_output&lt;br /&gt;
check_output(&lt;br /&gt;
  command_to_execute, &lt;br /&gt;
  env=slicer.util.startupEnvironment()&lt;br /&gt;
  )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
'hola\n'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On some systems, ''shell=True'' must be specified as well.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/FAQ/Python_Scripting&amp;diff=59101</id>
		<title>Documentation/Nightly/Developers/FAQ/Python Scripting</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/FAQ/Python_Scripting&amp;diff=59101"/>
		<updated>2018-06-11T15:04:27Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Why can't I access my C++ Qt class from python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;__TOC__&lt;br /&gt;
={{#titleparts: {{PAGENAME}} | | -1 }}=&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&lt;br /&gt;
='''Developer FAQ: {{{1}}}'''=&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to access a scripted module from python scripts ==&lt;br /&gt;
&lt;br /&gt;
All slicer modules are accessible in the &amp;lt;code&amp;gt;slicer.modules&amp;lt;/code&amp;gt; namespace. For example, ''sampledata'' module can be accessed as &amp;lt;code&amp;gt;slicer.modules.sampledata&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To access a module's widget, use &amp;lt;code&amp;gt;widgetRepresentation()&amp;lt;/code&amp;gt; method to get the C++ base class and its &amp;lt;code&amp;gt;self()&amp;lt;/code&amp;gt; method to get the Python class. For example, &amp;lt;code&amp;gt;slicer.modules.sampledata.widgetRepresentation().self()&amp;lt;/code&amp;gt; returns the Python widget object of ''sampledata'' module.&lt;br /&gt;
&lt;br /&gt;
== How to systematically execute custom python code at startup ? ==&lt;br /&gt;
&lt;br /&gt;
Each time Slicer starts, it will look up for a file named &amp;lt;code&amp;gt;.slicerrc.py&amp;lt;/code&amp;gt; in your HOME folder. (See [[Documentation/{{documentation/version}}/FAQ/General#What_is_my_HOME_folder_.3F|What is my HOME folder ?]])&lt;br /&gt;
&lt;br /&gt;
Alternatively, set an environment variable named &amp;lt;tt&amp;gt;SLICERRC&amp;lt;/tt&amp;gt; to the full path of a Python file to run at startup.&lt;br /&gt;
&lt;br /&gt;
You can see the path to your &amp;lt;code&amp;gt;.slicerrc.py&amp;lt;/code&amp;gt; file and edit it if you start Slicer and open in the menu: Edit / Application Settings. ''Application startup script'' is in the General section.&lt;br /&gt;
&lt;br /&gt;
== How to save an image/volume using python ? ==&lt;br /&gt;
&lt;br /&gt;
The module &amp;lt;code&amp;gt;slicer.util&amp;lt;/code&amp;gt; provides methods allowing to save either a node or an entire scene:&lt;br /&gt;
* saveNode&lt;br /&gt;
* saveScene&lt;br /&gt;
&lt;br /&gt;
For more details see:&lt;br /&gt;
* https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/util.py#L229-267&lt;br /&gt;
* https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/tests/test_slicer_util_save.py&lt;br /&gt;
&lt;br /&gt;
=== Enable or disable compression while saving a volume ===&lt;br /&gt;
&lt;br /&gt;
While volumes can be accessed in Slicer Python modules as vtkMRMLVolumeNode, compression preference (or any other property for that matter) should be passed to slicer.util.saveNode function. The property will be passed to Slicer's storage node. For compression set the &amp;lt;code&amp;gt;useCompression&amp;lt;/code&amp;gt; to 0 or 1. Example script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
properties['useCompression'] = 0; #do not compress&lt;br /&gt;
file_path = os.path.join(case_dir, file_name)&lt;br /&gt;
slicer.util.saveNode(node, file_path, properties)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to assign a volume to a Slice view ? ==&lt;br /&gt;
&lt;br /&gt;
Assuming the &amp;lt;code&amp;gt;MRHead&amp;lt;/code&amp;gt; sample data has been loaded, you could do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
red_logic = slicer.app.layoutManager().sliceWidget(&amp;quot;Red&amp;quot;).sliceLogic()&lt;br /&gt;
red_cn = red_logic.GetSliceCompositeNode()&lt;br /&gt;
red_logic.GetSliceCompositeNode().SetBackgroundVolumeID(slicer.util.getNode('MRHead').GetID())&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Discussion: http://slicer-devel.65872.n3.nabble.com/Assign-volumes-to-views-tt4028694.html&lt;br /&gt;
&lt;br /&gt;
== How to access vtkRenderer in Slicer 3D view ? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
renderer = slicer.app.layoutManager().threeDWidget(0).threeDView().renderWindow().GetRenderers().GetFirstRenderer()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to get VTK rendering backend ? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
backend = slicer.app.layoutManager().threeDWidget(0).threeDView().renderWindow().GetRenderingBackend()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to access displayable manager associated with a Slicer 2D or 3D view ? ==&lt;br /&gt;
&lt;br /&gt;
As originally explained [http://slicer-devel.65872.n3.nabble.com/How-to-get-the-point-of-a-3D-model-based-on-the-fiducial-position-td4031760.html#a4031762 here], you could use the method &amp;lt;code&amp;gt;getDisplayableManagers()&amp;lt;/code&amp;gt; available in any [{{doxygen-class-url|qMRMLThreeDView}} qMRMLThreeDView] and [{{doxygen-class-url|qMRMLSliceView}} qMRMLSliceView].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lm = slicer.app.layoutManager()&lt;br /&gt;
for v in range(lm.threeDViewCount):&lt;br /&gt;
  td = lm.threeDWidget(v)&lt;br /&gt;
  ms = vtk.vtkCollection()&lt;br /&gt;
  td.getDisplayableManagers(ms)&lt;br /&gt;
  for i in range(ms.GetNumberOfItems()):&lt;br /&gt;
   m = ms.GetItemAsObject(i)&lt;br /&gt;
   if m.GetClassName() == &amp;quot;vtkMRMLModelDisplayableManager&amp;quot;:&lt;br /&gt;
     print(m)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to center the 3D view on the scene ? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
layoutManager = slicer.app.layoutManager()&lt;br /&gt;
threeDWidget = layoutManager.threeDWidget(0)&lt;br /&gt;
threeDView = threeDWidget.threeDView()&lt;br /&gt;
threeDView.resetFocalPoint()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Should I use 'old style' or 'new style' python classes in my scripted module ? ==&lt;br /&gt;
&lt;br /&gt;
When python classes have no superclass specified they are 'old style' as described here [http://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes].&lt;br /&gt;
&lt;br /&gt;
In general it doesn't matter for the classes in a scripted module, since they won't be subclassed either old or new style should be the same.&lt;br /&gt;
&lt;br /&gt;
For other python code in slicer where you might be subclassing, it's better to use new style classes.  See the class hierarchies in the [https://github.com/Slicer/Slicer/tree/master/Modules/Scripted/EditorLib EditorLib] and the [https://github.com/Slicer/Slicer/tree/master/Modules/Scripted/DICOM/DICOMLib DICOMLib] for examples.&lt;br /&gt;
&lt;br /&gt;
== How to harden a transform ? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; n = getNode('Bone')&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; logic = slicer.vtkSlicerTransformLogic()&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; logic.hardenTransform(n)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Discussion: http://slicer-devel.65872.n3.nabble.com/Scripting-hardened-transforms-tt4029456.html&lt;br /&gt;
&lt;br /&gt;
== Where can I find example scripts? ==&lt;br /&gt;
&lt;br /&gt;
Have a look at [[Documentation/{{documentation/version}}/ScriptRepository]].&lt;br /&gt;
&lt;br /&gt;
== How can I use a visual debugger for step-by-step debugging ==&lt;br /&gt;
&lt;br /&gt;
===Debugging using PyCharm or PyDev===&lt;br /&gt;
Visual debugging (setting breakpoints, execute code step-by-step, view variables, stack, etc.) of Python scripted module is possible by using [https://www.jetbrains.com/pycharm/ PyCharm] or [http://pydev.org/ PyDev] by using the ''Python debugger'' module [[Documentation/{{documentation/version}}/Extensions/DebuggingTools|Debugging tools]] extension.&lt;br /&gt;
&lt;br /&gt;
'''See detailed instructions at the [[Documentation/{{documentation/version}}/Extensions/DebuggingTools|Debugging tools extension page]].'''&lt;br /&gt;
[[File:PyDevRemoteDebugSlicer.png|800px|thumb|center|Visual debugging of Python modules in Slicer]]&lt;br /&gt;
&lt;br /&gt;
===Debugging using Visual Studio===&lt;br /&gt;
On Windows, [https://github.com/Microsoft/PTVS Python Tools for Visual Studio] (PTVS) enables debugging Python inside Visual Studio. Its remote debugging capability allows attaching the debugger to Slicer's embedded Python environment.&lt;br /&gt;
&lt;br /&gt;
See [[Documentation/{{documentation/version}}/Developers/Tutorials/Debugging_Python_in_Visual_Studio | Debugging Python in Visual Studio]] for details.&lt;br /&gt;
&lt;br /&gt;
===Debugging using remote-pdb===&lt;br /&gt;
&lt;br /&gt;
A command line debugging session with a [https://docs.python.org/3/library/pdb.html pdb] interface can be achieved with [https://github.com/ionelmc/python-remote-pdb python-remote-pdb].&lt;br /&gt;
&lt;br /&gt;
Install python-remote-pdb into Slicer's Python:&lt;br /&gt;
&lt;br /&gt;
  git clone https://github.com/ionelmc/python-remote-pdb.git&lt;br /&gt;
  cd python-remote-pdb&lt;br /&gt;
  /path/to/Slicer-build/Slicer-build/Slicer ./setup.py install&lt;br /&gt;
&lt;br /&gt;
Then, call ''set_trace()'' where you want to start the debugger.&lt;br /&gt;
&lt;br /&gt;
  from remote_pdb import set_trace; set_trace()&lt;br /&gt;
&lt;br /&gt;
In the console where Slicer was started, a message like the following will be printed:&lt;br /&gt;
&lt;br /&gt;
  RemotePdb session open at 127.0.0.1:1234, waiting for connection&lt;br /&gt;
&lt;br /&gt;
In another terminal, connect with telnet:&lt;br /&gt;
&lt;br /&gt;
  telnet 127.0.0.1 1234&lt;br /&gt;
&lt;br /&gt;
or socat (has history, readline support):&lt;br /&gt;
&lt;br /&gt;
  socat readline tcp:127.0.0.1:1234&lt;br /&gt;
&lt;br /&gt;
== Why can't I access my C++ Qt class from python ==&lt;br /&gt;
* Python wrapping of a Qt class requires a Qt style constructor with QObject as argument (it can be defaulted to null though), which is public. If one of these are missing, python wrapping will fail for that class&lt;br /&gt;
* You cannot access your custom C++ Qt classes from python outside of the scope of your python class. This will not work:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import qt&lt;br /&gt;
import slicer&lt;br /&gt;
from slicer.util import VTKObservationMixin&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
BarIDRole = slicer.qFooItemDelegate.LastRole + 1&lt;br /&gt;
&lt;br /&gt;
class BarTableWidget(qt.QTableWidget, VTKObservationMixin):&lt;br /&gt;
    # ---------------------------------------------------------------------------&lt;br /&gt;
    def __init__(self, *args, **kwargs):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Specialized QTableWidget displaying ... &lt;br /&gt;
        [...]&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import qt&lt;br /&gt;
import slicer&lt;br /&gt;
from slicer.util import VTKObservationMixin&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
class BarTableWidget(qt.QTableWidget, VTKObservationMixin):&lt;br /&gt;
    # ---------------------------------------------------------------------------&lt;br /&gt;
    def __init__(self, *args, **kwargs):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Specialized QTableWidget displaying ... &lt;br /&gt;
        [...]&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        self.BarIDRole = slicer.qFooItemDelegate.LastRole + 1&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [Other reasons go here]&lt;br /&gt;
&lt;br /&gt;
== Can I use factory method like CreateNodeByClass or GetNodesByClass ? ==&lt;br /&gt;
&lt;br /&gt;
See [[Documentation/{{documentation/version}}/Developers/Tutorials/MemoryManagement#Factory_methods]]&lt;br /&gt;
&lt;br /&gt;
== How can I access callData argument in a VTK object observer callback function ==&lt;br /&gt;
&lt;br /&gt;
To get notification about an event emitted by a VTK object you can simply use the AddObserver method, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def sceneModifiedCallback(caller, eventId):&lt;br /&gt;
  print(&amp;quot;Scene modified&amp;quot;)&lt;br /&gt;
  print(&amp;quot;There are {0} nodes in the scene&amp;quot;. format(slicer.mrmlScene.GetNumberOfNodes()))&lt;br /&gt;
&lt;br /&gt;
sceneModifiedObserverTag = slicer.mrmlScene.AddObserver(vtk.vtkCommand.ModifiedEvent, sceneModifiedCallback)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an event also contains additional information as CallData then the type of this argument has to be specified as well, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@vtk.calldata_type(vtk.VTK_OBJECT)&lt;br /&gt;
def nodeAddedCallback(caller, eventId, callData):&lt;br /&gt;
  print(&amp;quot;Node added&amp;quot;)&lt;br /&gt;
  print(&amp;quot;New node: {0}&amp;quot;.format(callData.GetName()))&lt;br /&gt;
&lt;br /&gt;
nodeAddedModifiedObserverTag = slicer.mrmlScene.AddObserver(slicer.vtkMRMLScene.NodeAddedEvent, nodeAddedCallback)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: @vtk.calldata_type is a Python decorator, which modifies properties of a function that is declared right after the decorator. The decorator is defined in VTK (in Wrapping\Python\vtk\util\misc.py).&lt;br /&gt;
&lt;br /&gt;
Usage from a class requires an extra step of creating the callback in the class __init__ function, as Python2 by default does some extra wrapping (http://stackoverflow.com/questions/9523370/adding-attributes-to-instance-methods-in-python):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class MyClass:&lt;br /&gt;
  def __init__(self):&lt;br /&gt;
    from functools import partial&lt;br /&gt;
    def nodeAddedCallback(self, caller, eventId, callData):&lt;br /&gt;
      print(&amp;quot;Node added&amp;quot;)&lt;br /&gt;
      print(&amp;quot;New node: {0}&amp;quot;.format(callData.GetName()))&lt;br /&gt;
    self.nodeAddedCallback = partial(nodeAddedCallback, self)&lt;br /&gt;
    self.nodeAddedCallback.CallDataType = vtk.VTK_OBJECT&lt;br /&gt;
  def registerCallbacks(self):&lt;br /&gt;
    self.nodeAddedModifiedObserverTag = slicer.mrmlScene.AddObserver(slicer.vtkMRMLScene.NodeAddedEvent, self.nodeAddedCallback)&lt;br /&gt;
  def unregisterCallbacks(self):&lt;br /&gt;
    slicer.mrmlScene.RemoveObserver(self.nodeAddedModifiedObserverTag)&lt;br /&gt;
        &lt;br /&gt;
myObject = MyClass()&lt;br /&gt;
myObject.registerCallbacks()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allowed CallDataType values:  VTK_STRING, VTK_OBJECT, VTK_INT, VTK_LONG, VTK_DOUBLE, VTK_FLOAT, &amp;quot;string0&amp;quot;. See more information here:&lt;br /&gt;
https://github.com/Kitware/VTK/blob/master/Wrapping/PythonCore/vtkPythonCommand.cxx&lt;br /&gt;
&lt;br /&gt;
A simplified syntax is available by using a mix-in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from slicer.util import VTKObservationMixin&lt;br /&gt;
&lt;br /&gt;
class MyClass(VTKObservationMixin):&lt;br /&gt;
  def __init__(self):&lt;br /&gt;
    VTKObservationMixin.__init__(self)&lt;br /&gt;
    self.addObserver(slicer.mrmlScene, slicer.vtkMRMLScene.NodeAddedEvent, self.nodeAddedCallback)&lt;br /&gt;
  &lt;br /&gt;
  @vtk.calldata_type(vtk.VTK_OBJECT)&lt;br /&gt;
  def nodeAddedCallback(self, caller, eventId, callData):&lt;br /&gt;
    print(&amp;quot;Node added&amp;quot;)&lt;br /&gt;
    print(&amp;quot;New node: {0}&amp;quot;.format(callData.GetName()))&lt;br /&gt;
&lt;br /&gt;
myObject = MyClass()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: VTKObservationMixin is a Python mix-in that allows adding a set of methods to a class by inheritance. VTKObservationMixin includes addObserver, hasObserver, observer, removeObserver, removeObservers methods, defined in Slicer (in Base\Python\slicer\util.py). For example of usage, see [https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/tests/test_slicer_util_VTKObservationMixin.py test_slicer_util_VTKObservationMixin.py]&lt;br /&gt;
&lt;br /&gt;
== Slicer crashes if I try to access a non-existing item in an array ==&lt;br /&gt;
&lt;br /&gt;
For example, this code makes Slicer crash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
s = vtk.vtkStringArray()&lt;br /&gt;
s.GetValue(0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This behavior is expected, as all VTK objects are implemented in C++ that offers much faster operation but developers have to take care of addressing only valid array elements, for example by checking the number of elements in the array:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if itemIndex &amp;lt; 0 or itemIndex &amp;gt;= s.GetNumberOfValues()&lt;br /&gt;
  raise IndexError(&amp;quot;index out of bounds&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to run CLI module from Python? ==&lt;br /&gt;
&lt;br /&gt;
See [[Documentation/{{documentation/version}}/Developers/Python_scripting#Running_a_CLI_from_Python|here]].&lt;br /&gt;
&lt;br /&gt;
== How can I run slicer operations from a batch script? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Slicer --no-main-window --python-script /tmp/test.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contents of /tmp/test.py&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# use a slicer scripted module logic&lt;br /&gt;
from SampleData import SampleDataLogic&lt;br /&gt;
SampleDataLogic().downloadMRHead()&lt;br /&gt;
head = slicer.util.getNode('MRHead')&lt;br /&gt;
&lt;br /&gt;
# use a vtk class&lt;br /&gt;
threshold = vtk.vtkImageThreshold()&lt;br /&gt;
threshold.SetInputData(head.GetImageData())&lt;br /&gt;
threshold.ThresholdBetween(100, 200)&lt;br /&gt;
threshold.SetInValue(255)&lt;br /&gt;
threshold.SetOutValue(0)&lt;br /&gt;
&lt;br /&gt;
#  use a slicer-specific C++ class&lt;br /&gt;
erode = slicer.vtkImageErode()&lt;br /&gt;
erode.SetInputConnection(threshold.GetOutputPort())&lt;br /&gt;
erode.SetNeighborTo4()  &lt;br /&gt;
erode.Update()          &lt;br /&gt;
&lt;br /&gt;
head.SetAndObserveImageData(erode.GetOutputDataObject(0))&lt;br /&gt;
&lt;br /&gt;
slicer.util.saveNode(head, &amp;quot;/tmp/eroded.nrrd&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
exit()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How can I run Slicer on a headless compute node? ==&lt;br /&gt;
&lt;br /&gt;
Many cluster nodes are installed with minimal linux systems that don't include X servers.  X servers, particularly those with hardware acceleration traditionally needed to be installed with root privileges, making it impossible to run applications that rendered using X or OpenGL.&lt;br /&gt;
&lt;br /&gt;
But there is a workaround which allows everything in slicer to work normally so you could even do headless rendering.&lt;br /&gt;
&lt;br /&gt;
You can use a modern version of X that supports running a dummy framebuffer.  This can be installed in user mode so you don't even need to have root on the system.&lt;br /&gt;
&lt;br /&gt;
See [https://www.xpra.org/trac/wiki/Xdummy] for details.&lt;br /&gt;
&lt;br /&gt;
There's a thread here with more discussion: [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2015/017317.html]&lt;br /&gt;
&lt;br /&gt;
Here is a working example of the approach running on a headless compute node running CTK tests (which also use Qt and VTK)&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pieper/CTK/blob/master/.travis.yml]&lt;br /&gt;
&lt;br /&gt;
== How to save user's selection of parameters and nodes in the scene? ==&lt;br /&gt;
&lt;br /&gt;
It is preferable to save all the parameter values and nodes selections that the user made on the user interface into the MRML scene. This allows the user to load a scene and continue from where he left off. These information can be saved in a ''slicer.vtkMRMLScriptedModuleNode()'' node.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parameterNode=slicer.vtkMRMLScriptedModuleNode()&lt;br /&gt;
&lt;br /&gt;
# Save parameter values and node references to parameter node&lt;br /&gt;
&lt;br /&gt;
alpha = 5.0&lt;br /&gt;
beta = &amp;quot;abc&amp;quot;&lt;br /&gt;
inputNode = slicer.util.getNode(&amp;quot;InputNode&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
parameterNode.SetParameter(&amp;quot;Alpha&amp;quot;,str(alpha))&lt;br /&gt;
parameterNode.SetParameter(&amp;quot;Beta&amp;quot;, beta)&lt;br /&gt;
parameterNode.SetNodeReferenceID(&amp;quot;InputNode&amp;quot;, inputNode.GetID())&lt;br /&gt;
&lt;br /&gt;
# Retrieve parameter values and node references from parameter node&lt;br /&gt;
&lt;br /&gt;
alpha = float(parameterNode.GetParameter(&amp;quot;Alpha&amp;quot;))&lt;br /&gt;
beta = parameterNode.GetParameter(&amp;quot;Beta&amp;quot;)&lt;br /&gt;
inputNode = parameterNode.GetNodeReference(&amp;quot;InputNode&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Scripted module's logic class have a helper function, ''getParameterNode'', which returns a parameter node that is unique for a specific module. The function creates the parameter node if it has not been created yet. By default, the parameter node is a singleton node, which means that there is only a single instance of the node in the scene. If it is preferable to allow multiple instances of the parameter node, set ''isSingletonParameterNode'' member of the logic object to ''False''.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/Qt5-and-VTK8&amp;diff=57645</id>
		<title>Documentation/Labs/Qt5-and-VTK8</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/Qt5-and-VTK8&amp;diff=57645"/>
		<updated>2018-01-09T18:12:56Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Slicer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the update of Slicer to use Qt 5.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Because Qt4 is not actively developed (as documented [http://blog.qt.io/blog/2014/11/27/qt-4-8-x-support-to-be-extended-for-another-year/ here] support ended), we need to work toward supporting Qt5. &lt;br /&gt;
&lt;br /&gt;
Similarly because VTK7 is not actively developed, we need to work toward supporting VTK8 and the OpenGL2 rendering backend.&lt;br /&gt;
&lt;br /&gt;
This page summarizes support status of the various components of Slicer stack and remaining tasks.&lt;br /&gt;
&lt;br /&gt;
=== List of fixes integrated into VTK ===&lt;br /&gt;
&lt;br /&gt;
* VTK 8&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/3b94273 3b94273]: Fix memory leaks in vtkOpenGLRenderer::DonePick() (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/1b9800b 1b9800b]: Fix QVTKOpenGLWidget rendering with disabled interactor (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/056dd9a 056dd9a]: Fix picking when using QVTKOpenGLWidget (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/ee2ea5d ee2ea5d]: was missing object base initialization (Ken Martin, Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/e0c60b1 e0c60b1]: QVTKOpenGLWidget: Set screen size on render window (Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/8a60be1 8a60be1]: Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac (Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/bcce50b bcce50b]: cmake: Fix support for VTK_ENABLE_VTKPYTHON set to OFF (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/d0aed86 d0aed86]: cmake/vtkCompilerExtras: Remove &amp;quot;--no-undefined&amp;quot; gcc linker flag (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-06: [https://github.com/Kitware/VTK/commit/5a4ddec 5a4ddec]: Respect access specifier of using statements in wrapping (Max Smolens)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/b684733 b684733]: ENH: Allow selection of seed points using vtkSeedWidget (Andras Lasso)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/f86a870 f86a870]: Ensure vtkVariant stream associated with &amp;lt;&amp;lt; operator is set back to &amp;quot;dec&amp;quot;. (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-05: Support crosspiling emulator&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/894acce 894acce]: cmake: Import VTKCompileTools if CROSSCOMPILING_EMULATOR support is incomplete (Jean-Christophe Fillion-Robin)&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/d0f83df d0f83df]: cmake: Simplify buildsystem introducing VTK_COMPILE_TOOLS_IMPORTED (Jean-Christophe Fillion-Robin)&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/d767f09 d767f09]: cmake: Add support for CMAKE_CROSSCOMPILING_EMULATOR (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/91ca08b 91ca08b]: OpenGL2: Fix undeclared &amp;quot;glXGetProcAddressARB&amp;quot; when building on Centos5 (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2016-12: [https://github.com/Kitware/VTK/commit/a16b2da6 a16b2da6]: MSVC performance improvements. (David C. Lonie)&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/0ea52cc 0ea52cc]: fix an OpenGL2 issue impacting slicer and add test (Max Smolens)&lt;br /&gt;
&lt;br /&gt;
* VTK 7&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/d309ca8 d309ca8]: Consider whether volume transform preserves orientation (Max Smolens)&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/0cd1a32 0cd1a32]: Fix formatting of VTK_DELETE_FUNCTION (Max Smolens)&lt;br /&gt;
** 2016-08: Volume Rendering: Support large transfer function&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/ea74f88 ea74f88]: Adjusted LargeColorTf test to add coverage for scale/bias patch. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/5d8e8d5 5d8e8d5]: Added texture width checks in opacity and gradientOpacity tables. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/ddb5ebc ddb5ebc]: Fixed gl color scale issue. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-07: [https://github.com/Kitware/VTK/commit/813462c 813462c]: Added a method in RGBTable to check whether certain tex size is supported. (Alvaro Sanchez)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/114bc96 114bc96]: Add test for GPU volume rendering with a large color transfer function. (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/634a33b 634a33b]: vtkOpenGLGPUVolumeRayCastMapper: handle when table size increases (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/608d4fb 608d4fb]: vtkOpenGLGPUVolumeRayCastMapper: remove unnecessary NULL check before delete (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/18b6e57 18b6e57]: vtkOpenGLGPUVolumeRayCastMapper: use existing function to find next power of 2 (Max Smolens)&lt;br /&gt;
*** 2015-07: [https://github.com/Kitware/VTK/commit/f0eba00 f0eba00]: GPU raycast volume rendering now supports textures larger than 1024 (Julien Finet)&lt;br /&gt;
** 2016-07: Fix VTK interaction&lt;br /&gt;
*** 2016-06: [https://github.com/Kitware/VTK/commit/9ecc055 9ecc055]: Fix variable names in vtkImplicitCylinderWidget test (Max Smolens)&lt;br /&gt;
*** 2016-06: [https://github.com/Kitware/VTK/commit/e8170ff e8170ff]: Fix multiple definitions of vtkInteractionCallback (Max Smolens)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/7602a0e 7602a0e]: Make vtkCollection implement iterable in the python wrapping (Hastings Greer)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/dd87a44 dd87a44]: Allow pyvtkObjects to have InvokeEvent called on them with calldata (Hastings Greer)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/a0eb686 a0eb686]: Add #include for offsetof() macro in generated Python wrappers (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/bd63a80 bd63a80]: Handle case when textDims are NULL (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/5dcad97 5dcad97]: vtkTextMapper: fix rendering of empty string (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/e646e65 e646e65]: Fix vtkAxisActor2D documentation error (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/4be6351 4be6351]: vtkLegendScaleActor: add Modified() call after updating points (Max Smolens)&lt;br /&gt;
** 2016-03: [https://github.com/Kitware/VTK/commit/7a24b32 7a24b32]: Change picking manager to not own objects associated with pickers (Max Smolens)&lt;br /&gt;
** 2016-03: Support building python wrapping with VTK_ENABLE_KITS enabled&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/540f2c5 540f2c5]: python: Add adapter modules when VTK_ENABLE_KITS is ON (Max Smolens)&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/31b7b0e 31b7b0e]: python: Update wrapping tool to support multiple hierarchy and hint files (Max Smolens)&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/1ebfa5b 1ebfa5b]: python: Add wrapping of kits when VTK_ENABLE_KITS is ON (Max Smolens)&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
To configure Slicer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DQt5_DIR:PATH=/home/jcfr/Software/Qt5.9.1/5.9.1/gcc_64/lib/cmake/Qt5 ...  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically build VTK8 with OpenGL2 backend enabled.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Use VS2015 on windows&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-16 ===&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
===== Slicer =====&lt;br /&gt;
&lt;br /&gt;
* Test with Qt5.9.1: Linux {{done}}, macOS {{wip}}, Windows: {{done}}&lt;br /&gt;
&lt;br /&gt;
* Packaging:&lt;br /&gt;
** Update packaging script SlicerCPackBundleFixup.cmake&lt;br /&gt;
&lt;br /&gt;
* Building:&lt;br /&gt;
** Update build script to support qt5 (see https://github.com/jcfr/qt-easy-build )&lt;br /&gt;
** Update Slicer build instruction on developer wiki&lt;br /&gt;
&lt;br /&gt;
* Fix Slicer test failures:&lt;br /&gt;
** Floating point exceptions (&amp;quot;SIGFPE with code FPE_FLTUND&amp;quot;) on Mac (ModelToLabelMapTest, ModelToLabelMapTestLabelValue, N4ITKBiasFieldCorrectionTest).&lt;br /&gt;
** py_LandmarkRegistration crash on exit.&lt;br /&gt;
** py_VolumeRenderingThreeDOnlyLayout on Windows (&amp;quot;Shader object was not initialized, cannot attach it.&amp;quot;). This is a similar issue as was fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=25239 r25239], but resurrected due to the behavior of QVTKOpenGLWidget. The old fix is insufficient.&lt;br /&gt;
&lt;br /&gt;
* Application errors reported at https://discourse.slicer.org/t/qt5-build-a-few-hiccups/952 (more information and screenshots are available there)&lt;br /&gt;
** &amp;lt;del&amp;gt;Whenever an item is selected in the Fiducial/ROI/Ruler tool, the items get duplicated to an certain number of items that I didn’t count.&amp;lt;/del&amp;gt; Cannot reproduce on 0297723&lt;br /&gt;
** In Volume Rending module, the items of the ‘View’ combobox are no longer checkable.&lt;br /&gt;
** Switching to module ‘SceneViews’ crashes Slicer:&lt;br /&gt;
*** Switch to module: “SceneViews”&lt;br /&gt;
*** qSlicerSceneViewsModuleWidgetPrivate::setupUi - Capture link not implemented with Qt5&lt;br /&gt;
*** qSlicerSceneViewsModuleWidgetPrivate::setupUi - Restore scroll bar position not implemented with Qt5&lt;br /&gt;
*** As it says, it has yet to be implemented.&lt;br /&gt;
**Styles are broken (cannot select Slicer Dark Style)&lt;br /&gt;
**The module name disappear in the module combobox when:&lt;br /&gt;
*** Select module&lt;br /&gt;
*** Open module selector and do not select anything&lt;br /&gt;
*** Name disappears&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Windows: Debug build runs very slowly - can it be improved? Build is very slow too, but the application runs so slowly in debug mode that it is basically unusable (this is a change from previous version that were usable for testing real workflows in debug mode).&amp;lt;/del&amp;gt; - fixed in VTK (a16b2da6), Slicer already uses VTK version that includes this&lt;br /&gt;
&lt;br /&gt;
===== SimpleITK  =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;SimpleITK doesn't recognize standard CMake way to enable C++11. See https://github.com/SimpleITK/SimpleITK/issues/260.&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Upstream fix: https://github.com/SimpleITK/SimpleITK/pull/261&amp;lt;/s&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26339 r26339] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26340 r26340]&lt;br /&gt;
&lt;br /&gt;
===== VTK  =====&lt;br /&gt;
&lt;br /&gt;
* Transparency is handled differently: see problem in this discussion thread http://vtk.1045678.n5.nabble.com/Strange-renderering-with-mixed-polydata-volume-with-QVTKOpenGLWidget-td5743309.html and a related fix in ITKSnap https://github.com/pyushkevich/itksnap/blob/master/GUI/Qt/main.cxx#L572-L574 and &lt;br /&gt;
&lt;br /&gt;
=== 2017-08-14 ===&lt;br /&gt;
&lt;br /&gt;
As of 2017-08-14, the support for Qt5 and VTK8 has been integrated into the trunk.&lt;br /&gt;
&lt;br /&gt;
Command line arguments to expose webgl and webengine debugging:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./Slicer-build/Slicer --enable-experimental-web-platform-features --enable-unsafe-es3-apis --remote-debugging-port=12117 --use-gl=desktop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
&lt;br /&gt;
===== VTK =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Fix and update VTK: https://gitlab.kitware.com/vtk/vtk/issues/17076 (&amp;quot;OpenGL errors occur when destroying vtkWin32OpenGLRenderWindow&amp;quot;) (Only affects old OpenGL backend.)&amp;lt;/del&amp;gt;. This is not issue for Slicer. VTK8 based build will use openGL2 backend, and VTK7.1 based build do not have the problem. See https://gitlab.kitware.com/vtk/vtk/issues/17076#note_303185&lt;br /&gt;
* &amp;lt;del&amp;gt;Merge and update VTK: QVTKOpenGLWidget can blit uninitialized framebuffers. On Mac, the bug is evident through visible artifacts when resizing the views.&amp;lt;/del&amp;gt; Merged in  https://gitlab.kitware.com/vtk/vtk/merge_requests/3138.&lt;br /&gt;
&lt;br /&gt;
===== Slicer =====&lt;br /&gt;
&lt;br /&gt;
* Packaging&lt;br /&gt;
** &amp;lt;del&amp;gt;Update packaging scripts (SlicerBlockInstallQt.cmake,&amp;lt;/del&amp;gt; SlicerCPackBundleFixup.cmake)&lt;br /&gt;
*** &amp;lt;del&amp;gt;Linux&amp;lt;/del&amp;gt; {{done}}, macOS {{wip}}, &amp;lt;del&amp;gt;Windows&amp;lt;/del&amp;gt;: {{done}} - &amp;lt;del&amp;gt;See https://github.com/jcfr/Slicer/tree/support-qt5-packaging&amp;lt;/del&amp;gt; - Integrated in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26289 r26289]&lt;br /&gt;
** Linux:&lt;br /&gt;
*** needed to manually copy shared libraries:&lt;br /&gt;
**** libasound.so.2&lt;br /&gt;
**** libxslt.so.1&lt;br /&gt;
**** libsmime3&lt;br /&gt;
**** libstdc++.so.6 (glibc mismatch, needed GLIBCXX_3.4.21) should build instead with manylinux&lt;br /&gt;
*** &amp;lt;del&amp;gt;like on mac, need to create bin/platfrms and bin/sqldrivers and copy in platforms/libqxcb.so and sqldrivers/libqsqlite.so&amp;lt;/del&amp;gt;&lt;br /&gt;
** Mac:&lt;br /&gt;
*** &amp;lt;del&amp;gt;Add libqcocoa.dylib and libqsqlite.dylib to package for mac&amp;lt;/del&amp;gt;&lt;br /&gt;
***:&amp;lt;pre&amp;gt;&lt;br /&gt;
***::mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers&lt;br /&gt;
***::cp ~/Qt/5.7/clang_64/plugins/sqldrivers/libqsqlite.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers/&lt;br /&gt;
***::mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/platforms&lt;br /&gt;
***::cp ~/Qt/5.7/clang_64/plugins/platforms/libqcocoa.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/platforms/&lt;br /&gt;
***:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find and fix layout changes.&lt;br /&gt;
** &amp;lt;del&amp;gt;For example, some widgets likely need to set QSizePolicy::Expanding, such as the exit application confirmation dialog. See https://github.com/commontk/CTK/pull/738&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26282 r26282]&lt;br /&gt;
* &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Build shows errors in console at start: Proposed fix in https://github.com/Slicer/Slicer/pull/774&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26279 r26279] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26280 r26280]&lt;br /&gt;
**:&amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
**::Failed to obtain reference to 'FileMenu'&lt;br /&gt;
**::Failed to obtain reference to 'qSlicerAppMainWindow'&lt;br /&gt;
**::No Data Probe frame - cannot create DataProbe&lt;br /&gt;
**::Failed to obtain reference to 'qSlicerAppMainWindow'&lt;br /&gt;
**::Failed to obtain reference to 'FileMenu'&lt;br /&gt;
**:&amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Fix Slicer test failures:&lt;br /&gt;
** &amp;lt;del&amp;gt;qMRMLLayoutManagerWithCustomFactoryTest (&amp;quot;vtkPlaneSource: Bad plane coordinate system&amp;quot;). See https://github.com/Slicer/Slicer/pull/775&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26285 r26285]&lt;br /&gt;
** &amp;lt;del&amp;gt;ResampleDTIVolumeBSplineInterpolationTest (image diff?). See https://github.com/Slicer/Slicer/pull/776&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26288 r26288]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Linux/Windows/macOS: fix for `libpng warning: iCCP: known incorrect sRGB profile`&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26276 r26276]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== CTK =====&lt;br /&gt;
&lt;br /&gt;
* Fix CTK warnings. See http://slicer.cdash.org/viewBuildError.php?type=1&amp;amp;buildid=1076772&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-07 ===&lt;br /&gt;
&lt;br /&gt;
As of 2017-08-07 the relevant branches for testing are:&lt;br /&gt;
* &amp;lt;del&amp;gt;Slicer: https://github.com/msmolens/Slicer/tree/support-qt5-2017-08-05-r26208 (includes VTK8)&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26268 r26268]&lt;br /&gt;
** &amp;lt;del&amp;gt;old branches&amp;lt;/del&amp;gt;:&lt;br /&gt;
*** &amp;lt;del&amp;gt;https://github.com/msmolens/Slicer/tree/support-qt5-2017-07-29-r26186&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;CTK: https://github.com/msmolens/CTK/tree/wip-support-qvtkopenglwidget&amp;lt;/del&amp;gt; - Integrated in CTK as [https://github.com/commontk/CTK/commit/1066374b63b6907797ee14b35196829216fbc3dd commontk/CTK@1066374], integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26224 r26224]&lt;br /&gt;
* &amp;lt;del&amp;gt;VTK: https://github.com/Slicer/VTK/tree/slicer-v8.0.0-2017-08-07-88c80af&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;DCMTK: https://github.com/msmolens/DCMTK/tree/patched-DCMTK-3.6.2_20170801&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26204 r26204] (Branch was also renamed - see https://github.com/commontk/DCMTK/tree/patched-DCMTK-3.6.2_20170714)&lt;br /&gt;
* &amp;lt;del&amp;gt;PythonQt: https://github.com/msmolens/PythonQt/tree/msvc-bigobj&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;qRestAPI: https://github.com/msmolens/qRestAPI/tree/support-qt-no-ssl-macro&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26198 r26198]&lt;br /&gt;
* &amp;lt;del&amp;gt;AppLauncher: https://github.com/msmolens/AppLauncher/tree/support-qt5&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26217 r26217]&lt;br /&gt;
* &amp;lt;del&amp;gt;MultiVolumeExplorer: https://github.com/msmolens/MultiVolumeExplorer/tree/support-qt5&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For VS2015 gotchas, see below.&lt;br /&gt;
&lt;br /&gt;
* Qt5/VTK8 integration TODO:&lt;br /&gt;
** &amp;lt;del&amp;gt;Properly initialize QVTKOpenGLWidget. Call QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance so that an OpenGL core profile context is requested.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Properly initialize QVTKOpenGLWidget for tests. Call QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance so that an OpenGL core profile context is requested. (Slicer, CTK)&amp;lt;/del&amp;gt;&lt;br /&gt;
** Enable C++11 for Slicer, extensions, and libraries as appropriate.&lt;br /&gt;
*** &amp;lt;del&amp;gt;BRAINSTools ignores configuration options and fails to configure when C++11 is enabled.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;DCMTK has a compile error when C++11 is enabled?&amp;lt;/del&amp;gt;. (Resolved: requires custom definition to enable C++11.)&lt;br /&gt;
*** &amp;lt;del&amp;gt;Slicer&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Libraries that use C++&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Extensions&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Add VTK_OVERRIDE, VTK_FINAL, VTK_DELETE_FUNCTION and other necessary keywords to fix build warnings. Maintain compatibility with VTK7 by defining these as empty when using VTK7.&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;OpenIGTLinkIF&amp;lt;/del&amp;gt; Updated in https://github.com/openigtlink/OpenIGTLinkIF/pull/72&lt;br /&gt;
**** &amp;lt;del&amp;gt;MultiVolumeExplorer&amp;lt;/del&amp;gt; Updated in https://github.com/fedorov/MultiVolumeExplorer/pull/36.&lt;br /&gt;
**** &amp;lt;del&amp;gt;ParameterSerializer&amp;lt;/del&amp;gt; Updated in https://github.com/Slicer/ParameterSerializer/pull/7.&lt;br /&gt;
**** &amp;lt;del&amp;gt;EMSegment&amp;lt;/del&amp;gt; Updated in [http://viewvc.slicer.org/viewvc.cgi/Slicer3?view=revision&amp;amp;revision=17135 r17135]. Integrated in Slicer in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26228 r26228]&lt;br /&gt;
**** &amp;lt;del&amp;gt;OpenIGTLinkIF&amp;lt;/del&amp;gt; - Integrated  in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26227 r26227] (Changes available in [https://github.com/Slicer/OpenIGTLinkIF Slicer/OpenIGTLinkIF] - Pending PR: &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/70 #70]&amp;lt;/del&amp;gt;, &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/71 #71]&amp;lt;/del&amp;gt;, [https://github.com/openigtlink/OpenIGTLinkIF/pull/72 #72], &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/73 #73]&amp;lt;/del&amp;gt; and [https://github.com/openigtlink/OpenIGTLinkIF/pull/74 #74]&lt;br /&gt;
**** SlicerExecutionModel&lt;br /&gt;
**** &amp;lt;del&amp;gt;DataStore (see https://github.com/Slicer/Slicer-DataStore/pull/3)&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26229 r26229]&lt;br /&gt;
*** &amp;lt;del&amp;gt;DCMTK 3.6.2 has a configuration error when C++11 is enabled on Linux. See https://github.com/msmolens/DCMTK/commit/c9ccd45212cb542d78201995951fbcfb416f8b16 for a workaround.&amp;lt;/del&amp;gt; - See  [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26204 r26204] and [https://github.com/commontk/DCMTK/tree/patched-DCMTK-3.6.2_20170714 commontk/DCMTK@patched-DCMTK-3.6.2_20170714] - DCMTK team was notified - See [https://github.com/msmolens/DCMTK/commit/c9ccd45212cb542d78201995951fbcfb416f8b16#commitcomment-23474059 here])&lt;br /&gt;
** &amp;lt;del&amp;gt;Set OpenGL2 as default rendering backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;CTK and Slicer QtTesting tests refer to QVTKWidget. Can they be converted to recognize QVTKOpenGLWidget?&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update CTK: https://github.com/commontk/PythonQt/pull/57 (&amp;quot;Fix compile error on MSVC with Qt 5.7.1&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: https://gitlab.kitware.com/vtk/vtk/merge_requests/3014 (&amp;quot;Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: https://gitlab.kitware.com/vtk/vtk/merge_requests/3041 (&amp;quot;QVTKOpenGLWidget: Set screen size on render window&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix and update VTK: https://gitlab.kitware.com/vtk/vtk/issues/17091 (&amp;quot;QVTKOpenGLWidget: Picking vtkActor2D fails&amp;quot;). In Slicer one operation this issue affects is picking slice view ROI box handles.&amp;lt;/del&amp;gt; Merged in https://gitlab.kitware.com/vtk/vtk/merge_requests/3103.&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: QVTKOpenGLWidget can blit uninitialized framebuffers. On Mac, the bug is evident through visible artifacts when resizing the views.&amp;lt;/del&amp;gt; Merged in https://gitlab.kitware.com/vtk/vtk/merge_requests/3138.&lt;br /&gt;
** &amp;lt;del&amp;gt;Clicking on module search result in popup does not open the module. ComboBox does not always show the selected item.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLColorPickerWidgetTest2 on Mac crashes due to changes in QColorDialog in Qt5. CTK should no longer assume the non-native dialog is constructed, i.e. the layouts exist, when ctkColorDialog is instantiated.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix CTK Qt5 test failures.&amp;lt;/del&amp;gt;&lt;br /&gt;
** OpenSSL/DataStore/qRestAPI issues?&lt;br /&gt;
** &amp;lt;del&amp;gt;CTK needs to properly export CTK_USE_QVTKOPENGLWIDGET so that the preprocessor correctly handles &amp;lt;tt&amp;gt;#if CTK_USE_QVTKOPENGLWIDGET&amp;lt;/tt&amp;gt; in its header files. Or, an alternative mechanism could be implemented.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Windows/Linux: CPU and GPU Volume Rendering display nothing or are corrupt. GPU Volume Rendering gives OpenGL errors.&amp;lt;/del&amp;gt; Disabling multisampling before creating the default surface format fixes this. See https://gitlab.kitware.com/vtk/vtk/issues/17095.&lt;br /&gt;
** &amp;lt;del&amp;gt;Mac: Slice views use only lower-left quarter of widget.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Set Qt::AA_EnableHighDpiScaling to enable automatic scaling based on the pixel density of the monitor. This enables High DPI for platforms other than Mac.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Call setEnableHiDPI(true) on QVTKOpenGLWidgets.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLSliceWidget: Scale SliceView geometry by its devicePixelRatio() before calling this-&amp;gt;SliceController-&amp;gt;setSliceViewSize().&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLSliceWidget: Observe change in devicePixelRatio (i.e. app dragged to another screen) and recompute slice view size.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Volume Rendering transfer functions aren't displayed correctly. (ctkVTKChartView)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix vtkWindowToImageFilter usage of method deprecated in VTK8.1: https://github.com/Kitware/VTK/blob/b8eae1e022cc71de5dcac578f4087b71d8573324/Rendering/Core/vtkWindowToImageFilter.h#L95&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix Qt deprecation warnings.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Address &amp;quot;Policy CMP0020 is not set: Automatically link Qt executables to qtmain target on Windows&amp;quot; warnings.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL backend.&amp;lt;/del&amp;gt; - Changes integrated into the trunk and tested daily&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL2 backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with Qt4.&amp;lt;/del&amp;gt;&lt;br /&gt;
** Test with Qt5.9.1.&lt;br /&gt;
** &amp;lt;del&amp;gt;Support VS2015 by updating to latest python-cmake-buildsystem. Prerequisite: make pre-compiled OpenSSL available for VS2015/VS2017.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Update MultiVolumeExplorer hash for Qt5 support.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TODOs and Notes for the current integration&lt;br /&gt;
** Make Qt5.7.1 the required version if version greater than Qt5.6; a QWebEngine bug: https://bugreports.qt.io/browse/QTBUG-54762 was resolved in 5.7.1.&lt;br /&gt;
** Windows:&lt;br /&gt;
*** Tested build: VS2013, Qt5.7.1 downloaded from Qt's official releases. &lt;br /&gt;
*** 2017-08-07: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1076299&lt;br /&gt;
*** &amp;lt;s&amp;gt;SlicerLauncherSettings.ini need to include path to Qt bin directory. Doing this manually right now &amp;lt;/s&amp;gt;&lt;br /&gt;
*** VS2015:&lt;br /&gt;
**** &amp;lt;del&amp;gt;Configure with &amp;lt;code&amp;gt;-DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=OFF&amp;lt;/code&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;Python 2.7: This patch should be applied. See https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/issues/161&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;DCMTK: To fix &amp;quot;DCMTK was configured to use the C++11 STL, [...]&amp;quot; error. Edit &amp;lt;code&amp;gt;C:\path\to\S-bld\DCMTK\CMake\osconfig.h.in&amp;lt;/code&amp;gt; and comment lines highlighted in  https://github.com/commontk/DCMTK/blob/d8ed091cda2b815226eafe41f5b4fe3bd22f8d5d/CMake/osconfig.h.in#L1096-L1100&amp;lt;/del&amp;gt;&lt;br /&gt;
***** To understand why: See https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/&lt;br /&gt;
***** From Microsoft: &amp;lt;code&amp;gt;We won’t update __cplusplus until the compiler fully conforms to the standard. Until then, you can check the value of _MSVC_LANG.&amp;lt;/code&amp;gt;&lt;br /&gt;
***** Or, could change logic in SuperBuild/External_DCMTK.cmake to only enable C++11 for UNIX platforms.&lt;br /&gt;
&lt;br /&gt;
* MacOSX:&lt;br /&gt;
** Tested build: Qt5.7.1 downloaded from Qt's official releases, MacOSX10.11&lt;br /&gt;
** 2017-08-07: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1076538&lt;br /&gt;
*** NOTE: WIP qt-easy-build to build Qt5.7.1 with OpenSSL support: https://github.com/msmolens/qt-easy-build/commits/wip-qt5; based on https://github.com/jcfr/qt-easy-build/pull/32&lt;br /&gt;
** &amp;lt;s&amp;gt; Need to address manual install of the sql and cocoa plugin and platform files for sql and cocoa. &amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-02 ===&lt;br /&gt;
&lt;br /&gt;
* Linux:&lt;br /&gt;
** Tested build: Ubuntu 16.04, gcc, Qt5.7.1 downloaded from Qt's official releases:&lt;br /&gt;
** 2017-08-02: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1074507&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 2017-01 ===&lt;br /&gt;
* Work-in-progress branch that partially builds&lt;br /&gt;
** 2017-01:&lt;br /&gt;
*** https://github.com/Slicer/Slicer/pull/648 corresponding to branch https://github.com/Slicer/Slicer/compare/master...jcfr:support-qt5?expand=1&lt;br /&gt;
&lt;br /&gt;
* Original branch:&lt;br /&gt;
https://github.com/jcfr/Slicer/commits/support-qt5&lt;br /&gt;
&lt;br /&gt;
=== 2016-12 ===&lt;br /&gt;
&lt;br /&gt;
** 2016-12:&lt;br /&gt;
*** Slicer: https://github.com/Slicer/Slicer/compare/master...pieper:slicer-qt5?expand=1&lt;br /&gt;
*** CTK: https://github.com/commontk/CTK/compare/master...pieper:slicer-qt5?expand=1&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-Qt5-2016-12-12.PNG|thumb|right|A first running example [https://github.com/Slicer/Slicer/commit/08f40bd09ff525288710c1ccddbc09381264f5cd described in this commit]]]&lt;br /&gt;
&lt;br /&gt;
* Superbuild configure command on mac using Qt 5.7 stock downloads&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/Users/pieper/Qt/5.7/clang_64/bin/qmake \&lt;br /&gt;
  -DCMAKE_PREFIX_PATH:PATH=/Users/pieper/Qt/5.7/clang_64/ \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_SimpleITK:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_QtTesting:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \&lt;br /&gt;
  -DSlicer_QT_VERSION:STRING=5 \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Platform Notes ====&lt;br /&gt;
&lt;br /&gt;
Experimental build on Window:&lt;br /&gt;
* Visual Studio Community 2015&lt;br /&gt;
* Qt 5.7&lt;br /&gt;
** Include QtWebEngine and QtScript during install&lt;br /&gt;
** Select 2015 64 bit install&lt;br /&gt;
* Qt 5.8&lt;br /&gt;
** Use Visual Studio Community 2015 or above. Qt-5.8 does not support QtWebEngine for msvc 2013.&lt;br /&gt;
&lt;br /&gt;
==== Known Issues ====&lt;br /&gt;
&lt;br /&gt;
* Slice viewers do not have the expected size after changing layout&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
&lt;br /&gt;
===== All platforms =====&lt;br /&gt;
* Slicer build system upgrade: To be done  {{wip}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Add  Slicer_QT_VERSION option that could be set to either 4 or 5 - See what is done in CTK&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Fix qRestAPI to support Qt5 (or turn off Slicer_BUILD_EXTENSIONMANAGER_SUPPORT for testing)&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Update use of QT4_* macros (see below) - See what is done in CTK&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
*** &amp;lt;s&amp;gt;The QT5_ versions of the macros appear to be directly compatible&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;del&amp;gt;[https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Port from QtWebKit to QtWebEngine] &amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Update of classes using WebKit to work with &amp;lt;code&amp;gt;WebEngineView&amp;lt;/code&amp;gt; (these includes &amp;quot;Extension Manager&amp;quot;,  &amp;quot;Data Store&amp;quot;, &amp;quot;Chart View&amp;quot; and `qMRMLExpandingWebView`).&amp;lt;/del&amp;gt;&lt;br /&gt;
*** `qSlicerWebWidget` should be improved, moved to CTK and used for all widgets making use of a web view.&lt;br /&gt;
** &amp;lt;s&amp;gt;update PythonQt to the latest Qt version&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
*** &amp;lt;del&amp;gt;Look at updating PythonQt to support QWebEngine&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Fix [https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5#Plugin_loading differences in plugin loading]&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
* &amp;lt;del&amp;gt;Qt5::Network is now a dependency of Base/QTCore (Networking module in Qt5 has classes like QNetworkProxyFactory that were in Qt4's QtCore module)&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;CTK Python wrapping doesn't expose [https://github.com/commontk/CTK/blob/9e6df183277d2516f3522a8ef024450f0bcb5a57/Libs/Widgets/ctkWidgetsUtils.h#L43 grabWidget].&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Linux =====&lt;br /&gt;
* fix fox `libpng warning: iCCP: known incorrect sRGB profile`&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/IsomicsPublic/Slicer-Qt5-patched-4.7.0-2017-01-24-linux-amd64.tar.gz Minimal working release experimental build] (no cli, ssl, simpleitk, ...) built on ubuntu 16.04, tested on debian 8&lt;br /&gt;
&lt;br /&gt;
* needed to manually copy shared libraries:&lt;br /&gt;
** libasound.so.2&lt;br /&gt;
** libxslt.so.1&lt;br /&gt;
** libsmime3&lt;br /&gt;
** libstdc++.so.6 (glibc mismatch, needed GLIBCXX_3.4.21) should build instead with manylinux&lt;br /&gt;
* like on mac, need to create bin/platfrms and bin/sqldrivers and copy in platforms/libqxcb.so and sqldrivers/libqsqlite.so&lt;br /&gt;
&lt;br /&gt;
===== Mac =====&lt;br /&gt;
** &amp;lt;del&amp;gt;on Mac, QT_NO_OPENSSL is defined, but so is QSslError leading to redefined symbol [https://github.com/jcfr/Slicer/blob/1d8aa09e4862c6fe48d9f229a11f151d9ed89cea/Base/QTGUI/qSlicerWebWidget.h#L43](here).&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Mac crash in qSlicerUnitsSettingsPanelPrivate::addQuantity, appears to be corrupted model.&amp;lt;/strike&amp;gt;  [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=25855 partly addressed by  r25855 ], finally resolved [https://github.com/Slicer/Slicer/commit/8e5d924dc938ad7f1efb22e13e327383f6347ada r25883].  Most expedient solution is probably to disable the units settings panel in the application settings since is not widely used in the application.&lt;br /&gt;
** Add libqcocoa.dylib and libqsqlite.dylib to package for mac&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers&lt;br /&gt;
  cp ~/Qt/5.7/clang_64/plugins/sqldrivers/libqsqlite.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers/&lt;br /&gt;
  mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/platforms&lt;br /&gt;
  cp ~/Qt/5.7/clang_64/plugins/platforms/libqcocoa.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/platforms/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Workarounds here:&lt;br /&gt;
https://gist.github.com/pieper/59de820ad08cf3c0f7a33926397e612d &amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Windows =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;qtstyleplugins library needs to be removed or ported to support windows&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;del&amp;gt;add declspec exports/imports&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;create .lib for use in QTGUI&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;support shared/static build?&amp;lt;/del&amp;gt;&lt;br /&gt;
* AppLauncher settings need to be update&lt;br /&gt;
** &amp;lt;s&amp;gt;Add to PYTHONPATH: &amp;lt;superbuild&amp;gt;/VTKv7-build/bin/Debug (currently lib not bin)&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** Add to PATH: &amp;lt;Qt&amp;gt;/5.7/msvc2013_64/bin&lt;br /&gt;
* Debug build runs very slowly - can it be improved?  Build is very slow too, but the application runs so slowly in debug mode that it is basically unusable (this is a change from previous version that were usable for testing real workflows in debug mode).&lt;br /&gt;
* Setting Slicer_USE_SimpleITK to ON in CMake results in compile-time errors.&lt;br /&gt;
* &amp;lt;del&amp;gt;Creating a debug build (MSVC 2013, Qt5.7) creates a compile time error on PythonQt.cpp while building the CTK project with message: &amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;Error 1220 error C1128: number of sections exceeded object file format limit: compile with /bigobj &amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example starting point command:&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DQt5_DIR:FILEPATH=c:/Qt/5.7/msvc2013_64/lib/cmake/Qt5 \&lt;br /&gt;
  -DCMAKE_CONFIGUREATION_TYPES:STRING=Release \&lt;br /&gt;
  -DADDITIONAL_C_FLAGS:STRING=&amp;quot; /MP8&amp;quot; \&lt;br /&gt;
  -DADDITIONAL_CXX_FLAGS:STRING=&amp;quot; /MP8&amp;quot; \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_SimpleITK:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_QtTesting:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_DataStore:BOOL=OFF \&lt;br /&gt;
  -DSlicer_QT_VERSION:STRING=5 \&lt;br /&gt;
  -DBUILD_TESTING:BOOL=OFF \&lt;br /&gt;
  -G&amp;quot;Visual Studio 12 2013 Win64&amp;quot; \&lt;br /&gt;
  c:/pieper/slicer4/latest/Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/Nightly/Developers/Tutorials/MigrationGuide/VTK7-Qt4-to-VTK8-Qt5}}&lt;br /&gt;
&lt;br /&gt;
== List of extensions that may require updates ==&lt;br /&gt;
&lt;br /&gt;
See https://discourse.slicer.org/t/slicer-extensions-action-required-by-maintainers/1003&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Qt 4.8 support schedule info: http://slicer-devel.65872.n3.nabble.com/Fwd-Qt-4-8-x-support-extended-out-by-a-year-td4033248.html&lt;br /&gt;
* http://blog.qt.io/blog/2014/11/27/qt-4-8-x-support-to-be-extended-for-another-year&lt;br /&gt;
* [https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Port from QtWebKit to QtWebEngine]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/Qt5-and-VTK8&amp;diff=57622</id>
		<title>Documentation/Labs/Qt5-and-VTK8</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/Qt5-and-VTK8&amp;diff=57622"/>
		<updated>2018-01-09T15:53:07Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Slicer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the update of Slicer to use Qt 5.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Because Qt4 is not actively developed (as documented [http://blog.qt.io/blog/2014/11/27/qt-4-8-x-support-to-be-extended-for-another-year/ here] support ended), we need to work toward supporting Qt5. &lt;br /&gt;
&lt;br /&gt;
Similarly because VTK7 is not actively developed, we need to work toward supporting VTK8 and the OpenGL2 rendering backend.&lt;br /&gt;
&lt;br /&gt;
This page summarizes support status of the various components of Slicer stack and remaining tasks.&lt;br /&gt;
&lt;br /&gt;
=== List of fixes integrated into VTK ===&lt;br /&gt;
&lt;br /&gt;
* VTK 8&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/3b94273 3b94273]: Fix memory leaks in vtkOpenGLRenderer::DonePick() (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/1b9800b 1b9800b]: Fix QVTKOpenGLWidget rendering with disabled interactor (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/056dd9a 056dd9a]: Fix picking when using QVTKOpenGLWidget (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/ee2ea5d ee2ea5d]: was missing object base initialization (Ken Martin, Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/e0c60b1 e0c60b1]: QVTKOpenGLWidget: Set screen size on render window (Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/8a60be1 8a60be1]: Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac (Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/bcce50b bcce50b]: cmake: Fix support for VTK_ENABLE_VTKPYTHON set to OFF (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/d0aed86 d0aed86]: cmake/vtkCompilerExtras: Remove &amp;quot;--no-undefined&amp;quot; gcc linker flag (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-06: [https://github.com/Kitware/VTK/commit/5a4ddec 5a4ddec]: Respect access specifier of using statements in wrapping (Max Smolens)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/b684733 b684733]: ENH: Allow selection of seed points using vtkSeedWidget (Andras Lasso)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/f86a870 f86a870]: Ensure vtkVariant stream associated with &amp;lt;&amp;lt; operator is set back to &amp;quot;dec&amp;quot;. (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-05: Support crosspiling emulator&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/894acce 894acce]: cmake: Import VTKCompileTools if CROSSCOMPILING_EMULATOR support is incomplete (Jean-Christophe Fillion-Robin)&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/d0f83df d0f83df]: cmake: Simplify buildsystem introducing VTK_COMPILE_TOOLS_IMPORTED (Jean-Christophe Fillion-Robin)&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/d767f09 d767f09]: cmake: Add support for CMAKE_CROSSCOMPILING_EMULATOR (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/91ca08b 91ca08b]: OpenGL2: Fix undeclared &amp;quot;glXGetProcAddressARB&amp;quot; when building on Centos5 (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2016-12: [https://github.com/Kitware/VTK/commit/a16b2da6 a16b2da6]: MSVC performance improvements. (David C. Lonie)&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/0ea52cc 0ea52cc]: fix an OpenGL2 issue impacting slicer and add test (Max Smolens)&lt;br /&gt;
&lt;br /&gt;
* VTK 7&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/d309ca8 d309ca8]: Consider whether volume transform preserves orientation (Max Smolens)&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/0cd1a32 0cd1a32]: Fix formatting of VTK_DELETE_FUNCTION (Max Smolens)&lt;br /&gt;
** 2016-08: Volume Rendering: Support large transfer function&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/ea74f88 ea74f88]: Adjusted LargeColorTf test to add coverage for scale/bias patch. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/5d8e8d5 5d8e8d5]: Added texture width checks in opacity and gradientOpacity tables. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/ddb5ebc ddb5ebc]: Fixed gl color scale issue. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-07: [https://github.com/Kitware/VTK/commit/813462c 813462c]: Added a method in RGBTable to check whether certain tex size is supported. (Alvaro Sanchez)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/114bc96 114bc96]: Add test for GPU volume rendering with a large color transfer function. (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/634a33b 634a33b]: vtkOpenGLGPUVolumeRayCastMapper: handle when table size increases (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/608d4fb 608d4fb]: vtkOpenGLGPUVolumeRayCastMapper: remove unnecessary NULL check before delete (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/18b6e57 18b6e57]: vtkOpenGLGPUVolumeRayCastMapper: use existing function to find next power of 2 (Max Smolens)&lt;br /&gt;
*** 2015-07: [https://github.com/Kitware/VTK/commit/f0eba00 f0eba00]: GPU raycast volume rendering now supports textures larger than 1024 (Julien Finet)&lt;br /&gt;
** 2016-07: Fix VTK interaction&lt;br /&gt;
*** 2016-06: [https://github.com/Kitware/VTK/commit/9ecc055 9ecc055]: Fix variable names in vtkImplicitCylinderWidget test (Max Smolens)&lt;br /&gt;
*** 2016-06: [https://github.com/Kitware/VTK/commit/e8170ff e8170ff]: Fix multiple definitions of vtkInteractionCallback (Max Smolens)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/7602a0e 7602a0e]: Make vtkCollection implement iterable in the python wrapping (Hastings Greer)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/dd87a44 dd87a44]: Allow pyvtkObjects to have InvokeEvent called on them with calldata (Hastings Greer)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/a0eb686 a0eb686]: Add #include for offsetof() macro in generated Python wrappers (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/bd63a80 bd63a80]: Handle case when textDims are NULL (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/5dcad97 5dcad97]: vtkTextMapper: fix rendering of empty string (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/e646e65 e646e65]: Fix vtkAxisActor2D documentation error (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/4be6351 4be6351]: vtkLegendScaleActor: add Modified() call after updating points (Max Smolens)&lt;br /&gt;
** 2016-03: [https://github.com/Kitware/VTK/commit/7a24b32 7a24b32]: Change picking manager to not own objects associated with pickers (Max Smolens)&lt;br /&gt;
** 2016-03: Support building python wrapping with VTK_ENABLE_KITS enabled&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/540f2c5 540f2c5]: python: Add adapter modules when VTK_ENABLE_KITS is ON (Max Smolens)&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/31b7b0e 31b7b0e]: python: Update wrapping tool to support multiple hierarchy and hint files (Max Smolens)&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/1ebfa5b 1ebfa5b]: python: Add wrapping of kits when VTK_ENABLE_KITS is ON (Max Smolens)&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
To configure Slicer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DQt5_DIR:PATH=/home/jcfr/Software/Qt5.9.1/5.9.1/gcc_64/lib/cmake/Qt5 ...  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically build VTK8 with OpenGL2 backend enabled.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Use VS2015 on windows&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-16 ===&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
===== Slicer =====&lt;br /&gt;
&lt;br /&gt;
* Test with Qt5.9.1: Linux {{done}}, macOS {{wip}}, Windows: {{done}}&lt;br /&gt;
&lt;br /&gt;
* Packaging:&lt;br /&gt;
** Update packaging script SlicerCPackBundleFixup.cmake&lt;br /&gt;
&lt;br /&gt;
* Building:&lt;br /&gt;
** Update build script to support qt5 (see https://github.com/jcfr/qt-easy-build )&lt;br /&gt;
** Update Slicer build instruction on developer wiki&lt;br /&gt;
&lt;br /&gt;
* Fix Slicer test failures:&lt;br /&gt;
** Floating point exceptions (&amp;quot;SIGFPE with code FPE_FLTUND&amp;quot;) on Mac (ModelToLabelMapTest, ModelToLabelMapTestLabelValue, N4ITKBiasFieldCorrectionTest).&lt;br /&gt;
** py_LandmarkRegistration crash on exit.&lt;br /&gt;
** py_VolumeRenderingThreeDOnlyLayout on Windows (&amp;quot;Shader object was not initialized, cannot attach it.&amp;quot;). This is a similar issue as was fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=25239 r25239], but resurrected due to the behavior of QVTKOpenGLWidget. The old fix is insufficient.&lt;br /&gt;
&lt;br /&gt;
* Application errors reported at https://discourse.slicer.org/t/qt5-build-a-few-hiccups/952 (more information and screenshots are available there)&lt;br /&gt;
** &amp;lt;del&amp;gt;Whenever an item is selected in the Fiducial/ROI/Ruler tool, the items get duplicated to an certain number of items that I didn’t count.&amp;lt;/del&amp;gt; Cannot reproduce on 0297723&lt;br /&gt;
** In Volume Rending module, the items of the ‘View’ combobox are no longer checkable.&lt;br /&gt;
** Switching to module ‘SceneViews’ crashes Slicer:&lt;br /&gt;
*** Switch to module: “SceneViews”&lt;br /&gt;
*** qSlicerSceneViewsModuleWidgetPrivate::setupUi - Capture link not implemented with Qt5&lt;br /&gt;
*** qSlicerSceneViewsModuleWidgetPrivate::setupUi - Restore scroll bar position not implemented with Qt5&lt;br /&gt;
*** As it says, it has yet to be implemented.&lt;br /&gt;
**Styles are broken (cannot select Slicer Dark Style)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Windows: Debug build runs very slowly - can it be improved? Build is very slow too, but the application runs so slowly in debug mode that it is basically unusable (this is a change from previous version that were usable for testing real workflows in debug mode).&amp;lt;/del&amp;gt; - fixed in VTK (a16b2da6), Slicer already uses VTK version that includes this&lt;br /&gt;
&lt;br /&gt;
===== SimpleITK  =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;SimpleITK doesn't recognize standard CMake way to enable C++11. See https://github.com/SimpleITK/SimpleITK/issues/260.&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Upstream fix: https://github.com/SimpleITK/SimpleITK/pull/261&amp;lt;/s&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26339 r26339] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26340 r26340]&lt;br /&gt;
&lt;br /&gt;
===== VTK  =====&lt;br /&gt;
&lt;br /&gt;
* Transparency is handled differently: see problem in this discussion thread http://vtk.1045678.n5.nabble.com/Strange-renderering-with-mixed-polydata-volume-with-QVTKOpenGLWidget-td5743309.html and a related fix in ITKSnap https://github.com/pyushkevich/itksnap/blob/master/GUI/Qt/main.cxx#L572-L574 and &lt;br /&gt;
&lt;br /&gt;
=== 2017-08-14 ===&lt;br /&gt;
&lt;br /&gt;
As of 2017-08-14, the support for Qt5 and VTK8 has been integrated into the trunk.&lt;br /&gt;
&lt;br /&gt;
Command line arguments to expose webgl and webengine debugging:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./Slicer-build/Slicer --enable-experimental-web-platform-features --enable-unsafe-es3-apis --remote-debugging-port=12117 --use-gl=desktop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
&lt;br /&gt;
===== VTK =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Fix and update VTK: https://gitlab.kitware.com/vtk/vtk/issues/17076 (&amp;quot;OpenGL errors occur when destroying vtkWin32OpenGLRenderWindow&amp;quot;) (Only affects old OpenGL backend.)&amp;lt;/del&amp;gt;. This is not issue for Slicer. VTK8 based build will use openGL2 backend, and VTK7.1 based build do not have the problem. See https://gitlab.kitware.com/vtk/vtk/issues/17076#note_303185&lt;br /&gt;
* &amp;lt;del&amp;gt;Merge and update VTK: QVTKOpenGLWidget can blit uninitialized framebuffers. On Mac, the bug is evident through visible artifacts when resizing the views.&amp;lt;/del&amp;gt; Merged in  https://gitlab.kitware.com/vtk/vtk/merge_requests/3138.&lt;br /&gt;
&lt;br /&gt;
===== Slicer =====&lt;br /&gt;
&lt;br /&gt;
* Packaging&lt;br /&gt;
** &amp;lt;del&amp;gt;Update packaging scripts (SlicerBlockInstallQt.cmake,&amp;lt;/del&amp;gt; SlicerCPackBundleFixup.cmake)&lt;br /&gt;
*** &amp;lt;del&amp;gt;Linux&amp;lt;/del&amp;gt; {{done}}, macOS {{wip}}, &amp;lt;del&amp;gt;Windows&amp;lt;/del&amp;gt;: {{done}} - &amp;lt;del&amp;gt;See https://github.com/jcfr/Slicer/tree/support-qt5-packaging&amp;lt;/del&amp;gt; - Integrated in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26289 r26289]&lt;br /&gt;
** Linux:&lt;br /&gt;
*** needed to manually copy shared libraries:&lt;br /&gt;
**** libasound.so.2&lt;br /&gt;
**** libxslt.so.1&lt;br /&gt;
**** libsmime3&lt;br /&gt;
**** libstdc++.so.6 (glibc mismatch, needed GLIBCXX_3.4.21) should build instead with manylinux&lt;br /&gt;
*** &amp;lt;del&amp;gt;like on mac, need to create bin/platfrms and bin/sqldrivers and copy in platforms/libqxcb.so and sqldrivers/libqsqlite.so&amp;lt;/del&amp;gt;&lt;br /&gt;
** Mac:&lt;br /&gt;
*** &amp;lt;del&amp;gt;Add libqcocoa.dylib and libqsqlite.dylib to package for mac&amp;lt;/del&amp;gt;&lt;br /&gt;
***:&amp;lt;pre&amp;gt;&lt;br /&gt;
***::mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers&lt;br /&gt;
***::cp ~/Qt/5.7/clang_64/plugins/sqldrivers/libqsqlite.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers/&lt;br /&gt;
***::mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/platforms&lt;br /&gt;
***::cp ~/Qt/5.7/clang_64/plugins/platforms/libqcocoa.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/platforms/&lt;br /&gt;
***:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find and fix layout changes.&lt;br /&gt;
** &amp;lt;del&amp;gt;For example, some widgets likely need to set QSizePolicy::Expanding, such as the exit application confirmation dialog. See https://github.com/commontk/CTK/pull/738&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26282 r26282]&lt;br /&gt;
* &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Build shows errors in console at start: Proposed fix in https://github.com/Slicer/Slicer/pull/774&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26279 r26279] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26280 r26280]&lt;br /&gt;
**:&amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
**::Failed to obtain reference to 'FileMenu'&lt;br /&gt;
**::Failed to obtain reference to 'qSlicerAppMainWindow'&lt;br /&gt;
**::No Data Probe frame - cannot create DataProbe&lt;br /&gt;
**::Failed to obtain reference to 'qSlicerAppMainWindow'&lt;br /&gt;
**::Failed to obtain reference to 'FileMenu'&lt;br /&gt;
**:&amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Fix Slicer test failures:&lt;br /&gt;
** &amp;lt;del&amp;gt;qMRMLLayoutManagerWithCustomFactoryTest (&amp;quot;vtkPlaneSource: Bad plane coordinate system&amp;quot;). See https://github.com/Slicer/Slicer/pull/775&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26285 r26285]&lt;br /&gt;
** &amp;lt;del&amp;gt;ResampleDTIVolumeBSplineInterpolationTest (image diff?). See https://github.com/Slicer/Slicer/pull/776&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26288 r26288]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Linux/Windows/macOS: fix for `libpng warning: iCCP: known incorrect sRGB profile`&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26276 r26276]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== CTK =====&lt;br /&gt;
&lt;br /&gt;
* Fix CTK warnings. See http://slicer.cdash.org/viewBuildError.php?type=1&amp;amp;buildid=1076772&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-07 ===&lt;br /&gt;
&lt;br /&gt;
As of 2017-08-07 the relevant branches for testing are:&lt;br /&gt;
* &amp;lt;del&amp;gt;Slicer: https://github.com/msmolens/Slicer/tree/support-qt5-2017-08-05-r26208 (includes VTK8)&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26268 r26268]&lt;br /&gt;
** &amp;lt;del&amp;gt;old branches&amp;lt;/del&amp;gt;:&lt;br /&gt;
*** &amp;lt;del&amp;gt;https://github.com/msmolens/Slicer/tree/support-qt5-2017-07-29-r26186&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;CTK: https://github.com/msmolens/CTK/tree/wip-support-qvtkopenglwidget&amp;lt;/del&amp;gt; - Integrated in CTK as [https://github.com/commontk/CTK/commit/1066374b63b6907797ee14b35196829216fbc3dd commontk/CTK@1066374], integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26224 r26224]&lt;br /&gt;
* &amp;lt;del&amp;gt;VTK: https://github.com/Slicer/VTK/tree/slicer-v8.0.0-2017-08-07-88c80af&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;DCMTK: https://github.com/msmolens/DCMTK/tree/patched-DCMTK-3.6.2_20170801&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26204 r26204] (Branch was also renamed - see https://github.com/commontk/DCMTK/tree/patched-DCMTK-3.6.2_20170714)&lt;br /&gt;
* &amp;lt;del&amp;gt;PythonQt: https://github.com/msmolens/PythonQt/tree/msvc-bigobj&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;qRestAPI: https://github.com/msmolens/qRestAPI/tree/support-qt-no-ssl-macro&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26198 r26198]&lt;br /&gt;
* &amp;lt;del&amp;gt;AppLauncher: https://github.com/msmolens/AppLauncher/tree/support-qt5&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26217 r26217]&lt;br /&gt;
* &amp;lt;del&amp;gt;MultiVolumeExplorer: https://github.com/msmolens/MultiVolumeExplorer/tree/support-qt5&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For VS2015 gotchas, see below.&lt;br /&gt;
&lt;br /&gt;
* Qt5/VTK8 integration TODO:&lt;br /&gt;
** &amp;lt;del&amp;gt;Properly initialize QVTKOpenGLWidget. Call QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance so that an OpenGL core profile context is requested.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Properly initialize QVTKOpenGLWidget for tests. Call QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance so that an OpenGL core profile context is requested. (Slicer, CTK)&amp;lt;/del&amp;gt;&lt;br /&gt;
** Enable C++11 for Slicer, extensions, and libraries as appropriate.&lt;br /&gt;
*** &amp;lt;del&amp;gt;BRAINSTools ignores configuration options and fails to configure when C++11 is enabled.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;DCMTK has a compile error when C++11 is enabled?&amp;lt;/del&amp;gt;. (Resolved: requires custom definition to enable C++11.)&lt;br /&gt;
*** &amp;lt;del&amp;gt;Slicer&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Libraries that use C++&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Extensions&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Add VTK_OVERRIDE, VTK_FINAL, VTK_DELETE_FUNCTION and other necessary keywords to fix build warnings. Maintain compatibility with VTK7 by defining these as empty when using VTK7.&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;OpenIGTLinkIF&amp;lt;/del&amp;gt; Updated in https://github.com/openigtlink/OpenIGTLinkIF/pull/72&lt;br /&gt;
**** &amp;lt;del&amp;gt;MultiVolumeExplorer&amp;lt;/del&amp;gt; Updated in https://github.com/fedorov/MultiVolumeExplorer/pull/36.&lt;br /&gt;
**** &amp;lt;del&amp;gt;ParameterSerializer&amp;lt;/del&amp;gt; Updated in https://github.com/Slicer/ParameterSerializer/pull/7.&lt;br /&gt;
**** &amp;lt;del&amp;gt;EMSegment&amp;lt;/del&amp;gt; Updated in [http://viewvc.slicer.org/viewvc.cgi/Slicer3?view=revision&amp;amp;revision=17135 r17135]. Integrated in Slicer in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26228 r26228]&lt;br /&gt;
**** &amp;lt;del&amp;gt;OpenIGTLinkIF&amp;lt;/del&amp;gt; - Integrated  in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26227 r26227] (Changes available in [https://github.com/Slicer/OpenIGTLinkIF Slicer/OpenIGTLinkIF] - Pending PR: &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/70 #70]&amp;lt;/del&amp;gt;, &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/71 #71]&amp;lt;/del&amp;gt;, [https://github.com/openigtlink/OpenIGTLinkIF/pull/72 #72], &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/73 #73]&amp;lt;/del&amp;gt; and [https://github.com/openigtlink/OpenIGTLinkIF/pull/74 #74]&lt;br /&gt;
**** SlicerExecutionModel&lt;br /&gt;
**** &amp;lt;del&amp;gt;DataStore (see https://github.com/Slicer/Slicer-DataStore/pull/3)&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26229 r26229]&lt;br /&gt;
*** &amp;lt;del&amp;gt;DCMTK 3.6.2 has a configuration error when C++11 is enabled on Linux. See https://github.com/msmolens/DCMTK/commit/c9ccd45212cb542d78201995951fbcfb416f8b16 for a workaround.&amp;lt;/del&amp;gt; - See  [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26204 r26204] and [https://github.com/commontk/DCMTK/tree/patched-DCMTK-3.6.2_20170714 commontk/DCMTK@patched-DCMTK-3.6.2_20170714] - DCMTK team was notified - See [https://github.com/msmolens/DCMTK/commit/c9ccd45212cb542d78201995951fbcfb416f8b16#commitcomment-23474059 here])&lt;br /&gt;
** &amp;lt;del&amp;gt;Set OpenGL2 as default rendering backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;CTK and Slicer QtTesting tests refer to QVTKWidget. Can they be converted to recognize QVTKOpenGLWidget?&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update CTK: https://github.com/commontk/PythonQt/pull/57 (&amp;quot;Fix compile error on MSVC with Qt 5.7.1&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: https://gitlab.kitware.com/vtk/vtk/merge_requests/3014 (&amp;quot;Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: https://gitlab.kitware.com/vtk/vtk/merge_requests/3041 (&amp;quot;QVTKOpenGLWidget: Set screen size on render window&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix and update VTK: https://gitlab.kitware.com/vtk/vtk/issues/17091 (&amp;quot;QVTKOpenGLWidget: Picking vtkActor2D fails&amp;quot;). In Slicer one operation this issue affects is picking slice view ROI box handles.&amp;lt;/del&amp;gt; Merged in https://gitlab.kitware.com/vtk/vtk/merge_requests/3103.&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: QVTKOpenGLWidget can blit uninitialized framebuffers. On Mac, the bug is evident through visible artifacts when resizing the views.&amp;lt;/del&amp;gt; Merged in https://gitlab.kitware.com/vtk/vtk/merge_requests/3138.&lt;br /&gt;
** &amp;lt;del&amp;gt;Clicking on module search result in popup does not open the module. ComboBox does not always show the selected item.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLColorPickerWidgetTest2 on Mac crashes due to changes in QColorDialog in Qt5. CTK should no longer assume the non-native dialog is constructed, i.e. the layouts exist, when ctkColorDialog is instantiated.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix CTK Qt5 test failures.&amp;lt;/del&amp;gt;&lt;br /&gt;
** OpenSSL/DataStore/qRestAPI issues?&lt;br /&gt;
** &amp;lt;del&amp;gt;CTK needs to properly export CTK_USE_QVTKOPENGLWIDGET so that the preprocessor correctly handles &amp;lt;tt&amp;gt;#if CTK_USE_QVTKOPENGLWIDGET&amp;lt;/tt&amp;gt; in its header files. Or, an alternative mechanism could be implemented.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Windows/Linux: CPU and GPU Volume Rendering display nothing or are corrupt. GPU Volume Rendering gives OpenGL errors.&amp;lt;/del&amp;gt; Disabling multisampling before creating the default surface format fixes this. See https://gitlab.kitware.com/vtk/vtk/issues/17095.&lt;br /&gt;
** &amp;lt;del&amp;gt;Mac: Slice views use only lower-left quarter of widget.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Set Qt::AA_EnableHighDpiScaling to enable automatic scaling based on the pixel density of the monitor. This enables High DPI for platforms other than Mac.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Call setEnableHiDPI(true) on QVTKOpenGLWidgets.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLSliceWidget: Scale SliceView geometry by its devicePixelRatio() before calling this-&amp;gt;SliceController-&amp;gt;setSliceViewSize().&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLSliceWidget: Observe change in devicePixelRatio (i.e. app dragged to another screen) and recompute slice view size.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Volume Rendering transfer functions aren't displayed correctly. (ctkVTKChartView)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix vtkWindowToImageFilter usage of method deprecated in VTK8.1: https://github.com/Kitware/VTK/blob/b8eae1e022cc71de5dcac578f4087b71d8573324/Rendering/Core/vtkWindowToImageFilter.h#L95&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix Qt deprecation warnings.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Address &amp;quot;Policy CMP0020 is not set: Automatically link Qt executables to qtmain target on Windows&amp;quot; warnings.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL backend.&amp;lt;/del&amp;gt; - Changes integrated into the trunk and tested daily&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL2 backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with Qt4.&amp;lt;/del&amp;gt;&lt;br /&gt;
** Test with Qt5.9.1.&lt;br /&gt;
** &amp;lt;del&amp;gt;Support VS2015 by updating to latest python-cmake-buildsystem. Prerequisite: make pre-compiled OpenSSL available for VS2015/VS2017.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Update MultiVolumeExplorer hash for Qt5 support.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TODOs and Notes for the current integration&lt;br /&gt;
** Make Qt5.7.1 the required version if version greater than Qt5.6; a QWebEngine bug: https://bugreports.qt.io/browse/QTBUG-54762 was resolved in 5.7.1.&lt;br /&gt;
** Windows:&lt;br /&gt;
*** Tested build: VS2013, Qt5.7.1 downloaded from Qt's official releases. &lt;br /&gt;
*** 2017-08-07: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1076299&lt;br /&gt;
*** &amp;lt;s&amp;gt;SlicerLauncherSettings.ini need to include path to Qt bin directory. Doing this manually right now &amp;lt;/s&amp;gt;&lt;br /&gt;
*** VS2015:&lt;br /&gt;
**** &amp;lt;del&amp;gt;Configure with &amp;lt;code&amp;gt;-DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=OFF&amp;lt;/code&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;Python 2.7: This patch should be applied. See https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/issues/161&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;DCMTK: To fix &amp;quot;DCMTK was configured to use the C++11 STL, [...]&amp;quot; error. Edit &amp;lt;code&amp;gt;C:\path\to\S-bld\DCMTK\CMake\osconfig.h.in&amp;lt;/code&amp;gt; and comment lines highlighted in  https://github.com/commontk/DCMTK/blob/d8ed091cda2b815226eafe41f5b4fe3bd22f8d5d/CMake/osconfig.h.in#L1096-L1100&amp;lt;/del&amp;gt;&lt;br /&gt;
***** To understand why: See https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/&lt;br /&gt;
***** From Microsoft: &amp;lt;code&amp;gt;We won’t update __cplusplus until the compiler fully conforms to the standard. Until then, you can check the value of _MSVC_LANG.&amp;lt;/code&amp;gt;&lt;br /&gt;
***** Or, could change logic in SuperBuild/External_DCMTK.cmake to only enable C++11 for UNIX platforms.&lt;br /&gt;
&lt;br /&gt;
* MacOSX:&lt;br /&gt;
** Tested build: Qt5.7.1 downloaded from Qt's official releases, MacOSX10.11&lt;br /&gt;
** 2017-08-07: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1076538&lt;br /&gt;
*** NOTE: WIP qt-easy-build to build Qt5.7.1 with OpenSSL support: https://github.com/msmolens/qt-easy-build/commits/wip-qt5; based on https://github.com/jcfr/qt-easy-build/pull/32&lt;br /&gt;
** &amp;lt;s&amp;gt; Need to address manual install of the sql and cocoa plugin and platform files for sql and cocoa. &amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-02 ===&lt;br /&gt;
&lt;br /&gt;
* Linux:&lt;br /&gt;
** Tested build: Ubuntu 16.04, gcc, Qt5.7.1 downloaded from Qt's official releases:&lt;br /&gt;
** 2017-08-02: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1074507&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 2017-01 ===&lt;br /&gt;
* Work-in-progress branch that partially builds&lt;br /&gt;
** 2017-01:&lt;br /&gt;
*** https://github.com/Slicer/Slicer/pull/648 corresponding to branch https://github.com/Slicer/Slicer/compare/master...jcfr:support-qt5?expand=1&lt;br /&gt;
&lt;br /&gt;
* Original branch:&lt;br /&gt;
https://github.com/jcfr/Slicer/commits/support-qt5&lt;br /&gt;
&lt;br /&gt;
=== 2016-12 ===&lt;br /&gt;
&lt;br /&gt;
** 2016-12:&lt;br /&gt;
*** Slicer: https://github.com/Slicer/Slicer/compare/master...pieper:slicer-qt5?expand=1&lt;br /&gt;
*** CTK: https://github.com/commontk/CTK/compare/master...pieper:slicer-qt5?expand=1&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-Qt5-2016-12-12.PNG|thumb|right|A first running example [https://github.com/Slicer/Slicer/commit/08f40bd09ff525288710c1ccddbc09381264f5cd described in this commit]]]&lt;br /&gt;
&lt;br /&gt;
* Superbuild configure command on mac using Qt 5.7 stock downloads&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/Users/pieper/Qt/5.7/clang_64/bin/qmake \&lt;br /&gt;
  -DCMAKE_PREFIX_PATH:PATH=/Users/pieper/Qt/5.7/clang_64/ \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_SimpleITK:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_QtTesting:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \&lt;br /&gt;
  -DSlicer_QT_VERSION:STRING=5 \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Platform Notes ====&lt;br /&gt;
&lt;br /&gt;
Experimental build on Window:&lt;br /&gt;
* Visual Studio Community 2015&lt;br /&gt;
* Qt 5.7&lt;br /&gt;
** Include QtWebEngine and QtScript during install&lt;br /&gt;
** Select 2015 64 bit install&lt;br /&gt;
* Qt 5.8&lt;br /&gt;
** Use Visual Studio Community 2015 or above. Qt-5.8 does not support QtWebEngine for msvc 2013.&lt;br /&gt;
&lt;br /&gt;
==== Known Issues ====&lt;br /&gt;
&lt;br /&gt;
* Slice viewers do not have the expected size after changing layout&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
&lt;br /&gt;
===== All platforms =====&lt;br /&gt;
* Slicer build system upgrade: To be done  {{wip}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Add  Slicer_QT_VERSION option that could be set to either 4 or 5 - See what is done in CTK&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Fix qRestAPI to support Qt5 (or turn off Slicer_BUILD_EXTENSIONMANAGER_SUPPORT for testing)&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Update use of QT4_* macros (see below) - See what is done in CTK&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
*** &amp;lt;s&amp;gt;The QT5_ versions of the macros appear to be directly compatible&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;del&amp;gt;[https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Port from QtWebKit to QtWebEngine] &amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Update of classes using WebKit to work with &amp;lt;code&amp;gt;WebEngineView&amp;lt;/code&amp;gt; (these includes &amp;quot;Extension Manager&amp;quot;,  &amp;quot;Data Store&amp;quot;, &amp;quot;Chart View&amp;quot; and `qMRMLExpandingWebView`).&amp;lt;/del&amp;gt;&lt;br /&gt;
*** `qSlicerWebWidget` should be improved, moved to CTK and used for all widgets making use of a web view.&lt;br /&gt;
** &amp;lt;s&amp;gt;update PythonQt to the latest Qt version&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
*** &amp;lt;del&amp;gt;Look at updating PythonQt to support QWebEngine&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Fix [https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5#Plugin_loading differences in plugin loading]&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
* &amp;lt;del&amp;gt;Qt5::Network is now a dependency of Base/QTCore (Networking module in Qt5 has classes like QNetworkProxyFactory that were in Qt4's QtCore module)&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;CTK Python wrapping doesn't expose [https://github.com/commontk/CTK/blob/9e6df183277d2516f3522a8ef024450f0bcb5a57/Libs/Widgets/ctkWidgetsUtils.h#L43 grabWidget].&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Linux =====&lt;br /&gt;
* fix fox `libpng warning: iCCP: known incorrect sRGB profile`&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/IsomicsPublic/Slicer-Qt5-patched-4.7.0-2017-01-24-linux-amd64.tar.gz Minimal working release experimental build] (no cli, ssl, simpleitk, ...) built on ubuntu 16.04, tested on debian 8&lt;br /&gt;
&lt;br /&gt;
* needed to manually copy shared libraries:&lt;br /&gt;
** libasound.so.2&lt;br /&gt;
** libxslt.so.1&lt;br /&gt;
** libsmime3&lt;br /&gt;
** libstdc++.so.6 (glibc mismatch, needed GLIBCXX_3.4.21) should build instead with manylinux&lt;br /&gt;
* like on mac, need to create bin/platfrms and bin/sqldrivers and copy in platforms/libqxcb.so and sqldrivers/libqsqlite.so&lt;br /&gt;
&lt;br /&gt;
===== Mac =====&lt;br /&gt;
** &amp;lt;del&amp;gt;on Mac, QT_NO_OPENSSL is defined, but so is QSslError leading to redefined symbol [https://github.com/jcfr/Slicer/blob/1d8aa09e4862c6fe48d9f229a11f151d9ed89cea/Base/QTGUI/qSlicerWebWidget.h#L43](here).&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Mac crash in qSlicerUnitsSettingsPanelPrivate::addQuantity, appears to be corrupted model.&amp;lt;/strike&amp;gt;  [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=25855 partly addressed by  r25855 ], finally resolved [https://github.com/Slicer/Slicer/commit/8e5d924dc938ad7f1efb22e13e327383f6347ada r25883].  Most expedient solution is probably to disable the units settings panel in the application settings since is not widely used in the application.&lt;br /&gt;
** Add libqcocoa.dylib and libqsqlite.dylib to package for mac&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers&lt;br /&gt;
  cp ~/Qt/5.7/clang_64/plugins/sqldrivers/libqsqlite.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers/&lt;br /&gt;
  mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/platforms&lt;br /&gt;
  cp ~/Qt/5.7/clang_64/plugins/platforms/libqcocoa.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/platforms/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Workarounds here:&lt;br /&gt;
https://gist.github.com/pieper/59de820ad08cf3c0f7a33926397e612d &amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Windows =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;qtstyleplugins library needs to be removed or ported to support windows&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;del&amp;gt;add declspec exports/imports&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;create .lib for use in QTGUI&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;support shared/static build?&amp;lt;/del&amp;gt;&lt;br /&gt;
* AppLauncher settings need to be update&lt;br /&gt;
** &amp;lt;s&amp;gt;Add to PYTHONPATH: &amp;lt;superbuild&amp;gt;/VTKv7-build/bin/Debug (currently lib not bin)&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** Add to PATH: &amp;lt;Qt&amp;gt;/5.7/msvc2013_64/bin&lt;br /&gt;
* Debug build runs very slowly - can it be improved?  Build is very slow too, but the application runs so slowly in debug mode that it is basically unusable (this is a change from previous version that were usable for testing real workflows in debug mode).&lt;br /&gt;
* Setting Slicer_USE_SimpleITK to ON in CMake results in compile-time errors.&lt;br /&gt;
* &amp;lt;del&amp;gt;Creating a debug build (MSVC 2013, Qt5.7) creates a compile time error on PythonQt.cpp while building the CTK project with message: &amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;Error 1220 error C1128: number of sections exceeded object file format limit: compile with /bigobj &amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example starting point command:&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DQt5_DIR:FILEPATH=c:/Qt/5.7/msvc2013_64/lib/cmake/Qt5 \&lt;br /&gt;
  -DCMAKE_CONFIGUREATION_TYPES:STRING=Release \&lt;br /&gt;
  -DADDITIONAL_C_FLAGS:STRING=&amp;quot; /MP8&amp;quot; \&lt;br /&gt;
  -DADDITIONAL_CXX_FLAGS:STRING=&amp;quot; /MP8&amp;quot; \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_SimpleITK:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_QtTesting:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_DataStore:BOOL=OFF \&lt;br /&gt;
  -DSlicer_QT_VERSION:STRING=5 \&lt;br /&gt;
  -DBUILD_TESTING:BOOL=OFF \&lt;br /&gt;
  -G&amp;quot;Visual Studio 12 2013 Win64&amp;quot; \&lt;br /&gt;
  c:/pieper/slicer4/latest/Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/Nightly/Developers/Tutorials/MigrationGuide/VTK7-Qt4-to-VTK8-Qt5}}&lt;br /&gt;
&lt;br /&gt;
== List of extensions that may require updates ==&lt;br /&gt;
&lt;br /&gt;
See https://discourse.slicer.org/t/slicer-extensions-action-required-by-maintainers/1003&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Qt 4.8 support schedule info: http://slicer-devel.65872.n3.nabble.com/Fwd-Qt-4-8-x-support-extended-out-by-a-year-td4033248.html&lt;br /&gt;
* http://blog.qt.io/blog/2014/11/27/qt-4-8-x-support-to-be-extended-for-another-year&lt;br /&gt;
* [https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Port from QtWebKit to QtWebEngine]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/Qt5-and-VTK8&amp;diff=57619</id>
		<title>Documentation/Labs/Qt5-and-VTK8</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/Qt5-and-VTK8&amp;diff=57619"/>
		<updated>2018-01-09T14:43:43Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Slicer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the update of Slicer to use Qt 5.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Because Qt4 is not actively developed (as documented [http://blog.qt.io/blog/2014/11/27/qt-4-8-x-support-to-be-extended-for-another-year/ here] support ended), we need to work toward supporting Qt5. &lt;br /&gt;
&lt;br /&gt;
Similarly because VTK7 is not actively developed, we need to work toward supporting VTK8 and the OpenGL2 rendering backend.&lt;br /&gt;
&lt;br /&gt;
This page summarizes support status of the various components of Slicer stack and remaining tasks.&lt;br /&gt;
&lt;br /&gt;
=== List of fixes integrated into VTK ===&lt;br /&gt;
&lt;br /&gt;
* VTK 8&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/3b94273 3b94273]: Fix memory leaks in vtkOpenGLRenderer::DonePick() (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/1b9800b 1b9800b]: Fix QVTKOpenGLWidget rendering with disabled interactor (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/056dd9a 056dd9a]: Fix picking when using QVTKOpenGLWidget (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/ee2ea5d ee2ea5d]: was missing object base initialization (Ken Martin, Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/e0c60b1 e0c60b1]: QVTKOpenGLWidget: Set screen size on render window (Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/8a60be1 8a60be1]: Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac (Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/bcce50b bcce50b]: cmake: Fix support for VTK_ENABLE_VTKPYTHON set to OFF (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/d0aed86 d0aed86]: cmake/vtkCompilerExtras: Remove &amp;quot;--no-undefined&amp;quot; gcc linker flag (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-06: [https://github.com/Kitware/VTK/commit/5a4ddec 5a4ddec]: Respect access specifier of using statements in wrapping (Max Smolens)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/b684733 b684733]: ENH: Allow selection of seed points using vtkSeedWidget (Andras Lasso)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/f86a870 f86a870]: Ensure vtkVariant stream associated with &amp;lt;&amp;lt; operator is set back to &amp;quot;dec&amp;quot;. (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-05: Support crosspiling emulator&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/894acce 894acce]: cmake: Import VTKCompileTools if CROSSCOMPILING_EMULATOR support is incomplete (Jean-Christophe Fillion-Robin)&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/d0f83df d0f83df]: cmake: Simplify buildsystem introducing VTK_COMPILE_TOOLS_IMPORTED (Jean-Christophe Fillion-Robin)&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/d767f09 d767f09]: cmake: Add support for CMAKE_CROSSCOMPILING_EMULATOR (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/91ca08b 91ca08b]: OpenGL2: Fix undeclared &amp;quot;glXGetProcAddressARB&amp;quot; when building on Centos5 (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2016-12: [https://github.com/Kitware/VTK/commit/a16b2da6 a16b2da6]: MSVC performance improvements. (David C. Lonie)&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/0ea52cc 0ea52cc]: fix an OpenGL2 issue impacting slicer and add test (Max Smolens)&lt;br /&gt;
&lt;br /&gt;
* VTK 7&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/d309ca8 d309ca8]: Consider whether volume transform preserves orientation (Max Smolens)&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/0cd1a32 0cd1a32]: Fix formatting of VTK_DELETE_FUNCTION (Max Smolens)&lt;br /&gt;
** 2016-08: Volume Rendering: Support large transfer function&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/ea74f88 ea74f88]: Adjusted LargeColorTf test to add coverage for scale/bias patch. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/5d8e8d5 5d8e8d5]: Added texture width checks in opacity and gradientOpacity tables. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/ddb5ebc ddb5ebc]: Fixed gl color scale issue. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-07: [https://github.com/Kitware/VTK/commit/813462c 813462c]: Added a method in RGBTable to check whether certain tex size is supported. (Alvaro Sanchez)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/114bc96 114bc96]: Add test for GPU volume rendering with a large color transfer function. (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/634a33b 634a33b]: vtkOpenGLGPUVolumeRayCastMapper: handle when table size increases (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/608d4fb 608d4fb]: vtkOpenGLGPUVolumeRayCastMapper: remove unnecessary NULL check before delete (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/18b6e57 18b6e57]: vtkOpenGLGPUVolumeRayCastMapper: use existing function to find next power of 2 (Max Smolens)&lt;br /&gt;
*** 2015-07: [https://github.com/Kitware/VTK/commit/f0eba00 f0eba00]: GPU raycast volume rendering now supports textures larger than 1024 (Julien Finet)&lt;br /&gt;
** 2016-07: Fix VTK interaction&lt;br /&gt;
*** 2016-06: [https://github.com/Kitware/VTK/commit/9ecc055 9ecc055]: Fix variable names in vtkImplicitCylinderWidget test (Max Smolens)&lt;br /&gt;
*** 2016-06: [https://github.com/Kitware/VTK/commit/e8170ff e8170ff]: Fix multiple definitions of vtkInteractionCallback (Max Smolens)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/7602a0e 7602a0e]: Make vtkCollection implement iterable in the python wrapping (Hastings Greer)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/dd87a44 dd87a44]: Allow pyvtkObjects to have InvokeEvent called on them with calldata (Hastings Greer)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/a0eb686 a0eb686]: Add #include for offsetof() macro in generated Python wrappers (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/bd63a80 bd63a80]: Handle case when textDims are NULL (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/5dcad97 5dcad97]: vtkTextMapper: fix rendering of empty string (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/e646e65 e646e65]: Fix vtkAxisActor2D documentation error (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/4be6351 4be6351]: vtkLegendScaleActor: add Modified() call after updating points (Max Smolens)&lt;br /&gt;
** 2016-03: [https://github.com/Kitware/VTK/commit/7a24b32 7a24b32]: Change picking manager to not own objects associated with pickers (Max Smolens)&lt;br /&gt;
** 2016-03: Support building python wrapping with VTK_ENABLE_KITS enabled&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/540f2c5 540f2c5]: python: Add adapter modules when VTK_ENABLE_KITS is ON (Max Smolens)&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/31b7b0e 31b7b0e]: python: Update wrapping tool to support multiple hierarchy and hint files (Max Smolens)&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/1ebfa5b 1ebfa5b]: python: Add wrapping of kits when VTK_ENABLE_KITS is ON (Max Smolens)&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
To configure Slicer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DQt5_DIR:PATH=/home/jcfr/Software/Qt5.9.1/5.9.1/gcc_64/lib/cmake/Qt5 ...  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically build VTK8 with OpenGL2 backend enabled.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Use VS2015 on windows&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-16 ===&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
===== Slicer =====&lt;br /&gt;
&lt;br /&gt;
* Test with Qt5.9.1: Linux {{done}}, macOS {{wip}}, Windows: {{done}}&lt;br /&gt;
&lt;br /&gt;
* Packaging:&lt;br /&gt;
** Update packaging script SlicerCPackBundleFixup.cmake&lt;br /&gt;
&lt;br /&gt;
* Building:&lt;br /&gt;
** Update build script to support qt5 (see https://github.com/jcfr/qt-easy-build )&lt;br /&gt;
** Update Slicer build instruction on developer wiki&lt;br /&gt;
&lt;br /&gt;
* Fix Slicer test failures:&lt;br /&gt;
** Floating point exceptions (&amp;quot;SIGFPE with code FPE_FLTUND&amp;quot;) on Mac (ModelToLabelMapTest, ModelToLabelMapTestLabelValue, N4ITKBiasFieldCorrectionTest).&lt;br /&gt;
** py_LandmarkRegistration crash on exit.&lt;br /&gt;
** py_VolumeRenderingThreeDOnlyLayout on Windows (&amp;quot;Shader object was not initialized, cannot attach it.&amp;quot;). This is a similar issue as was fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=25239 r25239], but resurrected due to the behavior of QVTKOpenGLWidget. The old fix is insufficient.&lt;br /&gt;
&lt;br /&gt;
* Application errors reported at https://discourse.slicer.org/t/qt5-build-a-few-hiccups/952 (more information and screenshots are available there)&lt;br /&gt;
** &amp;lt;del&amp;gt;Whenever an item is selected in the Fiducial/ROI/Ruler tool, the items get duplicated to an certain number of items that I didn’t count.&amp;lt;/del&amp;gt; Cannot reproduce on 0297723&lt;br /&gt;
** In Volume Rending module, the items of the ‘View’ combobox are no longer checkable.&lt;br /&gt;
** Switching to module ‘SceneViews’ crashes Slicer:&lt;br /&gt;
*** Switch to module: “SceneViews”&lt;br /&gt;
*** qSlicerSceneViewsModuleWidgetPrivate::setupUi - Capture link not implemented with Qt5&lt;br /&gt;
*** qSlicerSceneViewsModuleWidgetPrivate::setupUi - Restore scroll bar position not implemented with Qt5&lt;br /&gt;
*** As it says, it has yet to be implemented.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Windows: Debug build runs very slowly - can it be improved? Build is very slow too, but the application runs so slowly in debug mode that it is basically unusable (this is a change from previous version that were usable for testing real workflows in debug mode).&amp;lt;/del&amp;gt; - fixed in VTK (a16b2da6), Slicer already uses VTK version that includes this&lt;br /&gt;
&lt;br /&gt;
===== SimpleITK  =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;SimpleITK doesn't recognize standard CMake way to enable C++11. See https://github.com/SimpleITK/SimpleITK/issues/260.&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Upstream fix: https://github.com/SimpleITK/SimpleITK/pull/261&amp;lt;/s&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26339 r26339] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26340 r26340]&lt;br /&gt;
&lt;br /&gt;
===== VTK  =====&lt;br /&gt;
&lt;br /&gt;
* Transparency is handled differently: see problem in this discussion thread http://vtk.1045678.n5.nabble.com/Strange-renderering-with-mixed-polydata-volume-with-QVTKOpenGLWidget-td5743309.html and a related fix in ITKSnap https://github.com/pyushkevich/itksnap/blob/master/GUI/Qt/main.cxx#L572-L574 and &lt;br /&gt;
&lt;br /&gt;
=== 2017-08-14 ===&lt;br /&gt;
&lt;br /&gt;
As of 2017-08-14, the support for Qt5 and VTK8 has been integrated into the trunk.&lt;br /&gt;
&lt;br /&gt;
Command line arguments to expose webgl and webengine debugging:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./Slicer-build/Slicer --enable-experimental-web-platform-features --enable-unsafe-es3-apis --remote-debugging-port=12117 --use-gl=desktop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
&lt;br /&gt;
===== VTK =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Fix and update VTK: https://gitlab.kitware.com/vtk/vtk/issues/17076 (&amp;quot;OpenGL errors occur when destroying vtkWin32OpenGLRenderWindow&amp;quot;) (Only affects old OpenGL backend.)&amp;lt;/del&amp;gt;. This is not issue for Slicer. VTK8 based build will use openGL2 backend, and VTK7.1 based build do not have the problem. See https://gitlab.kitware.com/vtk/vtk/issues/17076#note_303185&lt;br /&gt;
* &amp;lt;del&amp;gt;Merge and update VTK: QVTKOpenGLWidget can blit uninitialized framebuffers. On Mac, the bug is evident through visible artifacts when resizing the views.&amp;lt;/del&amp;gt; Merged in  https://gitlab.kitware.com/vtk/vtk/merge_requests/3138.&lt;br /&gt;
&lt;br /&gt;
===== Slicer =====&lt;br /&gt;
&lt;br /&gt;
* Packaging&lt;br /&gt;
** &amp;lt;del&amp;gt;Update packaging scripts (SlicerBlockInstallQt.cmake,&amp;lt;/del&amp;gt; SlicerCPackBundleFixup.cmake)&lt;br /&gt;
*** &amp;lt;del&amp;gt;Linux&amp;lt;/del&amp;gt; {{done}}, macOS {{wip}}, &amp;lt;del&amp;gt;Windows&amp;lt;/del&amp;gt;: {{done}} - &amp;lt;del&amp;gt;See https://github.com/jcfr/Slicer/tree/support-qt5-packaging&amp;lt;/del&amp;gt; - Integrated in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26289 r26289]&lt;br /&gt;
** Linux:&lt;br /&gt;
*** needed to manually copy shared libraries:&lt;br /&gt;
**** libasound.so.2&lt;br /&gt;
**** libxslt.so.1&lt;br /&gt;
**** libsmime3&lt;br /&gt;
**** libstdc++.so.6 (glibc mismatch, needed GLIBCXX_3.4.21) should build instead with manylinux&lt;br /&gt;
*** &amp;lt;del&amp;gt;like on mac, need to create bin/platfrms and bin/sqldrivers and copy in platforms/libqxcb.so and sqldrivers/libqsqlite.so&amp;lt;/del&amp;gt;&lt;br /&gt;
** Mac:&lt;br /&gt;
*** &amp;lt;del&amp;gt;Add libqcocoa.dylib and libqsqlite.dylib to package for mac&amp;lt;/del&amp;gt;&lt;br /&gt;
***:&amp;lt;pre&amp;gt;&lt;br /&gt;
***::mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers&lt;br /&gt;
***::cp ~/Qt/5.7/clang_64/plugins/sqldrivers/libqsqlite.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers/&lt;br /&gt;
***::mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/platforms&lt;br /&gt;
***::cp ~/Qt/5.7/clang_64/plugins/platforms/libqcocoa.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/platforms/&lt;br /&gt;
***:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find and fix layout changes.&lt;br /&gt;
** &amp;lt;del&amp;gt;For example, some widgets likely need to set QSizePolicy::Expanding, such as the exit application confirmation dialog. See https://github.com/commontk/CTK/pull/738&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26282 r26282]&lt;br /&gt;
* &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Build shows errors in console at start: Proposed fix in https://github.com/Slicer/Slicer/pull/774&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26279 r26279] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26280 r26280]&lt;br /&gt;
**:&amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
**::Failed to obtain reference to 'FileMenu'&lt;br /&gt;
**::Failed to obtain reference to 'qSlicerAppMainWindow'&lt;br /&gt;
**::No Data Probe frame - cannot create DataProbe&lt;br /&gt;
**::Failed to obtain reference to 'qSlicerAppMainWindow'&lt;br /&gt;
**::Failed to obtain reference to 'FileMenu'&lt;br /&gt;
**:&amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Fix Slicer test failures:&lt;br /&gt;
** &amp;lt;del&amp;gt;qMRMLLayoutManagerWithCustomFactoryTest (&amp;quot;vtkPlaneSource: Bad plane coordinate system&amp;quot;). See https://github.com/Slicer/Slicer/pull/775&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26285 r26285]&lt;br /&gt;
** &amp;lt;del&amp;gt;ResampleDTIVolumeBSplineInterpolationTest (image diff?). See https://github.com/Slicer/Slicer/pull/776&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26288 r26288]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Linux/Windows/macOS: fix for `libpng warning: iCCP: known incorrect sRGB profile`&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26276 r26276]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== CTK =====&lt;br /&gt;
&lt;br /&gt;
* Fix CTK warnings. See http://slicer.cdash.org/viewBuildError.php?type=1&amp;amp;buildid=1076772&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-07 ===&lt;br /&gt;
&lt;br /&gt;
As of 2017-08-07 the relevant branches for testing are:&lt;br /&gt;
* &amp;lt;del&amp;gt;Slicer: https://github.com/msmolens/Slicer/tree/support-qt5-2017-08-05-r26208 (includes VTK8)&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26268 r26268]&lt;br /&gt;
** &amp;lt;del&amp;gt;old branches&amp;lt;/del&amp;gt;:&lt;br /&gt;
*** &amp;lt;del&amp;gt;https://github.com/msmolens/Slicer/tree/support-qt5-2017-07-29-r26186&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;CTK: https://github.com/msmolens/CTK/tree/wip-support-qvtkopenglwidget&amp;lt;/del&amp;gt; - Integrated in CTK as [https://github.com/commontk/CTK/commit/1066374b63b6907797ee14b35196829216fbc3dd commontk/CTK@1066374], integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26224 r26224]&lt;br /&gt;
* &amp;lt;del&amp;gt;VTK: https://github.com/Slicer/VTK/tree/slicer-v8.0.0-2017-08-07-88c80af&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;DCMTK: https://github.com/msmolens/DCMTK/tree/patched-DCMTK-3.6.2_20170801&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26204 r26204] (Branch was also renamed - see https://github.com/commontk/DCMTK/tree/patched-DCMTK-3.6.2_20170714)&lt;br /&gt;
* &amp;lt;del&amp;gt;PythonQt: https://github.com/msmolens/PythonQt/tree/msvc-bigobj&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;qRestAPI: https://github.com/msmolens/qRestAPI/tree/support-qt-no-ssl-macro&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26198 r26198]&lt;br /&gt;
* &amp;lt;del&amp;gt;AppLauncher: https://github.com/msmolens/AppLauncher/tree/support-qt5&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26217 r26217]&lt;br /&gt;
* &amp;lt;del&amp;gt;MultiVolumeExplorer: https://github.com/msmolens/MultiVolumeExplorer/tree/support-qt5&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For VS2015 gotchas, see below.&lt;br /&gt;
&lt;br /&gt;
* Qt5/VTK8 integration TODO:&lt;br /&gt;
** &amp;lt;del&amp;gt;Properly initialize QVTKOpenGLWidget. Call QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance so that an OpenGL core profile context is requested.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Properly initialize QVTKOpenGLWidget for tests. Call QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance so that an OpenGL core profile context is requested. (Slicer, CTK)&amp;lt;/del&amp;gt;&lt;br /&gt;
** Enable C++11 for Slicer, extensions, and libraries as appropriate.&lt;br /&gt;
*** &amp;lt;del&amp;gt;BRAINSTools ignores configuration options and fails to configure when C++11 is enabled.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;DCMTK has a compile error when C++11 is enabled?&amp;lt;/del&amp;gt;. (Resolved: requires custom definition to enable C++11.)&lt;br /&gt;
*** &amp;lt;del&amp;gt;Slicer&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Libraries that use C++&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Extensions&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Add VTK_OVERRIDE, VTK_FINAL, VTK_DELETE_FUNCTION and other necessary keywords to fix build warnings. Maintain compatibility with VTK7 by defining these as empty when using VTK7.&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;OpenIGTLinkIF&amp;lt;/del&amp;gt; Updated in https://github.com/openigtlink/OpenIGTLinkIF/pull/72&lt;br /&gt;
**** &amp;lt;del&amp;gt;MultiVolumeExplorer&amp;lt;/del&amp;gt; Updated in https://github.com/fedorov/MultiVolumeExplorer/pull/36.&lt;br /&gt;
**** &amp;lt;del&amp;gt;ParameterSerializer&amp;lt;/del&amp;gt; Updated in https://github.com/Slicer/ParameterSerializer/pull/7.&lt;br /&gt;
**** &amp;lt;del&amp;gt;EMSegment&amp;lt;/del&amp;gt; Updated in [http://viewvc.slicer.org/viewvc.cgi/Slicer3?view=revision&amp;amp;revision=17135 r17135]. Integrated in Slicer in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26228 r26228]&lt;br /&gt;
**** &amp;lt;del&amp;gt;OpenIGTLinkIF&amp;lt;/del&amp;gt; - Integrated  in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26227 r26227] (Changes available in [https://github.com/Slicer/OpenIGTLinkIF Slicer/OpenIGTLinkIF] - Pending PR: &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/70 #70]&amp;lt;/del&amp;gt;, &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/71 #71]&amp;lt;/del&amp;gt;, [https://github.com/openigtlink/OpenIGTLinkIF/pull/72 #72], &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/73 #73]&amp;lt;/del&amp;gt; and [https://github.com/openigtlink/OpenIGTLinkIF/pull/74 #74]&lt;br /&gt;
**** SlicerExecutionModel&lt;br /&gt;
**** &amp;lt;del&amp;gt;DataStore (see https://github.com/Slicer/Slicer-DataStore/pull/3)&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26229 r26229]&lt;br /&gt;
*** &amp;lt;del&amp;gt;DCMTK 3.6.2 has a configuration error when C++11 is enabled on Linux. See https://github.com/msmolens/DCMTK/commit/c9ccd45212cb542d78201995951fbcfb416f8b16 for a workaround.&amp;lt;/del&amp;gt; - See  [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26204 r26204] and [https://github.com/commontk/DCMTK/tree/patched-DCMTK-3.6.2_20170714 commontk/DCMTK@patched-DCMTK-3.6.2_20170714] - DCMTK team was notified - See [https://github.com/msmolens/DCMTK/commit/c9ccd45212cb542d78201995951fbcfb416f8b16#commitcomment-23474059 here])&lt;br /&gt;
** &amp;lt;del&amp;gt;Set OpenGL2 as default rendering backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;CTK and Slicer QtTesting tests refer to QVTKWidget. Can they be converted to recognize QVTKOpenGLWidget?&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update CTK: https://github.com/commontk/PythonQt/pull/57 (&amp;quot;Fix compile error on MSVC with Qt 5.7.1&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: https://gitlab.kitware.com/vtk/vtk/merge_requests/3014 (&amp;quot;Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: https://gitlab.kitware.com/vtk/vtk/merge_requests/3041 (&amp;quot;QVTKOpenGLWidget: Set screen size on render window&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix and update VTK: https://gitlab.kitware.com/vtk/vtk/issues/17091 (&amp;quot;QVTKOpenGLWidget: Picking vtkActor2D fails&amp;quot;). In Slicer one operation this issue affects is picking slice view ROI box handles.&amp;lt;/del&amp;gt; Merged in https://gitlab.kitware.com/vtk/vtk/merge_requests/3103.&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: QVTKOpenGLWidget can blit uninitialized framebuffers. On Mac, the bug is evident through visible artifacts when resizing the views.&amp;lt;/del&amp;gt; Merged in https://gitlab.kitware.com/vtk/vtk/merge_requests/3138.&lt;br /&gt;
** &amp;lt;del&amp;gt;Clicking on module search result in popup does not open the module. ComboBox does not always show the selected item.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLColorPickerWidgetTest2 on Mac crashes due to changes in QColorDialog in Qt5. CTK should no longer assume the non-native dialog is constructed, i.e. the layouts exist, when ctkColorDialog is instantiated.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix CTK Qt5 test failures.&amp;lt;/del&amp;gt;&lt;br /&gt;
** OpenSSL/DataStore/qRestAPI issues?&lt;br /&gt;
** &amp;lt;del&amp;gt;CTK needs to properly export CTK_USE_QVTKOPENGLWIDGET so that the preprocessor correctly handles &amp;lt;tt&amp;gt;#if CTK_USE_QVTKOPENGLWIDGET&amp;lt;/tt&amp;gt; in its header files. Or, an alternative mechanism could be implemented.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Windows/Linux: CPU and GPU Volume Rendering display nothing or are corrupt. GPU Volume Rendering gives OpenGL errors.&amp;lt;/del&amp;gt; Disabling multisampling before creating the default surface format fixes this. See https://gitlab.kitware.com/vtk/vtk/issues/17095.&lt;br /&gt;
** &amp;lt;del&amp;gt;Mac: Slice views use only lower-left quarter of widget.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Set Qt::AA_EnableHighDpiScaling to enable automatic scaling based on the pixel density of the monitor. This enables High DPI for platforms other than Mac.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Call setEnableHiDPI(true) on QVTKOpenGLWidgets.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLSliceWidget: Scale SliceView geometry by its devicePixelRatio() before calling this-&amp;gt;SliceController-&amp;gt;setSliceViewSize().&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLSliceWidget: Observe change in devicePixelRatio (i.e. app dragged to another screen) and recompute slice view size.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Volume Rendering transfer functions aren't displayed correctly. (ctkVTKChartView)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix vtkWindowToImageFilter usage of method deprecated in VTK8.1: https://github.com/Kitware/VTK/blob/b8eae1e022cc71de5dcac578f4087b71d8573324/Rendering/Core/vtkWindowToImageFilter.h#L95&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix Qt deprecation warnings.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Address &amp;quot;Policy CMP0020 is not set: Automatically link Qt executables to qtmain target on Windows&amp;quot; warnings.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL backend.&amp;lt;/del&amp;gt; - Changes integrated into the trunk and tested daily&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL2 backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with Qt4.&amp;lt;/del&amp;gt;&lt;br /&gt;
** Test with Qt5.9.1.&lt;br /&gt;
** &amp;lt;del&amp;gt;Support VS2015 by updating to latest python-cmake-buildsystem. Prerequisite: make pre-compiled OpenSSL available for VS2015/VS2017.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Update MultiVolumeExplorer hash for Qt5 support.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TODOs and Notes for the current integration&lt;br /&gt;
** Make Qt5.7.1 the required version if version greater than Qt5.6; a QWebEngine bug: https://bugreports.qt.io/browse/QTBUG-54762 was resolved in 5.7.1.&lt;br /&gt;
** Windows:&lt;br /&gt;
*** Tested build: VS2013, Qt5.7.1 downloaded from Qt's official releases. &lt;br /&gt;
*** 2017-08-07: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1076299&lt;br /&gt;
*** &amp;lt;s&amp;gt;SlicerLauncherSettings.ini need to include path to Qt bin directory. Doing this manually right now &amp;lt;/s&amp;gt;&lt;br /&gt;
*** VS2015:&lt;br /&gt;
**** &amp;lt;del&amp;gt;Configure with &amp;lt;code&amp;gt;-DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=OFF&amp;lt;/code&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;Python 2.7: This patch should be applied. See https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/issues/161&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;DCMTK: To fix &amp;quot;DCMTK was configured to use the C++11 STL, [...]&amp;quot; error. Edit &amp;lt;code&amp;gt;C:\path\to\S-bld\DCMTK\CMake\osconfig.h.in&amp;lt;/code&amp;gt; and comment lines highlighted in  https://github.com/commontk/DCMTK/blob/d8ed091cda2b815226eafe41f5b4fe3bd22f8d5d/CMake/osconfig.h.in#L1096-L1100&amp;lt;/del&amp;gt;&lt;br /&gt;
***** To understand why: See https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/&lt;br /&gt;
***** From Microsoft: &amp;lt;code&amp;gt;We won’t update __cplusplus until the compiler fully conforms to the standard. Until then, you can check the value of _MSVC_LANG.&amp;lt;/code&amp;gt;&lt;br /&gt;
***** Or, could change logic in SuperBuild/External_DCMTK.cmake to only enable C++11 for UNIX platforms.&lt;br /&gt;
&lt;br /&gt;
* MacOSX:&lt;br /&gt;
** Tested build: Qt5.7.1 downloaded from Qt's official releases, MacOSX10.11&lt;br /&gt;
** 2017-08-07: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1076538&lt;br /&gt;
*** NOTE: WIP qt-easy-build to build Qt5.7.1 with OpenSSL support: https://github.com/msmolens/qt-easy-build/commits/wip-qt5; based on https://github.com/jcfr/qt-easy-build/pull/32&lt;br /&gt;
** &amp;lt;s&amp;gt; Need to address manual install of the sql and cocoa plugin and platform files for sql and cocoa. &amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-02 ===&lt;br /&gt;
&lt;br /&gt;
* Linux:&lt;br /&gt;
** Tested build: Ubuntu 16.04, gcc, Qt5.7.1 downloaded from Qt's official releases:&lt;br /&gt;
** 2017-08-02: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1074507&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 2017-01 ===&lt;br /&gt;
* Work-in-progress branch that partially builds&lt;br /&gt;
** 2017-01:&lt;br /&gt;
*** https://github.com/Slicer/Slicer/pull/648 corresponding to branch https://github.com/Slicer/Slicer/compare/master...jcfr:support-qt5?expand=1&lt;br /&gt;
&lt;br /&gt;
* Original branch:&lt;br /&gt;
https://github.com/jcfr/Slicer/commits/support-qt5&lt;br /&gt;
&lt;br /&gt;
=== 2016-12 ===&lt;br /&gt;
&lt;br /&gt;
** 2016-12:&lt;br /&gt;
*** Slicer: https://github.com/Slicer/Slicer/compare/master...pieper:slicer-qt5?expand=1&lt;br /&gt;
*** CTK: https://github.com/commontk/CTK/compare/master...pieper:slicer-qt5?expand=1&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-Qt5-2016-12-12.PNG|thumb|right|A first running example [https://github.com/Slicer/Slicer/commit/08f40bd09ff525288710c1ccddbc09381264f5cd described in this commit]]]&lt;br /&gt;
&lt;br /&gt;
* Superbuild configure command on mac using Qt 5.7 stock downloads&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/Users/pieper/Qt/5.7/clang_64/bin/qmake \&lt;br /&gt;
  -DCMAKE_PREFIX_PATH:PATH=/Users/pieper/Qt/5.7/clang_64/ \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_SimpleITK:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_QtTesting:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \&lt;br /&gt;
  -DSlicer_QT_VERSION:STRING=5 \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Platform Notes ====&lt;br /&gt;
&lt;br /&gt;
Experimental build on Window:&lt;br /&gt;
* Visual Studio Community 2015&lt;br /&gt;
* Qt 5.7&lt;br /&gt;
** Include QtWebEngine and QtScript during install&lt;br /&gt;
** Select 2015 64 bit install&lt;br /&gt;
* Qt 5.8&lt;br /&gt;
** Use Visual Studio Community 2015 or above. Qt-5.8 does not support QtWebEngine for msvc 2013.&lt;br /&gt;
&lt;br /&gt;
==== Known Issues ====&lt;br /&gt;
&lt;br /&gt;
* Slice viewers do not have the expected size after changing layout&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
&lt;br /&gt;
===== All platforms =====&lt;br /&gt;
* Slicer build system upgrade: To be done  {{wip}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Add  Slicer_QT_VERSION option that could be set to either 4 or 5 - See what is done in CTK&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Fix qRestAPI to support Qt5 (or turn off Slicer_BUILD_EXTENSIONMANAGER_SUPPORT for testing)&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Update use of QT4_* macros (see below) - See what is done in CTK&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
*** &amp;lt;s&amp;gt;The QT5_ versions of the macros appear to be directly compatible&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;del&amp;gt;[https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Port from QtWebKit to QtWebEngine] &amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Update of classes using WebKit to work with &amp;lt;code&amp;gt;WebEngineView&amp;lt;/code&amp;gt; (these includes &amp;quot;Extension Manager&amp;quot;,  &amp;quot;Data Store&amp;quot;, &amp;quot;Chart View&amp;quot; and `qMRMLExpandingWebView`).&amp;lt;/del&amp;gt;&lt;br /&gt;
*** `qSlicerWebWidget` should be improved, moved to CTK and used for all widgets making use of a web view.&lt;br /&gt;
** &amp;lt;s&amp;gt;update PythonQt to the latest Qt version&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
*** &amp;lt;del&amp;gt;Look at updating PythonQt to support QWebEngine&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Fix [https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5#Plugin_loading differences in plugin loading]&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
* &amp;lt;del&amp;gt;Qt5::Network is now a dependency of Base/QTCore (Networking module in Qt5 has classes like QNetworkProxyFactory that were in Qt4's QtCore module)&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;CTK Python wrapping doesn't expose [https://github.com/commontk/CTK/blob/9e6df183277d2516f3522a8ef024450f0bcb5a57/Libs/Widgets/ctkWidgetsUtils.h#L43 grabWidget].&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Linux =====&lt;br /&gt;
* fix fox `libpng warning: iCCP: known incorrect sRGB profile`&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/IsomicsPublic/Slicer-Qt5-patched-4.7.0-2017-01-24-linux-amd64.tar.gz Minimal working release experimental build] (no cli, ssl, simpleitk, ...) built on ubuntu 16.04, tested on debian 8&lt;br /&gt;
&lt;br /&gt;
* needed to manually copy shared libraries:&lt;br /&gt;
** libasound.so.2&lt;br /&gt;
** libxslt.so.1&lt;br /&gt;
** libsmime3&lt;br /&gt;
** libstdc++.so.6 (glibc mismatch, needed GLIBCXX_3.4.21) should build instead with manylinux&lt;br /&gt;
* like on mac, need to create bin/platfrms and bin/sqldrivers and copy in platforms/libqxcb.so and sqldrivers/libqsqlite.so&lt;br /&gt;
&lt;br /&gt;
===== Mac =====&lt;br /&gt;
** &amp;lt;del&amp;gt;on Mac, QT_NO_OPENSSL is defined, but so is QSslError leading to redefined symbol [https://github.com/jcfr/Slicer/blob/1d8aa09e4862c6fe48d9f229a11f151d9ed89cea/Base/QTGUI/qSlicerWebWidget.h#L43](here).&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Mac crash in qSlicerUnitsSettingsPanelPrivate::addQuantity, appears to be corrupted model.&amp;lt;/strike&amp;gt;  [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=25855 partly addressed by  r25855 ], finally resolved [https://github.com/Slicer/Slicer/commit/8e5d924dc938ad7f1efb22e13e327383f6347ada r25883].  Most expedient solution is probably to disable the units settings panel in the application settings since is not widely used in the application.&lt;br /&gt;
** Add libqcocoa.dylib and libqsqlite.dylib to package for mac&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers&lt;br /&gt;
  cp ~/Qt/5.7/clang_64/plugins/sqldrivers/libqsqlite.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers/&lt;br /&gt;
  mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/platforms&lt;br /&gt;
  cp ~/Qt/5.7/clang_64/plugins/platforms/libqcocoa.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/platforms/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Workarounds here:&lt;br /&gt;
https://gist.github.com/pieper/59de820ad08cf3c0f7a33926397e612d &amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Windows =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;qtstyleplugins library needs to be removed or ported to support windows&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;del&amp;gt;add declspec exports/imports&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;create .lib for use in QTGUI&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;support shared/static build?&amp;lt;/del&amp;gt;&lt;br /&gt;
* AppLauncher settings need to be update&lt;br /&gt;
** &amp;lt;s&amp;gt;Add to PYTHONPATH: &amp;lt;superbuild&amp;gt;/VTKv7-build/bin/Debug (currently lib not bin)&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** Add to PATH: &amp;lt;Qt&amp;gt;/5.7/msvc2013_64/bin&lt;br /&gt;
* Debug build runs very slowly - can it be improved?  Build is very slow too, but the application runs so slowly in debug mode that it is basically unusable (this is a change from previous version that were usable for testing real workflows in debug mode).&lt;br /&gt;
* Setting Slicer_USE_SimpleITK to ON in CMake results in compile-time errors.&lt;br /&gt;
* &amp;lt;del&amp;gt;Creating a debug build (MSVC 2013, Qt5.7) creates a compile time error on PythonQt.cpp while building the CTK project with message: &amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;Error 1220 error C1128: number of sections exceeded object file format limit: compile with /bigobj &amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example starting point command:&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DQt5_DIR:FILEPATH=c:/Qt/5.7/msvc2013_64/lib/cmake/Qt5 \&lt;br /&gt;
  -DCMAKE_CONFIGUREATION_TYPES:STRING=Release \&lt;br /&gt;
  -DADDITIONAL_C_FLAGS:STRING=&amp;quot; /MP8&amp;quot; \&lt;br /&gt;
  -DADDITIONAL_CXX_FLAGS:STRING=&amp;quot; /MP8&amp;quot; \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_SimpleITK:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_QtTesting:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_DataStore:BOOL=OFF \&lt;br /&gt;
  -DSlicer_QT_VERSION:STRING=5 \&lt;br /&gt;
  -DBUILD_TESTING:BOOL=OFF \&lt;br /&gt;
  -G&amp;quot;Visual Studio 12 2013 Win64&amp;quot; \&lt;br /&gt;
  c:/pieper/slicer4/latest/Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/Nightly/Developers/Tutorials/MigrationGuide/VTK7-Qt4-to-VTK8-Qt5}}&lt;br /&gt;
&lt;br /&gt;
== List of extensions that may require updates ==&lt;br /&gt;
&lt;br /&gt;
See https://discourse.slicer.org/t/slicer-extensions-action-required-by-maintainers/1003&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Qt 4.8 support schedule info: http://slicer-devel.65872.n3.nabble.com/Fwd-Qt-4-8-x-support-extended-out-by-a-year-td4033248.html&lt;br /&gt;
* http://blog.qt.io/blog/2014/11/27/qt-4-8-x-support-to-be-extended-for-another-year&lt;br /&gt;
* [https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Port from QtWebKit to QtWebEngine]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/Qt5-and-VTK8&amp;diff=57616</id>
		<title>Documentation/Labs/Qt5-and-VTK8</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/Qt5-and-VTK8&amp;diff=57616"/>
		<updated>2018-01-09T13:58:27Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Slicer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the update of Slicer to use Qt 5.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Because Qt4 is not actively developed (as documented [http://blog.qt.io/blog/2014/11/27/qt-4-8-x-support-to-be-extended-for-another-year/ here] support ended), we need to work toward supporting Qt5. &lt;br /&gt;
&lt;br /&gt;
Similarly because VTK7 is not actively developed, we need to work toward supporting VTK8 and the OpenGL2 rendering backend.&lt;br /&gt;
&lt;br /&gt;
This page summarizes support status of the various components of Slicer stack and remaining tasks.&lt;br /&gt;
&lt;br /&gt;
=== List of fixes integrated into VTK ===&lt;br /&gt;
&lt;br /&gt;
* VTK 8&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/3b94273 3b94273]: Fix memory leaks in vtkOpenGLRenderer::DonePick() (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/1b9800b 1b9800b]: Fix QVTKOpenGLWidget rendering with disabled interactor (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/056dd9a 056dd9a]: Fix picking when using QVTKOpenGLWidget (Max Smolens)&lt;br /&gt;
** 2017-08: [https://github.com/Kitware/VTK/commit/ee2ea5d ee2ea5d]: was missing object base initialization (Ken Martin, Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/e0c60b1 e0c60b1]: QVTKOpenGLWidget: Set screen size on render window (Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/8a60be1 8a60be1]: Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac (Max Smolens)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/bcce50b bcce50b]: cmake: Fix support for VTK_ENABLE_VTKPYTHON set to OFF (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-07: [https://github.com/Kitware/VTK/commit/d0aed86 d0aed86]: cmake/vtkCompilerExtras: Remove &amp;quot;--no-undefined&amp;quot; gcc linker flag (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-06: [https://github.com/Kitware/VTK/commit/5a4ddec 5a4ddec]: Respect access specifier of using statements in wrapping (Max Smolens)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/b684733 b684733]: ENH: Allow selection of seed points using vtkSeedWidget (Andras Lasso)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/f86a870 f86a870]: Ensure vtkVariant stream associated with &amp;lt;&amp;lt; operator is set back to &amp;quot;dec&amp;quot;. (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-05: Support crosspiling emulator&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/894acce 894acce]: cmake: Import VTKCompileTools if CROSSCOMPILING_EMULATOR support is incomplete (Jean-Christophe Fillion-Robin)&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/d0f83df d0f83df]: cmake: Simplify buildsystem introducing VTK_COMPILE_TOOLS_IMPORTED (Jean-Christophe Fillion-Robin)&lt;br /&gt;
*** 2017-05: [https://github.com/Kitware/VTK/commit/d767f09 d767f09]: cmake: Add support for CMAKE_CROSSCOMPILING_EMULATOR (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2017-05: [https://github.com/Kitware/VTK/commit/91ca08b 91ca08b]: OpenGL2: Fix undeclared &amp;quot;glXGetProcAddressARB&amp;quot; when building on Centos5 (Jean-Christophe Fillion-Robin)&lt;br /&gt;
** 2016-12: [https://github.com/Kitware/VTK/commit/a16b2da6 a16b2da6]: MSVC performance improvements. (David C. Lonie)&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/0ea52cc 0ea52cc]: fix an OpenGL2 issue impacting slicer and add test (Max Smolens)&lt;br /&gt;
&lt;br /&gt;
* VTK 7&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/d309ca8 d309ca8]: Consider whether volume transform preserves orientation (Max Smolens)&lt;br /&gt;
** 2016-09: [https://github.com/Kitware/VTK/commit/0cd1a32 0cd1a32]: Fix formatting of VTK_DELETE_FUNCTION (Max Smolens)&lt;br /&gt;
** 2016-08: Volume Rendering: Support large transfer function&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/ea74f88 ea74f88]: Adjusted LargeColorTf test to add coverage for scale/bias patch. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/5d8e8d5 5d8e8d5]: Added texture width checks in opacity and gradientOpacity tables. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-08: [https://github.com/Kitware/VTK/commit/ddb5ebc ddb5ebc]: Fixed gl color scale issue. (Alvaro Sanchez)&lt;br /&gt;
*** 2016-07: [https://github.com/Kitware/VTK/commit/813462c 813462c]: Added a method in RGBTable to check whether certain tex size is supported. (Alvaro Sanchez)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/114bc96 114bc96]: Add test for GPU volume rendering with a large color transfer function. (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/634a33b 634a33b]: vtkOpenGLGPUVolumeRayCastMapper: handle when table size increases (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/608d4fb 608d4fb]: vtkOpenGLGPUVolumeRayCastMapper: remove unnecessary NULL check before delete (Max Smolens)&lt;br /&gt;
*** 2015-12: [https://github.com/Kitware/VTK/commit/18b6e57 18b6e57]: vtkOpenGLGPUVolumeRayCastMapper: use existing function to find next power of 2 (Max Smolens)&lt;br /&gt;
*** 2015-07: [https://github.com/Kitware/VTK/commit/f0eba00 f0eba00]: GPU raycast volume rendering now supports textures larger than 1024 (Julien Finet)&lt;br /&gt;
** 2016-07: Fix VTK interaction&lt;br /&gt;
*** 2016-06: [https://github.com/Kitware/VTK/commit/9ecc055 9ecc055]: Fix variable names in vtkImplicitCylinderWidget test (Max Smolens)&lt;br /&gt;
*** 2016-06: [https://github.com/Kitware/VTK/commit/e8170ff e8170ff]: Fix multiple definitions of vtkInteractionCallback (Max Smolens)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/7602a0e 7602a0e]: Make vtkCollection implement iterable in the python wrapping (Hastings Greer)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/dd87a44 dd87a44]: Allow pyvtkObjects to have InvokeEvent called on them with calldata (Hastings Greer)&lt;br /&gt;
** 2016-06: [https://github.com/Kitware/VTK/commit/a0eb686 a0eb686]: Add #include for offsetof() macro in generated Python wrappers (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/bd63a80 bd63a80]: Handle case when textDims are NULL (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/5dcad97 5dcad97]: vtkTextMapper: fix rendering of empty string (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/e646e65 e646e65]: Fix vtkAxisActor2D documentation error (Max Smolens)&lt;br /&gt;
** 2016-04: [https://github.com/Kitware/VTK/commit/4be6351 4be6351]: vtkLegendScaleActor: add Modified() call after updating points (Max Smolens)&lt;br /&gt;
** 2016-03: [https://github.com/Kitware/VTK/commit/7a24b32 7a24b32]: Change picking manager to not own objects associated with pickers (Max Smolens)&lt;br /&gt;
** 2016-03: Support building python wrapping with VTK_ENABLE_KITS enabled&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/540f2c5 540f2c5]: python: Add adapter modules when VTK_ENABLE_KITS is ON (Max Smolens)&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/31b7b0e 31b7b0e]: python: Update wrapping tool to support multiple hierarchy and hint files (Max Smolens)&lt;br /&gt;
*** 2016-02: [https://github.com/Kitware/VTK/commit/1ebfa5b 1ebfa5b]: python: Add wrapping of kits when VTK_ENABLE_KITS is ON (Max Smolens)&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
To configure Slicer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DQt5_DIR:PATH=/home/jcfr/Software/Qt5.9.1/5.9.1/gcc_64/lib/cmake/Qt5 ...  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically build VTK8 with OpenGL2 backend enabled.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Use VS2015 on windows&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-16 ===&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
===== Slicer =====&lt;br /&gt;
&lt;br /&gt;
* Test with Qt5.9.1: Linux {{done}}, macOS {{wip}}, Windows: {{done}}&lt;br /&gt;
&lt;br /&gt;
* Packaging:&lt;br /&gt;
** Update packaging script SlicerCPackBundleFixup.cmake&lt;br /&gt;
&lt;br /&gt;
* Building:&lt;br /&gt;
** Update build script to support qt5 (see https://github.com/jcfr/qt-easy-build )&lt;br /&gt;
** Update Slicer build instruction on developer wiki&lt;br /&gt;
&lt;br /&gt;
* Fix Slicer test failures:&lt;br /&gt;
** Floating point exceptions (&amp;quot;SIGFPE with code FPE_FLTUND&amp;quot;) on Mac (ModelToLabelMapTest, ModelToLabelMapTestLabelValue, N4ITKBiasFieldCorrectionTest).&lt;br /&gt;
** py_LandmarkRegistration crash on exit.&lt;br /&gt;
** py_VolumeRenderingThreeDOnlyLayout on Windows (&amp;quot;Shader object was not initialized, cannot attach it.&amp;quot;). This is a similar issue as was fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=25239 r25239], but resurrected due to the behavior of QVTKOpenGLWidget. The old fix is insufficient.&lt;br /&gt;
&lt;br /&gt;
* Application errors reported at https://discourse.slicer.org/t/qt5-build-a-few-hiccups/952 (more information and screenshots are available there)&lt;br /&gt;
** &amp;lt;del&amp;gt;Whenever an item is selected in the Fiducial/ROI/Ruler tool, the items get duplicated to an certain number of items that I didn’t count.&amp;lt;del&amp;gt; Cannot reproduce on 0297723&lt;br /&gt;
** In Volume Rending module, the items of the ‘View’ combobox are no longer checkable.&lt;br /&gt;
** Switching to module ‘SceneViews’ crashes Slicer:&lt;br /&gt;
*** Switch to module: “SceneViews”&lt;br /&gt;
*** qSlicerSceneViewsModuleWidgetPrivate::setupUi - Capture link not implemented with Qt5&lt;br /&gt;
*** qSlicerSceneViewsModuleWidgetPrivate::setupUi - Restore scroll bar position not implemented with Qt5&lt;br /&gt;
*** As it says, it has yet to be implemented.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Windows: Debug build runs very slowly - can it be improved? Build is very slow too, but the application runs so slowly in debug mode that it is basically unusable (this is a change from previous version that were usable for testing real workflows in debug mode).&amp;lt;/del&amp;gt; - fixed in VTK (a16b2da6), Slicer already uses VTK version that includes this&lt;br /&gt;
&lt;br /&gt;
===== SimpleITK  =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;SimpleITK doesn't recognize standard CMake way to enable C++11. See https://github.com/SimpleITK/SimpleITK/issues/260.&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Upstream fix: https://github.com/SimpleITK/SimpleITK/pull/261&amp;lt;/s&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26339 r26339] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26340 r26340]&lt;br /&gt;
&lt;br /&gt;
===== VTK  =====&lt;br /&gt;
&lt;br /&gt;
* Transparency is handled differently: see problem in this discussion thread http://vtk.1045678.n5.nabble.com/Strange-renderering-with-mixed-polydata-volume-with-QVTKOpenGLWidget-td5743309.html and a related fix in ITKSnap https://github.com/pyushkevich/itksnap/blob/master/GUI/Qt/main.cxx#L572-L574 and &lt;br /&gt;
&lt;br /&gt;
=== 2017-08-14 ===&lt;br /&gt;
&lt;br /&gt;
As of 2017-08-14, the support for Qt5 and VTK8 has been integrated into the trunk.&lt;br /&gt;
&lt;br /&gt;
Command line arguments to expose webgl and webengine debugging:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./Slicer-build/Slicer --enable-experimental-web-platform-features --enable-unsafe-es3-apis --remote-debugging-port=12117 --use-gl=desktop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
&lt;br /&gt;
===== VTK =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Fix and update VTK: https://gitlab.kitware.com/vtk/vtk/issues/17076 (&amp;quot;OpenGL errors occur when destroying vtkWin32OpenGLRenderWindow&amp;quot;) (Only affects old OpenGL backend.)&amp;lt;/del&amp;gt;. This is not issue for Slicer. VTK8 based build will use openGL2 backend, and VTK7.1 based build do not have the problem. See https://gitlab.kitware.com/vtk/vtk/issues/17076#note_303185&lt;br /&gt;
* &amp;lt;del&amp;gt;Merge and update VTK: QVTKOpenGLWidget can blit uninitialized framebuffers. On Mac, the bug is evident through visible artifacts when resizing the views.&amp;lt;/del&amp;gt; Merged in  https://gitlab.kitware.com/vtk/vtk/merge_requests/3138.&lt;br /&gt;
&lt;br /&gt;
===== Slicer =====&lt;br /&gt;
&lt;br /&gt;
* Packaging&lt;br /&gt;
** &amp;lt;del&amp;gt;Update packaging scripts (SlicerBlockInstallQt.cmake,&amp;lt;/del&amp;gt; SlicerCPackBundleFixup.cmake)&lt;br /&gt;
*** &amp;lt;del&amp;gt;Linux&amp;lt;/del&amp;gt; {{done}}, macOS {{wip}}, &amp;lt;del&amp;gt;Windows&amp;lt;/del&amp;gt;: {{done}} - &amp;lt;del&amp;gt;See https://github.com/jcfr/Slicer/tree/support-qt5-packaging&amp;lt;/del&amp;gt; - Integrated in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26289 r26289]&lt;br /&gt;
** Linux:&lt;br /&gt;
*** needed to manually copy shared libraries:&lt;br /&gt;
**** libasound.so.2&lt;br /&gt;
**** libxslt.so.1&lt;br /&gt;
**** libsmime3&lt;br /&gt;
**** libstdc++.so.6 (glibc mismatch, needed GLIBCXX_3.4.21) should build instead with manylinux&lt;br /&gt;
*** &amp;lt;del&amp;gt;like on mac, need to create bin/platfrms and bin/sqldrivers and copy in platforms/libqxcb.so and sqldrivers/libqsqlite.so&amp;lt;/del&amp;gt;&lt;br /&gt;
** Mac:&lt;br /&gt;
*** &amp;lt;del&amp;gt;Add libqcocoa.dylib and libqsqlite.dylib to package for mac&amp;lt;/del&amp;gt;&lt;br /&gt;
***:&amp;lt;pre&amp;gt;&lt;br /&gt;
***::mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers&lt;br /&gt;
***::cp ~/Qt/5.7/clang_64/plugins/sqldrivers/libqsqlite.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers/&lt;br /&gt;
***::mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/platforms&lt;br /&gt;
***::cp ~/Qt/5.7/clang_64/plugins/platforms/libqcocoa.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/platforms/&lt;br /&gt;
***:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find and fix layout changes.&lt;br /&gt;
** &amp;lt;del&amp;gt;For example, some widgets likely need to set QSizePolicy::Expanding, such as the exit application confirmation dialog. See https://github.com/commontk/CTK/pull/738&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26282 r26282]&lt;br /&gt;
* &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Build shows errors in console at start: Proposed fix in https://github.com/Slicer/Slicer/pull/774&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26279 r26279] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26280 r26280]&lt;br /&gt;
**:&amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
**::Failed to obtain reference to 'FileMenu'&lt;br /&gt;
**::Failed to obtain reference to 'qSlicerAppMainWindow'&lt;br /&gt;
**::No Data Probe frame - cannot create DataProbe&lt;br /&gt;
**::Failed to obtain reference to 'qSlicerAppMainWindow'&lt;br /&gt;
**::Failed to obtain reference to 'FileMenu'&lt;br /&gt;
**:&amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Fix Slicer test failures:&lt;br /&gt;
** &amp;lt;del&amp;gt;qMRMLLayoutManagerWithCustomFactoryTest (&amp;quot;vtkPlaneSource: Bad plane coordinate system&amp;quot;). See https://github.com/Slicer/Slicer/pull/775&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26285 r26285]&lt;br /&gt;
** &amp;lt;del&amp;gt;ResampleDTIVolumeBSplineInterpolationTest (image diff?). See https://github.com/Slicer/Slicer/pull/776&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26288 r26288]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Linux/Windows/macOS: fix for `libpng warning: iCCP: known incorrect sRGB profile`&amp;lt;/del&amp;gt; - Fixed in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26276 r26276]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== CTK =====&lt;br /&gt;
&lt;br /&gt;
* Fix CTK warnings. See http://slicer.cdash.org/viewBuildError.php?type=1&amp;amp;buildid=1076772&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-07 ===&lt;br /&gt;
&lt;br /&gt;
As of 2017-08-07 the relevant branches for testing are:&lt;br /&gt;
* &amp;lt;del&amp;gt;Slicer: https://github.com/msmolens/Slicer/tree/support-qt5-2017-08-05-r26208 (includes VTK8)&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26268 r26268]&lt;br /&gt;
** &amp;lt;del&amp;gt;old branches&amp;lt;/del&amp;gt;:&lt;br /&gt;
*** &amp;lt;del&amp;gt;https://github.com/msmolens/Slicer/tree/support-qt5-2017-07-29-r26186&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;CTK: https://github.com/msmolens/CTK/tree/wip-support-qvtkopenglwidget&amp;lt;/del&amp;gt; - Integrated in CTK as [https://github.com/commontk/CTK/commit/1066374b63b6907797ee14b35196829216fbc3dd commontk/CTK@1066374], integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26224 r26224]&lt;br /&gt;
* &amp;lt;del&amp;gt;VTK: https://github.com/Slicer/VTK/tree/slicer-v8.0.0-2017-08-07-88c80af&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;DCMTK: https://github.com/msmolens/DCMTK/tree/patched-DCMTK-3.6.2_20170801&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26204 r26204] (Branch was also renamed - see https://github.com/commontk/DCMTK/tree/patched-DCMTK-3.6.2_20170714)&lt;br /&gt;
* &amp;lt;del&amp;gt;PythonQt: https://github.com/msmolens/PythonQt/tree/msvc-bigobj&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;qRestAPI: https://github.com/msmolens/qRestAPI/tree/support-qt-no-ssl-macro&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26198 r26198]&lt;br /&gt;
* &amp;lt;del&amp;gt;AppLauncher: https://github.com/msmolens/AppLauncher/tree/support-qt5&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26217 r26217]&lt;br /&gt;
* &amp;lt;del&amp;gt;MultiVolumeExplorer: https://github.com/msmolens/MultiVolumeExplorer/tree/support-qt5&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For VS2015 gotchas, see below.&lt;br /&gt;
&lt;br /&gt;
* Qt5/VTK8 integration TODO:&lt;br /&gt;
** &amp;lt;del&amp;gt;Properly initialize QVTKOpenGLWidget. Call QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance so that an OpenGL core profile context is requested.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Properly initialize QVTKOpenGLWidget for tests. Call QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance so that an OpenGL core profile context is requested. (Slicer, CTK)&amp;lt;/del&amp;gt;&lt;br /&gt;
** Enable C++11 for Slicer, extensions, and libraries as appropriate.&lt;br /&gt;
*** &amp;lt;del&amp;gt;BRAINSTools ignores configuration options and fails to configure when C++11 is enabled.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;DCMTK has a compile error when C++11 is enabled?&amp;lt;/del&amp;gt;. (Resolved: requires custom definition to enable C++11.)&lt;br /&gt;
*** &amp;lt;del&amp;gt;Slicer&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Libraries that use C++&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Extensions&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Add VTK_OVERRIDE, VTK_FINAL, VTK_DELETE_FUNCTION and other necessary keywords to fix build warnings. Maintain compatibility with VTK7 by defining these as empty when using VTK7.&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;OpenIGTLinkIF&amp;lt;/del&amp;gt; Updated in https://github.com/openigtlink/OpenIGTLinkIF/pull/72&lt;br /&gt;
**** &amp;lt;del&amp;gt;MultiVolumeExplorer&amp;lt;/del&amp;gt; Updated in https://github.com/fedorov/MultiVolumeExplorer/pull/36.&lt;br /&gt;
**** &amp;lt;del&amp;gt;ParameterSerializer&amp;lt;/del&amp;gt; Updated in https://github.com/Slicer/ParameterSerializer/pull/7.&lt;br /&gt;
**** &amp;lt;del&amp;gt;EMSegment&amp;lt;/del&amp;gt; Updated in [http://viewvc.slicer.org/viewvc.cgi/Slicer3?view=revision&amp;amp;revision=17135 r17135]. Integrated in Slicer in [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26228 r26228]&lt;br /&gt;
**** &amp;lt;del&amp;gt;OpenIGTLinkIF&amp;lt;/del&amp;gt; - Integrated  in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26227 r26227] (Changes available in [https://github.com/Slicer/OpenIGTLinkIF Slicer/OpenIGTLinkIF] - Pending PR: &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/70 #70]&amp;lt;/del&amp;gt;, &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/71 #71]&amp;lt;/del&amp;gt;, [https://github.com/openigtlink/OpenIGTLinkIF/pull/72 #72], &amp;lt;del&amp;gt;[https://github.com/openigtlink/OpenIGTLinkIF/pull/73 #73]&amp;lt;/del&amp;gt; and [https://github.com/openigtlink/OpenIGTLinkIF/pull/74 #74]&lt;br /&gt;
**** SlicerExecutionModel&lt;br /&gt;
**** &amp;lt;del&amp;gt;DataStore (see https://github.com/Slicer/Slicer-DataStore/pull/3)&amp;lt;/del&amp;gt; - Integrated in Slicer as [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26229 r26229]&lt;br /&gt;
*** &amp;lt;del&amp;gt;DCMTK 3.6.2 has a configuration error when C++11 is enabled on Linux. See https://github.com/msmolens/DCMTK/commit/c9ccd45212cb542d78201995951fbcfb416f8b16 for a workaround.&amp;lt;/del&amp;gt; - See  [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=26204 r26204] and [https://github.com/commontk/DCMTK/tree/patched-DCMTK-3.6.2_20170714 commontk/DCMTK@patched-DCMTK-3.6.2_20170714] - DCMTK team was notified - See [https://github.com/msmolens/DCMTK/commit/c9ccd45212cb542d78201995951fbcfb416f8b16#commitcomment-23474059 here])&lt;br /&gt;
** &amp;lt;del&amp;gt;Set OpenGL2 as default rendering backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;CTK and Slicer QtTesting tests refer to QVTKWidget. Can they be converted to recognize QVTKOpenGLWidget?&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update CTK: https://github.com/commontk/PythonQt/pull/57 (&amp;quot;Fix compile error on MSVC with Qt 5.7.1&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: https://gitlab.kitware.com/vtk/vtk/merge_requests/3014 (&amp;quot;Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: https://gitlab.kitware.com/vtk/vtk/merge_requests/3041 (&amp;quot;QVTKOpenGLWidget: Set screen size on render window&amp;quot;)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix and update VTK: https://gitlab.kitware.com/vtk/vtk/issues/17091 (&amp;quot;QVTKOpenGLWidget: Picking vtkActor2D fails&amp;quot;). In Slicer one operation this issue affects is picking slice view ROI box handles.&amp;lt;/del&amp;gt; Merged in https://gitlab.kitware.com/vtk/vtk/merge_requests/3103.&lt;br /&gt;
** &amp;lt;del&amp;gt;Merge and update VTK: QVTKOpenGLWidget can blit uninitialized framebuffers. On Mac, the bug is evident through visible artifacts when resizing the views.&amp;lt;/del&amp;gt; Merged in https://gitlab.kitware.com/vtk/vtk/merge_requests/3138.&lt;br /&gt;
** &amp;lt;del&amp;gt;Clicking on module search result in popup does not open the module. ComboBox does not always show the selected item.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLColorPickerWidgetTest2 on Mac crashes due to changes in QColorDialog in Qt5. CTK should no longer assume the non-native dialog is constructed, i.e. the layouts exist, when ctkColorDialog is instantiated.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix CTK Qt5 test failures.&amp;lt;/del&amp;gt;&lt;br /&gt;
** OpenSSL/DataStore/qRestAPI issues?&lt;br /&gt;
** &amp;lt;del&amp;gt;CTK needs to properly export CTK_USE_QVTKOPENGLWIDGET so that the preprocessor correctly handles &amp;lt;tt&amp;gt;#if CTK_USE_QVTKOPENGLWIDGET&amp;lt;/tt&amp;gt; in its header files. Or, an alternative mechanism could be implemented.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Windows/Linux: CPU and GPU Volume Rendering display nothing or are corrupt. GPU Volume Rendering gives OpenGL errors.&amp;lt;/del&amp;gt; Disabling multisampling before creating the default surface format fixes this. See https://gitlab.kitware.com/vtk/vtk/issues/17095.&lt;br /&gt;
** &amp;lt;del&amp;gt;Mac: Slice views use only lower-left quarter of widget.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Set Qt::AA_EnableHighDpiScaling to enable automatic scaling based on the pixel density of the monitor. This enables High DPI for platforms other than Mac.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Call setEnableHiDPI(true) on QVTKOpenGLWidgets.&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLSliceWidget: Scale SliceView geometry by its devicePixelRatio() before calling this-&amp;gt;SliceController-&amp;gt;setSliceViewSize().&amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;qMRMLSliceWidget: Observe change in devicePixelRatio (i.e. app dragged to another screen) and recompute slice view size.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Volume Rendering transfer functions aren't displayed correctly. (ctkVTKChartView)&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix vtkWindowToImageFilter usage of method deprecated in VTK8.1: https://github.com/Kitware/VTK/blob/b8eae1e022cc71de5dcac578f4087b71d8573324/Rendering/Core/vtkWindowToImageFilter.h#L95&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Fix Qt deprecation warnings.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Address &amp;quot;Policy CMP0020 is not set: Automatically link Qt executables to qtmain target on Windows&amp;quot; warnings.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL backend.&amp;lt;/del&amp;gt; - Changes integrated into the trunk and tested daily&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with VTK7+OpenGL2 backend.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Test branch build with Qt4.&amp;lt;/del&amp;gt;&lt;br /&gt;
** Test with Qt5.9.1.&lt;br /&gt;
** &amp;lt;del&amp;gt;Support VS2015 by updating to latest python-cmake-buildsystem. Prerequisite: make pre-compiled OpenSSL available for VS2015/VS2017.&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;Update MultiVolumeExplorer hash for Qt5 support.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TODOs and Notes for the current integration&lt;br /&gt;
** Make Qt5.7.1 the required version if version greater than Qt5.6; a QWebEngine bug: https://bugreports.qt.io/browse/QTBUG-54762 was resolved in 5.7.1.&lt;br /&gt;
** Windows:&lt;br /&gt;
*** Tested build: VS2013, Qt5.7.1 downloaded from Qt's official releases. &lt;br /&gt;
*** 2017-08-07: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1076299&lt;br /&gt;
*** &amp;lt;s&amp;gt;SlicerLauncherSettings.ini need to include path to Qt bin directory. Doing this manually right now &amp;lt;/s&amp;gt;&lt;br /&gt;
*** VS2015:&lt;br /&gt;
**** &amp;lt;del&amp;gt;Configure with &amp;lt;code&amp;gt;-DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=OFF&amp;lt;/code&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;Python 2.7: This patch should be applied. See https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/issues/161&amp;lt;/del&amp;gt;&lt;br /&gt;
**** &amp;lt;del&amp;gt;DCMTK: To fix &amp;quot;DCMTK was configured to use the C++11 STL, [...]&amp;quot; error. Edit &amp;lt;code&amp;gt;C:\path\to\S-bld\DCMTK\CMake\osconfig.h.in&amp;lt;/code&amp;gt; and comment lines highlighted in  https://github.com/commontk/DCMTK/blob/d8ed091cda2b815226eafe41f5b4fe3bd22f8d5d/CMake/osconfig.h.in#L1096-L1100&amp;lt;/del&amp;gt;&lt;br /&gt;
***** To understand why: See https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/&lt;br /&gt;
***** From Microsoft: &amp;lt;code&amp;gt;We won’t update __cplusplus until the compiler fully conforms to the standard. Until then, you can check the value of _MSVC_LANG.&amp;lt;/code&amp;gt;&lt;br /&gt;
***** Or, could change logic in SuperBuild/External_DCMTK.cmake to only enable C++11 for UNIX platforms.&lt;br /&gt;
&lt;br /&gt;
* MacOSX:&lt;br /&gt;
** Tested build: Qt5.7.1 downloaded from Qt's official releases, MacOSX10.11&lt;br /&gt;
** 2017-08-07: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1076538&lt;br /&gt;
*** NOTE: WIP qt-easy-build to build Qt5.7.1 with OpenSSL support: https://github.com/msmolens/qt-easy-build/commits/wip-qt5; based on https://github.com/jcfr/qt-easy-build/pull/32&lt;br /&gt;
** &amp;lt;s&amp;gt; Need to address manual install of the sql and cocoa plugin and platform files for sql and cocoa. &amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2017-08-02 ===&lt;br /&gt;
&lt;br /&gt;
* Linux:&lt;br /&gt;
** Tested build: Ubuntu 16.04, gcc, Qt5.7.1 downloaded from Qt's official releases:&lt;br /&gt;
** 2017-08-02: http://slicer.cdash.org/viewTest.php?onlyfailed&amp;amp;buildid=1074507&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 2017-01 ===&lt;br /&gt;
* Work-in-progress branch that partially builds&lt;br /&gt;
** 2017-01:&lt;br /&gt;
*** https://github.com/Slicer/Slicer/pull/648 corresponding to branch https://github.com/Slicer/Slicer/compare/master...jcfr:support-qt5?expand=1&lt;br /&gt;
&lt;br /&gt;
* Original branch:&lt;br /&gt;
https://github.com/jcfr/Slicer/commits/support-qt5&lt;br /&gt;
&lt;br /&gt;
=== 2016-12 ===&lt;br /&gt;
&lt;br /&gt;
** 2016-12:&lt;br /&gt;
*** Slicer: https://github.com/Slicer/Slicer/compare/master...pieper:slicer-qt5?expand=1&lt;br /&gt;
*** CTK: https://github.com/commontk/CTK/compare/master...pieper:slicer-qt5?expand=1&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-Qt5-2016-12-12.PNG|thumb|right|A first running example [https://github.com/Slicer/Slicer/commit/08f40bd09ff525288710c1ccddbc09381264f5cd described in this commit]]]&lt;br /&gt;
&lt;br /&gt;
* Superbuild configure command on mac using Qt 5.7 stock downloads&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/Users/pieper/Qt/5.7/clang_64/bin/qmake \&lt;br /&gt;
  -DCMAKE_PREFIX_PATH:PATH=/Users/pieper/Qt/5.7/clang_64/ \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_SimpleITK:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_QtTesting:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \&lt;br /&gt;
  -DSlicer_QT_VERSION:STRING=5 \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Platform Notes ====&lt;br /&gt;
&lt;br /&gt;
Experimental build on Window:&lt;br /&gt;
* Visual Studio Community 2015&lt;br /&gt;
* Qt 5.7&lt;br /&gt;
** Include QtWebEngine and QtScript during install&lt;br /&gt;
** Select 2015 64 bit install&lt;br /&gt;
* Qt 5.8&lt;br /&gt;
** Use Visual Studio Community 2015 or above. Qt-5.8 does not support QtWebEngine for msvc 2013.&lt;br /&gt;
&lt;br /&gt;
==== Known Issues ====&lt;br /&gt;
&lt;br /&gt;
* Slice viewers do not have the expected size after changing layout&lt;br /&gt;
&lt;br /&gt;
==== To Do List ====&lt;br /&gt;
&lt;br /&gt;
===== All platforms =====&lt;br /&gt;
* Slicer build system upgrade: To be done  {{wip}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Add  Slicer_QT_VERSION option that could be set to either 4 or 5 - See what is done in CTK&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Fix qRestAPI to support Qt5 (or turn off Slicer_BUILD_EXTENSIONMANAGER_SUPPORT for testing)&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;s&amp;gt;Update use of QT4_* macros (see below) - See what is done in CTK&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
*** &amp;lt;s&amp;gt;The QT5_ versions of the macros appear to be directly compatible&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;del&amp;gt;[https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Port from QtWebKit to QtWebEngine] &amp;lt;/del&amp;gt;&lt;br /&gt;
*** &amp;lt;del&amp;gt;Update of classes using WebKit to work with &amp;lt;code&amp;gt;WebEngineView&amp;lt;/code&amp;gt; (these includes &amp;quot;Extension Manager&amp;quot;,  &amp;quot;Data Store&amp;quot;, &amp;quot;Chart View&amp;quot; and `qMRMLExpandingWebView`).&amp;lt;/del&amp;gt;&lt;br /&gt;
*** `qSlicerWebWidget` should be improved, moved to CTK and used for all widgets making use of a web view.&lt;br /&gt;
** &amp;lt;s&amp;gt;update PythonQt to the latest Qt version&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
*** &amp;lt;del&amp;gt;Look at updating PythonQt to support QWebEngine&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Fix [https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5#Plugin_loading differences in plugin loading]&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
* &amp;lt;del&amp;gt;Qt5::Network is now a dependency of Base/QTCore (Networking module in Qt5 has classes like QNetworkProxyFactory that were in Qt4's QtCore module)&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;CTK Python wrapping doesn't expose [https://github.com/commontk/CTK/blob/9e6df183277d2516f3522a8ef024450f0bcb5a57/Libs/Widgets/ctkWidgetsUtils.h#L43 grabWidget].&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Linux =====&lt;br /&gt;
* fix fox `libpng warning: iCCP: known incorrect sRGB profile`&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/IsomicsPublic/Slicer-Qt5-patched-4.7.0-2017-01-24-linux-amd64.tar.gz Minimal working release experimental build] (no cli, ssl, simpleitk, ...) built on ubuntu 16.04, tested on debian 8&lt;br /&gt;
&lt;br /&gt;
* needed to manually copy shared libraries:&lt;br /&gt;
** libasound.so.2&lt;br /&gt;
** libxslt.so.1&lt;br /&gt;
** libsmime3&lt;br /&gt;
** libstdc++.so.6 (glibc mismatch, needed GLIBCXX_3.4.21) should build instead with manylinux&lt;br /&gt;
* like on mac, need to create bin/platfrms and bin/sqldrivers and copy in platforms/libqxcb.so and sqldrivers/libqsqlite.so&lt;br /&gt;
&lt;br /&gt;
===== Mac =====&lt;br /&gt;
** &amp;lt;del&amp;gt;on Mac, QT_NO_OPENSSL is defined, but so is QSslError leading to redefined symbol [https://github.com/jcfr/Slicer/blob/1d8aa09e4862c6fe48d9f229a11f151d9ed89cea/Base/QTGUI/qSlicerWebWidget.h#L43](here).&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;strike&amp;gt;Mac crash in qSlicerUnitsSettingsPanelPrivate::addQuantity, appears to be corrupted model.&amp;lt;/strike&amp;gt;  [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=25855 partly addressed by  r25855 ], finally resolved [https://github.com/Slicer/Slicer/commit/8e5d924dc938ad7f1efb22e13e327383f6347ada r25883].  Most expedient solution is probably to disable the units settings panel in the application settings since is not widely used in the application.&lt;br /&gt;
** Add libqcocoa.dylib and libqsqlite.dylib to package for mac&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers&lt;br /&gt;
  cp ~/Qt/5.7/clang_64/plugins/sqldrivers/libqsqlite.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/sqldrivers/&lt;br /&gt;
  mkdir Slicer-build/bin/Slicer.app/Contents/MacOS/platforms&lt;br /&gt;
  cp ~/Qt/5.7/clang_64/plugins/platforms/libqcocoa.dylib Slicer-build/bin/Slicer.app/Contents/MacOS/platforms/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Workarounds here:&lt;br /&gt;
https://gist.github.com/pieper/59de820ad08cf3c0f7a33926397e612d &amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Windows =====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;qtstyleplugins library needs to be removed or ported to support windows&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** &amp;lt;del&amp;gt;add declspec exports/imports&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;create .lib for use in QTGUI&amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;support shared/static build?&amp;lt;/del&amp;gt;&lt;br /&gt;
* AppLauncher settings need to be update&lt;br /&gt;
** &amp;lt;s&amp;gt;Add to PYTHONPATH: &amp;lt;superbuild&amp;gt;/VTKv7-build/bin/Debug (currently lib not bin)&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
** Add to PATH: &amp;lt;Qt&amp;gt;/5.7/msvc2013_64/bin&lt;br /&gt;
* Debug build runs very slowly - can it be improved?  Build is very slow too, but the application runs so slowly in debug mode that it is basically unusable (this is a change from previous version that were usable for testing real workflows in debug mode).&lt;br /&gt;
* Setting Slicer_USE_SimpleITK to ON in CMake results in compile-time errors.&lt;br /&gt;
* &amp;lt;del&amp;gt;Creating a debug build (MSVC 2013, Qt5.7) creates a compile time error on PythonQt.cpp while building the CTK project with message: &amp;lt;/del&amp;gt;&lt;br /&gt;
** &amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;Error 1220 error C1128: number of sections exceeded object file format limit: compile with /bigobj &amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example starting point command:&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DQt5_DIR:FILEPATH=c:/Qt/5.7/msvc2013_64/lib/cmake/Qt5 \&lt;br /&gt;
  -DCMAKE_CONFIGUREATION_TYPES:STRING=Release \&lt;br /&gt;
  -DADDITIONAL_C_FLAGS:STRING=&amp;quot; /MP8&amp;quot; \&lt;br /&gt;
  -DADDITIONAL_CXX_FLAGS:STRING=&amp;quot; /MP8&amp;quot; \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_SimpleITK:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_QtTesting:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \&lt;br /&gt;
  -DSlicer_BUILD_DataStore:BOOL=OFF \&lt;br /&gt;
  -DSlicer_QT_VERSION:STRING=5 \&lt;br /&gt;
  -DBUILD_TESTING:BOOL=OFF \&lt;br /&gt;
  -G&amp;quot;Visual Studio 12 2013 Win64&amp;quot; \&lt;br /&gt;
  c:/pieper/slicer4/latest/Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/Nightly/Developers/Tutorials/MigrationGuide/VTK7-Qt4-to-VTK8-Qt5}}&lt;br /&gt;
&lt;br /&gt;
== List of extensions that may require updates ==&lt;br /&gt;
&lt;br /&gt;
See https://discourse.slicer.org/t/slicer-extensions-action-required-by-maintainers/1003&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Qt 4.8 support schedule info: http://slicer-devel.65872.n3.nabble.com/Fwd-Qt-4-8-x-support-extended-out-by-a-year-td4033248.html&lt;br /&gt;
* http://blog.qt.io/blog/2014/11/27/qt-4-8-x-support-to-be-extended-for-another-year&lt;br /&gt;
* [https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine Port from QtWebKit to QtWebEngine]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/FAQ/MRML&amp;diff=54997</id>
		<title>Documentation/Nightly/Developers/FAQ/MRML</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/FAQ/MRML&amp;diff=54997"/>
		<updated>2017-09-22T22:14:10Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* How to know the extent of a slice view */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;__TOC__&lt;br /&gt;
={{#titleparts: {{PAGENAME}} | | -1 }}=&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&lt;br /&gt;
='''Developer FAQ: {{{1}}}'''=&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to add a MRML node into the scene ? ==&lt;br /&gt;
&lt;br /&gt;
* Generic pattern &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkNew&amp;lt;vtkMRML???Node&amp;gt; nodeToAdd;&lt;br /&gt;
...&lt;br /&gt;
mrmlScene-&amp;gt;AddNode(nodeToAdd.GetPointer());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add a polydata to the scene&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkNew&amp;lt;vtkMRMLModelNode&amp;gt; modelNode;&lt;br /&gt;
modelNode-&amp;gt;SetPolyData(polyData);&lt;br /&gt;
mrmlScene-&amp;gt;AddNode(modelNode.GetPointer());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Load a polyData from file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkSlicerModelsLogic* modelsLogic = ...;&lt;br /&gt;
//modelsLogic-&amp;gt;SetMRMLScene(mrmlScene);&lt;br /&gt;
modelsLogic-&amp;gt;AddModel(polyDataFileName);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What to do if you get 'No LookupTable was set but number of components in input doesn't match OutputFormat' when loading a MRML scene ? ==&lt;br /&gt;
&lt;br /&gt;
If you get the following error messages:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR: In /path/to/VTK/Imaging/vtkImageMapToColors.cxx, line 153&lt;br /&gt;
vtkImageMapToColors (0x268f190): RequestInformation: No LookupTable was set but number of components in input doesn't match OutputFormat, therefore input can't be passed through!&lt;br /&gt;
&lt;br /&gt;
ERROR: In /path/to/VTK/Imaging/vtkImageExtractComponents.cxx, line 239&lt;br /&gt;
vtkImageExtractComponents (0x26947e0): Execute: Component 1 is not in input.&lt;br /&gt;
&lt;br /&gt;
ERROR: In /path/to/VTK/Imaging/vtkImageExtractComponents.cxx, line 239&lt;br /&gt;
vtkImageExtractComponents (0x26947e0): Execute: Component 1 is not in input.&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure the &amp;lt;code&amp;gt;colorNodeRef&amp;lt;/code&amp;gt; attribute is set on each &amp;lt;code&amp;gt;VolumeDisplay&amp;lt;/code&amp;gt; node.&lt;br /&gt;
&lt;br /&gt;
== How to change the volumes in the 2D views ? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
appLogic = slicer.app.applicationLogic()&lt;br /&gt;
selectionNode = appLogic.GetSelectionNode()&lt;br /&gt;
selectionNode.SetReferenceActiveVolumeID(bg)&lt;br /&gt;
selectionNode.SetReferenceSecondaryVolumeID(fg)&lt;br /&gt;
appLogic.PropagateVolumeSelection()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: https://github.com/fedorov/ChangeTrackerPy/blob/master/Wizard/Helper.py#L82&lt;br /&gt;
&lt;br /&gt;
== How to know the min/max offset of a slice view ? ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkMRMLSliceNode* redSliceNode = vtkMRMLSliceNode::SafeDownCast( this-&amp;gt;GetMRMLScene()-&amp;gt;GetNodeByID( &amp;quot;vtkMRMLSliceNodeRed&amp;quot; ));&lt;br /&gt;
vtkMRMLSliceLogic* sliceLogic = this-&amp;gt;GetMRMLApplicationLogic()-&amp;gt;GetSliceLogic( redSliceNode );&lt;br /&gt;
&lt;br /&gt;
double sliceBounds[6] = {0, -1, 0, -1, 0, -1};&lt;br /&gt;
sliceLogic-&amp;gt;GetLowestVolumeSliceBounds(sliceBounds);&lt;br /&gt;
double min = sliceBounds[4];&lt;br /&gt;
double max = sliceBounds[5];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Widgets/qMRMLSliceControllerWidget.cxx#L1267-L1276&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/FAQ/MRML&amp;diff=54996</id>
		<title>Documentation/Nightly/Developers/FAQ/MRML</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/FAQ/MRML&amp;diff=54996"/>
		<updated>2017-09-22T22:13:50Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Developer FAQ: {{{1}}} */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;__TOC__&lt;br /&gt;
={{#titleparts: {{PAGENAME}} | | -1 }}=&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&lt;br /&gt;
='''Developer FAQ: {{{1}}}'''=&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to add a MRML node into the scene ? ==&lt;br /&gt;
&lt;br /&gt;
* Generic pattern &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkNew&amp;lt;vtkMRML???Node&amp;gt; nodeToAdd;&lt;br /&gt;
...&lt;br /&gt;
mrmlScene-&amp;gt;AddNode(nodeToAdd.GetPointer());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add a polydata to the scene&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkNew&amp;lt;vtkMRMLModelNode&amp;gt; modelNode;&lt;br /&gt;
modelNode-&amp;gt;SetPolyData(polyData);&lt;br /&gt;
mrmlScene-&amp;gt;AddNode(modelNode.GetPointer());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Load a polyData from file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkSlicerModelsLogic* modelsLogic = ...;&lt;br /&gt;
//modelsLogic-&amp;gt;SetMRMLScene(mrmlScene);&lt;br /&gt;
modelsLogic-&amp;gt;AddModel(polyDataFileName);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What to do if you get 'No LookupTable was set but number of components in input doesn't match OutputFormat' when loading a MRML scene ? ==&lt;br /&gt;
&lt;br /&gt;
If you get the following error messages:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR: In /path/to/VTK/Imaging/vtkImageMapToColors.cxx, line 153&lt;br /&gt;
vtkImageMapToColors (0x268f190): RequestInformation: No LookupTable was set but number of components in input doesn't match OutputFormat, therefore input can't be passed through!&lt;br /&gt;
&lt;br /&gt;
ERROR: In /path/to/VTK/Imaging/vtkImageExtractComponents.cxx, line 239&lt;br /&gt;
vtkImageExtractComponents (0x26947e0): Execute: Component 1 is not in input.&lt;br /&gt;
&lt;br /&gt;
ERROR: In /path/to/VTK/Imaging/vtkImageExtractComponents.cxx, line 239&lt;br /&gt;
vtkImageExtractComponents (0x26947e0): Execute: Component 1 is not in input.&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure the &amp;lt;code&amp;gt;colorNodeRef&amp;lt;/code&amp;gt; attribute is set on each &amp;lt;code&amp;gt;VolumeDisplay&amp;lt;/code&amp;gt; node.&lt;br /&gt;
&lt;br /&gt;
== How to change the volumes in the 2D views ? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
appLogic = slicer.app.applicationLogic()&lt;br /&gt;
selectionNode = appLogic.GetSelectionNode()&lt;br /&gt;
selectionNode.SetReferenceActiveVolumeID(bg)&lt;br /&gt;
selectionNode.SetReferenceSecondaryVolumeID(fg)&lt;br /&gt;
appLogic.PropagateVolumeSelection()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: https://github.com/fedorov/ChangeTrackerPy/blob/master/Wizard/Helper.py#L82&lt;br /&gt;
&lt;br /&gt;
== How to know the extent of a slice view ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vtkMRMLSliceNode* redSliceNode = vtkMRMLSliceNode::SafeDownCast( this-&amp;gt;GetMRMLScene()-&amp;gt;GetNodeByID( &amp;quot;vtkMRMLSliceNodeRed&amp;quot; ));&lt;br /&gt;
vtkMRMLSliceLogic* sliceLogic = this-&amp;gt;GetMRMLApplicationLogic()-&amp;gt;GetSliceLogic( redSliceNode );&lt;br /&gt;
&lt;br /&gt;
double sliceBounds[6] = {0, -1, 0, -1, 0, -1};&lt;br /&gt;
sliceLogic-&amp;gt;GetLowestVolumeSliceBounds(sliceBounds);&lt;br /&gt;
double min = sliceBounds[4];&lt;br /&gt;
double max = sliceBounds[5];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Widgets/qMRMLSliceControllerWidget.cxx#L1267-L1276&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Windows_Code_Signing&amp;diff=48993</id>
		<title>Documentation/Nightly/Developers/Windows Code Signing</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Windows_Code_Signing&amp;diff=48993"/>
		<updated>2016-12-05T19:12:08Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: Improve signing command line example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
This page contains information on code signing on Windows and on integrating code signing into the Slicer packaging process.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
* Install [https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk Windows 10 SDK] to get latest [https://msdn.microsoft.com/en-us/library/8s9b9yaz(v=vs.110).aspx SignTool.exe].&lt;br /&gt;
&lt;br /&gt;
==Acquire and install a code signing certificate==&lt;br /&gt;
&lt;br /&gt;
Follow the procedure described in [https://technet.microsoft.com/en-us/library/cc732597(v=ws.10).aspx Acquire a Code Signing Certificate] to acquire a code signing certificate from a commercial vendor recognized by Microsoft. Some example vendor links include:&lt;br /&gt;
* [https://www.digicert.com/code-signing/code-signing.htm DigiCert Code Signing Certificates]&lt;br /&gt;
* [https://www.symantec.com/code-signing/microsoft-authenticode/ Symantec Code Signing Certificates for Microsoft Authenticode]&lt;br /&gt;
&lt;br /&gt;
It may be necessary to install the code signing certificate on the machine that will be used to sign the code. Regardless, it is necessary to export the certificate to a .pfx file to be used by SignTool.exe.&lt;br /&gt;
&lt;br /&gt;
==Sign files using SignTool.exe==&lt;br /&gt;
&lt;br /&gt;
SignTool.exe digitally signs files, verifies signatures in files, and time-stamps files. See [https://msdn.microsoft.com/en-us/library/8s9b9yaz(v=vs.110).aspx SignTool.exe documentation].&lt;br /&gt;
&lt;br /&gt;
The final installer .exe should be signed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Sign using SHA-2====&lt;br /&gt;
This is the recommended method, and was used to sign the Slicer 4.6 installers.&lt;br /&gt;
&lt;br /&gt;
Sign using a DigiCert code signing certificate, following their [https://www.digicert.com/code-signing/signcode-signtool-command-line.htm examples]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
signtool.exe sign /f &amp;quot;C:\path\to\cert.pfx&amp;quot; /p &amp;lt;password&amp;gt; /fd sha256 /tr http://timestamp.digicert.com /td sha256 /v \path\to\your\installer.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;/f&amp;lt;/tt&amp;gt; specifies the path to the code signing certificate&lt;br /&gt;
* &amp;lt;tt&amp;gt;/p&amp;lt;/tt&amp;gt; specifies the password for the code signing certificate&lt;br /&gt;
* &amp;lt;tt&amp;gt;/fd&amp;lt;/tt&amp;gt; specifies the file digest algorithm&lt;br /&gt;
* &amp;lt;tt&amp;gt;/tr&amp;lt;/tt&amp;gt; specifies the URL of the RFC-3161 timestamp server&lt;br /&gt;
* &amp;lt;tt&amp;gt;/td&amp;lt;/tt&amp;gt; specifies the digest algorithm to be used by the timestamp server&lt;br /&gt;
* &amp;lt;tt&amp;gt;/v&amp;lt;/tt&amp;gt; displays verbose output&lt;br /&gt;
&lt;br /&gt;
====Dual sign with SHA-1 and SHA-2====&lt;br /&gt;
Dual signing should be necessary only when targeting Windows XP SP3/Vista:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
signtool.exe sign /f &amp;quot;C:\path\to\cert.pfx&amp;quot; /p &amp;lt;password&amp;gt; /t http://timestamp.digicert.com /v setup.exe&lt;br /&gt;
signtool.exe sign /f &amp;quot;C:\path\to\cert.pfx&amp;quot; /p &amp;lt;password&amp;gt; /fd sha256 /tr http://timestamp.digicert.com /td sha256 /as /v foo.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;/as&amp;lt;/tt&amp;gt; appends the SHA-2 signature to the primary signature&lt;br /&gt;
&lt;br /&gt;
====Verify the signature====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
signtool.exe verify /pa /v setup.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;/pa&amp;lt;/tt&amp;gt; specifies that the Default Authenticode Verification Policy should be used instead of the Windows Driver Verification Policy&lt;br /&gt;
&lt;br /&gt;
Alternatively, view the &amp;quot;Digital Signatures&amp;quot; tab on the file's properties in Windows Explorer.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
The Windows 10 SDK installs the 64-bit SignTool.exe to &amp;lt;tt&amp;gt;C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==CMake integration==&lt;br /&gt;
&lt;br /&gt;
Currently, CMake/CPack doesn't include any built-in functionality to automatically call SignTool.exe to digitally sign files or installers. Therefore, integrating code signing into Slicer requires adding custom steps for the targets chosen to be signed.&lt;br /&gt;
&lt;br /&gt;
MySQL's implementation could be a useful example; see https://github.com/mysql/mysql-server/blob/67d52e7c7a1a23424e39273cbb6f5f9d56fda8d1/cmake/install_macros.cmake#L155.&lt;br /&gt;
Also see another implementation: https://github.com/firebreath/FireBreath/blob/0fe3c7f8f9315768893442af51b03378d11a3a26/cmake/Win.cmake#L175.&lt;br /&gt;
&lt;br /&gt;
Finally, see discussion on the CMake mailing list: http://cmake.3232098.n2.nabble.com/How-to-codesign-msi-from-WIX-CPack-td7594228.html.&lt;br /&gt;
&lt;br /&gt;
Once CMake integration is achieved, it's recommend to also sign executables inside the installer, including at least:&lt;br /&gt;
* Slicer.exe (launcher)&lt;br /&gt;
* bin/SlicerApp-real.exe (application)&lt;br /&gt;
&lt;br /&gt;
Other candidate files to sign include:&lt;br /&gt;
* other .exe files in bin/&lt;br /&gt;
* other .exe files outside bin/, such as CLI modules&lt;br /&gt;
* .dll files in bin/ and for modules&lt;br /&gt;
&lt;br /&gt;
==Additional references==&lt;br /&gt;
[https://msdn.microsoft.com/en-us/library/windows/desktop/aa380259(v=vs.85).aspx#introduction_to_code_signing Introduction to Code Signing] (MSDN)&lt;br /&gt;
&lt;br /&gt;
[http://social.technet.microsoft.com/wiki/contents/articles/32288.windows-enforcement-of-authenticode-code-signing-and-timestamping.aspx Windows Enforcement of Authenticode Code Signing and Timestamping] (Microsoft TechNet)&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Windows_Code_Signing&amp;diff=48990</id>
		<title>Documentation/Nightly/Developers/Windows Code Signing</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Windows_Code_Signing&amp;diff=48990"/>
		<updated>2016-12-05T19:09:32Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
This page contains information on code signing on Windows and on integrating code signing into the Slicer packaging process.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
* Install [https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk Windows 10 SDK] to get latest [https://msdn.microsoft.com/en-us/library/8s9b9yaz(v=vs.110).aspx SignTool.exe].&lt;br /&gt;
&lt;br /&gt;
==Acquire and install a code signing certificate==&lt;br /&gt;
&lt;br /&gt;
Follow the procedure described in [https://technet.microsoft.com/en-us/library/cc732597(v=ws.10).aspx Acquire a Code Signing Certificate] to acquire a code signing certificate from a commercial vendor recognized by Microsoft. Some example vendor links include:&lt;br /&gt;
* [https://www.digicert.com/code-signing/code-signing.htm DigiCert Code Signing Certificates]&lt;br /&gt;
* [https://www.symantec.com/code-signing/microsoft-authenticode/ Symantec Code Signing Certificates for Microsoft Authenticode]&lt;br /&gt;
&lt;br /&gt;
It may be necessary to install the code signing certificate on the machine that will be used to sign the code. Regardless, it is necessary to export the certificate to a .pfx file to be used by SignTool.exe.&lt;br /&gt;
&lt;br /&gt;
==Sign files using SignTool.exe==&lt;br /&gt;
&lt;br /&gt;
SignTool.exe digitally signs files, verifies signatures in files, and time-stamps files. See [https://msdn.microsoft.com/en-us/library/8s9b9yaz(v=vs.110).aspx SignTool.exe documentation].&lt;br /&gt;
&lt;br /&gt;
The final installer .exe should be signed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Sign using SHA-2====&lt;br /&gt;
This is the recommended method, and was used to sign the Slicer 4.6 installers.&lt;br /&gt;
&lt;br /&gt;
Sign using a DigiCert code signing certificate, following their [https://www.digicert.com/code-signing/signcode-signtool-command-line.htm examples]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
signtool.exe sign /f &amp;quot;C:\path\to\cert.pfx&amp;quot; /p &amp;lt;password&amp;gt; /fd sha256 /tr http://timestamp.digicert.com /td sha256 /v setup.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;/f&amp;lt;/tt&amp;gt; specifies the path to the code signing certificate&lt;br /&gt;
* &amp;lt;tt&amp;gt;/p&amp;lt;/tt&amp;gt; specifies the password for the code signing certificate&lt;br /&gt;
* &amp;lt;tt&amp;gt;/fd&amp;lt;/tt&amp;gt; specifies the file digest algorithm&lt;br /&gt;
* &amp;lt;tt&amp;gt;/tr&amp;lt;/tt&amp;gt; specifies the URL of the RFC-3161 timestamp server&lt;br /&gt;
* &amp;lt;tt&amp;gt;/td&amp;lt;/tt&amp;gt; specifies the digest algorithm to be used by the timestamp server&lt;br /&gt;
* &amp;lt;tt&amp;gt;/v&amp;lt;/tt&amp;gt; displays verbose output&lt;br /&gt;
&lt;br /&gt;
====Dual sign with SHA-1 and SHA-2====&lt;br /&gt;
Dual signing should be necessary only when targeting Windows XP SP3/Vista:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
signtool.exe sign /f &amp;quot;C:\path\to\cert.pfx&amp;quot; /p &amp;lt;password&amp;gt; /t http://timestamp.digicert.com /v setup.exe&lt;br /&gt;
signtool.exe sign /f &amp;quot;C:\path\to\cert.pfx&amp;quot; /p &amp;lt;password&amp;gt; /fd sha256 /tr http://timestamp.digicert.com /td sha256 /as /v foo.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;/as&amp;lt;/tt&amp;gt; appends the SHA-2 signature to the primary signature&lt;br /&gt;
&lt;br /&gt;
====Verify the signature====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
signtool.exe verify /pa /v setup.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;/pa&amp;lt;/tt&amp;gt; specifies that the Default Authenticode Verification Policy should be used instead of the Windows Driver Verification Policy&lt;br /&gt;
&lt;br /&gt;
Alternatively, view the &amp;quot;Digital Signatures&amp;quot; tab on the file's properties in Windows Explorer.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
The Windows 10 SDK installs the 64-bit SignTool.exe to &amp;lt;tt&amp;gt;C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==CMake integration==&lt;br /&gt;
&lt;br /&gt;
Currently, CMake/CPack doesn't include any built-in functionality to automatically call SignTool.exe to digitally sign files or installers. Therefore, integrating code signing into Slicer requires adding custom steps for the targets chosen to be signed.&lt;br /&gt;
&lt;br /&gt;
MySQL's implementation could be a useful example; see https://github.com/mysql/mysql-server/blob/67d52e7c7a1a23424e39273cbb6f5f9d56fda8d1/cmake/install_macros.cmake#L155.&lt;br /&gt;
Also see another implementation: https://github.com/firebreath/FireBreath/blob/0fe3c7f8f9315768893442af51b03378d11a3a26/cmake/Win.cmake#L175.&lt;br /&gt;
&lt;br /&gt;
Finally, see discussion on the CMake mailing list: http://cmake.3232098.n2.nabble.com/How-to-codesign-msi-from-WIX-CPack-td7594228.html.&lt;br /&gt;
&lt;br /&gt;
Once CMake integration is achieved, it's recommend to also sign executables inside the installer, including at least:&lt;br /&gt;
* Slicer.exe (launcher)&lt;br /&gt;
* bin/SlicerApp-real.exe (application)&lt;br /&gt;
&lt;br /&gt;
Other candidate files to sign include:&lt;br /&gt;
* other .exe files in bin/&lt;br /&gt;
* other .exe files outside bin/, such as CLI modules&lt;br /&gt;
* .dll files in bin/ and for modules&lt;br /&gt;
&lt;br /&gt;
==Additional references==&lt;br /&gt;
[https://msdn.microsoft.com/en-us/library/windows/desktop/aa380259(v=vs.85).aspx#introduction_to_code_signing Introduction to Code Signing] (MSDN)&lt;br /&gt;
&lt;br /&gt;
[http://social.technet.microsoft.com/wiki/contents/articles/32288.windows-enforcement-of-authenticode-code-signing-and-timestamping.aspx Windows Enforcement of Authenticode Code Signing and Timestamping] (Microsoft TechNet)&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ParameterSerializer&amp;diff=46996</id>
		<title>Documentation/Labs/ParameterSerializer</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ParameterSerializer&amp;diff=46996"/>
		<updated>2016-09-09T18:38:00Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* TODO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page gathers the information regarding the integration of the Parameter Serializer.&lt;br /&gt;
&lt;br /&gt;
== Limitations of the current infrastructure ==&lt;br /&gt;
&lt;br /&gt;
* The only way to serialize CLIs is through the MRML scene, it's hard to save the configuration of just one CLI.&lt;br /&gt;
* When running a CLI with the command line, you have to specify all the arguments that are not default. It would be nice to be able to use a file instead.&lt;br /&gt;
&lt;br /&gt;
== Proposed improvements ==&lt;br /&gt;
&lt;br /&gt;
By adding support for the [https://github.com/Slicer/ParameterSerializer/tree/master/cmake Parameter Serializer] users would be able to save(/load) their &lt;br /&gt;
CLI configuration to(/from) a JSON file. That would be applicable both for using CLI through the command line and for using CLIs in the Slicer application.&lt;br /&gt;
That serialization should also mesh well with the python infrastructure.&lt;br /&gt;
&lt;br /&gt;
Example of a Json file obtained from the Gaussian Blur Filter:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;Parameters&amp;quot; : &lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;IO&amp;quot; : &lt;br /&gt;
     {&lt;br /&gt;
      &amp;quot;inputVolume&amp;quot; : &amp;quot;W:/Slicer/Data/MRHead.nrrd&amp;quot;,&lt;br /&gt;
      &amp;quot;outputVolume&amp;quot; : &amp;quot;W:/Slicer/Data/MRHead-blurred.nrrd&amp;quot;,&lt;br /&gt;
      &amp;quot;sigma&amp;quot; : 1&lt;br /&gt;
     }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plan of integration ==&lt;br /&gt;
&lt;br /&gt;
=== What already exists ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/Slicer/SlicerExecutionModel Slicer Execution Model] already supports using the Parameter Serializer.&lt;br /&gt;
&lt;br /&gt;
=== TODO ===&lt;br /&gt;
&lt;br /&gt;
* Build JsonCpp in Slicer&lt;br /&gt;
** Branch for improving JsonCpp support in [https://github.com/Slicer/SlicerExecutionModel Slicer Execution Model]&lt;br /&gt;
** Branch for being able to build &amp;amp; package Slicer with JsonCpp.&lt;br /&gt;
[DONE, see r25335, r25336 and r25337]&lt;br /&gt;
* Build Parameter Serializer in Slicer&lt;br /&gt;
[DONE, see r25335, r25336 and r25337]&lt;br /&gt;
&lt;br /&gt;
* Make CLI storable in Json files&lt;br /&gt;
** Make the vtkMRMLCommandLineModuleNode a vtkMRMLStorableNode&lt;br /&gt;
** Implement vtkMRMLCommandLineModuleStorageNode&lt;br /&gt;
&lt;br /&gt;
* Make Python module storable in Json files&lt;br /&gt;
** Make the vtkMRMLScriptedNode a vtkMRMLStorableNode&lt;br /&gt;
** Implement vtkMRMLScriptedStorageNode to save the parameter node like a CLI node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ParameterSerializer&amp;diff=46995</id>
		<title>Documentation/Labs/ParameterSerializer</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ParameterSerializer&amp;diff=46995"/>
		<updated>2016-09-09T18:36:08Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* TODO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page gathers the information regarding the integration of the Parameter Serializer.&lt;br /&gt;
&lt;br /&gt;
== Limitations of the current infrastructure ==&lt;br /&gt;
&lt;br /&gt;
* The only way to serialize CLIs is through the MRML scene, it's hard to save the configuration of just one CLI.&lt;br /&gt;
* When running a CLI with the command line, you have to specify all the arguments that are not default. It would be nice to be able to use a file instead.&lt;br /&gt;
&lt;br /&gt;
== Proposed improvements ==&lt;br /&gt;
&lt;br /&gt;
By adding support for the [https://github.com/Slicer/ParameterSerializer/tree/master/cmake Parameter Serializer] users would be able to save(/load) their &lt;br /&gt;
CLI configuration to(/from) a JSON file. That would be applicable both for using CLI through the command line and for using CLIs in the Slicer application.&lt;br /&gt;
That serialization should also mesh well with the python infrastructure.&lt;br /&gt;
&lt;br /&gt;
Example of a Json file obtained from the Gaussian Blur Filter:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;Parameters&amp;quot; : &lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;IO&amp;quot; : &lt;br /&gt;
     {&lt;br /&gt;
      &amp;quot;inputVolume&amp;quot; : &amp;quot;W:/Slicer/Data/MRHead.nrrd&amp;quot;,&lt;br /&gt;
      &amp;quot;outputVolume&amp;quot; : &amp;quot;W:/Slicer/Data/MRHead-blurred.nrrd&amp;quot;,&lt;br /&gt;
      &amp;quot;sigma&amp;quot; : 1&lt;br /&gt;
     }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plan of integration ==&lt;br /&gt;
&lt;br /&gt;
=== What already exists ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/Slicer/SlicerExecutionModel Slicer Execution Model] already supports using the Parameter Serializer.&lt;br /&gt;
&lt;br /&gt;
=== TODO ===&lt;br /&gt;
&lt;br /&gt;
* Make CLI storable in Json files&lt;br /&gt;
** Make the vtkMRMLCommandLineModuleNode a vtkMRMLStorableNode&lt;br /&gt;
** Implement vtkMRMLCommandLineModuleStorageNode&lt;br /&gt;
&lt;br /&gt;
* Make Python module storable in Json files&lt;br /&gt;
** Make the vtkMRMLScriptedNode a vtkMRMLStorableNode&lt;br /&gt;
** Implement vtkMRMLScriptedStorageNode to save the parameter node like a CLI node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Factory&amp;diff=46985</id>
		<title>Documentation/Nightly/Developers/Factory</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Factory&amp;diff=46985"/>
		<updated>2016-09-07T23:16:32Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: Updated factory.kitware.com IP address&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
The Slicer factory machine is maintained by [http://www.kitware.com Kitware] and produces dashboard builds of many software projects, including nightly, continuous, and packaged versions of Slicer and its approved extensions.  See the [http://slicer.cdash.org/index.php?project=Slicer4 Slicer4 dashboard].&lt;br /&gt;
&lt;br /&gt;
These builds are generated every day on three different operating systems: Windows 7, Mac OS X, and Linux.  Because it is not legal to run any version of Mac OS X on a virtual machine (unless its host also runs Mac OS X), the host OS is Mac OS X, and the Windows and Linux builds are run within this machine as virtual machines.&lt;br /&gt;
&lt;br /&gt;
==Required factory components==&lt;br /&gt;
&lt;br /&gt;
See [[Documentation/{{documentation/version}}/Developers/Tutorials/DashboardSetup|dashboard prerequisites]].&lt;br /&gt;
&lt;br /&gt;
=Host(s)=&lt;br /&gt;
&lt;br /&gt;
== factory.kitware ==&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
The factory machine runs Mac OS X v10.6.8, Snow Leopard.  &lt;br /&gt;
* CMake version: 3.5.0-rc3 with [https://github.com/Kitware/CMake/compare/master...jcfr:osx-framework this patch]&lt;br /&gt;
* Compiler llvm-3.1. Note that the default compiled shipped with XCode 4.2 is not used. See [http://slicer-devel.65872.n3.nabble.com/MacOSX-factory-build-Transitioning-from-hybrid-quot-llvm-g-quot-to-quot-clang-quot-Update-to-Qt-4-8-6-tt4032198.html#a4032199 here] for more details.&lt;br /&gt;
* Tasks scheduled using [http://en.wikipedia.org/wiki/Cron cron]&lt;br /&gt;
&lt;br /&gt;
Remote access: Via SSH or VNC from Kitware internal network (192.168.113.230).&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The output of &amp;lt;pre&amp;gt;crontab -l&amp;lt;/pre&amp;gt; on the factory machine is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
55 23 * * * cd /Users/kitware/DashboardScripts &amp;amp;&amp;amp; /usr/bin/cvs -q up -dAP&lt;br /&gt;
0 0 * * * /Users/kitware/DashboardScripts/factory.sh &amp;gt; /Users/kitware/Dashboards/Logs/factory.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
0 9 * * * /Applications/CMake\ 2.8-8.app/Contents/bin/ctest -V -VV -S /Users/kitware/DashboardScripts/factory-64bits_CTKAppLauncher_release_continuous.cmake &amp;gt; /Users/kitware/Dashboards/Logs/factory-64bits_CTKAppLauncher_release_continuous.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
0 9 * * * /Applications/CMake\ 2.8-8.app/Contents/bin/ctest -V -VV -S /Users/kitware/DashboardScripts/factory-64bits_slicer4_release_continuous.cmake &amp;gt; /Users/kitware/Dashboards/Logs/factory-64bits_slicer4_release_continuous.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
0 10 * * * /Applications/CMake\ 2.8-8.app/Contents/bin/ctest -V -VV -S /Users/kitware/DashboardScripts/factory-64bits_slicerextensions_release_continuous.cmake &amp;gt; /Users/kitware/Dashboards/Logs/factory-64bits_slicerextensions_release_continuous.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
0 10 * * * /Applications/CMake\ 2.8-8.app/Contents/bin/ctest -V -VV -S /Users/kitware/DashboardScripts/factory-64bits_slicerextensions_411_release_continuous.cmake &amp;gt; /Users/kitware/Dashboards/Logs/factory-64bits_slicerextensions_411_release_continuous.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first tab is a command to update the cvs repository storing all of Kitware's dashboard scripts.  The second is a bash script which runs all of the nightly builds done by the Mac OS X factory.  The rest correspond to all the continuous builds.  An example of an entry in the bash script is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
open -a x11&lt;br /&gt;
export DISPLAY=:0.0 # just DISPLAY=:0.0 without export is not enough&lt;br /&gt;
export PATH=:/usr/local/git/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
CTEST=/Applications/CMake-3.5.0-rc3.app/Contents/bin/ctest&lt;br /&gt;
LOG_DIR=/Users/kitware/Dashboards/Logs&lt;br /&gt;
DASHBOARD_SCRIPTS_DIR=/Users/kitware/DashboardScripts&lt;br /&gt;
&lt;br /&gt;
# Nightly build of CTKAppLauncher&lt;br /&gt;
&amp;quot;$CTEST&amp;quot; -S $DASHBOARD_SCRIPTS_DIR/factory-64bits_CTKAppLauncher_release_nightly.cmake -VV -O $LOG_DIR/factory-64bits_CTKAppLauncher_release_nightly.log&lt;br /&gt;
&lt;br /&gt;
# Nightly build of slicer&lt;br /&gt;
&amp;quot;$CTEST&amp;quot; -S $DASHBOARD_SCRIPTS_DIR/factory-64bits_slicer4_release_nightly.cmake -VV -O $LOG_DIR/factory-64bits_slicer4_release_nightly.log&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The virtual  machines are run using the Parallels tool.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Mac Pro (Mid 2010)&amp;quot; which has the 64-bit kernel enabled by default. See [http://support.apple.com/kb/HT3770 here] for details.&lt;br /&gt;
&lt;br /&gt;
==== Processor ====&lt;br /&gt;
* 2 x 2.93 GHz 6-Core Intel Xeon&lt;br /&gt;
&lt;br /&gt;
==== Graphics Card ====&lt;br /&gt;
* Chipset Model: ATI Radeon HD 5770&lt;br /&gt;
* Type: GPU&lt;br /&gt;
* Bus PCIe&lt;br /&gt;
* VRAM (total): 1024MB&lt;br /&gt;
* EFI Driver Version: 01.00.436&lt;br /&gt;
&lt;br /&gt;
==== Memory ====&lt;br /&gt;
* 8 x 4GB = 32GB&lt;br /&gt;
* Type: DDR3 ECC&lt;br /&gt;
* Speed: 1333 MHz&lt;br /&gt;
&lt;br /&gt;
== factory-south.kitware ==&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
&lt;br /&gt;
The factory machine runs Mac OS X 10.11.6 (15G31), El Capitan&lt;br /&gt;
* Tasks scheduled using [http://en.wikipedia.org/wiki/Cron cron]&lt;br /&gt;
&lt;br /&gt;
The virtual machines are run using the [http://www.parallels.com/ Parallels Desktop 11].&lt;br /&gt;
&lt;br /&gt;
Remote access: Via SSH or VNC from Kitware internal network (10.171.2.166).&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
==== Processor ====&lt;br /&gt;
* 2 x 2.4 GHz 6-Core Intel Xeon&lt;br /&gt;
&lt;br /&gt;
==== Graphics Card ====&lt;br /&gt;
* Chipset Model: ATI Radeon HD 5770&lt;br /&gt;
* Type: GPU&lt;br /&gt;
* Bus PCIe&lt;br /&gt;
* VRAM (total): 1024MB&lt;br /&gt;
* EFI Driver Version: 01.00.436&lt;br /&gt;
&lt;br /&gt;
==== Memory ====&lt;br /&gt;
* 8 x 8GB = 64 GB&lt;br /&gt;
* Type: DDR3 ECC&lt;br /&gt;
* Speed: 1333 MHz&lt;br /&gt;
&lt;br /&gt;
=VM: Linux=&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== factory.kitware ==&lt;br /&gt;
* Ubuntu 11.04&lt;br /&gt;
* CMake version: 2.8.8&lt;br /&gt;
* GCC version: Ubuntu 4.4.3-4ubuntu5.1&lt;br /&gt;
* Tasks scheduled using [http://en.wikipedia.org/wiki/Cron cron]&lt;br /&gt;
&lt;br /&gt;
The scripts on this VM are very similar to those on the Host.&lt;br /&gt;
&lt;br /&gt;
=== Remote access ===&lt;br /&gt;
This machine is accessible through SSH and remote VNC.  It has been configured with its own static IP, and should be accessed by VNC through this IP instead of through a VNC connection on the Mac Host.  Do not try to connect through VNC to this machine on the Host.&lt;br /&gt;
&lt;br /&gt;
===Known issues===&lt;br /&gt;
* X crash / GLX&amp;quot; missing on display. See [http://www.na-mic.org/Bug/view.php?id=2468 #2468]: '''FIXED'''&lt;br /&gt;
* Beside the fact Parallel has been updated, the X server still crash and auto-login does NOT succeed. See [http://www.na-mic.org/Bug/view.php?id=2624 #2624]: '''FIXED'''&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== factory-south-ubuntu.kitware ==&lt;br /&gt;
* Ubuntu 10.04&lt;br /&gt;
* CMake version: 3.5.0-rc3&lt;br /&gt;
* GCC version: Ubuntu 4.4.3-4ubuntu5.1&lt;br /&gt;
* Tasks scheduled using [http://en.wikipedia.org/wiki/Cron cron]&lt;br /&gt;
* Processors: 5&lt;br /&gt;
* Memory: 10GB&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lsb_release -a&lt;br /&gt;
No LSB modules are available.&lt;br /&gt;
Distributor ID:	Ubuntu&lt;br /&gt;
Description:	Ubuntu 10.04.4 LTS&lt;br /&gt;
Release:	10.04&lt;br /&gt;
Codename:	lucid&lt;br /&gt;
&lt;br /&gt;
$ c++ --version&lt;br /&gt;
c++ (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remote access: Via SSH or VNC from Kitware internal network (10.171.2.113).&lt;br /&gt;
&lt;br /&gt;
=VM: Windows 7=&lt;br /&gt;
&lt;br /&gt;
* Tasks are scheduled using the Windows Task Scheduler (Start-&amp;gt;All Programs-&amp;gt;Accessories-&amp;gt;System Tools-&amp;gt;Task Scheduler)&lt;br /&gt;
* On Windows, instead of bash, we use batch scripts comprised of commands to call ctest to run all the nightly scripts.  &lt;br /&gt;
&lt;br /&gt;
== factory-south-win7.kitware ==&lt;br /&gt;
&lt;br /&gt;
* Windows 7 Ultimate N - Service Pack 1 (Build 7601) on an x86 platform.&lt;br /&gt;
* CMake version: 3.5.0-rc3&lt;br /&gt;
* Compiler: VS2013 Community Edition&lt;br /&gt;
* Processors: 6&lt;br /&gt;
* Memory: 16GB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, keep in mind the [[Documentation/{{documentation/version}}/Developers/Tutorials/DashboardSetup#Remarks remarks]] about building a dashboard on a Windows machine.  These all apply here.&lt;br /&gt;
&lt;br /&gt;
Remote access: Via Remote Desktop from Kitware internal network (10.171.2.245).&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ParameterSerializer&amp;diff=46813</id>
		<title>Documentation/Labs/ParameterSerializer</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ParameterSerializer&amp;diff=46813"/>
		<updated>2016-08-09T20:21:13Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page gathers the information regarding the integration of the Parameter Serializer.&lt;br /&gt;
&lt;br /&gt;
== Limitations of the current infrastructure ==&lt;br /&gt;
&lt;br /&gt;
* The only way to serialize CLIs is through the MRML scene, it's hard to save the configuration of just one CLI.&lt;br /&gt;
* When running a CLI with the command line, you have to specify all the arguments that are not default. It would be nice to be able to use a file instead.&lt;br /&gt;
&lt;br /&gt;
== Proposed improvements ==&lt;br /&gt;
&lt;br /&gt;
By adding support for the [https://github.com/Slicer/ParameterSerializer/tree/master/cmake Parameter Serializer] users would be able to save(/load) their &lt;br /&gt;
CLI configuration to(/from) a JSON file. That would be applicable both for using CLI through the command line and for using CLIs in the Slicer application.&lt;br /&gt;
That serialization should also mesh well with the python infrastructure.&lt;br /&gt;
&lt;br /&gt;
Example of a Json file obtained from the Gaussian Blur Filter:&lt;br /&gt;
:{&lt;br /&gt;
::&amp;quot;Parameters&amp;quot; : &lt;br /&gt;
:::{&lt;br /&gt;
::::&amp;quot;IO&amp;quot; : &lt;br /&gt;
:::::{&lt;br /&gt;
::::::&amp;quot;inputVolume&amp;quot; : &amp;quot;W:/Slicer/Data/MRHead.nrrd&amp;quot;,&lt;br /&gt;
::::::&amp;quot;outputVolume&amp;quot; : &amp;quot;W:/Slicer/Data/MRHead-blurred.nrrd&amp;quot;,&lt;br /&gt;
::::::&amp;quot;sigma&amp;quot; : 1&lt;br /&gt;
:::::}&lt;br /&gt;
::::}&lt;br /&gt;
:}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plan of integration ==&lt;br /&gt;
&lt;br /&gt;
=== What already exists ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/Slicer/SlicerExecutionModel Slicer Execution Model] already supports using the Parameter Serializer.&lt;br /&gt;
&lt;br /&gt;
=== TODO ===&lt;br /&gt;
&lt;br /&gt;
* Build JsonCpp in Slicer&lt;br /&gt;
** Branch for improving JsonCpp support in [https://github.com/Slicer/SlicerExecutionModel Slicer Execution Model]&lt;br /&gt;
** Branch for being able to build &amp;amp; package Slicer with JsonCpp.&lt;br /&gt;
&lt;br /&gt;
* Build Parameter Serializer in Slicer&lt;br /&gt;
&lt;br /&gt;
* Make CLI storable in Json files&lt;br /&gt;
** Make the vtkMRMLCommandLineModuleNode a vtkMRMLStorableNode&lt;br /&gt;
** Implement vtkMRMLCommandLineModuleStorageNode&lt;br /&gt;
&lt;br /&gt;
* Make Python module storable in Json files&lt;br /&gt;
** Make the vtkMRMLScriptedNode a vtkMRMLStorableNode&lt;br /&gt;
** Implement vtkMRMLScriptedStorageNode to save the parameter node like a CLI node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/ParameterSerializer&amp;diff=46812</id>
		<title>Documentation/Labs/ParameterSerializer</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/ParameterSerializer&amp;diff=46812"/>
		<updated>2016-08-09T19:08:14Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: Created page with &amp;quot;== Overview ==  This page gathers the information regarding the integration of the Parameter Serializer.  == Limitations of the current infrastructure ==  * The only way to se...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This page gathers the information regarding the integration of the Parameter Serializer.&lt;br /&gt;
&lt;br /&gt;
== Limitations of the current infrastructure ==&lt;br /&gt;
&lt;br /&gt;
* The only way to serialize CLIs is through the MRML scene, it's hard to save the configuration of just one CLI.&lt;br /&gt;
* When running a CLI with the command line, you have to specify all the arguments that are not default. It would be nice to be able to use a file instead.&lt;br /&gt;
&lt;br /&gt;
== Proposed improvements ==&lt;br /&gt;
&lt;br /&gt;
By adding support for the [https://github.com/Slicer/ParameterSerializer/tree/master/cmake Parameter Serializer] users would be able to save(/load) their &lt;br /&gt;
CLI configuration to(/from) a JSON file. That would be applicable both for using CLI through the command line and for using CLIs in the Slicer application.&lt;br /&gt;
That serialization should also mesh well with the python infrastructure.&lt;br /&gt;
&lt;br /&gt;
== Plan of integration ==&lt;br /&gt;
&lt;br /&gt;
=== What already exists ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/Slicer/SlicerExecutionModel Slicer Execution Model] already supports using the Parameter Serializer.&lt;br /&gt;
&lt;br /&gt;
=== TODO ===&lt;br /&gt;
&lt;br /&gt;
* Build JsonCpp in Slicer&lt;br /&gt;
** Branch for improving JsonCpp support in [https://github.com/Slicer/SlicerExecutionModel Slicer Execution Model]&lt;br /&gt;
** Branch for being able to build &amp;amp; package Slicer with JsonCpp.&lt;br /&gt;
&lt;br /&gt;
* Build Parameter Serializer in Slicer&lt;br /&gt;
&lt;br /&gt;
* Make CLI storable in Json files&lt;br /&gt;
** Make the vtkMRMLCommandLineModuleNode a vtkMRMLStorableNode&lt;br /&gt;
** Implement vtkMRMLCommandLineModuleStorageNode&lt;br /&gt;
&lt;br /&gt;
* Make Python module storable in Json files&lt;br /&gt;
** Make the vtkMRMLScriptedNode a vtkMRMLStorableNode&lt;br /&gt;
** Implement vtkMRMLScriptedStorageNode to save the parameter node like a CLI node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs&amp;diff=46811</id>
		<title>Documentation/Labs</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs&amp;diff=46811"/>
		<updated>2016-08-09T18:21:30Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Internals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the place where we will keep track of our experiments and projects.&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
= On-going =&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/OpenGLFilters|OpenGLFilters]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/Segmentations|Segmentations]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/DeprecatedModules|DeprecatedModules extension]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/StartupTimeImprovement|Slicer startup time improvement]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/FHSCompliantDirectoryStructure|FHS compliant directory structure]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/FiberTractMeasurementAndVisualization|Fiber Tract measurement and visualization]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/VTKWidgets|VTK Widgets improvements]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/CLIInfrastructureCleanupAndRefactoring|CLI infrastructure cleanup and refactoring]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/SlicerConfigAndUseSlicerTweaks|SlicerConfig and UseSlicer Tweaks]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/UpgradingCompilerInfrastructure|Upgrading Compiler Infrastructure]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/ViewInfrastructureImprovements| View Infrastructure Improvements]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/CDash Improvements|CDash Improvements]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/SlicerBridge|SlicerBridge]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[{{FULLPAGENAME}}/Display2dText|Display 2D text in viewers]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[{{FULLPAGENAME}}/CI-and-NightlyPackagesGeneration|Continuous Integration and Nightly packages build infrastructure]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/ParameterSerializer|Parameter Serializer support for CLIs]]&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/VTK7|VTK7]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/Qt5|Migration to Qt5]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/OpenCV|Integration with OpenCV]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/VTK-Orientation|Design: Addition of orientation to VTK data structures]]&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/CallingPythonMethodsFromCpp|Calling Python methods from Cpp]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/IPython|IPython]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/Pip|Pip]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/PythonCondaBuild|Python conda build]]&lt;br /&gt;
&lt;br /&gt;
== Compilers &amp;amp; IDE ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/Ninja|Ninja]]&lt;br /&gt;
&lt;br /&gt;
== Virtual Machines ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/GPU Virtualization|GPU Virtualization]]&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/DocumentationImprovments|Documentation Improvements (Wiki, website, ...)]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/ModulesAndEvents|Intermediate documentation for developers]]&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/IPythonSlicerTutorials|IPython Slicer Tutorials]]&lt;br /&gt;
&lt;br /&gt;
== Source code management ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/TransitionToGit|Transition to Git]]&lt;br /&gt;
&lt;br /&gt;
== Extension ==&lt;br /&gt;
&lt;br /&gt;
* [[{{FULLPAGENAME}}/ExtensionsFrameworkRoadmap|Extensions Framework Roadmap]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/CustomSlicerGenerator|Custom Slicer Generator]]&lt;br /&gt;
&lt;br /&gt;
== Functionalities ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/Video Support|Video support]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/FlyThroughNavigation|Fly-through Navigation]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/AutomaticUpdateAndInstallationFramework|Automatic Update and Installation Framework]]&lt;br /&gt;
&lt;br /&gt;
= Completed =&lt;br /&gt;
&lt;br /&gt;
* [[Slicer4:Developers|Developer Projects]]&lt;br /&gt;
&lt;br /&gt;
== Extension ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/EasyExtensionContribution|Easy Extension Contribution]] - See [[Documentation/Nightly/Developers/ExtensionWizard|ExtensionWizard]]&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/CMake-ified Python|CMake-ified Python]] - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21911 r21911], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21912 r21912], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21913 r21913]&lt;br /&gt;
* [[{{FULLPAGENAME}}/NonlinearTransforms|Full support for non-linear transforms]]&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/ITKv4|ITKv4]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/Qt484|Qt484]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/VTK6|VTK6]]&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/DevelopmentWithGit|Development with Git]] - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21863 r21863], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21867 r21867], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21869 r21869], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21879 r21879], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21891 r21891]&lt;br /&gt;
* [[{{FULLPAGENAME}}/PythonObserverCallbacks|Python observer callbacks]]&lt;br /&gt;
&lt;br /&gt;
== Compilers &amp;amp; IDE ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/VS2012|VS2012]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/NUMPY171|Support for Numpy 1.7.1]]&lt;br /&gt;
&lt;br /&gt;
== Modules ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/SimpleFilters|Simple Filters]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/Editor|Editor]]&lt;br /&gt;
&lt;br /&gt;
== Tutorials testing ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/TutorialTesting/4.3-Release|4.3 Release]]&lt;br /&gt;
&lt;br /&gt;
== Debug ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/BRAINS_and_ITKv4_issue|BRAINS and ITKv4 issue]]&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
* [[{{FULLPAGENAME}}/MultiDimensional Data Management|MultiDimensional Data Management]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/DICOMExport|DICOM Export]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/SliceViewAnnotations|Slice View Annotations]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/SubjectHierarchy|Subject hierarchy module and plugins]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/I18N|Internationalization]]&lt;br /&gt;
* [[{{FULLPAGENAME}}/Units|Units]]&lt;br /&gt;
* [https://github.com/TubeTK/SlicerExecutionModel/wiki/SlicerExecutionModel-Parameter-Serialization SlicerExecutionModel Parameter Serialization]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.5/SlicerApplication/MouseandKeyboardShortcuts&amp;diff=44933</id>
		<title>Documentation/4.5/SlicerApplication/MouseandKeyboardShortcuts</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.5/SlicerApplication/MouseandKeyboardShortcuts&amp;diff=44933"/>
		<updated>2016-02-11T18:13:09Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* 3D Viewer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/slicerapplication-header}}&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Table of Content=&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;100%&amp;quot; valign=&amp;quot;top&amp;quot; cellspacing=&amp;quot;7&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;50%&amp;quot;|&lt;br /&gt;
! |&lt;br /&gt;
! width=&amp;quot;50%&amp;quot;|&lt;br /&gt;
|- &lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
=Mouse=&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Cross_Reference|Cross reference]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Window_.26_Level| Window Level]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Opacity_blending|Opacity Blending]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Rotate.2C_Zoom.2C_Pan|Rotate, Zoom, Pan]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Selecting_.26_Manipulating|Selecting and Manipulating]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Mouse_Modes|Mouse modes]]&lt;br /&gt;
&lt;br /&gt;
|bgcolor=&amp;quot;#CCCCCC&amp;quot;|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
=[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Keyboard_Accelerators| Keyboard Accelerators]]=&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#General| General]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#3D_Viewer| 3D Viewer]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Slice_Viewer| Slice Viewer]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Transfer_Functions| Transfer functions]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Keyboard_Shortcuts.E2.80.94Windows| Non-Slicer Key bindings for Windows]]&lt;br /&gt;
*[[Documentation/{{documentation/version}}/SlicerApplication/MouseandKeyboardShortcuts#Keyboard_Shortcuts.E2.80.94Mac| Non-Slicer Key bindings for Mac]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Mouse Operations=&lt;br /&gt;
Below is basic information about how to use the three-, two-, and one-button mouse (or trackpad) on Windows, Mac, and Linux platforms to perform basic interaction operations in Slicer: &lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Cross Reference== &lt;br /&gt;
Holding down the Shift-Key while moving the mouse in any '''Slice Viewer''' will cause other Slice Viewers to scroll to the same position. This feature can be combined with cross-hairs.&lt;br /&gt;
&lt;br /&gt;
==Crosshairs==&lt;br /&gt;
Crosshairs are available for precise cross-correlation between Sliceviewers. Their appearance can be changed. In '''Navigation''' mode a box at the center of the crosshair allows to center the other Sliceviewers to that location by clicking and dragging the box.&lt;br /&gt;
&lt;br /&gt;
==Window &amp;amp; Level== &lt;br /&gt;
*Left-click &amp;amp; drag in a '''Slice Viewer''' adjusts Window / Level. &lt;br /&gt;
**Adjust the '''level''' by moving the mouse '''vertically'''&lt;br /&gt;
**Adjust the '''window''' by moving the mouse '''horizontally''' &lt;br /&gt;
*An interface with sliders and numeric input fields is available in the [http://www.slicer.org/slicerWiki/index.php/Documentation/{{documentation/version}}/Modules/Volumes Volumes Module] for more precise controls.&lt;br /&gt;
&lt;br /&gt;
==Opacity blending== &lt;br /&gt;
*Ctrl ([[image:Apple-Command.png]] on the Mac) &amp;amp; Left-click &amp;amp; drag in a '''Slice Viewer''' adjusts opacity. &lt;br /&gt;
**Adjust the '''foreground opacity''' by moving the mouse '''vertically'''&lt;br /&gt;
**Adjust the '''labelmap opacity''' by moving the mouse '''horizontally''' &lt;br /&gt;
*An interface with sliders and numeric input fields is available in the Slice View Controller for more precise controls.&lt;br /&gt;
&lt;br /&gt;
|[[image:2011-12-Crosshair-Toolbar.png|150px|thumb|Crosshair-Toolbar&amp;lt;br&amp;gt;A variety of crosshair modes are available in Slicer]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Rotate, Zoom, Pan==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; valign=&amp;quot;top&amp;quot; cellspacing=&amp;quot;3&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|style=&amp;quot;background:#ffefd5;&amp;quot;|'''Interface Device/Action'''	&lt;br /&gt;
|style=&amp;quot;background:lightyellow;&amp;quot; |'''Rotate''' (3D viewers only) 	&lt;br /&gt;
|style=&amp;quot;background:lightyellow;&amp;quot; |'''Zoom''' 	&lt;br /&gt;
|style=&amp;quot;background:lightyellow;&amp;quot; |'''Pan''' &lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:bisque;&amp;quot; |'''3-button''' 	&lt;br /&gt;
|Left-click &amp;amp; drag 	&lt;br /&gt;
|Right-Click &amp;amp; vertical drag 	&lt;br /&gt;
|Middle-Click &amp;amp; drag &lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:bisque;&amp;quot; |'''2-button'''&lt;br /&gt;
|Left-click &amp;amp; drag 	&lt;br /&gt;
|Right-Click &amp;amp; vertical drag 	&lt;br /&gt;
|Shift+Left-Click &amp;amp; drag &lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:bisque;&amp;quot; |'''1-button''' 	&lt;br /&gt;
|Left-click &amp;amp; drag 	&lt;br /&gt;
|Ctrl+Left-Click &amp;amp; vertical drag 	&lt;br /&gt;
|Shift+Left-Click &amp;amp; drag&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:bisque;&amp;quot; |'''1-button Mac''' 	&lt;br /&gt;
|Left-click &amp;amp; drag 	&lt;br /&gt;
|[[image:Apple-Command.png]](command)+Left-Click &amp;amp; vertical drag 	&lt;br /&gt;
|Shift+Left-Click &amp;amp; drag&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:bisque;&amp;quot; |'''Trackpad Mac''' 	&lt;br /&gt;
|Left-click &amp;amp; drag 	&lt;br /&gt;
|two-fingers &amp;amp; vertical drag 	&lt;br /&gt;
|Shift+Left-Click &amp;amp; drag&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Selecting &amp;amp; Manipulating== &lt;br /&gt;
Mousing over any &amp;quot;pickable&amp;quot; object in any of Slicer's viewers will cause the cursor to change from a &amp;quot;pointer&amp;quot; into a &amp;quot;picking hand&amp;quot;. When the cursor shows a picking hand, left-clicking and dragging the mouse will pick and manipulate the object. Releasing the mouse button will de-select the object.&lt;br /&gt;
&lt;br /&gt;
==Mouse Modes== &lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|Slicer has two mouse modes: Transform, and Place. The icons in the mouse mode toolbar at the top of the main GUI allow to switch between these mouse modes and to modulate their behavior. &lt;br /&gt;
&lt;br /&gt;
*'''Transform mode''' is the '''default''' interaction mode. This mode allows interactive rotation (3D viewer only), pan/translation and zoom (see above).&lt;br /&gt;
*'''Place''' mode allows to place one object then switches modes back to '''Transform''' mode. Place mode can be made persistent by clicking the checkbox adjacent to place mode. This allows to place multiple objects (e.g. fiducials). &lt;br /&gt;
**Fiducial is the default object in Place mode &lt;br /&gt;
**Ruler and Region Of Interest (ROI) Widgets are other available objects in the Place Mode menu.&lt;br /&gt;
|[[image:MouseModeToolbar-2011-12.png|thumb|200px|Mouse Mode Toolbar&amp;lt;br&amp;gt;Transform icon to the left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Keyboard Accelerators=&lt;br /&gt;
*On Mac OS X use the Command key ([[image:Apple-Command.png]]) instead of the Control (Ctrl) key&lt;br /&gt;
*fn-Delete is used for Forward Delete on built-in keyboards of portable Macs&lt;br /&gt;
&lt;br /&gt;
''Note that in addition to the global keyboard accelerators listed here, individual modules may define their own accelerators that are active when the module is active.  See the [[Documentation/{{documentation/version}}/Modules/Editor#Keystrokes|Editor keyboard shortcuts]] for example.&lt;br /&gt;
&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- border=&amp;quot;1&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; |Key&lt;br /&gt;
! align=&amp;quot;left&amp;quot; |Effect&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+O'''&lt;br /&gt;
| align=&amp;quot;left&amp;quot;|Load a new scene (clears existing scene)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot;|'''Ctrl+A''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;|Import a scene (does not clear existing scene) Brings up '''Add Data''' instead&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Ctrl+S''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Save a scene&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Ctrl+W''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Close a scene&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Ctrl+Z''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Undo the history of undoable commands, from last to first.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Ctrl+Y''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Redo the history of undoable commands, from last to first.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Ctrl+H''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Set current module to &amp;quot;home&amp;quot; module for easy access.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot;| '''Space''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Toggles the display of Slicer's Edit Box.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+P ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Display the Python console  '''Displays the QT-real console'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+L ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Create a new fiducial list.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+I''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Toggle between &amp;quot;Persistent Place&amp;quot; and &amp;quot;Transform View&amp;quot; interaction modes.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+M ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Create a new Ruler measurement between the last two placed fiducials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+0 ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Display error log.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+1 ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Interface documentation.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+2 ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Display the '''Application Settings Interface''' for customizing Slicer.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+3 ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Python Interactor.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+4 ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Extension Manager.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+5 ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Toggle Module Panel visible/invisible.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+F ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Select module search box&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+Left ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Go to previous module in history.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+Right ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Go to next module in history.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 3D Viewer==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- border=&amp;quot;1&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; |Key&lt;br /&gt;
! align=&amp;quot;left&amp;quot; |Effect&lt;br /&gt;
|- style=&amp;quot;width:200px&amp;quot; | &amp;lt;span style=&amp;quot;background-color: lightgreen&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;midnightblue&amp;quot;&amp;gt;&lt;br /&gt;
|'''r''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Fits the cameras field of view to show all that is visible in the viewer&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''w ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Show triangulated surface models as wireframe.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''s ''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Show triangulated surface models as shaded surfaces.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 0''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Squares the view and zoom so that all objects in the scene are in the view.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 1''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Move the camera to show the Anterior/Posterior view (Anterior toward the user and Posterior away from the user).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 2''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Rotate the view down around the Right/Left axis (opposite of '''Numpad 8''').&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 3''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Move the camera to show the Left/Right view (Left toward the user and Right away from the user).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 4''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Rotate the view Left around the Superior/Inferior axis (opposite of '''Numpad 6''').&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 5''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Square the current view.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 6''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Rotate the view Right around the Superior/Inferior axis (opposite of '''Numpad 4''').&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 7''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Move the camera to show the Inferior/Superior view (Inferior toward the user and Superior away from the user).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; |'''Numpad 8''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Rotate the view up around the Right/Left axis (opposite of '''Numpad 2''').&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Slice Viewer==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- border=&amp;quot;1&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; |Key&lt;br /&gt;
! align=&amp;quot;left&amp;quot; |Effect&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''v''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Toggles the slice plane visibility in the main 3D Viewer&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''r''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;&amp;quot;| Fits the slice view to the volume extents in the active Slice Viewer, or in all viewers if they are linked (the first non-none volume will be used in order of Background, Foreground and Label layers)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''g''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;&amp;quot;| Toggles the opacity of the label layer&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''t''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot;&amp;quot;| Toggles the opacity of the foreground layer&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''b''' or '''f'''&lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Decrease or increase visible slice in the active Slice Viewer (left or down) by one unit of background pixel spacing&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''[''' or ''']'''&lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Change background volume by cycle forward or backward through the volumes loaded in the scene &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''{''' or '''}'''&lt;br /&gt;
| align=&amp;quot;left&amp;quot;| Change foreground volume by cycle forward or backward through the volumes loaded in the scene &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''` (back-tick)'''&lt;br /&gt;
| align=&amp;quot;left&amp;quot; |Navigate to next fiducial in the active Slice Viewer, or in all viewers if they are linked (back-tick is the left single-quote on the key with the tilde (~) character in the upper left side of the keyboard) ''Reserved, but not yet implemented in Slicer 4.x''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+` (back-tick)''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; |Navigate to next fiducial in all Slice Viewers, independent of their linked state ''Reserved, but not yet implemented in Slicer 4.x''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Shift+` (back-tick)''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Navigate to the previous fiducial in the active Slice Viewer, or in all viewers if they are linked ''Reserved, but not yet implemented in Slicer 4.x''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Ctrl+Shift+` (back-tick)''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Navigate to the previous fiducial in all Slice Viewers, independent of their linked state ''Reserved, but not yet implemented in Slicer 4.x''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''p''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Place a new fiducial in the active Slice Viewer(adds to the current fiducial list, or creates a list if there are none) ''Reserved, but not yet implemented in Slicer 4.x''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''Backspace''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | When the mouse is hovering over a fiducial in the Slice Viewer (turning it yellow), delete that fiducial ''Reserved, but not yet implemented in Slicer 4.x''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | (forward)'''Delete''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | When the mouse is hovering over a fiducial in the Slice Viewer (turning it yellow), delete that fiducial ''Reserved, but not yet implemented in Slicer 4.x''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:200px&amp;quot; | '''s''' &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Selects the active slice in lightbox mode ''Reserved, but not yet implemented in Slicer 4.x''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Transfer Functions==&lt;br /&gt;
[[image:VolumeRendering-TransferFunction.png|thumb|right|348px|Transfer function in Volume Rendering module]]&lt;br /&gt;
&lt;br /&gt;
* Current point (larger radius point)&lt;br /&gt;
** ''Left click''' on an existing point : make a point current&lt;br /&gt;
** '''Right arrow key''' or '''Top arrow key''': Make next point current&lt;br /&gt;
** '''Left arrow key''' or '''Bottom arrow key''': Make previous point current &lt;br /&gt;
** '''Left click &amp;amp; drag''': Move current point&lt;br /&gt;
** ''Todo: '''Ctrl &amp;amp; arrow key''': Move current point horizontally &amp;amp; vertically''&lt;br /&gt;
* Add a point&lt;br /&gt;
** '''Left click''' in an empty space&lt;br /&gt;
* Remove a point&lt;br /&gt;
** '''Middle click''': Remove and make next point current&lt;br /&gt;
** '''Backspace key''': Remove and make previous point current&lt;br /&gt;
** '''Del[ete] key''': Remove and make next point current&lt;br /&gt;
* Multi-selection (blue points)&lt;br /&gt;
** '''Right click &amp;amp; drag''': Select points inside rubber band area&lt;br /&gt;
** '''Right click''' a point: Toggle point selection&lt;br /&gt;
** '''Space key''': Toggle current point&lt;br /&gt;
** '''Shift &amp;amp; arrow key''': Select next/previous point&lt;br /&gt;
** '''Left click &amp;amp; drag''': Move selected points&lt;br /&gt;
** ''Todo: '''Ctrl &amp;amp; arrow key''': Move selected points''&lt;br /&gt;
** '''+ key''': Expand selected points&lt;br /&gt;
** '''- key''': Contract selected points&lt;br /&gt;
* Zoom&lt;br /&gt;
** '''Mouse wheel''' zooms in and out the view&lt;br /&gt;
&lt;br /&gt;
=Non-Slicer Keybindings for Win, Mac, and Ubuntu=&lt;br /&gt;
*This section was inserted for compatibility considerations.&lt;br /&gt;
&lt;br /&gt;
*source: http://www.pcmag.com/article2/0,2817,2400112,00.asp&lt;br /&gt;
==Keyboard Shortcuts—Windows==&lt;br /&gt;
&lt;br /&gt;
Note: Single letter keys are shown capitalized, but you do not have to hold Shift unless it's specified. You also don't have to type the plus sign; plus sign just means push the keys on either side of it at the same time. &lt;br /&gt;
&lt;br /&gt;
*Commonly Used OS-Level Shortcuts&lt;br /&gt;
#. Alt + Tab (toggle between programs)&lt;br /&gt;
#. Windows button + M (show desktop, i.e., minimize all windows)&lt;br /&gt;
#. Windows button + Tab (show all active windows in task bar)&lt;br /&gt;
#. PrtScn (save screen capture to clipboard; &amp;quot;paste&amp;quot; the image into an image-editing program to make it into a file)&lt;br /&gt;
#. Windows button (opens applications menu)&lt;br /&gt;
&lt;br /&gt;
*Browser Shortcuts&lt;br /&gt;
#. Ctrl + T (open a new tab)&lt;br /&gt;
#. Ctrl + Shift + t (reopens the tab you last closed; works multiple times)&lt;br /&gt;
#. F5 (reload page)&lt;br /&gt;
#. Backspace (go to previous page; works multiple times)&lt;br /&gt;
#. Ctrl + Tab (cycle between tabs)&lt;br /&gt;
&lt;br /&gt;
*Commonly Used Shortcuts in Most Applications&lt;br /&gt;
#. Ctrl+ Z (undo last operation)&lt;br /&gt;
#. Ctrl + Y (redo last operation)&lt;br /&gt;
#. Crtl + O (open file)&lt;br /&gt;
#. Crtl + S (save)&lt;br /&gt;
#. Ctrl + W (close active window or file)&lt;br /&gt;
#. Crtl + Q (quit application)&lt;br /&gt;
&lt;br /&gt;
*Copy-and-Pasters' Delight&lt;br /&gt;
#. Ctrl + A (select all in active window; e.g., select all text on page)&lt;br /&gt;
#. Ctrl + X (cut to clipboard)&lt;br /&gt;
#. Ctrl + C (copy)&lt;br /&gt;
#. Ctrl + V (paste)&lt;br /&gt;
&lt;br /&gt;
*Find, Select, and Navigate Text&lt;br /&gt;
#. Ctrl + F (find; helpful if you're searching for a particular word on a website or document)&lt;br /&gt;
#. Ctrl + Shift + down arrow (select until end of line)&lt;br /&gt;
#. Ctrl + Shift + up arrow (select until beginning of line)&lt;br /&gt;
#. Ctrl + Home (move cursor to top/start of document)&lt;br /&gt;
#. Ctrl + End (move cursor to bottom/end of document)&lt;br /&gt;
&lt;br /&gt;
==Keyboard Shortcuts—Mac==&lt;br /&gt;
&lt;br /&gt;
Note: Single letter keys are shown capitalized, but you do not have to hold Shift unless it's written. You also don't have to type the plus sign; plus sign just means push the keys on either side of it at the same time.&lt;br /&gt;
&lt;br /&gt;
*Commonly Used OS-Level Shortcuts&lt;br /&gt;
#. Command + Tab (toggle between programs)&lt;br /&gt;
#. Command + M (minimize active window)&lt;br /&gt;
#. Swipe three fingers up on trackpad (show all active windows)&lt;br /&gt;
#. Command + Shift + 3 (take screen shot; the default settings will save it to a predefined location, usually the &amp;quot;Pictures&amp;quot; folder and name it &amp;quot;Picture1,&amp;quot; &amp;quot;Picture2,&amp;quot; etc.)&lt;br /&gt;
#. Command + N (opens new Finder from desktop; new window/file in most other programs)&lt;br /&gt;
&lt;br /&gt;
*Browser Shortcuts&lt;br /&gt;
#. Command + T (open a new tab)&lt;br /&gt;
#. Command + Shift + t (reopens the tab you last closed in Chrome, Firefox, Opera; works multiple times)&lt;br /&gt;
#. Command + R (reload page)&lt;br /&gt;
#. Backspace (go to previous page; works multiple times)&lt;br /&gt;
#. Control + Tab (cycle between tabs/go to next tab in Chrome, Firefox, Opera)&lt;br /&gt;
&lt;br /&gt;
*Commonly Used Shortcuts in Most Applications&lt;br /&gt;
#. Command + Z (undo last operation)&lt;br /&gt;
#. Command + Y (redo last operation)&lt;br /&gt;
#. Command + O (open file)&lt;br /&gt;
#. Command + S (save)&lt;br /&gt;
#. Command + W (close active window or file)&lt;br /&gt;
#. Command + Q (quit application)&lt;br /&gt;
&lt;br /&gt;
*Copy-and-Pasters' Delight&lt;br /&gt;
#. Command + A (select all in active window; e.g., select all text on page)&lt;br /&gt;
#. Command + X (cut to clipboard)&lt;br /&gt;
#. Command + C (copy)&lt;br /&gt;
#. Command + V (paste)&lt;br /&gt;
&lt;br /&gt;
*Find, Select, and Navigate Text&lt;br /&gt;
#. Command + F (find; helpful if you're searching for a particular word on a website or document)&lt;br /&gt;
#. Command + Shift + down arrow (select until end of line)&lt;br /&gt;
#. Command + Shift + up arrow (select until beginning of line)&lt;br /&gt;
#. Command + up arrow (move cursor to top/start of document)&lt;br /&gt;
#. Command + down arrow (move cursor to bottom/end of document)&lt;br /&gt;
&lt;br /&gt;
==Keyboard Shortcuts-Ubuntu==&lt;br /&gt;
[https://help.ubuntu.com/community/KeyboardShortcuts Ubuntu Keyboard Shortcuts] are listed on this webpage.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Acknowledgments&amp;diff=43352</id>
		<title>Documentation/Nightly/Acknowledgments</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Acknowledgments&amp;diff=43352"/>
		<updated>2015-11-11T20:40:00Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Grants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Citing Slicer ==&lt;br /&gt;
&lt;br /&gt;
To acknowledge 3D Slicer as a platform, please cite the Slicer web site (http://www.slicer.org) and the following publication when publishing work that uses or incorporates 3D SlicerL:&lt;br /&gt;
&lt;br /&gt;
Fedorov A., Beichel R., Kalpathy-Cramer J., Finet J., Fillion-Robin J-C., Pujol S., Bauer C., Jennings D., Fennessy F., Sonka M., Buatti J., Aylward S.R., Miller J.V., Pieper S., Kikinis R. [http://www.slicer.org/publications/item/view/2219 3D Slicer as an Image Computing Platform for the Quantitative Imaging Network]. Magn Reson Imaging. 2012 Nov;30(9):1323-41. PMID: 22770690.&lt;br /&gt;
==Major Contributors==&lt;br /&gt;
*Ron Kikinis: Principal Investigator&lt;br /&gt;
*Steve Pieper: Chief Architect&lt;br /&gt;
*Jean-Christophe Fillion-Robin: Lead Developer&lt;br /&gt;
*Nicole Aucoin&lt;br /&gt;
*Stephen Aylward&lt;br /&gt;
*Andrey Fedorov&lt;br /&gt;
*Noby Hata&lt;br /&gt;
*Hans Johnson&lt;br /&gt;
*Andras Lasso&lt;br /&gt;
*Jim Miller&lt;br /&gt;
*Sonia Pujol: Director of Training&lt;br /&gt;
*Junichi Tokuda&lt;br /&gt;
*Lauren O'Donnell&lt;br /&gt;
&lt;br /&gt;
==Groups==&lt;br /&gt;
*SPL: Ron Kikinis, Nicole Aucoin, Wendy Plesniak, Demian Wassermann, Isaiah Norton, Sonia Pujol, Noby Hata, Junichi Tokuda&lt;br /&gt;
*Isomics: Steve Pieper, Alex Yarmarkovich&lt;br /&gt;
*Kitware: Jean-Christophe Fillion-Robin, Julien Finet, Will Schroeder, Stephen Aylward&lt;br /&gt;
*U Iowa: Hans Johnson&lt;br /&gt;
*GE: Jim Miller&lt;br /&gt;
*Perk Lab, Queen's University: Andras Lasso, Tamas Ungi, Csaba Pinter, Gabor Fichtinger&lt;br /&gt;
&lt;br /&gt;
== Funding Sources ==&lt;br /&gt;
&lt;br /&gt;
=== Commercial partners ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.isomics.com/ Isomics] uses 3D Slicer in a variety of academic and commercial research partnerships in fields such as planning and guidance for neurosurgery, quantitative imaging for clinical trials, clinical image informatics.&lt;br /&gt;
&lt;br /&gt;
* [http://www.kitware.com/opensource/slicer.html Kitware] Integral to continuing to support the 3D Slicer community, Kitware is also offering consulting services in response to the rapidly growing demand for the development of proprietary applications and commercial products based on 3D Slicer. Kitware has used 3D Slicer to rapidly prototype solutions in nearly every aspect of medical imaging and is also collaborating on the development of commercial pre-clinical and clinical products based on 3D Slicer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#669&amp;quot;&amp;gt;&amp;lt;small&amp;gt;Listed in alphabetical order.&amp;lt;/small&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commercial Products Involving Slicer ===&lt;br /&gt;
&lt;br /&gt;
* [http://sonovol.com/ SonoVol] is developing a whole-body ultrasound imaging system for small animals. This start-up company arose from research in the Department of Biomedical Engineering at the University of North Carolina at Chapel Hill.&lt;br /&gt;
&lt;br /&gt;
* [http://www.xstrahl.com Xstrahl] is developing a Small Animal Radiation Research Platform (SARRP) that uses 3D Slicer as its front-end application for radiation therapy beam placement and system control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#669&amp;quot;&amp;gt;&amp;lt;small&amp;gt;Listed in alphabetical order.&amp;lt;/small&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grants ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Project Name''' || '''Grant Number and NIH Link''' || '''Title (and Project Page''') || '''Grant PIs''' || '''Start Date''' || '''End Date'''&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-CMF || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8576556&amp;amp;icde=18353487 1R01DE024450] || Quantification Of 3D Bony Changes In Temporomandibular Joint Osteoarthritis || Cevidanes, Lucia || 9/10/2013 || 8/31/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Craniosynostosis || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8778815&amp;amp;icde=27036063&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASCIMAGE-GUIDED 1R41HD081712] || Image-Guided Planning System For Skull Correction In Children With Craniosynostos || Linguraru, Marius George || 9/26/2014 || 8/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8971083&amp;amp;icde=27026834 1U01CA199459] || Open Source Diffusion Mri Technology For Brain Cancer Research || O'Donnell, Lauren Jean || 9/22/2015 || 7/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_details.cfm?aid=8855115&amp;amp;icde=27026518         2P41EB015898] || Image Guided Therapy Center || Tempany, Clare M || 4/1/2004 || 6/30/2020&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8890837&amp;amp;icde=27036647&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 5P41EB015902] || Neuroimaging Analysis Center (Nac) || Kikinis, Ron || 8/1/2013 || 5/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Duke Prostate Registration || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8905274&amp;amp;icde=27036277&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R41CA196565] || Prostate Cancer Assessment Via Integrated 3D Arfi Elasticity Imaging And Multi-Parametric Mri || Palmeri, Mark L. || 4/1/2015 || 4/1/2015&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DWI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8817256&amp;amp;icde=27036729&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R01CA160902] || Advancement And Validation Of Prostate Diffusion And Spectroscopic Mri || Maier, Stephan E || 4/1/2012 || 2/28/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-NIRView (Dartmouth) || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8828624&amp;amp;icde=27036841&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 5R01CA184354] || Mri Fluorescence Tomography For Quantifying Tumor Receptor Concentration In Vivo || Davis, Scott C. || 4/1/2014 || 2/28/2019&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-OrthognathicTrac || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8710950&amp;amp;icde=27036891 1R43DE024334] || Real-Time Image Guidance For Improved Orthognathic Surgery || Enquobahrie, Andinet A. || 8/5/2014 || 7/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PediatricRadiologicDecisionSupport || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8272742&amp;amp;icde=13552329 1R01EB014947] || Mi2B2 Enabled Pediatric Radiological Decision Support || Murphy, Shawn N || 8/1/2012 || 7/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8863934&amp;amp;icde=27037113&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 3R42CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 9/1/2012 || 8/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=7999618&amp;amp;icde=27037084&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R41CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 7/1/2010 || 6/1/2012&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8390856&amp;amp;icde=27037039&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 2R42CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 9/1/2012 || 8/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET/CT Calibration Phantom || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8979242&amp;amp;icde=27036988&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 2R42CA167907] || Calibrated Methods For Quantitative Pet/Ct Imaging Phase Ii || Kinahan, Paul E || 5/1/2012 || 7/31/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET/CT Calibration Phantom || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8979242&amp;amp;icde=27036988&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R42CA167907] || Calibrated Methods For Quantitative Pet/Ct Imaging Phase Ii || Kinahan, Paul E. || 5/1/2012 || 7/1/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-ProstateBRP || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8906771&amp;amp;icde=27026518 5R01CA111288 ] || Enabling Technologies For Mri-Guided Prostate Interventions || Tempany, Clare M. || 12/1/2004 || 7/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-ProstateQIN || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8707214&amp;amp;icde=27026645 5U01CA151261] || Quantitative Mri Of Prostate Cancer As A Biomarker And Guide For Treatment || Fennessy, Fiona || 9/1/2010 || 7/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-QIICR || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8911287&amp;amp;icde=27026906 U24 CA180918] || [http://qiicr.org Quantitative Image Informatics for Cancer Research (QIICR)] || Kikinis, Fedorov || 9/4/2013 || 8/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-QIICR || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8911287&amp;amp;icde=27026906 5U24CA180918] || Quantitative Image Informatics For Cancer Research (Qiicr) || Kikinis, Ron || 9/1/2013 || 8/1/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Radiomics-U01 || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8799943&amp;amp;icde=27026470 1U01CA190234] || Genotype And Imaging Phenotype Biomarkers In Lung Cancer || Aerts, Hugo || 1/1/2015 || 12/1/2019&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8252988&amp;amp;icde=27037450&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R43CA165621] || Quantitative Ultrasound Analysis Of Vascular Morphology For Cancer Assessment || Aylward, Stephen R || 12/1/2012 || 8/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8384153&amp;amp;icde=27037397&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R01CA170665] || Micro-Tumor Detection By Quantifying Tumor-Induced Vascular Abnormalities || Dayton, Paul A. || 9/1/2012 || 6/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8453963&amp;amp;icde=27037364&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R41NS081792] || Multimodality Image-Based Assessment System For Traumatic Brain Injury || Aylward, Stephen R. || 1/1/2013 || 12/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8472102&amp;amp;icde=27037328&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R43EB016621] || In-Field Fast Procedure Support And Automation || Aylward, Stephen R. || 5/1/2013 || 4/1/2015&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;For more information on how this table was created, see [[Documentation/Nightly/Acknowledgments/Grants|this page]].&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Acknowledgments/Grants&amp;diff=43351</id>
		<title>Documentation/Nightly/Acknowledgments/Grants</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Acknowledgments/Grants&amp;diff=43351"/>
		<updated>2015-11-11T20:37:55Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: Created page with ' == Instructions to Generate the Grants Table ==   The [http://wiki.slicer.org/slicerWiki/index.php?title=Documentation/Nightly/Acknowledgments#Grants grant table] was generated …'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Instructions to Generate the Grants Table ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://wiki.slicer.org/slicerWiki/index.php?title=Documentation/Nightly/Acknowledgments#Grants grant table] was generated by gathering all the grant information in a [https://docs.google.com/spreadsheets/d/1f9Ik0uiO3dPkdnxsUc5Kq_ijV1Qi_gkmFV2uw7h9tq4/edit#gid=0 google doc].&lt;br /&gt;
The table was then exported to wiki format using the google doc add-on [https://chrome.google.com/webstore/detail/wikitableworks/fcidnbkcodoajhfbcaefikfemlggcpfp?utm_source=permalink '''WikiTableWorks'''].&lt;br /&gt;
&lt;br /&gt;
Note that the table was then tweaked to:&lt;br /&gt;
* Make the table sortable: change the table class to &amp;quot;wikitable sortable&amp;quot;.&lt;br /&gt;
* Specifying the header: use &amp;quot;!&amp;quot; instead of &amp;quot;|&amp;quot; on the header line.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Acknowledgments&amp;diff=43350</id>
		<title>Documentation/Nightly/Acknowledgments</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Acknowledgments&amp;diff=43350"/>
		<updated>2015-11-11T20:35:03Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Citing Slicer ==&lt;br /&gt;
&lt;br /&gt;
To acknowledge 3D Slicer as a platform, please cite the Slicer web site (http://www.slicer.org) and the following publication when publishing work that uses or incorporates 3D SlicerL:&lt;br /&gt;
&lt;br /&gt;
Fedorov A., Beichel R., Kalpathy-Cramer J., Finet J., Fillion-Robin J-C., Pujol S., Bauer C., Jennings D., Fennessy F., Sonka M., Buatti J., Aylward S.R., Miller J.V., Pieper S., Kikinis R. [http://www.slicer.org/publications/item/view/2219 3D Slicer as an Image Computing Platform for the Quantitative Imaging Network]. Magn Reson Imaging. 2012 Nov;30(9):1323-41. PMID: 22770690.&lt;br /&gt;
==Major Contributors==&lt;br /&gt;
*Ron Kikinis: Principal Investigator&lt;br /&gt;
*Steve Pieper: Chief Architect&lt;br /&gt;
*Jean-Christophe Fillion-Robin: Lead Developer&lt;br /&gt;
*Nicole Aucoin&lt;br /&gt;
*Stephen Aylward&lt;br /&gt;
*Andrey Fedorov&lt;br /&gt;
*Noby Hata&lt;br /&gt;
*Hans Johnson&lt;br /&gt;
*Andras Lasso&lt;br /&gt;
*Jim Miller&lt;br /&gt;
*Sonia Pujol: Director of Training&lt;br /&gt;
*Junichi Tokuda&lt;br /&gt;
*Lauren O'Donnell&lt;br /&gt;
&lt;br /&gt;
==Groups==&lt;br /&gt;
*SPL: Ron Kikinis, Nicole Aucoin, Wendy Plesniak, Demian Wassermann, Isaiah Norton, Sonia Pujol, Noby Hata, Junichi Tokuda&lt;br /&gt;
*Isomics: Steve Pieper, Alex Yarmarkovich&lt;br /&gt;
*Kitware: Jean-Christophe Fillion-Robin, Julien Finet, Will Schroeder, Stephen Aylward&lt;br /&gt;
*U Iowa: Hans Johnson&lt;br /&gt;
*GE: Jim Miller&lt;br /&gt;
*Perk Lab, Queen's University: Andras Lasso, Tamas Ungi, Csaba Pinter, Gabor Fichtinger&lt;br /&gt;
&lt;br /&gt;
== Funding Sources ==&lt;br /&gt;
&lt;br /&gt;
=== Commercial partners ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.isomics.com/ Isomics] uses 3D Slicer in a variety of academic and commercial research partnerships in fields such as planning and guidance for neurosurgery, quantitative imaging for clinical trials, clinical image informatics.&lt;br /&gt;
&lt;br /&gt;
* [http://www.kitware.com/opensource/slicer.html Kitware] Integral to continuing to support the 3D Slicer community, Kitware is also offering consulting services in response to the rapidly growing demand for the development of proprietary applications and commercial products based on 3D Slicer. Kitware has used 3D Slicer to rapidly prototype solutions in nearly every aspect of medical imaging and is also collaborating on the development of commercial pre-clinical and clinical products based on 3D Slicer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#669&amp;quot;&amp;gt;&amp;lt;small&amp;gt;Listed in alphabetical order.&amp;lt;/small&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commercial Products Involving Slicer ===&lt;br /&gt;
&lt;br /&gt;
* [http://sonovol.com/ SonoVol] is developing a whole-body ultrasound imaging system for small animals. This start-up company arose from research in the Department of Biomedical Engineering at the University of North Carolina at Chapel Hill.&lt;br /&gt;
&lt;br /&gt;
* [http://www.xstrahl.com Xstrahl] is developing a Small Animal Radiation Research Platform (SARRP) that uses 3D Slicer as its front-end application for radiation therapy beam placement and system control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#669&amp;quot;&amp;gt;&amp;lt;small&amp;gt;Listed in alphabetical order.&amp;lt;/small&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grants ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Project Name''' || '''Grant Number and NIH Link''' || '''Title (and Project Page''') || '''Grant PIs''' || '''Start Date''' || '''End Date'''&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-CMF || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8576556&amp;amp;icde=18353487 1R01DE024450] || Quantification Of 3D Bony Changes In Temporomandibular Joint Osteoarthritis || Cevidanes, Lucia || 9/10/2013 || 8/31/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Craniosynostosis || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8778815&amp;amp;icde=27036063&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASCIMAGE-GUIDED 1R41HD081712] || Image-Guided Planning System For Skull Correction In Children With Craniosynostos || Linguraru, Marius George || 9/26/2014 || 8/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8971083&amp;amp;icde=27026834 1U01CA199459] || Open Source Diffusion Mri Technology For Brain Cancer Research || O'Donnell, Lauren Jean || 9/22/2015 || 7/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_details.cfm?aid=8855115&amp;amp;icde=27026518         2P41EB015898] || Image Guided Therapy Center || Tempany, Clare M || 4/1/2004 || 6/30/2020&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8890837&amp;amp;icde=27036647&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 5P41EB015902] || Neuroimaging Analysis Center (Nac) || Kikinis, Ron || 8/1/2013 || 5/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Duke Prostate Registration || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8905274&amp;amp;icde=27036277&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R41CA196565] || Prostate Cancer Assessment Via Integrated 3D Arfi Elasticity Imaging And Multi-Parametric Mri || Palmeri, Mark L. || 4/1/2015 || 4/1/2015&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DWI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8817256&amp;amp;icde=27036729&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R01CA160902] || Advancement And Validation Of Prostate Diffusion And Spectroscopic Mri || Maier, Stephan E || 4/1/2012 || 2/28/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-NIRView (Dartmouth) || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8828624&amp;amp;icde=27036841&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 5R01CA184354] || Mri Fluorescence Tomography For Quantifying Tumor Receptor Concentration In Vivo || Davis, Scott C. || 4/1/2014 || 2/28/2019&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-OrthognathicTrac || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8710950&amp;amp;icde=27036891 1R43DE024334] || Real-Time Image Guidance For Improved Orthognathic Surgery || Enquobahrie, Andinet A. || 8/5/2014 || 7/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PediatricRadiologicDecisionSupport || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8272742&amp;amp;icde=13552329 1R01EB014947] || Mi2B2 Enabled Pediatric Radiological Decision Support || Murphy, Shawn N || 8/1/2012 || 7/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8863934&amp;amp;icde=27037113&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 3R42CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 9/1/2012 || 8/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=7999618&amp;amp;icde=27037084&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R41CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 7/1/2010 || 6/1/2012&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8390856&amp;amp;icde=27037039&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 2R42CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 9/1/2012 || 8/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET/CT Calibration Phantom || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8979242&amp;amp;icde=27036988&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 2R42CA167907] || Calibrated Methods For Quantitative Pet/Ct Imaging Phase Ii || Kinahan, Paul E || 5/1/2012 || 7/31/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET/CT Calibration Phantom || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8979242&amp;amp;icde=27036988&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R42CA167907] || Calibrated Methods For Quantitative Pet/Ct Imaging Phase Ii || Kinahan, Paul E. || 5/1/2012 || 7/1/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-ProstateBRP || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8906771&amp;amp;icde=27026518 5R01CA111288 ] || Enabling Technologies For Mri-Guided Prostate Interventions || Tempany, Clare M. || 12/1/2004 || 7/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-ProstateQIN || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8707214&amp;amp;icde=27026645 5U01CA151261] || Quantitative Mri Of Prostate Cancer As A Biomarker And Guide For Treatment || Fennessy, Fiona || 9/1/2010 || 7/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-QIICR || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8911287&amp;amp;icde=27026906 U24 CA180918] || [http://qiicr.org Quantitative Image Informatics for Cancer Research (QIICR)] || Kikinis, Fedorov || 9/4/2013 || 8/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-QIICR || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8911287&amp;amp;icde=27026906 5U24CA180918] || Quantitative Image Informatics For Cancer Research (Qiicr) || Kikinis, Ron || 9/1/2013 || 8/1/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Radiomics-U01 || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8799943&amp;amp;icde=27026470 1U01CA190234] || Genotype And Imaging Phenotype Biomarkers In Lung Cancer || Aerts, Hugo || 1/1/2015 || 12/1/2019&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8252988&amp;amp;icde=27037450&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R43CA165621] || Quantitative Ultrasound Analysis Of Vascular Morphology For Cancer Assessment || Aylward, Stephen R || 12/1/2012 || 8/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8384153&amp;amp;icde=27037397&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R01CA170665] || Micro-Tumor Detection By Quantifying Tumor-Induced Vascular Abnormalities || Dayton, Paul A. || 9/1/2012 || 6/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8453963&amp;amp;icde=27037364&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R41NS081792] || Multimodality Image-Based Assessment System For Traumatic Brain Injury || Aylward, Stephen R. || 1/1/2013 || 12/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8472102&amp;amp;icde=27037328&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R43EB016621] || In-Field Fast Procedure Support And Automation || Aylward, Stephen R. || 5/1/2013 || 4/1/2015&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;This table was generated by gathering all the grant information in a  [https://docs.google.com/spreadsheets/d/1f9Ik0uiO3dPkdnxsUc5Kq_ijV1Qi_gkmFV2uw7h9tq4/edit#gid=0 google doc].&lt;br /&gt;
The table was then exported to wiki format using the google doc add-on [https://chrome.google.com/webstore/detail/wikitableworks/fcidnbkcodoajhfbcaefikfemlggcpfp?utm_source=permalink '''WikiTableWorks'''].&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the table was then tweaked to:&lt;br /&gt;
* Make the table sortable: change the table class to &amp;quot;wikitable sortable&amp;quot;.&lt;br /&gt;
* Specifying the header: use &amp;quot;!&amp;quot; instead of &amp;quot;|&amp;quot; on the header line.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Acknowledgments&amp;diff=43349</id>
		<title>Documentation/Nightly/Acknowledgments</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Acknowledgments&amp;diff=43349"/>
		<updated>2015-11-11T20:23:18Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Grants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Citing Slicer ==&lt;br /&gt;
&lt;br /&gt;
To acknowledge 3D Slicer as a platform, please cite the Slicer web site (http://www.slicer.org) and the following publication when publishing work that uses or incorporates 3D SlicerL:&lt;br /&gt;
&lt;br /&gt;
Fedorov A., Beichel R., Kalpathy-Cramer J., Finet J., Fillion-Robin J-C., Pujol S., Bauer C., Jennings D., Fennessy F., Sonka M., Buatti J., Aylward S.R., Miller J.V., Pieper S., Kikinis R. [http://www.slicer.org/publications/item/view/2219 3D Slicer as an Image Computing Platform for the Quantitative Imaging Network]. Magn Reson Imaging. 2012 Nov;30(9):1323-41. PMID: 22770690.&lt;br /&gt;
==Major Contributors==&lt;br /&gt;
*Ron Kikinis: Principal Investigator&lt;br /&gt;
*Steve Pieper: Chief Architect&lt;br /&gt;
*Jean-Christophe Fillion-Robin: Lead Developer&lt;br /&gt;
*Nicole Aucoin&lt;br /&gt;
*Stephen Aylward&lt;br /&gt;
*Andrey Fedorov&lt;br /&gt;
*Noby Hata&lt;br /&gt;
*Hans Johnson&lt;br /&gt;
*Andras Lasso&lt;br /&gt;
*Jim Miller&lt;br /&gt;
*Sonia Pujol: Director of Training&lt;br /&gt;
*Junichi Tokuda&lt;br /&gt;
*Lauren O'Donnell&lt;br /&gt;
&lt;br /&gt;
==Groups==&lt;br /&gt;
*SPL: Ron Kikinis, Nicole Aucoin, Wendy Plesniak, Demian Wassermann, Isaiah Norton, Sonia Pujol, Noby Hata, Junichi Tokuda&lt;br /&gt;
*Isomics: Steve Pieper, Alex Yarmarkovich&lt;br /&gt;
*Kitware: Jean-Christophe Fillion-Robin, Julien Finet, Will Schroeder, Stephen Aylward&lt;br /&gt;
*U Iowa: Hans Johnson&lt;br /&gt;
*GE: Jim Miller&lt;br /&gt;
*Perk Lab, Queen's University: Andras Lasso, Tamas Ungi, Csaba Pinter, Gabor Fichtinger&lt;br /&gt;
&lt;br /&gt;
== Funding Sources ==&lt;br /&gt;
&lt;br /&gt;
=== Commercial partners ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.isomics.com/ Isomics] uses 3D Slicer in a variety of academic and commercial research partnerships in fields such as planning and guidance for neurosurgery, quantitative imaging for clinical trials, clinical image informatics.&lt;br /&gt;
&lt;br /&gt;
* [http://www.kitware.com/opensource/slicer.html Kitware] Integral to continuing to support the 3D Slicer community, Kitware is also offering consulting services in response to the rapidly growing demand for the development of proprietary applications and commercial products based on 3D Slicer. Kitware has used 3D Slicer to rapidly prototype solutions in nearly every aspect of medical imaging and is also collaborating on the development of commercial pre-clinical and clinical products based on 3D Slicer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#669&amp;quot;&amp;gt;&amp;lt;small&amp;gt;Listed in alphabetical order.&amp;lt;/small&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commercial Products Involving Slicer ===&lt;br /&gt;
&lt;br /&gt;
* [http://sonovol.com/ SonoVol] is developing a whole-body ultrasound imaging system for small animals. This start-up company arose from research in the Department of Biomedical Engineering at the University of North Carolina at Chapel Hill.&lt;br /&gt;
&lt;br /&gt;
* [http://www.xstrahl.com Xstrahl] is developing a Small Animal Radiation Research Platform (SARRP) that uses 3D Slicer as its front-end application for radiation therapy beam placement and system control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#669&amp;quot;&amp;gt;&amp;lt;small&amp;gt;Listed in alphabetical order.&amp;lt;/small&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grants ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Project Name''' || '''Grant Number and NIH Link''' || '''Title (and Project Page''') || '''Grant PIs''' || '''Start Date''' || '''End Date'''&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-CMF || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8576556&amp;amp;icde=18353487 1R01DE024450] || Quantification Of 3D Bony Changes In Temporomandibular Joint Osteoarthritis || Cevidanes, Lucia || 9/10/2013 || 8/31/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Craniosynostosis || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8778815&amp;amp;icde=27036063&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASCIMAGE-GUIDED 1R41HD081712] || Image-Guided Planning System For Skull Correction In Children With Craniosynostos || Linguraru, Marius George || 9/26/2014 || 8/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8971083&amp;amp;icde=27026834 1U01CA199459] || Open Source Diffusion Mri Technology For Brain Cancer Research || O'Donnell, Lauren Jean || 9/22/2015 || 7/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_details.cfm?aid=8855115&amp;amp;icde=27026518         2P41EB015898] || Image Guided Therapy Center || Tempany, Clare M || 4/1/2004 || 6/30/2020&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DiffusionMRI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8890837&amp;amp;icde=27036647&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 5P41EB015902] || Neuroimaging Analysis Center (Nac) || Kikinis, Ron || 8/1/2013 || 5/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Duke Prostate Registration || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8905274&amp;amp;icde=27036277&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R41CA196565] || Prostate Cancer Assessment Via Integrated 3D Arfi Elasticity Imaging And Multi-Parametric Mri || Palmeri, Mark L. || 4/1/2015 || 4/1/2015&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-DWI || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8817256&amp;amp;icde=27036729&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R01CA160902] || Advancement And Validation Of Prostate Diffusion And Spectroscopic Mri || Maier, Stephan E || 4/1/2012 || 2/28/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-NIRView (Dartmouth) || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8828624&amp;amp;icde=27036841&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 5R01CA184354] || Mri Fluorescence Tomography For Quantifying Tumor Receptor Concentration In Vivo || Davis, Scott C. || 4/1/2014 || 2/28/2019&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-OrthognathicTrac || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8710950&amp;amp;icde=27036891 1R43DE024334] || Real-Time Image Guidance For Improved Orthognathic Surgery || Enquobahrie, Andinet A. || 8/5/2014 || 7/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PediatricRadiologicDecisionSupport || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8272742&amp;amp;icde=13552329 1R01EB014947] || Mi2B2 Enabled Pediatric Radiological Decision Support || Murphy, Shawn N || 8/1/2012 || 7/31/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8863934&amp;amp;icde=27037113&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 3R42CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 9/1/2012 || 8/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=7999618&amp;amp;icde=27037084&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R41CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 7/1/2010 || 6/1/2012&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET-CT guided needle biopsy || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8390856&amp;amp;icde=27037039&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 2R42CA153488] || Improving Liver Lesion Biopsy In The Ct Suite Through Fusion With Pet Images || Cleary, Kevin R. || 9/1/2012 || 8/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET/CT Calibration Phantom || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8979242&amp;amp;icde=27036988&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 2R42CA167907] || Calibrated Methods For Quantitative Pet/Ct Imaging Phase Ii || Kinahan, Paul E || 5/1/2012 || 7/31/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-PET/CT Calibration Phantom || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8979242&amp;amp;icde=27036988&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC R42CA167907] || Calibrated Methods For Quantitative Pet/Ct Imaging Phase Ii || Kinahan, Paul E. || 5/1/2012 || 7/1/2017&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-ProstateBRP || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8906771&amp;amp;icde=27026518 5R01CA111288 ] || Enabling Technologies For Mri-Guided Prostate Interventions || Tempany, Clare M. || 12/1/2004 || 7/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-ProstateQIN || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8707214&amp;amp;icde=27026645 5U01CA151261] || Quantitative Mri Of Prostate Cancer As A Biomarker And Guide For Treatment || Fennessy, Fiona || 9/1/2010 || 7/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-QIICR || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8911287&amp;amp;icde=27026906 U24 CA180918] || [http://qiicr.org Quantitative Image Informatics for Cancer Research (QIICR)] || Kikinis, Fedorov || 9/4/2013 || 8/31/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-QIICR || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8911287&amp;amp;icde=27026906 5U24CA180918] || Quantitative Image Informatics For Cancer Research (Qiicr) || Kikinis, Ron || 9/1/2013 || 8/1/2018&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-Radiomics-U01 || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8799943&amp;amp;icde=27026470 1U01CA190234] || Genotype And Imaging Phenotype Biomarkers In Lung Cancer || Aerts, Hugo || 1/1/2015 || 12/1/2019&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8252988&amp;amp;icde=27037450&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R43CA165621] || Quantitative Ultrasound Analysis Of Vascular Morphology For Cancer Assessment || Aylward, Stephen R || 12/1/2012 || 8/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8384153&amp;amp;icde=27037397&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R01CA170665] || Micro-Tumor Detection By Quantifying Tumor-Induced Vascular Abnormalities || Dayton, Paul A. || 9/1/2012 || 6/1/2016&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8453963&amp;amp;icde=27037364&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R41NS081792] || Multimodality Image-Based Assessment System For Traumatic Brain Injury || Aylward, Stephen R. || 1/1/2013 || 12/1/2014&lt;br /&gt;
|-&lt;br /&gt;
| Slicer-TubeTK || [https://projectreporter.nih.gov/project_info_description.cfm?aid=8472102&amp;amp;icde=27037328&amp;amp;ddparam=&amp;amp;ddvalue=&amp;amp;ddsub=&amp;amp;cr=1&amp;amp;csb=default&amp;amp;cs=ASC 1R43EB016621] || In-Field Fast Procedure Support And Automation || Aylward, Stephen R. || 5/1/2013 || 4/1/2015&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Demo suggestion==&lt;br /&gt;
&lt;br /&gt;
spreadsheet: https://docs.google.com/spreadsheets/d/1f9Ik0uiO3dPkdnxsUc5Kq_ijV1Qi_gkmFV2uw7h9tq4/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
wiki table (scroll to the bottom): http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Acknowledgments#Demo_suggestion&lt;br /&gt;
&lt;br /&gt;
The table can be automatically generated later from modules metadata later, hopefully (at least, that should be doable)&lt;br /&gt;
&lt;br /&gt;
This converter can be used to go from .tsv exported google doc into wiki format:&lt;br /&gt;
&lt;br /&gt;
http://area23.brightbyte.de/csv2wp.php&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''Grant number and link'''&lt;br /&gt;
|'''Grant title and web page'''&lt;br /&gt;
|'''Grant PIs'''&lt;br /&gt;
|'''Institutions involved'''&lt;br /&gt;
|'''People involved'''&lt;br /&gt;
|'''Slicer modules/extensions/functionality contributed'''&lt;br /&gt;
|----&lt;br /&gt;
|[https://projectreporter.nih.gov/project_info_description.cfm?aid=8911287&amp;amp;amp;icde=27026906 U24 CA180918]&lt;br /&gt;
|[http://qiicr.org Quantitative Image Informatics for Cancer Research (QIICR)]&lt;br /&gt;
|Kikinis, Fedorov&lt;br /&gt;
|BWH, Iowa, MGH, OpenConnections, Isomics, Stony Brook&lt;br /&gt;
|Kikinis, Fedorov, Pieper, Beichel, Kalpathy-Cramer, Herz, Aucoin&lt;br /&gt;
|TCIABrowser, Reporting, DWModeling, SlicerProstate&lt;br /&gt;
|----&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/Units&amp;diff=31955</id>
		<title>Documentation/Labs/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/Units&amp;diff=31955"/>
		<updated>2013-06-10T19:35:32Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page summarize the on-going work related to the integration of units into Slicer.&lt;br /&gt;
&lt;br /&gt;
Page: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Units&lt;br /&gt;
&lt;br /&gt;
[http://www.na-mic.org/Bug/view.php?id=3137 3137] - GUI Redesign:&lt;br /&gt;
&lt;br /&gt;
*Work in progress, see [https://github.com/vovythevov/Slicer/tree/Units-SettingsRedesign-3137 Units-SettingsRedesign-3137] and [https://github.com/vovythevov/Slicer/tree/Units Units].&lt;br /&gt;
&lt;br /&gt;
[http://www.na-mic.org/Bug/view.php?id=3152 3152] - Scene close crash:&lt;br /&gt;
&lt;br /&gt;
*Work in progress, see [https://github.com/vovythevov/Slicer/tree/Units-SceneImportExport-3152 Units-SceneImportExport-3152].&lt;br /&gt;
&lt;br /&gt;
General Progress:&lt;br /&gt;
* Value scaled depending on current unit -&amp;gt; [https://github.com/vovythevov/Slicer/tree/Units Units].&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/Units&amp;diff=31954</id>
		<title>Documentation/Labs/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/Units&amp;diff=31954"/>
		<updated>2013-06-10T19:18:54Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page summarize the on-going work related to the integration of units into Slicer.&lt;br /&gt;
&lt;br /&gt;
Page: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Units&lt;br /&gt;
&lt;br /&gt;
[http://www.na-mic.org/Bug/view.php?id=3137 3137] - GUI Redesign:&lt;br /&gt;
&lt;br /&gt;
*Work in progress, see [https://github.com/vovythevov/Slicer/tree/Units-SettingsRedesign-3137 Units-SettingsRedesign-3137] and [https://github.com/vovythevov/Slicer/tree/Units Units].&lt;br /&gt;
&lt;br /&gt;
[http://www.na-mic.org/Bug/view.php?id=3152 3152] - Scene close crash:&lt;br /&gt;
&lt;br /&gt;
*Work in progress, see [https://github.com/vovythevov/Slicer/tree/Units-SceneImportExport-3152 Units-SceneImportExport-3152].&lt;br /&gt;
&lt;br /&gt;
General Progress:&lt;br /&gt;
* Value scaled depending on the unit -&amp;gt; [https://github.com/vovythevov/Slicer/tree/Units Units].&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=31815</id>
		<title>Documentation/Nightly/Developers/Style Guide</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=31815"/>
		<updated>2013-06-03T20:56:48Z</updated>

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

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

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=31812</id>
		<title>Documentation/Nightly/Developers/Style Guide</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=31812"/>
		<updated>2013-06-03T20:50:39Z</updated>

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

		<summary type="html">&lt;p&gt;Johan.andruejol: /* 4.3.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;nonumtoc&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
This page is a place to organize and prioritize development activities into a roadmap based on input of Slicer community and the needs of funded projects (NA-MIC, NAC, NCIGT, SlicerRT, etc...)&lt;br /&gt;
&lt;br /&gt;
The list of issues targeted for each release are reported on mantis: http://na-mic.org/Mantis/roadmap_page.php&lt;br /&gt;
&lt;br /&gt;
The topics listed below includes Slicer application and dependent ToolKit. For the specific strategy and feature lists covering modules and extensions, visit their respective roadmaps and other documentation.&lt;br /&gt;
&lt;br /&gt;
== Priorities ==&lt;br /&gt;
&lt;br /&gt;
=== As of February, 2013 ===&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/Labs/ITKv4|ITKv4 integration]]&lt;br /&gt;
* Ability to install python package using pip&lt;br /&gt;
* Improve extension catalog frontend&lt;br /&gt;
* Faster Slicer start time&lt;br /&gt;
* [http://www.na-mic.org/Bug/view.php?id=2039 Support of python command line module]&lt;br /&gt;
* Walk-thru documentation that clearly shows new developers step-by-step instructions to create and publish extensions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deprecation / API Changes roadmap ==&lt;br /&gt;
&lt;br /&gt;
List of deprecated methods / classes: http://slicer.org/doc/html/deprecated.html&lt;br /&gt;
&lt;br /&gt;
Mantis tag '''Deprecation''': http://www.na-mic.org/Bug/search.php?project_id=3&amp;amp;sticky_issues=on&amp;amp;sortby=last_updated&amp;amp;dir=DESC&amp;amp;hide_status_id=80&amp;amp;tag_string=Deprecation&lt;br /&gt;
&lt;br /&gt;
=== 4.4.0 ===&lt;br /&gt;
* Library - ITKv3 support will be removed from build system.&lt;br /&gt;
* CMake -  Minimum required CMake version will be 2.8.11 for all platforms.&lt;br /&gt;
* MRML - Default value for HideFromEditors will be change to False. See [http://www.na-mic.org/Bug/view.php?id=2906 #2906]&lt;br /&gt;
* Wigdets - Method &amp;lt;code&amp;gt;currentNodeId&amp;lt;/code&amp;gt; will be removed. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22059 22059].&lt;br /&gt;
&lt;br /&gt;
=== 4.3.0 ===&lt;br /&gt;
* const std::vector&amp;lt;vtkMRMLDisplayNode*&amp;gt;&amp;amp; vtkMRMLDisplayableNode::GetDisplayNodes(); - Obsolete utility function that provides an unsafe API. Please use GetNumberOfDisplayNodes() and GetNthDisplayNode() instead&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildQtModule&amp;lt;/code&amp;gt; will be renamed into &amp;lt;code&amp;gt;slicerMacroBuildLoadableModule&amp;lt;/code&amp;gt;. See [http://www.na-mic.org/Bug/view.php?id=2648 #2648]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildScriptedModule&amp;lt;/code&amp;gt; should be used to build Scripted modules. See [https://github.com/xtk/SlicerWebGLExport/blob/0cd62734ad809bfc87aa422939c9732360d119df/WebGLExport/CMakeLists.txt#L32-36 here] for an example.&lt;br /&gt;
* Rename / Move - &amp;lt;code&amp;gt;vtkSlicerTransformLogic&amp;lt;/code&amp;gt; will be renamed into &amp;lt;code&amp;gt;vtkSlicerTransformModuleLogic&amp;lt;/code&amp;gt; and moved into &amp;lt;code&amp;gt;Modules/Loadable/Transform/Logic&amp;lt;/code&amp;gt; - Consider updating the CMakeLists.txt and code of your modules. See instruction [[Documentation/Nightly/Developers/Tutorials/CreateLoadableModule#Dependency_between_modules|here]]. Associated issue [http://www.na-mic.org/Bug/view.php?id=2926 #2926]&lt;br /&gt;
* Library - ITKv3 support is deprecated / not maintained.&lt;br /&gt;
* Scripted module should be built using &amp;lt;code&amp;gt;SlicerMacroBuildScriptedModule&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ctkMacroCompilePythonScript&amp;lt;/code&amp;gt;. See [https://github.com/Slicer/Slicer/commits/master/CMake/SlicerMacroBuildScriptedModule.cmake here].&lt;br /&gt;
* Generic tests associated with Loadable and Scripted module should be built specifying the &amp;lt;code&amp;gt;WITH_GENERIC_TESTS&amp;lt;/code&amp;gt; option. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21768 r21768].&lt;br /&gt;
* Test driver associated with loadable module should be configured using &amp;lt;code&amp;gt;SlicerMacroConfigureModuleCxxTestDriver&amp;lt;/code&amp;gt;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21769 r21769].&lt;br /&gt;
* CMake - Minimum required CMake version will be 2.8.9 for Windows/Linux, CMake 2.8.11 for MacOSX - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21682 r21682] &lt;br /&gt;
* Library - ITKv4 will be enabled by default - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21688 r21688]&lt;br /&gt;
* Library - Qt 4.8.4 will be the recommended/required version&lt;br /&gt;
* Core - Removed unused class &amp;lt;code&amp;gt;Base/Logic/vtkSlicerROILogic&amp;lt;/code&amp;gt; - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21744 r21744]&lt;br /&gt;
* Move Editor icons from &amp;quot;Base/Logic&amp;quot; into &amp;quot;EditorLib/Resources/Icons&amp;quot;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21765 r21765]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicer_parse_arguments&amp;lt;/code&amp;gt; has been removed. Consider using &amp;lt;code&amp;gt;cmake_parse_arguments&amp;lt;/code&amp;gt; instead. See [http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:CMakeParseArguments CMakeParseArguments] - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21774 r21774]&lt;br /&gt;
* Slicer default Python version is &amp;lt;code&amp;gt;2.7.3&amp;lt;/code&amp;gt; - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21863 r21863], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21867 r21867], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21869 r21869], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21879 r21879], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21891 r21891]&lt;br /&gt;
* Python function PyRun_OpenFile/CloseFile have been removed. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21960 r21960]&lt;br /&gt;
* The &amp;lt;code&amp;gt;qMRMLNodeComboBox&amp;lt;/code&amp;gt; property &amp;lt;code&amp;gt;currentNodeId&amp;lt;/code&amp;gt; was renamed &amp;lt;code&amp;gt;currentNodeID&amp;lt;/code&amp;gt;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22052 22052]. The function &amp;lt;code&amp;gt;setCurrentNode(const QString &amp;amp;)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;currentNodeId()&amp;lt;/code&amp;gt; should be removed. See also [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22072 r22072].&lt;br /&gt;
==== SlicerExecutionModel ====&lt;br /&gt;
* CMake - CMake 2.8.4 will be required. Macro &amp;lt;code&amp;gt;Pre283CMakeParseArguments.cmake&amp;lt;/code&amp;gt; will be removed. See [https://github.com/jcfr/SlicerExecutionModel/commit/ce6205807d7a8ce1b4c486a5507c94876636bec1 ce620580]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildCLI&amp;lt;/code&amp;gt; will be removed. Use &amp;lt;code&amp;gt;SEMMacroBuildCLI&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
* CMake - Parameter &amp;lt;code&amp;gt;CLI_SHARED_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; of macro &amp;lt;code&amp;gt;SEMMacroBuildCLI&amp;lt;/code&amp;gt; is removed. Use &amp;lt;code&amp;gt;CLI_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
=== 4.2.0 ===&lt;br /&gt;
==== SlicerExecutionModel ====&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildCLI&amp;lt;/code&amp;gt; marked as deprecated. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21634 r21634] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=17781 r17781].&lt;br /&gt;
* CMake - Parameter &amp;lt;code&amp;gt;CLI_SHARED_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; of macro &amp;lt;code&amp;gt;slicerMacroBuildCLI / SEMMacroBuildCLI&amp;lt;/code&amp;gt; is deprecated. Use &amp;lt;code&amp;gt;CLI_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; instead.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Roadmap&amp;diff=31810</id>
		<title>Roadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Roadmap&amp;diff=31810"/>
		<updated>2013-06-03T19:49:07Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* 4.3.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;nonumtoc&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
This page is a place to organize and prioritize development activities into a roadmap based on input of Slicer community and the needs of funded projects (NA-MIC, NAC, NCIGT, SlicerRT, etc...)&lt;br /&gt;
&lt;br /&gt;
The list of issues targeted for each release are reported on mantis: http://na-mic.org/Mantis/roadmap_page.php&lt;br /&gt;
&lt;br /&gt;
The topics listed below includes Slicer application and dependent ToolKit. For the specific strategy and feature lists covering modules and extensions, visit their respective roadmaps and other documentation.&lt;br /&gt;
&lt;br /&gt;
== Priorities ==&lt;br /&gt;
&lt;br /&gt;
=== As of February, 2013 ===&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/Labs/ITKv4|ITKv4 integration]]&lt;br /&gt;
* Ability to install python package using pip&lt;br /&gt;
* Improve extension catalog frontend&lt;br /&gt;
* Faster Slicer start time&lt;br /&gt;
* [http://www.na-mic.org/Bug/view.php?id=2039 Support of python command line module]&lt;br /&gt;
* Walk-thru documentation that clearly shows new developers step-by-step instructions to create and publish extensions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deprecation / API Changes roadmap ==&lt;br /&gt;
&lt;br /&gt;
List of deprecated methods / classes: http://slicer.org/doc/html/deprecated.html&lt;br /&gt;
&lt;br /&gt;
Mantis tag '''Deprecation''': http://www.na-mic.org/Bug/search.php?project_id=3&amp;amp;sticky_issues=on&amp;amp;sortby=last_updated&amp;amp;dir=DESC&amp;amp;hide_status_id=80&amp;amp;tag_string=Deprecation&lt;br /&gt;
&lt;br /&gt;
=== 4.4.0 ===&lt;br /&gt;
* Library - ITKv3 support will be removed from build system.&lt;br /&gt;
* CMake -  Minimum required CMake version will be 2.8.11 for all platforms.&lt;br /&gt;
* MRML - Default value for HideFromEditors will be change to False. See [http://www.na-mic.org/Bug/view.php?id=2906 #2906]&lt;br /&gt;
* Wigdets - Method &amp;lt;code&amp;gt;currentNodeId&amp;lt;/code&amp;gt; will be removed. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22059 22059].&lt;br /&gt;
&lt;br /&gt;
=== 4.3.0 ===&lt;br /&gt;
* const std::vector&amp;lt;vtkMRMLDisplayNode*&amp;gt;&amp;amp; vtkMRMLDisplayableNode::GetDisplayNodes(); - Obsolete utility function that provides an unsafe API. Please use GetNumberOfDisplayNodes() and GetNthDisplayNode() instead&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildQtModule&amp;lt;/code&amp;gt; will be renamed into &amp;lt;code&amp;gt;slicerMacroBuildLoadableModule&amp;lt;/code&amp;gt;. See [http://www.na-mic.org/Bug/view.php?id=2648 #2648]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildScriptedModule&amp;lt;/code&amp;gt; should be used to build Scripted modules. See [https://github.com/xtk/SlicerWebGLExport/blob/0cd62734ad809bfc87aa422939c9732360d119df/WebGLExport/CMakeLists.txt#L32-36 here] for an example.&lt;br /&gt;
* Rename / Move - &amp;lt;code&amp;gt;vtkSlicerTransformLogic&amp;lt;/code&amp;gt; will be renamed into &amp;lt;code&amp;gt;vtkSlicerTransformModuleLogic&amp;lt;/code&amp;gt; and moved into &amp;lt;code&amp;gt;Modules/Loadable/Transform/Logic&amp;lt;/code&amp;gt; - Consider updating the CMakeLists.txt and code of your modules. See instruction [[Documentation/Nightly/Developers/Tutorials/CreateLoadableModule#Dependency_between_modules|here]]. Associated issue [http://www.na-mic.org/Bug/view.php?id=2926 #2926]&lt;br /&gt;
* Library - ITKv3 support is deprecated / not maintained.&lt;br /&gt;
* Scripted module should be built using &amp;lt;code&amp;gt;SlicerMacroBuildScriptedModule&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ctkMacroCompilePythonScript&amp;lt;/code&amp;gt;. See [https://github.com/Slicer/Slicer/commits/master/CMake/SlicerMacroBuildScriptedModule.cmake here].&lt;br /&gt;
* Generic tests associated with Loadable and Scripted module should be built specifying the &amp;lt;code&amp;gt;WITH_GENERIC_TESTS&amp;lt;/code&amp;gt; option. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21768 r21768].&lt;br /&gt;
* Test driver associated with loadable module should be configured using &amp;lt;code&amp;gt;SlicerMacroConfigureModuleCxxTestDriver&amp;lt;/code&amp;gt;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21769 r21769].&lt;br /&gt;
* CMake - Minimum required CMake version will be 2.8.9 for Windows/Linux, CMake 2.8.11 for MacOSX - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21682 r21682] &lt;br /&gt;
* Library - ITKv4 will be enabled by default - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21688 r21688]&lt;br /&gt;
* Library - Qt 4.8.4 will be the recommended/required version&lt;br /&gt;
* Core - Removed unused class &amp;lt;code&amp;gt;Base/Logic/vtkSlicerROILogic&amp;lt;/code&amp;gt; - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21744 r21744]&lt;br /&gt;
* Move Editor icons from &amp;quot;Base/Logic&amp;quot; into &amp;quot;EditorLib/Resources/Icons&amp;quot;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21765 r21765]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicer_parse_arguments&amp;lt;/code&amp;gt; has been removed. Consider using &amp;lt;code&amp;gt;cmake_parse_arguments&amp;lt;/code&amp;gt; instead. See [http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:CMakeParseArguments CMakeParseArguments] - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21774 r21774]&lt;br /&gt;
* Slicer default Python version is &amp;lt;code&amp;gt;2.7.3&amp;lt;/code&amp;gt; - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21863 r21863], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21867 r21867], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21869 r21869], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21879 r21879], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21891 r21891]&lt;br /&gt;
* Python function PyRun_OpenFile/CloseFile have been removed. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21960 r21960]&lt;br /&gt;
* The &amp;lt;code&amp;gt;qMRMLNodeComboBox&amp;lt;/code&amp;gt; property &amp;lt;code&amp;gt;currentNodeId&amp;lt;/code&amp;gt; was renamed &amp;lt;code&amp;gt;currentNodeID&amp;lt;/code&amp;gt;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22052 22052]. The function &amp;lt;code&amp;gt;setCurrentNode(const QString &amp;amp;)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;currentNodeId()&amp;lt;/code&amp;gt; should be removed. (See also [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22072 r22072].&lt;br /&gt;
==== SlicerExecutionModel ====&lt;br /&gt;
* CMake - CMake 2.8.4 will be required. Macro &amp;lt;code&amp;gt;Pre283CMakeParseArguments.cmake&amp;lt;/code&amp;gt; will be removed. See [https://github.com/jcfr/SlicerExecutionModel/commit/ce6205807d7a8ce1b4c486a5507c94876636bec1 ce620580]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildCLI&amp;lt;/code&amp;gt; will be removed. Use &amp;lt;code&amp;gt;SEMMacroBuildCLI&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
* CMake - Parameter &amp;lt;code&amp;gt;CLI_SHARED_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; of macro &amp;lt;code&amp;gt;SEMMacroBuildCLI&amp;lt;/code&amp;gt; is removed. Use &amp;lt;code&amp;gt;CLI_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
=== 4.2.0 ===&lt;br /&gt;
==== SlicerExecutionModel ====&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildCLI&amp;lt;/code&amp;gt; marked as deprecated. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21634 r21634] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=17781 r17781].&lt;br /&gt;
* CMake - Parameter &amp;lt;code&amp;gt;CLI_SHARED_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; of macro &amp;lt;code&amp;gt;slicerMacroBuildCLI / SEMMacroBuildCLI&amp;lt;/code&amp;gt; is deprecated. Use &amp;lt;code&amp;gt;CLI_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; instead.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=31807</id>
		<title>Documentation/Nightly/Developers/Style Guide</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Style_Guide&amp;diff=31807"/>
		<updated>2013-06-03T18:49:29Z</updated>

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

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

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

		<summary type="html">&lt;p&gt;Johan.andruejol: uploaded a new version of &amp;quot;File:GeneralSettings.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:GeneralSettings.png&amp;diff=31782</id>
		<title>File:GeneralSettings.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:GeneralSettings.png&amp;diff=31782"/>
		<updated>2013-05-29T22:31:39Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: uploaded a new version of &amp;quot;File:GeneralSettings.png&amp;quot;:&amp;amp;#32;Add units to the general settings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:GeneralSettings.png&amp;diff=31781</id>
		<title>File:GeneralSettings.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:GeneralSettings.png&amp;diff=31781"/>
		<updated>2013-05-29T22:29:31Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: uploaded a new version of &amp;quot;File:GeneralSettings.png&amp;quot;:&amp;amp;#32;New version to integrate unit addition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/ApplicationSettings&amp;diff=31780</id>
		<title>Documentation/Nightly/SlicerApplication/ApplicationSettings</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/ApplicationSettings&amp;diff=31780"/>
		<updated>2013-05-29T22:28:39Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Units */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Panels=&lt;br /&gt;
==General==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:GeneralSettings.png|thumb|400px|General settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Modules==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
===Skip Loading of===&lt;br /&gt;
Select which [[Documentation/{{documentation/version}}/Developers/Modules|type of modules]] to not load at startup. It is also possible to start slicer by temporarily disabling those modules (not saved in settings) by passing the arguments in the command line.&lt;br /&gt;
&lt;br /&gt;
For example &amp;lt;code&amp;gt;$ .\Slicer.exe --disable-cli-modules&amp;lt;/code&amp;gt; will start Slicer without any CLI loaded.&lt;br /&gt;
&lt;br /&gt;
===Prefer Executable CLIs===&lt;br /&gt;
Use the executable version of a CLI instead of its shared version. CLI modules typically come in 2 forms, as shared (dll)and as executable (exe). By default, if there is a shared version, it is the one loaded by Slicer, ignoring the executable version. Loading a shared runs the module faster but increases the memory consumption. For some configurations (e.g. Windows 32b), memory is critical. Toggling this option to ON skips the loading of shared CLIs and loads executable version of CLIs instead. If there is no executable for a given CLI, the shared version is used.&lt;br /&gt;
&lt;br /&gt;
===Show hidden modules===&lt;br /&gt;
Some modules don't have a user interface, they are hidden from the module's list. For debugging purpose, it is possible to force their display&lt;br /&gt;
&lt;br /&gt;
===Temporary directory===&lt;br /&gt;
Directory where modules can store their temporary outputs if needed.&lt;br /&gt;
&lt;br /&gt;
===Additional module paths===&lt;br /&gt;
List of directories scanned at startup to load additional modules. Any CLI, Loadable or scripted modules located in these paths will be loaded. Extensions are listed in the list, to remove an extension, use the Extension Manager instead.&lt;br /&gt;
&lt;br /&gt;
===Modules===&lt;br /&gt;
List of modules loaded, ignored or failed to load in Slicer. An unchecked checkbox indicates that module should not be loaded (ignored) next time Slicer starts. A text color code is used to describe the state of each module:&lt;br /&gt;
** Black: module successfully loaded in Slicer&lt;br /&gt;
** Gray: module not loaded because it has been ignored (unchecked)&lt;br /&gt;
** Red: module failed to load. There are multiple reasons why a module can fail to load. Look at startup [[Documentation/{{documentation/version}}/SlicerApplication/ErrorLog|log outputs]] to have more informations.&lt;br /&gt;
If a module is not loaded in Slicer (ignored or failed), all dependent modules won't be loaded. You can verify the dependencies of a module in the tooltip of the module.&lt;br /&gt;
&lt;br /&gt;
You can filter the list of modules by untoggling in the advanced (&amp;gt;&amp;gt;) panel the &amp;quot;To Load&amp;quot;, &amp;quot;To Ignore&amp;quot;, &amp;quot;Loaded&amp;quot;, &amp;quot;Ignored&amp;quot; and &amp;quot;Failed&amp;quot; buttons.&lt;br /&gt;
&lt;br /&gt;
===Home===&lt;br /&gt;
Module that is shown when Slicer starts up.&lt;br /&gt;
&lt;br /&gt;
===Favorites===&lt;br /&gt;
List of modules that appear in the Favorites toolbar.&lt;br /&gt;
[[Image:FavoritesToolbar.png|Favorites toolbar]]&lt;br /&gt;
To add a module, drag&amp;amp;drop it from the ''Modules'' list above. Then use the advanced panel (&amp;gt;&amp;gt;) to reorganize/delete the modules within the toolbar.&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:ModulesSettings.png|thumb|400px|Modules settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Extensions==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:ExtensionsSettings.png|thumb|400px|Extensions settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Cache==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:CacheSettings.png|thumb|400px|Cache settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Python==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:PythonSettings.png|thumb|400px|Python settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Units==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:UnitsSettings.png|thumb|400px|Units settins panel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Volume Rendering==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:VolumeRenderingSettings.png|thumb|400px|Volume Rendering settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
== Others ==&lt;br /&gt;
Extensions can also add their own settings panel.&lt;br /&gt;
&lt;br /&gt;
= Information for Advanced Users =&lt;br /&gt;
Settings are stored in an *.ini file located:&lt;br /&gt;
* Windows: C:\Users\USERNAME\AppData\Roaming\NA-MIC\Slicer.ini&lt;br /&gt;
* Linux: ~/.config/NA-MIC/Slicer.ini&lt;br /&gt;
* Mac: ~/.config/www.na-mic.org/Slicer.ini&lt;br /&gt;
Deleting the file restores all the settings to default.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:UnitsSettings.png&amp;diff=31779</id>
		<title>File:UnitsSettings.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:UnitsSettings.png&amp;diff=31779"/>
		<updated>2013-05-29T22:28:10Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/ApplicationSettings&amp;diff=31778</id>
		<title>Documentation/Nightly/SlicerApplication/ApplicationSettings</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/ApplicationSettings&amp;diff=31778"/>
		<updated>2013-05-29T22:27:55Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Panels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Panels=&lt;br /&gt;
==General==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:GeneralSettings.png|thumb|400px|General settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Modules==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
===Skip Loading of===&lt;br /&gt;
Select which [[Documentation/{{documentation/version}}/Developers/Modules|type of modules]] to not load at startup. It is also possible to start slicer by temporarily disabling those modules (not saved in settings) by passing the arguments in the command line.&lt;br /&gt;
&lt;br /&gt;
For example &amp;lt;code&amp;gt;$ .\Slicer.exe --disable-cli-modules&amp;lt;/code&amp;gt; will start Slicer without any CLI loaded.&lt;br /&gt;
&lt;br /&gt;
===Prefer Executable CLIs===&lt;br /&gt;
Use the executable version of a CLI instead of its shared version. CLI modules typically come in 2 forms, as shared (dll)and as executable (exe). By default, if there is a shared version, it is the one loaded by Slicer, ignoring the executable version. Loading a shared runs the module faster but increases the memory consumption. For some configurations (e.g. Windows 32b), memory is critical. Toggling this option to ON skips the loading of shared CLIs and loads executable version of CLIs instead. If there is no executable for a given CLI, the shared version is used.&lt;br /&gt;
&lt;br /&gt;
===Show hidden modules===&lt;br /&gt;
Some modules don't have a user interface, they are hidden from the module's list. For debugging purpose, it is possible to force their display&lt;br /&gt;
&lt;br /&gt;
===Temporary directory===&lt;br /&gt;
Directory where modules can store their temporary outputs if needed.&lt;br /&gt;
&lt;br /&gt;
===Additional module paths===&lt;br /&gt;
List of directories scanned at startup to load additional modules. Any CLI, Loadable or scripted modules located in these paths will be loaded. Extensions are listed in the list, to remove an extension, use the Extension Manager instead.&lt;br /&gt;
&lt;br /&gt;
===Modules===&lt;br /&gt;
List of modules loaded, ignored or failed to load in Slicer. An unchecked checkbox indicates that module should not be loaded (ignored) next time Slicer starts. A text color code is used to describe the state of each module:&lt;br /&gt;
** Black: module successfully loaded in Slicer&lt;br /&gt;
** Gray: module not loaded because it has been ignored (unchecked)&lt;br /&gt;
** Red: module failed to load. There are multiple reasons why a module can fail to load. Look at startup [[Documentation/{{documentation/version}}/SlicerApplication/ErrorLog|log outputs]] to have more informations.&lt;br /&gt;
If a module is not loaded in Slicer (ignored or failed), all dependent modules won't be loaded. You can verify the dependencies of a module in the tooltip of the module.&lt;br /&gt;
&lt;br /&gt;
You can filter the list of modules by untoggling in the advanced (&amp;gt;&amp;gt;) panel the &amp;quot;To Load&amp;quot;, &amp;quot;To Ignore&amp;quot;, &amp;quot;Loaded&amp;quot;, &amp;quot;Ignored&amp;quot; and &amp;quot;Failed&amp;quot; buttons.&lt;br /&gt;
&lt;br /&gt;
===Home===&lt;br /&gt;
Module that is shown when Slicer starts up.&lt;br /&gt;
&lt;br /&gt;
===Favorites===&lt;br /&gt;
List of modules that appear in the Favorites toolbar.&lt;br /&gt;
[[Image:FavoritesToolbar.png|Favorites toolbar]]&lt;br /&gt;
To add a module, drag&amp;amp;drop it from the ''Modules'' list above. Then use the advanced panel (&amp;gt;&amp;gt;) to reorganize/delete the modules within the toolbar.&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:ModulesSettings.png|thumb|400px|Modules settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Extensions==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:ExtensionsSettings.png|thumb|400px|Extensions settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Cache==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:CacheSettings.png|thumb|400px|Cache settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Python==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:PythonSettings.png|thumb|400px|Python settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Units==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:UnitsSettings.png|thumb|400px|Units panel]]&lt;br /&gt;
|}&lt;br /&gt;
==Volume Rendering==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[Image:VolumeRenderingSettings.png|thumb|400px|Volume Rendering settings panel]]&lt;br /&gt;
|}&lt;br /&gt;
== Others ==&lt;br /&gt;
Extensions can also add their own settings panel.&lt;br /&gt;
&lt;br /&gt;
= Information for Advanced Users =&lt;br /&gt;
Settings are stored in an *.ini file located:&lt;br /&gt;
* Windows: C:\Users\USERNAME\AppData\Roaming\NA-MIC\Slicer.ini&lt;br /&gt;
* Linux: ~/.config/NA-MIC/Slicer.ini&lt;br /&gt;
* Mac: ~/.config/www.na-mic.org/Slicer.ini&lt;br /&gt;
Deleting the file restores all the settings to default.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Roadmap&amp;diff=31775</id>
		<title>Roadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Roadmap&amp;diff=31775"/>
		<updated>2013-05-29T19:34:25Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* 4.4.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;nonumtoc&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
This page is a place to organize and prioritize development activities into a roadmap based on input of Slicer community and the needs of funded projects (NA-MIC, NAC, NCIGT, SlicerRT, etc...)&lt;br /&gt;
&lt;br /&gt;
The list of issues targeted for each release are reported on mantis: http://na-mic.org/Mantis/roadmap_page.php&lt;br /&gt;
&lt;br /&gt;
The topics listed below includes Slicer application and dependent ToolKit. For the specific strategy and feature lists covering modules and extensions, visit their respective roadmaps and other documentation.&lt;br /&gt;
&lt;br /&gt;
== Priorities ==&lt;br /&gt;
&lt;br /&gt;
=== As of February, 2013 ===&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/Labs/ITKv4|ITKv4 integration]]&lt;br /&gt;
* Ability to install python package using pip&lt;br /&gt;
* Improve extension catalog frontend&lt;br /&gt;
* Faster Slicer start time&lt;br /&gt;
* [http://www.na-mic.org/Bug/view.php?id=2039 Support of python command line module]&lt;br /&gt;
* Walk-thru documentation that clearly shows new developers step-by-step instructions to create and publish extensions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deprecation / API Changes roadmap ==&lt;br /&gt;
&lt;br /&gt;
List of deprecated methods / classes: http://slicer.org/doc/html/deprecated.html&lt;br /&gt;
&lt;br /&gt;
Mantis tag '''Deprecation''': http://www.na-mic.org/Bug/search.php?project_id=3&amp;amp;sticky_issues=on&amp;amp;sortby=last_updated&amp;amp;dir=DESC&amp;amp;hide_status_id=80&amp;amp;tag_string=Deprecation&lt;br /&gt;
&lt;br /&gt;
=== 4.4.0 ===&lt;br /&gt;
* Library - ITKv3 support will be removed from build system.&lt;br /&gt;
* CMake -  Minimum required CMake version will be 2.8.11 for all platforms.&lt;br /&gt;
* MRML - Default value for HideFromEditors will be change to False. See [http://www.na-mic.org/Bug/view.php?id=2906 #2906]&lt;br /&gt;
* Wigdets - Method &amp;lt;code&amp;gt;currentNodeId&amp;lt;/code&amp;gt; will be removed. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22059 22059].&lt;br /&gt;
&lt;br /&gt;
=== 4.3.0 ===&lt;br /&gt;
* const std::vector&amp;lt;vtkMRMLDisplayNode*&amp;gt;&amp;amp; vtkMRMLDisplayableNode::GetDisplayNodes(); - Obsolete utility function that provides an unsafe API. Please use GetNumberOfDisplayNodes() and GetNthDisplayNode() instead&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildQtModule&amp;lt;/code&amp;gt; will be renamed into &amp;lt;code&amp;gt;slicerMacroBuildLoadableModule&amp;lt;/code&amp;gt;. See [http://www.na-mic.org/Bug/view.php?id=2648 #2648]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildScriptedModule&amp;lt;/code&amp;gt; should be used to build Scripted modules. See [https://github.com/xtk/SlicerWebGLExport/blob/0cd62734ad809bfc87aa422939c9732360d119df/WebGLExport/CMakeLists.txt#L32-36 here] for an example.&lt;br /&gt;
* Rename / Move - &amp;lt;code&amp;gt;vtkSlicerTransformLogic&amp;lt;/code&amp;gt; will be renamed into &amp;lt;code&amp;gt;vtkSlicerTransformModuleLogic&amp;lt;/code&amp;gt; and moved into &amp;lt;code&amp;gt;Modules/Loadable/Transform/Logic&amp;lt;/code&amp;gt; - Consider updating the CMakeLists.txt and code of your modules. See instruction [[Documentation/Nightly/Developers/Tutorials/CreateLoadableModule#Dependency_between_modules|here]]. Associated issue [http://www.na-mic.org/Bug/view.php?id=2926 #2926]&lt;br /&gt;
* Library - ITKv3 support is deprecated / not maintained.&lt;br /&gt;
* Scripted module should be built using &amp;lt;code&amp;gt;SlicerMacroBuildScriptedModule&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ctkMacroCompilePythonScript&amp;lt;/code&amp;gt;. See [https://github.com/Slicer/Slicer/commits/master/CMake/SlicerMacroBuildScriptedModule.cmake here].&lt;br /&gt;
* Generic tests associated with Loadable and Scripted module should be built specifying the &amp;lt;code&amp;gt;WITH_GENERIC_TESTS&amp;lt;/code&amp;gt; option. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21768 r21768].&lt;br /&gt;
* Test driver associated with loadable module should be configured using &amp;lt;code&amp;gt;SlicerMacroConfigureModuleCxxTestDriver&amp;lt;/code&amp;gt;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21769 r21769].&lt;br /&gt;
* The &amp;lt;code&amp;gt;qMRMLNodeComboBox&amp;lt;/code&amp;gt; property &amp;lt;code&amp;gt;currentNodeId&amp;lt;/code&amp;gt; was renamed &amp;lt;code&amp;gt;currentNodeID&amp;lt;/code&amp;gt;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22052 22052].&lt;br /&gt;
* CMake - Minimum required CMake version will be 2.8.9 for Windows/Linux, CMake 2.8.11 for MacOSX - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21682 r21682] &lt;br /&gt;
* Library - ITKv4 will be enabled by default - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21688 r21688]&lt;br /&gt;
* Library - Qt 4.8.4 will be the recommended/required version&lt;br /&gt;
* Core - Removed unused class &amp;lt;code&amp;gt;Base/Logic/vtkSlicerROILogic&amp;lt;/code&amp;gt; - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21744 r21744]&lt;br /&gt;
* Move Editor icons from &amp;quot;Base/Logic&amp;quot; into &amp;quot;EditorLib/Resources/Icons&amp;quot;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21765 r21765]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicer_parse_arguments&amp;lt;/code&amp;gt; has been removed. Consider using &amp;lt;code&amp;gt;cmake_parse_arguments&amp;lt;/code&amp;gt; instead. See [http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:CMakeParseArguments CMakeParseArguments] - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21774 r21774]&lt;br /&gt;
* Slicer default Python version is &amp;lt;code&amp;gt;2.7.3&amp;lt;/code&amp;gt; - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21863 r21863], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21867 r21867], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21869 r21869], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21879 r21879], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21891 r21891]&lt;br /&gt;
* Python function PyRun_OpenFile/CloseFile have been removed. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21960 r21960]&lt;br /&gt;
==== SlicerExecutionModel ====&lt;br /&gt;
* CMake - CMake 2.8.4 will be required. Macro &amp;lt;code&amp;gt;Pre283CMakeParseArguments.cmake&amp;lt;/code&amp;gt; will be removed. See [https://github.com/jcfr/SlicerExecutionModel/commit/ce6205807d7a8ce1b4c486a5507c94876636bec1 ce620580]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildCLI&amp;lt;/code&amp;gt; will be removed. Use &amp;lt;code&amp;gt;SEMMacroBuildCLI&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
* CMake - Parameter &amp;lt;code&amp;gt;CLI_SHARED_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; of macro &amp;lt;code&amp;gt;SEMMacroBuildCLI&amp;lt;/code&amp;gt; is removed. Use &amp;lt;code&amp;gt;CLI_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
=== 4.2.0 ===&lt;br /&gt;
==== SlicerExecutionModel ====&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildCLI&amp;lt;/code&amp;gt; marked as deprecated. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21634 r21634] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=17781 r17781].&lt;br /&gt;
* CMake - Parameter &amp;lt;code&amp;gt;CLI_SHARED_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; of macro &amp;lt;code&amp;gt;slicerMacroBuildCLI / SEMMacroBuildCLI&amp;lt;/code&amp;gt; is deprecated. Use &amp;lt;code&amp;gt;CLI_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; instead.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Roadmap&amp;diff=31773</id>
		<title>Roadmap</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Roadmap&amp;diff=31773"/>
		<updated>2013-05-29T17:39:28Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* 4.3.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;nonumtoc&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
This page is a place to organize and prioritize development activities into a roadmap based on input of Slicer community and the needs of funded projects (NA-MIC, NAC, NCIGT, SlicerRT, etc...)&lt;br /&gt;
&lt;br /&gt;
The list of issues targeted for each release are reported on mantis: http://na-mic.org/Mantis/roadmap_page.php&lt;br /&gt;
&lt;br /&gt;
The topics listed below includes Slicer application and dependent ToolKit. For the specific strategy and feature lists covering modules and extensions, visit their respective roadmaps and other documentation.&lt;br /&gt;
&lt;br /&gt;
== Priorities ==&lt;br /&gt;
&lt;br /&gt;
=== As of February, 2013 ===&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/Labs/ITKv4|ITKv4 integration]]&lt;br /&gt;
* Ability to install python package using pip&lt;br /&gt;
* Improve extension catalog frontend&lt;br /&gt;
* Faster Slicer start time&lt;br /&gt;
* [http://www.na-mic.org/Bug/view.php?id=2039 Support of python command line module]&lt;br /&gt;
* Walk-thru documentation that clearly shows new developers step-by-step instructions to create and publish extensions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deprecation roadmap ==&lt;br /&gt;
&lt;br /&gt;
List of deprecated methods / classes: http://slicer.org/doc/html/deprecated.html&lt;br /&gt;
&lt;br /&gt;
Mantis tag '''Deprecation''': http://www.na-mic.org/Bug/search.php?project_id=3&amp;amp;sticky_issues=on&amp;amp;sortby=last_updated&amp;amp;dir=DESC&amp;amp;hide_status_id=80&amp;amp;tag_string=Deprecation&lt;br /&gt;
&lt;br /&gt;
=== 4.4.0 ===&lt;br /&gt;
* Library - ITKv3 support will be removed from build system.&lt;br /&gt;
&lt;br /&gt;
=== 4.3.0 ===&lt;br /&gt;
* const std::vector&amp;lt;vtkMRMLDisplayNode*&amp;gt;&amp;amp; vtkMRMLDisplayableNode::GetDisplayNodes(); - Obsolete utility function that provides an unsafe API. Please use GetNumberOfDisplayNodes() and GetNthDisplayNode() instead&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildQtModule&amp;lt;/code&amp;gt; will be renamed into &amp;lt;code&amp;gt;slicerMacroBuildLoadableModule&amp;lt;/code&amp;gt;. See [http://www.na-mic.org/Bug/view.php?id=2648 #2648]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildScriptedModule&amp;lt;/code&amp;gt; should be used to build Scripted modules. See [https://github.com/xtk/SlicerWebGLExport/blob/0cd62734ad809bfc87aa422939c9732360d119df/WebGLExport/CMakeLists.txt#L32-36 here] for an example.&lt;br /&gt;
* Rename / Move - &amp;lt;code&amp;gt;vtkSlicerTransformLogic&amp;lt;/code&amp;gt; will be renamed into &amp;lt;code&amp;gt;vtkSlicerTransformModuleLogic&amp;lt;/code&amp;gt; and moved into &amp;lt;code&amp;gt;Modules/Loadable/Transform/Logic&amp;lt;/code&amp;gt; - Consider updating the CMakeLists.txt and code of your modules. See instruction [[Documentation/Nightly/Developers/Tutorials/CreateLoadableModule#Dependency_between_modules|here]]. Associated issue [http://www.na-mic.org/Bug/view.php?id=2926 #2926]&lt;br /&gt;
* Library - ITKv3 support is deprecated / not maintained.&lt;br /&gt;
* Scripted module should be built using &amp;lt;code&amp;gt;SlicerMacroBuildScriptedModule&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ctkMacroCompilePythonScript&amp;lt;/code&amp;gt;. See [https://github.com/Slicer/Slicer/commits/master/CMake/SlicerMacroBuildScriptedModule.cmake here].&lt;br /&gt;
* Generic tests associated with Loadable and Scripted module should be built specifying the &amp;lt;code&amp;gt;WITH_GENERIC_TESTS&amp;lt;/code&amp;gt; option. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21768 r21768].&lt;br /&gt;
* Test driver associated with loadable module should be configured using &amp;lt;code&amp;gt;SlicerMacroConfigureModuleCxxTestDriver&amp;lt;/code&amp;gt;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21769 r21769].&lt;br /&gt;
* The &amp;lt;code&amp;gt;qMRMLNodeComboBox&amp;lt;/code&amp;gt; property &amp;lt;code&amp;gt;currentNodeId&amp;lt;/code&amp;gt; was renamed &amp;lt;code&amp;gt;currentNodeID&amp;lt;/code&amp;gt;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=22052 22052].&lt;br /&gt;
==== SlicerExecutionModel ====&lt;br /&gt;
* CMake - CMake 2.8.4 will be required. Macro &amp;lt;code&amp;gt;Pre283CMakeParseArguments.cmake&amp;lt;/code&amp;gt; will be removed. See [https://github.com/jcfr/SlicerExecutionModel/commit/ce6205807d7a8ce1b4c486a5507c94876636bec1 ce620580]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildCLI&amp;lt;/code&amp;gt; will be removed. Use &amp;lt;code&amp;gt;SEMMacroBuildCLI&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
* CMake - Parameter &amp;lt;code&amp;gt;CLI_SHARED_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; of macro &amp;lt;code&amp;gt;SEMMacroBuildCLI&amp;lt;/code&amp;gt; is removed. Use &amp;lt;code&amp;gt;CLI_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
=== 4.2.0 ===&lt;br /&gt;
==== SlicerExecutionModel ====&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicerMacroBuildCLI&amp;lt;/code&amp;gt; marked as deprecated. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21634 r21634] and [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=17781 r17781].&lt;br /&gt;
* CMake - Parameter &amp;lt;code&amp;gt;CLI_SHARED_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; of macro &amp;lt;code&amp;gt;slicerMacroBuildCLI / SEMMacroBuildCLI&amp;lt;/code&amp;gt; is deprecated. Use &amp;lt;code&amp;gt;CLI_LIBRARY_WRAPPER_CXX&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
== API Changes roadmap ==&lt;br /&gt;
=== 4.4.0 ===&lt;br /&gt;
* CMake -  Minimum required CMake version will be 2.8.11 for all platforms.&lt;br /&gt;
* MRML - Default value for HideFromEditors will be change to False. See [http://www.na-mic.org/Bug/view.php?id=2906 #2906]&lt;br /&gt;
&lt;br /&gt;
=== 4.3.0 ===&lt;br /&gt;
* CMake - Minimum required CMake version will be 2.8.9 for Windows/Linux, CMake 2.8.11 for MacOSX - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21682 r21682] &lt;br /&gt;
* Library - ITKv4 will be enabled by default - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21688 r21688]&lt;br /&gt;
* Library - Qt 4.8.4 will be the recommended/required version&lt;br /&gt;
* Core - Removed unused class &amp;lt;code&amp;gt;Base/Logic/vtkSlicerROILogic&amp;lt;/code&amp;gt; - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21744 r21744]&lt;br /&gt;
* Move Editor icons from &amp;quot;Base/Logic&amp;quot; into &amp;quot;EditorLib/Resources/Icons&amp;quot;. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21765 r21765]&lt;br /&gt;
* CMake - Macro &amp;lt;code&amp;gt;slicer_parse_arguments&amp;lt;/code&amp;gt; has been removed. Consider using &amp;lt;code&amp;gt;cmake_parse_arguments&amp;lt;/code&amp;gt; instead. See [http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:CMakeParseArguments CMakeParseArguments] - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21774 r21774]&lt;br /&gt;
* Slicer default Python version is &amp;lt;code&amp;gt;2.7.3&amp;lt;/code&amp;gt; - See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21863 r21863], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21867 r21867], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21869 r21869], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21879 r21879], [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21891 r21891]&lt;br /&gt;
* Python function PyRun_OpenFile/CloseFile have been removed. See [http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;amp;revision=21960 r21960]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31768</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31768"/>
		<updated>2013-05-28T21:05:36Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. These unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate units in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based on the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when a unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example, the name of a length unit can be Millimeter, Meter, Centimeter... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example the quantity of second and day is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61.&lt;br /&gt;
* '''Prefix/Suffix''': Abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If a unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
=== Quantity ===&lt;br /&gt;
These widget derive directly from their CTK counterpart and only add two methods.&lt;br /&gt;
*''SetMRMLScene()'' (which is expected for a ''qMRMLWidget'') so they can observe the selection node ''UnitModifiedEvent''&lt;br /&gt;
*The &amp;quot;quantity&amp;quot; property. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;br /&gt;
&lt;br /&gt;
=== Customization ===&lt;br /&gt;
In the case where one doesn't want all the parameters of its spinbox controled by the current unit node, one can choose which properties will be updated by setting the ''unitAwareProperties'' flag.&lt;br /&gt;
&lt;br /&gt;
[[Image:qMRMLSpinBoxInTheDesigner.png|600px|qMRMLSpinBox in the designer]]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31766</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31766"/>
		<updated>2013-05-28T18:04:58Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Customization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. These unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate units in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based on the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when a unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example, the name of a length unit can be Milimetre, Metre, CentiMetre... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example the quantity of second and day is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61.&lt;br /&gt;
* '''Prefix/Suffix''': Abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If a unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
=== Quantity ===&lt;br /&gt;
These widget derive directly from their CTK counterpart and only add two methods.&lt;br /&gt;
*''SetMRMLScene()'' (which is expected for a ''qMRMLWidget'') so they can observe the selection node ''UnitModifiedEvent''&lt;br /&gt;
*The &amp;quot;quantity&amp;quot; property. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;br /&gt;
&lt;br /&gt;
=== Customization ===&lt;br /&gt;
In the case where one doesn't want all the parameters of its spinbox controled by the current unit node, one can choose which properties will be updated by setting the ''unitAwareProperties'' flag.&lt;br /&gt;
&lt;br /&gt;
[[Image:qMRMLSpinBoxInTheDesigner.png|600px|qMRMLSpinBox in the designer]]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:QMRMLSpinBoxInTheDesigner.png&amp;diff=31765</id>
		<title>File:QMRMLSpinBoxInTheDesigner.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:QMRMLSpinBoxInTheDesigner.png&amp;diff=31765"/>
		<updated>2013-05-28T18:04:35Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31764</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31764"/>
		<updated>2013-05-28T18:04:24Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* In the GUI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. These unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate units in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based on the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when a unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example, the name of a length unit can be Milimetre, Metre, CentiMetre... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example the quantity of second and day is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61.&lt;br /&gt;
* '''Prefix/Suffix''': Abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If a unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
=== Quantity ===&lt;br /&gt;
These widget derive directly from their CTK counterpart and only add two methods.&lt;br /&gt;
*''SetMRMLScene()'' (which is expected for a ''qMRMLWidget'') so they can observe the selection node ''UnitModifiedEvent''&lt;br /&gt;
*The &amp;quot;quantity&amp;quot; property. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;br /&gt;
&lt;br /&gt;
=== Customization ===&lt;br /&gt;
In the case where one doesn't want all the parameters of its spinbox controled by the current unit node, one can choose which properties will be updated by setting the ''unitAwareProperties'' flag.&lt;br /&gt;
&lt;br /&gt;
[[Image:qMRMLSpinBoxInTheDesigner.png|400px|qMRMLSpinBox in the designer]]&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31761</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31761"/>
		<updated>2013-05-27T21:25:40Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* In the GUI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. These unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate units in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based on the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when a unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example, the name of a length unit can be Milimetre, Metre, CentiMetre... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example the quantity of second and day is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61.&lt;br /&gt;
* '''Prefix/Suffix''': Abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If a unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
They derive directly from their CTK counterpart and only add two methods. ''SetMRMLScene()'' (which is expected for a ''qMRMLWidget'') so they can observe the selection node ''UnitModifiedEvent'' and the property named &amp;quot;quantity&amp;quot;. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31760</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31760"/>
		<updated>2013-05-27T21:24:30Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* In logic/nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. These unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate units in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based on the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when a unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example, the name of a length unit can be Milimetre, Metre, CentiMetre... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example the quantity of second and day is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61.&lt;br /&gt;
* '''Prefix/Suffix''': Abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If a unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
They derive directly from their CTK counterpart and only add two methods. ''SetMRMLScene()'' (which is expected for a qMRML widget) so they can observe the selection node ''UnitModifiedEvent'' and the quantity property. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31759</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31759"/>
		<updated>2013-05-27T21:24:10Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Unit Nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. These unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate units in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based on the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when a unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example, the name of a length unit can be Milimetre, Metre, CentiMetre... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example the quantity of second and day is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61.&lt;br /&gt;
* '''Prefix/Suffix''': Abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If an unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
They derive directly from their CTK counterpart and only add two methods. ''SetMRMLScene()'' (which is expected for a qMRML widget) so they can observe the selection node ''UnitModifiedEvent'' and the quantity property. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31758</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31758"/>
		<updated>2013-05-27T21:22:40Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Selection Node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. These unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate units in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based on the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when a unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
The vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example the name of a length unit can be Milimetre, Metre, CentiMetre... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example second and day's quantity is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61&lt;br /&gt;
* '''Prefix/Suffix''': The unit abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If an unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
They derive directly from their CTK counterpart and only add two methods. ''SetMRMLScene()'' (which is expected for a qMRML widget) so they can observe the selection node ''UnitModifiedEvent'' and the quantity property. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31757</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31757"/>
		<updated>2013-05-27T21:22:03Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. These unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate the unit in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when an unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
The vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example the name of a length unit can be Milimetre, Metre, CentiMetre... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example second and day's quantity is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61&lt;br /&gt;
* '''Prefix/Suffix''': The unit abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If an unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
They derive directly from their CTK counterpart and only add two methods. ''SetMRMLScene()'' (which is expected for a qMRML widget) so they can observe the selection node ''UnitModifiedEvent'' and the quantity property. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31756</id>
		<title>Documentation/Nightly/Developers/Units</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Units&amp;diff=31756"/>
		<updated>2013-05-27T21:21:51Z</updated>

		<summary type="html">&lt;p&gt;Johan.andruejol: /* Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Slicer Units Overview = &lt;br /&gt;
&lt;br /&gt;
The Unit module is a loadable module that allows the application to have a notion of unit. A unit is defined by its quantity (cf [http://en.wikipedia.org/wiki/International_System_of_Units SI] and [http://en.wikipedia.org/wiki/Physical_quantity quantities]) and its name.&lt;br /&gt;
&lt;br /&gt;
= Intended capabilities =&lt;br /&gt;
&lt;br /&gt;
Units are intended to be used to describe the quantity of a given object. Units should help the application to be smarter about how the user can access/view/interact with the data. For example, units help the user by displaying the current unit in spinboxes as a suffix (1.3mm instead of 1.3).&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
== Settings ==&lt;br /&gt;
Right now, there are two quantities supported (time and length). For each of these, there is an associated unit node which properties are saved in the settings. The unit nodes are not saved with the scene, they just are settings.&lt;br /&gt;
&lt;br /&gt;
== Selection Node ==&lt;br /&gt;
In order to propagate the unit in the application easily, access methods were added to the selection so it could stores the information regarding the current unit for a given quantity.&lt;br /&gt;
These methods are based the reference role of the ''vtkMRMLNode''. The signal ''vtkMRMLSelectionNode::UnitModifiedEvent'' was added to the selection node so the application could be updated when an unit is modified/added/removed.&lt;br /&gt;
&lt;br /&gt;
== Unit Nodes ==&lt;br /&gt;
The vtkMRMLUnitNode are singleton and '''NOT''' saved in the scene. They have the following properties:&lt;br /&gt;
* '''Name''': The name describes the unit itself. For example the name of a length unit can be Milimetre, Metre, CentiMetre... Setting the node's name also sets the node's singleton tag.&lt;br /&gt;
* '''Quantity''': This properties is an attribute so it can be observed by the GUI. It describes what types of unit it is. For example second and day's quantity is time.&lt;br /&gt;
* '''Precision''': Describes the number of digit used after the comma. For example a precision of 2 gives 12.00 and -13.61&lt;br /&gt;
* '''Prefix/Suffix''': The unit abbreviation/text displayed respectively before and after the unit.&lt;br /&gt;
* '''Minimum Value/Maximum Value:''' Range of value allowed for the unit. For example, the minimum for the Kelvin value would be 0.&lt;br /&gt;
&lt;br /&gt;
= How to access an Unit ?=&lt;br /&gt;
Units can be accessed through the selection node.&lt;br /&gt;
&lt;br /&gt;
== In logic/nodes==&lt;br /&gt;
For one-time access, it's preferable to do the following:&lt;br /&gt;
&lt;br /&gt;
  vtkMRMLSelectionNode* selectionNode =  vtkMRMLSelectionNode::SafeDownCast(&lt;br /&gt;
    this-&amp;gt;GetMRMLScene()-&amp;gt;GetNthNodeByClass(0, &amp;quot;vtkMRMLSelectionNode&amp;quot;));&lt;br /&gt;
  if (selectionNode)&lt;br /&gt;
    {&lt;br /&gt;
    vtkMRMLUnitNode* unitNode = selectionNode-&amp;gt;GetUnitNode(quantity); // Note: most often quantity will be a const string like &amp;quot;length&amp;quot; or &amp;quot;time&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If an unit needs to be accessed multiple times (very unlikely), then one can observe the selection nodes ''vtkMRMLSelectionNode::UnitModifiedEvent''.&lt;br /&gt;
&lt;br /&gt;
== In the GUI==&lt;br /&gt;
&lt;br /&gt;
Three ''qMRMLWidget'' have been added (or modified) to integrate unit support: &lt;br /&gt;
* qMRMLSpinBox&lt;br /&gt;
* qMRMLCoordinateWidget&lt;br /&gt;
* qMRMLSliderWidget&lt;br /&gt;
* qMRMLRangeWidget&lt;br /&gt;
&lt;br /&gt;
They derive directly from their CTK counterpart and only add two methods. ''SetMRMLScene()'' (which is expected for a qMRML widget) so they can observe the selection node ''UnitModifiedEvent'' and the quantity property. Setting this property (''setQuantity()'') tells the widget what kind of unit node it should refer to. If a unit node with such quantity is default in the application, the widget will automatically update its minimum value, maximum value, single step, decimals, prefix and suffix according to the unit node.&lt;/div&gt;</summary>
		<author><name>Johan.andruejol</name></author>
		
	</entry>
</feed>