BUG: Consistently invoke MarkupAddedEvent specifying the markup index.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23669 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: fix crash when showing transformed markups

The module widget was getting the world coordinates by passing in a 3
element array, not a 4 element array. On some machines this was
triggering a crash. This fix avoids that by properly passing
a four element point array and then reassigning the values to
the three element array for display.

Issue #3756

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23670 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Change 'AddMarkup' to also return the markupIndex on success.

This commit updates the function 'AddMarkup' to behave similarly
to 'AddMarkupWithNPoints' function.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23671 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Update AddMarkup/Fiducial API to optionally accept the label.

When calling the AddMarkup/AddFiducial method, a default
label is associated. That said, it is not uncommon to create markup
or fiducial with a custom label.

For example, within a python script, before this commit, the following
could be done to add a fiducial and set its label:

  fiducialIndex = markups.AddFiducial(x, y, z)
  markups.SetNthMarkupLabel(fiducialIndex, "Foo")

The first issue is that the event 'MarkupAddedEvent' was triggered before the
label was set. Since when the markup is added an hypothetical callback
could retrieve other data structure based on the label, it is more
complex to do the book-keeping if the callback can't make use of the
label.

This commit ensures that callback connected to "MarkupAddedEvent" will
be able to get the custom label value.

The second issue is that the "Markup" structure is not wrapped in python.
That means it is not possible to pre-initialize a markup structure
before adding it using "AddMarkup(Markup markup)"

Note that ideally, it should be possible to pass other properties
to initialize the markup in python or c++ before the "MarkupAddedEvent"
is invoked. This commit is a trade-off between changing the Markup
structure into a more heavy weight vtkObject (so that it is wrapped) and
not being able to set the label before "MarkupAddedEvent" is invoked.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23672 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Slicer welcome: Fix location of qrc files in UI file.

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23673 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Display a warning message if no writers is found when using saveNodes

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23674 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Fixed color scalar bar by using vtkPVScalarBarActor

* Color scalar bar was enhanced and the bugs were fixed by adding Paraview vtkPVScalarBarActor to module's logic
* Replaced vtkScalarBarActor with vtkPVScalarBarActor
* Made the logic sensitive to dicom volume. (for none dicom volumes the
 color scalar bar would occupy 100% of the view's width)
* Change the format of foreground volume and label opacities to percentage
(e.g. from 0.4 to 40%)

From: Alireza Mehrtash <mehrtash@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23675 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Added icon loading for scripted module base class

Python scripted modules that use the ScriptedLoadableModule base class
now load their icon from Resources/Icons/<ModuleName>.png.
If the icon file does not exist then the default icon is kept.
Modules can override the icon setting in the module __init__ function to
use any other custom icon.

Updated extension wizard template and extension test.

Updated one more module (VectorToScalarVolume) to use
ScriptedLoadableModule base class.

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23676 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Ensure volume node without default storage node can be saved.

This commit allows volume to be saved from python using
"slicer.util.saveNode()".

More specifically, this commit (1) factors out the code allowing to
create and add the default storage node to the scene  and (2) ensures a
call to "qSlicerCoreIOManager::saveNodes" work when there are no storage
node associated with a volume node.

This is needed because within the "saveNodes" function, calling the
function "qSlicerNodeWriter::extensions(node)" expects a storage node
to be present.

Thanks to Julien Finet for reviewing.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23677 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Update BRAINSTools - Remove ITKv3 compatibility / Tweak BRAINSFit.xml

See #3829

$ git shortlog slicer-2014-08-27-6b15c2b..slicer-2014-09-15-411dee9
David Welch (2):
      ENH: Modified atlas xml name
      ENH: Added print statement to diagnose missing sentinal file

Hans Johnson (6):
      BUG: Uniformly apply modify_qsub_args for configuring qsub_args.
      BUG: Fixed logic for set notation.
      PERF: Fixed job submission logic to speed job start.
      BUG: Add consistent use-sentinal file.
      ENH: Added missing __init__.py file for SEMTools module.
      ENH: Per requests of the slicer community, defaults changed.

Jean-Christophe Fillion-Robin (2):
      Revert "COMP: fine-tune VTK dependencies"
      Revert "COMP: move find_package(VTK) down to individual project directories"

Kent Williams (3):
      COMP: Allow BRAINSTransformConvert without output transform file
      COMP: Remove global declarations from GenericTransformImage.h
      COMP: remove ITKV3_COMPATIBILITY entireley

Regina Kim (3):
      ENH: Allow template building to only do new files
      ENH: Add code for identifying the brain stem
      BUG: ATLAS_DIRECTORY to ATLAS_INSTALLING_DIRECTORY

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23678 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Update BRAINStools to include fixes for shadowed declarations.

$ git shortlog 868c290d..6f9986
Jean-Christophe Fillion-Robin (2):
      Revert "COMP: Fix unused variable warning in BRAINSFitHelperTemplate"
      Revert "COMP: Fix shadowed declaration warning"

Kent Williams (2):
      COMP: Removed deprecated V3 filters
      COMP: Remove shadow declaration warnings

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23679 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #3846 fixes crash when trying to use label map seeding

With the change to VTKv6 some member variables can be null, probably
due to the tensor pipeline not being correctly initialized.

This avoids the crash, but issue #3846 is not fixed (tractography
does not work).

From: Steve Pieper <pieper@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23680 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fixed ExtensionWizard immediate scripted module loading

Problem was that settingsList returned a tuple, which is not mutable and therefore rawSearchPaths.append failed.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23681 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Remove unused dependency to ITKDeprecated from ResampleDTIVolume

The dependency was probably added by "mistake" when the module
"Utilities/Maintenance/WhatModulesITK.py" was used to create the list of
dependent modules (r23413). Since the header "itkSemaphore.h" was
specified in the code but was commented, "WhatModulesITK" reported its
associated module ITKDeprecated as required.

This commit removes the commented code and updates the CMakeLists.txt

Thanks to "Gib Bogle <g.bogle@auckland.ac.nz>" for reporting the problem.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23682 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Update EMSegment to fix EMSeg_SlicerCommonInterfaceTestGeneral test

This commit ensures the ITK IO factory associated with
executable vtkSlicerCommonInterfaceTest are registered.

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

This commit ensures that "SEM_LAUNCH_COMMAND" variable will be defined
for both CLIs and remote modules.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23684 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Update ModelToLabelMap and remove unused dependency to ITKDeprecated

In r23660, the dependency to AnalyzeImageIO headers has been removed.
This commit also removes the now unneeded dependency to "ITKDeprecated".

Thanks to "Gib Bogle <g.bogle@auckland.ac.nz>" for reporting the problem.

Co-authored-by: Bradley Lowekamp <blowekamp@mail.nih.gov>

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

This commit fixes the failing test by ensuring the vtkRenderingContextOpenGL
module is initialized.

The following error was occurring on all three platforms:

// ----------
Generic Warning: In /path/to/VTKv6/Rendering/Context2D/vtkContextDevice2D.cxx, line 27
Error: no override found for 'vtkContextDevice2D'.
// ----------

For more details, see:
  http://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized
  http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines


Finally, let's also note that the test executable was compiled with:

-DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)"
-DvtkRenderingCore_AUTOINIT="4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)"
-DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingFreeTypeFontConfig)"
-DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)"

and was linked against vtkRenderingContextOpenGL.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23686 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Added helper methods to ScriptedLoadableModuleLogic for managing parameter nodes

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23687 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Remove unused and outdated tcl scripts.

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