Provides methods for retrieving one or more DicomDataSet from the storage source.
public interface IStorageDataAccessAgent5 : IStorageDataAccessAgent4, IStorageDataAccessAgent3, IStorageDataAccessAgent2, IStorageDataAccessAgent
Public Interface IStorageDataAccessAgent5
Inherits IStorageDataAccessAgent4, IStorageDataAccessAgent3, IStorageDataAccessAgent2, IStorageDataAccessAgent
public:
interface class IStorageDataAccessAgent5 abstract : IStorageDataAccessAgent4, IStorageDataAccessAgent3,
IStorageDataAccessAgent2, IStorageDataAccessAgent
The IStorageDataAccessAgent5 interface derives from the IStorageDataAccessAgent4, IStorageDataAccessAgent3, IStorageDataAccessAgent2, and IStorageDataAccessAgent interfaces.
The functionality in the IStorageDataAccessAgent5 interface that is not a part of the derived interfaces is related to retrieving one or more DicomDataSet based on an existing System.Data.DataSet, PatientID, StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID, or a MatchingParameterCollection.
This example shows how to use the IStorageDataAccessAgent5 members to retrieve one or more DicomDataSet based on a PatientID, a System.Data.DataSet, a SOPInstanceUID, or a MatchingParameterCollection.
using Leadtools.Dicom;
using Leadtools.DicomDemos;
using Leadtools.Medical.DataAccessLayer;
using Leadtools.Medical.DataAccessLayer.Catalog;
using Leadtools.Medical.Storage.DataAccessLayer;
using Leadtools.Medical.Storage.DataAccessLayer.Configuration;
public static IStorageDataAccessAgent5 GetStorageDataAccessAgent5()
{
// Before running this sample, follow these steps:
// 1. Run CSPacsDatabaseConfigurationDemo.exe to create the databases
// 2. Run CSPACSConfigDemo.exe to create the DICOM services
// 3. Set 'serviceDirectory' to the DICOM service folder
string serviceDirectory = @"C:\LEADTOOLS 21\Bin\Dotnet4\x64\L21_PACS_SCP64";
string productName = "StorageServer";
string serviceName = "L21_PACS_SCP64";
System.Configuration.Configuration configuration = DicomDemoSettingsManager.GetGlobalPacsAddinsConfiguration(serviceDirectory);
StorageDataAccessConfigurationView view = new StorageDataAccessConfigurationView(configuration, productName, serviceName);
IStorageDataAccessAgent5 agent = DataAccessFactory.GetInstance(view).CreateDataAccessAgent<IStorageDataAccessAgent5>();
return agent;
}
public static void GetDicomDataSetExample()
{
IStorageDataAccessAgent5 agent = GetStorageDataAccessAgent5();
// The CSPacsDatabaseConfigurationDemo.exe stores the following two images:
// PatientID LastName FirstName StudyInstanceUid SeriesInstanceUid SopInstanceUid
// 12341234 JONES JR 2.16.840.1.114151.4.862.39853.4041.912374 1.2.392.200036.9107.500.305.5577.557709021107405.121 1.2.392.200036.9107.500.305.5577.20090211.93715.105577
// 1.2.392.200036.9107.500.305.5577.20090211.93718.105577
string patientId = "12341234";
string studyInstanceUid = "2.16.840.1.114151.4.862.39853.4041.912374";
string sopInstanceUid1 = "1.2.392.200036.9107.500.305.5577.20090211.93715.105577";
string sopInstanceUid2 = "1.2.392.200036.9107.500.305.5577.20090211.93718.105577";
// *********
// Example 1:
// Verify that the two instances exists
bool exists1 = agent.ExistsDicomDataSet(sopInstanceUid1);
bool exists2 = agent.ExistsDicomDataSet(sopInstanceUid2);
Debug.Assert(exists1 && exists2);
// *********
// Example 2:
// Get a DicomDataSet from the data source based on SopInstanceUid
using (DicomDataSet ds = agent.GetDicomDataSet(sopInstanceUid1))
{
string sID = ds.GetValue<string>(DicomTag.SOPInstanceUID, string.Empty);
Debug.Assert(sID == sopInstanceUid1);
}
// *********
// Example 3:
// Get a DicomDataSet from the data source based on a DataSet
// Retrieve all DicomDataSets with PatientID == "12341234"
MatchingParameterCollection matchingCollection = new MatchingParameterCollection();
MatchingParameterList matchingList = new MatchingParameterList();
matchingCollection.Add(matchingList);
ICatalogEntity patientEntity = RegisteredEntities.GetPatientEntity(patientId);
matchingList.Add(patientEntity);
DataSet result = agent.QueryCompositeInstances(matchingCollection);
List<DicomDataSet> dsList = new List<DicomDataSet>();
if (result != null)
{
dsList = agent.GetDicomDataSets(result);
// There should be exactly two DicomDataSets
Debug.Assert(dsList.Count == 2);
}
// *********
// Example 4:
// Retrieve all DicomDataSets from the same StudyInstanceUID -- there will be two
dsList.Clear();
dsList = agent.GetDicomDataSets(string.Empty, studyInstanceUid, string.Empty, string.Empty);
// There should be exactly two DicomDataSets
Debug.Assert(dsList.Count == 2);
// *********
// Example 5:
// Retrieve all DicomDataSets using a MatchingParameterCollection
matchingCollection = new MatchingParameterCollection();
matchingList = new MatchingParameterList();
matchingCollection.Add(matchingList);
ICatalogEntity instanceEntity = RegisteredEntities.GetInstanceEntity(sopInstanceUid2);
matchingList.Add(instanceEntity);
dsList = agent.GetDicomDataSets(matchingCollection);
// There should be exactly one DicomDataSets
Debug.Assert(dsList.Count == 1);
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.