ImageGear for C and C++ on Windows v21.0 - Updated
API Reference Guide / MD Component API Reference / MD Component Functions Reference / Data Set Functions / MED_DCM_DS_curr_data_get_string
In This Topic
    MED_DCM_DS_curr_data_get_string
    In This Topic

    This function gets the data from the Current Data Element, and always returns it to you as a NULL-terminated character string.

    Declaration:

     
    Copy Code
    BOOL ACCUAPI MED_DCM_DS_curr_data_get_string (
           const HIGEAR hIGear, 
           LPCHAR lpString, 
           const DWORD size_of_lpstring
    );
    

    Arguments:

    Name Type Description
    hIGear const HIGEAR HIGEAR handle to the image from which to get data.
    lpString LPCHAR A far pointer to a memory location that will be filled with the data from the Current Data Element as a NULL-terminated character string.
    size_of_lpString const DWORD The variable which tells the function the length of lpString, in bytes, expressed as a DWORD. If you specify a string length that is not long enough to hold the data, the data will simply be truncated.

    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.

    Remarks:

    The marker to the Current Data Element can be moved using one of the MED_DCM_DS_move_...() functions.

    Data Elements can be of many different data types (int, word, bytes, float, double, string, etc.), but this function will always convert the data to a string. To return the data in its "natural form", use MED_DCM_DS_curr_data_get().