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:
Leadtools.Medical.WebViewer.WCF Implements the following web services:
Leadtools.Medical.WebViewer.Addins Implements the following addins:
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:
Register the MyStorageSqlDbDataAccessAgent and MyStorageDataAccessConfigurationView classes used for accessing the custom database
Register the _MyPatientInfo_, _MyStudyInfo_, _MySeriesInfo_, and MyInstanceInfo classes that are used for extracting DICOM data from a System.Data.DataRow.
Register ICatalogEntity classes (_MyPatient_, _MyStudy_, _MySeries_, and _MyInstance_) which are used with the MatchingParameterCollection to generate the WHERE statement of the database query.
For a detailed discussion of classes, see the LEAD Medical Storage Server Custom Database tutorial.
The RegisterInterfaces() method has the following implementation for this tutorial:
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));
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET