WCF Service and WebViewer Addin Assemblies

The source code for the medical web viewer is included with the installation.

The default location for the project file is here:

The Medical Web Viewer consists of eight assemblies with source code. 

For the tutorial, you will modify and recompile two of the assemblies:

The web services in Leadtools.Medical.WebViewer.WCF assembly each make use of more of the addins in the Leadtools.Medical.WebViewer.Addins assembly.  The addins read the database (using a data access layer) to achieve a specific task, like authenticate a user or retrieve information about a DICOM object. The table below lists each web service, its function, and the addins it uses: 

Web Service Purpose Addins Used
AuthenticationService Performs user authentication and authorization (permissions) AuthenticationAddin
ObjectQueryService Performs study level and series level query on the local PACS database DatabaseQueryAddin, AuthenticationAddin
ObjectRetrieveService Retrieves DICOM objects (images, presentation states) from the local PACS database ObjectRetrieveAddin, AuthenticationAddin
PacsQueryService Queries a remote PACS for DICOM information (Patient, Study, series and instance level). PACSQueryAddin, AuthenticationAddin
PACSRetrieveService Retrieves DICOM images from remote server through the Storage Server by issuing a CMOVE-REQ to the remote server to store images to local storage server DownloadAddin, AuthenticationAddin
PatientAccessRightsService Used for granting/denying users access to patients PatientAccessRightsAddin, AuthenticationAddin
StoreService Stores DICOM related information into local PACS database (images, presentation states). StoreAddin, AuthenticationAddin

Each web service uses the AddinsFactory class to create any of the addins that it requires.  The AddinsFactory constructor calls a RegisterInterfaces() method as part of its initialization.  The default implementation of RegisterInterfaces() does nothing. 

For the HTML5 Medical Web Viewer to use a custom database, you must add code to RegisterInterfaces() to register the necessary components, including:

C#
   public static void RegisterInterfaces() 
   { 
      if (!DataAccessServiceLocator.IsRegistered<IPatientInfo>()) 
      { 
         DataAccessServiceLocator.Register<IPatientInfo>(new MyPatientInfo()); 
      } 
 
      if (!DataAccessServiceLocator.IsRegistered<IStudyInfo>()) 
      { 
         DataAccessServiceLocator.Register<IStudyInfo>(new MyStudyInfo()); 
      } 
 
      if (!DataAccessServiceLocator.IsRegistered<ISeriesInfo>()) 
      { 
         DataAccessServiceLocator.Register<ISeriesInfo>(new MySeriesInfo()); 
      } 
 
      if (!DataAccessServiceLocator.IsRegistered<IInstanceInfo>()) 
      { 
         DataAccessServiceLocator.Register<IInstanceInfo>(new MyInstanceInfo()); 
      } 
 
      if (!DataAccessServices.IsDataAccessServiceRegistered<IStorageDataAccessAgent>()) 
      { 
         System.Configuration.Configuration configuration = ServiceUtils.GetGlobalPacsConfig(); 
 
         IStorageDataAccessAgent storageDataAccess = DataAccessFactory.GetInstance( 
            new MyStorageDataAccessConfigurationView( 
               configuration, 
               ServiceUtils.ProductNameStorageServer, null)) 
            .CreateDataAccessAgent<IStorageDataAccessAgent>(); 
 
         DataAccessServices.RegisterDataAccessService<IStorageDataAccessAgent>(storageDataAccess); 
      } 
 
 
      RegisteredEntities.AddItem(RegisteredEntities.PatientEntityName, typeof(MyPatient)); 
      RegisteredEntities.AddItem(RegisteredEntities.StudyEntityName, typeof(MyStudy)); 
      RegisteredEntities.AddItem(RegisteredEntities.SeriesEntityName, typeof(MySeries)); 
      RegisteredEntities.AddItem(RegisteredEntities.InstanceEntityName, typeof(MyInstance)); 
   } 
    

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Imaging, Medical, and Document