Skip to content

Commit

Permalink
MVE: Add loading of mvei images to load_image
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoehrle committed Jun 20, 2016
1 parent f4cd012 commit d790587
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libs/mve/image_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ load_file (std::string const& filename)
{ return load_ppm_file(filename); }
catch (util::FileException& e) { throw; }
catch (util::Exception& e) {}

try
{
ImageHeaders header = load_mvei_file_headers(filename);
if (header.type != IMAGE_TYPE_UINT8)
throw util::Exception("Invalid image format");
ImageBase::Ptr image = load_mvei_file(filename);
return std::dynamic_pointer_cast<ByteImage>(image);
}
catch (util::FileException& e) { throw; }
catch (util::Exception& e) {}
}
catch (util::FileException& e)
{
Expand Down

0 comments on commit d790587

Please sign in to comment.