ImFusion C++ SDK 4.4.0
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.

  • The DicomLoader class takes care of converting DICOM data into ImFusion data types (i.e. SharedImageSet). It will automatically take care of selecting a suitable loader IOD and performing the conversion process. Additionally, it can also take care of receiving the raw DICOM data from the local file system or a PACS instance.
  • The DicomWriter class takes care of converting ImFusion images to DICOM data. It will instantiate a suitable writer IOD and perform the conversion process. Additionally, it will take care of writing the data set to the local file system or a PACS instance.
  • The Dicom::DatasetCache provides an abstraction for accessing DICOM data sets from the file system or PACS instances. DICOM series are cached in order to improve performance when accessing them in a recurring fashion (e.g. during browing/filtering).
  • The DicomPacsCommunication class serves as single entry point for all PACS configuration and communication. API programmers can use this class in order to communicate with PACS instances in cases where they need to send special/specific requiests.

Namespaces

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

Classes

class  ImFusion::Dicom::DatasetCache
 The DatasetCache class provides caching of DcmDataset loaded from different locations. More...
class  ImFusion::DicomLoader
 The DicomLoader class loads images from DICOM files. More...
struct  ImFusion::DicomPacsConfiguration
 Structure encapsulating all information needed to connect to a PACS instance. More...
class  ImFusion::DicomPacsCommunication
 Class facilitating the communication with DICOM PACS servers. More...
class  ImFusion::DicomWriter
 The DicomWriter class can store a SharedImageSet in a DICOM dataset. More...
class  ImFusion::Dicom::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  ImFusion::Dicom::Scanner
 Scan different locations for DICOM files. More...

Functions

std::unique_ptr< DcmDataset > ImFusion::Dicom::ModalityWorklist::createMinimalRequest ()
 Creates a minimal request object.
std::vector< std::unique_ptr< DcmDataset > > ImFusion::Dicom::ModalityWorklist::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 > ImFusion::Dicom::ModalityWorklist::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 > > ImFusion::Dicom::ModalityWorklist::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