Skip to content

Expose setters for undistortion parameters in Andor device#756

Merged
adamrankin merged 3 commits intoPlusToolkit:masterfrom
adamaji:andor-undistortion
Jan 6, 2021
Merged

Expose setters for undistortion parameters in Andor device#756
adamrankin merged 3 commits intoPlusToolkit:masterfrom
adamaji:andor-undistortion

Conversation

@adamaji
Copy link
Copy Markdown
Contributor

@adamaji adamaji commented Jan 5, 2021

This PR exposes setters/getters for camera intrinsics and distance coefficients for the Andor device, since these parameters must be changed for different binning settings.

Other small changes are converting the units for processed Andor images into counts/seconds and fixing a bug where correction images are loaded as the wrong type.

cc @jrojasUNC @dzenanz for review

Copy link
Copy Markdown
Contributor

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

Looks good, in-line suggestion.

}

// ----------------------------------------------------------------------------
PlusStatus vtkPlusAndorVideoSource::SetCameraIntrinsics(double* intrinsics)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Style-wise and from type safety standpoint, it might be better to use std::vector<double> or std::array<double, 9>. Possibly also update ivar to be the same type.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, pushed a change for this. I left the internal var as is, because I wasn't sure how to handle Set/GetVectorAttribute nicely in Read/WriteConfiguration which was complaining about expecting double *s.

@adamaji adamaji force-pushed the andor-undistortion branch from 4715427 to 40a0d60 Compare January 6, 2021 15:44
@adamrankin adamrankin merged commit 486a65b into PlusToolkit:master Jan 6, 2021
@adamaji adamaji deleted the andor-undistortion branch January 6, 2021 16:55
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.

3 participants