Loading...
Searching...
No Matches
I2DOutputPlug Class Referenceabstract

img2dcm output plugin interface serving as a base class for specific output plugins More...

Inheritance diagram for I2DOutputPlug:

## Public Member Functions

| I2DOutputPlug ()
| Constructor, initializes member variables.
virtual | ~I2DOutputPlug ()
| Destructor.
virtual OFString | ident ()=0
| Virtual function that returns a short name of the plugin.
virtual void | supportedSOPClassUIDs (OFList< OFString > &suppSOPs)=0
| Virtual function that returns the Storage SOP class UID, the plugin writes.
virtual OFCondition | convert (DcmDataset &dataset) const =0
| Outputs SOP class specific information into dataset.
virtual OFString | isValid (DcmDataset &dataset) const =0
| Do some completeness / validity checks.
virtual OFBool | supportsMultiframe () const =0
| check if the output format supported by this plugin can write multi-frame images.
virtual OFBool | colorModelPermitted (const OFString &photometricInterpretation, E_TransferSyntax outputTS) const =0
| checks if the output SOP class permits the given combination of transfer syntax and photometric interpretation
virtual OFCondition | updateColorModel (OFString &photometricInterpretation, E_TransferSyntax outputTS) const =0
| change the photometric interpretation to the next best permitted one, for lenient mode
virtual OFCondition | insertMultiFrameAttributes (DcmDataset *targetDataset, size_t numberOfFrames) const =0
| Add multiframe specific attributes.
virtual void | setValidityChecking (OFBool doChecks, OFBool insertMissingType2=OFTrue, OFBool inventMissingType1=OFTrue)
| Enable/Disable basic validity checks for output dataset.

## Protected Member Functions

virtual OFString | checkType1Attrib (const DcmTagKey &key, DcmDataset *targetDset) const
| Checks whether a given tag exists in a dataset and is non-empty, otherwise returns an error string.
virtual OFString | checkAndInventType1Attrib (const DcmTagKey &key, DcmDataset *targetDset, const OFString &defaultValue="") const
| Checks whether a given tag exists in a dataset and provides a non-empty value.
virtual OFString | checkAndInventType1CodeSQ (const DcmTagKey &key, DcmDataset *targetDset, const OFString &codeValue, const OFString &codeMeaning, const OFString &codingSchemeDesignator) const
| Checks whether a given code sequence exists in a dataset and contains an item with the required attributes.
virtual OFString | checkAndInventType2Attrib (const DcmTagKey &key, DcmDataset *targetDset, const OFString &defaultValue="") const
| Checks whether a given tag exists in a dataset (can be empty) If not, the tag is inserted (if enabled) with empty value.

## Protected Attributes

OFBool | m_doAttribChecking
| if enabled, some simple attribute checking is performed default: enabled (OFTrue)
OFBool | m_inventMissingType2Attribs
| if enabled, missing type 2 attributes in the dataset are added automatically.
OFBool | m_inventMissingType1Attribs
| if enbled, missing type 1 attributes are inserted and filled with a predefined value.

## Detailed Description

img2dcm output plugin interface serving as a base class for specific output plugins

## Member Function Documentation

## checkAndInventType1Attrib()

virtual OFString I2DOutputPlug::checkAndInventType1Attrib | ( | const DcmTagKey & | key,
|  | DcmDataset * | targetDset,
|  | const OFString & | defaultValue = "" ) const

protected virtual

Checks whether a given tag exists in a dataset and provides a non-empty value.

If not, the tag is inserted (if enabled) and a default value is inserted.

Parameters

  key | - [in] The tag to be checked/inserted
  targetDset | - [in/out] The dataset to search (and insert) in
  defaultValue | - [in] The default value to set

Returns
  Error string, which is empty if no error occurs.

## checkAndInventType1CodeSQ()

virtual OFString I2DOutputPlug::checkAndInventType1CodeSQ | ( | const DcmTagKey & | key,
|  | DcmDataset * | targetDset,
|  | const OFString & | codeValue,
|  | const OFString & | codeMeaning,
|  | const OFString & | codingSchemeDesignator ) const

protected virtual

Checks whether a given code sequence exists in a dataset and contains an item with the required attributes.

If not, the sequence is inserted (if enabled) and default values are inserted.

Parameters

  key | - [in] The code sequence tag to be checked/inserted
  targetDset | - [in/out] The dataset to search (and insert) in
  codeValue | - [in] Code Value to be used
  codeMeaning | - [in] Code Meaning to be used
  codingSchemeDesignator | - [in] Coding Scheme Designator to be used

Returns
  Error string, which is empty if no error occurs.

## checkAndInventType2Attrib()

virtual OFString I2DOutputPlug::checkAndInventType2Attrib | ( | const DcmTagKey & | key,
|  | DcmDataset * | targetDset,
|  | const OFString & | defaultValue = "" ) const

protected virtual

Checks whether a given tag exists in a dataset (can be empty) If not, the tag is inserted (if enabled) with empty value.

Parameters

  key | - [in] The tag to be checked/inserted
  targetDset | - [in/out] The dataset to search (and insert) in
  defaultValue | - [in] The default value to set

Returns
  Error string, which is empty if no error occurs.

## checkType1Attrib()

virtual OFString I2DOutputPlug::checkType1Attrib | ( | const DcmTagKey & | key,
|  | DcmDataset * | targetDset ) const

protected virtual

Checks whether a given tag exists in a dataset and is non-empty, otherwise returns an error string.

Parameters

  key | - [in] The tag to be checked/inserted
  targetDset | - [in/out] The dataset to search (and insert) in

Returns
  Error string, which is empty if no error occurs.

## colorModelPermitted()

virtual OFBool I2DOutputPlug::colorModelPermitted | ( | const OFString & | photometricInterpretation,
|  | E_TransferSyntax | outputTS ) const

pure virtual

checks if the output SOP class permits the given combination of transfer syntax and photometric interpretation

Parameters

  photometricInterpretation | - [in] photometric interpretation
  outputTS | - [in] output transfer syntax

Returns
  true if combination permitted, false otherwise

Implemented in I2DOutputPlugNewSC, I2DOutputPlugOphthalmicPhotography, I2DOutputPlugSC, and I2DOutputPlugVLP.

## convert()

virtual OFCondition I2DOutputPlug::convert | ( | DcmDataset & | dataset | ) | const

pure virtual

Outputs SOP class specific information into dataset.

Parameters

  dataset | - [in/out] Dataset to write to

Returns
  EC_Normal if successful, error otherwise

Implemented in I2DOutputPlugNewSC, I2DOutputPlugOphthalmicPhotography, I2DOutputPlugSC, and I2DOutputPlugVLP.

## ident()

virtual OFString I2DOutputPlug::ident | ( |  | ) |

pure virtual

Virtual function that returns a short name of the plugin.

Returns
  The name of the plugin

Implemented in I2DOutputPlugNewSC, I2DOutputPlugOphthalmicPhotography, I2DOutputPlugSC, and I2DOutputPlugVLP.

## insertMultiFrameAttributes()

virtual OFCondition I2DOutputPlug::insertMultiFrameAttributes | ( | DcmDataset * | targetDataset,
|  | size_t | numberOfFrames ) const

pure virtual

Add multiframe specific attributes.

Parameters

  targetDataset | pointer to DICOM dataset, must not be NULL
  numberOfFrames | number of frames in this dataset

Returns
  EC_Normal if successful, an error code otherwise

Implemented in I2DOutputPlugNewSC, I2DOutputPlugOphthalmicPhotography, I2DOutputPlugSC, and I2DOutputPlugVLP.

## isValid()

virtual OFString I2DOutputPlug::isValid | ( | DcmDataset & | dataset | ) | const

pure virtual

Do some completeness / validity checks.

Should be called when dataset is completed and is about to be saved.

Parameters

  dataset | - [in] The dataset to check

Returns
  Error string if error occurs, empty string otherwise

Implemented in I2DOutputPlugNewSC, I2DOutputPlugOphthalmicPhotography, I2DOutputPlugSC, and I2DOutputPlugVLP.

## setValidityChecking()

virtual void I2DOutputPlug::setValidityChecking | ( | OFBool | doChecks,
|  | OFBool | insertMissingType2 = OFTrue,
|  | OFBool | inventMissingType1 = OFTrue )

virtual

Enable/Disable basic validity checks for output dataset.

Parameters

  doChecks | - [in] OFTrue enables checking, OFFalse turns it off.
  insertMissingType2 | - [in] If true (default), missing type 2 attributes are inserted automatically
  inventMissingType1 | - [in] If true (default), missing type 1 attributes are inserted automatically with a predefined value (if possible). An existing empty type 1 attribute is assigned a value, too.

## supportedSOPClassUIDs()

virtual void I2DOutputPlug::supportedSOPClassUIDs | ( | OFList< OFString > & | suppSOPs | ) |

pure virtual

Virtual function that returns the Storage SOP class UID, the plugin writes.

Parameters

  suppSOPs | - [out] List containing supported output SOP classes

Implemented in I2DOutputPlugNewSC, I2DOutputPlugOphthalmicPhotography, I2DOutputPlugSC, and I2DOutputPlugVLP.

## supportsMultiframe()

virtual OFBool I2DOutputPlug::supportsMultiframe | ( |  | ) | const

pure virtual

check if the output format supported by this plugin can write multi-frame images.

Returns
  true if multiframe is supported, false otherwise

Implemented in I2DOutputPlugNewSC, I2DOutputPlugOphthalmicPhotography, I2DOutputPlugSC, and I2DOutputPlugVLP.

## updateColorModel()

virtual OFCondition I2DOutputPlug::updateColorModel | ( | OFString & | photometricInterpretation,
|  | E_TransferSyntax | outputTS ) const

pure virtual

change the photometric interpretation to the next best permitted one, for lenient mode

Parameters

  photometricInterpretation | - [in/out] photometric interpretation
  outputTS | - [in] output transfer syntax

Returns
  EC_Normal if a "compatible" replacement exists, an error code otherwise

Implemented in I2DOutputPlugNewSC, I2DOutputPlugOphthalmicPhotography, I2DOutputPlugSC, and I2DOutputPlugVLP.

## Member Data Documentation

## m_inventMissingType1Attribs

OFBool I2DOutputPlug::m_inventMissingType1Attribs

protected

if enbled, missing type 1 attributes are inserted and filled with a predefined value.

Default: disabled (OFFalse)

## m_inventMissingType2Attribs

OFBool I2DOutputPlug::m_inventMissingType2Attribs

protected

if enabled, missing type 2 attributes in the dataset are added automatically.

default: enabled (OFTrue)

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

- dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0