LDicomDS::SetPresStateInfo

#include "Ltdic.h"

L_UINT16 LDicomDS::SetPresStateInfo(pPresState)

pDICOMPRESSTATEINFO pPresState;

/* pointer to a structure */

Sets the attributes of the "Presentation State Module".

Parameter

Description

pPresState

Pointer to a "Presentation State Module" attributes structure.

Returns

0

SUCCESS

>0

An error occurred. Refer to Return Codes.

Comments

This function will set the attributes of the "Presentation State Module". Before calling this function, initialize pPresState->uStructSize to be sizeof(DICOMPRESSTATEINFO) and initialize all the members of the structure.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

LDicomDS::GetPresStateInfo, LDicomDS::AddPresStateImageRefByFileName, LDicomDS::AddPresStateImageRefByDS, LDicomDS::RemovePresStateImageRefBySOPInstance, LDicomDS::RemoveAllPresStateImageRefs, LDicomDS::GetPresStateImageRefSOPInstance, LDicomDS::GetPresStateImageRefCount, LDicomDS::FindFirstPresStateRefSeriesItem, LDicomDS::FindNextPresStateRefSeriesItem, LDicomDS::GetPresStateImageRefBySOPInstance

Topics:

Working with DICOM Annotations

Example

L_INT LDicomDS_SetPresStateInfoExample(LDicomDS& PresStateDS)
{
   L_INT                nRet;
   VALUEDATE            Date;
   VALUETIME            Time;
   DICOMPRESSTATEINFO   PresState;
   SYSTEMTIME           SysTime;
   GetSystemTime(&SysTime); 
   Date.nYear = SysTime.wYear; 
   Date.nMonth = SysTime.wMonth; 
   Date.nDay = SysTime.wDay; 
   Time.nHours = SysTime.wHour; 
   Time.nMinutes = SysTime.wMinute; 
   Time.nSeconds = SysTime.wSecond; 
   PresState.nInstanceNumber = 1; 
   PresState.pszPresLabel = TEXT("Label");
   PresState.pszPresDescription = TEXT("Description");
   PresState.pszPresCreator = TEXT("Creator");
   PresState.pPresCreationDate = &Date; 
   PresState.pPresCreationTime = &Time; 
   PresState.uStructSize = sizeof(DICOMPRESSTATEINFO); 
   nRet  = PresStateDS.SetPresStateInfo(&PresState); 
   if (nRet == DICOM_SUCCESS) 
   {
      MessageBox( NULL, 
                  TEXT("Presentation state has been successfully updated"), 
                  TEXT("Error"), 
                  MB_OK); 
   }
   return nRet;
}