Changesets: Import 2017-06-07 23:51:09

master 75174d59

2015-09-25 10:57:16

alexy

Details Diff
ENH: Tractography Display performance improvement: Don't query invisible display nodes, which caused glyphs and tubes to recompute even if they are not visible.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24579 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Core/vtkMRMLModelDisplayNode.cxx Diff File
mod - Libs/MRML/DisplayableManager/vtkMRMLModelDisplayableManager.cxx Diff File

master 327e4b5f

2015-09-25 10:55:04

msmolens

Details Diff
BUG: Fix memory leaks when saving scene fails

This commit replaces manual memory management with smart pointers to fix memory
leaks in vtkITKImageWriter::Write() when an exception occurs while writing the
image.

Fixes issue 0003717:

To reproduce:
-> Create folder ~/test
-> Start Slicer
-> Download MRHead
-> File -> Save Scene
-> Click "Change directory for selected files" and select "~/test"
-> after selecting the folder and before clicking Save => chmod -w ~/test
-> Click Save
-> When you get the "Cannot write data file" error, click Yes to say you want to continue despite the problem
-> When you get the "Cannot write scene file" error, click Yes to say you ignore these errors and close saving
-> Close Slicer (click Exit and discard modification)

Then, you get the following leaks:

Class "vtkCellData" has 1 instance still around.
Class "vtkInformationIntegerVectorValue" has 3 instances still around.
Class "vtkInformationVector" has 15 instances still around.
Class "vtkPointData" has 1 instance still around.
Class "vtkImageFlip" has 1 instance still around.
Class "vtkTrivialProducer" has 1 instance still around.
Class "vtkMatrix4x4" has 1 instance still around.
Class "vtkPoints" has 1 instance still around.
Class "vtkInformation" has 21 instances still around.
Class "vtkMultiThreader" has 1 instance still around.
Class "vtkInformationIntegerPointerValue" has 2 instances still around.
Class "vtkIdList" has 1 instance still around.
Class "vtkImageExport" has 1 instance still around.
Class "vtkDoubleArray" has 1 instance still around.
Class "vtkAlgorithmOutput" has 1 instance still around.
Class "vtkImageStencilData" has 1 instance still around.
Class "vtkInformationIntegerValue" has 26 instances still around.
Class "vtkExtentTranslator" has 1 instance still around.
Class "vtkImageData" has 1 instance still around.
Class "vtkInformationStringValue" has 1 instance still around.
Class "vtkInformationExecutivePortVectorValue" has 1 instance still around.
Class "vtkShortArray" has 1 instance still around.
Class "vtkVoxel" has 1 instance still around.
Class "vtkFieldData" has 2 instances still around.
Class "vtkInformationDoubleVectorValue" has 2 instances still around.
Class "vtkStreamingDemandDrivenPipeline" has 3 instances still around.
Class "vtkInformationExecutivePortValue" has 4 instances still around.

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24578 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/vtkITK/vtkITKImageWriter.cxx Diff File

master 6297a072

2015-09-23 13:09:10

pinter

Details Diff
BUG: Fixed SubjectHierarchyCorePluginsSelfTest

It failed due to a recent change in the clone node plugin. The scenario when adding a data node to the scene triggered creation of display and/or storage nodes was not handled.
Also implemented restoring original DICOM directory in SH generic self test for convenience.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24577 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Applications/SlicerApp/Testing/Python/SubjectHierarchyGenericSelfTest.py Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyCloneNodePlugin.cxx Diff File

master 820f6ac3

2015-09-23 10:02:37

jcfr

Details Diff
ENH: Update BRAINSTools to reconcile module categories. See 0003844

//--------------
commit 26cb12bda02b4910fb5f80078b16bc14f46da7cf
Author: Csaba Pinter <csaba.pinter@queensu.ca>
Date: Tue Sep 22 14:55:26 2015 -0400

STYLE: Reconcile orphan module categories for DWICleanup and LabelStatistics

The above two modules were in Slicer module categories that only
contained one module, thus adding two extra categories to the already
hard-to-navigate module list. According to a recent Slicer developer
hangout discussion, DWICleanup was moved to Diffusion / Diffusion
Weighted Images, and LabelStatistics to Quantification. Integrating
it into Slicer for the release of 4.5 will make the module list a bit
cleaner.
//--------------

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24576 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild.cmake Diff File

master 1610f66f

2015-09-23 00:41:49

lassoan

Details Diff
BUG: Fixed restoring of DICOM window size&position

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24575 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Scripted/DICOMLib/DICOMWidgets.py Diff File

master 5e2d2059

2015-09-22 17:23:51

pinter

Details Diff
ENH: Added auto-create subject hierarchy option to Application Settings

This flag has been in the settings for a long time, but was not exposed in Application Settings, so if the user changed their mind, they did not have a UI option to change the option.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24574 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/SubjectHierarchy/CMakeLists.txt Diff File
add - Modules/Loadable/SubjectHierarchy/Resources/UI/qSlicerSubjectHierarchySettingsPanel.ui Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyPluginLogic.cxx Diff File
mod - Modules/Loadable/SubjectHierarchy/qSlicerSubjectHierarchyModule.cxx Diff File
add - Modules/Loadable/SubjectHierarchy/qSlicerSubjectHierarchySettingsPanel.cxx Diff File
add - Modules/Loadable/SubjectHierarchy/qSlicerSubjectHierarchySettingsPanel.h Diff File

master 3182a7c8

2015-09-22 16:38:34

pinter

Details Diff
BUG: Fixed cloning of nodes which involve display or storage nodes by events when copied

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24573 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyCloneNodePlugin.cxx Diff File

master d3a850d0

2015-09-22 15:14:04

pinter

Details Diff
ENH: Show wait cursor when hardening transforms

Hardening transforms especially deformable ones and especially on composite objects (like segmentations that contain multiple segments to transform) can take a long time. The wait cursor indicates to the user that Slicer is working on the operation they initiated.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24572 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSceneSubjectHierarchyModel.cxx Diff File
mod - Modules/Loadable/Transforms/qSlicerTransformsModuleWidget.cxx Diff File

master e4ebd3b2

2015-09-22 11:31:31

msmolens

Details Diff
BUG: Fix libpng warnings in console when loading images with Qt 4.8.7

This commit eliminates the following libpng warning seen when loading certain
PNG images using libpng 1.6.x, which is included in Qt 4.8.7:

libpng warning: iCCP: known incorrect sRGB profile

To fix the images I ran them through ImageMagick, which removes the incorrect
profiles, as suggested in [1]:

convert image.png image.png

libpng 1.6.17 describes the warning in png.c line 2308:

/* These profiles are known to have bad data that may cause
* problems if they are used, therefore attempt to
* discourage their use, skip the 'have_md5' warning below,
* which is made irrelevant by this error.
*/

