Commit 1e849019 authored by David Gobbi's avatar David Gobbi
Browse files

Fix a vtkDICOMImageReader crash for empty SliceLocation.

If the SliceLocation tag was present but empty, the reader would crash.
This fix adds a check.
parent 51c49664
...@@ -553,7 +553,7 @@ void DICOMAppHelper::SliceLocationCallback(DICOMParser *parser, ...@@ -553,7 +553,7 @@ void DICOMAppHelper::SliceLocationCallback(DICOMParser *parser,
this->Implementation->SliceOrderingMap.insert(dicom_stl::pair<const dicom_stl::string, this->Implementation->SliceOrderingMap.insert(dicom_stl::pair<const dicom_stl::string,
DICOMOrderingElements>(parser->GetFileName(), ord)); DICOMOrderingElements>(parser->GetFileName(), ord));
} }
else else if (val)
{ {
// file found, add new values // file found, add new values
(*it).second.SliceLocation = (*it).second.SliceLocation =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment