-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
VTK io fixes #1279
VTK io fixes #1279
Conversation
VictorLamoine
commented
Jul 15, 2015
- Return value is now a boolean instead of the number of faces in the model
- Enable user to choose between ASCII/binary formats
Why do you think returning But nevertheless, your are correct that the output value of |
In the case the writer didn't write all the faces (eg: full file system) the number of faces (different from 0) returned will be converted to a It's safer to check
I doubt people rely on something un-documented. |
int error_code; | ||
if (binary_format) | ||
{ | ||
pcl::PointCloud<pcl::PointXYZRGB> cloud; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, seems like my comment on this line disappeared somehow. Repeating: why this specific point type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been lost here.
Why not? I don't know how I should handle this kind of case 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the mesh cloud contained different channels than XYZRGBA?
But anyway, I'm not sure why you make this cast for the "binary" case. The savePCDFile() function allows to save blob point clouds in binary mode as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, I missed this one. Fixed
Ok, agree. |
return (0); | ||
return (static_cast<int> (mesh.cloud.width * mesh.cloud.height)); | ||
return (false); | ||
return (true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about collapsing these 15 lines of code (85-99) into something like:
return (pcl::io::savePCDFile (file_name, mesh.cloud, Eigen::Vector4f::Zero (),
Eigen::Quaternionf::Identity (), binary_format) == 0);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes :)