Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PLY parser more tolerant towards files not adhering to standard #3542

Merged
merged 7 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
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
23 changes: 14 additions & 9 deletions io/include/pcl/io/ply/ply_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,18 +383,23 @@ namespace pcl
std::vector<std::shared_ptr<property>> properties;
};

info_callback_type info_callback_;
warning_callback_type warning_callback_;
error_callback_type error_callback_;
info_callback_type info_callback_ = [](std::size_t, const std::string&){};
warning_callback_type warning_callback_ = [](std::size_t, const std::string&){};
error_callback_type error_callback_ = [](std::size_t, const std::string&){};

magic_callback_type magic_callback_;
format_callback_type format_callback_;
element_definition_callback_type element_definition_callbacks_;
magic_callback_type magic_callback_ = [](){};
format_callback_type format_callback_ = [](format_type, const std::string&){};
comment_callback_type comment_callback_ = [](const std::string&){};
obj_info_callback_type obj_info_callback_ = [](const std::string&){};
end_header_callback_type end_header_callback_ = [](){return true;};

element_definition_callback_type element_definition_callbacks_ =
[](const std::string&, std::size_t)
{
return std::make_tuple([](){}, [](){});
kunaltyagi marked this conversation as resolved.
Show resolved Hide resolved
};
scalar_property_definition_callbacks_type scalar_property_definition_callbacks_;
list_property_definition_callbacks_type list_property_definition_callbacks_;
comment_callback_type comment_callback_;
obj_info_callback_type obj_info_callback_;
end_header_callback_type end_header_callback_;

template <typename ScalarType> inline void
parse_scalar_property_definition (const std::string& property_name);
Expand Down
Loading