DCMTK: DVPSImageBoxContent_PList Class Reference

DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DVPSImageBoxContent_PList Class Reference

the list of Image Boxes contained in a stored print object. More...

## Public Member Functions
| DVPSImageBoxContent_PList ()
| default constructor
| DVPSImageBoxContent_PList (const DVPSImageBoxContent_PList &copy)
| copy constructor
DVPSImageBoxContent_PList * | clone ()
| clone method.
virtual | ~DVPSImageBoxContent_PList ()
| destructor
OFCondition | read (DcmItem &dset, DVPSPresentationLUT_PList &presentationLUTList)
| reads a list of image boxes (ImageBoxContentSequence) from a DICOM dataset.
OFCondition | write (DcmItem &dset, OFBool writeRequestedImageSize, size_t numItems, OFBool ignoreEmptyImages, OFBool writeReferencedPLUTSQ=OFTrue)
| writes the list of image boxes managed by this object to a DICOM dataset.
void | clear ()
| reset the object to initial state.
size_t | size () const
| gets the number of image boxes in this list.
OFCondition | createDefaultValues (OFBool renumber, OFBool ignoreEmptyImages)
| create default values for all missing type 1 elements.
OFCondition | addImageSOPClasses (DcmSequenceOfItems &seq, size_t numItems=0)
| adds all image SOP classes referenced in the image box list to the given sequence.
OFCondition | addImageBox (const char *instanceuid, const char *retrieveaetitle, const char *refstudyuid, const char *refseriesuid, const char *refsopclassuid, const char *refsopinstanceuid, const char *requestedimagesize, const char *patientid, const char *presentationlutuid)
| creates a new image box object and sets the content of this image box object.
OFCondition | addImageBox (DVPSImageBoxContent *box)
| adds the given image box object to the list managed by this object.
OFCondition | setRequestedDecimateCropBehaviour (DVPSDecimateCropBehaviour value)
| sets the (optional) requested decimate/crop behaviour for all image boxes managed by this object.
OFCondition | deleteImage (size_t idx)
| deletes one of the registered images.
OFCondition | deleteMultipleImages (size_t number)
| deletes multiple of the registered images, starting with the first one.
OFBool | imageHasAdditionalSettings (size_t idx)
| checks if one of the registered images has additional settings that are not default values on the image box level.
OFCondition | setImagePolarity (size_t idx, const char *value)
| sets the polarity for the given registered image box.
OFCondition | setImageRequestedSize (size_t idx, const char *value)
| sets the requested size for the given registered image box.
OFCondition | setImageMagnificationType (size_t idx, const char *value)
| sets the (optional) magnification type for the given registered image box.
OFCondition | setImageSmoothingType (size_t idx, const char *value)
| sets the (optional) smoothing type for the given registered image box.
OFCondition | setImageConfigurationInformation (size_t idx, const char *value)
| sets the (optional) configuration information for the given registered image box.
OFCondition | setImageSOPInstanceUID (size_t idx, const char *value)
| sets the SOP instance UID for the given image box.
OFCondition | setAllImagesToDefault ()
| sets magnification type, smoothing type and configuration information back to default for all registered images.
const char * | getImagePolarity (size_t idx)
| gets the polarity for the given registered image box.
const char * | getImageRequestedSize (size_t idx)
| gets the requested size for the given registered image box.
const char * | getImageMagnificationType (size_t idx)
| gets the (optional) magnification type for the given registered image box.
const char * | getImageSmoothingType (size_t idx)
| gets the (optional) smoothing type for the given registered image box.
const char * | getImageConfigurationInformation (size_t idx)
| gets the (optional) configuration information for the given registered image box.
const char * | getSOPInstanceUID (size_t idx)
| gets the current SOP Instance UID for the given registered image box.
const char * | getReferencedPresentationLUTInstanceUID (size_t idx)
| gets the referenced Presentation LUT SOP Instance UID for the given registered image box.
OFCondition | getImageReference (size_t idx, const char *&studyUID, const char *&seriesUID, const char *&instanceUID)
| returns the image UIDs that are required to look up the referenced image in the database
OFCondition | prepareBasicImageBox (size_t idx, DcmItem &dset)
| writes the attributes managed by the referenced object that are part of a basic grayscale image box N-SET request into the DICOM dataset.
OFBool | presentationLUTInstanceUIDisUsed (const char *uid)
| checks whether the given SOP instance UID is used as referenced Presentation LUT SOP Instance UID inside the list of image boxes managed by this object.
const char * | haveSinglePresentationLUTUsed (const char *filmBox)
| if only one Presentation LUT is required to render all images managed by this object, returns the UID of this presentation LUT.
OFBool | printSCPCreate (unsigned long numBoxes, DcmUniqueIdentifier &studyUID, DcmUniqueIdentifier &seriesUID, const char *aetitle)
| creates a number of image boxes as part of a Print SCP N-CREATE operation.
OFCondition | writeReferencedImageBoxSQ (DcmItem &dset)
| writes a Referenced Image Box Sequence for the image boxes managed by this object.
OFBool | matchesPresentationLUT (DVPSPrintPresentationLUTAlignment align) const
| checks whether the given Presentation LUT type could be used together with all image boxes in this list on a Print SCP that requires a matching alignment between a Presentation LUT and the image pixel data.
DVPSImageBoxContent * | duplicateImageBox (const char *uid)
| looks up the image box with the given SOP instance UID in this list and returns a pointer to a new object containing a copy of this image box.
OFBool | haveImagePositionClash (const char *uid, Uint16 position)
| checks whether any of the image boxes managed by this list has the same position as the given one, but a different SOP instance UID.
void | replace (DVPSImageBoxContent *newImageBox)
| adds the given image box object to this list.
OFBool | emptyPageWarning ()
| checks whether any of the image boxes has an image box position assigned.

## Private Member Functions
DVPSImageBoxContent_PList & | operator= (const DVPSImageBoxContent_PList &)
| private undefined assignment operator
DVPSImageBoxContent * | getImageBox (size_t idx)
| returns a pointer to the image box with the given index or NULL if it does not exist.

## Private Attributes
OFList< DVPSImageBoxContent * > | list_
| the list maintained by this object

## Detailed Description

the list of Image Boxes contained in a stored print object.

This class manages the data structures comprising one complete Image Box Content Sequence in a Stored Print object.

## Member Function Documentation

## ◆ addImageBox() [1/2]

OFCondition DVPSImageBoxContent_PList::addImageBox | ( | const char * | instanceuid,
|  | const char * | retrieveaetitle,
|  | const char * | refstudyuid,
|  | const char * | refseriesuid,
|  | const char * | refsopclassuid,
|  | const char * | refsopinstanceuid,
|  | const char * | requestedimagesize,
|  | const char * | patientid,
|  | const char * | presentationlutuid )

creates a new image box object and sets the content of this image box object.

Parameters

  instanceuid | SOP instance UID of this image box
  retrieveaetitle | retrieve AETITLE of the referenced image
  refstudyuid | study instance UID of the referenced image
  refseriesuid | series instance UID of the referenced image
  refsopclassuid | SOP class UID of the referenced image
  refsopinstanceuid | SOP instance UID of the referenced image
  requestedimagesize | requested images size for this image, default: absent
  patientid | patient ID for the referenced image, default: absent

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ addImageBox() [2/2]

OFCondition DVPSImageBoxContent_PList::addImageBox | ( | DVPSImageBoxContent * | box | ) |

adds the given image box object to the list managed by this object.

Parameters

  box | image box object to be added.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ addImageSOPClasses()

OFCondition DVPSImageBoxContent_PList::addImageSOPClasses | ( | DcmSequenceOfItems & | seq,
|  | size_t | numItems = 0 )

adds all image SOP classes referenced in the image box list to the given sequence.

Duplicate entries are suppressed.

Parameters

  seq | sequence to be added to, should be a PrintManagementCapabilitiesSequence.
  numItems | number of items of this list to be taken into account. Default: all items.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ clear()

void DVPSImageBoxContent_PList::clear | ( |  | ) |

reset the object to initial state.

After this call, the object is in the same state as after creation with the default constructor.

## ◆ clone()

DVPSImageBoxContent_PList * DVPSImageBoxContent_PList::clone | ( |  | ) |
| inline

clone method.

Returns
  a pointer to a new DVPSImageBoxContent_PList object containing a deep copy of this object.

References DVPSImageBoxContent_PList().

## ◆ createDefaultValues()

OFCondition DVPSImageBoxContent_PList::createDefaultValues | ( | OFBool | renumber,
|  | OFBool | ignoreEmptyImages )

create default values for all missing type 1 elements.

Called before a stored print object is written.

Parameters

  renumber | if true, new imageBoxPosition values are created
  ignoreEmptyImages | if true, an empty image box position does not cause an error.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ deleteImage()

OFCondition DVPSImageBoxContent_PList::deleteImage | ( | size_t | idx | ) |

deletes one of the registered images.

Parameters

  idx | index, must be < size()

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ deleteMultipleImages()

OFCondition DVPSImageBoxContent_PList::deleteMultipleImages | ( | size_t | number | ) |

deletes multiple of the registered images, starting with the first one.

Parameters

  number | number of images to delete, must be <= size()

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ duplicateImageBox()

DVPSImageBoxContent * DVPSImageBoxContent_PList::duplicateImageBox | ( | const char * | uid | ) |

looks up the image box with the given SOP instance UID in this list and returns a pointer to a new object containing a copy of this image box.

If the object is not found, NULL is returned.

Parameters

  uid | SOP instance UID of the image box to be looked up

Returns
  pointer to copied image box object, may be NULL.

## ◆ emptyPageWarning()

OFBool DVPSImageBoxContent_PList::emptyPageWarning | ( |  | ) |

checks whether any of the image boxes has an image box position assigned.

If no image box position is assigned, the object list cannot be written and a Print SCP should return a warning status upon receipt of an N-ACTION request.

Returns
  OFTrue if empty page (no image box position assigned), OFFalse otherwise.

## ◆ getImageBox()

DVPSImageBoxContent * DVPSImageBoxContent_PList::getImageBox | ( | size_t | idx | ) |
| private

returns a pointer to the image box with the given index or NULL if it does not exist.

Parameters

  idx | index, must be < size()

Returns
  pointer to image box object or NULL

## ◆ getImageConfigurationInformation()

const char * DVPSImageBoxContent_PList::getImageConfigurationInformation | ( | size_t | idx | ) |

gets the (optional) configuration information for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()

Returns
  configuration information, may be NULL.

## ◆ getImageMagnificationType()

const char * DVPSImageBoxContent_PList::getImageMagnificationType | ( | size_t | idx | ) |

gets the (optional) magnification type for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()

Returns
  magnification type, may be NULL.

## ◆ getImagePolarity()

const char * DVPSImageBoxContent_PList::getImagePolarity | ( | size_t | idx | ) |

gets the polarity for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()

Returns
  polarity, may be NULL.

## ◆ getImageReference()

OFCondition DVPSImageBoxContent_PList::getImageReference | ( | size_t | idx,
|  | const char *& | studyUID,
|  | const char *& | seriesUID,
|  | const char *& | instanceUID )

returns the image UIDs that are required to look up the referenced image in the database

Parameters

  idx | index, must be < getNumberOfImages()
  studyUID | Study UID of the image
  seriesUID | series UID of the image
  instanceUID | instance UID of the image

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ getImageRequestedSize()

const char * DVPSImageBoxContent_PList::getImageRequestedSize | ( | size_t | idx | ) |

gets the requested size for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()

Returns
  requested size, may be NULL.

## ◆ getImageSmoothingType()

const char * DVPSImageBoxContent_PList::getImageSmoothingType | ( | size_t | idx | ) |

gets the (optional) smoothing type for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()

Returns
  smoothing type, may be NULL.

## ◆ getReferencedPresentationLUTInstanceUID()

const char * DVPSImageBoxContent_PList::getReferencedPresentationLUTInstanceUID | ( | size_t | idx | ) |

gets the referenced Presentation LUT SOP Instance UID for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()

Returns
  SOP Instance UID, may be NULL.

## ◆ getSOPInstanceUID()

const char * DVPSImageBoxContent_PList::getSOPInstanceUID | ( | size_t | idx | ) |

gets the current SOP Instance UID for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()

Returns
  SOP Instance UID, may be NULL.

## ◆ haveImagePositionClash()

OFBool DVPSImageBoxContent_PList::haveImagePositionClash | ( | const char * | uid,
|  | Uint16 | position )

checks whether any of the image boxes managed by this list has the same position as the given one, but a different SOP instance UID.

This is used during an Print SCP N-SET operation to check whether a position clash exists.

Parameters

  uid | SOP instance UID of the image box to be looked up
  position | image position to be looked up

## ◆ haveSinglePresentationLUTUsed()

const char * DVPSImageBoxContent_PList::haveSinglePresentationLUTUsed | ( | const char * | filmBox | ) |

if only one Presentation LUT is required to render all images managed by this object, returns the UID of this presentation LUT.

Otherwise returns NULL.

Parameters

  filmBox | UID of Presentation LUT specified on Film Box level. May be NULL or empty string if absent.

Returns
  UID of Presentation LUT if found, NULL or empty string otherwise.

## ◆ imageHasAdditionalSettings()

OFBool DVPSImageBoxContent_PList::imageHasAdditionalSettings | ( | size_t | idx | ) |

checks if one of the registered images has additional settings that are not default values on the image box level.

Parameters

  idx | index, must be < getNumberOfImages()

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ matchesPresentationLUT()

OFBool DVPSImageBoxContent_PList::matchesPresentationLUT | ( | DVPSPrintPresentationLUTAlignment | align | ) | const

checks whether the given Presentation LUT type could be used together with all image boxes in this list on a Print SCP that requires a matching alignment between a Presentation LUT and the image pixel data.

Parameters

  align | LUT alignment type

Returns
  OFTrue if matching, OFFalse otherwise

## ◆ prepareBasicImageBox()

OFCondition DVPSImageBoxContent_PList::prepareBasicImageBox | ( | size_t | idx,
|  | DcmItem & | dset )

writes the attributes managed by the referenced object that are part of a basic grayscale image box N-SET request into the DICOM dataset.

Copies of the DICOM element managed by this object are inserted into the DICOM dataset.

Parameters

  idx | index, must be < getNumberOfImages()
  dset | the dataset to which the data is written

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ presentationLUTInstanceUIDisUsed()

OFBool DVPSImageBoxContent_PList::presentationLUTInstanceUIDisUsed | ( | const char * | uid | ) |

checks whether the given SOP instance UID is used as referenced Presentation LUT SOP Instance UID inside the list of image boxes managed by this object.

Parameters

  uid | name of UID

Returns
  OFTrue if UID is used, OFFalse otherwise.

## ◆ printSCPCreate()

OFBool DVPSImageBoxContent_PList::printSCPCreate | ( | unsigned long | numBoxes,
|  | DcmUniqueIdentifier & | studyUID,
|  | DcmUniqueIdentifier & | seriesUID,
|  | const char * | aetitle )

creates a number of image boxes as part of a Print SCP N-CREATE operation.

The previous content of the list is deleted.

Parameters

  numBoxes | number of boxes to be created
  studyUID | study instance UID under which Hardcopy Grayscale images will be saved
  seriesUID | series instance UID under which Hardcopy Grayscale images will be saved
  aetitle | retrieve AE title for Hardcopy Grayscale images

Returns
  OFTrue if successful, OFFalse otherwise.

## ◆ read()

OFCondition DVPSImageBoxContent_PList::read | ( | DcmItem & | dset,
|  | DVPSPresentationLUT_PList & | presentationLUTList )

reads a list of image boxes (ImageBoxContentSequence) from a DICOM dataset.

The DICOM elements of the image boxes are copied from the dataset to this object. The completeness of all items (presence of all required elements, value multiplicity) is checked. If this method returns an error code, the object is in undefined state afterwards.

Parameters

  dset | the DICOM dataset from which the sequence is to be read
  presentationLUTList | list of presentation LUTs which may be referenced

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ replace()

void DVPSImageBoxContent_PList::replace | ( | DVPSImageBoxContent * | newImageBox | ) |

adds the given image box object to this list.

Any other object existing in the list with the same SOP instance UID is removed. Used during a Print SCP image box N-SET operation.

Parameters

  newImageBox | new image box object to be added to the list.

## ◆ setAllImagesToDefault()

OFCondition DVPSImageBoxContent_PList::setAllImagesToDefault | ( |  | ) |

sets magnification type, smoothing type and configuration information back to default for all registered images.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setImageConfigurationInformation()

OFCondition DVPSImageBoxContent_PList::setImageConfigurationInformation | ( | size_t | idx,
|  | const char * | value )

sets the (optional) configuration information for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()
  value | new attribute value, may be NULL. The caller is responsible for making sure that the value is valid for the selected printer.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setImageMagnificationType()

OFCondition DVPSImageBoxContent_PList::setImageMagnificationType | ( | size_t | idx,
|  | const char * | value )

sets the (optional) magnification type for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()
  value | new attribute value, may be NULL. The caller is responsible for making sure that the value is valid for the selected printer.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setImagePolarity()

OFCondition DVPSImageBoxContent_PList::setImagePolarity | ( | size_t | idx,
|  | const char * | value )

sets the polarity for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()
  value | new attribute value (NORMAL or REVERSE), may be NULL.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setImageRequestedSize()

OFCondition DVPSImageBoxContent_PList::setImageRequestedSize | ( | size_t | idx,
|  | const char * | value )

sets the requested size for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()
  value | new attribute value, may be NULL.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setImageSmoothingType()

OFCondition DVPSImageBoxContent_PList::setImageSmoothingType | ( | size_t | idx,
|  | const char * | value )

sets the (optional) smoothing type for the given registered image box.

Parameters

  idx | index, must be < getNumberOfImages()
  value | new attribute value, may be NULL. The caller is responsible for making sure that the value is valid for the selected printer.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setImageSOPInstanceUID()

OFCondition DVPSImageBoxContent_PList::setImageSOPInstanceUID | ( | size_t | idx,
|  | const char * | value )

sets the SOP instance UID for the given image box.

Parameters

  idx | index, must be < getNumberOfImages()
  value | new attribute value, must not be NULL.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setRequestedDecimateCropBehaviour()

OFCondition DVPSImageBoxContent_PList::setRequestedDecimateCropBehaviour | ( | DVPSDecimateCropBehaviour | value | ) |

sets the (optional) requested decimate/crop behaviour for all image boxes managed by this object.

Parameters

  value | new enumerated value. The caller is responsible for making sure that the selected printer supports decimate/crop if a non-default value is set.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ size()

size_t DVPSImageBoxContent_PList::size | ( |  | ) | const
| inline

gets the number of image boxes in this list.

Returns
  the number of image boxes.

References list_.

## ◆ write()

OFCondition DVPSImageBoxContent_PList::write | ( | DcmItem & | dset,
|  | OFBool | writeRequestedImageSize,
|  | size_t | numItems,
|  | OFBool | ignoreEmptyImages,
|  | OFBool | writeReferencedPLUTSQ = OFTrue )

writes the list of image boxes managed by this object to a DICOM dataset.

Copies of the DICOM element managed by this object are inserted into the DICOM dataset.

Parameters

  dset | the DICOM dataset to which the ImageBoxContentSequence is written
  writeRequestedImageSize | if false, the Requested Image Size attributes are not written, e.g. because they are not supported by the target printer.
  numItems | the number of items (from the beginning of the list) to be written. Default: all items are written.
  ignoreEmptyImages | if true, all image boxes without image box position are ignored when writing.
  writeReferencedPLUTSQ | if false, the Referenced Presentation LUT Sequence is not written, e.g. because a "general" presentation LUT is used instead of those referenced by the image boxes.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ writeReferencedImageBoxSQ()

OFCondition DVPSImageBoxContent_PList::writeReferencedImageBoxSQ | ( | DcmItem & | dset | ) |

writes a Referenced Image Box Sequence for the image boxes managed by this object.

Used in a Print SCP N-CREATE operation.

Parameters

  dset | the dataset to which the data is written

Returns
  EC_Normal if successful, an error code otherwise.

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

- dcmpstat/include/dcmtk/dcmpstat/dvpsibl.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.16.1