Skip to content

Conversation

@Sunderlandkyl
Copy link
Contributor

This commit creates a generic base class vtkPlusParameters from vtkPlusUsImagingParameters that is now used for both ultrasound and camera control parameters. The new camera control parameters class contains the ability to set camera properties from the config file, and eventually through commands.

Camera control properties are:

  • PanDegrees
  • TiltDegrees
  • RollDegrees
  • ZoomMm
  • IrisFStop
  • ExposureLog2Seconds
  • AutoExposure
  • FocusMm
  • AutoFocus

Example config file element:

<CameraControlParameters>
  <Parameter Name="AutoExposure" Value="True"/>
  <Parameter Name="AutoFocus" Value="False"/>
  <Parameter Name="FocusMm" Value="100"/>
  <Parameter Name="ExposureLog2Seconds" Value="-3"/>
</CameraControlParameters>

Not that not all parameters will be adjustable for all cameras.

@Sunderlandkyl Sunderlandkyl force-pushed the camera_control_parameters branch 4 times, most recently from f8f4f9a to 94f4c8e Compare July 8, 2025 15:55
@Sunderlandkyl Sunderlandkyl requested a review from Copilot July 8, 2025 15:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a new generic parameter storage base class and extends camera control support for Media Foundation video sources:

  • Extract common parameter logic from vtkPlusUsImagingParameters into vtkPlusParameters
  • Introduce vtkPlusCameraControlParameters for pan/tilt/roll/zoom/iris/exposure/focus
  • Wire camera parameters into vtkPlusMmfVideoSource (read/write/config/apply)

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/PlusDataCollection/vtkPlusUsImagingParameters.h Updated to inherit from new vtkPlusParameters base
src/PlusDataCollection/vtkPlusParameters.{h,cxx} New base class for storing and serializing parameters
src/PlusDataCollection/vtkPlusCameraControlParameters.{h,cxx} New class for camera control parameters
src/PlusDataCollection/MicrosoftMediaFoundation/vtkPlusMmfVideoSource.{h,cxx} Hooked up camera control parameter read/write/apply logic
src/PlusDataCollection/CMakeLists.txt Added new sources and headers to the build
Comments suppressed due to low confidence (2)

src/PlusDataCollection/vtkPlusCameraControlParameters.h:19

  • [nitpick] The class comment still refers to "ultrasound video device". Update it to document that this class handles camera control parameters.
\brief This class is used to store a configuration of the imaging parameters of an ultrasound video device.

src/PlusDataCollection/vtkPlusParameters.h:13

  • std::stringstream is used in the templated GetValue/SetValue methods but <sstream> is not included. Add #include <sstream> to ensure the header compiles cleanly.
#include <map>

@Sunderlandkyl Sunderlandkyl force-pushed the camera_control_parameters branch from 94f4c8e to 75b2a95 Compare July 8, 2025 16:37
…osoft Media foundation device

This commit creates a generic base class vtkPlusParameters from vtkPlusUsImagingParameters that is now used for both ultrasound and camera control parameters.
The new camera control parameters class contains the ability to set camera properties from the config file, and eventually through commands.

Camera control properties are:
- PanDegrees
- TiltDegrees
- RollDegrees
- ZoomMm
- IrisFStop
- ExposureLog2Seconds
- AutoExposure
- FocusMm
- AutoFocus

Example config file element:
```
<CameraControlParameters>
  <Parameter Name="AutoExposure" Value="True"/>
  <Parameter Name="AutoFocus" Value="False"/>
  <Parameter Name="FocusMm" Value="100"/>
  <Parameter Name="ExposureLog2Seconds" Value="-3"/>
</CameraControlParameters>
```

Not that not all parameters will be adjustable for all cameras.
@Sunderlandkyl Sunderlandkyl force-pushed the camera_control_parameters branch from 75b2a95 to 37f4457 Compare July 8, 2025 16:43
@Sunderlandkyl Sunderlandkyl merged commit 1d9524d into PlusToolkit:master Jul 8, 2025
9 checks passed
@Sunderlandkyl Sunderlandkyl deleted the camera_control_parameters branch July 8, 2025 17:22
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.

1 participant