DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Member Functions | Private Attributes | List of all members
DVPSImageBoxContent Class Reference

the representation of a Image Box Content SQ item for Stored Print More...

## Public Member Functions
| DVPSImageBoxContent ()
| default constructor
| DVPSImageBoxContent (const DVPSImageBoxContent &copy)
| copy constructor
DVPSImageBoxContent * | clone ()
| clone method. More...
virtual | ~DVPSImageBoxContent ()
| destructor
void | clear ()
| resets the object to initial state. More...
OFCondition | read (DcmItem &dset, DVPSPresentationLUT_PList &presentationLUTList)
| reads an image box content item from a DICOM dataset. More...
OFCondition | write (DcmItem &dset, OFBool writeRequestedImageSize, OFBool writeReferencedPLUTSQ=OFTrue)
| writes the image box managed by this object to a DICOM dataset. More...
OFCondition | createDefaultValues (OFBool renumber, unsigned long number, OFBool ignoreEmptyImages)
| create default values for all missing type 1 elements. More...
const char * | getSOPClassUID ()
| returns the referencedSOPClassUID from the ReferencedImageSequence More...
OFCondition | setContent (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 *presentationlutreference)
| sets the content of this image box object. More...
OFCondition | setRequestedDecimateCropBehaviour (DVPSDecimateCropBehaviour value)
| sets the (optional) requested decimate/crop behaviour for this image box. More...
DVPSDecimateCropBehaviour | getRequestedDecimateCropBehaviour ()
| gets the current requested decimate/crop behaviour setting that is used for this image box. More...
OFBool | hasAdditionalSettings ()
| checks whether image box has additional settings that are not default. More...
const char * | getReferencedPresentationLUTInstanceUID ()
| gets the (optional) referenced Presentation LUT Instance UID. More...
const char * | getPolarity ()
| gets the polarity. More...
const char * | getRequestedImageSize ()
| gets the requested image size. More...
const char * | getMagnificationType ()
| gets the (optional) magnification type. More...
const char * | getSmoothingType ()
| gets the (optional) smoothing type. More...
const char * | getConfigurationInformation ()
| gets the (optional) configuration information. More...
const char * | getSOPInstanceUID ()
| gets the current SOP Instance UID. More...
Uint16 | getImageBoxPosition ()
| gets the current image box position, 0 if none is set. More...
OFCondition | setPolarity (const char *value)
| sets the polarity. More...
OFCondition | setRequestedImageSize (const char *value)
| sets the requested image size. More...
OFCondition | setMagnificationType (const char *value)
| sets the (optional) magnification type. More...
OFCondition | setSmoothingType (const char *value)
| sets the (optional) smoothing type. More...
OFCondition | setConfigurationInformation (const char *value)
| sets the (optional) configuration information. More...
OFCondition | setSOPInstanceUID (const char *value)
| sets the SOP instance UID (which is returned by the Print SCP). More...
OFCondition | setDefault ()
| sets magnification type, smoothing type and configuration information back to default. More...
OFCondition | getImageReference (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 More...
OFCondition | prepareBasicImageBox (DcmItem &dset)
| writes the attributes managed by this objects that are part of a basic grayscale image box N-SET request into the DICOM dataset. More...
OFBool | matchesPresentationLUT (DVPSPrintPresentationLUTAlignment align) const
| checks whether the given Presentation LUT type could be used together with this image box on a Print SCP that requires a matching alignment between a Presentation LUT and the image pixel data. More...
OFBool | printSCPSet (DVConfiguration &cfg, const char *cfgname, DcmDataset *rqDataset, T_DIMSE_Message &rsp, DcmDataset *&rspDataset, DcmDataset &imageDataset, DVPSPrintPresentationLUTAlignment align, OFBool presentationLUTnegotiated)
| performs a Print SCP Basic Grayscale Image Box N-SET operation. More...
OFCondition | setUIDsAndAETitle (DcmUniqueIdentifier &studyUID, DcmUniqueIdentifier &seriesUID, const char *aetitle)
| assigns new values for study instance UID, series instance UID and retrieve aetitle. More...

## Private Member Functions
DVPSImageBoxContent & | operator= (const DVPSImageBoxContent &)
| private undefined assignment operator
OFCondition | addReferencedPLUTSQ (DcmItem &dset)
| writes a Referenced Presentation LUT SQ to the given dataset. More...
OFBool | printSCPEvaluateBasicGrayscaleImageSequence (DVConfiguration &cfg, const char *cfgname, DcmItem *rqDataset, T_DIMSE_Message &rsp, DcmDataset &imageDataset, DVPSPrintPresentationLUTAlignment align, OFBool presentationLUTnegotiated)
| evaluates the contents of the Basic Grayscale Image Sequence during a Print SCP Basic Grayscale Image Box N-SET operation. More...

## Private Attributes
DcmUniqueIdentifier | sOPInstanceUID
| Module=Image_Box_List, VR=UI, VM=1, Type 1(c)
DcmUnsignedShort | imageBoxPosition
| Module=Image_Box_List, VR=US, VM=1, Type 1.
DcmCodeString | polarity
| Module=Image_Box_List, VR=CS, VM=1, Type 2.
DcmCodeString | magnificationType
| Module=Image_Box_List, VR=CS, VM=1, Type 3.
DcmShortText | configurationInformation
| Module=Image_Box_List, VR=ST, VM=1, Type 3.
DcmCodeString | smoothingType
| Module=Image_Box_List, VR=CS, VM=1, Type 3.
DcmDecimalString | requestedImageSize
| Module=Image_Box_List, VR=DS, VM=1, Type 3.
DcmCodeString | requestedDecimateCropBehavior
| Module=Image_Box_List (Supplement 38), VR=CS, VM=1, Type 3.
DcmApplicationEntity | retrieveAETitle
| Module=Image_Box_List, VR=AE, VM=1-n, Type 1.
DcmUniqueIdentifier | referencedSOPClassUID
| Module=Image_Box_List, VR=UI, VM=1, Type 1.
DcmUniqueIdentifier | referencedSOPInstanceUID
| Module=Image_Box_List, VR=UI, VM=1, Type 1.
DcmUniqueIdentifier | studyInstanceUID
| Module=Image_Box_List, VR=UI, VM=1, Type 1.
DcmUniqueIdentifier | seriesInstanceUID
| Module=Image_Box_List, VR=UI, VM=1, Type 1.
DcmIntegerString | referencedFrameNumber
| Module=Image_Box_List, VR=IS, VM=1, Type 1c.
DcmLongString | patientID
| Module=Image_Box_List, VR=LO, VM=1, Type 2.
DVPSImageDepth | imageDepth
| describes whether the image depth is 8 bit or 12 bit.

## Detailed Description

the representation of a Image Box Content SQ item for Stored Print

## Member Function Documentation

## ◆ addReferencedPLUTSQ()

OFCondition DVPSImageBoxContent::addReferencedPLUTSQ | ( | DcmItem & | dset | ) |
| private

writes a Referenced Presentation LUT SQ to the given dataset.

Helper function used in the more general write() method.

Parameters

  dset | the dataset to which the data is written

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ clear()

void DVPSImageBoxContent::clear | ( |  | ) |

resets the object to initial state.

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

## ◆ clone()

DVPSImageBoxContent* DVPSImageBoxContent::clone | ( |  | ) |
| inline

clone method.

Returns
  a pointer to a new DVPSImageBoxContent object containing a copy of this object.

## ◆ createDefaultValues()

OFCondition DVPSImageBoxContent::createDefaultValues | ( | OFBool | renumber,
|  | unsigned long | number,
|  | OFBool | ignoreEmptyImages
| ) |  |

create default values for all missing type 1 elements.

Called before a stored print object is written.

Parameters

  renumber | if true, a new imageBoxPosition values is created
  number | new imageBoxPosition to be assigned
  ignoreEmptyImages | if true, an empty image box position does not cause an error.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ getConfigurationInformation()

const char* DVPSImageBoxContent::getConfigurationInformation | ( |  | ) |

gets the (optional) configuration information.

Returns
  configuration information, may be NULL.

## ◆ getImageBoxPosition()

Uint16 DVPSImageBoxContent::getImageBoxPosition | ( |  | ) |

gets the current image box position, 0 if none is set.

Returns
  image box position

## ◆ getImageReference()

OFCondition DVPSImageBoxContent::getImageReference | ( | 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

  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.

## ◆ getMagnificationType()

const char* DVPSImageBoxContent::getMagnificationType | ( |  | ) |

gets the (optional) magnification type.

Returns
  magnification type, may be NULL.

## ◆ getPolarity()

const char* DVPSImageBoxContent::getPolarity | ( |  | ) |

gets the polarity.

Returns
  polarity, may be NULL.

## ◆ getReferencedPresentationLUTInstanceUID()

const char* DVPSImageBoxContent::getReferencedPresentationLUTInstanceUID | ( |  | ) |

gets the (optional) referenced Presentation LUT Instance UID.

Returns
  UID, may be NULL.

## ◆ getRequestedDecimateCropBehaviour()

DVPSDecimateCropBehaviour DVPSImageBoxContent::getRequestedDecimateCropBehaviour | ( |  | ) |

gets the current requested decimate/crop behaviour setting that is used for this image box.

Returns
  requested decimate/crop behaviour

## ◆ getRequestedImageSize()

const char* DVPSImageBoxContent::getRequestedImageSize | ( |  | ) |

gets the requested image size.

Returns
  requested image size, may be NULL.

## ◆ getSmoothingType()

const char* DVPSImageBoxContent::getSmoothingType | ( |  | ) |

gets the (optional) smoothing type.

Returns
  smoothing type, may be NULL.

## ◆ getSOPClassUID()

const char* DVPSImageBoxContent::getSOPClassUID | ( |  | ) |

returns the referencedSOPClassUID from the ReferencedImageSequence

Returns
  referencedSOPClassUID string

## ◆ getSOPInstanceUID()

const char* DVPSImageBoxContent::getSOPInstanceUID | ( |  | ) |

gets the current SOP Instance UID.

Returns
  SOP Instance UID, may be NULL.

## ◆ hasAdditionalSettings()

OFBool DVPSImageBoxContent::hasAdditionalSettings | ( |  | ) |

checks whether image box has additional settings that are not default.

Returns
  OFTrue if additional settings exist, OFFalse otherwise.

## ◆ matchesPresentationLUT()

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

checks whether the given Presentation LUT type could be used together with this image box 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::prepareBasicImageBox | ( | DcmItem & | dset | ) |

writes the attributes managed by this objects 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

  dset | the dataset to which the data is written

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ printSCPEvaluateBasicGrayscaleImageSequence()

OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence | ( | DVConfiguration & | cfg,
|  | const char * | cfgname,
|  | DcmItem * | rqDataset,
|  | T_DIMSE_Message & | rsp,
|  | DcmDataset & | imageDataset,
|  | DVPSPrintPresentationLUTAlignment | align,
|  | OFBool | presentationLUTnegotiated
| ) |  |
| private

evaluates the contents of the Basic Grayscale Image Sequence during a Print SCP Basic Grayscale Image Box N-SET operation.

The results of the N-SET operation are stored in the object passed as rsp.

Parameters

  cfg | config file facility
  cfgname | symbolic printer name in config file
  rqDataset | first item of the Basic Grayscale Image Sequence
  rsp | N-SET response message
  imageDataset | a hardcopy grayscale image (without general study and general series modules which must be added by the caller) containing the image data from the N-SET request is written to this dataset if the method returns successfully.
  align | describes the current Presentation LUT. Used if the Print SCP has been configured to enforce a matching of Presentation LUT and pixel data bit depth.
  presentationLUTnegotiated | OFTrue if support for the Presentation LUT SOP class has been negotiated at association negotiation

Returns
  OFTrue if N-SET operation was successful, OFFalse otherwise.

## ◆ printSCPSet()

OFBool DVPSImageBoxContent::printSCPSet | ( | DVConfiguration & | cfg,
|  | const char * | cfgname,
|  | DcmDataset * | rqDataset,
|  | T_DIMSE_Message & | rsp,
|  | DcmDataset *& | rspDataset,
|  | DcmDataset & | imageDataset,
|  | DVPSPrintPresentationLUTAlignment | align,
|  | OFBool | presentationLUTnegotiated
| ) |  |

performs a Print SCP Basic Grayscale Image Box N-SET operation.

The results of the N-SET operation are stored in the objects passed as rsp and rspDataset.

Parameters

  cfg | config file facility
  cfgname | symbolic printer name in config file
  rqDataset | N-SET request dataset
  rsp | N-SET response message
  rspDataset | N-SET response dataset passed back in this parameter
  imageDataset | a hardcopy grayscale image (without general study and general series modules which must be added by the caller) containing the image data from the N-SET request is written to this dataset if the method returns successfully.
  align | describes the current Presentation LUT. Used if the Print SCP has been configured to enforce a matching of Presentation LUT and pixel data bit depth.
  presentationLUTnegotiated | OFTrue if support for the Presentation LUT SOP class has been negotiated at association negotiation

Returns
  OFTrue if N-SET operation was successful, OFFalse otherwise.

## ◆ read()

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

reads an image box content item from a DICOM dataset.

The DICOM elements of the referenced item are copied from the dataset to this object. The completeness of the item (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 item of the ImageBoxContentSequence from which the data is to be read
  presentationLUTList | list of presentation LUTs which may be referenced

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setConfigurationInformation()

OFCondition DVPSImageBoxContent::setConfigurationInformation | ( | const char * | value | ) |

sets the (optional) configuration information.

Parameters

  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.

## ◆ setContent()

OFCondition DVPSImageBoxContent::setContent | ( | 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 * | presentationlutreference
| ) |  |

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
  patientid | patient ID for the referenced image
  presentationlutreference | referenced SOP instance UID for the referenced Presentation LUT,

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setDefault()

OFCondition DVPSImageBoxContent::setDefault | ( |  | ) |

sets magnification type, smoothing type and configuration information back to default.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setMagnificationType()

OFCondition DVPSImageBoxContent::setMagnificationType | ( | const char * | value | ) |

sets the (optional) magnification type.

Parameters

  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.

## ◆ setPolarity()

OFCondition DVPSImageBoxContent::setPolarity | ( | const char * | value | ) |

sets the polarity.

Parameters

  value | new attribute value (NORMAL or REVERSE), may be NULL.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setRequestedDecimateCropBehaviour()

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

sets the (optional) requested decimate/crop behaviour for this image box.

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.

## ◆ setRequestedImageSize()

OFCondition DVPSImageBoxContent::setRequestedImageSize | ( | const char * | value | ) |

sets the requested image size.

Parameters

  value | new attribute value, may be NULL.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setSmoothingType()

OFCondition DVPSImageBoxContent::setSmoothingType | ( | const char * | value | ) |

sets the (optional) smoothing type.

Parameters

  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.

## ◆ setSOPInstanceUID()

OFCondition DVPSImageBoxContent::setSOPInstanceUID | ( | const char * | value | ) |

sets the SOP instance UID (which is returned by the Print SCP).

Parameters

  value | new attribute value, must not be NULL.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setUIDsAndAETitle()

OFCondition DVPSImageBoxContent::setUIDsAndAETitle | ( | DcmUniqueIdentifier & | studyUID,
|  | DcmUniqueIdentifier & | seriesUID,
|  | const char * | aetitle
| ) |  |

assigns new values for study instance UID, series instance UID and retrieve aetitle.

Parameters

  studyUID | new studyUID
  seriesUID | new seriesUID
  aetitle | new retrieve aetitle, must not be NULL.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ write()

OFCondition DVPSImageBoxContent::write | ( | DcmItem & | dset,
|  | OFBool | writeRequestedImageSize,
|  | OFBool | writeReferencedPLUTSQ = `OFTrue`
| ) |  |

writes the image box 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 the item of the ImageBoxContentSequence to which the data is written
  writeRequestedImageSize | if false, the Requested Image Size attribute is not written, e.g. because it is not supported by the target printer.
  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.

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

- dcmpstat/include/dcmtk/dcmpstat/dvpsib.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1