ImageGear for C and C++ on Windows v19.4 - Updated
MED_PS_extract
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Presentation State Functions > MED_PS_extract

This function adds Presentation State tags to the DataSet of hIGearPresState, based on the display settings of hIGear, an ART marks attached to it.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_PS_extract (
        HIGEAR hIGear, 
        HIGEAR hIGearPresState, 
        DWORD dwFeatureFlags, 
        DWORD dwGrpID 
);

Arguments:

Name Type Description
hIGear HIGEAR Image whose settings should be exported to PS.
hIGearPresState HIGEAR Image that will contain Presentation State DataSet.
dwFeatureFlags DWORD Tells which features of PS to export - bit mask.
dwGrpID DWORD Display Group ID.

Return Value:

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

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Remarks:

If any of the tags are already present in the hIGearPresState, they are overwritten.

This function may add/update the following tags/sequences in the hIGearPresState:

To create a new presentation state DataSet, use the following steps:

  1. Call IG_image_create_DIB_ex() with lCompression set to IG_BI_EMPTY.
  2. Call MED_PS_extract() to add Presentation State tags.
  3. Add the other tags required by the Presentation State module using general DataSet access functions.
  4. Save Presentation State to file using IG_fltr_save_file() or similar functions.

To modify an existing Presentation State DataSet, use the following steps:

  1. Load a Presentation State DataSet using IG_fltr_load_file() or similar functions.
  2. Apply the Presentation State to a DICOM image, using MED_PS_apply().
  3. Change display settings or ART marks.
  4. Extract Presentation Data from DICOM image back to Presentation State DataSet.
  5. Save Presentation State to file using IG_fltr_save_file() or similar functions.

Use MED_PS_pres_LUT_set() to add Presentation LUT to the Presentation State HIGEAR.

Use general DataSet functions to add VOI and Modality LUT to the Presentation State HIGEAR.

Use ImageGear image saving functions (nFormat=IG_FORMAT_DCM) to save lphIGearPresState into a presentation state file (.pre).