DCMTK  Version 3.6.1 20160216
OFFIS DICOM Toolkit
Public Member Functions | Private Attributes | List of all members
DcmIODCommon Class Reference

Interface class to those modules and data attributes are common for many DICOM IODs. More...

+ Inheritance diagram for DcmIODCommon:

Public Member Functions

 DcmIODCommon ()
 Constructor.
 
OFshared_ptr< IODRulesgetRules ()
 Get rules handled by this IOD. More...
 
OFshared_ptr< DcmItemgetData ()
 Get item managed by this IOD. More...
 
IODPatientModulegetPatient ()
 Get Patient Module. More...
 
IODPatientStudyModulegetPatientStudy ()
 Get Patient Study Module. More...
 
IODGeneralStudyModulegetStudy ()
 Get General Study Module. More...
 
IODGeneralEquipmentModulegetEquipment ()
 Get General Equipment Module. More...
 
IODGeneralSeriesModulegetSeries ()
 Get Series Module. More...
 
IODFoRModulegetFrameOfReference ()
 Get Frame of Reference Module. More...
 
IODSOPCommonModulegetSOPCommon ()
 Get SOP Common Module. More...
 
IODCommonInstanceReferenceModulegetCommonInstanceReference ()
 Get Common Instance Reference Module. More...
 
virtual ~DcmIODCommon ()
 Destructor.
 
virtual void clearData ()
 Clear (removes) all attributes handled by the modules of this IOD. More...
 
virtual void createNewStudy (const OFBool clearEquipment=OFTrue)
 Create new study. More...
 
virtual void createNewSeries (const OFBool clearFoR=OFTrue)
 Create a new series. More...
 
virtual void createNewSOPInstance ()
 Create a new SOP instance. More...
 
virtual void ensureInstanceUIDs (const OFBool correctInvalid=OFFalse)
 Make sure that the IOD contains a SOP Instance, Series Instance and Study Instance UID. More...
 
virtual OFCondition read (DcmItem &dataset)
 Read data into this class. More...
 
virtual OFCondition import (DcmItem &dataset, OFBool readPatient, OFBool readStudy, OFBool readFoR=OFFalse, OFBool readSeries=OFFalse)
 Import common module attributes from dataset but only read Patient, Study, Series and/or Frame of Reference level portions. More...
 
virtual OFCondition write (DcmItem &dataset)
 Write the attributes managed by this class to DICOM dataset. More...
 

Private Attributes

OFshared_ptr< DcmItemm_Item
 The data hold by this class (shared with modules below)
 
OFshared_ptr< IODRulesm_Rules
 The rules hold by this class (shared with modules below)
 
IODPatientModule m_Patient
 Patient Module.
 
IODPatientStudyModule m_PatientStudy
 Patient Study Module.
 
IODGeneralStudyModule m_Study
 General Study Module.
 
IODGeneralEquipmentModule m_Equipment
 General Equipment Module.
 
IODGeneralSeriesModule m_Series
 General Series Module.
 
IODFoRModule m_FrameOfReference
 Frame of Reference Module.
 
IODSOPCommonModule m_SOPCommon
 SOP Common Module.
 
IODCommonInstanceReferenceModule m_CommonInstanceReferenceModule
 Common Instance Reference Module.
 
OFVector< IODModule * > m_Modules
 Collects all modules of this class for convenience (iteration)
 

Detailed Description

Interface class to those modules and data attributes are common for many DICOM IODs.

The class offers a dedicated API for getting and settings those attributes. Modules included: Patient Module, General Study Module, General Equipment Module, General Series Module, Frame of Reference Module, SOP Common Module.

Member Function Documentation

◆ clearData()

virtual void DcmIODCommon::clearData ( )
virtual

Clear (removes) all attributes handled by the modules of this IOD.

IOD Rules are not reset.

Reimplemented in DcmSegmentation, and DcmIODImage.

◆ createNewSeries()

virtual void DcmIODCommon::createNewSeries ( const OFBool  clearFoR = OFTrue)
virtual

Create a new series.

After generating a new Series Instance UID the method createNewSOPInstance() is called, i.e. Series-related attributes managed by the series-level modules of this class are cleared, as well as instance-level data.

Parameters
clearFoRIf OFTrue (default), also the frame of reference is cleared (FoR Module)

◆ createNewSOPInstance()

virtual void DcmIODCommon::createNewSOPInstance ( )
virtual

Create a new SOP instance.

Generate a new SOP Instance UID and set the Instance Creation Date/Time to the current date and time. It could be used explicitly from the calling application if a new UID should be created (this is the case if the Study Instance UID or Series Instance UID has changed as well as any other attribute on the instance level, e.g. image pixel data). Also clears other instance related data.

◆ createNewStudy()

virtual void DcmIODCommon::createNewStudy ( const OFBool  clearEquipment = OFTrue)
virtual

Create new study.

After generating a new Study Instance UID the method createNewSeries() is called, i.e. also a new Series Instance UID and SOP instance UID are generated. This is a requirement of the DICOM standard. All other study-related attributes from the study-level modules managed by this class are cleared (as well as Series and Instance level attributes).

Parameters
clearEquipmentIf OFTrue (default), also the equipment information is cleared (General Equipment Module))

◆ ensureInstanceUIDs()

virtual void DcmIODCommon::ensureInstanceUIDs ( const OFBool  correctInvalid = OFFalse)
virtual

Make sure that the IOD contains a SOP Instance, Series Instance and Study Instance UID.

They are created if empty. Invalid UIDs are corrected if desired.

◆ getCommonInstanceReference()

IODCommonInstanceReferenceModule& DcmIODCommon::getCommonInstanceReference ( )

Get Common Instance Reference Module.

Returns
Common Instance Reference Module

◆ getData()

OFshared_ptr<DcmItem> DcmIODCommon::getData ( )

Get item managed by this IOD.

Returns
The item

◆ getEquipment()

IODGeneralEquipmentModule& DcmIODCommon::getEquipment ( )

Get General Equipment Module.

Returns
Reference to General Equipment Module

Referenced by DcmSegmentation::getSegmentationFractionalType().

◆ getFrameOfReference()

IODFoRModule& DcmIODCommon::getFrameOfReference ( )

Get Frame of Reference Module.

Returns
Reference to Frame of Reference Module

◆ getPatient()

IODPatientModule& DcmIODCommon::getPatient ( )

Get Patient Module.

Returns
Reference to Patient Module

◆ getPatientStudy()

IODPatientStudyModule& DcmIODCommon::getPatientStudy ( )

Get Patient Study Module.

Returns
Reference to Patient Study Module

◆ getRules()

OFshared_ptr<IODRules> DcmIODCommon::getRules ( )

Get rules handled by this IOD.

Returns
The rules

◆ getSeries()

IODGeneralSeriesModule& DcmIODCommon::getSeries ( )

Get Series Module.

Returns
Reference to General Series Module

◆ getSOPCommon()

IODSOPCommonModule& DcmIODCommon::getSOPCommon ( )

Get SOP Common Module.

Returns
Reference to SOP Common Module

◆ getStudy()

IODGeneralStudyModule& DcmIODCommon::getStudy ( )

Get General Study Module.

Returns
Reference to General Study Module

◆ import()

virtual OFCondition DcmIODCommon::import ( DcmItem dataset,
OFBool  readPatient,
OFBool  readStudy,
OFBool  readFoR = OFFalse,
OFBool  readSeries = OFFalse 
)
virtual

Import common module attributes from dataset but only read Patient, Study, Series and/or Frame of Reference level portions.

The current content is not deleted before reading. If the log stream is set and valid the reason for any error might be obtained from the error/warning output.

Parameters
datasetReference to DICOM dataset from which the document should be read
readPatientRead Patient-level information if OFTrue
readStudyRead Study-level information if OFTrue, including equipment module
readFoRRead Frame of Reference information if OFTrue. See also readSeries parameter.
readSeriesRead Series-level information if OFTrue, always includes Frame of Reference, i.e. readFoR is considered to be OFTrue
Returns
EC_Normal if successful, an error code otherwise

◆ read()

virtual OFCondition DcmIODCommon::read ( DcmItem dataset)
virtual

Read data into this class.

Please note that the current content is also deleted if the reading process fails. If the log stream is set and valid the reason for any error might be obtained from the error/warning output. The reading process will ignore missing attributes or values as possible in order to read as as much as possible.

Parameters
datasetDICOM dataset from which the document should be read
Returns
EC_Normal if successful, an error code otherwise

Reimplemented in DcmSegmentation, and DcmIODImage.

◆ write()

virtual OFCondition DcmIODCommon::write ( DcmItem dataset)
virtual

Write the attributes managed by this class to DICOM dataset.

Parameters
datasetReference to DICOM dataset to which the current document should be written. The dataset is not cleared before writing to it.
Returns
EC_Normal if successful, an error code otherwise

Reimplemented in DcmSegmentation, and DcmIODImage.


The documentation for this class was generated from the following file:


Generated on Tue Feb 11 2025 for DCMTK Version 3.6.1 20160216 by Doxygen 1.8.13