BUG: pull in fix for #2301 from CTK

commit 96ec6fa986ec9c3318330b1b0c63f6151c329e03
Author: Steve Pieper <pieper@bwh.harvard.edu>
Date:   Thu Jul 5 14:37:58 2012 -0400

    Fix for http://www.na-mic.org/Bug/view.php?id=2301

    When two different studies for the same subject are being
    inserted in the database, be sure to use the correct patientUID
    value during the optimization or else the study won't be correctly
    linked to the patient and won't be accessible via the database
    (and won't show up in a GUI that relies on the database).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20573 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Default *_WC_ROOT to 'NA' when no git origin is set in Extension

Patch contributed by Bradley Lowekamp :)

If the repository of an extension didn't have a remote.origin.url set,
the following unhelpful error message was being displayed:

CMake Error at
Slicer/Extensions/CMake/SlicerFunctionGenerateExtensionDescription.cmake:31
(message):
  CMake variable EXTENSION_WC_URL is empty !
Call Stack (most recent call first):
  Slicer/CMake/SlicerExtensionCPack.cmake:54
  (slicerFunctionGenerateExtensionDescription)
  CMakeLists.txt:64 (include)

This patch keeps *_WC_ROOT, and *_WC_URL set to "NA" if the origin is
not set in the repository. Also a CMake warning message is displayed
to indicate that the repository may not be configured correctly.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20574 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fix warning about unused cdUpRes.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20575 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Extensions can now be built with Slicer proper

Assuming the top-level folder name matches the extension name, it is now
possible to configure Slicer so that it also builds a chosen set of
extension source directories. If a package is generated,
these extensions will also be packaged.

Configuring Slicer passing the option "Slicer_EXTENSION_SOURCE_DIRS" will
achieve the desired goal.

For example, if we want to bundle within Slicer extensions "MinimalistiCli" and "SkullStripper",
the following could be done:

 cmake -DSlicer_EXTENSION_SOURCE_DIRS:STRING=/home/jchris/Projects/MinimalistiCli\;/home/jchris/Projects/SkullStripper .

The associated build tree will then be located in:
  /path/to/Slicer-Superbuild-Release/Slicer-build/Extensions/MinimalistiCli and
/path/to/Slicer-Superbuild-Release/Slicer-build/Extensions/SkullStripper

See http://na-mic.org/Mantis/view.php?id=2293

Fixes #2293

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20576 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Display warning message when no git origin is set only when required

The warning message displayed only if it's a git repository that
has the following properties:
 - No remote.origin is set
 - it's NOT a git svn repo

This will prevent the message from being displayed when configuring Slicer:

CMake Warning at CMake/FindGit.cmake:108 (message):
  No remote origin set for git repository:
  /home/jchris/Projects/Slicer4/Extensions/CMake
Call Stack (most recent call first):
  CMake/SlicerMacroExtractRepositoryInfo.cmake:99 (GIT_WC_INFO)
  Extensions/CMake/CMakeLists.txt:73 (SlicerMacroExtractRepositoryInfo)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20577 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Cleanup ModelToLabelMap and avoid memory leak

The early return in DoIt was not deleting the vtk readers.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20578 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: fix compilation with ITK4

ITKV3_COMPATIBILITY is not defined until other ITK4 header is included,
therefore compilation fails at line 262 because itkAnalyzeImageIOFactory.h
is IFDEF'd out. Move to end of includes.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20579 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: set b-values and gradient to non-zero to avoid nan values in sceneview dwi


git-svn-id: http://svn.slicer.org/Slicer4/trunk@20580 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Do not compare CMAKE_*_COMPILER when building extension using MSVC

It resumes that on windows, CMAKE_{C,CXX}_COMPILER is set to "cl" and not
the path to the associated executable.

Waiting we find a solution, in order to re-enable the successful build
of experimental, continuous and nightly extension, the comparison is
skipped for MSVC. Issue #2304 has been created to capture that.
(See http://www.na-mic.org/Bug/view.php?id=2304)


See http://www.na-mic.org/Bug/view.php?id=2279

Fixes #2279

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20581 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: fix w/l interactions hat-tip Tobias pt@bwh.harvard.edu

vtkSliceViewInteractorStyle:
- incorrect variable index startY
- removed unnecessary small deltaX/Y clamp
- added window clamp > 0

vtkMRMLSliceLogic:
- GetBackgrounWindowLevelAndRange: the scalar range needs to be
  checked from VolumeNode->ImageData, rather than
  VolumeDisplayNode->ImageData

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20582 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Prevent Slicer freeze when network connection is slow

Setting the model associated with the extension manager dialog only when
it's needed prevents the webview associated with the qSlicerExtensionsInstallWidget
from loading the "extension server" page at startup time.

See http://www.na-mic.org/Bug/view.php?id=2181

Fixes #2181

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20583 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Remove extra comments from Base/Python/CMakeLists.txt

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20584 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Associate icon with python interactor and set window title

See http://www.na-mic.org/Bug/view.php?id=2305

Fixes #2305

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20585 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: respect the sorted order of fiducials in a hierarchy by using GetNthChildNode. Closes bug 1889

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20586 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: 2312. Added InterpolateTexture attribute to vtkMRMLDisplayNode. For slice display node it is on if no labels is present in slice views, other wise off

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20587 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Remove unused variable from qSlicerAppMainWindowCore.cxx

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20588 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Remove unused code

"createAction()" was a "left-over" from a previous refactoring.

See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=14375

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20589 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: ensure Module Panel is visible when user click on icon in the toolbar

See http://www.na-mic.org/Bug/view.php?id=2314
Fixes #2314

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20590 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: features contributed by the SlicerRT team

(Thanks Andras and all!)

Most fixes listed below were accepted as-is, however the
'Generic DICOM' reader concept requires more discussion so
it was not included in this update.

#105: Integrate DICOM import fixes into Slicer trunk
Created on: Thu, Jul 05
Reported by: lassoan
Assigned to: lassoan
Milestone: Release for AAPM2012
	Status: New
Priority: Normal (3)
Component:

Comment:
We’ve modified 3 DICOM loading related files in SlicerRT (git@github.com:SlicerRt/Slicer.git).

DICOMWidgets.py
• if any custom loader recognizes an item then uncheck the item provided by the default “Scalar Volume” loader plugin and move it to the end of the loadable list
• have a “Reader” column in the loadable list that tells the user plugin provides the item
DICOMScalarVolumePlugin.py
• prevent recognizing a DICOM file without pixel data as a valid “Scalar Volume” item (because the loading would fail anyway and we would get an error message)
• show the first file in the tooltip
DICOMPlugin.py
• there is a small bug when initializing class members

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20591 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: fix missing icons when there is more than one editor extension

Thanks for fixing this Brad!

Missing indentation meant that only the last value
of the effect variable was being used.

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