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

master 97118990

2015-09-16 11:47:06

msmolens

Details Diff
ENH: Update CTK (includes PythonQt crash fix, DICOM browser enhancement)

Fixes Issue 0004045 (py_StandaloneEditorWidgetTest crashes on exit in PythonQt)
Fixes Issue 0003792 (unable to remove one series of an exam in the dicom menu)

// -------------------------
commit cbf890f8eda122b8dca8e67d2bf75e85640ab297
Author: Max Smolens <max.smolens@kitware.com>
Date: Tue Sep 15 15:45:30 2015 -0400

Fix PythonQtSignalReceiver crash during cleanup

This commit fixes a crash during PythonQt::cleanup(). While destroying the
PythonQtPrivate instance, any remaining PythonQtSignalReceivers that are kept
alive only by their parent object will be destroyed. The crash occurs when
PythonQtSignalReceiver's destructor calls back into
PythonQtPrivate::removeSignalEmitter() when the PythonQtPrivate instance is
mostly destroyed.

Includes test case that crashes without the fix.
// -------------------------

// -------------------------
commit ea653d2cfc5be6dc846a5a54f75543af7dfd4445
Author: Nicole Aucoin <nicole@bwh.harvard.edu>
Date: Mon Aug 3 18:51:07 2015 -0400

ENH: add ability to delete individual series, studies, patients

Add to the browser Remove button the information that it will
delete all selected series, studies, patients.

Add support for right click custom context menus in the
patient, study, series tables. Translate the local points
to global ones in terms of the table view and signal
right clicked with the global position so that the browser
can position the context menu appropriately.

Add the context menu to the DICOM browser to allow
deleting at just one level, with number of items
selected information, and a confirmation message box with descriptive
information that can be set to not be shown again.

Added a test for the DICOM browser, with the ability
to open it in interactive mode to test the right clicks.

Add query wrappers for the DICOM database to get the patient name
as well as descriptions for series and study. They will return empty
strings on failure.
Use the new queries to give more meaningful information on the right
click pop up menu in the DICOM browser.
Added a test for the new DICOM database accessors.

Slicer bug:
http://www.na-mic.org/Bug/view.php?id=3792

When Slicer makes a custom DICOM browser, it moves the table views
directly into the new window, extracting them from the DICOM
table.
With this change, the table view takes care of mapping the point to
global, the table manager propagates the signal as a table specific
XRightClicked signal, and the browser responds to it with a table
specific context menu.

Slicer Issue 0003792
// -------------------------

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

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

master bd557aa8

2015-09-15 19:01:13

jcfr

Details Diff
STYLE: Facilitate integration with python IDE

This commit introduces slicer/kits.py and rename slicer/__init__.py.in
to slicer/__init__,py. This will facilitate integration with IDE like
PyCharm when simply adding the "Slicer/Base/Python" folder as dependent
project for scripted module.

Ideally, on platform supporting it, python script shouldn't be copied
into the build directory. Instead they should be symlinked similarly to
what is done with the option "develop" of setup.py or the option "--editable"
of pip.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24553 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/Python/CMakeLists.txt Diff File
add - Base/Python/slicer/kits.py.in Diff File

master 673e8327

2015-09-15 18:44:42

jcfr

Details Diff
STYLE: DataProbe: Refactor adding functions to generate text descriptions

This commits adds the functions to facilitate the customization
of the text displayed in the data probe in extension.

Function added are:
* generateViewDescription(self, xyz, ras, sliceNode, sliceLogic)
* generateLayerName(self, slicerLayerLogic)
* generateIJKPixelDescription(self, ijk, slicerLayerLogic)
* generateIJKPixelValueDescription(self, ijk, slicerLayerLogic)

Co-authored-by: Davide Punzo <punzodavide@hotmail.it>

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

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

master ff9efe95

2015-09-15 18:44:40

jcfr

Details Diff
STYLE: DataProbe: Rename function to indicate it is "private"

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

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

master e27a10ae

2015-09-15 18:44:38

jcfr

Details Diff
STYLE: DataProbe: Simplify constructor

This commit removes unneeded test for widget "type". Initially introduced
in r18030 (ENH: remove ThreeDViews and SlicesControllerToolbar)
on Sept 12th 2011.

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

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

master 1595806a

2015-09-15 18:44:36

jcfr

Details Diff
STYLE: DataProbe: Remove redundant code

This commit removes redundant call to "onShowImage(False)" from "addView()".

It is already done in function "createSmall()" called by in the constructor
of DataProbeInfoWidget itself instantiated in "addView()" function mentioned
above.

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

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

master 6e2c9593

2015-09-15 18:44:34

jcfr

Details Diff
STYLE: DataProbe: Refactor code introducing "_createMagnifiedPixmap()"

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

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

master 27de5a06

2015-09-15 18:44:32

jcfr

Details Diff
STYLE: DataProbe: Remove unused code setting 'currentLayoutName' ivar

This commit removes code initially introduced in r22253 (BUG: 0003262
update data probe on non-mouse-move events) that later became obsolete
with r23387 (ENH: Added mouse cursor position to vtkMRMLCrosshairNode.)

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

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

master 4f2e9dc4

2015-09-15 18:40:18

jcfr

Details Diff
BUG: Finalize transition to ITK MGH IO fixing mgh test. See 0003410

Fix failing test py_nomainwindow_test_slicer_mgh.

This commit fixes a regression introduced by r24539 (ENH: Convert to
using ITK version of MGHIO ) by explicitly adding MGHIO to list of IO
modules that should be loaded by ITKFactoryRegistration library.

Thanks: Bradley Lowekamp <blowekamp@mail.nih.gov>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24546 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/ITKFactoryRegistration/CMakeLists.txt Diff File

master d5b9cece

2015-09-14 18:16:20

jcfr

Details Diff
STYLE: UnitsLogic: Improve AddUnitNodeToScene doxygen

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24545 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/Units/Logic/vtkSlicerUnitsLogic.h Diff File

master 0beb6ddb

2015-09-14 18:16:19

jcfr

Details Diff
ENH: Extend Units logic API adding "GetDisplayCoefficient()"

Executing the following python snippet before and after integrating this
commit confirmed that value associated with "length" units are
converted to suitable values for display.

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
import math
l = slicer.modules.units.logic()
s = l.GetUnitsScene()

units = ['Meter', 'Centimeter', 'Millimeter', 'Micrometer', 'Nanometer']

print("X mm -> %s", units)
for v in range(-5, 5):
value_in_mm = math.pow(10, v)
converted_values = []
for unit in units:
n = s.GetNodesByName(unit).GetItemAsObject(0)
n.SetPrecision(6)
converted_values.append(n.GetDisplayStringFromValue(value_in_mm))

print("10^%d mm -> %s" % (v, converted_values))
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---

Output before and after:

10^-5 mm -> [' 0.000000 m', ' 0.000001 cm', ' 0.000010 mm', ' 0.010000 \xb5m', ' 10.000000 nm']
10^-4 mm -> [' 0.000000 m', ' 0.000010 cm', ' 0.000100 mm', ' 0.100000 \xb5m', ' 100.000000 nm']
10^-3 mm -> [' 0.000001 m', ' 0.000100 cm', ' 0.001000 mm', ' 1.000000 \xb5m', ' 1000.000000 nm']
10^-2 mm -> [' 0.000010 m', ' 0.001000 cm', ' 0.010000 mm', ' 10.000000 \xb5m', ' 10000.000000 nm']
10^-1 mm -> [' 0.000100 m', ' 0.010000 cm', ' 0.100000 mm', ' 100.000000 \xb5m', ' 100000.000000 nm']
10^0 mm -> [' 0.001000 m', ' 0.100000 cm', ' 1.000000 mm', ' 1000.000000 \xb5m', ' 1000000.000000 nm']
10^1 mm -> [' 0.010000 m', ' 1.000000 cm', ' 10.000000 mm', ' 10000.000000 \xb5m', ' 10000000.000000 nm']
10^2 mm -> [' 0.100000 m', ' 10.000000 cm', ' 100.000000 mm', ' 100000.000000 \xb5m', ' 100000000.000000 nm']
10^3 mm -> [' 1.000000 m', ' 100.000000 cm', ' 1000.000000 mm', ' 1000000.000000 \xb5m', ' 1000000000.000000 nm']
10^4 mm -> [' 10.000000 m', ' 1000.000000 cm', ' 10000.000000 mm', ' 10000000.000000 \xb5m', ' 10000000000.000000 nm']

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24544 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/Units/Logic/vtkSlicerUnitsLogic.cxx Diff File
mod - Modules/Loadable/Units/Logic/vtkSlicerUnitsLogic.h Diff File

master 8f1a365a

2015-09-14 18:16:17

jcfr

Details Diff
ENH: Extend Units logic API adding "GetSIPrefixCoefficient()"

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24543 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/Units/Logic/vtkSlicerUnitsLogic.cxx Diff File
mod - Modules/Loadable/Units/Logic/vtkSlicerUnitsLogic.h Diff File
mod - Modules/Loadable/Units/Testing/Cxx/vtkSlicerUnitsLogicTest1.cxx Diff File

master 8903ca4f

2015-09-14 18:16:15

jcfr

Details Diff
STYLE: Fix doxygen in vtkSlicerUnitsLogic

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24542 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/Units/Logic/vtkSlicerUnitsLogic.h Diff File

master d9f522cc

2015-09-14 18:16:13

jcfr

Details Diff
BUG: MRMLUnitNode: Ensure value to string conversion account for precision

Fixes 0004044

By calling "strstream.setf(ios::fixed,ios::floatfield)", it guarantees
that the returned string will have a number of decimals equal to the
precision (instead of a number of digit equal to precision).

This prevents the cut of decimals when we have big numbers.

Running the following python snippet in the python interactor
before and after integrating this commit illustrates the problem
and confirm it is fixed.

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
import math
l = slicer.modules.units.logic()
s = l.GetUnitsScene()
n = s.GetNodesByName("Metre per second").GetItemAsObject(0)
n.SetPrecision(3)
for v in range(-5, 5):
print("10^%d -> %s" % (v, n.GetDisplayStringFromValue(math.pow(10, v))))
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---

Before the change:

10^-5 -> 1e-05 m/s
10^-4 -> 0.0001 m/s
10^-3 -> 0.001 m/s
10^-2 -> 0.01 m/s
10^-1 -> 0.1 m/s
10^0 -> 1 m/s
10^1 -> 10 m/s
10^2 -> 100 m/s
10^3 -> 1e+03 m/s
10^4 -> 1e+04 m/s

After the change:

10^-5 -> 0.000 m/s
10^-4 -> 0.000 m/s
10^-3 -> 0.001 m/s
10^-2 -> 0.010 m/s
10^-1 -> 0.100 m/s
10^0 -> 1.000 m/s
10^1 -> 10.000 m/s
10^2 -> 100.000 m/s
10^3 -> 1000.000 m/s
10^4 -> 10000.000 m/s

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

From: Davide Punzo <punzodavide@hotmail.it>

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

master f1201a58

2015-09-14 17:58:53

jcfr

Details Diff
ENH: Update BRAINSTools to version 4.5.0

Version 4.5.0 is a bug fix for DWIConvert to facilitate
generating multi-shell data from Siemens scanners where
the --useBMatrix override flag was used (i.e. VB13 data).

From: Hans Johnson <hans-johnson@uiowa.edu>

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

master d1a2328d

2015-09-14 17:04:20

jcfr

