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
Crop the points inside a box and save as as a separate point cloud #129
Conversation
Hey, cool feature. Only just saw it now! |
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.
LGTM
Please consider the new comments :)
labelCloud/control/controller.py
Outdated
|
||
def crop_pointcloud_inside_active_bbox(self) -> None: | ||
box = self.bbox_controller.get_active_bbox() | ||
assert box is not None |
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.
I am a bit sceptical about using assert
outside tests.
Could this here ever be the case? Cause you only trigger this function, with a right click on an existing bounding box, or?
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.
The assertion is for mypy. You are right that this will never be the case as we only trigger it when we know there is an active box. Alternatively we can also return when box is None, but it is also redundant.
extensions = BasePointCloudHandler.get_supported_extensions() | ||
make_filter = " ".join(["*" + extension for extension in extensions]) | ||
file_filter = f"Point Cloud File ({make_filter})" | ||
file_name, _ = QFileDialog.getSaveFileName( |
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.
Nice with the selectable extensions 👍
62b797c
to
df6ebff
Compare
@@ -9,7 +9,7 @@ pytest~=7.1.2 | |||
pytest-qt~=4.1.0 | |||
|
|||
# Development | |||
black~=22.3.0 | |||
black~=23.1.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.
@ch-sa FYI black released a new major version yesterday and that is used in the Github Action. Update black in requirements.txt to align with Github Action.
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.
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.
Good to know 👍
This PR implements a functionality to crop the point cloud inside a box and save as a separate bounding box. It reuses the menu of the boxes. A feature request here: #27