View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004416 | Slicer4 | Core: Diffusion and Tractography (Any modules) | public | 2017-08-16 18:19 | 2018-10-03 13:40 |
Reporter | lassoan | Assigned To | inorton | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | Slicer 4.7.0 | ||||
Target Version | Slicer 4.11.0 | Fixed in Version | |||
Summary | 0004416: Crash when displaying DTI volume in slice view | ||||
Description | When a DTI volume is shown in a slice view, then Slicer crashes as soon as the rendering pipeline is updated. The crash occurs in vtkImageReslice: <pre>
Maybe DTI volumes shouldn't be selected as volumes in the slice viewer? And/or vtkImageReslice should be fixed to not crash. I've come across this issue when I tried to test this PR: https://github.com/Slicer/Slicer/pull/776. | ||||
Steps To Reproduce | When this script into the Python console, Slicer crashes: <pre> Load volumeimport SampleData Force rendering pipeline updatevol.GetImageData().Modified() | ||||
Tags | No tags attached. | ||||
The issue is not in the NRRD reader, as a .mha version of the file (attached) crashes the same way. Crash: <pre> No crash: <pre> |
|
dt-helix-ref-BS.mha (711,933 bytes) |
|
backtrace for crash in https://issues.slicer.org/view.php?id=4416#c15053 |
|
In the backtrace above, The origin of the crash is the lack of scalars attached to the In interactive use, this works out fine (we use the DT slice view feature very often), because scalars are assigned by the tensor -> scalar filter pipeline in |
|
It is definitely a bug in vtkImageReslice. It should be checked that "scalars" is non-null before it is used. It is done like that it many other filters where GetDataType() is used. @inorton, could you add a null-pointer check into vtkImageReslice and submit a pull request to VTK? If not, then we may ask David Gobbi (author of this class) to get this fixed. |
|
I was able to reproduce this in Slicer r27094 In |
|
This doesn't happen with the dti sample data. Does it happen in practice with real data or only with the synthetic helix dataset? |
|
It crashes the same way with the DTI sample data (DTIVolume.nhdr+raw): <pre> Load volumeimport SampleData Force rendering pipeline updatevol.GetImageData().Modified() You can also trigger the crash by just calling Modified() on the image then interacting with a slice viewer: <pre> Load volumeimport SampleData Force rendering pipeline updatevol.GetImageData().Modified() now add markup in a slice view => it will crash</pre> |
|
When I removed this hack (https://github.com/Slicer/Slicer/blob/f553c8c881c0438b0c6c229d713d430a4c95e7b0/Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx#L678-L684) then Slicer crashed in a very similar way (there seems to be a mismatch between the expected and actual scalar type: double/float), so maybe the issue is that this workaround is not applied when calling Modified() on the input image data. The proper solution might be to fix this in VTK (but interestingly, the bug is supposed to be fixed already - see https://www.paraview.org/Bug/print_bug_page.php?bug_id=14692). |
|
I discussed this with David Gobbi in email. vtkImageData does not support "new" (5-year-old) VTK pipeline. Imaging filters have just been upgraded to remain functional, but for example you cannot change the active scalar via pipeline (but it is hardcoded in vtkImageData object - for example vtkImageData:: GetScalarType() always uses the active scalar set in the data object and ignores information objects in the pipeline). It would be significant effort to update the vtkImageData and all imaging filters to work properly with the new pipeline infrastructure. It would be a good time to work on this when we introduce image orientation to vtkImageData. Until then, we must not use vtkAssignAttribute with vtkImageData. It is not supposed to work, and it does not work (with the current hack it sort of works, but a simple Modified() call on the image data crashes the application). We must only store a single point scalar array in vtkImageData (we can store tensor data in a 9-component float/double array, the same way as VTK nrrd reader does it). @ihnorton Could you update DTI reader to store tensor data in a 9-component scalar in vtkImageData? This would allow simplification of the DTI image display pipeline: you could remove the two vtkAssignAttribute filters and remove the ugly hack. |
|
Following discussion during the last Slicer hangout, we are re-targeting this issue. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2017-08-16 18:19 | lassoan | New Issue | |
2017-08-16 18:19 | lassoan | Status | new => assigned |
2017-08-16 18:19 | lassoan | Assigned To | => inorton |
2017-08-16 18:19 | lassoan | Description Updated | View Revisions |
2017-08-16 18:20 | lassoan | Description Updated | View Revisions |
2017-08-16 18:20 | lassoan | Steps to Reproduce Updated | View Revisions |
2017-08-16 18:53 | lassoan | Note Added: 0015053 | |
2017-08-16 18:54 | lassoan | File Added: dt-helix-ref-BS.mha | |
2017-12-30 22:57 | inorton | Note Added: 0015472 | |
2017-12-30 23:06 | inorton | Note Added: 0015473 | |
2017-12-30 23:18 | inorton | Note Edited: 0015472 | View Revisions |
2017-12-31 01:28 | lassoan | Note Added: 0015474 | |
2018-03-22 02:50 | jcfr | Note Added: 0015600 | |
2018-09-27 10:41 | pieper | Note Added: 0016046 | |
2018-09-27 16:43 | lassoan | Note Added: 0016047 | |
2018-09-27 16:45 | lassoan | Note Added: 0016048 | |
2018-09-28 18:39 | lassoan | Note Added: 0016049 | |
2018-09-28 18:42 | lassoan | Note Edited: 0016049 | View Revisions |
2018-10-03 11:36 | jcfr | Note Added: 0016064 | |
2018-10-03 13:40 | jcfr | Target Version | Slicer 4.9.0 => Slicer 4.11.0 |