Loading...
Searching...
No Matches
DVPSHelper Class Reference

this class contains a collection of static helper methods. More...

## Static Public Member Functions

static OFCondition | loadFileFormat (const char *filename, DcmFileFormat *&fileformat)
| helper function which loads a DICOM file and returns a pointer to a DcmFileFormat object if loading succeeds.
static OFCondition | saveFileFormat (const char *filename, DcmFileFormat *fileformat, OFBool explicitVR)
| helper function which saves a DICOM object to file.
static OFCondition | putStringValue (DcmItem *item, DcmTagKey tag, const char *value=NULL)
| helper function that inserts a new element into a DICOM dataset.
static OFCondition | putUint16Value (DcmItem *item, DcmTagKey tag, Uint16 value)
| helper function that inserts a new element into a DICOM dataset.
static void | cleanChildren ()
| helper function that cleans up pending processes under Unix.
static void | currentDate (OFString &str)
| helper function that writes the current date in DICOM format (YYYYMMDD)
static void | currentTime (OFString &str)
| helper function that writes the current time in DICOM format (HHMMSS)
static void | setDefault (OFCondition &result, DcmElement &a_name, const char *a_value)
| assigns the given value to the given DICOM element if it is empty and the status is OK, returns new status.
static OFBool | haveReferencedUIDItem (DcmSequenceOfItems &seq, const char *uid)
| static helper method that checks whether the given sequence contains an item with a ReferencedSOPClassUID element that matches the given UID string.
static OFCondition | addReferencedUIDItem (DcmSequenceOfItems &seq, const char *uid)
| static helper method that adds an item to the given sequence.

## Detailed Description

this class contains a collection of static helper methods.

## Member Function Documentation

## addReferencedUIDItem()

OFCondition DVPSHelper::addReferencedUIDItem | ( | DcmSequenceOfItems & | seq,
|  | const char * | uid )

static

static helper method that adds an item to the given sequence.

The item contains a ReferencedSOPClassUID element with the given UID string as value.

Parameters

  seq | sequence to be added to, should be a PrintManagementCapabilitiesSequence.
  uid | UID string, must not be NULL

Returns
  EC_Normal if successful, an error code otherwise.

## cleanChildren()

void DVPSHelper::cleanChildren | ( |  | ) |

static

helper function that cleans up pending processes under Unix.

No function if used on Windows.

## currentDate()

void DVPSHelper::currentDate | ( | OFString & | str | ) |

static

helper function that writes the current date in DICOM format (YYYYMMDD)

Parameters

  str | current date is written to this string

## currentTime()

void DVPSHelper::currentTime | ( | OFString & | str | ) |

static

helper function that writes the current time in DICOM format (HHMMSS)

Parameters

  str | current time is written to this string

## haveReferencedUIDItem()

OFBool DVPSHelper::haveReferencedUIDItem | ( | DcmSequenceOfItems & | seq,
|  | const char * | uid )

static

static helper method that checks whether the given sequence contains an item with a ReferencedSOPClassUID element that matches the given UID string.

Parameters

  seq | sequence to be searched, should be a PrintManagementCapabilitiesSequence.
  uid | UID string

Returns
  OFTrue if found, OFFalse otherwise. Returns OFFalse if uid is NULL.

## loadFileFormat()

OFCondition DVPSHelper::loadFileFormat | ( | const char * | filename,
|  | DcmFileFormat *& | fileformat )

static

helper function which loads a DICOM file and returns a pointer to a DcmFileFormat object if loading succeeds.

Parameters

  filename | name of DICOM file to be loaded
  fileformat | pointer to DcmFileFormat object passed back here

Returns
  EC_Normal upon success, an error code otherwise.

## putStringValue()

OFCondition DVPSHelper::putStringValue | ( | DcmItem * | item,
|  | DcmTagKey | tag,
|  | const char * | value = NULL )

static

helper function that inserts a new element into a DICOM dataset.

A new DICOM element of the type determined by the tag is created. The string value (if any) is assigned and the element is inserted into the dataset. Only tags corresponding to string VRs may be passed.

Parameters

  item | the dataset into which the new element is inserted
  tag | the tag key of the new DICOM element, must have string VR.
  value | the value to be inserted. If omitted, an empty element is created.

Returns
  EC_Normal upon success, an error code otherwise.

## putUint16Value()

OFCondition DVPSHelper::putUint16Value | ( | DcmItem * | item,
|  | DcmTagKey | tag,
|  | Uint16 | value )

static

helper function that inserts a new element into a DICOM dataset.

A new DICOM element of type "US" is created, the value is assigned and the element is inserted into the dataset.

Parameters

  item | the dataset into which the new element is inserted
  tag | the tag key of the new DICOM element, must have "US" VR.
  value | the value to be inserted.

Returns
  EC_Normal upon success, an error code otherwise.

## saveFileFormat()

OFCondition DVPSHelper::saveFileFormat | ( | const char * | filename,
|  | DcmFileFormat * | fileformat,
|  | OFBool | explicitVR )

static

helper function which saves a DICOM object to file.

Parameters

  filename | name of DICOM file to be created
  fileformat | DICOM object to be saved
  explicitVR | selects the transfer syntax to be written. True selects Explicit VR Little Endian, False selects Implicit VR Little Endian.

Returns
  EC_Normal upon success, an error code otherwise.

## setDefault()

void DVPSHelper::setDefault | ( | OFCondition & | result,
|  | DcmElement & | a_name,
|  | const char * | a_value )

static

assigns the given value to the given DICOM element if it is empty and the status is OK, returns new status.

Parameters

  result | status in/out
  a_name | DICOM element to be set
  a_value | new value, must not be NULL.

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

- dcmpstat/include/dcmtk/dcmpstat/dvpshlp.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0