ImFusion SDK 4.3
Intermediate-level API

Intermediate-level API for loading/storing DICOM data. More...

+ Collaboration diagram for Intermediate-level API:

Detailed Description

Intermediate-level API for loading/storing DICOM data.

The intermediate-level abstraction layer of the ImFusion DICOM Plugin builds on the Core API and provides classes for loading/saving DICOM instances as a whole as well as for file system/PACS interaction. When using these classes you are not required to interact with the Core API layer, however you might still need to interact with DCMTK types.

Namespaces

namespace  ImFusion::Dicom::ModalityWorklist
 Basic implementation of a Service Class User (SCU) for the DICOM Modality Worklist standard.
 

Classes

class  DatasetCache
 The DatasetCache class provides caching of DcmDataset loaded from different locations. More...
 
class  DicomLoader
 The DicomLoader class loads images from DICOM files. More...
 
struct  DicomPacsConfiguration
 Structure encapsulating all information needed to connect to a PACS instance. More...
 
class  DicomPacsCommunication
 Class facilitating the communication with DICOM PACS servers. More...
 
class  DicomWriter
 The DicomWriter class can store a SharedImageSet in a DICOM dataset. More...
 
class  Extension
 Interface for adding custom functionality to DicomLoader and DicomWriter An Extension might be called in a thread that is not the main thread. More...
 
class  Scanner
 Scan different locations for DICOM files. More...
 

Functions

std::unique_ptr< DcmDataset > createMinimalRequest ()
 Creates a minimal request object.
 
std::vector< std::unique_ptr< DcmDataset > > getWorklist (DicomPacsConfiguration config, DcmDataset &request, std::atomic< bool > *abortFlag=nullptr)
 Retrieves a Modality Worklist from the given server.
 

Function Documentation

◆ createMinimalRequest()

std::unique_ptr< DcmDataset > createMinimalRequest ( )

#include <ImFusion/Dicom/DicomModalityWorklist.h>

Creates a minimal request object.

All keys are empty, i.e. no filtering will be performed by the server. Note that the absolute minimal request would be an empty DcmDataset, in which case nothing would come back since nothing was requested. Instead the created request will contain all return keys that are of type 1, 1C or 2 (i.e. all tags the SCP must supported).

See https://dicom.nema.org/medical/dicom/2014c/output/chtml/part04/sect_K.6.html for a list of possible keys.

Examples
DicomWorklist.cpp.

◆ getWorklist()

std::vector< std::unique_ptr< DcmDataset > > getWorklist ( DicomPacsConfiguration config,
DcmDataset & request,
std::atomic< bool > * abortFlag = nullptr )

#include <ImFusion/Dicom/DicomModalityWorklist.h>

Retrieves a Modality Worklist from the given server.

It will return a list of procedures that match the given request object. Tag values in the request object will be used by the server for filtering (Matching Key), e.g. to retrieve only procedures for a given PatientID. The tags in the request object also define which tags will be returned by the server (Return Key). Any zero-length value will be only used as a Return Key but not as a Matching Key.

See https://dicom.nema.org/medical/dicom/2014c/output/chtml/part04/sect_K.2.2.html

See https://dicom.nema.org/medical/dicom/2014c/output/chtml/part04/sect_K.6.html for a list of possible keys.

// A simple example that reads the DICOM Modality Worklist of DCMTKs wlmscpfs SCP.
// To get the server running:
// 1. Clone the dcmtk repository and go to the dcmwlm/data/wlistdb folder
// 2. Convert the files in the OFFIS directory with: dump2dcm -g wklist1.dump wklist1.wl
// 3. Start the server on port 8080: wlmscpfs 8080
ImFusion::DicomPacsConfiguration config("localhost", 8080, "OFFIS");
config.clientPort = 11112;
config.clientAETitle = "OFFIS";
config.cfgFilePath = "";
config.connectionTimeout = 3;
// filter by station AE title
DcmItem* scheduledProcedure = nullptr;
request->findAndGetSequenceItem(DCM_ScheduledProcedureStepSequence, scheduledProcedure);
scheduledProcedure->putAndInsertString(DCM_ScheduledStationAETitle, "AB45");
// Will return 2 items
auto results = ImFusion::Dicom::ModalityWorklist::getWorklist(config, *request);
for (const auto& result : results)
{
result->print(ss);
LOG_INFO(ss.str());
}
Examples
DicomWorklist.cpp.
Search Tab / S to search, Esc to close