ImageGear for C and C++ on Linux v18.8 - Updated
MED_DCM_DS_PixPadVal_get
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Functions > MED_DCM_DS_PixPadVal_get

This function retrieves the Pixel Padding Value (PPV) that is being used for the display of 16-bit grayscale images.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_DCM_DS_PixPadVal_get(
        HIGEAR hIGear, 
        LPBOOL lpUse_Pix_Padding, 
        LPLONG lpPix_Padding_Val, 
        LPBYTE lpShow_PPV_as
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image for which you would like to set the value of the "Pixel Padding Value" Data Element (0028,0120).
lpUse_Pix_Padding LPBOOL Returns TRUE if the value of Pixel Padding Value (0028,0120) will be used; FALSE if the value of Pixel Padding Value will be ignored.
lpPix_Padding_Val LPLONG Returns the grayscale value that will be used for padding. This value read is that which is stored in the Pixel Padding Value Data Element (0028,0120) of the internal Data Set.
lpShow_PPV_as LPBYTE Returns the grayscale value that will be used to display pixels equal to the Pixel Padding Value.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

This function does not process image pixels.

The image must have a DICOM DataSet attached to it. Use MED_DCM_DS_exists to check whether the image contains a DataSet.

Example:

 
Copy Code
AT_ERRCOUNT              nErrcount;
HIGEAR          hIGear;
LONG            Pix_Padding_Val;
BYTE            Show_PPV_as;
nErrcount = MED_DCM_DS_PixPadVal_get(g_hIGear, NULL, &Pix_Padding_Val, &Show_PPV_as);

Remarks:

This function also returns whether or not the PPV value will be used. The Pixel Padding Value is most often used to fill in the regions around a circular image. This function does not retrieve the PPV Data Element from the Data Set attached to the HIGEAR. It gets the value for PPV from the Internal Data Set (HDS) (which may be equal to the value in the actual Data Set). The purpose of this function is to let you know whether Pixel Padding is set on and off, what value it has, if any, and what color it is set to display as.

Please see the description for MED_DCM_DS_PixPadVal_set() for a complete description of how ImageGear handles the Pixel Padding Value Data Element.

To turn off the Pixel Padding Value or to alter the value being used use MED_DCM_DS_PixPadVal_set().