DigitalZoomRectangle set programmatically in SC is reset after deselection of tile if manual/mouse PTZ input has been made

In our Plugin for SC we are setting DigitalZoomRectangle programmatically. It works perfectly in a layout with just one tile.

But in a layout with several tiles after the user made manual adjustments to the DigitalZoomRectangle via mouse input, the DigitalZoomRectangle is always reset to the manual DigitalZoomRectangle after selection of another tile in the layout even if we set the DigitalZoomRectangle programmatically after the manual adjusments.

I experimented using the Smart Client ImageViewerAddOn plugin sample. https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/scimagevieweraddonsample/readme.html&tree=tree_1.html

I observed that for cameras which do not have PTZ (real PTZ not digital) the Digital Zoom is global. If one camera in one view is set to digital zoom, all cameras in all views are set to digital zoom. If one camera in one view is taken out of digital zoom, all cameras in all views are not using digital zoom. In my observations it doesn’t matter if the digital zoom is set manually, by using the mouse in the camera menu, or is set by code, by using the plugin side-panel controls.

For cameras which have natively PTZ the behavior is the opposite, for each camera you can set or clear digital zoom individually. For this type of camera the setting for digital zoom is not global but individual.

Thank you for looking into this, Bo!

Do you know why this is implemented in that way? I find it very confusing. How can we determine if a camera has been “detected” as “PTZ-Camera”?

We try to set the DigitalZoomRectangle on the ImageViewerAddOns via Plug-In programmatically. It is reset to the position of the last manual adjustment after another tile has been selected. If there was no manual adjustment, everything works as expected. Is there any possible workaround?

Finding out if the camera is PTZ is easy, if you have the camera Item you can get Properties, all camera will have a property PTZ which is either Yes or No. Explaining the design is less easy, I was surprised when I discovered how it worked. I have reached out to a developer, but for now I can only say that the design happened a long time ago.

If you want to see Properties “with your own eyes”, you can run the ConfigDump plugin sample and find a camera. - https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/configdump/readme.html&tree=tree_1.html

I can reproduce the exact same behavior with the ImageViewerAddOn plugin sample.

Steps for reproduction:

  1. Open SC with view layout with several cameras.
  2. Enable Digital Zoom via ImageViewerAddOn plugin sample for one tile.
  3. Set arbitrary digital zoom rect via mouse.
  4. move the digital zoom rect via the movement controls of the ImageViewerAddOn plugin sample.
  5. Select another tile.
  6. See that the digital zoom rect returns to the rect that was drawn with the mouse.

This is definitely a bug. `How can we proceed from here?

I was able to reproduce and observe what you describe. Milestone Development will investigate and I will let you know what we find.

That’s good news, thanks Bo!

Hi Bo, any news on this topic?

I have no news to share, but can say that work is ongoing.

Milestone Development has developed a fix. The fix will be in 2025R1 that will be released soon. (Release plan says middle of March, please keep an eye on Milestone’s announcements..)

Thank you very much, Bo, that is great news!

Do you have an Issue-Number or something similar that I could use for keeping track of the issue?

The issue number will not help. It will not be mentioned in the new release notes. (On hotfix patches we use the issue number, but not on release notes. I trust you will be able to find it in the release notes by its description.)