ENH: enable parsing of Philips DWI datasets

Philips private tag added to allow parsing multi-b acquisitions as multivolumes by the plugin.


git-svn-id: http://svn.slicer.org/Slicer4/trunk@23814 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Update CTK to ensure python error a written to stderr

$ git shortlog f341589..42700cf --no-merges
Andras Lasso (1):
      BUG: Fixed issue of writing Python errors to stdout instead of stderr

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23815 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Make subject hierarchy plugin method addNodeToSubjectHierarchy non-virtual

Now that subject hierarchy nodes are automatically created when a supported data node (i.e. there exists an SH plugin that can add it to the tree) is added to the scene, the qSlicerSubjectHierarchyAbstractPlugin::addNodeToSubjectHierarchy method lost its purpose, so although it's still used as a convenience function, it cannot be overridden any more.
Minor fixes: comments, checks, typos

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23816 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Subject hierarchy nodes not auto-created by default

Subject hierarchy auto-creation has caused problems in other modules (like Models, see referred ticket), and some users won't use subject hierarchy, so the supported data nodes are not added to the hierarchy automatically.
Now when the user enters subject hierarchy, and there are supported nodes (i.e. there is an SH plugin that can handle the node) in the scene, a question pops up whether the user wants to create subject hierarchy. If they say no, the hierarchy remains empty and unusable, if they choose yes, then the hierarchy is created once, if they choose yes to all, then a setting is saved and auto-creation is turned on, which means every added node that is supported by SH is automatically added. The users who use subject hierarchy often, should choose this option.

Related to #3911

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23817 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Added logging functions for Python

Added info and error logging macros for Python modules.

Usage examples:

```
import slicer.log

slicer.log.info("This is an info message, logged as an INFO type message")
slicer.log.info("This is an info message, logged and also displayed in a popup for a short time", True)
slicer.log.info("This is an info message, logged and also displayed in a popup for 5 seconds", True, 5000)
slicer.log.info("This is an info message, logged and also displayed in a popup, the user has to click OK to continue", True, 0)

slicer.log.error("This is an error message, logged as an ERROR type message")
slicer.log.error("This is an error message, logged and also displayed in a popup, the user has to click OK to continue", True, 0)
```

From: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23818 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Update scripted module base class to leverage "slicer.log" functionality

From: Andras Lasso <lasso@cs.queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23819 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Improve scripted module templates

* Use "slicer.log" functionality

* Also update the scripted loadable module template to perform actual
image processing (thresholding, using a CLI) and not just
capture a screenshot, because this is much closer to what
most users would do.

From: Andras Lasso <lasso@cs.queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23820 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix mixing subject hierarchy with other hierarchies

Two fixes have been applied. One is to enforce nested associations if there is a conflict of two hierarchy nodes associating to one data node.
Reminder: Nested associations prevent the scenario when two hierarchy nodes associate to the same data node, which leads to non-determinism if GetAssociatedHierarchyNode is called. In this case instead of the connections (SH --assoc--> Model <--assoc-- ModelHierarchy), this structure is created: SH --assoc--> ModelHierarchy --assoc--> Model
The other fix is to ensure reparenting to the same type of hierarchy nodes. If this proves to be too strict, then we may allow reparenting to base classes, or the alternative is to subclass the scene hierarchy model to the hierarchy types.

Also a subject hierarchy bug was fixed that occurred because the widget was created when instantiating the module (which is udesirable by itself), and this caused creation of context menu actions before external plugins had the chance to register. Now the widget is not created early, but the right connections are made at the right time.

Fixes #3911

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23821 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Update CTK to ensure ctkErrorLogContext is available from python

From python, it is now possible to execute the following:

errorLogModel = slicer.app.errorLogModel()
errorLogModel.addEntry(qt.QDateTime.currentDateTime(), \
  slicer.app.applicationPid(), \
  ctk.ctkErrorLogLevel.Debug, \
  "Python", \
  ctk.ctkErrorLogContext("This is a message"), \
  "This is a message")


$ git shortlog 42700cf..0d2a634 --no-merges
Jean-Christophe Fillion-Robin (1):
      Add PythonQt decorator for ctkErrorLogContext

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23822 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Update CTK to also wrap set/get for ctkErrorLogContext File attribute

$ git shortlog 0d2a634..cb53ac3a --no-merges
Jean-Christophe Fillion-Robin (1):
      Update PythonQt decorator of ctkErrorLogContext to include set/get for file

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23823 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix subject hierarchy node creation bug and automatic tests

Bug reported in this thread
http://slicer-users.65878.n3.nabble.com/DICOM-RT-Export-td4028406.html
fixed, now subject hierarchy nodes are also created before the user visits the SH module (only if auto-generate is turned on, or if loaded from DICOM).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23824 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix backwards compatibility for DICOM plugins

