Retrieves a list of DicomDataSet that matches query parameters specified in a System.Data.DataSet from the storage source.
public List<DicomDataSet> GetDicomDataSets(
DataSet dataSet
)
public:
List<DicomDataSet^>^ GetDicomDataSets(
DataSet^ dataSet
)
dataSet
A System.Data.DataSet which contains composite instance information that matches the specified query parameters.
A List of DicomDataSet that corresponds to the query parameters specified in System.Data.DataSet.
If no such DicomDataSet exists, an empty List is returned.
The dataSet argument is a CompositeInstanceDataSet that is returned from one of the following methods:
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:\LEADTOOLS22\Bin\Dotnet4\x64\L22_PACS_SCP64";
string productName = "StorageServer";
string serviceName = "L22_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