Slicer merge requestshttps://gitlab.kitware.com/sjh26/Slicer/-/merge_requests2015-01-09T01:52:54-05:00https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/212BUG: Fixed loading of DICOM image from files containing special characters2015-01-09T01:52:54-05:00Andras LassoBUG: Fixed loading of DICOM image from files containing special charactersGot some DICOM files that contained a special character in the file names and in the patient name. Slicer failed to load them because lack of proper encoding before using them.
Solution:
- Encode strings to latin1 before using them in V...Got some DICOM files that contained a special character in the file names and in the patient name. Slicer failed to load them because lack of proper encoding before using them.
Solution:
- Encode strings to latin1 before using them in VTK set functions.
- Encode file names to a byte stream before sending them to hashlib.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/211BUG: avoid false positives on geometry check2015-01-19T22:30:07-05:00Nicole AucoinBUG: avoid false positives on geometry checkAdd an epsilon value to the volumes logic and use it in the fuzzy compare instead
of the VTK default value. Add a precision calculation from the epsilon so that
any warning messages are printed out with the same precision as was used to
...Add an epsilon value to the volumes logic and use it in the fuzzy compare instead
of the VTK default value. Add a precision calculation from the epsilon so that
any warning messages are printed out with the same precision as was used to
check the values.
Added a sanity check to see if the smallest volume spacing is within 3-10 orders
of magnitude of epsilon and print a warning if not.
Use the CTK significant decimals utility method to calculate the
precision with which to display differences in compared volumes.
Use the CTK order of magnitude utility method to compare the
spacing of the volumes with the current epsilon being used to
check them.
Added a python test to exercise the epsilon, precision and geometry check.
TBD: GUI for setting epsilon or just always use a volume spacing based value.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/210ENH: Remove redundant markups displayable manager method2016-01-25T22:03:45-05:00Sam HorvathENH: Remove redundant markups displayable manager method*Created by: jcfr*
This commit remove the method "GetSliceNode" and instead make
use of the existing method "GetMRMLSliceNode"
*Created by: jcfr*
This commit remove the method "GetSliceNode" and instead make
use of the existing method "GetMRMLSliceNode"
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/209BUG: Fixed crash on scene close2014-12-20T22:11:48-05:00Andras LassoBUG: Fixed crash on scene closeNode pointers in the scene model can become invalid when the scene is closed.
If the node is looked up by node ID and pointer is retrieved from the scene then the retrieved pointer will always be valid.
The d->MRMLScene->GetNodeByID() lo...Node pointers in the scene model can become invalid when the scene is closed.
If the node is looked up by node ID and pointer is retrieved from the scene then the retrieved pointer will always be valid.
The d->MRMLScene->GetNodeByID() lookup takes some extra time, but it is not very slow, because it just finds a string in a std::map<string,...>.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/208BUG: avoid false positives on geometry check2014-12-22T16:38:59-05:00Nicole AucoinBUG: avoid false positives on geometry checkAdd an epsilon value to the volumes logic and use it in the fuzzy compare instead
of the VTK default value. Add a precision calculation from the epsilon so that
any warning messages are printed out with the same precision as was used to
...Add an epsilon value to the volumes logic and use it in the fuzzy compare instead
of the VTK default value. Add a precision calculation from the epsilon so that
any warning messages are printed out with the same precision as was used to
check the values.
Added a sanity check to see if the smallest volume spacing is within 3-10 orders
of magnitude of epsilon and print a warning if not.
Added a python test to exercise the epsilon, precision and geometry check.
TBD: GUI for setting epsilon or just always use a volume spacing based value.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/207ENH: Use Python logging framework for scripted module logging2014-12-10T17:14:44-05:00Andras LassoENH: Use Python logging framework for scripted module loggingUse Python's built-in logging module to manage logging. A direct advantage is that line number, file name, method name can be logged, too. Also, it follows the convention of using qt-style logging in qt classes, vtk-style logging in vtk ...Use Python's built-in logging module to manage logging. A direct advantage is that line number, file name, method name can be logged, too. Also, it follows the convention of using qt-style logging in qt classes, vtk-style logging in vtk classes, etc.
Default behavior of log levels:
DEBUG: log to application log only, includes file name, line number, thread
INFO: log to stdout (appears in application log, too)
WARNING: log to stderr (appears in application log, too)
ERROR: log to stderr (appears in application log, too)
Usage:
logging.debug("this is a debug message")
logging.info("this is an info message")
logging.warning("this is a warning message")
logging.error("this is a error message")
TODO: once context.setFile() wrapping is implemented in **init**.py this line should be uncommented to enable logging of path name:
context.setFile(record.pathname)
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/206ENH: Update GIT_TAG for OpenIGTLinkIF to address issues #3875 (POINT mes...2014-12-10T16:30:02-05:00Junichi TokudaENH: Update GIT_TAG for OpenIGTLinkIF to address issues #3875 (POINT mes......sage support) and #3907 (POLYDATA message support).
...sage support) and #3907 (POLYDATA message support).
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/205ENH: Improved logging for easier troubleshooting2015-03-09T23:41:15-04:00Andras LassoENH: Improved logging for easier troubleshootingWhen users report a crash we need to ask a lot of questions (what operating system, Slicer version is used, how much memory is in the computer, how large images are loaded, what module was used, etc). Instead, we will be able to just ask...When users report a crash we need to ask a lot of questions (what operating system, Slicer version is used, how much memory is in the computer, how large images are loaded, what module was used, etc). Instead, we will be able to just ask them to provide the application log, as it will contain all these information. Lots of useful information is included now and as we identify further important troubleshooting data, those should be added to the application log, too.
- Added vtkInfoMacro logging macro, that logs an INFO message from VTK objects. vtkDebugMacro was not usable for information logging, as it only logs the message if debug is enabled for the particular object (also, typically debug output contains many low-level details).
- Added more detailed system and application info logging (operating system, memory, CPU, additional module paths, developer mode flag, executable CLI preference flag).
- Fixed system info logging for Windows (vtksys computes returns incorrect virtual memory size and number of physical CPUs).
- Log whenever user switches to another module (in case of a crash we know then what module was active).
- Log loaded volume size (this allows us to see if the volume size is very large compared to the available memory), for example: vtkMRMLVolumeArchetypeStorageNode (000000DC38FDF230): Loaded volume from file: C:/S4/Libs/MRML/Core/Testing/TestData/fixed.nrrd. Dimensions: 65x65x32. Number of components: 1. Pixel type: short.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/204ENH: Added support for thin plate spline transforms2014-12-10T16:13:03-05:00Andras LassoENH: Added support for thin plate spline transformsAdded full support for thin plate spline transforms:
- save/load forward and inverse transform from ITK files
- verification that ITK and VTK thin plate spline transform computes exactly the same values
- basic storage and inversion test...Added full support for thin plate spline transforms:
- save/load forward and inverse transform from ITK files
- verification that ITK and VTK thin plate spline transform computes exactly the same values
- basic storage and inversion tests
Thin plate spline transform is used by the Landmark Registration module, so now the computed transform can be saved to the scene or exported.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/203ENH: Added logging functions for Python2014-12-06T00:57:22-05:00Andras LassoENH: Added logging functions for PythonAdded info and error logging macros for Python modules. Usage examples
```
import slicer.log
slicer.log.info("This is an info message, logged as an INFO type message")
slicer.log.info("This is an info message, logged and also displayed...Added info and error logging macros for Python modules. Usage examples
```
import slicer.log
slicer.log.info("This is an info message, logged as an INFO type message")
slicer.log.info("This is an info message, logged and also displayed in a popup for a short time", True)
slicer.log.info("This is an info message, logged and also displayed in a popup for 5 seconds", True, 5000)
slicer.log.info("This is an info message, logged and also displayed in a popup, the user has to click OK to continue", True, 0)
slicer.log.error("This is an error message, logged as an ERROR type message")
slicer.log.error("This is an error message, logged and also displayed in a popup, the user has to click OK to continue", True, 0)
```
Also updated the scripted loadable module template to perform actual image processing (thresholding, using a CLI) and not just capture a screenshot, because this is much closer to what most users would do.
Right now Python errors are logged as INFO messages due to a CTK bug. A pull request is submitted with a fix: https://github.com/commontk/CTK/pull/523
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/202BUG: Fixed crash when slice compositing option is changed2014-11-28T10:55:48-05:00Andras LassoBUG: Fixed crash when slice compositing option is changedvtkNew<vtkImageMathematics> pointer was deleted with Delete().
Fixes http://na-mic.org/Mantis/view.php?id=3904
vtkNew<vtkImageMathematics> pointer was deleted with Delete().
Fixes http://na-mic.org/Mantis/view.php?id=3904
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/201BUG: Fixed slice intersection display of non-linearly transformed model nodes2014-11-26T15:59:56-05:00Andras LassoBUG: Fixed slice intersection display of non-linearly transformed model nodesAn additional polydata transform filter is added to the pipeline that applies the model-to-world transform to the model's polydata.
Fixes http://www.na-mic.org/Bug/view.php?id=3900
An additional polydata transform filter is added to the pipeline that applies the model-to-world transform to the model's polydata.
Fixes http://www.na-mic.org/Bug/view.php?id=3900
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/200ENH: Filter testing modules in module list depending on DeveloperMode2014-11-26T11:20:36-05:00Andras LassoENH: Filter testing modules in module list depending on DeveloperModeIn the module selector only show modules in Testing category if DeveloperMode is enabled in application settings
In the module selector only show modules in Testing category if DeveloperMode is enabled in application settings
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/199BUG: Fixed composite transform problems2014-11-26T22:40:39-05:00Andras LassoBUG: Fixed composite transform problemsBy hardening a non-linear transform on a vtkMRMLLinearTransformNode makes the contents of the linear transform node non-linear. This causes errors in many places in the code where linearity of the transform is tested by checking the clas...By hardening a non-linear transform on a vtkMRMLLinearTransformNode makes the contents of the linear transform node non-linear. This causes errors in many places in the code where linearity of the transform is tested by checking the class type instead of calling transform->IsLinear() or transform->IsTransformToParentLinear().
In the long term all specific transform nodes (linear, bspline, grid) should be removed and only the generic vtkMRMLTransformNode should be used everywhere. The specific classes are already “empty”, they do not contain any useful functionality, but they are be used in extensions (and still have not removed from everywhere in the Slicer core), so they have to be phased out gradually.
Specific problems:
• If affine transform is applied to bspline then bspline component is ignored
• If affine transform is applied to bspline and affine is hardened then the bspline component is lost.
• Hardening multiple nonlinear transforms on a transform sometimes results in incorrect composite transform
Fixes:
• Instead of casting to vtkMRMLLinearTransform IsLinear or IsTransformToWorldLinear has to be called to decide if a transform is linear (checking the class type does not work correctly for composite transforms)
• Fixed vtkMRMLTransformNode::ApplyTransform
• Moved full implementation of get/set transform matrix functions in vtkMRMLTransformNode (it further prepares removal of obsolete linear/bspline/grid transform node classes)
Enhancements:
• Allow splitting of composite transforms to its components (Transforms module: Split button – only displayed for composite transforms)
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/198ENH: Add option for script directory in SLICER_ADD_PYTHON_TEST macro2014-11-24T13:46:44-05:00Sam HorvathENH: Add option for script directory in SLICER_ADD_PYTHON_TEST macro*Created by: vovythevov*
The default is still CMAKE_CURRENT_SOURCE_DIR.
*Created by: vovythevov*
The default is still CMAKE_CURRENT_SOURCE_DIR.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/197ENH: Add access to the currently selected module for testing convinience2014-11-25T12:02:27-05:00Sam HorvathENH: Add access to the currently selected module for testing convinience*Created by: vovythevov*
Create a Q_PROPERTY in qSlicerModuleSelectorToolBar to make sure it is
wrapped in python. Also add some candy-coating in slicer python util.
*Created by: vovythevov*
Create a Q_PROPERTY in qSlicerModuleSelectorToolBar to make sure it is
wrapped in python. Also add some candy-coating in slicer python util.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/196ENH: Added "Enable developer mode" option to ExtensionWizard2014-11-05T21:15:58-05:00Andras LassoENH: Added "Enable developer mode" option to ExtensionWizardDeveloper mode is quite important for scripted module developers, as it enables showing of the "Reload and test" section in scripted module GUI.
To make sure developers not forget to enable developer mode, added a checkbox to enable dev...Developer mode is quite important for scripted module developers, as it enables showing of the "Reload and test" section in scripted module GUI.
To make sure developers not forget to enable developer mode, added a checkbox to enable developer mode to the scripted module auto-load dialog.
The checkbox is checked by default and it is only shown if developer mode is not enabled already.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/195BUG: adjust resample interpolation type for label maps2014-12-01T09:18:22-05:00Nicole AucoinBUG: adjust resample interpolation type for label mapsThe volumes logic method ResampleVolumeToReferenceVolume can be
called with an input label map scalar volume, check for that case.
For label maps we don't want to do a linear interpolation over any data
present as that could result in va...The volumes logic method ResampleVolumeToReferenceVolume can be
called with an input label map scalar volume, check for that case.
For label maps we don't want to do a linear interpolation over any data
present as that could result in values not defined in the color look
up table, so use the nearest neighbour filter option instead.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/194ENH: Save vtkMRMLInteractionNode::PlaceModePersistence in the scene2014-10-31T22:54:45-04:00Andras LassoENH: Save vtkMRMLInteractionNode::PlaceModePersistence in the sceneSaving of this member in the scene was missing.
Saving of this member in the scene was missing.
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/193ENH: generalise comparing volume geometries2014-10-29T12:45:48-04:00Nicole AucoinENH: generalise comparing volume geometriesAdded CompareVolumeGeometry and call it from CheckForLabelVolumeValidity, allows more general volume geometry comparisons rather than just label map vs grey scale comparisons.
Added CompareVolumeGeometry and call it from CheckForLabelVolumeValidity, allows more general volume geometry comparisons rather than just label map vs grey scale comparisons.