DCMTK
Version 3.6.7
OFFIS DICOM Toolkit
|
This module contains classes to deal with DICOM Enhanced CT objects. It is able to create, load and save them. Several checks (as possible) make sure that only valid Enhanced CT objects are written. This module makes heavy use of the dcmiod module for managing common IOD attribute as well as the dcmfg module to manage the functional groups required forEnhanced CT objects.
The main class of this module is:
The dcmect module offers a main class, EctEnhancedCT, that should be used as a starting point to load or create Enhanced CT objects. The EctEnhancedCT class manages its data in a similar way as the related Enhanced CT IOD is organized in the standard. It holds a list of modules (see Supported Modules) and a set of functional group macros (see Supported Functional Group Macros) that together make up the Enhanced CT object.
In order to create a new Enhanced CT object from scratch, a factory method EctEnhancedCT::create() must be used (regular constructor is protected)). create() asks for some required information that is needed in any case to create valid Enhanced CT objects.
Afterwards, the various attributes in the supported modules can be set. There is a get() method for each Module that returns a reference, e.g. EctEnhancedCT::getIODPatientModule() to retrieve the Patient Module in order to set the attribute Patient's Name (IODPatientModule::setPatientName())
An exception are the attributes of the Enhanced CT Image Module which can be set directly using set() methods on the EctEnhancedCT class, e.g. EctEnhancedCT::setISOCenterPosition().
Functional Groups are added in two ways:
After constructing the Enhanced CT object it can be written to a DcmItem or to a DICOM file (EctEnhancedCT::writeDataset() versus EctEnhancedCT::saveFile()).
An existing Enhanced CT object can be read using the static methods EctEnhancedCT::loadFile() (load from DICOM file) or EctEnhancedCT::loadDataset() (reading from an existing DcmItem object in memory).
For compression see section on compression.
An existing Enhanced CT object can be written using the methods EctEnhancedCT::saveFile() (save to DICOM file) or EctEnhancedCT::writeDataset() (writing to an existing DcmItem object in memory). By default, EctEnhancedCT writes uncompressed files in transfer syntax Little Endian Explicit.
For compression section on compression.
An existing EctEnhancedCT object can be modified in memory using the methods described above. Note that modification must be done careful and might lead to inconsistent objects. That's why it is not the recommended to modify existing objects with the dcmect module.
The dcmect/tests directory contains a file called t_roundtrip.cc which contains code that creates, writes and reads a Enhanced CT object so it is a quite complete demo case that shows how to use dcmect module.
The EctEnhancedCT works on uncompressed pixel data. Therefore it first tries to decompress a file that is encoded using a compressed ("encapsulated") transfer syntax.
DCMTK supports various compressed transfer syntaxes, however, the related codecs that perform compression or decompression must be registered first by the application that wants to use them. EctEnhancedCT does not automatically register those codecs but leaves this to the user of the module. Once the codecs are registered, EctEnhancedCT will make use of them when trying to decompress the compressed dataset.
See for example the dcmjpeg module to see how registering (and later deregistering) codecs work.
When sving, EctEnhancedCT::saveFile() writes the file in Little Endian Explicit transfer syntax. By setting its parameter writeXfer to a compressed transfer syntax, dcmect tries to compress the file before writing. As when reading a dataset or file, this only works if the user registered the related decompression codecs first.
The following modules of the Enhanced CT IOD are supported:
The following modules are not (yet) supported:
There might be further unsupported optional modules that have been added to the DICOM Standard after the last update of this documentation.
The following functional group macros are supported:
The following functional group macros are not (yet) support:
There might be further unsupported optional functional group macros that have been added to the DICOM Standard after the last update of this documentation.