DCMTK Version 3.6.8
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DVInterface Class Reference

Interface class for the Softcopy Presentation State viewer. More...

+ Inheritance diagram for DVInterface:

Public Member Functions

 DVInterface (const char *config_file=NULL, OFBool useLog=OFFalse)
 constructor. More...
 
virtual ~DVInterface ()
 destructor.
 
OFCondition loadImage (const char *studyUID, const char *seriesUID, const char *instanceUID, OFBool changeStatus=OFFalse)
 loads an image which is contained in the database and creates a default presentation state for the image. More...
 
OFCondition loadImage (const char *filename)
 loads an image (which need not be contained in the database) and creates a default presentation state for the image. More...
 
OFCondition loadReferencedImage (size_t idx, OFBool changeStatus=OFFalse)
 loads an image which referenced by the current presentation state and needs to be contained in the database. More...
 
OFCondition loadPState (const char *studyUID, const char *seriesUID, const char *instanceUID, OFBool changeStatus=OFFalse)
 loads a presentation state which is contained in the database. More...
 
OFCondition loadPState (const char *pstName, const char *imgName=NULL)
 loads a presentation state and an image (which need not be contained in the database) and attaches the image to the presentation state (if specified, otherwise the current image will be used). More...
 
OFCondition loadStructuredReport (const char *studyUID, const char *seriesUID, const char *instanceUID, OFBool changeStatus=OFFalse)
 loads a structured report which is contained in the database. More...
 
OFCondition loadStructuredReport (const char *filename)
 loads a structured report (which need not be contained in the database). More...
 
OFCondition loadSRTemplate (const char *reportID)
 loads a structured reporting "template". More...
 
OFCondition savePState (OFBool replaceSOPInstanceUID)
 saves the current presentation state in the same directory in which the database index file resides. More...
 
OFCondition savePState (const char *filename, OFBool replaceSOPInstanceUID, OFBool explicitVR=OFTrue)
 saves the current presentation state in a file with the given path and filename. More...
 
OFCondition saveCurrentImage (const char *filename, OFBool explicitVR=OFTrue)
 saves the DICOM image that is currently attached to the presentation state in a file with the given path and filename. More...
 
OFCondition saveStructuredReport ()
 saves the current structured report in the same directory in which the database index file resides. More...
 
OFCondition saveStructuredReport (const char *filename, OFBool explicitVR=OFTrue)
 saves the current structured report in a file with the given path and filename. More...
 
OFCondition addImageReferenceToPState (const char *studyUID, const char *seriesUID, const char *instanceUID)
 adds an image which is contained in the database to the list of referenced images of the current presentation state. More...
 
size_t getNumberOfImageReferences ()
 gets the number of image references contained in the current presentation state. More...
 
DVPresentationStategetCurrentPState ()
 returns a reference to the current presentation state. More...
 
DSRDocumentgetCurrentReport ()
 returns a reference to the current structured report. More...
 
DVPSStoredPrintgetPrintHandler ()
 returns a reference to the print handler. More...
 
OFCondition resetPresentationState ()
 resets the presentation state object to the status it had immediately after the last successful operation of "loadImage" or "loadPState". More...
 
OFCondition saveCurrentPStateForReset ()
 saves the current state of the presentation state object to be used for resetPresentationState(). More...
 
OFCondition releaseDatabase ()
 removes any shared or exclusive lock on the database. More...
 
const char * getFilename (const char *studyUID, const char *seriesUID, const char *instanceUID)
 searches in the database for a DICOM instance with the given study, series and instance UIDs and returns its pathname if found. More...
 
Uint32 getNumberOfStudies ()
 returns the number of studies currently contained in the database. More...
 
OFCondition selectStudy (Uint32 idx)
 selects the study with the given index in the database. More...
 
OFCondition selectStudy (const char *studyUID)
 selects the study with the given UID in the database. More...
 
DVIFhierarchyStatus getStudyStatus ()
 returns the review status of the currently selected study. More...
 
const char * getStudyUID ()
 returns the Study Instance UID of the currently selected study. More...
 
const char * getStudyDescription ()
 returns the Study Description of the currently selected study. More...
 
const char * getStudyDate ()
 returns the Study Date of the currently selected study. More...
 
const char * getStudyTime ()
 returns the Study Time of the currently selected study. More...
 
const char * getReferringPhysiciansName ()
 returns the Referring Physicians Name of the currently selected study. More...
 
const char * getAccessionNumber ()
 returns the Accession Number of the currently selected study. More...
 
const char * getNameOfPhysiciansReadingStudy ()
 returns the Name Of Physicians Reading Study of the currently selected study. More...
 
const char * getPatientName ()
 returns the Patient Name of the currently selected study. More...
 
const char * getPatientID ()
 returns the Patient ID of the currently selected study. More...
 
const char * getPatientBirthDate ()
 returns the Patient Birth Date of the currently selected study. More...
 
const char * getPatientSex ()
 returns the Patient Sex of the currently selected study. More...
 
const char * getPatientBirthTime ()
 returns the Patient Birth Time of the currently selected study. More...
 
const char * getOtherPatientNames ()
 returns the Other Patient Names of the currently selected study. More...
 
const char * getOtherPatientID ()
 returns the Other Patient ID of the currently selected study. More...
 
const char * getEthnicGroup ()
 returns the Patient Ethnic Group of the currently selected study. More...
 
Uint32 getNumberOfSeries ()
 returns the number of series within the currently selected study. More...
 
OFCondition selectSeries (Uint32 idx)
 selects the series with the given index within the currently selected study. More...
 
OFCondition selectSeries (const char *seriesUID)
 selects the series with the given UID within the currently selected study. More...
 
const char * getSeriesUID ()
 returns the Series Instance UID of the currently selected series. More...
 
DVIFhierarchyStatus getSeriesStatus ()
 returns the review status of the currently selected series. More...
 
DVPSInstanceType getSeriesType ()
 returns the type of all instances within the currently selected series. More...
 
DVPSInstanceType getInstanceType ()
 returns the type of the currently selected instance. More...
 
const char * getSeriesNumber ()
 returns the Series Number of the currently selected series. More...
 
const char * getSeriesDate ()
 returns the Series Date of the currently selected series. More...
 
const char * getSeriesTime ()
 returns the Series Time of the currently selected series. More...
 
const char * getSeriesDescription ()
 returns the Series Description of the currently selected series. More...
 
const char * getSeriesPerformingPhysiciansName ()
 returns the Series Performing Physicians Name of the currently selected series. More...
 
const char * getSeriesProtocolName ()
 returns the Series Protocol Name of the currently selected series. More...
 
const char * getSeriesOperatorsName ()
 returns the Series Operators Name of the currently selected series. More...
 
const char * getModality ()
 returns the Modality of the currently selected series. More...
 
Uint32 getNumberOfInstances ()
 returns the number of instances (IODs) within the currently selected series. More...
 
OFCondition selectInstance (Uint32 idx)
 selects the instance with the given index within the currently selected series. More...
 
OFCondition selectInstance (const char *instanceUID)
 selects the instance with the given UID within the currently selected series. More...
 
OFCondition selectInstance (const char *instanceUID, const char *sopClassUID)
 selects the instance with the given UID and SOP class over all studies and series. More...
 
OFCondition selectInstance (const char *studyUID, const char *seriesUID, const char *instanceUID)
 selects the instance with the given UIDs. More...
 
const char * getSOPClassUID ()
 returns the SOP class UID of the currently selected instance. More...
 
const char * getInstanceUID ()
 returns the SOP Instance UID of the currently selected instance. More...
 
const char * getImageNumber ()
 returns the Image Number of the currently selected instance. More...
 
const char * getFilename ()
 returns the Filename of the currently selected instance. More...
 
DVIFhierarchyStatus getInstanceStatus ()
 returns the review status of the currently selected instance. More...
 
const char * getInstanceDescription ()
 returns the escription of the currently selected instance. More...
 
const char * getPresentationLabel ()
 returns the Presentation Label of the currently selected instance. More...
 
OFCondition instanceReviewed (const char *studyUID, const char *seriesUID, const char *instanceUID)
 modifies the review flag for one instance in the database, which is set to 'reviewed' state (DVIF_objectIsNotNew). More...
 
OFCondition deleteInstance (const char *studyUID, const char *seriesUID, const char *instanceUID)
 deletes the given instance from the database. More...
 
OFCondition deleteSeries (const char *studyUID, const char *seriesUID)
 deletes the given series from the database. More...
 
OFCondition deleteStudy (const char *studyUID)
 deletes the given study from the database. More...
 
OFCondition startReceiver ()
 starts the network receiver processes (Storage Service Class SCPs). More...
 
OFCondition terminateReceiver ()
 terminates the network receiver process (Storage Service Class SCP). More...
 
OFCondition startQueryRetrieveServer ()
 starts the query/retrieve server process (Query/Retrieve Service Class SCP). More...
 
OFCondition terminateQueryRetrieveServer ()
 terminates the query/retrieve server process (Query/Retrieve Service Class SCP). More...
 
OFBool newInstancesReceived ()
 tests whether the database has been modified in any way since the last call to this method. More...
 
OFCondition sendStudy (const char *targetID, const char *studyUID)
 sends a complete study over network to a different DICOM peer. More...
 
OFCondition sendSeries (const char *targetID, const char *studyUID, const char *seriesUID)
 sends a complete series over network to a different DICOM peer. More...
 
OFCondition sendIOD (const char *targetID, const char *studyUID, const char *seriesUID, const char *instanceUID)
 sends a single instance (image or presentation state) over network to a different DICOM peer. More...
 
OFCondition dumpIOD (const char *filename)
 creates a dump of the contents of a DICOM file and displays it on-screen. More...
 
OFCondition dumpIOD (const char *studyUID, const char *seriesUID, const char *instanceUID)
 creates a dump of the contents of a DICOM file and displays it on-screen. More...
 
OFCondition checkIOD (const char *filename)
 checks the contents of a DICOM file and displays an evaluation report on the screen. More...
 
OFCondition checkIOD (const char *studyUID, const char *seriesUID, const char *instanceUID)
 checks the contents of a DICOM file and displays an evaluation report on the screen. More...
 
OFCondition saveDICOMImage (const char *filename, const void *pixelData, unsigned long width, unsigned long height, double aspectRatio=1.0, OFBool explicitVR=OFTrue, const char *instanceUID=NULL)
 saves a monochrome bitmap as a DICOM Secondary Capture image. More...
 
OFCondition saveDICOMImage (const void *pixelData, unsigned long width, unsigned long height, double aspectRatio=1.0)
 saves a monochrome bitmap as a DICOM Secondary Capture image in the same directory in which the database index file resides. More...
 
OFCondition saveHardcopyGrayscaleImage (const char *filename, const void *pixelData, unsigned long width, unsigned long height, double aspectRatio=1.0, OFBool explicitVR=OFTrue, const char *instanceUID=NULL)
 saves a monochrome bitmap as a DICOM Hardcopy Grayscale image. More...
 
OFCondition saveHardcopyGrayscaleImage (const void *pixelData, unsigned long width, unsigned long height, double aspectRatio=1.0)
 saves a monochrome bitmap as a DICOM Hardcopy Grayscale image in the same directory in which the database index file resides. More...
 
OFCondition saveFileFormatToDB (DcmFileFormat &fileformat)
 saves a DICOM object into a file in the same directory in which the database index file resides. More...
 
OFCondition loadStoredPrint (const char *studyUID, const char *seriesUID, const char *instanceUID, OFBool changeStatus=OFFalse)
 loads a Stored Print object which is contained in the database into memory. More...
 
OFCondition loadStoredPrint (const char *filename)
 loads a Stored Print object (which need not be contained in the database) into memory. More...
 
OFCondition saveStoredPrint (const char *filename, OFBool writeRequestedImageSize, OFBool explicitVR=OFTrue, const char *instanceUID=NULL)
 saves the current print job as a Stored Print object. More...
 
OFCondition saveStoredPrint (OFBool writeRequestedImageSize)
 saves the current print job as a Stored Print object in the same directory in which the database index file resides. More...
 
size_t getNumberOfPrintPreviews ()
 gets the number of Hardcopy Grayscaleimages currently registered by the stored print object. More...
 
OFCondition loadPrintPreview (size_t idx, OFBool printLUT=OFTrue, OFBool changeStatus=OFFalse)
 loads a Hardcopy Grayscale image registered by the stored print object and creates a preview. More...
 
void unloadPrintPreview ()
 removes a currently loaded Hardcopy Grayscale image from memory.
 
unsigned long getPrintPreviewSize ()
 gets number of bytes used for the print preview bitmap. More...
 
void setMaxPrintPreviewWidthHeight (unsigned long width, unsigned long height)
 sets the maximum print preview bitmap width and height. More...
 
OFCondition getPrintPreviewWidthHeight (unsigned long &width, unsigned long &height)
 gets width and height of print preview bitmap. More...
 
OFCondition getPrintPreviewBitmap (void *bitmap, unsigned long size)
 writes the bitmap data of the print preview image into the given buffer. More...
 
OFCondition disablePState ()
 stores the current presentation state in a temporary place and creates a new presentation state that corresponds with an image displayed "without" presentation state. More...
 
OFCondition enablePState ()
 restores the stored presentation state (see disablePresentationState) and deletes the temporary presentation state. More...
 
Uint32 getNumberOfPStates ()
 returns number of presentation states referencing the currently selected image. More...
 
OFCondition selectPState (Uint32 idx, OFBool changeStatus=OFFalse)
 selects and loads specified presentation state referencing the currently selected image. More...
 
const char * getPStateDescription (Uint32 idx)
 returns description of specified presentation state referencing the currently selected image. More...
 
const char * getPStateLabel (Uint32 idx)
 returns label of specified presentation state referencing the currently selected image. More...
 
OFBool isDisplayTransformPossible (DVPSDisplayTransform transform=DVPSD_GSDF)
 checks whether display correction is possible (in principle), i.e. More...
 
OFCondition setAmbientLightValue (double value)
 sets ambient light value for the display transformation. More...
 
OFCondition getAmbientLightValue (double &value)
 returns ambient light value for the display transformation. More...
 
OFCondition setCurrentPrinter (const char *targetID)
 selects the current printer. More...
 
const char * getCurrentPrinter ()
 gets the current printer's target ID. More...
 
OFCondition setPrinterMediumType (const char *value)
 sets the (optional) print medium type. More...
 
const char * getPrinterMediumType ()
 gets the (optional) print medium type. More...
 
OFCondition setPrinterFilmDestination (const char *value)
 sets the (optional) printer film destination. More...
 
const char * getPrinterFilmDestination ()
 gets the (optional) printer film destination. More...
 
OFCondition setPrinterFilmSessionLabel (const char *value)
 sets the (optional) printer film session label. More...
 
const char * getPrinterFilmSessionLabel ()
 gets the (optional) printer film session label. More...
 
OFCondition setPrinterPriority (const char *value)
 sets the (optional) print priority. More...
 
const char * getPrinterPriority ()
 gets the (optional) print priority. More...
 
OFCondition setPrinterOwnerID (const char *value)
 sets the (optional) print session owner ID. More...
 
const char * getPrinterOwnerID ()
 gets the (optional) print session owner ID. More...
 
OFCondition setPrinterNumberOfCopies (unsigned long value)
 sets the (optional) print number of copies. More...
 
unsigned long getPrinterNumberOfCopies ()
 gets the (optional) print number of copies. More...
 
void clearFilmSessionSettings ()
 resets the settings for basic film session (everything that is not managed by the Stored Print object) to initial state. More...
 
OFCondition selectDisplayPresentationLUT (const char *lutID)
 sets the LUT with the given identifier in the Presentation State as current Presentation LUT. More...
 
const char * getDisplayPresentationLUTID ()
 if the Presentation State contains an active Presentation LUT that was set with selectDisplayPresentationLUT(), return the corresponding LUT identifier. More...
 
OFCondition selectPrintPresentationLUT (const char *lutID)
 sets the LUT with the given identifier in the Stored Print object as current Presentation LUT. More...
 
const char * getPrintPresentationLUTID ()
 if the Stored Print object contains an active Presentation LUT that was set with selectPrintPresentationLUT(), return the corresponding LUT identifier. More...
 
OFCondition spoolPrintJob (OFBool deletePrintedImages=OFTrue)
 start spooling of print job with current settings. More...
 
OFCondition startPrintSpooler ()
 starts the print spooler process. More...
 
OFCondition terminatePrintSpooler ()
 terminates the print spooler process. More...
 
OFCondition startPrintServer ()
 starts the print server process (Basic Grayscale Print Management SCP). More...
 
OFCondition terminatePrintServer ()
 terminates the print server process (Basic Grayscale Print Management SCP). More...
 
OFCondition addToPrintHardcopyFromDB (const char *studyUID, const char *seriesUID, const char *instanceUID)
 adds an existing DICOM image (should be Hardcopy Grayscale) that is already present in the image database to the current print image queue without rendering it again. More...
 
OFCondition spoolStoredPrintFromDB (const char *studyUID, const char *seriesUID, const char *instanceUID)
 requests the spooler process to print an old print job that is stored in the database as a "stored print" object. More...
 
OFCondition printSCUcreateBasicFilmSession (DVPSPrintMessageHandler &printHandler, OFBool plutInSession)
 Initiates the creation of a DICOM Basic Film Session SOP Instance in the printer. More...
 
OFBool isActiveAnnotation ()
 gets the current setting of the annotation activity annotation flag. More...
 
OFBool getPrependDateTime ()
 gets the current setting of the Prepend Date/Time annotation flag. More...
 
OFBool getPrependPrinterName ()
 gets the current setting of the Prepend Printer Name annotation flag. More...
 
OFBool getPrependLighting ()
 gets the current setting of the Prepend Lighting annotation flag. More...
 
const char * getAnnotationText ()
 gets the current annotation text. More...
 
void setActiveAnnotation (OFBool value)
 switches annotation printing on/off More...
 
void setPrependDateTime (OFBool value)
 sets the Prepend Date/Time annotation flag. More...
 
void setPrependPrinterName (OFBool value)
 sets the Prepend Printer Name annotation flag. More...
 
void setPrependLighting (OFBool value)
 sets the Prepend Lighting annotation flag. More...
 
void setAnnotationText (const char *value)
 sets the current annotation text. More...
 
OFBool verifyUserPassword (const char *userID, const char *passwd)
 verifies the given password for the given user ID. More...
 
OFCondition verifyAndSignStructuredReport (const char *userID, const char *passwd, DVPSVerifyAndSignMode mode)
 verifies and digitally signs the current structured report. More...
 
const char * getCurrentSignatureValidationHTML (DVPSObjectType objtype) const
 returns a string containing a complete HTML page with the signature validation results for the last object of the given type. More...
 
const char * getCurrentSignatureValidationOverview () const
 returns a string containing a complete HTML page with the signature validation overview. More...
 
DVPSSignatureStatus getCurrentSignatureStatus (DVPSObjectType objtype) const
 returns the status flag for the current object of given type. More...
 
DVPSSignatureStatus getCombinedImagePStateSignatureStatus () const
 returns the combined status flag for the current image and presentation state. More...
 
unsigned long getNumberOfCorrectSignatures (DVPSObjectType objtype) const
 returns number of correct signatures for given object type. More...
 
unsigned long getNumberOfUntrustworthySignatures (DVPSObjectType objtype) const
 returns number of untrustworthy signatures for given object type. More...
 
unsigned long getNumberOfCorruptSignatures (DVPSObjectType objtype) const
 returns number of corrupt signatures for given object type. More...
 
void disableImageAndPState ()
 disables internal settings for image and presentation state. More...
 
- Public Member Functions inherited from DVConfiguration
 DVConfiguration (const char *config_file=NULL)
 constructor. More...
 
virtual ~DVConfiguration ()
 destructor.
 
Uint32 getNumberOfTargets (DVPSPeerType peerType=DVPSE_storage)
 returns the number of communication partners (send targets) in the configuration file. More...
 
const char * getTargetID (Uint32 idx, DVPSPeerType peerType=DVPSE_storage)
 returns the target identifier of the communication partner with the given index. More...
 
const char * getTargetDescription (const char *targetID)
 returns the DESCRIPTION entry for the communication partner with the given target ID from the configuration file. More...
 
const char * getTargetHostname (const char *targetID)
 returns the HOSTNAME entry for the communication partner with the given target ID from the configuration file. More...
 
unsigned short getTargetPort (const char *targetID)
 returns the PORT entry for the communication partner with the given target ID from the configuration file. More...
 
DVPSPeerType getTargetType (const char *targetID)
 returns the TYPE entry for the communication partner with the given target ID from the configuration file. More...
 
const char * getTargetAETitle (const char *targetID)
 returns the AETITLE entry for the communication partner with the given target ID from the configuration file. More...
 
unsigned long getTargetMaxPDU (const char *targetID)
 returns the MAXPDU entry for the communication partner with the given target ID from the configuration file. More...
 
Sint32 getTargetTimeout (const char *targetID)
 returns the TIMEOUT entry for the communication partner with the given target ID from the configuration file. More...
 
OFBool getTargetImplicitOnly (const char *targetID)
 returns the IMPLICITONLY entry for the communication partner with the given target ID from the configuration file. More...
 
OFBool getTargetDisableNewVRs (const char *targetID)
 returns the DISABLENEWVRS entry for the communication partner with the given target ID from the configuration file. More...
 
OFBool getTargetBitPreservingMode (const char *targetID)
 returns the BITPRESERVINGMODE entry for the storage peer with the given target ID from the configuration file. More...
 
OFBool getTargetCorrectUIDPadding (const char *targetID)
 returns the CORRECTUIDPADDING entry for the storage peer with the given target ID from the configuration file. More...
 
OFBool getTargetUseTLS (const char *targetID)
 returns the USETLS entry for the storage peer with the given target ID from the configuration file. More...
 
const char * getTargetCertificate (const char *targetID)
 returns the CERTIFICATE entry for the storage peer with the given target ID from the configuration file. More...
 
const char * getTargetPrivateKey (const char *targetID)
 returns the PRIVATEKEY entry for the storage peer with the given target ID from the configuration file. More...
 
const char * getTargetPrivateKeyPassword (const char *targetID)
 returns the PRIVATEKEYPASSWORD entry for the storage peer with the given target ID from the configuration file. More...
 
const char * getTargetTLSProfile (const char *targetID)
 returns the TLSPROFILE entry for the storage peer with the given target ID from the configuration file. More...
 
DVPSCertificateVerificationType getTargetPeerAuthentication (const char *targetID)
 returns the PEERAUTHENTICATION entry for the communication partner with the given target ID from the configuration file. More...
 
const char * getTargetDiffieHellmanParameters (const char *targetID)
 returns the DIFFIEHELLMANPARAMETERS entry for the storage peer with the given target ID from the configuration file. More...
 
const char * getTargetRandomSeed (const char *targetID)
 returns the RANDOMSEED entry for the storage peer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterSupportsPresentationLUT (const char *targetID)
 returns the SUPPORTSPRESENTATIONLUT entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterPresentationLUTMatchRequired (const char *targetID)
 returns the PRESENTATIONLUTMATCHREQUIRED entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterPresentationLUTPreferSCPRendering (const char *targetID)
 returns the PRESENTATIONLUTPREFERSCPRENDERING entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterPresentationLUTinFilmSession (const char *targetID)
 returns the PRESENTATIONLUTINFILMSESSION entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterSupports12BitTransmission (const char *targetID)
 returns the SUPPORTS12BIT entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterSupportsRequestedImageSize (const char *targetID)
 returns the SUPPORTSIMAGESIZE entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterSupportsDecimateCrop (const char *targetID)
 returns the SUPPORTSDECIMATECROP entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterSupportsTrim (const char *targetID)
 returns the SUPPORTSTRIM entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfBorderDensities (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the BORDERDENSITY entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterBorderDensity (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the BORDERDENSITY entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfMaxDensities (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the MAXDENSITY entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterMaxDensity (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the MAXDENSITY entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfMinDensities (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the MINDENSITY entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterMinDensity (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the MINDENSITY entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfPortraitDisplayFormats (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the DISPLAYFORMAT entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterPortraitDisplayFormatRows (const char *targetID, Uint32 idx)
 returns one row value from the DISPLAYFORMAT entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterPortraitDisplayFormatColumns (const char *targetID, Uint32 idx)
 returns one columns value from the DISPLAYFORMAT entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrinterSupportsAnnotation (const char *targetID)
 returns OFTrue if an ANNOTATION entry for the printer with the given target ID from the configuration file exists or if the SESSIONLABELANNOTATION flag is true for the printer. More...
 
OFBool getTargetPrinterSupportsAnnotationBoxSOPClass (const char *targetID)
 returns OFTrue if an ANNOTATION entry for the printer with the given target ID from the configuration file exists. More...
 
OFBool getTargetPrinterSessionLabelAnnotation (const char *targetID)
 returns OFTrue if an SESSIONLABELANNOTATION entry for the printer with the given target ID from the configuration file exists and is true. More...
 
const char * getTargetPrinterAnnotationDisplayFormatID (const char *targetID, OFString &value)
 returns the second value from the ANNOTATION entry for the printer with the given target ID from the configuration file. More...
 
Uint16 getTargetPrinterAnnotationPosition (const char *targetID)
 returns the first value from the ANNOTATION entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfFilmSizeIDs (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the FILMSIZEID entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterFilmSizeID (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the FILMSIZEID entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfMediumTypes (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the MEDIUMTYPE entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterMediumType (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the MEDIUMTYPE entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfFilmDestinations (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the FILMDESTINATION entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterFilmDestination (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the FILMDESTINATION entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfPrinterResolutionIDs (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the RESOLUTIONID entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterResolutionID (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the RESOLUTIONID entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfMagnificationTypes (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the MAGNIFICATIONTYPE entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterMagnificationType (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the MAGNIFICATIONTYPE entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfSmoothingTypes (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the SMOOTHINGTYPE entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterSmoothingType (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the SMOOTHINGTYPE entry for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfConfigurationSettings (const char *targetID)
 returns the number of distinct values in the CONFIGURATION_x entries for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterConfigurationSetting (const char *targetID, Uint32 idx)
 returns the value from one of the CONFIGURATION_x entries for the printer with the given target ID from the configuration file. More...
 
Uint32 getTargetPrinterNumberOfEmptyImageDensities (const char *targetID)
 returns the number of distinct values (separated by backslash characters) in the EMPTYIMAGEDENSITY entry for the printer with the given target ID from the configuration file. More...
 
const char * getTargetPrinterEmptyImageDensity (const char *targetID, Uint32 idx, OFString &value)
 returns one value from the EMPTYIMAGEDENSITY entry for the printer with the given target ID from the configuration file. More...
 
OFBool getTargetPrintSCPOmitSOPClassUIDFromCreateResponse (const char *targetID)
 returns the OMITSOPCLASSUIDFROMCREATERESPONSE entry for the printer with the given target ID from the configuration file. More...
 
const char * getLogFolder ()
 returns the directory used to store log files. More...
 
const char * getLogFile ()
 returns the name of the log file to be used for general application messages. More...
 
OFLogger::LogLevel getLogLevel ()
 returns the log level / filter to be used for general application messages. More...
 
unsigned short getMessagePort ()
 returns the port on which the GUI application accepts notification messages from the network processes. More...
 
OFBool getMessagePortKeepOpen ()
 Indicates whether client processes are allowed to keep their notification message port open during the lifetime of the process. More...
 
const char * getNetworkAETitle ()
 returns the AETitle with which this application should identify itself. More...
 
OFBool getQueryRetrieveAutoCreateConfigFile ()
 returns the AUTOCREATECONFIGFILE entry for the query/retrieve server from the section GENERAL/QUERY_RETRIEVE in the config file. More...
 
const char * getQueryRetrieveAETitle ()
 returns the AETitle with which the Q/R server should identify itself. More...
 
unsigned short getQueryRetrievePort ()
 returns the PORT entry for the Q/R server from the section GENERAL/QUERY_RETRIEVE in the config file. More...
 
unsigned long getQueryRetrieveMaxPDU ()
 returns the MAXPDU entry for the Q/R server from the section GENERAL/QUERY_RETRIEVE in the config file. More...
 
Sint32 getQueryRetrieveTimeout ()
 returns the TIMEOUT entry for the the Q/R server from the section GENERAL/QUERY_RETRIEVE in the config file. More...
 
unsigned long getQueryRetrieveMaxAssociations ()
 returns the MaxAssociations entry for the Q/R server from the section GENERAL/QUERY_RETRIEVE in the config file. More...
 
const char * getDatabaseFolder ()
 returns the database folder to be used for sending/receiving/browsing. More...
 
const char * getSpoolFolder ()
 returns the spool folder to be used for print jobs. More...
 
OFBool getDetailedLog ()
 returns the DETAILEDLOG entry from the section GENERAL/PRINT in the config file. More...
 
OFBool getBinaryLog ()
 returns the BINARYLOG entry from the section GENERAL/PRINT in the config file. More...
 
const char * getSenderName ()
 returns the filename (path) of the DICOM Store SCU application used for sending images, as configured in section GENERAL/NETWORK/SENDER in the config file. More...
 
const char * getReceiverName ()
 returns the filename (path) of the DICOM Store SCP application used for receiving images, as configured in section GENERAL/NETWORK/RECEIVER in the config file. More...
 
const char * getQueryRetrieveServerName ()
 returns the filename (path) of the DICOM Query/Retrieve SCP application, as configured in section GENERAL/QUERY_RETRIEVE/SERVER in the config file. More...
 
const char * getSpoolerName ()
 returns the filename (path) of the DICOM Print SCU application used for printing images, as configured in section GENERAL/PRINT/SPOOLER in the config file. More...
 
const char * getPrintServerName ()
 returns the filename (path) of the DICOM Print SCU application used for printing images, as configured in section GENERAL/PRINT/Server in the config file. More...
 
const char * getDumpToolName ()
 returns the filename (path) of the application used for dumping DICOM objects, as configured in section GENERAL/DATABASE/DUMP in the config file. More...
 
const char * getCheckToolName ()
 returns the filename (path) of the application used for dumping DICOM objects, as configured in section GENERAL/DATABASE/CHECK in the config file. More...
 
unsigned long getSpoolerSleep ()
 returns the sleep delay for the print spooler in seconds, as configured in section GENERAL/PRINT/SLEEP in the config file. More...
 
OFBool getSpoolerDeletePrintJobs ()
 returns the DELETEPRINTJOBS entry for the print spooler from the section GENERAL/PRINT in the config file. More...
 
OFBool getSpoolerAlwaysDeleteTerminateJobs ()
 returns the ALWAYSDELETETERMINATEJOBS entry for the print spooler from the section GENERAL/PRINT in the config file. More...
 
const char * getMonitorCharacteristicsFile ()
 returns the filename (path) of the monitor characteristics file used to implement that Barten transform, as configured in section GENERAL/MONITOR/CHARACTERISTICS in the config file. More...
 
double getMonitorPixelWidth ()
 returns the width (in mm) of one pixel on the current monitor More...
 
double getMonitorPixelHeight ()
 returns the height (in mm) of one pixel on the current monitor More...
 
Uint32 getMaxPreviewResolutionX ()
 returns the maximum horizontal preview image resolution, from GENERAL/MONITOR/PREVIEW in the config file. More...
 
Uint32 getMaxPreviewResolutionY ()
 returns the maximum vertical preview image resolution, from GENERAL/MONITOR/PREVIEW in the config file. More...
 
const char * getGUIConfigEntry (const char *key)
 returns the value of configuration file entry key=value in the section GENERAL/GUI of the config file. More...
 
OFBool getGUIConfigEntryBool (const char *key, OFBool dfl)
 returns the value of configuration file entry key=value in the section GENERAL/GUI of the config file. More...
 
const char * getLUTFolder ()
 returns the folder to be used for Print Presentation LUTs. More...
 
const char * getReportFolder ()
 returns the folder to be used for Structured Reporting "templates". More...
 
Uint32 getNumberOfLUTs ()
 returns the number of Presentation LUTs in the configuration file. More...
 
const char * getLUTID (Uint32 idx)
 returns the identifier of the Presentation LUT with the given index. More...
 
const char * getLUTDescription (const char *lutID)
 returns the DESCRIPTION entry for the LUT with the given ID from the configuration file. More...
 
const char * getLUTFilename (const char *lutID)
 returns the FILENAME entry for the LUT with the given ID from the configuration file. More...
 
Uint32 getNumberOfReports ()
 returns the number of SR "templates" in the configuration file. More...
 
const char * getReportID (Uint32 idx)
 returns the identifier of the SR "template" with the given index. More...
 
const char * getReportDescription (const char *reportID)
 returns the DESCRIPTION entry for the SR "template" with the given ID from the configuration file. More...
 
const char * getReportFilename (const char *reportID)
 returns the FILENAME entry for the SR "template" with the given ID from the configuration file. More...
 
Uint32 getMinPrintResolutionX ()
 returns the minimum horizontal bitmap resolution for print, from GENERAL/PRINT/MINPRINTRESOLUTION in the config file. More...
 
Uint32 getMinPrintResolutionY ()
 returns the minimum vertical bitmap resolution for print, from GENERAL/PRINT/MINPRINTRESOLUTION in the config file. More...
 
Uint32 getMaxPrintResolutionX ()
 returns the maximum horizontal bitmap resolution for print, from GENERAL/PRINT/MAXPRINTRESOLUTION in the config file. More...
 
Uint32 getMaxPrintResolutionY ()
 returns the maximum vertical bitmap resolution for print, from GENERAL/PRINT/MAXPRINTRESOLUTION in the config file. More...
 
Uint16 getDefaultPrintIllumination ()
 returns the default illumination for print, from GENERAL/PRINT/DEFAULTILLUMINATION in the config file. More...
 
Uint16 getDefaultPrintReflection ()
 returns the default reflection for print, from GENERAL/PRINT/DEFAULTREFLECTION in the config file. More...
 
Uint32 getNumberOfVOIPresets (const char *modality)
 returns the number of VOI Presets defined for the given modality More...
 
const char * getVOIPresetDescription (const char *modality, Uint32 idx)
 returns the description string for the given VOI Preset More...
 
double getVOIPresetWindowCenter (const char *modality, Uint32 idx)
 returns the window center for the given VOI Preset More...
 
double getVOIPresetWindowWidth (const char *modality, Uint32 idx)
 returns the window width for the given VOI Preset More...
 
const char * getTLSFolder ()
 returns the directory in which TLS related files (certificates, keys, random data, Diffie-Hellman parameters etc.) are located. More...
 
const char * getTLSCACertificateFolder ()
 returns the directory in which certificates of the trusted Certification Authorities are located. More...
 
OFBool getTLSPEMFormat ()
 returns the file format used for certificates, keys and Diffie-Hellman parameters. More...
 
const char * getUserCertificateFolder ()
 returns the directory in which user certificates and keys are located. More...
 
Uint32 getNumberOfUsers ()
 returns the number of configured users in the USERS section. More...
 
const char * getUserID (Uint32 idx)
 returns the symbolic identifier of the user with the given index. More...
 
const char * getUserLogin (const char *userID)
 returns the login for the given user. More...
 
const char * getUserName (const char *userID)
 returns the human readable name for the given user. More...
 
const char * getUserDICOMName (const char *userID)
 returns the name for the given user in DICOM Person Name (PN) format. More...
 
const char * getUserOrganization (const char *userID)
 returns the organization for the given user. More...
 
const char * getUserCodingSchemeDesignator (const char *userID, OFString &value)
 returns the coding scheme designator of the user code for the given user if present. More...
 
const char * getUserCodingSchemeVersion (const char *userID, OFString &value)
 returns the coding scheme version of the user code for the given user if present. More...
 
const char * getUserCodeValue (const char *userID, OFString &value)
 returns the code value of the user code for the given user if present. More...
 
const char * getUserCodeMeaning (const char *userID, OFString &value)
 returns the code meaning of the user code for the given user if present. More...
 
const char * getUserCertificate (const char *userID)
 returns the certificate file name for the given user. More...
 
const char * getUserPrivateKey (const char *userID)
 returns the private key file name for the given user. More...
 

Private Member Functions

 DVInterface (const DVInterface &)
 private undefined copy constructor
 
DVInterfaceoperator= (const DVInterface &)
 private undefined assignment operator
 
OFCondition exchangeImageAndPState (DVPresentationState *newState, DcmFileFormat *image, DcmFileFormat *state=NULL)
 helper function that exchanges the current presentation state and image by the pointers passed and frees the old ones. More...
 
OFCondition lockDatabase ()
 creates a database handle if none exists yet (this method may be called multiple times without interference) and puts a shared lock on the database. More...
 
OFCondition lockExclusive ()
 creates an exclusive lock on the database if none exists. More...
 
OFCondition unlockExclusive ()
 removes an exclusive lock on the database if any. More...
 
OFCondition createPrintJobFilenames (const char *printer, OFString &tempname, OFString &jobname)
 creates a new pair of filenames for print job creation. More...
 
OFCondition createQueryRetrieveServerConfigFile (const char *filename)
 creates the query/retrieve server configuration file. More...
 
OFCondition startExternalApplication (const char *application, const char *filename)
 starts an external application and passes a filename. More...
 
OFBool createIndexCache ()
 creates index cache to optimize reading of index file
 
OFBool createPStateCache ()
 creates cache of referencing pstates for the current image
 
void clearIndexCache ()
 clears index cache (includes pstate cache)
 
void clearIndexRecord (IdxRecord &record, int &recpos)
 clears specified index record (and makes pos invalid) More...
 
OFBool readIndexRecord (const int pos, IdxRecord &record, int *oldpos=NULL)
 reads specified index record (comparing pos with oldpos to avoid redundant loading) More...
 
void updateStatusCache ()
 updates (hierarchical) status cache (propagates status information from instances to series and from series to studies)
 
DVStudyCache::ItemStructgetStudyStruct (const char *studyUID=NULL, const char *seriesUID=NULL)
 returns pointer to study struct specified by given UIDs or to current study More...
 
DVSeriesCache::ItemStructgetSeriesStruct (const char *studyUID=NULL, const char *seriesUID=NULL, const char *instanceUID=NULL)
 returns pointer to series struct specified by given UIDs or to current series More...
 
DVInstanceCache::ItemStructgetInstanceStruct (const char *studyUID=NULL, const char *seriesUID=NULL, const char *instanceUID=NULL)
 returns pointer to instance struct specified by given UIDs or to current instance More...
 
int findStudyIdx (StudyDescRecord *study, const char *uid)
 returns index of specified study within study description record More...
 
int deleteImageFile (const char *filename)
 conditionally deletes given image file (only if file resides in index.dat directory) More...
 
void resetDatabaseReferenceTime ()
 resets index file modification time to reference time (yesterday)
 
OFCondition instanceReviewed (int pos)
 modifies the review flag for one instance in the database (see method with three UID parameters) More...
 

Private Attributes

DVPSStoredPrintpPrint
 pointer to the current print handler object
 
DVPresentationStatepState
 pointer to the current presentation state object
 
DSRDocumentpReport
 pointer to the current structured reporting object (should never be NULL)
 
DVSignatureHandlerpSignatureHandler
 pointer to the handler object for digital signatures
 
DVPresentationStatepStoredPState
 pointer to the stored presentation state object (if any)
 
DcmFileFormatpDicomImage
 pointer to the current DICOM image attached to the presentation state
 
DcmFileFormatpDicomPState
 pointer to the current DICOM dataset containing the loaded presentation state. More...
 
DicomImagepHardcopyImage
 pointer to the current hardcopy grayscale image (bitmap information only)
 
OFString printJobIdentifier
 a unique string generated for each instance of this class. More...
 
unsigned long printJobCounter
 a counter used for generating print job names.
 
OFString configPath
 string containing the path name of the config file as passed to the ctor.
 
OFString databaseIndexFile
 string containing the path name of the database index file after a database lock has been acquired for the first time
 
unsigned long referenceTime
 initialized with construction time of the interface object minus one day. More...
 
DiDisplayFunctiondisplayFunction [DVPSD_max]
 list of display function object
 
DcmQueryRetrieveIndexDatabaseHandlepHandle
 handle to access database/index file
 
OFBool lockingMode
 locking mode (OFFalse => shared, OFTrue => exclusive)
 
DVStudyCache idxCache
 hierarchical cache structure to optimize index file access
 
IdxRecord idxRec
 record structure of index items (last read entry)
 
int idxRecPos
 position of last read index record (for optimization purposes)
 
OFBool imageInDatabase
 OFTrue if current image is already stored in database, OFFalse otherwise.
 
unsigned long minimumPrintBitmapWidth
 minimum width of print bitmap (used for implicit scaling)
 
unsigned long minimumPrintBitmapHeight
 minimum height of print bitmap (used for implicit scaling)
 
unsigned long maximumPrintBitmapWidth
 maximum width of print bitmap (used for implicit scaling)
 
unsigned long maximumPrintBitmapHeight
 maximum height of print bitmap (used for implicit scaling)
 
unsigned long maximumPrintPreviewWidth
 maximum width of print preview bitmap
 
unsigned long maximumPrintPreviewHeight
 maximum height of print preview bitmap
 
unsigned long maximumPreviewImageWidth
 maximum width of (optional) preview image
 
unsigned long maximumPreviewImageHeight
 maximum height of (optional) preview image
 
OFString currentPrinter
 target ID of current printer, empty if no printer exists in config file
 
OFString displayCurrentLUTID
 config file identifier of LUT currently selected as Display Presentation LUT
 
OFString printCurrentLUTID
 config file identifier of LUT currently selected as Print Presentation LUT
 
OFString printerMediumType
 printer medium type identifier, may be empty. More...
 
OFString printerFilmDestination
 printer film destination identifier, may be empty. More...
 
OFString printerFilmSessionLabel
 printer film session label, may be empty. More...
 
unsigned long printerNumberOfCopies
 printer number of copies
 
OFString printerPriority
 printer print priority, may be empty. More...
 
OFString printerOwnerID
 printer film session owner ID, may be empty. More...
 
OFBool activateAnnotation
 true if annotation should be created when spooling print job
 
OFBool prependDateTime
 true if date and time should be prepended to annotation text
 
OFBool prependPrinterName
 true if printer name should be prepended to annotation text
 
OFBool prependLighting
 true if reflected ambient light and illumination should be prepended to annotation text
 
OFString annotationText
 annotation text (if any)
 

Detailed Description

Interface class for the Softcopy Presentation State viewer.

This class manages the database facilities, allows to start and stop network transactions and gives access to images and presentation states.

Constructor & Destructor Documentation

◆ DVInterface()

DVInterface::DVInterface ( const char *  config_file = NULL,
OFBool  useLog = OFFalse 
)

constructor.

Parameters
config_filefilename (path) of the config file to be used by the interface object. The caller should make sure that the config file really exists because the constructor cannot return an error status. If a non-existing filename (or NULL) is passed, an empty configuration file is assumed.
useLog(optional) flag specifying whether a general log file should be used (config entry GENERAL\APPLICATION\LOGFILE).

Member Function Documentation

◆ addImageReferenceToPState()

OFCondition DVInterface::addImageReferenceToPState ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

adds an image which is contained in the database to the list of referenced images of the current presentation state.

This method acquires a database lock which must be explicitly freed by the user.

Parameters
studyUIDstudy instance UID of the image
seriesUIDseries instance UID of the image
instanceUIDSOP instance UID of the image
Returns
EC_Normal upon success, an error code otherwise.

◆ addToPrintHardcopyFromDB()

OFCondition DVInterface::addToPrintHardcopyFromDB ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

adds an existing DICOM image (should be Hardcopy Grayscale) that is already present in the image database to the current print image queue without rendering it again.

The "requested image size" option is not used - the bitmap is treated as if the presentation mode was "SCALE TO FIT".

Parameters
studyUIDstudy instance UID of the image, as reported by getStudyUID()
seriesUIDseries instance UID of the image, as reported by getSeriesUID()
instanceUIDSOP instance UID of the image, as reported by getInstanceUID()
Returns
EC_Normal upon success, an error code otherwise.

◆ checkIOD() [1/2]

OFCondition DVInterface::checkIOD ( const char *  filename)

checks the contents of a DICOM file and displays an evaluation report on the screen.

A separate application or process is launched to handle the evaluation and display. This call returns when the check operation has successfully been launched. No information about the status or success of the process itself is being made available. This method does not acquire a database lock.

Parameters
filenamepath of file to be checked.
Returns
EC_Normal when the process has successfully been launched, an error condition otherwise.

◆ checkIOD() [2/2]

OFCondition DVInterface::checkIOD ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

checks the contents of a DICOM file and displays an evaluation report on the screen.

A separate application or process is launched to handle the evaluation and display. This call returns when the check operation has successfully been launched. No information about the status or success of the process itself is being made available. This method acquires a database lock which must be explicitly freed by the user.

Parameters
studyUIDStudy Instance UID of the IOD to be checked. Must be an IOD contained in the database.
seriesUIDSeries Instance UID of the IOD to be checked. Must be an IOD contained in the database.
instanceUIDSOP Instance UID of the IOD to be checked. Must be an IOD contained in the database.
Returns
EC_Normal when the process has successfully been launched, an error condition otherwise.

◆ clearFilmSessionSettings()

void DVInterface::clearFilmSessionSettings ( )

resets the settings for basic film session (everything that is not managed by the Stored Print object) to initial state.

Affects medium type, film destination, film session label, priority, owner ID, and number of copies.

◆ clearIndexRecord()

void DVInterface::clearIndexRecord ( IdxRecord record,
int &  recpos 
)
private

clears specified index record (and makes pos invalid)

Parameters
recordthe index record to clear
recposthe position

◆ createPrintJobFilenames()

OFCondition DVInterface::createPrintJobFilenames ( const char *  printer,
OFString tempname,
OFString jobname 
)
private

creates a new pair of filenames for print job creation.

Parameters
printerprinter identifier
tempnametemporary name is returned here
jobnameprint job name is returned here
Returns
EC_Normal upon success, an error code otherwise.

◆ createQueryRetrieveServerConfigFile()

OFCondition DVInterface::createQueryRetrieveServerConfigFile ( const char *  filename)
private

creates the query/retrieve server configuration file.

Parameters
filenamepath to the configuration file (incl. filename)
Returns
EC_Normal upon success, an error code otherwise.

◆ deleteImageFile()

int DVInterface::deleteImageFile ( const char *  filename)
private

conditionally deletes given image file (only if file resides in index.dat directory)

Parameters
filenamethe path to the file
Returns
0: given filename is invalid 1: image file has been deleted 2: image file has not been deleted

◆ deleteInstance()

OFCondition DVInterface::deleteInstance ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

deletes the given instance from the database.

If the corresponding DICOM file resides in the same directory as the index file, it is also removed. This method acquires a database lock which must be explicitly freed by the user. The database is modified - any study, series or instance selection and the number of studies, series and instances reported will become invalid since other processes may modify the database before the exclusive lock is granted to this method.

Parameters
studyUIDstudy instance UID of the instance to be deleted
seriesUIDseries instance UID of the instance to be deleted
instanceUIDSOP instance UID of the instance to be deleted
Returns
EC_Normal upon success, an error code otherwise.

◆ deleteSeries()

OFCondition DVInterface::deleteSeries ( const char *  studyUID,
const char *  seriesUID 
)

deletes the given series from the database.

Any of the corresponding DICOM files residing in the same directory as the index file are also removed. This method acquires a database lock which must be explicitly freed by the user. The database is modified - any study, series or instance selection and the number of studies, series and instances reported will become invalid since other processes may modify the database before the exclusive lock is granted to this method.

Parameters
studyUIDstudy instance UID of the series to be deleted
seriesUIDseries instance UID of the series to be deleted
Returns
EC_Normal upon success, an error code otherwise.

◆ deleteStudy()

OFCondition DVInterface::deleteStudy ( const char *  studyUID)

deletes the given study from the database.

Any of the corresponding DICOM files residing in the same directory as the index file are also removed. This method acquires a database lock which must be explicitly freed by the user. The database is modified - any study, series or instance selection and the number of studies, series and instances reported will become invalid since other processes may modify the database before the exclusive lock is granted to this method.

Parameters
studyUIDstudy instance UID of the study to be deleted
Returns
EC_Normal upon success, an error code otherwise.

◆ disableImageAndPState()

void DVInterface::disableImageAndPState ( )

disables internal settings for image and presentation state.

Called when a new SR object is loaded and the current image/presentation state are hidden consequently.

◆ disablePState()

OFCondition DVInterface::disablePState ( )

stores the current presentation state in a temporary place and creates a new presentation state that corresponds with an image displayed "without" presentation state.

If called twice, an error code is returned.

Returns
EC_Normal upon success, an error code otherwise.

◆ dumpIOD() [1/2]

OFCondition DVInterface::dumpIOD ( const char *  filename)

creates a dump of the contents of a DICOM file and displays it on-screen.

A separate application or process is launched to handle the dump and display. This call returns when the dump operation has successfully been launched. No information about the status or success of the process itself is being made available. This method does not acquire a database lock.

Parameters
filenamepath of file to be displayed.
Returns
EC_Normal when the process has successfully been launched, an error condition otherwise.

◆ dumpIOD() [2/2]

OFCondition DVInterface::dumpIOD ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

creates a dump of the contents of a DICOM file and displays it on-screen.

A separate application or process is launched to handle the dump and display. This call returns when the dump operation has successfully been launched. No information about the status or success of the process itself is being made available. This method acquires a database lock which must be explicitly freed by the user.

Parameters
studyUIDStudy Instance UID of the IOD to be dumped. Must be an IOD contained in the database.
seriesUIDSeries Instance UID of the IOD to be dumped. Must be an IOD contained in the database.
instanceUIDSOP Instance UID of the IOD to be dumped. Must be an IOD contained in the database.
Returns
EC_Normal when the process has successfully been launched, an error condition otherwise.

◆ enablePState()

OFCondition DVInterface::enablePState ( )

restores the stored presentation state (see disablePresentationState) and deletes the temporary presentation state.

If no stored presentation state exists, returns an error.

Returns
EC_Normal upon success, an error code otherwise.

◆ exchangeImageAndPState()

OFCondition DVInterface::exchangeImageAndPState ( DVPresentationState newState,
DcmFileFormat image,
DcmFileFormat state = NULL 
)
private

helper function that exchanges the current presentation state and image by the pointers passed and frees the old ones.

Parameters
newStatenew presentation state, must not be NULL
imageimage file
statepresentation state if newState was not created from image.
Returns
EC_Normal upon success, an error code otherwise.

◆ findStudyIdx()

int DVInterface::findStudyIdx ( StudyDescRecord study,
const char *  uid 
)
private

returns index of specified study within study description record

Parameters
studythe study description records to search in
uidthe id of the study
Returns
the study index if found, -1 otherwise

◆ getAccessionNumber()

const char * DVInterface::getAccessionNumber ( )

returns the Accession Number of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Accession Number or NULL if absent or not selected.

◆ getAmbientLightValue()

OFCondition DVInterface::getAmbientLightValue ( double &  value)

returns ambient light value for the display transformation.

Parameters
valuereturned ambient light value
Returns
EC_Normal upon success, an error code otherwise.

◆ getAnnotationText()

const char * DVInterface::getAnnotationText ( )
inline

gets the current annotation text.

Returns
annotation text, may be NULL or empty string.

◆ getCombinedImagePStateSignatureStatus()

DVPSSignatureStatus DVInterface::getCombinedImagePStateSignatureStatus ( ) const

returns the combined status flag for the current image and presentation state.

Returns
digital signature status for image and presentation state

◆ getCurrentPrinter()

const char * DVInterface::getCurrentPrinter ( )

gets the current printer's target ID.

Returns
printer target ID, can be NULL if no printer is defined in the configuration file.

◆ getCurrentPState()

DVPresentationState & DVInterface::getCurrentPState ( )
inline

returns a reference to the current presentation state.

This reference will become invalid when the DVInterface object is deleted, a different image or presentation state is loaded (using loadPState or loadImage) or when resetPresentationState() is called.

Returns
reference to the current presentation state

◆ getCurrentReport()

DSRDocument & DVInterface::getCurrentReport ( )
inline

returns a reference to the current structured report.

This reference will become invalid when the DVInterface object is deleted or a different structured report is loaded (using loadStructuredReport).

Returns
reference to the current structured report

◆ getCurrentSignatureStatus()

DVPSSignatureStatus DVInterface::getCurrentSignatureStatus ( DVPSObjectType  objtype) const

returns the status flag for the current object of given type.

Parameters
objtypeobject type
Returns
digital signature status for object

◆ getCurrentSignatureValidationHTML()

const char * DVInterface::getCurrentSignatureValidationHTML ( DVPSObjectType  objtype) const

returns a string containing a complete HTML page with the signature validation results for the last object of the given type.

Never returns NULL.

Parameters
objtypeobject type
Returns
pointer to string with HTML page

◆ getCurrentSignatureValidationOverview()

const char * DVInterface::getCurrentSignatureValidationOverview ( ) const

returns a string containing a complete HTML page with the signature validation overview.

Never returns NULL.

Returns
pointer to string with HTML page

◆ getDisplayPresentationLUTID()

const char * DVInterface::getDisplayPresentationLUTID ( )

if the Presentation State contains an active Presentation LUT that was set with selectDisplayPresentationLUT(), return the corresponding LUT identifier.

Returns
lutID if found, NULL or empty string otherwise.

◆ getEthnicGroup()

const char * DVInterface::getEthnicGroup ( )

returns the Patient Ethnic Group of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). Note: Since the database uses the Study Root model, patient data appears on the study level. This method acquires a database lock which must be explicitly freed by the user.

Returns
Patient Ethnic Group or NULL if absent or not selected.

◆ getFilename() [1/2]

const char * DVInterface::getFilename ( )

returns the Filename of the currently selected instance.

May be called only if a valid instance selection exists - see selectInstance(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Filename or NULL if absent or not selected.

◆ getFilename() [2/2]

const char * DVInterface::getFilename ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

searches in the database for a DICOM instance with the given study, series and instance UIDs and returns its pathname if found.

If the given instance is not found in the database, NULL is returned. This method acquires a database lock which must be explicitly freed by the user.

Parameters
studyUIDthe DICOM study instance UID
seriesUIDthe DICOM series instance UID
instanceUIDthe DICOM SOP instance UID
Returns
filename (path) if found, NULL otherwise

◆ getImageNumber()

const char * DVInterface::getImageNumber ( )

returns the Image Number of the currently selected instance.

May be called only if a valid instance selection exists - see selectInstance(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Image Number or NULL if absent or not selected.

◆ getInstanceDescription()

const char * DVInterface::getInstanceDescription ( )

returns the escription of the currently selected instance.

May be called only if a valid instance selection exists - see selectInstance(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Instance Description or NULL if absent or not selected.

◆ getInstanceStatus()

DVIFhierarchyStatus DVInterface::getInstanceStatus ( )

returns the review status of the currently selected instance.

May be called only if a valid instance selection exists - see selectInstance(). This method acquires a database lock which must be explicitly freed by the user.

Returns
instance review status

◆ getInstanceStruct()

DVInstanceCache::ItemStruct * DVInterface::getInstanceStruct ( const char *  studyUID = NULL,
const char *  seriesUID = NULL,
const char *  instanceUID = NULL 
)
private

returns pointer to instance struct specified by given UIDs or to current instance

Parameters
studyUIDthe UID of the study
seriesUIDthe UID of the series
instanceUIDthe UID of the instance
Returns
pointer to instance struct specified by given UIDs or to current instance or NULL

◆ getInstanceType()

DVPSInstanceType DVInterface::getInstanceType ( )

returns the type of the currently selected instance.

May be called only if a valid instance selection exists - see selectInstance(). This method acquires a database lock which must be explicitly freed by the user.

Returns
instance type

◆ getInstanceUID()

const char * DVInterface::getInstanceUID ( )

returns the SOP Instance UID of the currently selected instance.

May be called only if a valid instance selection exists - see selectInstance(). This method acquires a database lock which must be explicitly freed by the user.

Returns
SOP Instance UID or NULL if absent or not selected.

◆ getModality()

const char * DVInterface::getModality ( )

returns the Modality of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Modality or NULL if absent or not selected.

◆ getNameOfPhysiciansReadingStudy()

const char * DVInterface::getNameOfPhysiciansReadingStudy ( )

returns the Name Of Physicians Reading Study of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Name Of Physicians Reading Study or NULL if absent or not selected.

◆ getNumberOfCorrectSignatures()

unsigned long DVInterface::getNumberOfCorrectSignatures ( DVPSObjectType  objtype) const

returns number of correct signatures for given object type.

Parameters
objtypeobject type
Returns
number of digital signatures

◆ getNumberOfCorruptSignatures()

unsigned long DVInterface::getNumberOfCorruptSignatures ( DVPSObjectType  objtype) const

returns number of corrupt signatures for given object type.

Parameters
objtypeobject type
Returns
number of digital signatures

◆ getNumberOfImageReferences()

size_t DVInterface::getNumberOfImageReferences ( )

gets the number of image references contained in the current presentation state.

Returns
number of image references, 0 if an error occurred.

◆ getNumberOfInstances()

Uint32 DVInterface::getNumberOfInstances ( )

returns the number of instances (IODs) within the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user. See the comments for getNumberOfStudies() about the validity period of the returned number.

Returns
number of instances in the current series.

◆ getNumberOfPrintPreviews()

size_t DVInterface::getNumberOfPrintPreviews ( )

gets the number of Hardcopy Grayscaleimages currently registered by the stored print object.

Returns
number of images.

◆ getNumberOfPStates()

Uint32 DVInterface::getNumberOfPStates ( )

returns number of presentation states referencing the currently selected image.

If no instance is currently selected or the selected instance is a presentation state, returns an error.

Returns
number of presentation states, 0 if none available or an error occurred

◆ getNumberOfSeries()

Uint32 DVInterface::getNumberOfSeries ( )

returns the number of series within the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user. See the comments for getNumberOfStudies() about the validity period of the returned number.

Returns
number of series in the current study.

◆ getNumberOfStudies()

Uint32 DVInterface::getNumberOfStudies ( )

returns the number of studies currently contained in the database.

This method acquires a database lock which must be explicitly freed by the user. The number reported (returned) by this method remains valid as long as the database lock remains active and no function modifying the database is called. Functions that modify the database are: Storing new presentation states, deleting data, modifying the 'reviewed' status flag of IODs.

Returns
number of studies in the database.

◆ getNumberOfUntrustworthySignatures()

unsigned long DVInterface::getNumberOfUntrustworthySignatures ( DVPSObjectType  objtype) const

returns number of untrustworthy signatures for given object type.

Parameters
objtypeobject type
Returns
number of digital signatures

◆ getOtherPatientID()

const char * DVInterface::getOtherPatientID ( )

returns the Other Patient ID of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). Note: Since the database uses the Study Root model, patient data appears on the study level. This method acquires a database lock which must be explicitly freed by the user.

Returns
Other Patient ID or NULL if absent or not selected.

◆ getOtherPatientNames()

const char * DVInterface::getOtherPatientNames ( )

returns the Other Patient Names of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). Note: Since the database uses the Study Root model, patient data appears on the study level. This method acquires a database lock which must be explicitly freed by the user.

Returns
Other Patient Names or NULL if absent or not selected.

◆ getPatientBirthDate()

const char * DVInterface::getPatientBirthDate ( )

returns the Patient Birth Date of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). Note: Since the database uses the Study Root model, patient data appears on the study level. This method acquires a database lock which must be explicitly freed by the user.

Returns
Patient Birth Date or NULL if absent or not selected.

◆ getPatientBirthTime()

const char * DVInterface::getPatientBirthTime ( )

returns the Patient Birth Time of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). Note: Since the database uses the Study Root model, patient data appears on the study level. This method acquires a database lock which must be explicitly freed by the user.

Returns
Patient Birth Time or NULL if absent or not selected.

◆ getPatientID()

const char * DVInterface::getPatientID ( )

returns the Patient ID of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). Note: Since the database uses the Study Root model, patient data appears on the study level. This method acquires a database lock which must be explicitly freed by the user.

Returns
Patient ID or NULL if absent or not selected.

◆ getPatientName()

const char * DVInterface::getPatientName ( )

returns the Patient Name of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). Note: Since the database uses the Study Root model, patient data appears on the study level. This method acquires a database lock which must be explicitly freed by the user.

Returns
Patient Name or NULL if absent or not selected.

◆ getPatientSex()

const char * DVInterface::getPatientSex ( )

returns the Patient Sex of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). Note: Since the database uses the Study Root model, patient data appears on the study level. This method acquires a database lock which must be explicitly freed by the user.

Returns
Patient Sex or NULL if absent or not selected.

◆ getPrependDateTime()

OFBool DVInterface::getPrependDateTime ( )
inline

gets the current setting of the Prepend Date/Time annotation flag.

Returns
OFTrue if Prepend Date/Time is on, OFFalse otherwise.

◆ getPrependLighting()

OFBool DVInterface::getPrependLighting ( )
inline

gets the current setting of the Prepend Lighting annotation flag.

Returns
OFTrue if Prepend Lighting is on, OFFalse otherwise.

◆ getPrependPrinterName()

OFBool DVInterface::getPrependPrinterName ( )
inline

gets the current setting of the Prepend Printer Name annotation flag.

Returns
OFTrue if Prepend Printer Name is on, OFFalse otherwise.

◆ getPresentationLabel()

const char * DVInterface::getPresentationLabel ( )

returns the Presentation Label of the currently selected instance.

May be called only if a valid instance selection exists - see selectInstance(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Presentation Label or NULL if absent or not selected.

◆ getPrinterFilmDestination()

const char * DVInterface::getPrinterFilmDestination ( )

gets the (optional) printer film destination.

Returns
printer film destination, may be NULL or empty string.

◆ getPrinterFilmSessionLabel()

const char * DVInterface::getPrinterFilmSessionLabel ( )

gets the (optional) printer film session label.

Returns
printer film session label, may be NULL or empty string.

◆ getPrinterMediumType()

const char * DVInterface::getPrinterMediumType ( )

gets the (optional) print medium type.

Returns
medium type, may be NULL.

◆ getPrinterNumberOfCopies()

unsigned long DVInterface::getPrinterNumberOfCopies ( )

gets the (optional) print number of copies.

Returns
print number of copies, 0 if absent.

◆ getPrinterOwnerID()

const char * DVInterface::getPrinterOwnerID ( )

gets the (optional) print session owner ID.

Returns
print session owner ID, may be NULL or empty string.

◆ getPrinterPriority()

const char * DVInterface::getPrinterPriority ( )

gets the (optional) print priority.

Returns
print priority, may be NULL or empty string.

◆ getPrintHandler()

DVPSStoredPrint & DVInterface::getPrintHandler ( )
inline

returns a reference to the print handler.

This reference remains valid as long as the DVInterface object exists.

Returns
reference to the current print handler

◆ getPrintPresentationLUTID()

const char * DVInterface::getPrintPresentationLUTID ( )

if the Stored Print object contains an active Presentation LUT that was set with selectPrintPresentationLUT(), return the corresponding LUT identifier.

Returns
lutID if found, NULL or empty string otherwise.

◆ getPrintPreviewBitmap()

OFCondition DVInterface::getPrintPreviewBitmap ( void *  bitmap,
unsigned long  size 
)

writes the bitmap data of the print preview image into the given buffer.

The storage area must be allocated and deleted from the calling method.

Parameters
bitmappointer to storage area where the pixel data is copied to (array of 8 bit values)
sizespecifies size of the storage area in bytes
Returns
EC_Normal upon success, an error code otherwise

◆ getPrintPreviewSize()

unsigned long DVInterface::getPrintPreviewSize ( )

gets number of bytes used for the print preview bitmap.

(depends on width, height and depth)

Returns
number of bytes used for the preview bitmap

◆ getPrintPreviewWidthHeight()

OFCondition DVInterface::getPrintPreviewWidthHeight ( unsigned long &  width,
unsigned long &  height 
)

gets width and height of print preview bitmap.

The return values depend on the current maximum preview bitmap width/height values!

Parameters
widthupon success, the bitmap width (in pixels) is returned in this parameter
heightupon success, the bitmap height (in pixels) is returned in this parameter
Returns
EC_Normal upon success, an error code otherwise

◆ getPStateDescription()

const char * DVInterface::getPStateDescription ( Uint32  idx)

returns description of specified presentation state referencing the currently selected image.

Parameters
idxindex to be selected, must be < getNumberOfPStates()
Returns
presentation state description or NULL idx is invalid

◆ getPStateLabel()

const char * DVInterface::getPStateLabel ( Uint32  idx)

returns label of specified presentation state referencing the currently selected image.

Parameters
idxindex to be selected, must be < getNumberOfPStates()
Returns
presentation state label or NULL idx is invalid

◆ getReferringPhysiciansName()

const char * DVInterface::getReferringPhysiciansName ( )

returns the Referring Physicians Name of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Referring Physicians Name or NULL if absent or not selected.

◆ getSeriesDate()

const char * DVInterface::getSeriesDate ( )

returns the Series Date of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Series Date or NULL if absent or not selected.

◆ getSeriesDescription()

const char * DVInterface::getSeriesDescription ( )

returns the Series Description of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Series Description or NULL if absent or not selected.

◆ getSeriesNumber()

const char * DVInterface::getSeriesNumber ( )

returns the Series Number of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Series Number or NULL if absent or not selected.

◆ getSeriesOperatorsName()

const char * DVInterface::getSeriesOperatorsName ( )

returns the Series Operators Name of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Series Operators Name or NULL if absent or not selected.

◆ getSeriesPerformingPhysiciansName()

const char * DVInterface::getSeriesPerformingPhysiciansName ( )

returns the Series Performing Physicians Name of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Series Performing Physicians Name or NULL if absent or not selected.

◆ getSeriesProtocolName()

const char * DVInterface::getSeriesProtocolName ( )

returns the Series Protocol Name of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Series Protocol Name or NULL if absent or not selected.

◆ getSeriesStatus()

DVIFhierarchyStatus DVInterface::getSeriesStatus ( )

returns the review status of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
series review status

◆ getSeriesStruct()

DVSeriesCache::ItemStruct * DVInterface::getSeriesStruct ( const char *  studyUID = NULL,
const char *  seriesUID = NULL,
const char *  instanceUID = NULL 
)
private

returns pointer to series struct specified by given UIDs or to current series

Parameters
studyUIDthe UID of the study
seriesUIDthe UID of the series
instanceUIDthe UID of the instance
Returns
pointer to series struct specified by given UIDs or to current series or NULL

◆ getSeriesTime()

const char * DVInterface::getSeriesTime ( )

returns the Series Time of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Series Time or NULL if absent or not selected.

◆ getSeriesType()

DVPSInstanceType DVInterface::getSeriesType ( )

returns the type of all instances within the currently selected series.

DICOM series always contain a single modality only, if not the modality of the first examined instance (which is no image) is used (e.g. PresentationState). May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
instance type

◆ getSeriesUID()

const char * DVInterface::getSeriesUID ( )

returns the Series Instance UID of the currently selected series.

May be called only if a valid series selection exists - see selectSeries(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Series Instance UID or NULL if absent or not selected.

◆ getSOPClassUID()

const char * DVInterface::getSOPClassUID ( )

returns the SOP class UID of the currently selected instance.

May be called only if a valid instance selection exists - see selectInstance(). This method acquires a database lock which must be explicitly freed by the user.

Returns
SOP Instance UID or NULL if absent or not selected.

◆ getStudyDate()

const char * DVInterface::getStudyDate ( )

returns the Study Date of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Study Date or NULL if absent or not selected.

◆ getStudyDescription()

const char * DVInterface::getStudyDescription ( )

returns the Study Description of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Study Description or NULL if absent or not selected.

◆ getStudyStatus()

DVIFhierarchyStatus DVInterface::getStudyStatus ( )

returns the review status of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user. Implicitly the first instance within this series is selected, too.

Returns
study review status

◆ getStudyStruct()

DVStudyCache::ItemStruct * DVInterface::getStudyStruct ( const char *  studyUID = NULL,
const char *  seriesUID = NULL 
)
private

returns pointer to study struct specified by given UIDs or to current study

Parameters
studyUIDthe UID of the study
seriesUIDthe UID of the series
Returns
pointer to study struct specified by given UIDs or to current study or NULL

◆ getStudyTime()

const char * DVInterface::getStudyTime ( )

returns the Study Time of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Study Time or NULL if absent or not selected.

◆ getStudyUID()

const char * DVInterface::getStudyUID ( )

returns the Study Instance UID of the currently selected study.

May be called only if a valid study selection exists - see selectStudy(). This method acquires a database lock which must be explicitly freed by the user.

Returns
Study Instance UID or NULL if absent or not selected.

◆ instanceReviewed() [1/2]

OFCondition DVInterface::instanceReviewed ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

modifies the review flag for one instance in the database, which is set to 'reviewed' state (DVIF_objectIsNotNew).

The status of the corresponding series and study is updated automatically. This method acquires a database lock which must be explicitly freed by the user. The database is modified - any study, series or instance selection and the number of studies, series and instances reported will become invalid since other processes may modify the database before the exclusive lock is granted to this method.

Parameters
studyUIDstudy instance UID of the reviewed instance
seriesUIDseries instance UID of the reviewed instance
instanceUIDSOP instance UID of the reviewed instance
Returns
EC_Normal upon success, an error code otherwise.

◆ instanceReviewed() [2/2]

OFCondition DVInterface::instanceReviewed ( int  pos)
private

modifies the review flag for one instance in the database (see method with three UID parameters)

Parameters
idxindex
Returns
EC_Normal upon success, an error code otherwise

◆ isActiveAnnotation()

OFBool DVInterface::isActiveAnnotation ( )
inline

gets the current setting of the annotation activity annotation flag.

Returns
OFTrue if annotation is on, OFFalse otherwise.

◆ isDisplayTransformPossible()

OFBool DVInterface::isDisplayTransformPossible ( DVPSDisplayTransform  transform = DVPSD_GSDF)

checks whether display correction is possible (in principle), i.e.

a valid monitor characteristics description exists and current system is a low-cost system (without built-in calibration).

Parameters
transformdisplay transform to be checked (default: GSDF)
Returns
OFTrue if display transform is possible, OFFalse otherwise

◆ loadImage() [1/2]

OFCondition DVInterface::loadImage ( const char *  filename)

loads an image (which need not be contained in the database) and creates a default presentation state for the image.

This method does not acquire a database lock.

Parameters
filenamepath and filename of the image to be loaded
Returns
EC_Normal upon success, an error code otherwise.

◆ loadImage() [2/2]

OFCondition DVInterface::loadImage ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID,
OFBool  changeStatus = OFFalse 
)

loads an image which is contained in the database and creates a default presentation state for the image.

This method acquires a database lock which must be explicitly freed by the user.

Parameters
studyUIDstudy instance UID of the image
seriesUIDseries instance UID of the image
instanceUIDSOP instance UID of the image
changeStatusif true the image file is marked 'reviewed' (not new)
Returns
EC_Normal upon success, an error code otherwise.

◆ loadPrintPreview()

OFCondition DVInterface::loadPrintPreview ( size_t  idx,
OFBool  printLUT = OFTrue,
OFBool  changeStatus = OFFalse 
)

loads a Hardcopy Grayscale image registered by the stored print object and creates a preview.

The preview bitmap is implicitly scaled to fit into the rectangle specified by setMaxPrintPreviewWidthHeight().

Parameters
idxindex of the image, must be < getNumberOfPrintPreviews()
printLUTOFTrue if presentation LUT should be interpreted as a print presentation LUT (default, in this case there is no implicit scaling of the input width of the LUT and, therefore, the VOI transformation - which is absent for print - is used), OFFalse otherwise (softcopy interpretation of a presentation LUT)
changeStatusif true the hardcopy grayscale image file is marked 'reviewed' (not new)
Returns
EC_Normal if successful, an error code otherwise.

◆ loadPState() [1/2]

OFCondition DVInterface::loadPState ( const char *  pstName,
const char *  imgName = NULL 
)

loads a presentation state and an image (which need not be contained in the database) and attaches the image to the presentation state (if specified, otherwise the current image will be used).

This method does not acquire a database lock.

Parameters
pstNamepath and filename of the presentation state to be loaded
imgNamepath and filename of the image to be loaded
Returns
EC_Normal upon success, an error code otherwise.

◆ loadPState() [2/2]

OFCondition DVInterface::loadPState ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID,
OFBool  changeStatus = OFFalse 
)

loads a presentation state which is contained in the database.

The first image referenced in presentation state is also looked up in the database, loaded, and attached to the presentation state. This method acquires a database lock which must be explicitly freed by the user.

Parameters
studyUIDstudy instance UID of the presentation state
seriesUIDseries instance UID of the presentation state
instanceUIDSOP instance UID of the presentation state
changeStatusif true the pstate and (first) image file is marked 'reviewed' (not new)
Returns
EC_Normal upon success, an error code otherwise.

◆ loadReferencedImage()

OFCondition DVInterface::loadReferencedImage ( size_t  idx,
OFBool  changeStatus = OFFalse 
)

loads an image which referenced by the current presentation state and needs to be contained in the database.

This method acquires a database lock which must be explicitly freed by the user.

Parameters
idxindex of the image to be loaded (< getNumberOfImageReferences())
changeStatusif true the image file is marked 'reviewed' (not new)
Returns
EC_Normal upon success, an error code otherwise.

◆ loadSRTemplate()

OFCondition DVInterface::loadSRTemplate ( const char *  reportID)

loads a structured reporting "template".

This "template" is just a DICOM Structured Reporting file which resides in a special sub-folder and is referenced by the configuration file. This mechanism should facilitate the creation of new reports since one does not have to start with a completely empty report. Please note that the current structured report is replaced by the specified "template". New study/series/instance UIDs are generated automatically for the new report. This method does not acquire a database lock.

Parameters
reportIDreport identifier, as returned by getReportID().
Returns
EC_Normal upon success, an error code otherwise.

◆ loadStoredPrint() [1/2]

OFCondition DVInterface::loadStoredPrint ( const char *  filename)

loads a Stored Print object (which need not be contained in the database) into memory.

Attention: The current print job (Stored Print object) will be deleted by doing this. This method does not acquire a database lock.

Parameters
filenamepath and filename of the Stored Print object to be loaded
Returns
EC_Normal upon success, an error code otherwise.

◆ loadStoredPrint() [2/2]

OFCondition DVInterface::loadStoredPrint ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID,
OFBool  changeStatus = OFFalse 
)

loads a Stored Print object which is contained in the database into memory.

Attention: The current print job (Stored Print object) will be deleted by doing this. This method acquires a database lock which must be explicitly freed by the user.

Parameters
studyUIDstudy instance UID of the Stored Print object
seriesUIDseries instance UID of the Stored Print object
instanceUIDSOP instance UID of the Stored Print object
changeStatusif true the stored print object is marked 'reviewed' (not new)
Returns
EC_Normal upon success, an error code otherwise.

◆ loadStructuredReport() [1/2]

OFCondition DVInterface::loadStructuredReport ( const char *  filename)

loads a structured report (which need not be contained in the database).

This method does not acquire a database lock.

Parameters
filenamepath and filename of the structured report to be loaded
Returns
EC_Normal upon success, an error code otherwise.

◆ loadStructuredReport() [2/2]

OFCondition DVInterface::loadStructuredReport ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID,
OFBool  changeStatus = OFFalse 
)

loads a structured report which is contained in the database.

This method acquires a database lock which must be explicitly freed by the user.

Parameters
studyUIDstudy instance UID of the structured report
seriesUIDseries instance UID of the structured report
instanceUIDSOP instance UID of the structured report
changeStatusif true the structured report file is marked 'reviewed' (not new)
Returns
EC_Normal upon success, an error code otherwise.

◆ lockDatabase()

OFCondition DVInterface::lockDatabase ( )
private

creates a database handle if none exists yet (this method may be called multiple times without interference) and puts a shared lock on the database.

The lock will remain until explicitly released with releaseDatabase();

Returns
EC_Normal upon success, an error code otherwise.

◆ lockExclusive()

OFCondition DVInterface::lockExclusive ( )
private

creates an exclusive lock on the database if none exists.

The lock will remain until explicitly released with releaseDatabase() or unlockExclusive(). This method also clears the index cache.

Returns
EC_Normal upon success, an error code otherwise.

◆ newInstancesReceived()

OFBool DVInterface::newInstancesReceived ( )

tests whether the database has been modified in any way since the last call to this method.

Any write access to the database (adding, deleting, changing) is reported. This method works by modifying and checking the "modification date/time" of the database index file. This method is not affected by database locks and can be called at any time. Always returns OFTrue for the first call after construction of the interface. Also returns OFTrue if something goes wrong (i.e. if the method cannot make sure that nothing has changed).

Returns
OFTrue if the database has been modified since the last call to this method.

◆ printSCUcreateBasicFilmSession()

OFCondition DVInterface::printSCUcreateBasicFilmSession ( DVPSPrintMessageHandler printHandler,
OFBool  plutInSession 
)

Initiates the creation of a DICOM Basic Film Session SOP Instance in the printer.

This method stores all Basic Film Session related attributes that are managed by this object in a DICOM dataset and passes the result to the embedded Stored Print object which manages the further communication.

Parameters
printHandlerprint communication handler, association must be open.
plutInSessiontrue if printer expects referenced presentation LUT sequence, illumination and reflected ambient light in basic film session, false if it expects them in basic film box.
Returns
EC_Normal upon success, an error code otherwise.

◆ readIndexRecord()

OFBool DVInterface::readIndexRecord ( const int  pos,
IdxRecord record,
int *  oldpos = NULL 
)
private

reads specified index record (comparing pos with oldpos to avoid redundant loading)

Parameters
posthe position
recordthe index record
oldposthe old position
Returns
OFTrue on success, OFFalse otherwise

◆ releaseDatabase()

OFCondition DVInterface::releaseDatabase ( )

removes any shared or exclusive lock on the database.

This method should be called when a database transaction (i.e. reading all studies, series, instances etc.) is finished. As long as a lock exists on the database, no other application (i.e. the network receiver) can add new images to the database. This method also clears the index cache.

Returns
EC_Normal upon success, an error code otherwise.

◆ resetPresentationState()

OFCondition DVInterface::resetPresentationState ( )

resets the presentation state object to the status it had immediately after the last successful operation of "loadImage" or "loadPState".

A state can also explicitly specified as such a "reset state" by using the method saveCurrentPStateForReset(). Attention: The last reference returned by getCurrentPState() becomes invalid when this method is called.

Returns
EC_Normal upon success, an error code otherwise.

◆ saveCurrentImage()

OFCondition DVInterface::saveCurrentImage ( const char *  filename,
OFBool  explicitVR = OFTrue 
)

saves the DICOM image that is currently attached to the presentation state in a file with the given path and filename.

This method does not acquire a database lock and does not register the saved presentation state in the database.

Parameters
filenamepath and filename under which the image is to be saved
explicitVRselects the transfer syntax to be written. True (the default) selects Explicit VR Little Endian, False selects Implicit VR Little Endian.
Returns
EC_Normal upon success, an error code otherwise.

◆ saveCurrentPStateForReset()

OFCondition DVInterface::saveCurrentPStateForReset ( )

saves the current state of the presentation state object to be used for resetPresentationState().

This is e.g. useful after registration of additional images directly after a new images has been loaded.

Returns
EC_Normal upon success, an error code otherwise.

◆ saveDICOMImage() [1/2]

OFCondition DVInterface::saveDICOMImage ( const char *  filename,
const void *  pixelData,
unsigned long  width,
unsigned long  height,
double  aspectRatio = 1.0,
OFBool  explicitVR = OFTrue,
const char *  instanceUID = NULL 
)

saves a monochrome bitmap as a DICOM Secondary Capture image.

The bitmap must use one byte per pixel, left to right, top to bottom order of the pixels. 0 is interpreted as black, 255 as white.

Parameters
filenamethe file name or path under which the image is saved.
pixelDataa pointer to the image data. Must contain at least width*height bytes of data.
widththe width of the image, must be <= 0xFFFF
heightthe height of the image, must be <= 0xFFFF
aspectRatiothe pixel aspect ratio as width/height. If omitted, a pixel aspect ratio of 1/1 is assumed.
explicitVRselects the transfer syntax to be written. True selects Explicit VR Little Endian, False selects Implicit VR Little Endian.
instanceUIDoptional parameter containing the SOP Instance UID to be written. This parameter should be omitted unless the SOP Instance UID needs to be controlled externally.
Returns
EC_Normal upon success, an error code otherwise.

◆ saveDICOMImage() [2/2]

OFCondition DVInterface::saveDICOMImage ( const void *  pixelData,
unsigned long  width,
unsigned long  height,
double  aspectRatio = 1.0 
)

saves a monochrome bitmap as a DICOM Secondary Capture image in the same directory in which the database index file resides.

The filename is generated automatically. When the image is stored successfully, the database index is updated to include the new object. This method releases under any circumstances the database lock if it exists.

Parameters
pixelDataa pointer to the image data. Must contain at least width*height bytes of data.
widththe width of the image, must be <= 0xFFFF
heightthe height of the image, must be <= 0xFFFF
aspectRatiothe pixel aspect ratio as width/height. If omitted, a pixel aspect ratio of 1/1 is assumed.
Returns
EC_Normal upon success, an error code otherwise.

◆ saveFileFormatToDB()

OFCondition DVInterface::saveFileFormatToDB ( DcmFileFormat fileformat)

saves a DICOM object into a file in the same directory in which the database index file resides.

The object must contain a SOP Class UID and SOP Instance UID. The filename is generated automatically. When the image is stored successfully, the database index is updated to include the new object. This method releases under any circumstances the database lock if it exists.

Parameters
fileformatthe complete DICOM file object to be written
Returns
EC_Normal upon success, an error code otherwise.

◆ saveHardcopyGrayscaleImage() [1/2]

OFCondition DVInterface::saveHardcopyGrayscaleImage ( const char *  filename,
const void *  pixelData,
unsigned long  width,
unsigned long  height,
double  aspectRatio = 1.0,
OFBool  explicitVR = OFTrue,
const char *  instanceUID = NULL 
)

saves a monochrome bitmap as a DICOM Hardcopy Grayscale image.

The bitmap must use 16 bits per pixel, left to right, top to bottom order of the pixels. It is assumed that only values 0..4095 are used.

Parameters
filenamethe file name or path under which the image is saved.
pixelDataa pointer to the image data. Must contain at least width*height*2 bytes of data.
widththe width of the image, must be <= 0xFFFF
heightthe height of the image, must be <= 0xFFFF
aspectRatiothe pixel aspect ratio as width/height. If omitted, a pixel aspect ratio of 1/1 is assumed.
explicitVRselects the transfer syntax to be written. True selects Explicit VR Little Endian, False selects Implicit VR Little Endian.
instanceUIDoptional parameter containing the SOP Instance UID to be written. This parameter should be omitted unless the SOP Instance UID needs to be controlled externally.
Returns
EC_Normal upon success, an error code otherwise.

◆ saveHardcopyGrayscaleImage() [2/2]

OFCondition DVInterface::saveHardcopyGrayscaleImage ( const void *  pixelData,
unsigned long  width,
unsigned long  height,
double  aspectRatio = 1.0 
)

saves a monochrome bitmap as a DICOM Hardcopy Grayscale image in the same directory in which the database index file resides.

The filename is generated automatically. When the image is stored successfully, the database index is updated to include the new object. This method releases under any circumstances the database lock if it exists.

Parameters
pixelDataa pointer to the image data. Must contain at least width*height*2 bytes of data.
widththe width of the image, must be <= 0xFFFF
heightthe height of the image, must be <= 0xFFFF
aspectRatiothe pixel aspect ratio as width/height. If omitted, a pixel aspect ratio of 1/1 is assumed.
Returns
EC_Normal upon success, an error code otherwise.

◆ savePState() [1/2]

OFCondition DVInterface::savePState ( const char *  filename,
OFBool  replaceSOPInstanceUID,
OFBool  explicitVR = OFTrue 
)

saves the current presentation state in a file with the given path and filename.

A new SOP Instance UID is assigned whenever a presentation state is saved. This method does not acquire a database lock and does not register the saved presentation state in the database.

Parameters
filenamepath and filename under which the presentation state is to be saved
replaceSOPInstanceUIDflag indicating whether the SOP Instance UID should be replaced by a new UID. If true, a new UID is always generated. If false, a new UID is generated only if no UID has been assigned before.
explicitVRselects the transfer syntax to be written. True (the default) selects Explicit VR Little Endian, False selects Implicit VR Little Endian.
Returns
EC_Normal upon success, an error code otherwise.

◆ savePState() [2/2]

OFCondition DVInterface::savePState ( OFBool  replaceSOPInstanceUID)

saves the current presentation state in the same directory in which the database index file resides.

The filename is generated automatically. A new SOP Instance UID is assigned whenever a presentation state is saved. After successfully storing the presentation state, the database index is updated to include the new object. This method releases under any circumstances the database lock if it exists.

Parameters
replaceSOPInstanceUIDflag indicating whether the SOP Instance UID should be replaced by a new UID. If true, a new UID is always generated. If false, a new UID is generated only if no UID has been assigned before.
Returns
EC_Normal upon success, an error code otherwise.

◆ saveStoredPrint() [1/2]

OFCondition DVInterface::saveStoredPrint ( const char *  filename,
OFBool  writeRequestedImageSize,
OFBool  explicitVR = OFTrue,
const char *  instanceUID = NULL 
)

saves the current print job as a Stored Print object.

Parameters
filenamethe file name or path under which the image is saved.
writeRequestedImageSizeif false, the Requested Image Size attributes are not written, e. g. because they are not supported by the target printer.
explicitVRselects the transfer syntax to be written. True selects Explicit VR Little Endian, False selects Implicit VR Little Endian.
instanceUIDoptional parameter containing the SOP Instance UID to be written. This parameter should be omitted unless the SOP Instance UID needs to be controlled externally.
Returns
EC_Normal upon success, an error code otherwise.

◆ saveStoredPrint() [2/2]

OFCondition DVInterface::saveStoredPrint ( OFBool  writeRequestedImageSize)

saves the current print job as a Stored Print object in the same directory in which the database index file resides.

The filename is generated automatically. When the image is stored successfully, the database index is updated to include the new object. This method releases under any circumstances the database lock if it exists.

Parameters
writeRequestedImageSizeif false, the Requested Image Size attributes are not written, e. g. because they are not supported by the target printer.
Returns
EC_Normal upon success, an error code otherwise.

◆ saveStructuredReport() [1/2]

OFCondition DVInterface::saveStructuredReport ( )

saves the current structured report in the same directory in which the database index file resides.

The filename is generated automatically. A new SOP Instance UID is not assigned automatically unless the method getStructuredReport().createRevisedVersion() is called (see documentation in file dcmsr/dsrdoc.h). This is not required for the first version of a document (i.e. directly after program start or calling the method getStructuredReport().createNewDocument()). After successfully storing the structured report, the database index is updated to include the new object. This method releases under any circumstances the database lock if it exists.

Returns
EC_Normal upon success, an error code otherwise.

◆ saveStructuredReport() [2/2]

OFCondition DVInterface::saveStructuredReport ( const char *  filename,
OFBool  explicitVR = OFTrue 
)

saves the current structured report in a file with the given path and filename.

A new SOP Instance UID is not assigned automatically unless the method getStructuredReport().createRevisedVersion() is called (see documentation in file dcmsr/dsrdoc.h). This is not required for the first version of a document (i.e. directly after program start or calling the method getStructuredReport().createNewDocument()). This method does not acquire a database lock and does not register the saved structured report in the database.

Parameters
filenamepath and filename under which the structured report is to be saved
explicitVRselects the transfer syntax to be written. True (the default) selects Explicit VR Little Endian, False selects Implicit VR Little Endian.
Returns
EC_Normal upon success, an error code otherwise.

◆ selectDisplayPresentationLUT()

OFCondition DVInterface::selectDisplayPresentationLUT ( const char *  lutID)

sets the LUT with the given identifier in the Presentation State as current Presentation LUT.

Parameters
lutIDLUT identifier, as returned by getLUTID().
Returns
EC_Normal if successful, an error code otherwise.

◆ selectInstance() [1/4]

OFCondition DVInterface::selectInstance ( const char *  instanceUID)

selects the instance with the given UID within the currently selected series.

This method acquires a database lock which must be explicitly freed by the user. The selection remains valid until the database lock is removed or the database is modified (see comments for getNumberOfStudies).

Parameters
instanceUIDSOP instance UID of the instance
Returns
EC_Normal upon success, an error code otherwise.

◆ selectInstance() [2/4]

OFCondition DVInterface::selectInstance ( const char *  instanceUID,
const char *  sopClassUID 
)

selects the instance with the given UID and SOP class over all studies and series.

Please note that in worst case all studies, series and instances are examined. This method acquires a database lock which must be explicitly freed by the user. The selection remains valid until the database lock is removed or the database is modified (see comments for getNumberOfStudies).

Parameters
instanceUIDSOP instance UID of the instance
sopClassUIDSOP class UID of the instance (might be NULL to be not compared)
Returns
EC_Normal upon success, an error code otherwise.

◆ selectInstance() [3/4]

OFCondition DVInterface::selectInstance ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

selects the instance with the given UIDs.

This method acquires a database lock which must be explicitly freed by the user. The selection remains valid until the database lock is removed or the database is modified (see comments for getNumberOfStudies).

Parameters
studyUIDstudy instance UID of the instance
seriesUIDseries instance UID of the instance
instanceUIDSOP instance UID of the instance
Returns
EC_Normal upon success, an error code otherwise.

◆ selectInstance() [4/4]

OFCondition DVInterface::selectInstance ( Uint32  idx)

selects the instance with the given index within the currently selected series.

This method acquires a database lock which must be explicitly freed by the user. The selection remains valid until the database lock is removed or the database is modified (see comments for getNumberOfStudies).

Parameters
idxindex to be selected, must be < getNumberOfInstances()
Returns
EC_Normal upon success, an error code otherwise.

◆ selectPrintPresentationLUT()

OFCondition DVInterface::selectPrintPresentationLUT ( const char *  lutID)

sets the LUT with the given identifier in the Stored Print object as current Presentation LUT.

This LUT overrides the settings made for the separate image boxes, it can be deactivated using the method DVPSStoredPrint::setDefaultPresentationLUT().

Parameters
lutIDLUT identifier, as returned by getLUTID().
Returns
EC_Normal if successful, an error code otherwise.

◆ selectPState()

OFCondition DVInterface::selectPState ( Uint32  idx,
OFBool  changeStatus = OFFalse 
)

selects and loads specified presentation state referencing the currently selected image.

Parameters
idxindex to be selected, must be < getNumberOfPStates()
changeStatusif true the presentation state is marked 'reviewed' (not new)
Returns
EC_Normal upon success, an error code otherwise.

◆ selectSeries() [1/2]

OFCondition DVInterface::selectSeries ( const char *  seriesUID)

selects the series with the given UID within the currently selected study.

This method acquires a database lock which must be explicitly freed by the user. The selection remains valid until the database lock is removed or the database is modified (see comments for getNumberOfStudies).

Parameters
seriesUIDseries instance UID of the image
Returns
EC_Normal upon success, an error code otherwise.

◆ selectSeries() [2/2]

OFCondition DVInterface::selectSeries ( Uint32  idx)

selects the series with the given index within the currently selected study.

This method acquires a database lock which must be explicitly freed by the user. The selection remains valid until the database lock is removed or the database is modified (see comments for getNumberOfStudies).

Parameters
idxindex to be selected, must be < getNumberOfSeries()
Returns
EC_Normal upon success, an error code otherwise.

◆ selectStudy() [1/2]

OFCondition DVInterface::selectStudy ( const char *  studyUID)

selects the study with the given UID in the database.

This method acquires a database lock which must be explicitly freed by the user. The selection remains valid until the database lock is removed or the database is modified (see comments for getNumberOfStudies). Implicitly the first series and first instance within this study is selected, too.

Parameters
studyUIDthe DICOM study instance UID
Returns
EC_Normal upon success, an error code otherwise.

◆ selectStudy() [2/2]

OFCondition DVInterface::selectStudy ( Uint32  idx)

selects the study with the given index in the database.

This method acquires a database lock which must be explicitly freed by the user. The selection remains valid until the database lock is removed or the database is modified (see comments for getNumberOfStudies). Implicitly the first series and first instance within this study is selected, too.

Parameters
idxindex to be selected, must be < getNumberOfStudies()
Returns
EC_Normal upon success, an error code otherwise.

◆ sendIOD()

OFCondition DVInterface::sendIOD ( const char *  targetID,
const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

sends a single instance (image or presentation state) over network to a different DICOM peer.

A separate application or process is launched to handle the send operation. This call returns when the send operation has successfully been launched. No information about the status or success of the transfer itself is being made available.

Parameters
targetIDsymbolic identifier of the send target, must be one of the strings returned by getTargetID().
studyUIDStudy Instance UID of the IOD to be sent. Must be an IOD contained in the database.
seriesUIDSeries Instance UID of the IOD to be sent. Must be an IOD contained in the database.
instanceUIDSOP Instance UID of the IOD to be sent. Must be an IOD contained in the database.
Returns
EC_Normal when the send process has successfully been launched, an error condition otherwise.

◆ sendSeries()

OFCondition DVInterface::sendSeries ( const char *  targetID,
const char *  studyUID,
const char *  seriesUID 
)
inline

sends a complete series over network to a different DICOM peer.

A separate application or process is launched to handle the send operation. This call returns when the send operation has successfully been launched. No information about the status or success of the transfer itself is being made available.

Parameters
targetIDsymbolic identifier of the send target, must be one of the strings returned by getTargetID().
studyUIDStudy Instance UID of the series to be sent. Must be a series contained in the database.
seriesUIDSeries Instance UID of the series to be sent. Must be a series contained in the database.
Returns
EC_Normal when the send process has successfully been launched, an error condition otherwise.

◆ sendStudy()

OFCondition DVInterface::sendStudy ( const char *  targetID,
const char *  studyUID 
)
inline

sends a complete study over network to a different DICOM peer.

A separate application or process is launched to handle the send operation. This call returns when the send operation has successfully been launched. No information about the status or success of the transfer itself is being made available.

Parameters
targetIDsymbolic identifier of the send target, must be one of the strings returned by getTargetID().
studyUIDStudy Instance UID of the study to be sent. Must be a study contained in the database.
Returns
EC_Normal when the send process has successfully been launched, an error condition otherwise.

◆ setActiveAnnotation()

void DVInterface::setActiveAnnotation ( OFBool  value)
inline

switches annotation printing on/off

Parameters
valueOFTrue if annotation is switched on, OFFalse otherwise.

◆ setAmbientLightValue()

OFCondition DVInterface::setAmbientLightValue ( double  value)

sets ambient light value for the display transformation.

Parameters
valueambient light value to be set
Returns
EC_Normal upon success, an error code otherwise.

◆ setAnnotationText()

void DVInterface::setAnnotationText ( const char *  value)

sets the current annotation text.

Parameters
valuenew text, may be NULL.

◆ setCurrentPrinter()

OFCondition DVInterface::setCurrentPrinter ( const char *  targetID)

selects the current printer.

Also adjusts the destination AE title and the printer name attribute within the Stored Print object.

Parameters
targetIDone of the printer target IDs returned by getTargetID().
Returns
EC_Normal if successful, an error code otherwise.

◆ setMaxPrintPreviewWidthHeight()

void DVInterface::setMaxPrintPreviewWidthHeight ( unsigned long  width,
unsigned long  height 
)

sets the maximum print preview bitmap width and height.

Larger images are scaled down (according to the pixel aspect ratio) to fit into the specified rectangle. Attention: If the values differ from the the previous ones the currently loaded hardcopy grayscale image (preview) is automatically destroyed and has to be re-loaded.

Parameters
widthmaximum width of preview bitmap (in pixels)
heightmaximum height of preview bitmap (in pixels)

◆ setPrependDateTime()

void DVInterface::setPrependDateTime ( OFBool  value)
inline

sets the Prepend Date/Time annotation flag.

Parameters
valueOFTrue if Prepend Date/Time is switched on, OFFalse otherwise.

◆ setPrependLighting()

void DVInterface::setPrependLighting ( OFBool  value)
inline

sets the Prepend Lighting annotation flag.

Parameters
valueOFTrue if Prepend Lighting is switched on, OFFalse otherwise.

◆ setPrependPrinterName()

void DVInterface::setPrependPrinterName ( OFBool  value)
inline

sets the Prepend Printer Name annotation flag.

Parameters
valueOFTrue if Prepend Printer Name is switched on, OFFalse otherwise.

◆ setPrinterFilmDestination()

OFCondition DVInterface::setPrinterFilmDestination ( const char *  value)

sets the (optional) printer film destination.

Parameters
valuenew 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.

◆ setPrinterFilmSessionLabel()

OFCondition DVInterface::setPrinterFilmSessionLabel ( const char *  value)

sets the (optional) printer film session label.

Parameters
valuenew 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.

◆ setPrinterMediumType()

OFCondition DVInterface::setPrinterMediumType ( const char *  value)

sets the (optional) print medium type.

Parameters
valuenew 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.

◆ setPrinterNumberOfCopies()

OFCondition DVInterface::setPrinterNumberOfCopies ( unsigned long  value)

sets the (optional) print number of copies.

Parameters
valuenew attribute value, may be 0. 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.

◆ setPrinterOwnerID()

OFCondition DVInterface::setPrinterOwnerID ( const char *  value)

sets the (optional) print session owner ID.

Parameters
valuenew 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.

◆ setPrinterPriority()

OFCondition DVInterface::setPrinterPriority ( const char *  value)

sets the (optional) print priority.

Parameters
valuenew 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.

◆ spoolPrintJob()

OFCondition DVInterface::spoolPrintJob ( OFBool  deletePrintedImages = OFTrue)

start spooling of print job with current settings.

Parameters
deletePrintedImagesif true, delete printed images from queue.
Returns
EC_Normal if successful, an error code otherwise.

◆ spoolStoredPrintFromDB()

OFCondition DVInterface::spoolStoredPrintFromDB ( const char *  studyUID,
const char *  seriesUID,
const char *  instanceUID 
)

requests the spooler process to print an old print job that is stored in the database as a "stored print" object.

The Stored Print that is printed does not contain all parameters of a print job. The following parameters are taken from the current settings in this object: Target printer, medium type, illumination and reflected ambient light.

Parameters
studyUIDstudy instance UID of the Stored Print, as reported by getStudyUID()
seriesUIDseries instance UID of the Stored Print, as reported by getSeriesUID()
instanceUIDSOP instance UID of the Stored Print, as reported by getInstanceUID()
Returns
EC_Normal upon success, an error code otherwise.

◆ startExternalApplication()

OFCondition DVInterface::startExternalApplication ( const char *  application,
const char *  filename 
)
private

starts an external application and passes a filename.

Parameters
applicationpathname of the application to be started
filenamefilename to be passed as single parameter.
Returns
EC_Normal if fork or CreateProcess succeeds, an error condition otherwise.

◆ startPrintServer()

OFCondition DVInterface::startPrintServer ( )

starts the print server process (Basic Grayscale Print Management SCP).

The print server process will wait for incoming DICOM associations, handle the DICOM print protocol, store data in file and register stored print and grayscale image objects in the database index file. Attention: Successful return of this method is no guarantee that the print server has successfully started, because certain errors (i.e. incorrect settings in the config file) will only be noted in the print server process when running. On Unix platform, successful return of this method means that the fork() used to start the server was successful. On Win32 platforms, it means that the CreateProcess() call was successful.

Returns
EC_Normal if the server process could be started, an error code otherwise.

◆ startPrintSpooler()

OFCondition DVInterface::startPrintSpooler ( )

starts the print spooler process.

The print spooler will wait for print jobs created with spoolPrintJob() and communicate them to the printer using the DICOM Print Management Service Class. Attention: Successful return of this method is no guarantee that the spooler has successfully started, because certain errors (i.e. incorrect settings in the config file) will only be noted in the spooler process when running. On Unix platform, successful return of this method means that the fork() used to start the spooler was successful. On Win32 platforms, it means that the CreateProcess() call was successful.

Returns
EC_Normal if the spooler process could be started, an error code otherwise.

◆ startQueryRetrieveServer()

OFCondition DVInterface::startQueryRetrieveServer ( )

starts the query/retrieve server process (Query/Retrieve Service Class SCP).

The query/retrieve process will wait for incoming DICOM associations, serve queries and send the requested instances to the specified destination. Data will be taken from the same local database used to store received instances and created presentation states, stored print objects and hardcopy grayscale images. The configuration file which is required for the query/retrieve process will be created automatically from the 'global' configuration file each time this method is called, unless this automatic creation is disabled (entry: [QUERYRETIUEVE] AutoCreateConfigFile = false). Attention: Successful return of this method is no guarantee that the query/retrieve server has successfully started, because certain errors (i.e. incorrect settings in the config file) will only be noted in the query/retrieve process when running. On Unix platform, successful return of this method means that the fork() used to start the receiver was successful. On Win32 platforms, it means that the CreateProcess() call was successful.

Returns
EC_Normal if the query/retrieve process could be started, an error code otherwise.

◆ startReceiver()

OFCondition DVInterface::startReceiver ( )

starts the network receiver processes (Storage Service Class SCPs).

The receiver processes will wait for incoming DICOM associations, receive images and presentation states. Data will be stored in file and registered in the database index file. Attention: Successful return of this method is no guarantee that the network receiver has successfully started, because certain errors (i.e. incorrect settings in the config file) will only be noted in the network receiver process when running. On Unix platform, successful return of this method means that the fork() used to start the receiver was successful. On Win32 platforms, it means that the CreateProcess() call was successful.

Returns
EC_Normal if the receiver processes could be started, an error code otherwise.

◆ terminatePrintServer()

OFCondition DVInterface::terminatePrintServer ( )

terminates the print server process (Basic Grayscale Print Management SCP).

This method attempts to terminate the print server process by requesting a DICOM association with it and delivering a special "shutdown" command. If for some reason the print server cannot be found (i.e. because it has terminated abnormally), a TCP/IP timeout (several seconds) may occur before this method returns.

Returns
EC_Normal if the server process could be terminated, an error code otherwise.

◆ terminatePrintSpooler()

OFCondition DVInterface::terminatePrintSpooler ( )

terminates the print spooler process.

This method creates a "dummy" print job that request the print spooler to shutdown as soon as all other pending print jobs are finished.

Returns
EC_Normal if the spooler process dummy print job could be written, an error code otherwise.

◆ terminateQueryRetrieveServer()

OFCondition DVInterface::terminateQueryRetrieveServer ( )

terminates the query/retrieve server process (Query/Retrieve Service Class SCP).

This method attempts to terminate the query/retrieve process by requesting a DICOM association with it and delivering a special "shutdown" command. If for some reason the query/retrieve server cannot be found (i.e. because it has terminated abnormally), a TCP/IP timeout (several seconds) may occur before this method returns.

Returns
EC_Normal if the query/retrieve process could be terminated, an error code otherwise.

◆ terminateReceiver()

OFCondition DVInterface::terminateReceiver ( )

terminates the network receiver process (Storage Service Class SCP).

This method attempts to terminate the network receiver process by requesting a DICOM association with it and delivering a special "shutdown" command. If for some reason the network receiver cannot be found (i.e. because it has terminated abnormally), a TCP/IP timeout (several seconds) may occur before this method returns.

Returns
EC_Normal if the receiver process could be terminated, an error code otherwise.

◆ unlockExclusive()

OFCondition DVInterface::unlockExclusive ( )
private

removes an exclusive lock on the database if any.

Returns
EC_Normal upon success, an error code otherwise.

◆ verifyAndSignStructuredReport()

OFCondition DVInterface::verifyAndSignStructuredReport ( const char *  userID,
const char *  passwd,
DVPSVerifyAndSignMode  mode 
)

verifies and digitally signs the current structured report.

If the user ID is known (i.e. specified in the configuration file) the current structured report is verified (a verifying observer is added). If the 'mode' parameter is set accordingly and the password is correct (see verifyUserPassword) the report is also digitally signed. Please note that a document can be verified/signed more than once, but only completed documents can be verified. After signing the report no modifications should be performed before the object is stored in the database or a file. Otherwise the digital signature would be corrupted. Therefore, the SOP instance UID should be generated before calling this method.

Remarks
this method only has full functionality if DCMTK is compiled with OpenSSL support enabled. If not, only mode DVPSY_verify (verification) is available and an error is returned for any other mode.
Parameters
userIDsymbolic user ID for given user, as returned by DVConfiguration::getUserID()
passwdfor user as entered in some GUI control
modeflag specifying whether to verify only, verify and sign or verify and sign and finalize the document. The difference between the second and the third mode is that "finalize" always signs the entire document whereas the other mode only signs the marked items (if any, all items otherwise) and leaves out certain header attributes (e.g. the SOP instance UID and the verifying observer sequence).
Returns
status, EC_Normal if successful, an error code otherwise.

◆ verifyUserPassword()

OFBool DVInterface::verifyUserPassword ( const char *  userID,
const char *  passwd 
)

verifies the given password for the given user ID.

This method tries to load and decrypt the private key for the given user with the given password. If this fails, the password verification fails, otherwise the password verification succeeds.

Remarks
this method is only functional if DCMTK is compiled with OpenSSL support enabled. Otherwise it always returns false.
Parameters
userIDsymbolic user ID for given user, as returned by DVConfiguration::getUserID()
passwdfor user as entered in some GUI control
Returns
true if password verification succeeds, false otherwise.

Member Data Documentation

◆ pDicomPState

DcmFileFormat* DVInterface::pDicomPState
private

pointer to the current DICOM dataset containing the loaded presentation state.

Is NULL when the presentation state has been created "on the fly" from image.

◆ printerFilmDestination

OFString DVInterface::printerFilmDestination
private

printer film destination identifier, may be empty.

VR=CS, VM=1

◆ printerFilmSessionLabel

OFString DVInterface::printerFilmSessionLabel
private

printer film session label, may be empty.

VR=LO, VM=1

◆ printerMediumType

OFString DVInterface::printerMediumType
private

printer medium type identifier, may be empty.

VR=CS, VM=1

◆ printerOwnerID

OFString DVInterface::printerOwnerID
private

printer film session owner ID, may be empty.

VR=SH, VM=1

◆ printerPriority

OFString DVInterface::printerPriority
private

printer print priority, may be empty.

VR=CS, VM=1, enumerated values: HIGH, MED, LOW

◆ printJobIdentifier

OFString DVInterface::printJobIdentifier
private

a unique string generated for each instance of this class.

Used to identify print jobs generated from this instance.

◆ referenceTime

unsigned long DVInterface::referenceTime
private

initialized with construction time of the interface object minus one day.

Used to check modifications of the database index file.


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


Generated on Tue Dec 19 2023 for DCMTK Version 3.6.8 by Doxygen 1.9.4