📄 dcmpstat.h
字号:
/** gets rectangular shutter upper horitontal edge. * May only be called if a rectangular shutter is active. * @return the rect shutter UH edge. */ Sint32 getRectShutterUH(); /** gets rectangular shutter lower horiztonal edge. * May only be called if a rectangular shutter is active. * @return the rect shutter LH edge. */ Sint32 getRectShutterLH(); /* circular shutter Interface */ /** gets circular shutter center x component. * May only be called if a circular shutter is active. * @return the circ shutter center x component */ Sint32 getCenterOfCircularShutter_x(); /** gets circular shutter center y component. * May only be called if a circular shutter is active. * @return the circ shutter center y component */ Sint32 getCenterOfCircularShutter_y(); /** gets circular shutter radius. * May only be called if a circular shutter is active. * Note: In DICOM, a circular shutter must be rendered * with consideration of the image pixel aspect ratio. * The radius returned by this method is the number * of pixels describing a horizontal line from the * center of the circle to its border. See sample figures * in NEMA PS3.3:1998. * @return the circ shutter radius */ Sint32 getRadiusOfCircularShutter(); /* polygonal shutter Interface */ /** gets polygonal shutter number of points. * May only be called if a polygonal shutter is active. * @return the number of points describing the poly shutter */ size_t getNumberOfPolyShutterVertices(); /** get polygonal shutter point. * May only be called if a polygonal shutter is active. * Shutter points are relative to the origin 1\1 which is * the left upper edge of the image. * @param idx the index of the shutter point, must be < getNumberOfPolyShutterVertices() * @param x returns the x component of the point * @param y returns the y component of the point * @return EC_Normal upon success, an error code otherwise. */ OFCondition getPolyShutterVertex(size_t idx, Sint32& x, Sint32& y); /** sets polygonal display shutter origin. * This method creates a * polygonal shutter consisting only of a single point. * The polygonal display shutter is deactivated after this method. * @param x the x component of the shutter origin * @param y the x component of the shutter origin * @return EC_Normal upon success, an error code otherwise. */ OFCondition setPolyShutterOrigin(Sint32 x, Sint32 y); /* bitmap shutter Interface * * see methods: * overlayIsBitmapShutter(), * overlayIsSuitableAsBitmapShutter(), * activateOverlayAsBitmapShutter() * in overlay interface definitions. */ /* shutter presentation value Interface */ /** gets the shutter presentation value. If no shutter display * value exists, a default of 0 (black) is set. * @return the shutter presentation value as 16bit unsigned P-value */ Uint16 getShutterPresentationValue(); /** sets the shutter presentation value to the given P-value. * @param pvalue the shutter presentation value. * @return EC_Normal upon success, an error code otherwise. */ OFCondition setShutterPresentationValue(Uint16 pvalue); /* Presentation State Label, Description and Name Interface */ /** returns a label for the presentation state. * If no label is available, NULL is returned. * @return a pointer to a string or NULL. */ const char *getPresentationLabel(); /** returns a description for the presentation state. * If no description is available, NULL is returned. * @return a pointer to a string or NULL. */ const char *getPresentationDescription(); /** returns the creator's name for the presentation state. * If no name is available, NULL is returned. * @return a pointer to a string or NULL. */ const char *getPresentationCreatorsName(); /** sets the presentation state label. * The passed string must be a valid DICOM Code String * (i.e. max 16 characters, only uppercase and numbers). * @param label the new presentation state label * @return EC_Normal upon success, an error code otherwise. */ OFCondition setPresentationLabel(const char *label); /** sets the presentation state description. * The passed string must be a valid DICOM Long String * (i.e. max 64 characters, no backslash or control chars). * @param descr the new presentation state description * @return EC_Normal upon success, an error code otherwise. */ OFCondition setPresentationDescription(const char *descr); /** sets the presentation state creator's name. * The passed string must be a valid DICOM Person Name String * (see NEMA PS3.5:1998). * @param name the new creator's name * @return EC_Normal upon success, an error code otherwise. */ OFCondition setPresentationCreatorsName(const char *name); /* specific character set */ /** sets the specific character set for this presentation state. * @param charset the new character set for this text object * @return EC_Normal if successful, an error code otherwise. */ OFCondition setCharset(DVPScharacterSet charset); /** gets the specific character set for this presentation state. * @return character set identifier */ DVPScharacterSet getCharset(); /** gets the specific character set string for this presentation state. * @return character set if present, NULL otherwise */ const char *getCharsetString(); /* graphic layers */ /** sorts the graphic layers according to * the graphic layer order. Layers with lower order have lower * indices after sorting which means that the layers can be * drawn to the screen in ascending index order. * Calling this routine may result in a re-numbering * of the graphic layer orders in a way that does not affect * their sequence. */ void sortGraphicLayers(); /** returns the number of graphic layers. * @return number of graphic layers */ size_t getNumberOfGraphicLayers(); /** gets the unique name of the graphic * layer with the given index. If no layer for the given * index exists, NULL is returned. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @return name of the graphic layer */ const char *getGraphicLayerName(size_t idx); /** gets the index of the graphic * layer with the given unique name. If no matching layer * is found, DVPS_IDX_NONE is returned. * @param name name of the graphic layer * @return index of the graphic layer */ size_t getGraphicLayerIndex(const char *name); /** gets a description string for the graphic * layer with the given index. If no layer for the given * index exists, or if the description is empty, NULL is returned. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @return description of the graphic layer */ const char *getGraphicLayerDescription(size_t idx); /** checks whether a recommended display value (grayscale, color or both) for the given graphic layer exists. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @return OFTrue if a recommended display value exists */ OFBool haveGraphicLayerRecommendedDisplayValue(size_t idx); /** gets the recommended grayscale display value for the given graphic layer. * If the graphic layer contains an RGB display value but no grayscale * display value, the RGB value is implicitly converted to grayscale. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @param gray the recommended display value as an unsigned 16-bit P-value * is returned in this parameter. * @return EC_Normal upon success, an error code otherwise */ OFCondition getGraphicLayerRecommendedDisplayValueGray(size_t idx, Uint16& gray); /** gets the recommended RGB display value for the given graphic layer. * If the graphic layer contains a grayscale display value but no RGB * display value, the grayscale value is implicitly converted to RGB. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @param r returns the R component of the recommended display value as unsigned 16-bit P-value * @param g returns the G component of the recommended display value as unsigned 16-bit P-value * @param b returns the B component of the recommended display value as unsigned 16-bit P-value * @return EC_Normal upon success, an error code otherwise */ OFCondition getGraphicLayerRecommendedDisplayValueRGB(size_t idx, Uint16& r, Uint16& g, Uint16& b); /** set graphic layer recommended grayscale display value for the given graphic layer. * This method does not affect (set or modify) the recommended RGB display value * which should be set separately. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @param gray the recommended display value as an unsigned 16-bit P-value * @return EC_Normal upon success, an error code otherwise */ OFCondition setGraphicLayerRecommendedDisplayValueGray(size_t idx, Uint16 gray); /** set graphic layer recommended RGB display value for the given graphic layer. * This method does not affect (set or modify) the recommended grayscale display value * which should be set separately. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @param r the R component of the recommended display value as unsigned 16-bit P-value * @param g the G component of the recommended display value as unsigned 16-bit P-value * @param b the B component of the recommended display value as unsigned 16-bit P-value * @return EC_Normal upon success, an error code otherwise */ OFCondition setGraphicLayerRecommendedDisplayValueRGB(size_t idx, Uint16 r, Uint16 g, Uint16 b); /** removes recommended display values for the given graphic layer. * @param rgb if true, the RGB recommended display value is removed * @param monochrome if true the monochrome recommended display value is removed */ void removeGraphicLayerRecommendedDisplayValue(size_t idx, OFBool rgb, OFBool monochrome); /** assigns a new unique name to the given graphic layer. * The new name must be unique, otherwise an error code is returned. * Upon success, all references (for graphic annotations, curves and overlays) to the given * graphic layer are also renamed so that the presentation state remains * consistent. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @param name the new name of the graphic layer. Must be a valid DICOM Code String. * @return EC_Normal upon success, an error code otherwise */ OFCondition setGraphicLayerName(size_t idx, const char *name); /** sets a new description to the given graphic layer. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @param descr description of the graphic layer. Must be a valid DICOM Long String. * @return EC_Normal upon success, an error code otherwise */ OFCondition setGraphicLayerDescription(size_t idx, const char *descr); /** makes a graphic layer the highest layer for display. * This method assigns a graphic layer order higher than all * existing graphic layer orders to the given graphic layer, * sorts and renumbers the list of graphic layers. Upon success, * the given graphic layer is guaranteed to have the new index * (getNumberOfGraphicLayers()-1). * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @return EC_Normal upon success, an error code otherwise */ OFCondition toFrontGraphicLayer(size_t idx); /** makes a graphic layer the lowest layer for display. * This method assigns a graphic layer order lower than all * existing graphic layer orders to the given graphic layer, * sorts and renumbers the list of graphic layers. Upon success, * the given graphic layer is guaranteed to have the new index 0. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @return EC_Normal upon success, an error code otherwise */ OFCondition toBackGraphicLayer(size_t idx); /** exchanges the layer order of the two graphic layers with * the given indices. This method does not sort or renumber * the graphic layers. * @param idx1 index of the first graphic layer, must be < getNumberOfGraphicLayers() * @param idx2 index of the second graphic layer, must be < getNumberOfGraphicLayers() * @return EC_Normal upon success, an error code otherwise */ OFCondition exchangeGraphicLayers(size_t idx1, size_t idx2); /** creates a new graphic layer with the given * name and optional description. * The new name must be unique, otherwise an error code is returned. * The toFrontGraphicLayer() method is implicitly called for the new layer. * @param gLayer the name of the graphic layer. Must be a valid DICOM Code String. * @param gLayerDescription the optional description of the graphic layer. * Must be a valid DICOM Long String. * @return EC_Normal upon success, an error code otherwise */ OFCondition addGraphicLayer( const char *gLayer, const char *gLayerDescription=NULL); /* text objects */ /* graphic objects */ /* curves */ /** returns the number of curve activations for the given * graphic layer. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @return number of curves */ size_t getNumberOfCurves(size_t layer); /** deletes the curve activation with the given index * on the given layer. * @param layer index of the graphic layer, must be < getNumberOfGraphicLayers() * @param idx index of the curve activation, must be < getNumberOfCurves(layer) * @return EC_Normal upon success, an error code otherwise */ OFCondition removeCurve(size_t layer, size_t idx); /** moves the curve activation with the given index on the given * layer to a different layer. * @param old_layer index of the graphic layer on which the curve is, * must be < getNumberOfGraphicLayers() * @param idx index of the curve activation, must be < getNumberOfCurves(layer) * @param new_layer index of the graphic layer to which the curve is moved, * must be < getNumberOfGraphicLayers() * @return EC_Normal upon success, an error code otherwise */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -