View Issue Details

IDProjectCategoryView StatusLast Update
0004482Slicer4Core: Base Codepublic2017-11-29 12:13
ReporterfbudinAssigned Tojcfr 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product VersionSlicer 4.8.0 
Target VersionSlicer 4.9.0Fixed in Version 
Summary0004482: Slicer fails to load a segmentation file that does not contain segmentation metadata
Description

From the command line, it can convenient to load images when starting Slicer.
One way of loading segmentations is to load files that are named "*.seg.nrrd" [1].
However, this fails with the following error message if the file does not contain the expected metadata:

"Slicer has caught an internal error.
You may be able to continue from this point, but results are undefined.
Suggested action is to save your work and restart.
If you have a repeatable sequence of steps that causes this message, please report the issue following instructions available at http://slicer.org

The message detail is:
Exception thrown in event: basic_string::_S_construct null not valid"

It is however possible to load a label map in Slicer, and then import it as a segmentation.

It would be nice if loading a file that ends with ".seg.nrrd" would automatically import the image as a segmentation if the metadata is missing, or if there was a way to load a labelmap from the command line (maybe with a specific suffix, like "-label.nrrd" since it is the default name given to label maps in the old editor).

[1] https://github.com/Slicer/Slicer/blob/f34782b1d62fde93fc4b325b6ff7e6dd02ad9180/Modules/Loadable/Segmentations/qSlicerSegmentationsReader.cxx#L87-L90

Steps To Reproduce

1) Create a label map in the editor.
2) Save the label map as a nrrd image.
3) rename file on disk with suffix ".seg.nrrd"
4) Start Slicer from the command line and directly load renamed image (e.g. ./Slicer myimage.seg.nrrd)

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2017-11-29 12:13 fbudin New Issue
2017-11-29 12:13 fbudin Status new => assigned
2017-11-29 12:13 fbudin Assigned To => jcfr