ImFusion SDK 4.3
ImFusion::Dicom Namespace Reference

Low-level and intermediate-level interfaces for working with DICOM data. More...

Detailed Description

Low-level and intermediate-level interfaces for working with DICOM data.

Namespaces

namespace  ModalityWorklist
 Basic implementation of a Service Class User (SCU) for the DICOM Modality Worklist standard.
 
namespace  Utils
 Collection of utility functions to handle DICOM data.
 
namespace  VolumeReconstruction
 Namespace containing helper functions to reconstruct potential volumes from a set of individual DICOM frames.
 

Classes

struct  Base
 
class  ClinicalTrialSubjectDataComponent
 Represents the Clinical Trial Subject Module https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.html#table_C.7-2b. More...
 
class  ClinicalTrialSubjectExtension
 Extension that loads and saves the ClinicalTrialSubjectDataComponent. More...
 
class  CommonModule
 Collection of the essential tags describing a Dicom data set combining. More...
 
class  ConfigurableSequence
 
class  ConfigurableSequenceItem
 
class  DatasetCache
 The DatasetCache class provides caching of DcmDataset loaded from different locations. More...
 
class  DatasetHandler
 Read access handler for proprietary / non-standard DICOM image formats, or non-image datasets. More...
 
struct  DatasetIodPair
 Named pair of a DcmDataset and the corresponding IOD. More...
 
class  DatasetModuleList
 A stub that allows to use a Module with a DcmItem alone (without deriving some class from ModuleList). More...
 
class  DatasetPreviewLabel
 A widget that shows a preview image of a DICOM dataset. More...
 
class  DicomGeSignaExciteIOD
 Extra IOD specialization for basic support of loading 4D MRI sequences created by GE Signa Excite devices. More...
 
class  DicomParameter
 A specialized Parameter<T> class that can additionally serialize from and to DICOM. More...
 
class  DicomParameterBase
 Internal type-erased base class for DicomParameter<T>. More...
 
class  DicomParameterHelper
 Helper functions to load and save all DicomParameters of a Configurable. More...
 
class  DicomSegIoAlgorithm
 
struct  DimensionsInfo
 Describes with which dimensions a series will be loaded. More...
 
class  Element
 Dicom Element with a concrete value type. More...
 
class  ElementBase
 Abstract base class for DICOM Elements. More...
 
class  ElementList
 Interface for classes that consist of Elements. More...
 
class  EncryptedAttributesExtension
 
class  EnhancedMultiFrameImageIOD
 Class representing Enhanced CT Image IOD (PS 3.3 A.38) More...
 
struct  Error
 Structure for storing errors occurring during loading/saving DICOM data. More...
 
class  ErrorRecorder
 Error handling interface for the Dicom module. 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...
 
struct  FrameDescriptor
 Descriptor for a single DICOM frame that is used during the loading process as intermediate representation before eventually converting the image data to a SharedImageSet. More...
 
class  GeneralEquipmentExtension
 General Equipment Module (PS 3.3 C.7.5) Only considers tags that are part of the GeneralEquipmentModuleDataComponent. More...
 
class  GeneralEquipmentModuleDataComponent
 DataComponent mirroring the DICOM General Equipment Module. More...
 
struct  Image
 
class  ImagePixel
 Image Pixel Module (PS 3.3 C.7.6.3) More...
 
class  ImagePlane
 Image Plane Module (PS 3.3 C.7.6.2) More...
 
class  IOD
 Base class of a Dicom Information Object Definition (IOD). More...
 
class  IOD_Registry
 A registry that assigns a IOD implementation to a SOP class UID. More...
 
class  ModalityLUT
 Modality LUT Module (PS 3.3 C.11.1) More...
 
class  Module
 Base class for Dicom Modules. More...
 
class  ModuleList
 Interface for classes that consist of modules. More...
 
class  MultiFrameImageIOD
 Base IOD for classic DICOM files. More...
 
class  OverlayAnnotation
 The OverlayAnnotation displays any DICOM overlay stored in a OverlayDataComponent. More...
 
class  OverlayDataComponent
 DataComponent providing DICOM overlays. More...
 
struct  PacsSeriesProxy
 Proxy item to represent Series that exist on the PACS but have not yet been downloaded completely. More...
 
struct  Patient
 
