Skip to content

Conversation

@B1ueber2y
Copy link
Contributor

@B1ueber2y B1ueber2y commented Aug 11, 2025

To align with Image::SetCameraId and Image::SetFrameId.

@B1ueber2y B1ueber2y requested review from ahojnnes and sarlinpe August 11, 2025 18:19
void Frame::SetRigId(const rig_t rig_id) {
THROW_CHECK_NE(rig_id, kInvalidRigId);
THROW_CHECK(!HasRigPtr());
rig_id_ = rig_id;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, if the rig has a pointer, we could just check that its ID is consistent?

Copy link
Contributor Author

@B1ueber2y B1ueber2y Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the rig has a pointer, it means that the ID has been set before, since setting the pointer requires the ID to be set beforehand. So there are actually no practical cases where we want to set the ID after the pointer.

Also, the current fix is consistent with Image::SetCamreaId and Image::SetFrameId.

@ahojnnes ahojnnes merged commit c0393e2 into colmap:main Aug 11, 2025
13 checks passed
@B1ueber2y B1ueber2y deleted the fix/id_setter branch August 13, 2025 13:41
tavislocus pushed a commit to tavislocus/colmap_6dof that referenced this pull request Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants