📄 dviface.h
字号:
* width*height*2 bytes of data. * @param width the width of the image, must be <= 0xFFFF * @param height the height of the image, must be <= 0xFFFF * @aspectRatio the pixel aspect ratio as width/height. If omitted, a pixel * aspect ratio of 1/1 is assumed. * @return EC_Normal upon success, an error code otherwise. */ OFCondition saveHardcopyGrayscaleImage( const void *pixelData, unsigned long width, unsigned long height, double aspectRatio=1.0); /** 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. * @param fileformat the complete DICOM file object to be written * @return EC_Normal upon success, an error code otherwise. */ OFCondition saveFileFormatToDB(DcmFileFormat &fileformat); /** 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. * @param studyUID study instance UID of the Stored Print object * @param seriesUID series instance UID of the Stored Print object * @param instanceUID SOP instance UID of the Stored Print object * @param changeStatus if true the stored print object is marked 'reviewed' (not new) * @return EC_Normal upon success, an error code otherwise. */ OFCondition loadStoredPrint(const char *studyUID, const char *seriesUID, const char *instanceUID, OFBool changeStatus = OFFalse); /** 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. * @param filename path and filename of the Stored Print object to be loaded * @return EC_Normal upon success, an error code otherwise. */ OFCondition loadStoredPrint(const char *filename); /** saves the current print job as a Stored Print object. * @param filename the file name or path under which the image is saved. * @param writeRequestedImageSize if false, the Requested Image Size attributes are not written, * e. g. because they are not supported by the target printer. * @param explicitVR selects the transfer syntax to be written. * True selects Explicit VR Little Endian, False selects Implicit VR Little Endian. * @param instanceUID optional parameter containing the SOP Instance UID to be written. * This parameter should be omitted unless the SOP Instance UID needs to be controlled * externally. * @return EC_Normal upon success, an error code otherwise. */ OFCondition saveStoredPrint( const char *filename, OFBool writeRequestedImageSize, OFBool explicitVR=OFTrue, const char *instanceUID=NULL); /** 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. * @param writeRequestedImageSize if false, the Requested Image Size attributes are not written, * e. g. because they are not supported by the target printer. * @return EC_Normal upon success, an error code otherwise. */ OFCondition saveStoredPrint(OFBool writeRequestedImageSize); /** gets the number of Hardcopy Grayscaleimages currently registered by the stored print object. * @return number of images. */ size_t getNumberOfPrintPreviews(); /** 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(). * @param idx index of the image, must be < getNumberOfPrintPreviews() * @param printLUT OFTrue 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) * @param changeStatus if true the hardcopy grayscale image file is marked 'reviewed' (not new) * @return EC_Normal if successful, an error code otherwise. */ OFCondition loadPrintPreview(size_t idx, OFBool printLUT = OFTrue, OFBool changeStatus = OFFalse); /** removes a currently loaded Hardcopy Grayscale image from memory. */ void unloadPrintPreview(); /** gets number of bytes used for the print preview bitmap. * (depends on width, height and depth) * @return number of bytes used for the preview bitmap */ unsigned long getPrintPreviewSize(); /** 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 detroyed and has to be re-loaded. * @param width maximum width of preview bitmap (in pixels) * @param height maximum height of preview bitmap (in pixels) */ void setMaxPrintPreviewWidthHeight(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! * @param width upon success, the bitmap width (in pixels) is returned in this parameter * @param height upon success, the bitmap height (in pixels) is returned in this parameter * @return EC_Normal upon success, an error code otherwise */ OFCondition getPrintPreviewWidthHeight(unsigned long &width, unsigned long &height); /** 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. * @param bitmap pointer to storage area where the pixel data is copied to (array of 8 bit values) * @param size specifies size of the storage area in bytes * @return EC_Normal upon success, an error code otherwise */ OFCondition getPrintPreviewBitmap(void *bitmap, unsigned long size); /** 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. * @return EC_Normal upon success, an error code otherwise. */ OFCondition disablePState(); /** restores the stored presentation state (see disablePresentationState) * and deletes the temporary presentation state. * If no stored presentation state exists, returns an error. * @return EC_Normal upon success, an error code otherwise. */ OFCondition enablePState(); /** 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. * @return number of presentation states, 0 if none available or an error occurred */ Uint32 getNumberOfPStates(); /** selects and loads specified presentation state referencing the currently selected * image. * @param idx index to be selected, must be < getNumberOfPStates() * @param changeStatus if true the presentation state is marked 'reviewed' (not new) * @return EC_Normal upon success, an error code otherwise. */ OFCondition selectPState(Uint32 idx, OFBool changeStatus = OFFalse); /** returns description of specified presentation state referencing the currently * selected image. * @param idx index to be selected, must be < getNumberOfPStates() * @return presentation state description or NULL idx is invalid */ const char *getPStateDescription(Uint32 idx); /** returns label of specified presentation state referencing the currently * selected image. * @param idx index to be selected, must be < getNumberOfPStates() * @return presentation state label or NULL idx is invalid */ const char *getPStateLabel(Uint32 idx); /** 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). * @param transform display transform to be checked (default: GSDF) * @return OFTrue if display transform is possible, OFFalse otherwise */ OFBool isDisplayTransformPossible(DVPSDisplayTransform transform = DVPSD_GSDF); /** sets ambient light value for the display transformation. * @param value ambient light value to be set * @return EC_Normal upon success, an error code otherwise. */ OFCondition setAmbientLightValue(double value); /** returns ambient light value for the display transformation. * @param value returned ambient light value * @return EC_Normal upon success, an error code otherwise. */ OFCondition getAmbientLightValue(double &value); /* print related methods */ /** selects the current printer. Also adjusts the destination AE title and the * printer name attribute within the Stored Print object. * @param targetID one of the printer target IDs returned by getTargetID(). * @return EC_Normal if successful, an error code otherwise. */ OFCondition setCurrentPrinter(const char *targetID); /** gets the current printer's target ID. * @return printer target ID, can be NULL if no printer is defined * in the configuration file. */ const char *getCurrentPrinter(); /** sets the (optional) print medium type. * @param value new attribute value, may be NULL. * The caller is responsible for making sure * that the value is valid for the selected printer. * @return EC_Normal if successful, an error code otherwise. */ OFCondition setPrinterMediumType(const char *value); /** gets the (optional) print medium type. * @return medium type, may be NULL. */ const char *getPrinterMediumType(); /** sets the (optional) printer film destination. * @param value new attribute value, may be NULL. * The caller is responsible for making sure * that the value is valid for the selected printer. * @return EC_Normal if successful, an error code otherwise. */ OFCondition setPrinterFilmDestination(const char *value); /** gets the (optional) printer film destination. * @return printer film destination, may be NULL or empty string. */ const char *getPrinterFilmDestination(); /** sets the (optional) printer film session label. * @param value new attribute value, may be NULL. * The caller is responsible for making sure * that the value is valid for the selected printer. * @return EC_Normal if successful, an error code otherwise. */ OFCondition setPrinterFilmSessionLabel(const char *value); /** gets the (optional) printer film session label. * @return printer film session label, may be NULL or empty string. */ const char *getPrinterFilmSessionLabel(); /** sets the (optiona
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -