Skip to content

Commit

Permalink
Merge pull request #791 from KrisThielemans/ITK51fix
Browse files Browse the repository at this point in the history
ITK 5.1 compatibility fix
  • Loading branch information
KrisThielemans authored Jan 10, 2021
2 parents 046d173 + 42ce29b commit db110a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/IO/ITKImageInputFileFormat.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,13 @@ read_file_itk(const std::string &filename)
__FILE__, __LINE__);
return NULL; }

if (reader->GetImageIO()->GetPixelType() != itk::ImageIOBase::VECTOR) {
if (reader->GetImageIO()->GetPixelType() !=
#if ITK_VERSION_MAJOR<5 || (ITK_VERSION_MAJOR==5 && ITK_VERSION_MINOR==0)
itk::ImageIOBase::VECTOR
#else
itk::IOPixelEnum::VECTOR
#endif
) {
error("read_file_itk: Image type should be vector %s:%d.",
__FILE__, __LINE__);
return NULL; }
Expand Down

0 comments on commit db110a5

Please sign in to comment.