[1] http://stackoverflow.com/questions/22745076/libpng-warning-iccp-known-incorrect-srgb-profile

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24571 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Applications/SlicerApp/Resources/Images/Slicer-Logo.png Diff File
mod - Applications/SlicerApp/Resources/Images/Slicer-ModulePanelLogo.png Diff File
mod - Applications/SlicerApp/Resources/Images/Slicer-SplashScreen.png Diff File
mod - Base/QTGUI/Resources/Icons/Extension.png Diff File
mod - Base/QTGUI/Resources/Icons/MousePickMode.png Diff File
mod - Base/QTGUI/Resources/Icons/MousePlaceMode.png Diff File
mod - Base/QTGUI/Resources/Icons/MouseRotateMode.png Diff File
mod - Base/QTGUI/Resources/Icons/MouseSinglePickMode.png Diff File
mod - Base/QTGUI/Resources/Icons/MouseSinglePlaceMode.png Diff File
mod - Base/QTGUI/Resources/Icons/Small/SlicerLock.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutConventionalWidescreenView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutFiveByTwoSliceView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutFourByThreeSliceView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutFourByTwoSliceView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutFourOverFourView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutFourUpQuantitativeView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutOneUpQuantitativeView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutSideBySideCompareView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutSideBySideView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutThreeByThreeSliceView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutThreeOverThreeView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutTriple3DView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LayoutTwoOverTwoView.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LinkOff.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/LinkOn.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SliceViewerBG.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SliceViewerFG.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SliceViewerLB.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SliceViewerOR.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicerAutomaticSliceSpacing.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicerManualSliceSpacing.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicesAnnotation.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicesFadeToBG.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicesFadeToFG.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicesFeaturesVisible.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicesFitToWindow.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicesSpatialUnit.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicesToggleFgBg.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/SlicesWinLevThreshCol.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewCamera.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewCapture.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewCenter.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewFPS.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewFeaturesVisible.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewOrtho.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewPerspective.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewPitch.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewRock.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewRoll.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewSpin.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewStereo.png Diff File
mod - Libs/MRML/Widgets/Resources/Icons/ViewYaw.png Diff File
mod - Modules/CLI/ImageData/ITKLogo.png Diff File
mod - Modules/CLI/ImageData/ITKLogo16x16.png Diff File
mod - Modules/CLI/ImageData/MIT_NAMIC_Logo.png Diff File
mod - Modules/Loadable/Annotations/Resources/Icons/AnnotationLock.png Diff File
mod - Modules/Loadable/Annotations/Resources/Icons/AnnotationMouseMode.png Diff File
mod - Modules/Loadable/Annotations/Resources/Icons/UPenn_logo.png Diff File
mod - Modules/Loadable/Annotations/Resources/Icons/ViewCamera.png Diff File
mod - Modules/Loadable/Cameras/Resources/Icons/Cameras.png Diff File
mod - Modules/Loadable/Data/Resources/Icons/Data.png Diff File
mod - Modules/Loadable/Models/Resources/Icons/Small/SlicerAddModel.png Diff File
mod - Modules/Loadable/SceneViews/Resources/Icons/Camera.png Diff File
mod - Modules/Loadable/SceneViews/SubjectHierarchyPlugins/Resources/Icons/SceneView.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeCrossReference.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeCrosshair.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeDataProbe.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeHelp.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeLayers.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeLayout.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeLogo.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeMap.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeMouse.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeSceneSnapshots.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeScreenCapture.png Diff File
mod - Modules/Loadable/SlicerWelcome/Resources/Images/WelcomeVolumeRendering.png Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/Resources/Icons/Chart.png Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/Resources/Icons/Transform.png Diff File
mod - Modules/Loadable/Transforms/Resources/Icons/Transforms.png Diff File
mod - Modules/Loadable/Transforms/SubjectHierarchyPlugins/Resources/Icons/Transform.png Diff File
mod - Modules/Loadable/Transforms/Widgets/Resources/Icons/ContourIcon.png Diff File
mod - Modules/Loadable/Transforms/Widgets/Resources/Icons/GlyphIcon.png Diff File
mod - Modules/Loadable/Transforms/Widgets/Resources/Icons/GridIcon.png Diff File
mod - Modules/Loadable/VolumeRendering/Resources/Icons/VolumeRendering.png Diff File
mod - Modules/Scripted/EditorLib/Resources/Icons/FastMarchingEffect.png Diff File
mod - Modules/Scripted/EditorLib/Resources/Icons/WatershedFromMarkerEffect.png Diff File
mod - Resources/Logos/ITK.png Diff File

master ab6b1c35

2015-09-22 09:58:33

msmolens

Details Diff
STYLE: EditorWidget: Simplify observer management by using VTKObservationMixin

This commit changes EditorWidget to use VTKObservationMixin, as suggested in [1].

[1] https://github.com/Slicer/Slicer/pull/346#issuecomment-141474443

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24570 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Scripted/Editor/Editor.py Diff File

master 1a55da6c

2015-09-22 09:58:25

msmolens

Details Diff
ENH: Support writing scripted modules and widgets as new-style Python classes

This commit adds support for writing scripted module and widget classes as
new-style Python classes [1].

The motivation for this change is to allow widget classes to take advantage of
convenience classes such as VTKObservationMixin.