class  PixelSpacingCalibration
 Basic Pixel Spacing Calibration Macro (PS 3.3 Table 10.7) Pixel Measures Macro (PS 3.3 Table C.7.6.16-2) More...
 
class  RealWorldValueMappingExtension
 Real World Value Mapping Macro (PS 3.3 C.7.6.16.2.11) More...
 
class  ReferencedInstancesComponent
 DataComponent to store DICOM instances that are referenced by the dataset. More...
 
class  RTStructureDataComponent
 DataComponent for PointClouds loaded from a DICOM RTStructureSet. More...
 
class  RTStructureDataController
 A DataController for PointClouds that contain a RTStructureDataComponent. More...
 
class  RTStructureDataDisplayHandler
 DataDisplayHandler for PointClouds that represent DICOM RT Structs. More...
 
class  RTStructureDatasetHandler
 A DatasetHandler for loading DICOM RTStructureSet. More...
 
class  RTStructureRenderingDataComponent
 Internal rendering data that represent a RT Structure. More...
 
class  Scanner
 Scan different locations for DICOM files. More...
 
class  ScannerQt
 A scanner with Qt interop. More...
 
class  SegmentationStorageIOD
 Class representing Segmentation IOD. More...
 
class  SegmentItem
 Element in the (0062,0002) SegmentSequence. More...
 
class  Sequence
 Concrete sequence of items of type T, which must be derived from SequenceItem. More...
 
class  SequenceBase
 Abstract base class for a sequence of elements. More...
 
class  SequenceItem
 Base class for sequence items. More...
 
struct  Series
 
class  SettingsWidget
 Simple Qt widget to configure the DicomPluginSettings. More...
 
class  SourceInfoComponent
 DataComponent to store the mapping of SharedImage to the DICOM URIs (such as file names) used for loading. More...
 
struct  Study
 
struct  TagProxy
 
class  TagsWidget
 The TagsWidget class provides a widget to display dicom tags. More...
 
class  value_error
 Exception specialization for DICOM element retrieval. More...
 
class  VOILUTExtension
 VOI LUT Module (PS 3.3 C.11.2) Loads and saves windowing related values to and from DisplayOptions2d. More...
 
class  VolumetricImageIOD
 The VolumetricImageIOD is a generic IOD for volumetric data that is stored slice by slice. More...
 
class  WebClient
 Interface for querying and retrieving objects from a DicomWeb compliant server. More...
 

Typedefs

typedef std::vector< FrameDescriptorFrameDescriptorSet
 This typedef indicates a semantic difference compared to std::vector<FrameDescriptor>: A FrameDescriptorSet indicates that the frames resemble a (potential) volume, while a std::vector<FrameDescriptor> is just a list of (potential) unrelated frames.
 
typedef std::shared_ptr< DatasetCacheSharedDatasetCache
 
using DcmItemsResult = ImFusion::Utils::Expected<std::vector<DcmItem>, Network::HttpError>
 
using DcmDatasetsResult = ImFusion::Utils::Expected<std::vector<std::shared_ptr<DcmDataset>>, Network::HttpError>
 

Enumerations

enum class  AnonymizationProfile : int { None = 0 , Relaxed = 1 , Strict = 2 }
 
enum class  ExportFileType { File , Folder , Auto }
 
enum class  Compression {
  LittleEndianImplicit , LittleEndianExplicit , DeflatedLittleEndianExplicit , BigEndianExplicit ,
  JPEG , JPEG_lossless , JPEGLS_lossless , JPEGLS_lossy ,
  JPEG2000 , JPEG2000_lossless
}
 Enumeration of supported compression/transfer syntax when writing DICOM.
 
enum class  ReferenceModules { None = 0 , CommonInstanceReference = 1 , ClinicalTrialSubject = 2 , All = CommonInstanceReference | ClinicalTrialSubject }
 
enum class  PhotometricInterpretation {
  Invalid , Monochrome1 , Monochrome2 , Palette ,
  RGB , YbrFull , YbrFull422
}
 Enumeration describing the DICOM photometeric interpetration type.
 
enum class  WritePolicy { Always , NonEmpty }
 
enum class  ROIGenerationAlgorithm { Unknown = 0 , Automatic = 1 , SemiAutomatic = 2 , Manual = 3 }
 
enum class  SeriesDimensions {
  Unknown , Image , Volume , ImageSet ,
  VolumeSet , Other
}
 Dimensions of this series. More...
 

