VideoOS.Platform.Client.ImageViewerWpfControl Class Referencesealed

This class is available in the Smart Client and the .Net Library.
Supported from Smart Client 2017 R3 It embeds and manages one ImageViewerWpfControl with the following key functions:
More...

Inheritance diagram for VideoOS.Platform.Client.ImageViewerWpfControl:

Public Types

enum  FpsRate { High = 1 , Medium = 2 , Low = 3 }
 Defines how recorder should transcode video frames. Used on the SetVideoResolutionAndFPS method. More...
 

Public Member Functions

void ClearOverlay (int id)
 Clear a specific overlay placed earlier. The id used during the SetOverlay() call is used in this method for clearing that overlay again.
 
void Close ()
 Should be called for the underlaying controls to clean up entirely.
 
bool ConfigureOverlayText (bool enable)
 Controls how overlayed text is displayed for built-in messages. All built-in text messages are configured.
 
bool ConfigureOverlayText (OverlayTextId textId, bool enable)
 Controls how overlayed text is displayed for built-in messages. The textId identifies the text / message being configured.
 
bool ConfigureOverlayTextAndImage (bool enable, bool blank)
 Controls how overlayed text is displayed for built-in messages. All built-in text messages are configured.
 
bool ConfigureOverlayTextAndImage (OverlayTextId textId, bool enable, bool blank)
 Controls how overlayed text is displayed for built-in messages. The textId identifies the text / message being configured.
 
void Connect ()
 This method will connect the recording server owning the camera.
The CameraFQID property must have been set, and the Initialize() method called before this method can be called.
 
void Disconnect ()
 Disconnect current session to the recording server.
Following this call, the CameraFQID can be changed and a new session be established by a call to the Connect() method.
 
void Dispose ()
 
System.Drawing.Bitmap GetCurrentDisplayedImageAsBitmap ()
 Get the latest displayed Image including the overlays and privacy mask.
Note that if no image has been received from the server, a null is returned.
Important: If the returned Bitmap is used in a UserControl, like a PictureBox, the control will hold to the original Bitmap. This can cause issues when the original source of the Bitmap attempts to dispose it.
Recommendation is to create another Bitmap directly upon calling this method, when passing it on to a PictureBox.
 
System.Drawing.Bitmap GetCurrentDisplayedImageAsBitmap (bool digitalZoomOnly)
 Overloaded method to control if the original or the digital zoomed image is requested.
 
 ImageViewerWpfControl ()
 Constructor. Can be used within Smart Client plug-ins and standalone application.
 
 ImageViewerWpfControl (WindowInformation windowInformation)
 Constructor. Only to be used within Smart Client.
The WindowInformation class should be passed on from the ViewItemUserControl that this control will be added to.
The main effect of adding the WindowInformation is that the ImageViewer will run in live and playback mode just like the Smart Client usually do, e.g. floating windows have different mode than the main window.
 
void Initialize ()
 Issue this method after the cameraFQID has been set to initialize the control.
 
void PtzCenter (int refWidth, int refHeight, int centerX, int centerY, int zoom)
 Perform PTZ Center in the current mode. Either Digital zoom, PanoramicLens (Fisheye), or physical camera move.
 
void SetImageQuality (int percent)
 Standalone SDK only. Tell the Recording Server how much to compress each JPEG.

The value can be a number between 1..100.
Or one of the special values:
SuperHigh = 101
High = 102
Medium = 103
Low = 104

 
void SetOverlay (System.Drawing.Bitmap bitmap, int id, bool keepAspectRatio, bool scaleWithDigitalZoom, bool scaleOverlay, double scaleFactor, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, double absolutePositionX, double absolutePositionY)
 Place a Bitmap on top of the video being showed.
Consider using ShapesOverlayAdd(List<Shape>, ShapesOverlayRenderParameters) and ShapesOverlayUpdate(Guid, List<Shape>) instead as they have better performance.
After the bitmap has been set, it will remain on top of all following displayed video.
The size of the bitmap can be any size that makes sense, when taking the quality into consideration. If a bitmap of e.g. (320,280) is used for creating the overlay, it can via the parameters be scaled up to the actual size of the video being displayed.
Note: It is invalid set scale to true, while placing an overlay with absolute positions.
Note: SetOverlay does not dispose the bitmap. It is up to the caller to call dispose when appropiate.
 
bool SetRenderingOptions (String xmlParameters)
 Sets specific options for how to render video. The xmlParameter is forwarded to the ImageViewer presentation control.
The document must have as its top element "<![CDATA[<RenderingOptions>]]>".
 
void SetVideoQuality (int smoothBufferSize, int cpusToUtilize)
 Configure how decoding and display should work. This call represent the same functionality as the VideoQuality slider setup for a CameraViewItem.
The change will take effect the next time a camera session is established. The smoothBufferSize parameter should have value in the range 1..100, where 1 is the lowest allowable quality and 100 is the highest allowable quality. The value represent how much of the maximum allocated buffer is used.
When the smoothBufferSize is 0 - buffering will be turned off, and values will be the original defaults.
 
void SetVideoResolutionAndFps (Size resolution, FpsRate fpsRate)
 Standalone SDK only. The FPSRate will be used to tell the server what to transmit to this client.
For H.264, values of Medium and Low will be key-frames only.
For H.265, values of Medium and Low will be key-frames only.
For JPEG, a normal framerate of 25, will give 25 for High, 4 or 5 for medium, and 1 for low.
 
void SetVideoResolutionAndFps (Size resolution, int fps)
 Obsolete.
 
Guid ShapesOverlayAdd (List< Shape > overlayShapes, ShapesOverlayRenderParameters renderParameters)
 Method to add overlay shapes.
 
void ShapesOverlayRemove (Guid id)
 Method to remove existing overlay shapes.
 
bool ShapesOverlayUpdate (Guid id, List< Shape > overlayShapes)
 Method to update existing overlay shapes.
 
bool ShapesOverlayUpdate (Guid id, List< Shape > overlayShapes, ShapesOverlayRenderParameters renderParameters)
 Method to update existing overlay shapes.
 
bool ShapesOverlayUpdate (Guid id, ShapesOverlayRenderParameters renderParameters)
 Method to update existing overlay shapes.
 
void StartBrowse ()
 This method is only valid for DVR attached devices, as the playback and Live function is controlled by the ImageViewer for those.
In the Smart Client and the .Net library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP environment, e.g. change mode to Live/Browse as this mode is changed by the user.
In the Smart Client this means that it follows the normal rule for the window it resides on. The method should therefore only be used in the Smart Client if the control does not reside in a ViewItem. If it resides in a ViewItem, the SmartClient.ModeChangeCommand message should be used with EnvironmentManager.Instance.PostMessage/> instead.
In the .Net library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

 
void StartLive ()
 This method is only valid for DVR attached devices, as the playback and Live function is controlled by the ImageViewer for those.
In the Smart Client and the .Net library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP environment, e.g. change mode to Live/Browse as this mode is changed by the user.
In the Smart Client this means that it follows the normal rule for the window it resides on. The method should therefore only be used in the Smart Client if the control does not reside in a ViewItem. If it resides in a ViewItem, the SmartClient.ModeChangeCommand message should be used with EnvironmentManager.Instance.PostMessage/> instead.
In the .Net library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

 
void StartSetup ()
 This will set the ImageViewer in setup mode. Avoid using this, as it is normally controlled by the Mode set in the EnvironmentManager.
 
void UpdateStates ()
 When some of the 'Enabled' properties have been changed, this method will check for any changes and carry them out on the UI.
 

Properties

bool AdaptiveStreaming [get, set]
 Determine the stream resolution should be adapted based on the view size.
Only applicable in standalone SDK. In Smart Client adaptive streaming is controlled by the general Smart Client settings.
 
FQID CameraFQID [get, set]
 Identifies the camera that is to be displayed in the control.
This property needs to be set before the Initialize() method is called.
 
bool EnableBrowseMode [get, set]
 Defines if this ImageViewerControl should be enabled in Browse (Playback) mode.
If this property is false, the UserControl becomes disabled during Browse (Playback) mode.
Default is true.
 
bool EnableDigitalZoom [get, set]
 Defines if this ImageViewerControl allow the user to perform digital zoom operations.

 
bool EnableMouseControlledPtz [get, set]
 Defines if mouse controlled PTZ should be possible. When set to true, the user can use click on video to do center-to-click and also right click and open a square of an area to zoom to.
Default is true.
 
bool EnableMousePtzEmbeddedHandler [get, set]
 Defines if mouse controlled PTZ should be handled automatically by this component.
When set to true, the user actions will be handled automatically and no Messages or events will be issued to this class, but will be forwarded to the recording server that again will send to the camera.
When set to false, the user selection will be send to the MIP Plugin or application via MIP Messages. Default is true.
 
bool EnableSetupMode [get, set]
 Defines if this ImageViewerControl should be enabled in Setup mode.
If this property is false, the UserControl becomes disabled during Setup mode.
Default is true.
 
bool EnableVisibleCameraName [get, set]
 Defines if the name of the camera is displayed in the header line. Default is true.
 
bool EnableVisibleHeader [get, set]
 Defines if the blue header is displayed or not. Default is true.
 
bool EnableVisibleLiveIndicator [get, set]
 Defines if the blinking green live indicator and the red motion indicator is visible. Default is true.
 
bool EnableVisibleTimestamp [get, set]
 Defines if the timestamps should be shown in the top line during playback.
 
bool Hidden [get, set]
 When another ViewItem is maximized, this property is set to true.
 
Size ImageSize [get, set]
 Contains the size of the original image before it was scaled to available display area.
 
String InfoText [get, set]
 Used for displaying a text when the ImageViewer ImageViewer is NOT shown. When the ShowImageViewer is set to false, the text stored in the InfoText field will be displayed.
The text is displayed in Color.Black on a transparent background.
 
bool MaintainImageAspectRatio [get, set]
 Flag to instruct the presentation of the video to be displayed with the original aspect ratio (Default), or to fill the entire viewable area.
 
bool Maximized [get, set]
 Defines if this ImageViewerControl is currently in a Maximized ViewItem.
This property cannot be used to maximize a ViewItem, use a SendMessage for that.
 
Point PaintLocation [get, set]
 Contains the location of actual image within this usercontrol.
 
Size PaintSize [get, set]
 Contains the size of the areas used for video.
 
FQID PlaybackControllerFQID [get, set]
 Defines which PlaybackController is controlling this ImageViewer in Playback mode. The FQID used here is returned by the ClientControl.GeneratePlaybackController() method.

 
bool Selected [get, set]
 Define if this ImageViewerControl is in the currently selected ViewItem.
When set to true, the top bar of the ImageViewerControl will change color to a brighter color and digital zoom events like e.g. the scroll-wheel will be propagated to this control.
This property cannot be used in the Smart Client to select your own ImageViewerControl, use a SendMessage for that.
 
bool ShowImageViewer [get, set]
 This property can be used to control if the ImageViewer should be shown or not.
This can for example be used to hide the ImageViewer when there is no camera defined yet.
When the ImageViewer is not shown, the InfoText field is displayed instead.
 
bool ShowInitialImage [get, set]
 Determine whether to send an initial image before the stream is started AND
control how the "Camera feed has stopped" message is displayed
Only applicable in standalone SDK.
 
Guid StreamId [get, set]
 Identifies which stream to use.
Use the StreamDataSource class to get a list of available streams. Note that multiple stream support is obly available on some Milestone products.
 
bool SuppressUpdateOnMotionOnly [get, set]
 Defines whether the Update On Motion Only camera param is suppressed.
 
bool UsingMulticast [get, set]
 Indicates if the video is received from the recording server via multicast.
 

Events

EventHandler< ConnectResponseEventArgsConnectResponseReceived = delegate { }
 Register on this event to be called when a connection has completed.
 
EventHandler< ImageDisplayedEventArgsImageDisplayed = delegate { }
 Called for every image being displayed, exactly when it is presented to the operator.
The method registered on this event MUST be VERY short.
 
EventHandler< ImageOrPaintInfoChangedEventArgsImageOrPaintInfoChanged = delegate { }
 Is fired when one of the these field has been changed: ImageSize, PaintSize, PaintLocation.
 
EventHandler< LiveStreamInformationReceivedEventArgsLiveStreamInformationReceived = delegate { }
 Register on this event to be called when the live stream XML information is available.
 
EventHandler< RecordedImageReceivedEventArgsRecordedImageReceived = delegate { }
 Register on this event to be called when a recorded image has been received.
 

Detailed Description

This class is available in the Smart Client and the .Net Library.
Supported from Smart Client 2017 R3 It embeds and manages one ImageViewerWpfControl with the following key functions:

  • separates the display component and version from your implementation
  • has built-in handling of digital zoom
  • Playback can be obtained by creating PlaybackController and assign imageViewerControl.PlaybackControllerFQID = playbackController.FQID. to link these classes together (Created via the ClientControl class).
  • Playback user control can be used, check out PlaybackUserControl (Created via the ClientControl class).

    A simple implementation just need these lines for initialization:
    imageViewerControl.CameraFQID = _selectedCameraItem.FQID;
    imageViewerControl.Initialize();
    imageViewerControl.Connect();
    When the session is to be terminated, issue the following statement:
    imageViewerControl.Disconnect();
    After this you can connect again to the same or another camera. Once you are completely done with the image viewer call this:
    imageViewerControl.Close();
    imageViewerControl.Dispose();
    In the Smart Client and the .Net Library the default implementation will ensure that an ImageViewerWpfControl will follow the mode of the MIP Environment, e.g. change mode to Live/Browse/Setup as this mode is changed by the user.
    In the smart Client this means that it follows the normal rule for window it resides on, e.g. Smart Client mode in the main window and live mode in floating windows.
    In the .Net Library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