While old-style classes are used with PyClass_XXX and PyInstance_XXX functions
[2], new-style classes are used with PyType_XXX functions [3]. A new-style class
can be identified programatically by checking whether PyType_Check() returns
true. In C, like in Python code, calling the type creates an object; the
PyObject_CallXXX functions accomplish this [4].

The Python error that occurred when attempting to instanciate a new-style Python
module or widget class before this change was:

SystemError: ../Objects/classobject.c:521: bad argument to internal function

Fixes the following issues:

http://www.na-mic.org/Bug/view.php?id=1890:
("Python doesn't support new-style classes")

http://www.na-mic.org/Bug/view.php?id=2994:
("Old style python classes in "Programming in Slicer4"? What's the superclass?")

[1] https://docs.python.org/2/reference/datamodel.html#newstyle
[2] https://docs.python.org/2/c-api/class.html
[3] https://docs.python.org/2/c-api/type.html
[4] https://docs.python.org/2/c-api/object.html

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24569 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/QTCore/qSlicerScriptedUtils.cxx Diff File
mod - Base/QTGUI/Testing/Cxx/Resources/qSlicerBaseQTGUITesting.qrc Diff File
mod - Base/QTGUI/Testing/Cxx/qSlicerScriptedLoadableModuleTest.cxx Diff File
mod - Base/QTGUI/Testing/Cxx/qSlicerScriptedLoadableModuleWidgetTest.cxx Diff File
add - Base/QTGUI/Testing/Data/Input/qSlicerScriptedLoadableModuleNewStyleTest.py Diff File
add - Base/QTGUI/Testing/Data/Input/qSlicerScriptedLoadableModuleNewStyleTestWidget.py Diff File

master 6cf055d8

2015-09-22 09:15:07

msmolens

Details Diff
BUG: Fix unitialized variable that causes py_LabelStatistics test failure

In a release build running the py_LabelStatistics test intermittently results in
a hang or memory corruption.

This commit fixes the problem by initializing a member variable in
vtkSlicerVolumesLogic. The member variable, and therefore the regression, was
introduced in r23934 ("BUG: avoid false positives on geometry check"). The
initial value matches what's described in the member variable's comment.

The unit test is updated to check the initial value of the member variable.

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24568 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/Volumes/Logic/vtkSlicerVolumesLogic.cxx Diff File
mod - Modules/Loadable/Volumes/Testing/Python/VolumesLogicCompareVolumeGeometry.py Diff File

master 200c569a

2015-09-21 17:08:31

pinter

Details Diff
ENH: Allow multi-selection in subject hierarchy.

Drag&drop and deletion of multiple nodes are now possible with one operation. All the context menu actions other than Delete become unavailable when multiple nodes are selected, but is still available with a single node. DICOM references are also highlighted for each selected node.
Related to https://www.assembla.com/spaces/slicerrt/tickets/620

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24567 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Widgets/qMRMLSceneModel.h Diff File
mod - Modules/Loadable/SubjectHierarchy/Resources/UI/qSlicerSubjectHierarchyModule.ui Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSceneSubjectHierarchyModel.cxx Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSceneSubjectHierarchyModel.h Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSceneSubjectHierarchyModel_p.h Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSubjectHierarchyTreeView.cxx Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSubjectHierarchyTreeView.h Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyAbstractPlugin.h Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyPluginHandler.cxx Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyPluginHandler.h Diff File

master 0a8ce0f1

2015-09-21 16:18:32

lassoan

Details Diff
BUG: Fixed compilation issue due to non-ascii character

A developer reported build issue due to presence of the "degree" character (0xb0).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24566 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Widgets/qMRMLLinearTransformSlider.cxx Diff File

master 622b7c7b

2015-09-21 12:03:17

lassoan

Details Diff
ENH: Improved qSlicerSimpleMarkupsWidget with some new signals and properties

Can jump to the selected fiducial.
Node selector and options can be hidden.
Placement button can be synchronized with an external button through new signal/slot.
Signal is available for being notified about currently selected fiducial.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24565 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/Markups/Widgets/qSlicerSimpleMarkupsWidget.cxx Diff File
mod - Modules/Loadable/Markups/Widgets/qSlicerSimpleMarkupsWidget.h Diff File