Fixed issue discussed here:
http://slicer-devel.65872.n3.nabble.com/DICOM-plugins-are-not-called-td4033045.html
Now the DICOM plugins that don't use the new naming of the plugin functions (examine was renamed to examineForImport to avoid ambiguity due to adding examineForExport) work without any changes.


git-svn-id: http://svn.slicer.org/Slicer4/trunk@23825 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Added support for thin plate spline transforms

Added full support for thin plate spline transforms:
* save/load forward and inverse transform from ITK files
* verification that ITK and VTK thin plate spline transform computes exactly the same values
* basic storage and inversion tests

Thin plate spline transform is used by the Landmark Registration module, so now the computed transform can be saved to the scene or exported.

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23826 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Update OpenIGTLinkIF: Improve support for POINT and POLYDATA message

Fixes #3875 and #3907

$ git shortlog 2ffd26b..d56c985 --no-merges
Junichi Tokuda (10):
      ENH: Use MarkupsFiducial node for POINT messages
      STYLE: Rename vtkIGTLToMRMLPointMetaList to vtkIGTLToMRMLPoint
      STYLE: Rename vtkIGTLToMRMLPoint to vtkIGTLToMRMLPoints.
      ENH: Initial implementation of the PolyData converter.
      ENH: Export PolyData through OpenIGTLink. Attributes are not exported.
      ENH: Export attributes. All features for the POLYDATA converter are implemented.
      ENH: Simplify vtkIGTLToMRMLPolyData::MRMLToIGTL() using vtkIGTLToMRMLPolyData::VTKToIGTLCellArray() function.
      ENH: Simplify vtkIGTLToMRMLPolyData::MRMLToIGTL() using vtkIGTLToMRMLPolyData::VTKToIGTLAttribute() function.
      ENH: Clean up the code.
      STYLE: Remove debug code.

From: Junichi Tokuda <tokuda@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23827 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Use Python logging framework for scripted module logging

Use Python's built-in logging module to manage logging. A direct advantage is that line number, file name, method name can be logged, too. Also, it follows the convention of using qt-style logging in qt classes, vtk-style logging in vtk classes, etc.

Default behavior of log levels:
 DEBUG: log to application log only, includes file name, line number, thread
 INFO: log to stdout (appears in application log, too)
 WARNING: log to stderr (appears in application log, too)
 ERROR: log to stderr (appears in application log, too)

Usage:
 import logging

 [...]

 logging.debug("this is a debug message")
 logging.info("this is an info message")
 logging.warning("this is a warning message")
 logging.error("this is a error message")

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23828 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Subject hierarchy does not try to remove non-SH hierarchy nodes when data node is deleted

When a (non-SH) node is removed, the related subject hierarchy node is removed with it, so that it's not left dangling and become invalid. Previously the occasional other type hierarchy nodes were removed as well. This has caused problems when deleting the nodes in other modules handling hierarchies due to different handling of node deletion, so this feature has been removed.

Fixes #3918

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23829 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Update ITKv4 and VTKv6 to include fix for multiple call to find_package

// --------------
VTKv6 changes:

$ git shortlog b55dad7..ea7cdc4 --no-merges
Matt McCormick (1):
      Reset VTK_MODULES_REQUESTED to all modules with multiple calls.

// --------------
ITKv4 changes:

$ git shortlog 8012adeb..f5e429a --no-merges
Arnaud Gelas (1):
      COMP: use find_package(VTK COMPONENTS) for LevelSetsv4Visualization

Bill Lorensen (2):
      ENH: Specify required VTK modules
      ENH: Modify WikiExamples remote config

Cory Quammen (1):
      COMP: Avoid including VTK_USE_FILE within ITK

Jean-Christophe Fillion-Robin (1):
      COMP: Wiki examples require additional vtk modules

Kent Williams (1):
      COMP: use find_package(VTK COMPONENTS) to specify just needed VTK Components

Matthew McCormick (6):
      COMP: Remove unused typedef's in VtkGlue.
      COMP: Add VTK Python module when wrapping ITKVtkGlue.
      COMP: Remove unused typedefs in LevelSetsv4Visualization.
      COMP: Add missing VTK module dependency for LevelSetsv4Visualization.
      BUG: Configure against VTK 5.
      BUG: Reset ITK_MODULES_REQUESTED to all modules with multiple calls.

Michka Popoff (1):
      STYLE: Remove old cmake < 2.8.4 specific code

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23830 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Added first implementation of FiberTractMeasurements CLI module.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23831 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Added cluster aggregation based on hierarchy to FiberTractMeasurements CLI module.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23832 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: fix compiler error with string vector

Fix parameter mismatch in call to computeScalarMeasurements
by creating an empty operations vector.



git-svn-id: http://svn.slicer.org/Slicer4/trunk@23833 3bd1e089-480b-0410-8dfb-8563597acbee