Member Enumeration Documentation

◆ FpsRate

Defines how recorder should transcode video frames. Used on the SetVideoResolutionAndFPS method.

Enumerator
High 
Medium 
Low 

Constructor & Destructor Documentation

◆ ImageViewerWpfControl() [1/2]

VideoOS.Platform.Client.ImageViewerWpfControl.ImageViewerWpfControl ( )
inline

Constructor. Can be used within Smart Client plug-ins and standalone application.

◆ ImageViewerWpfControl() [2/2]

VideoOS.Platform.Client.ImageViewerWpfControl.ImageViewerWpfControl ( WindowInformation windowInformation)
inline

Constructor. Only to be used within Smart Client.
The WindowInformation class should be passed on from the ViewItemUserControl that this control will be added to.
The main effect of adding the WindowInformation is that the ImageViewer will run in live and playback mode just like the Smart Client usually do, e.g. floating windows have different mode than the main window.

Parameters
windowInformation

Member Function Documentation

◆ ClearOverlay()

void VideoOS.Platform.Client.ImageViewerWpfControl.ClearOverlay ( int id)
inline

Clear a specific overlay placed earlier. The id used during the SetOverlay() call is used in this method for clearing that overlay again.

Parameters
id

◆ Close()

void VideoOS.Platform.Client.ImageViewerWpfControl.Close ( )
inline

Should be called for the underlaying controls to clean up entirely.

◆ ConfigureOverlayText() [1/2]

bool VideoOS.Platform.Client.ImageViewerWpfControl.ConfigureOverlayText ( bool enable)
inline

Controls how overlayed text is displayed for built-in messages. All built-in text messages are configured.

Parameters
enableWhen set to true, the text is displayed; when set to false the text is suppressed.
Returns
True if successful

◆ ConfigureOverlayText() [2/2]

bool VideoOS.Platform.Client.ImageViewerWpfControl.ConfigureOverlayText ( OverlayTextId textId,
bool enable )
inline

Controls how overlayed text is displayed for built-in messages. The textId identifies the text / message being configured.

Parameters
textIdText id of the message to control,
enableWhen set to true, the text is displayed; when set to false the text is suppressed.
Returns
True if successful

◆ ConfigureOverlayTextAndImage() [1/2]

bool VideoOS.Platform.Client.ImageViewerWpfControl.ConfigureOverlayTextAndImage ( bool enable,
bool blank )
inline

Controls how overlayed text is displayed for built-in messages. All built-in text messages are configured.

Parameters
enableWhen set to true, the text is displayed; when set to false the etxt is suppressed.
blankWhen set to false, the image is drawn; when set to true the image is not drawn.
Returns
True if successful

◆ ConfigureOverlayTextAndImage() [2/2]

bool VideoOS.Platform.Client.ImageViewerWpfControl.ConfigureOverlayTextAndImage ( OverlayTextId textId,
bool enable,
bool blank )
inline

Controls how overlayed text is displayed for built-in messages. The textId identifies the text / message being configured.

Parameters
textIdText id of the message to control,
enableWhen set to true, the text is displayed; when set to false the etxt is suppressed.
blankWhen set to false, the image is drawn; when set to true the image is not drawn.
Returns
True if successful

◆ Connect()

void VideoOS.Platform.Client.ImageViewerWpfControl.Connect ( )
inline

This method will connect the recording server owning the camera.
The CameraFQID property must have been set, and the Initialize() method called before this method can be called.

◆ Disconnect()

void VideoOS.Platform.Client.ImageViewerWpfControl.Disconnect ( )
inline

Disconnect current session to the recording server.
Following this call, the CameraFQID can be changed and a new session be established by a call to the Connect() method.

◆ Dispose()

void VideoOS.Platform.Client.ImageViewerWpfControl.Dispose ( )
inline

◆ GetCurrentDisplayedImageAsBitmap() [1/2]

System.Drawing.Bitmap VideoOS.Platform.Client.ImageViewerWpfControl.GetCurrentDisplayedImageAsBitmap ( )
inline

