Loading...
Searching...
No Matches
DcmIODImage<> Class Template Reference

Class for managing common image IOD attributes. More...

Inheritance diagram for DcmIODImage<>:

## Public Types

typedef DcmIODImage | IODImage
| typedef for old compilers that do not define the type 'DcmIODImage' in derived classes.
typedef IODImagePixelVariant< OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)> | IODImagePixelModuleType
| A good comment would be nice, but I have nothing in mind.

## Public Member Functions

| DcmIODImage ()
| Constructor, creates new DcmIODImage instance with integer-based pixel data.
template<typename ImagePixel>
| DcmIODImage (OFin_place_type_t(ImagePixel))
| Constructor, constructs new DcmIODImage instance with integer, float or double based Image Pixel Module (i.
virtual | ~DcmIODImage ()
| Virtual Destructor.
virtual void | setValueCheckOnWrite (const OFBool doCheck)
| Set whether attribute values should be checked on writing, i.e.
IODGeneralImageModule & | getGeneralImage ()
| Get General Image Module.
IODImagePixelModuleType & | getImagePixel ()
| Get Image Pixel Module (variant).
virtual void | clearData ()
| Clear (removes) all attributes handled by the modules of this IOD.
virtual OFCondition | read (DcmItem &dataset)
| Read common image module attributes (all those handled by this class) from given item.
virtual OFCondition | write (DcmItem &dataset)
| Write current common image module's attributes to DICOM dataset.
Public Member Functions inherited from DcmIODCommon
| DcmIODCommon ()
| Constructor.
| DcmIODCommon (const DcmIODCommon &rhs)
| Copy Constructor.
OFshared_ptr< IODRules > | getRules ()
| Get rules handled by this IOD.
OFshared_ptr< DcmItem > | getData ()
| Get item managed by this IOD.
IODPatientModule & | getPatient ()
| Get Patient Module.
IODPatientStudyModule & | getPatientStudy ()
| Get Patient Study Module.
IODGeneralStudyModule & | getStudy ()
| Get General Study Module.
IODGeneralEquipmentModule & | getEquipment ()
| Get General Equipment Module.
IODGeneralSeriesModule & | getSeries ()
| Get Series Module.
IODFoRModule & | getFrameOfReference ()
| Get Frame of Reference Module.
IODSOPCommonModule & | getSOPCommon ()
| Get SOP Common Module.
IODCommonInstanceReferenceModule & | getCommonInstanceReference ()
| Get Common Instance Reference Module.
virtual | ~DcmIODCommon ()
| Destructor.
virtual void | createNewStudy (const OFBool clearEquipment=OFTrue)
| Create new study.
virtual void | createNewSeries (const OFBool clearFoR=OFTrue)
| Create a new series.
virtual void | createNewSOPInstance ()
| Create a new SOP instance.
virtual void | ensureInstanceUIDs (const OFBool correctInvalid=OFFalse)
| Make sure that the IOD contains a SOP Instance, Series Instance and Study Instance UID.
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.
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.
virtual OFBool | getValueCheckOnWrite () const
| Get whether attribute value errors will be handled as errors on writing.

## Private Attributes

OFBool | m_GeneralImageModuleEnabled
| Denotes whether General Image Module is used in this class (OFTrue) or not (OFFalse).
IODGeneralImageModule | m_GeneralImage
| General Image Module.
IODImagePixelModuleType | m_ImagePixel
| Image Pixel Module.

## Detailed Description

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>
class DcmIODImage<>

Class for managing common image IOD attributes.

At the moment support for the palette-related attributes and the smallest/largest image pixel value attributes is still missing. Also, pixel data must be handled separately. However, pixel-data related attributes are provided by the Image Pixel Module, the Floating Point Image Pixel Module or the Double Floating Point Image Pixel Module, based on the provided template parameter. Modules supported on top of DcmIODCommon: General Image Module and Image Pixel Module.

## Constructor & Destructor Documentation

## DcmIODImage()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>
template<typename ImagePixel>

DcmIODImage<>::DcmIODImage | ( | OFin_place_type_t(ImagePixel) |  | ) |

inline

Constructor, constructs new DcmIODImage instance with integer, float or double based Image Pixel Module (i.

e. Image Pixel Module, Floating Point Image Pixel Module or the Double Floating Point Image Pixel Module), based on the provided Image Pixel module type.

References DcmIODCommon::DcmIODCommon(), DcmIODCommon::getData(), DcmIODCommon::getRules(), m_GeneralImage, m_GeneralImageModuleEnabled, and m_ImagePixel.

## Member Function Documentation

## clearData()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>

virtual void DcmIODImage<>::clearData | ( |  | ) |

inline virtual

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

IOD Rules are not reset.

Reimplemented from DcmIODCommon.

Reimplemented in DcmSegmentation, and DPMParametricMapBase.

References DcmIODCommon::clearData(), m_GeneralImage, and m_ImagePixel.

Referenced by read().

## getGeneralImage()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>

IODGeneralImageModule & DcmIODImage<>::getGeneralImage | ( |  | ) |

inline

Get General Image Module.

Returns
  Reference to General Image Module

References m_GeneralImage.

Referenced by EctEnhancedCT::getGeneralImage().

## getImagePixel()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>

IODImagePixelModuleType & DcmIODImage<>::getImagePixel | ( |  | ) |

inline

Get Image Pixel Module (variant).

Returns
  Reference to Image Pixel Module

References m_ImagePixel.

## read()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>

virtual OFCondition DcmIODImage<>::read | ( | DcmItem & | dataset | ) |

inline virtual

Read common image module attributes (all those handled by this class) from given item.

Reads attributes from base class DcmIODCommon before. The current content is deleted even 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.

Parameters

  dataset | Reference to DICOM dataset from which the document should be read

Returns
  EC_Normal if successful, an error code otherwise

Reimplemented from DcmIODCommon.

Reimplemented in DcmSegmentation, DPMParametricMapBase, DPMParametricMapIOD, and EctEnhancedCT.

References clearData(), m_GeneralImage, m_GeneralImageModuleEnabled, and DcmIODCommon::read().

## setValueCheckOnWrite()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>

virtual void DcmIODImage<>::setValueCheckOnWrite | ( | const OFBool | doCheck | ) |

inline virtual

Set whether attribute values should be checked on writing, i.e.

if writing should fail if attribute values violate their VR, VM, character set or value length. A missing but required value is always considered an error, independent of this setting. If set to OFFalse, writing will always succeed, even if attribute value constraints are violated. A warning instead of an error will be printed to the logger.

Parameters

  doCheck | If OFTrue, attribute value errors are handled as errors on writing, if OFFalse any errors are ignored.

Reimplemented from DcmIODCommon.

Reimplemented in DcmSegmentation, DPMParametricMapIOD, and EctEnhancedCT.

References m_GeneralImage, m_ImagePixel, and DcmIODCommon::setValueCheckOnWrite().

## write()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>

virtual OFCondition DcmIODImage<>::write | ( | DcmItem & | dataset | ) |

inline virtual

Write current common image module's attributes to DICOM dataset.

Also writes attributes of base class DcmIODCommon afterwards.

Parameters

  dataset | Reference to DICOM dataset to which the current data should be written. The dataset is not cleared before writing to it!

Returns
  EC_Normal if successful, an error code otherwise

Reimplemented from DcmIODCommon.

Reimplemented in DPMParametricMapBase, DPMParametricMapIOD, and EctEnhancedCT.

References EC_Normal, OFCondition::good(), m_GeneralImage, m_GeneralImageModuleEnabled, m_ImagePixel, and DcmIODCommon::write().

## Member Data Documentation

## m_GeneralImageModuleEnabled

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>

OFBool DcmIODImage<>::m_GeneralImageModuleEnabled

private

Denotes whether General Image Module is used in this class (OFTrue) or not (OFFalse).

This switch can be configured using a call to setGeneralImageModuleEnabled(). The default is OFTrue.

Referenced by DcmIODImage(), DcmIODImage(), read(), and write().

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

- dcmiod/include/dcmtk/dcmiod/iodimage.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0