Closed adamrankin closed 5 years ago
I agree that this would make sense to have a base class for cameras (especially if we add calibration, distortion correction, etc.). I would not mix this with ultrasound imaging but have a separate base class.
Sounds good.
It would also be nice to have a group for Tracker devices to change parameters like origin position live. We update the origin position of our absolute encoders for our motion stage after a calibration sequence using our custom wrapper around Plus.
Maybe vtkPlusDevice
needs a PlusStatus SetParameter(const std::string& name, const std::string& value)
or PlusStatus SetParameter(PLUS_DEVICE_PARAMETER parameter, const std::string& value)
function that can be overridden by child classes.
@lassoan My preferred solution to this would be to have SetParameter in vtkPlusDevice
and have the sub classes override it.
That way, we keep the unified architecture of vtkPlusDevice and each device can handle it however they choose.
Thoughts?
(I'm just thinking back as to why we merged image device and tracker device in the first place).
I'm just about to start implementing the ability to set tracker parameters for Atracsys remotely. I like @adamrankin's idea of putting the SetParameter in vtkPlusDevice and overriding this in the derived classes - I will look into how difficult this would be to implement.
I am coding up the base class implementation now, will upload a PR in ~30m-1h
Ahh, wonderful! Take your time
Infrastructure is available, people can add subclasses with specific behaviour as desired.
With OpenCV, V4L2, VFW, and MMF devices supporting webcams, it would be nice if we could change camera parameters live like we can for US devices.
Duplicating the subclass to
vtkPlusCameraDevice
is fine by me, but I was wondering if we wanted to generalizevtkPlusUsDevice
?