Get the latest displayed Image including the overlays and privacy mask.
Note that if no image has been received from the server, a null is returned.
Important: If the returned Bitmap is used in a UserControl, like a PictureBox, the control will hold to the original Bitmap. This can cause issues when the original source of the Bitmap attempts to dispose it.
Recommendation is to create another Bitmap directly upon calling this method, when passing it on to a PictureBox.

Bitmap bitmap = imageViewControl.GetCurrentDisplayedImageAsBitmap();
if (bitmap!=null)
{
myPictureBox.Image = newBitmap(bitmap, myPictureBox.Size()); // If you like to resize to picturebox size
bitmap.Dispose();
} else
{
// Clear the picturebox ...
}
Returns
A bitmap or null or no image is available.

◆ GetCurrentDisplayedImageAsBitmap() [2/2]

System.Drawing.Bitmap VideoOS.Platform.Client.ImageViewerWpfControl.GetCurrentDisplayedImageAsBitmap ( bool digitalZoomOnly)
inline

Overloaded method to control if the original or the digital zoomed image is requested.

Returns

◆ Initialize()

void VideoOS.Platform.Client.ImageViewerWpfControl.Initialize ( )
inline

Issue this method after the cameraFQID has been set to initialize the control.

◆ PtzCenter()

void VideoOS.Platform.Client.ImageViewerWpfControl.PtzCenter ( int refWidth,
int refHeight,
int centerX,
int centerY,
int zoom )
inline

Perform PTZ Center in the current mode. Either Digital zoom, PanoramicLens (Fisheye), or physical camera move.

The zoom parameter can be -1 for no change, or a range from 0..1000, where 0 will zoom out completely. The other values are can be in any size and does not relate to the real resolution of the image.

_imageViewerControl1.PtzCenter(100, 100, 25, 50, 500);

Will zoom 50% and center around a point (25,50) to the left hand side of the image.

Parameters
refWidthReference width of center
refHeightReference height of center
centerX
centerY
zoom

◆ SetImageQuality()

void VideoOS.Platform.Client.ImageViewerWpfControl.SetImageQuality ( int percent)
inline

Standalone SDK only. Tell the Recording Server how much to compress each JPEG.

The value can be a number between 1..100.
Or one of the special values:
SuperHigh = 101
High = 102
Medium = 103
Low = 104

Note: Values below 100 are not supported.

Parameters
percent

◆ SetOverlay()

void VideoOS.Platform.Client.ImageViewerWpfControl.SetOverlay ( System.Drawing.Bitmap bitmap,
int id,
bool keepAspectRatio,
bool scaleWithDigitalZoom,
bool scaleOverlay,
double scaleFactor,
VerticalAlignment verticalAlignment,
HorizontalAlignment horizontalAlignment,
double absolutePositionX,
double absolutePositionY )
inline

Place a Bitmap on top of the video being showed.
Consider using ShapesOverlayAdd(List<Shape>, ShapesOverlayRenderParameters) and ShapesOverlayUpdate(Guid, List<Shape>) instead as they have better performance.
After the bitmap has been set, it will remain on top of all following displayed video.
The size of the bitmap can be any size that makes sense, when taking the quality into consideration. If a bitmap of e.g. (320,280) is used for creating the overlay, it can via the parameters be scaled up to the actual size of the video being displayed.
Note: It is invalid set scale to true, while placing an overlay with absolute positions.
Note: SetOverlay does not dispose the bitmap. It is up to the caller to call dispose when appropiate.

Parameters
bitmap
id
keepAspectRatio
scaleWithDigitalZoom
scaleOverlay
scaleFactor
verticalAlignment
horizontalAlignment
absolutePositionX
absolutePositionY

◆ SetRenderingOptions()

bool VideoOS.Platform.Client.ImageViewerWpfControl.SetRenderingOptions ( String xmlParameters)
inline

Sets specific options for how to render video. The xmlParameter is forwarded to the ImageViewer presentation control.
The document must have as its top element "<![CDATA[<RenderingOptions>]]>".

Example of a valid rendering options xml document: "<RenderingOptions><Deinterlacing><Method>BOB_TOP</Method></Deinterlacing></RenderingOptions>"

Deinterlacing options supported: "<Deinterlacing><Method>...</Method></Deinterlacing>" Where ... is one of

"DEFAULT": Set deinterlacing method to the legacy mode that may weave fields.

"BOB_TOP": Set deinterlacing method to bob. Preferently bob the top field.

"BOB_BOTTOM": Set deinterlacing method to bob. Preferently bob the bottom field.

