📄 dvpstat.h
字号:
* in the attached image. * If no description for the given index is available, NULL is returned. * @param idx index, must be < getNumberOfVOIWindowsInImage() * @return a pointer to a string or NULL. */ const char *getDescriptionOfVOIWindowsInImage(size_t idx); /** activates one of the VOI LUTs from the attached image. * The applicability of the activation is controlled by the applicability parameter. * @param idx index of the VOI transform, must be < getNumberOfVOILUTsInImage(). * @param applicability defines the applicability of the new VOI transform. * @return EC_Normal upon success, an error code otherwise. */ OFCondition setVOILUTFromImage(size_t idx, DVPSObjectApplicability applicability=DVPSB_currentImage); /** activates one of the VOI Windows from the attached image. * The applicability of the activation is controlled by the applicability parameter. * @param idx index of the VOI transform, must be < getNumberOfVOIWindowsInImage(). * @param applicability defines the applicability of the new VOI transform. * @return EC_Normal upon success, an error code otherwise. */ OFCondition setVOIWindowFromImage(size_t idx, DVPSObjectApplicability applicability=DVPSB_currentImage); /** sets a user defined VOI window center and width. * The applicability of the VOI window is controlled by the applicability parameter. * @param wCenter the window center * @param wWidth the window width * @param description an optional description. Default: absent. * @param applicability defines the applicability of the new VOI transform. * @return EC_Normal upon success, an error code otherwise. */ OFCondition setVOIWindow(double wCenter, double wWidth, const char *description=NULL, DVPSObjectApplicability applicability=DVPSB_currentImage); /** stores a VOI lookup table in the presentation state. * This method stores a VOI lookup table in the * presentation state and activates it. The LUT is copied to * the presentation state. * If the method returns an error code, an old LUT is left unchanged. * The applicability of the VOI LUT is controlled by the applicability parameter. * @param lutDescriptor the LUT Descriptor in DICOM format (VM=3) * @param lutData the LUT Data in DICOM format * @param lutExplanation the LUT Explanation in DICOM format, may be empty. * @param applicability defines the applicability of the new VOI transform. * @return EC_Normal if successful, an error code otherwise. */ OFCondition setVOILUT( DcmUnsignedShort& lutDescriptor, DcmUnsignedShort& lutData, DcmLongString& lutExplanation, DVPSObjectApplicability applicability=DVPSB_currentImage); /** deactivates the current VOI transformation. * The applicability of the deactivation is controlled by the applicability parameter. * After a call to this method, no VOI transform is active for the current image and frame. * @param applicability defines the applicability of the new VOI transform. */ void deactivateVOI(DVPSObjectApplicability applicability=DVPSB_currentImage); /** stores VOI lookup table with a gamma curve shape in the presentation state. * If a VOI window is currently active the center and width values are used to specify * the number of LUT entries and the first value mapped, otherwise the full pixel range * is used. The output range of the LUT is always 16 bit (data is stored as OW). * This method stores a VOI lookup table in the presentation state and activates it. * The LUT is copied to the presentation state. * If the method returns an error code, an old LUT is left unchanged. * The applicability of the VOI LUT is controlled by the applicability parameter. * @param gammaValue gamma value used to create the VOI LUT data * @param applicability defines the applicability of the new VOI transform. * @return EC_Normal if successful, an error code otherwise. */ OFCondition setGammaVOILUT(double gammaValue, DVPSObjectApplicability applicability=DVPSB_currentImage); /** gets the presentation size mode for the current image and frame. * This method may only be called when an image is attached to the presentation state. * @return presentation size mode */ DVPSPresentationSizeMode getDisplayedAreaPresentationSizeMode(); /** gets the presentation pixel aspect ratio for for the current image and frame. * Pixel aspect ratio is defined here as the width of a pixel divided * by the height of a pixel (x/y). * This method may only be called when an image is attached to the presentation state. * @return pixel aspect ratio */ double getDisplayedAreaPresentationPixelAspectRatio(); /** gets the displayed area top lefthand corner and * bottom righthand corner for the current potentially rotated and flipped image and frame. * This method may only be called when an image is attached to the presentation state. * @param tlhcX the displayed area top lefthand corner X value is returned in this parameter * @param tlhcY the displayed area top lefthand corner Y value is returned in this parameter * @param brhcX the displayed area bottom righthand corner X value is returned in this parameter * @param brhcY the displayed area bottom righthand corner Y value is returned in this parameter * @return EC_Normal if successful, an error code otherwise. */ OFCondition getStandardDisplayedArea(Sint32& tlhcX, Sint32& tlhcY, Sint32& brhcX, Sint32& brhcY); /** gets the displayed area top lefthand corner and * bottom righthand corner for the current image and frame, as if the image was unrotated * This method may only be called when an image is attached to the presentation state. * @param tlhcX the displayed area top lefthand corner X value is returned in this parameter * @param tlhcY the displayed area top lefthand corner Y value is returned in this parameter * @param brhcX the displayed area bottom righthand corner X value is returned in this parameter * @param brhcY the displayed area bottom righthand corner Y value is returned in this parameter * @return EC_Normal if successful, an error code otherwise. */ OFCondition getImageRelativeDisplayedArea(Sint32& tlhcX, Sint32& tlhcY, Sint32& brhcX, Sint32& brhcY); /** gets the presentation pixel spacing for the current image and frame if it is known. * @param x the horizontal pixel spacing (mm) is returned in this parameter upon success * @param y the vertical pixel spacing (mm) is returned in this parameter upon success * @return EC_Normal if successful, an error code if no presentation pixel spacing is available. */ OFCondition getDisplayedAreaPresentationPixelSpacing(double& x, double& y); /** gets the presentation pixel magnification ratio for the current image and frame if it is present. * @param magnification the magnification ratio is returned in this parameter upon success * @return EC_Normal if successful, an error code if no magnification ratio is available. */ OFCondition getDisplayedAreaPresentationPixelMagnificationRatio(double& magnification); /** checks if "TRUE SIZE" can be used as presentation size mode for the current image and frame * (i.e. pixel spacing is known). * @return OFTrue if TRUE SIZE mode is available, OFFalse otherwise. */ OFBool canUseDisplayedAreaTrueSize(); /** sets the displayed area and size mode (for the current frame, the current image * or all images referenced by the presentation state object). * @param sizeMode presentation size mode. * @param tlhcX displayed area top lefthand corner X * @param tlhcY displayed area top lefthand corner Y * @param brhcX displayed area bottom righthand corner X * @param brhcY displayed area bottom righthand corner Y * @param magnification magnification factor - ignored unless sizeMode==DVPSD_magnify. * @param applicability defines the applicability of the new displayed area definition. * Possible choices are: DVPSB_currentFrame - current frame only, * DVPSB_currentImage - all frames of current image (default), * and DVPSB_allImages - all images referenced by this presentation state. * The last choice should be used with care * because it will also cause the pixel spacing or pixel aspect ratio of the current image * to be applied to all images referenced by the presentation state. * @return EC_Normal if successful, an error code otherwise. */ OFCondition setStandardDisplayedArea( DVPSPresentationSizeMode sizeMode, Sint32 tlhcX, Sint32 tlhcY, Sint32 brhcX, Sint32 brhcY, double magnification=1.0, DVPSObjectApplicability applicability=DVPSB_currentImage); /** sets the displayed area and size mode (for the current frame, the current image * or all images referenced by the presentation state object). * Treats the image as if it was neither rotated nor flipped. * @param sizeMode presentation size mode. * @param tlhcX displayed area top lefthand corner X * @param tlhcY displayed area top lefthand corner Y * @param brhcX displayed area bottom righthand corner X * @param brhcY displayed area bottom righthand corner Y * @param magnification magnification factor - ignored unless sizeMode==DVPSD_magnify. * @param applicability defines the applicability of the new displayed area definition. * Possible choices are: DVPSB_currentFrame - current frame only, * DVPSB_currentImage - all frames of current image (default), * and DVPSB_allImages - all images referenced by this presentation state. * The last choice should be used with care * because it will also cause the pixel spacing or pixel aspect ratio of the current image * to be applied to all images referenced by the presentation state. * @return EC_Normal if successful, an error code otherwise. */ OFCondition setImageRelativeDisplayedArea( DVPSPresentationSizeMode sizeMode, Sint32 tlhcX, Sint32 tlhcY, Sint32 brhcX, Sint32 brhcY, double magnification=1.0, DVPSObjectApplicability applicability=DVPSB_currentImage); /** deactivates display shutter of given type. * After a call to this method haveShutter(type) will return OFFalse. * @param type the shutter type */ void removeShutter(DVPSShutterType type); /** sets and activates rectangular display shutter. * If a bitmap shutter is exists, it is deactivated if this * method returns successfully. If no shutter display value exists, * a default of 0 (black) is set. * @param lv the left vertical edge * @param rv the right vertical edge * @param uh the upper horizontal edge * @param lh the lower horizontal edge * @return EC_Normal upon success, an error code otherwise. */ OFCondition setRectShutter(Sint32 lv, Sint32 rv, Sint32 uh, Sint32 lh); /** sets and activates circular display shutter. * If a bitmap shutter is exists, it is deactivated if this * method returns successfully. If no shutter display value exists, * a default of 0 (black) is set. * @param centerX the X component of the shutter center * @param centerY the Y component of the shutter center * @param radius the (horizontal) radius of the shutter * @return EC_Normal upon success, an error code otherwise. */ OFCondition setCircularShutter(Sint32 centerX, Sint32 centerY, Sint32 radius); /** sets polygonal display shutter point. * This method adds a point to the polygonal display shutter, * which must already have at least an origin. * If the point set with this method is identical to the * origin of the shutter, the shutter is activated and * a possible bitmap shutter is deactivated. If no shutter display value exists, * a default of 0 (black) is set. * @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 addPolyShutterVertex(Sint32 x, Sint32 y); /** removes and deletes a graphic layer. All text, graphic, curve * and overlay objects on this graphic layer are also deleted or deactivated, respectively. * @param idx index of the graphic layer, must be < getNumberOfGraphicLayers() * @return EC_Normal upon success, an error code otherwise */ OFCondition removeGraphicLayer(size_t idx); /** returns the number of text objects for the given * graphic layer. * Only the objects that are applicable to the current (attached) image * and the selected frame number are used by this method. * @param layer index of the graphic layer, must be < getNumberOfGraphicLayers() * @return number of text objects */ size_t getNumberOfTextObjects(size_t layer); /** gets the text object with the given index * on the given layer. If the text object or the graphic layer does * not exist, NULL is returned. * Only the objects that are applicable to the current (attached) image * and the selected frame number are used by this method. * @param layer index of the graphic layer, must be < getNumberOfGraphicLayers() * @param idx index of the text object, must be < getNumberOfTextObjects(layer) * @return a pointer to the text object */ DVPSTextObject *getTextObject(size_t layer, size_t idx); /** creates a new text object on the given layer. * Returns a pointer to the new text object. * If the creation of the text object fails or if the graphic layer * does not exist, NULL is returned. * @param layer index of the graphic layer, must be < getNumberOfGraphicLayers() * @param applicability defines to which images/frames the new object applies. * Default: all images referenced by the presentation state. * @return a pointer to the new text object
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -