ENH: allow dynamic update of the slice viewer label

This feature is helpful to inform the user of the slice viewer content without
using extra screen space. Resolves issue 3427


git-svn-id: http://svn.slicer.org/Slicer4/trunk@22568 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix vtkObserverManager warning happening after loading a file.

This commit ensured that the observer associated with MRMLNodesCallbackCommand
are removed also if the file is successfully loaded.

Warning: In /home/jchris/Projects/Slicer/Libs/MRML/Core/vtkObserverManager.cxx, line 59
vtkObserverManager (0x3b99ce0): The callback is not deleted because there
are still some observation. They seem to not have been registered into
the event broker.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22569 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Prevent leaks when factory methods are used from python

There is currently no automatic/clean mechanism to release the object
created by factory methods.

The only "hack" that exists for now is to decrease the reference
count manually in your code:

For more details, see [1], [2], [3] and [4]

[1] http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/MemoryManagement
[2] http://massmail.spl.harvard.edu/public-archives/slicer-devel/2011/007513.html
[3] http://www.vtk.org/Bug/view.php?id=12139
[4] http://www.vtk.org/pipermail/vtk-developers/2011-April/009757.html

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22570 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix memory leaks in vtkMRMLModelSliceDisplayableManager

See inlined comment for details.

This commit will also avoid leaks (and by extension ensure they
pass when leaks detection is enabled) in the following tests:
  py_NeurosurgicalPlanningTutorial
  py_ThresholdThreadingTest
  py_NeurosurgicalPlanningTutorial
  py_ScenePerformance

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

Following r22568, the controller has been updated so that the abbreviated
slice name can be dynamically updated after the "LayoutLabel" has been
changed on the associated slice node.

This commit clean up the code removing un-needed ivar "SliceViewLabel" and
fix the test.

Finally, also set "sliceViewLabel" as a property so that is accessible
from python.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22572 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Remove unused "SliceOrientation" ivar from SliceControllerWidget

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22573 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: In SliceControllerWidget, consistently restore "blockSignal" state

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22574 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: remove extra comma

Copy/paste error left an extra comma in the argument list.



git-svn-id: http://svn.slicer.org/Slicer4/trunk@22582 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: add abiltiy to get displayable managers on 2d views

Added getDisplayableManagers on the slice view to mirror the
same call on the 3D view. Added testing.



git-svn-id: http://svn.slicer.org/Slicer4/trunk@22583 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Improve readability of EXERCISE_BASIC_MRML_METHODS macro

This commit makes it easier to read through the different test
associated with the macro.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22584 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Split MRML Node EncodeString tests into two different tests

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

Since calling GetID() on a newly instantiated node is expected to
return NULL and that attempting to print a NULL string on windows
results in a crash. The test was failing only on windows.

This commit remove the print statement in the test and also add test
test for GetID and GetNodeTagName to EXERCISE_BASIC_MRML_METHODS so that
the default value for every node is verified.

Since there is already a test printing the value if it fails, also
remove extra debug statement printing the number of children in
the hierarchy node.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22586 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: adding a test to show layout switch bug

Fiducial display positions aren't updated correctly
on linux according to bug 1914. This test illustrates this in a
non failing test way so that cross platform behaviour can be
determined.

Issue #1914


git-svn-id: http://svn.slicer.org/Slicer4/trunk@22587 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: check returned displayable managers

Add list of expected displayable managers and fail test
if returned list doesn't match in size or if returned managers
are not in the list.



git-svn-id: http://svn.slicer.org/Slicer4/trunk@22593 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix vtkMRMLSceneViewNodeStoreSceneTest randomly failing on windows

Allocating a single "vtkMRMLScalarVolumeNode" wasn't enough to ensure
that the space previously used by 'vtkMRMLScalarVolumeNode1' wasn't
available again for the restored volume.

See inlined comment for more details.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22594 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Attempt to fix random failure of qSlicerSslTest on windows

Execute the event loop just after queuing the request with the
networkAccessManager.

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