"CONTENT_ADAPTIVE_VERTICAL_TEMPORAL": Set deinterlacing to content adaptive veritcal temportal (CAVT).
CAVT is a filter that suppresses interlacing artifacts by analysis of each frame (top + bottom field).
The CAVT deinterlacing variant accept a Threshold parameter in the range 0..255, eg. "<RenderingOptions><Deinterlacing><Method>CONTENT_ADAPTIVE_VERTICAL_TEMPORAL</Method><Threshold>20</Threshold></Deinterlacing></RenderingOptions>" Threshold default (used if element is not present) is 12. The threshold determines the level of vertical variation that causes the filter to kick in. Furthermore CAVT accept a PreferredField parameter (either "TOP" (default) or "BOTTOM") that controls the field to bob for low resolution rendering, e.g. "<RenderingOptions><Deinterlacing><Method>CONTENT_ADAPTIVE_VERTICAL_TEMPORAL</Method><PreferredField>BOTTOM</PreferredField></Deinterlacing></RenderingOptions>"

Parameters
xmlParameters
Returns

◆ SetVideoQuality()

void VideoOS.Platform.Client.ImageViewerWpfControl.SetVideoQuality ( int smoothBufferSize,
int cpusToUtilize )
inline

Configure how decoding and display should work. This call represent the same functionality as the VideoQuality slider setup for a CameraViewItem.
The change will take effect the next time a camera session is established. The smoothBufferSize parameter should have value in the range 1..100, where 1 is the lowest allowable quality and 100 is the highest allowable quality. The value represent how much of the maximum allocated buffer is used.
When the smoothBufferSize is 0 - buffering will be turned off, and values will be the original defaults.

Parameters
smoothBufferSizeThe percent of buffer to utilize. A number of 100 will use all available buffer, e.g. 4 seconds
cpusToUtilizeThe number of CPU cores to use during decoding

◆ SetVideoResolutionAndFps() [1/2]

void VideoOS.Platform.Client.ImageViewerWpfControl.SetVideoResolutionAndFps ( Size resolution,
FpsRate fpsRate )
inline

Standalone SDK only. The FPSRate will be used to tell the server what to transmit to this client.
For H.264, values of Medium and Low will be key-frames only.
For H.265, values of Medium and Low will be key-frames only.
For JPEG, a normal framerate of 25, will give 25 for High, 4 or 5 for medium, and 1 for low.

Parameters
resolution
fpsRate

◆ SetVideoResolutionAndFps() [2/2]

void VideoOS.Platform.Client.ImageViewerWpfControl.SetVideoResolutionAndFps ( Size resolution,
int fps )
inline

Obsolete.


◆ ShapesOverlayAdd()

Guid VideoOS.Platform.Client.ImageViewerWpfControl.ShapesOverlayAdd ( List< Shape > overlayShapes,
ShapesOverlayRenderParameters renderParameters )
inline

Method to add overlay shapes.

The returned Guid is used to later modify and remove the overlays.

Parameters
overlayShapes
renderParameters
Returns

◆ ShapesOverlayRemove()

void VideoOS.Platform.Client.ImageViewerWpfControl.ShapesOverlayRemove ( Guid id)
inline

Method to remove existing overlay shapes.

Parameters
id

◆ ShapesOverlayUpdate() [1/3]

bool VideoOS.Platform.Client.ImageViewerWpfControl.ShapesOverlayUpdate ( Guid id,
List< Shape > overlayShapes )
inline

Method to update existing overlay shapes.

Parameters
id
overlayShapes
Returns

◆ ShapesOverlayUpdate() [2/3]

bool VideoOS.Platform.Client.ImageViewerWpfControl.ShapesOverlayUpdate ( Guid id,
List< Shape > overlayShapes,
ShapesOverlayRenderParameters renderParameters )
inline

Method to update existing overlay shapes.

Parameters
id
overlayShapes
renderParameters
Returns

◆ ShapesOverlayUpdate() [3/3]

bool VideoOS.Platform.Client.ImageViewerWpfControl.ShapesOverlayUpdate ( Guid id,
ShapesOverlayRenderParameters renderParameters )
inline

Method to update existing overlay shapes.

Parameters
id
renderParameters
Returns

◆ StartBrowse()

void VideoOS.Platform.Client.ImageViewerWpfControl.StartBrowse ( )
inline

This method is only valid for DVR attached devices, as the playback and Live function is controlled by the ImageViewer for those.
In the Smart Client and the .Net library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP environment, e.g. change mode to Live/Browse as this mode is changed by the user.
In the Smart Client this means that it follows the normal rule for the window it resides on. The method should therefore only be used in the Smart Client if the control does not reside in a ViewItem. If it resides in a ViewItem, the SmartClient.ModeChangeCommand message should be used with EnvironmentManager.Instance.PostMessage/> instead.
In the .Net library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

◆ StartLive()

void VideoOS.Platform.Client.ImageViewerWpfControl.StartLive ( )
inline

This method is only valid for DVR attached devices, as the playback and Live function is controlled by the ImageViewer for those.
In the Smart Client and the .Net library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP environment, e.g. change mode to Live/Browse as this mode is changed by the user.
In the Smart Client this means that it follows the normal rule for the window it resides on. The method should therefore only be used in the Smart Client if the control does not reside in a ViewItem. If it resides in a ViewItem, the SmartClient.ModeChangeCommand message should be used with EnvironmentManager.Instance.PostMessage/> instead.
In the .Net library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

◆ StartSetup()

void VideoOS.Platform.Client.ImageViewerWpfControl.StartSetup ( )
inline

This will set the ImageViewer in setup mode. Avoid using this, as it is normally controlled by the Mode set in the EnvironmentManager.

◆ UpdateStates()

void VideoOS.Platform.Client.ImageViewerWpfControl.UpdateStates ( )
inline

When some of the 'Enabled' properties have been changed, this method will check for any changes and carry them out on the UI.

Property Documentation

◆ AdaptiveStreaming

bool VideoOS.Platform.Client.ImageViewerWpfControl.AdaptiveStreaming
getset

Determine the stream resolution should be adapted based on the view size.
Only applicable in standalone SDK. In Smart Client adaptive streaming is controlled by the general Smart Client settings.

◆ CameraFQID

FQID VideoOS.Platform.Client.ImageViewerWpfControl.CameraFQID
getset

Identifies the camera that is to be displayed in the control.
This property needs to be set before the Initialize() method is called.

◆ EnableBrowseMode

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableBrowseMode
getset

Defines if this ImageViewerControl should be enabled in Browse (Playback) mode.
If this property is false, the UserControl becomes disabled during Browse (Playback) mode.
Default is true.

◆ EnableDigitalZoom

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableDigitalZoom
getset

Defines if this ImageViewerControl allow the user to perform digital zoom operations.

Note: When this flag is set to true, the EnableMousePtzEmbeddedHandler should also be true and in standalone mode Selected must also be set to true for the ImageViewer react to e.g. scroll-whell events.

Default is false.

◆ EnableMouseControlledPtz

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableMouseControlledPtz
getset

Defines if mouse controlled PTZ should be possible. When set to true, the user can use click on video to do center-to-click and also right click and open a square of an area to zoom to.
Default is true.

Related property: EnableMousePtzEmbeddedHandler

◆ EnableMousePtzEmbeddedHandler

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableMousePtzEmbeddedHandler
getset

Defines if mouse controlled PTZ should be handled automatically by this component.
When set to true, the user actions will be handled automatically and no Messages or events will be issued to this class, but will be forwarded to the recording server that again will send to the camera.
When set to false, the user selection will be send to the MIP Plugin or application via MIP Messages. Default is true.

◆ EnableSetupMode

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableSetupMode
getset

Defines if this ImageViewerControl should be enabled in Setup mode.
If this property is false, the UserControl becomes disabled during Setup mode.
Default is true.

◆ EnableVisibleCameraName

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableVisibleCameraName
getset

Defines if the name of the camera is displayed in the header line. Default is true.

Only supported in standalone.

◆ EnableVisibleHeader

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableVisibleHeader
getset

Defines if the blue header is displayed or not. Default is true.

◆ EnableVisibleLiveIndicator

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableVisibleLiveIndicator
getset

Defines if the blinking green live indicator and the red motion indicator is visible. Default is true.

Note: This flag was set as Obsolite in 2016R3, but has been re-instated from 2017R1

◆ EnableVisibleTimestamp

bool VideoOS.Platform.Client.ImageViewerWpfControl.EnableVisibleTimestamp
getset

Defines if the timestamps should be shown in the top line during playback.

Only supported in standalone.

◆ Hidden

bool VideoOS.Platform.Client.ImageViewerWpfControl.Hidden
getset

When another ViewItem is maximized, this property is set to true.

◆ ImageSize

Size VideoOS.Platform.Client.ImageViewerWpfControl.ImageSize
getset

Contains the size of the original image before it was scaled to available display area.

◆ InfoText

String VideoOS.Platform.Client.ImageViewerWpfControl.InfoText
getset

Used for displaying a text when the ImageViewer ImageViewer is NOT shown. When the ShowImageViewer is set to false, the text stored in the InfoText field will be displayed.
The text is displayed in Color.Black on a transparent background.

◆ MaintainImageAspectRatio

bool VideoOS.Platform.Client.ImageViewerWpfControl.MaintainImageAspectRatio
getset

Flag to instruct the presentation of the video to be displayed with the original aspect ratio (Default), or to fill the entire viewable area.

◆ Maximized

bool VideoOS.Platform.Client.ImageViewerWpfControl.Maximized
getset

Defines if this ImageViewerControl is currently in a Maximized ViewItem.
This property cannot be used to maximize a ViewItem, use a SendMessage for that.

◆ PaintLocation

Point VideoOS.Platform.Client.ImageViewerWpfControl.PaintLocation
getset

Contains the location of actual image within this usercontrol.

◆ PaintSize

Size VideoOS.Platform.Client.ImageViewerWpfControl.PaintSize
getset

Contains the size of the areas used for video.

Top line and black filler areas are not included in this size.

◆ PlaybackControllerFQID

FQID VideoOS.Platform.Client.ImageViewerWpfControl.PlaybackControllerFQID
getset

Defines which PlaybackController is controlling this ImageViewer in Playback mode. The FQID used here is returned by the ClientControl.GeneratePlaybackController() method.

◆ Selected

bool VideoOS.Platform.Client.ImageViewerWpfControl.Selected
getset

Define if this ImageViewerControl is in the currently selected ViewItem.
When set to true, the top bar of the ImageViewerControl will change color to a brighter color and digital zoom events like e.g. the scroll-wheel will be propagated to this control.
This property cannot be used in the Smart Client to select your own ImageViewerControl, use a SendMessage for that.

◆ ShowImageViewer

bool VideoOS.Platform.Client.ImageViewerWpfControl.ShowImageViewer
getset

This property can be used to control if the ImageViewer should be shown or not.
This can for example be used to hide the ImageViewer when there is no camera defined yet.
When the ImageViewer is not shown, the InfoText field is displayed instead.

◆ ShowInitialImage

bool VideoOS.Platform.Client.ImageViewerWpfControl.ShowInitialImage
getset

Determine whether to send an initial image before the stream is started AND
control how the "Camera feed has stopped" message is displayed
Only applicable in standalone SDK.

true to send an initial image before the camera feed has started and show the "Camera feed has stopped" message on a transparent overlay;
false to disable sending an initial image and show the message on black overlay

◆ StreamId

Guid VideoOS.Platform.Client.ImageViewerWpfControl.StreamId
getset

Identifies which stream to use.
Use the StreamDataSource class to get a list of available streams. Note that multiple stream support is obly available on some Milestone products.

◆ SuppressUpdateOnMotionOnly

bool VideoOS.Platform.Client.ImageViewerWpfControl.SuppressUpdateOnMotionOnly
getset

Defines whether the Update On Motion Only camera param is suppressed.

Only supported in Smart Client.

◆ UsingMulticast

bool VideoOS.Platform.Client.ImageViewerWpfControl.UsingMulticast
getset

Indicates if the video is received from the recording server via multicast.

Supported from 2016

Event Documentation

◆ ConnectResponseReceived

EventHandler<ConnectResponseEventArgs> VideoOS.Platform.Client.ImageViewerWpfControl.ConnectResponseReceived = delegate { }

Register on this event to be called when a connection has completed.

◆ ImageDisplayed

EventHandler<ImageDisplayedEventArgs> VideoOS.Platform.Client.ImageViewerWpfControl.ImageDisplayed = delegate { }

Called for every image being displayed, exactly when it is presented to the operator.
The method registered on this event MUST be VERY short.

◆ ImageOrPaintInfoChanged

EventHandler<ImageOrPaintInfoChangedEventArgs> VideoOS.Platform.Client.ImageViewerWpfControl.ImageOrPaintInfoChanged = delegate { }

Is fired when one of the these field has been changed: ImageSize, PaintSize, PaintLocation.

◆ LiveStreamInformationReceived

EventHandler<LiveStreamInformationReceivedEventArgs> VideoOS.Platform.Client.ImageViewerWpfControl.LiveStreamInformationReceived = delegate { }

Register on this event to be called when the live stream XML information is available.

◆ RecordedImageReceived

EventHandler<RecordedImageReceivedEventArgs> VideoOS.Platform.Client.ImageViewerWpfControl.RecordedImageReceived = delegate { }

Register on this event to be called when a recorded image has been received.