DCMTK  Version 3.6.6
OFFIS DICOM Toolkit
Public Member Functions | Private 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.
 
 DcmIODCommon (const DcmIODCommon &rhs)
 Copy Constructor. More...
 
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 importHierarchy (DcmItem &dataset, const OFBool readPatient, const OFBool readStudy, const OFBool readFoR=OFFalse, const OFBool readSeries=OFFalse, const OFBool takeOverCharset=OFTrue)
 Import common module attributes from dataset but only read Patient, Study, Series and/or Frame of Reference level portions. More...
 
virtual OFCondition importHierarchy (const OFString &filename, const OFBool readPatient, const OFBool readStudy, const OFBool readFoR=OFFalse, const OFBool readSeries=OFFalse, const OFBool takeOverCharset=OFTrue)
 CAUTION: Parameter order (readFoR and readSeries) changed compared to the old import() function. More...
 
virtual OFCondition write (DcmItem &dataset)
 Write the attributes managed by this class to DICOM dataset. More...
 

Private Member Functions

DcmIODCommonoperator= (const DcmIODCommon &rhs)
 Copy assignment disabled. 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.

Constructor & Destructor Documentation

◆ DcmIODCommon()

DcmIODCommon::DcmIODCommon ( const DcmIODCommon rhs)

Copy Constructor.

Parameters
rhsThe object to copy from

Member Function Documentation

◆ clearData()

virtual void DcmIODCommon::clearData ( )
virtual

◆ 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.

Parameters
correctInvalidIf OFTrue, invalid instance UIDs will be replaced by new ones

◆ 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

◆ 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

◆ importHierarchy() [1/2]

virtual OFCondition DcmIODCommon::importHierarchy ( const OFString filename,
const OFBool  readPatient,
const OFBool  readStudy,
const OFBool  readFoR = OFFalse,
const OFBool  readSeries = OFFalse,
const OFBool  takeOverCharset = OFTrue 
)
virtual

CAUTION: Parameter order (readFoR and readSeries) changed compared to the old import() function.

Import common module attributes from DICOM file 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
filenameThe filename to read from.
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
takeOverCharsetIf OFTrue (default), Specific Character Set is taken over from imported dataset. If it's not present or empty (invalid), the attribute will not be present in this class either.
Returns
EC_Normal if reading was successful (i.e. if any information could be read), otherwise an error is returned

◆ importHierarchy() [2/2]

virtual OFCondition DcmIODCommon::importHierarchy ( DcmItem dataset,
const OFBool  readPatient,
const OFBool  readStudy,
const OFBool  readFoR = OFFalse,
const OFBool  readSeries = OFFalse,
const OFBool  takeOverCharset = OFTrue 
)
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
takeOverCharsetIf OFTrue (default), Specific Character Set is taken over from imported dataset. If it's not present or empty (invalid), the attribute will not be present in this class either.
Returns
EC_Normal if successful, an error code otherwise

◆ operator=()

DcmIODCommon& DcmIODCommon::operator= ( const DcmIODCommon rhs)
private

Copy assignment disabled.

Parameters
rhsObject to copy from
Returns
Reference to "this" object

◆ 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 EctEnhancedCT, DcmSegmentation, TrcTractographyResults, DPMParametricMapBase, DPMParametricMapIOD, DcmIODImage<>, DcmIODImage< IODImagePixelModule< Uint16 >, IODImagePixelModule< Sint16 > >, DcmIODImage< IODImagePixelModule< Uint16 >, IODImagePixelModule< Sint16 >, IODFloatingPointImagePixelModule, IODDoubleFloatingPointImagePixelModule >, and DcmIODImage< IODImagePixelModule< Uint8 > >.

Referenced by DcmIODImage< IODImagePixelModule< Uint8 > >::read().

◆ 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 EctEnhancedCT, TrcTractographyResults, DPMParametricMapBase, DcmIODImage<>, DcmIODImage< IODImagePixelModule< Uint16 >, IODImagePixelModule< Sint16 > >, DcmIODImage< IODImagePixelModule< Uint16 >, IODImagePixelModule< Sint16 >, IODFloatingPointImagePixelModule, IODDoubleFloatingPointImagePixelModule >, DcmIODImage< IODImagePixelModule< Uint8 > >, and DPMParametricMapIOD.

Referenced by DcmIODImage< IODImagePixelModule< Uint8 > >::write().


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


Generated on Thu Jan 14 2021 for DCMTK Version 3.6.6 by Doxygen 1.8.18