GetImage Method

Summary
Returns the URL of the image with the specified SOP Instance UID.
Syntax
C#
C++/CLI
public string GetImage( 
   string sopInstanceUID 
) 
public: 
String^ GetImage(  
   String^ sopInstanceUID 
)  

Parameters

sopInstanceUID
The SOP Instance UID of the image to be retrieved

Example

This sample does the following:

  1. Opens a web browser
  2. Loads and logs into the HTML5 Medical Web Viewer
  3. Retrieves an image, which is returned as a URL
  4. Closes the HTML5 Medical Viewer
C#
using Leadtools; 
 
using Leadtools.Medical.WebViewer.ExternalControl; 
 
private void MedicalWebViewerExternalController_GetImage() 
{ 
   string applicationName; 
   string version; 
   int externalControlPort = 500; 
 
   // Username a password to log in 
   // This will be the username and password that you created when running the CSPacsDatabaseConfig.exe demo 
   string username = "bob"; 
   string password = "bob"; 
 
   // These are the UIDs of datasets that are preinstalled in the CSStorageServerMananger.exe demo database 
   const string jonesSopInstanceUid = "1.2.392.200036.9107.500.305.5577.20090211.93715.105577"; 
 
   MedicalWebViewerExternalController controller = new MedicalWebViewerExternalController("http://localhost/MedicalViewer"); 
 
   controller.Timeout = 30; 
   controller.InitApplication(out applicationName, out version, externalControlPort); 
   controller.SelectedBrowser = MedicalWebViewerBrowser.GoogleChrome; 
   ControllerReturnCode ret = controller.UserLogin(username, password); 
 
   string imageUrl = controller.GetImage(jonesSopInstanceUid); 
 
   if (!string.IsNullOrEmpty(imageUrl)) 
   { 
      string sMsg = string.Format("Retrieving SOPInstanceUID '{0}'.\n\nPaste the URL in browser to see the image: \n\n\t{1}.", jonesSopInstanceUid, imageUrl); 
      Console.WriteLine(sMsg); 
   } 
 
   controller.CloseApplication(); 
 
   // Shutdown the command queue 
   controller.Shutdown(); 
} 
Requirements

Target Platforms

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Medical.WebViewer.ExternalControl Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.