Details Diff
ENH: Convert to using ITK version of MGHIO

The ITK supplied version of MGHIO is a derivative
work that originated in Slicer. The ITK version
has more widespread use in non-slicer envirnments and
can be used and maintained by a larger community.

From: Hans Johnson <hans-johnson@uiowa.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24539 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/CMakeLists.txt Diff File
rm - Libs/MGHImageIO/CMakeLists.txt Diff File
rm - Libs/MGHImageIO/itkMGHIOPlugin.cxx Diff File
rm - Libs/MGHImageIO/itkMGHIOPlugin.h Diff File
rm - Libs/MGHImageIO/itkMGHIOWin32Header.h Diff File
rm - Libs/MGHImageIO/itkMGHImageIO.cxx Diff File
rm - Libs/MGHImageIO/itkMGHImageIO.h Diff File
rm - Libs/MGHImageIO/itkMGHImageIOConfigure.h.in Diff File
rm - Libs/MGHImageIO/itkMGHImageIOFactory.cxx Diff File
rm - Libs/MGHImageIO/itkMGHImageIOFactory.h Diff File
mod - SuperBuild/External_ITKv4.cmake Diff File

master 45d353d7

2015-09-14 16:50:08

msmolens

Details Diff
ENH: Update CTK to include PythonQt cleanup fixes

Fixes crash on exit in py_nomainwindow_DCMTKPrivateDictTest.

// -------------------------------------------
commit commontk/CTK@ffc7f7a9
Author: Max Smolens <max.smolens@kitware.com>
Date: Fri Sep 11 16:52:23 2015 -0400

ctkAbstractPythonManager: revert change to clean up PythonQt before finalizing the Python interpreter

This commit reverts commontk/CTK@77a24f2

The original change worked in conjunction with fixes in PythonQt to avoid
various crashes while destroying the ctkAbstractPythonManager, for example by
calling Py_DECREF after the Python interpreter was finalized.

Further testing shows that a better fix is indeed to finalize first to ensure
clean destruction of PythonQt objects, and to make PythonQt's clean up step more
robust by handling a finalized interpreter.

An example of code which necessitates this change is creating an instance of
class Foo:

class Foo(object):

def __init__(self):
self.timer = qt.QTimer()

def __del__(self):
self.timer.setSingleShot(True)

During Py_Finalize(), the Foo instance's __del__ method is called, which in turn
calls a method on a Qt object. For this to succeed, PythonQt's data must still
be in place.
// -------------------------------------------

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

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

master 042c3080

2015-09-14 13:23:55

jcfr

Details Diff
ENH: Display module name in qSlicerCLIProgressBar

This commit allows to display the name of the CLI module node in
the top left corner of the progressbar. This new feature follows
the same implementation than for the status visibility and the
progressbar visibility. By default the CLI Module node name is
always hidden.

Rational :

When creating a python module running a pipeline of CLI modules,
we usually link our main progressbar to the current CLI node.
This practice helps following the progress of one module, but was
lacking information regarding our progress in the whole pipeline.
Displaying the name of the CLI module node above the progressbar
allows for more explicit information.

From: Alexis Girault <alexis.girault@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24537 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/QTCLI/qSlicerCLIProgressBar.cxx Diff File
mod - Base/QTCLI/qSlicerCLIProgressBar.h Diff File

master 7eefd19f

2015-09-12 23:42:59

jcfr

Details Diff
BUG: UnitLogic: Fix display coefficient associated with "velocity" unit.

This commit fixes a regression introduced in r24413 (ENH: Adding extra
units support (frequency, velocity and intensity) )

From: Davide Punzo <punzodavide@hotmail.it>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24536 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/Units/Logic/vtkSlicerUnitsLogic.cxx Diff File

master d73197ff

2015-09-12 23:42:57

jcfr

Details Diff
BUG: MRMLUnitWidget: Connect correct signal

This commit fixes an issue introduced in r22190 (ENH: Improve
qMRMLUnitWidget interface).

From: Davide Punzo <punzodavide@hotmail.it>

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

master e1cfc9dc

2015-09-12 23:42:54

jcfr

Details Diff
STYLE: Fix doxygen in vtkMRMLUnitNode.h

From: Davide Punzo <punzodavide@hotmail.it>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24534 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Core/vtkMRMLUnitNode.h Diff File

master fa09fe40

2015-09-12 23:19:13

lassoan

Details Diff
ENH: Added method to convert any transform to a grid transform

Useful for creating transforms that are compatible with software that cannot use inverse transforms or can only use grid transforms.

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

master f41f3fac

2015-09-12 22:46:00

jcfr

Details Diff
COMP: Fix module library build macros to consider already set variables

This commit fixes the build of SlicerRt extensions.

It basically removes the hack introduced in r24530 (COMP: Set loadable
module _INCLUDE_DIRS variables in Slicer project) and fixes the build
of extensions already setting the <ProjectName>_INLCUDE_DIRS variable
in their Qt and VTK module library CMakeLists.txt.

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

master 4e00f0d0

2015-09-12 22:45:58

jcfr

Details Diff
COMP: Facilitate build of few more CLIs as external module

This commit will facilitate the building of DiffusionWeightedVolumeMasking
and ExecutionModelTour CLIs as external module.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24531 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/CLI/DiffusionWeightedVolumeMasking/CMakeLists.txt Diff File
mod - Modules/CLI/ExecutionModelTour/CMakeLists.txt Diff File

master 00ff318f

2015-09-10 02:22:23

jcfr

Details Diff
COMP: Set loadable module _INCLUDE_DIRS variables in Slicer project

This commit fixes a regression introduced in previous commit by ensuring
vtkSlicerTractographyDisplayModuleMRML_INCLUDE_DIRS variable is also
defined in the Slicer project itself.

Before this commit similar variables were only defined after including
SlicerConfig.cmake (by calling "find_package(Slicer)").

Note that since SubjectHierarchy Logic and MRML libraries are setting
the _INCLUDE_DIRS to a specific values, an exception is adding to
the SlicerMacroBuildModuleVTKLibrary macro. Alternatively, missing
include directories could have been added to each SH plugin but the same
update would have to be done for extension building SH plugin.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24530 3bd1e089-480b-0410-8dfb-8563597acbee
mod - CMake/SlicerGenerateSlicerConfig.cmake Diff File
mod - CMake/SlicerMacroBuildModuleQtLibrary.cmake Diff File
mod - CMake/SlicerMacroBuildModuleVTKLibrary.cmake Diff File
mod - Modules/Loadable/Markups/SubjectHierarchyPlugins/CMakeLists.txt Diff File
mod - Modules/Loadable/Models/SubjectHierarchyPlugins/CMakeLists.txt Diff File
mod - Modules/Loadable/SceneViews/SubjectHierarchyPlugins/CMakeLists.txt Diff File
mod - Modules/Loadable/SubjectHierarchy/Widgets/CMakeLists.txt Diff File
mod - Modules/Loadable/Transforms/SubjectHierarchyPlugins/CMakeLists.txt Diff File
mod - Modules/Loadable/Volumes/SubjectHierarchyPlugins/CMakeLists.txt Diff File
mod - Modules/Scripted/DICOMLib/Logic/CMakeLists.txt Diff File
mod - Modules/Scripted/DICOMLib/SubjectHierarchyPlugins/CMakeLists.txt Diff File
mod - Modules/Scripted/DICOMLib/Widgets/CMakeLists.txt Diff File
 First  Prev  1 2 3 ... 10 ... 20 ... 30 ... 40 ... 50 ... 58 59 60 61 62 63 64 ... 70 ... 80 ... 90 ... 100 ... 110 ... 120 ... 130 ... 133 134 135  Next  Last