Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Modules/IO/IPL/src/itkIPLCommonImageIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ IPLCommonImageIO::ReadImageInformation()
FileNameToRead = _imagePath;

this->m_ImageHeader = this->ReadHeader(FileNameToRead.c_str());
//
// if anything fails in the header read, just let
// exceptions propagate up.
if (m_ImageHeader == nullptr)
{
itkExceptionMacro("ReadHeader failed for " << FileNameToRead);
}

bool isCT = false;
std::string modality = m_ImageHeader->modality;
Expand Down Expand Up @@ -224,6 +225,10 @@ IPLCommonImageIO::ReadImageInformation()
// throw an exception, and we'd just want to skip it.
continue;
}
if (curImageHeader == nullptr)
{
itkExceptionMacro("ReadHeader failed for " << fullPath);
}
Comment thread
hjmjohnson marked this conversation as resolved.
if ((((isCT) ? curImageHeader->examNumber : curImageHeader->echoNumber) == m_FilenameList->GetKey2()) &&
(curImageHeader->seriesNumber == m_FilenameList->GetKey1()))
{
Expand Down
Loading