Functions

const std::map< TagProxy, std::string > & tagDeidentificationActionBasicProfile ()
 Dicom De-identification Action Codes according to PS3.15 Annex E Table E.1-1 (http://dicom.nema.org/medical/dicom/current/output/chtml/part15/chapter_E.html)
 
const std::map< TagProxy, std::string > & tagDeidentificationActionRelaxedProfile ()
 Like Basic, but keeps certains tags and all UIDs.
 
std::string toDecimalString (double value, int maxChars=16)
 
std::vector< std::unique_ptr< DcmDataset > > exportToDataset (SharedImageSet &input, ErrorRecorder &errors, ExportFileType filetype=ExportFileType::Auto, IOD_Registry *registry=nullptr, Progress *progress=nullptr)
 Exports the given image to a DcmDatasets.
 
void addReference (Flags< ReferenceModules > modules, const std::vector< DcmDataset * > &datasets, const SharedImageSet &reference, ErrorRecorder &errors)
 Adds a reference to the given image to all datasets.
 
void addReference (Flags< ReferenceModules > modules, const std::vector< DcmDataset * > &datasets, const std::vector< DcmDataset * > &reference, ErrorRecorder &errors)
 Similar to the function above but add a reference to the given datasets.
 
bool saveDatasets (const std::vector< DcmDataset * > &datasets, const Filesystem::Url &url, ErrorRecorder &errors, Compression compression=Compression::LittleEndianImplicit, int compressionQuality=90, const std::string &filenameFormat="", Progress *progress=nullptr)
 Saves the given datasets to the url.
 
bool isLosslessCompression (Compression compression)
 Returns whether the compression is lossless or lossy.
 
template<typename T>
bool operator== (const DicomParameter< T > &param, const T &value)
 
template<typename T>
bool operator== (const T &value, const DicomParameter< T > &param)
 
template<typename T>
bool operator!= (const DicomParameter< T > &param, const T &value)
 
template<typename T>
bool operator!= (const T &value, const DicomParameter< T > &param)
 
std::unique_ptr< DcmDataset > exportSegmentationsToDataset (const std::vector< SharedImageSet * > &labelmapLayers, ErrorRecorder &errors, bool cropToContent=false, Progress *progress=nullptr)
 Exports one or multiple segmentation layers as a single DICOM Segmentation object.
 
std::unique_ptr< DcmDataset > exportRTStructToDataset (const std::vector< PointCloud * > &pointClouds, ErrorRecorder &errors, Progress *progress=nullptr)
 Exports a PointCloud with a Dicom::RTStructureDataComponent as a DICOM RT Structure Set.
 

Enumeration Type Documentation

◆ ExportFileType

enum class ExportFileType
strong
Enumerator
File 

If possible, write all image data to a single file.

Folder 

Write each frame as separate DICOM file to a folder.

Auto 

Automatically determine storage type based on the image.

◆ ReferenceModules

enum class ReferenceModules
strong
Enumerator
CommonInstanceReference 

Requires the ImageInfoDataComponent and the SourceDataComponent.

ClinicalTrialSubject 

Requires the Dicom::ClinicalTrialSubjectDataComponent.

◆ ROIGenerationAlgorithm

enum class ROIGenerationAlgorithm
strong
Enumerator
Unknown 

Unknown.

Automatic 

Calculated ROI.

SemiAutomatic 

ROI calculated with user assistance.

Manual 

User-entered ROI.

◆ SeriesDimensions

enum class SeriesDimensions
strong

Dimensions of this series.

This corresponds to the Kind of a SharedImageSet but with only the values we expect from DICOM.

Function Documentation

◆ exportToDataset()

std::vector< std::unique_ptr< DcmDataset > > exportToDataset ( SharedImageSet & input,
ErrorRecorder & errors,
ExportFileType filetype = ExportFileType::Auto,
IOD_Registry * registry = nullptr,
Progress * progress = nullptr )

Exports the given image to a DcmDatasets.

Depending on the filetype, this result contains a single dataset (File) or multiple (Folder). If no registry is provided, the default one is created.

This function cannot export images with modality LABEL! Use DicomSegIoAlgorithm instead.

The transfer syntax of the returned datasets is always Little Endian (Implicit).

◆ addReference() [1/2]

void addReference ( Flags< ReferenceModules > modules,
const std::vector< DcmDataset * > & datasets,
const SharedImageSet & reference,
ErrorRecorder & errors )

Adds a reference to the given image to all datasets.

If enabled, this will add tags according to the Common Instance Reference Module (https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.12.2.html#table_C.12-8) The given SharedImageSet must provide a ImageInfoDataComponent and a SourceInfoComponent for each SharedImage. Both are automatically created when the SharedImageSet was loaded from DICOM. If the image does not provide all necessary information, an error is recorded.

If enabled, the Clinical Trial Subject Module is also copied from the reference image to the datasets.

◆ addReference() [2/2]

void addReference ( Flags< ReferenceModules > modules,
const std::vector< DcmDataset * > & datasets,
const std::vector< DcmDataset * > & reference,
ErrorRecorder & errors )

Similar to the function above but add a reference to the given datasets.

This should be used when the reference image was already exported and a reference should be added to the exported dataset and not the original. During exportToDataset, certain UIDs are generated. If you would e.g. export a image and a labelmap together, you need to call this function when the labelmap is supposed to reference the image.

This function requires that all reference datasets have the same SeriesInstanceUID and the same FrameOfReferenceUID. If you want to add references to multiple series, call this method for each series.

◆ saveDatasets()

bool saveDatasets ( const std::vector< DcmDataset * > & datasets,
const Filesystem::Url & url,
ErrorRecorder & errors,
Compression compression = Compression::LittleEndianImplicit,
int compressionQuality = 90,
const std::string & filenameFormat = "",
Progress * progress = nullptr )

Saves the given datasets to the url.

For local files, a folder is required if there is more than one dataset. If the path doesn't exist, it is created (including all subfolders).

When exporting to PACS, the client config is determined via the global Settings but the server config is determined from the url.

The compression quality is only used for lossy compressions and goes from 1 to 100, with 1 being the lowest quality and highest compression and 100 being the highest quality and the lowest compression. Values will be clamped to 1 and 100. JPEGLS_lossy currently ignores the quality and uses a hardcoded value.

The input datasets will be converted to the given compression (transfer syntax) inplace.

The filenameFormat defines how files exported to a folder are named. It expects a pattern of 'prefix$0..0$suffix'. The amount of '0' in between the two $ markers specifies the size the filename will be padded to. If no '0' are given, the number depends on the number of files (e.g. 10 files would use 2 digits, 100 would use 3). E.g. 'IMG_$0000$.dcm' would name files 'IMG_0001.dcm', 'IMG_0002.dcm', ... If only one '0' is given, the files are not padded with a 0, e.g. the pattern 'IMG_$0$' produces 'IMG_0', 'IMG_1', ..., 'IMG_9', 'IMG_10', ... If there are more than one '0', but the number of datasets would require more digits, a warning is issued and only the lower files are padded with '0', e.g. a pattern of 'IMG_$00$' and 120 files: 'IMG_00', 'IMG_01', ..., 'IMG_99', 'IMG_100', 'IMG_101'... The default pattern is 'IMG_$$' which results in 'IMG_001', 'IMG_002', ... for 100 to 999 datasets.

Returns true if all datasets could be saved successfully. The first dataset that cannot be exported successfully will abort the export. In this case, any files already written will not be deleted!

◆ exportSegmentationsToDataset()

std::unique_ptr< DcmDataset > exportSegmentationsToDataset ( const std::vector< SharedImageSet * > & labelmapLayers,
ErrorRecorder & errors,
bool cropToContent = false,
Progress * progress = nullptr )

Exports one or multiple segmentation layers as a single DICOM Segmentation object.

All labels present in the labelmaps will be exported. Labels that are missing from the LabelDataComponent will be assigned some default values. If multiple layers are passed, all layers must have the same ImageDescriptor. SharedImageSets with multiple images are currently not supported. cropToContent currently doesn't have an effect.

◆ exportRTStructToDataset()

std::unique_ptr< DcmDataset > exportRTStructToDataset ( const std::vector< PointCloud * > & pointClouds,
ErrorRecorder & errors,
Progress * progress = nullptr )

Exports a PointCloud with a Dicom::RTStructureDataComponent as a DICOM RT Structure Set.

To export labelmaps, use the LabelMapToRTStructure before.

Search Tab / S to search, Esc to close