master fa32f741

2015-09-21 09:08:10

msmolens

Details Diff
BUG: Fix memory leaks associated with py_DTINotReproducibleIssue3977 test

In a debug build running py_DTINotReproducibleIssue3977 reports that a number of VTK
class instances leak.

This commit fixes a regression introduced in r24291 (ENH: Use vtkMRMLLabelMapVolumeNode
class for labelmap volumes) that caused leaks due to incorrect memory management on an
instance of vtkMRMLDiffusionTensorVolumeDisplayNode.

Fixes 0004050

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24564 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/Logic/vtkSlicerApplicationLogic.cxx Diff File

master 75d95d19

2015-09-18 10:53:08

msmolens

Details Diff
BUG: Fix py_nomainwindow_DCMTKPrivateDictTest on Windows

Test py_nomainwindow_DCMTKPrivateDictTest fails on Windows because of a line
ending issue. Although the test passed on a local build after r24557 [1], the
test still fails on factory-south-win7.kitware.

This commit changes the test to use Python's universal newlines [2] when parsing
dcmdump's output.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24557
[2] https://docs.python.org/2/glossary.html#term-universal-newlines

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24563 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Applications/SlicerApp/Testing/Python/DCMTKPrivateDictTest.py Diff File

master fc57c6e6

2015-09-18 10:51:14

msmolens

Details Diff
BUG: Fix memory leaks associated with py_StandaloneEditorWidgetTest

In a debug build running running py_StandaloneEditorWidgetTest reports that a
number of VTK class instances leak.

The leaks occur because EditorWidget adds an observer callback in __init__()
that is never removed.

This commit fixes the leaks by moving initialization of the observer callback to
enter() and removing the callback in exit().

Fixes 0004048

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24562 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Scripted/Editor/Editor.py Diff File

master 71602609

2015-09-17 15:49:35

msmolens

Details Diff
ENH: Upgrade to NumPy 1.9.2

This commit upgrades from NumPy 1.4.1 to NumPy 1.9.2.

To continue building NumPy without a Fortran compiler, a build step is
introduced that applies a patch to effectively back out the following
change:

numpy/numpy@4a3fd1f

This new version of NumPy still compiles with Visual Studio 2008 and Visual
Studio 2010, but now also compiles with Visual Studio 2013. To make it compile
with Visual Studio 2013, this commit updates the patched version of
'msvc9compiler.py' for Python 2.7 by adding an entry in WINSDK_VERSION_MAP for
Visual Studio 2013. This fixes the following error when building NumPy with
Visual Studio 2013:

Traceback (most recent call last):
...
File "C:\dev\S4D\NUMPY\numpy\distutils\command\config.py", line 55, in _check_compiler
self.compiler.initialize()
File "C:\dev\S4D\python-install\Lib\distutils\msvc9compiler.py", line 500, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\dev\S4D\python-install\Lib\distutils\msvc9compiler.py", line 371, in query_vcvarsall
for sdkver in WINSDK_VERSION_MAP[versionstr]:
KeyError: '12.0'

NumPy test results on each platform are below:

>>> import numpy
>>> numpy.test(label='full')

- Mac OS X 10.6.8 (GCC 4.2.1 Compatible Clang 3.1, Release):
- NumPy 1.4.1, manually disabled test_multiarray.TestIO.* because many tests segfault:
ERROR: Failure: TypeError (setting function's dictionary to a non-dict)
FAIL: Check formatting of complex types.
FAIL: Check formatting of complex types.
FAIL: Check formatting of complex types.
FAILED (KNOWNFAIL=4, SKIP=4, errors=1, failures=3)
<nose.result.TextTestResult run=2364 errors=1 failures=3>
- NumPy 1.9.2:
OK (KNOWNFAIL=5, SKIP=43)
<nose.result.TextTestResult run=5382 errors=0 failures=0>

- Ubuntu 14.04.3 (GCC 4.8.4, Debug):
- NumPy 1.4.1, manually disabled test_multiarray.TestIO.* because many tests segfault:
ERROR: Failure: TypeError (setting function's dictionary to a non-dict)
FAIL: Check formatting of complex types.
FAIL: Check formatting of complex types.
FAIL: Check formatting of complex types.
FAILED (KNOWNFAIL=4, SKIP=4, errors=1, failures=3)
<nose.result.TextTestResult run=2364 errors=1 failures=3>
- NumPy 1.9.2:
FAIL: test_allnans (test_nanfunctions.TestNanFunctions_Median)
FAILED (KNOWNFAIL=5, SKIP=40, failures=1)
<nose.result.TextTestResult run=5418 errors=0 failures=1>

- Windows (Visual Studio 2008, Release):
- NumPy 1.4.1, manually disabled test_multiarray.TestIO.* because many tests segfault:
ERROR: Failure: TypeError (setting function's dictionary to a non-dict)
FAIL: Check formatting of complex types.
FAIL: Check formatting of complex types.
FAIL: Check formatting of complex types.
FAILED (KNOWNFAIL=8, SKIP=4, errors=1, failures=3)
<nose.result.TextTestResult run=2216 errors=1 failures=3>
- NumPy 1.9.2:
FAIL: test_allnans (test_nanfunctions.TestNanFunctions_Median)
FAILED (KNOWNFAIL=10, SKIP=44, failures=1)
<nose.result.TextTestResult run=5226 errors=0 failures=1>

- Windows (Visual Studio 2013, Debug):
- NumPy 1.4.1:
Unsupported compiler.
- NumPy 1.9.2:
FAIL: test_any_ninf (test_umath.TestArctan2SpecialValues)
FAIL: test_any_pinf (test_umath.TestArctan2SpecialValues)
FAIL: test_inf_ninf (test_umath.TestArctan2SpecialValues)
FAIL: test_inf_pinf (test_umath.TestArctan2SpecialValues)
FAIL: test_one_one (test_umath.TestArctan2SpecialValues)
FAIL: test_zero_negative (test_umath.TestArctan2SpecialValues)
FAIL: test_zero_nzero (test_umath.TestArctan2SpecialValues)
FAIL: test_zero_pzero (test_umath.TestArctan2SpecialValues)
FAIL: test_umath.TestComplexFunctions.test_branch_cuts(<ufunc 'log1p'>, -1.5, 1j, 1, -1)
FAIL: test_umath.TestLogAddExp.test_inf
FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, -inf, 1, 3.141592653589793, False)
FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, -1, -0.0, False)
FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, -inf, inf, 2.356194490192345, False)
FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, -inf, -inf, -2.356194490192345, False)
FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, -inf, -0.7853981633974483, False)
FAIL: test_basic (test_function_base.TestAngle)
FAILED (KNOWNFAIL=10, SKIP=42, failures=16)
<nose.result.TextTestResult run=5226 errors=0 failures=16>

No new Slicer test failures are seen when running the tests manually on:
- Mac OS X 10.6.8 (Release)
- Ubuntu 14.04.3 (Debug)
- Windows (Visual Studio 2013, Debug)

Fixes 0003159
Fixes 0003160

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24561 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_NUMPY.cmake Diff File
mod - SuperBuild/NUMPY_patch.cmake Diff File
add - SuperBuild/NUMPY_patched_fcompiler_init.py Diff File
mod - SuperBuild/python_patch.cmake Diff File
mod - SuperBuild/python_patched_msvc9compiler.py Diff File

master 9063d387

2015-09-17 15:49:27

msmolens

Details Diff
ENH: Add Python package: nose

This commit adds the Python package 'nose', a unit testing framework, to the
embedded Python installation.

The motivation for adding nose is to support testing NumPy in Slicer's Python
environment; NumPy's unit tests require nose.

For more information on nose, see https://nose.readthedocs.org.

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24560 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_NUMPY.cmake Diff File
add - SuperBuild/External_python-nose.cmake Diff File

master 69020d5b

2015-09-17 15:49:20

msmolens

Details Diff
BUG: Fix Python test failure in Debug build on Windows

This commit fixes a Python build problem on Windows when building in Debug
configuration. Running the built-in Python test 'test_os' suggests a problem by
displaying an assertion failure in the C Runtime library (CRT):

[...]
File: f:\dd\vctools\crt\crtw32\Iowio\dup.c
Line: 52

Expression: (_osfile(fh) & FOPEN)
[...]

This issue is that the Python library used multiple versions of the CRT. Because
Python is forced to build in Release configuration, the Python library always
uses the Multi-threaded CRT. Because the binascii and zlib Python modules
statically link to zlib, they pull in the CRT that zlib is built with, which, in
this case, is the Multi-threaded Debug CRT. When the binascii or zlib modules
are built into the Python library, the library uses both versions of the CRT,
which results in failures such as in test_os.

This commit fixes the problem by ensuring that, on Windows, the binascii and
zlib modules are not built into the Python library. Note that those two modules
might still show problems since they are built in Release configuration but pull
in the Debug CRT from zlib.

This problem was originally discovered because it prevented NumPy 1.9.2's setup
from completing in a Debug build:

[...]
File "C:\dev\SN\python-install\Lib\distutils\command\config.py", line 138, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:\dev\SN\python-install\Lib\distutils\msvc9compiler.py", line 670, in compile
extra_postargs)
File "C:\dev\SN\NUMPY\numpy\distutils\ccompiler.py", line 59, in CCompiler_spawn
s, o = exec_command(cmd)
File "C:\dev\SN\NUMPY\numpy\distutils\exec_command.py", line 223, in exec_command
use_tee=use_tee,**env)
File "C:\dev\SN\NUMPY\numpy\distutils\exec_command.py", line 414, in _exec_command
os.dup2(se_dup, se_fileno)
OSError: [Errno 9] Bad file descriptor

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24559 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_python.cmake Diff File

master 2e841198

2015-09-17 13:21:34

pieper

Details Diff
BUG: don't add keyword arguments to unittest.TestCase constructor

The superclass generates an error when the subclass has keyword
arguments it doesn't know.

Instead we enforce the default value when used.

For a subclass or a user or the class to change the value of this
instance variable they can just set it directly, as in:

self.messageDelay = 50

which can be done from anywhere in the code.

See discussion here:
http://massmail.spl.harvard.edu/public-archives/slicer-devel/2015/018624.html

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24558 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/Python/slicer/ScriptedLoadableModule.py Diff File

master 3be3dee7

2015-09-17 12:27:59

msmolens

Details Diff
BUG: Fix py_nomainwindow_DCMTKPrivateDictTest on Windows

Test py_nomainwindow_DCMTKPrivateDictTest fails on Windows because DICOMLib
can't find the dcmdump.exe utility.

Based on a comment in DICOMProcesses.py, the DCMTK build tree didn't always
include the configuration name (i.e. 'Debug' or 'Release') in the build path for
the utilities. Now the build tree does include the configuration name. This
commit adds the 'Debug' and 'Release' subdirectories to the list of searched
paths.

Fixes 0004049

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24557 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Scripted/DICOMLib/DICOMProcesses.py Diff File

master ed8673ed

2015-09-17 09:12:45

lassoan

Details Diff
BUG: Fixed CLI module node GUI initial node selection

Fixes:
https://www.na-mic.org/Mantis/view.php?id=3240
https://www.na-mic.org/Mantis/view.php?id=3468


git-svn-id: http://svn.slicer.org/Slicer4/trunk@24556 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/QTCLI/Resources/UI/qSlicerCLIModuleWidget.ui Diff File
mod - Base/QTCLI/qSlicerCLIModuleWidget.cxx Diff File

master 1d0e5577

2015-09-16 16:47:36

lassoan

Details Diff
BUG: Made grid transform writing more robust

Float and double grids can be saved (earlier floats were not supported and Slicer could crash when attempted)
To/From parent transform can be saved as well (earlier inverse transform saving was not working when the inverse transform had never been used before)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24555 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Core/vtkITKTransformConverter.h Diff File
 First  Prev  1 2 3 ... 10 ... 20 ... 30 ... 40 ... 50 ... 57 58 59 60 61 62 63 ... 70 ... 80 ... 90 ... 100 ... 110 ... 120 ... 130 ... 133 134 135  Next  Last