|
|
|||||||||||||||||||||||
| |
|||||||||||||||||||||||
ILTDicRdDisp InterfaceUser InterfaceLEAD DICOM File Read Property Page
The DICOM File Reader Filter property page
provides a UI approach to reading DICOM files, including
settings for selecting the playback speed. It contains the
following elements: Input file name edit box: This edit box contains the input file name. It will be disabled after the output pin is connected. The button to the right of the edit box invokes the Open dialog to help the user browse for an input file; this button will be disabled after the output pin is connected. Enable frame time control check box: This check box toggles the frame rate control state. If this box is checked, then each frame will be displayed for the amount of time in the edit box next to it. If the file contains information about the playback speed, the information is used. If not, then a default of 25 ms/frame is used. The relationship between Frame time and Frame rate is given below:
For example, for a frame rate of 30 fps, you
must enter 33 for the frame time. Frame time spin box: Changes the frame
time, in milliseconds. This box is enabled only if the Enable
frame time control check box is checked. Enable Frame Dropping check box: This check box toggles the frame dropping state. This is used only if "Enable Frame Time Control" is checked. If the "Enable Frame Time Control" box is not checked, this box is ignored. If the "Enable Frame Dropping" box is checked, then frames can be dropped to maintain the desired playback speed. This can happen with slow computers or when the input file is on a slow medium (for example a slow CD).
Interface properties:HRESULT put_InputFileName(const OLECHAR *pszFileName)ParameterspszFileName pointer to an OLECHAR string the contains the input DICOM file. DescriptionSets the input file name. If pszFileName is NULL, the function sets the input file name to blank. In this case there is no source for pixel data (video stream) and consequently, the reader output pin will fail to connect. The function fails in the following conditions:
The input file name must not exceed the maximum length allowed for a file name (260 characters). ReturnsS_OK if connected, or another error code otherwise.
HRESULT get_InputFileName(OLECHAR **ppszFileName)ParametersppszFileName address of a pointer to the OLECHAR string to be updated with the DICOM input file name. DescriptionRetrieves the input file name. The function allocates memory for the string and it is the user's responsibility to free it using SysFreeString(). ReturnsS_OK if connected, or another error code otherwise.
HRESULT get_ConnectionState(BOOL* pbConnected)ParameterspbConnected pointer to a variable to be updated with the connection state of the output pin; TRUE if connected and FALSE if not. DescriptionDetermines whether the output pin is connected. ReturnsS_OK if successful, or another error code otherwise.
HRESULT get_DicomDS(long * pDS)ParameterspDS address of a pointer to be updated with the dataset. You must typecast this pointer to LDicomDS before using it. Making changes to the dataset after the filter is connected may cause the reader to work improperly. DescriptionRetrieves the current initialized DICOM dataset. ReturnsS_OK if successful, or another error code otherwise.
HRESULT put_FrameTime(long lFrameTime)ParameterslFrameTime new frame time value in milliseconds DescriptionSets the frame time in milliseconds. The frame time is the time each frame is displayed while playing the PixelData. Possible values are between 20 and 1000. However, the Frame Control feature must be enabled in order to control the frame time (play speed), otherwise, the stream will play at frame time = 40 millisecond (25 frames per second). ReturnsS_OK.
HRESULT get_FrameTime(long * lFrameTime)ParameterslFrameTime pointer to a variable to be updated with the current frame time. DescriptionRetrieves the frame time in milliseconds, the time each frame is displayed while playing the PixelData. ReturnsS_OK if successful, or another error code otherwise.
HRESULT put_FrameControl(BOOL bEnableFrameControl)ParametersbEnableFrameControl flag that indicates the frame control state. TRUE to enable frame control. DescriptionSets the frame control state. If the state is on (TRUE), then the user can change the frame time using put_FrameTime or using the property page. ReturnsS_OK.
HRESULT get_FrameControl(BOOL *bEnableFrameControl)ParametersbEnableFrameControl pointer to a variable to be updated with the current state of frame control. If TRUE, frame control is enabled. DescriptionRetrieves the frame control state. ReturnsS_OK if successful, or another error code otherwise.
HRESULT put_FrameDropping(BOOL bEnableFrameDropping)ParametersbEnableFrameDropping flag that indicates the state of the frame dropping feature of DICOM Reader filter to set. If bEnableFrameDropping is TRUE then the frame dropping feature is enabled, else it is disabled. DescriptionThis function sets the frame dropping feature, which enables the filter to drop some frames in order to maintain the frame speed the user needs. If the user needs every frame in the DICOM file she or he should set this feature to FALSE (0). ReturnsS_OK.
HRESULT get_FrameDropping(BOOL *pbEnableFrameDropping)ParameterspbEnableFrameDropping pointer to a variable to be updated with the current state of the frame dropping feature. If the frame dropping feature is enabled, the returned parameter value is TRUE, else its value is FALSE. DescriptionThis function returns the current state of the frame dropping feature. ReturnsIf the input pointer is invalid the function returns E_INVALIDARG, else it returns S_OK.
Interface methods:HRESULT SetDicomDS(long * pDS, int bCopy)Parameters
DescriptionSets the DICOM dataset. This function fails if the reader is already connected, or if the dataset contains no pixel data, or if the pixel data could not be read properly. You should also call this method with pDS set to NULL to stop the reader from using the dataset and before freeing the dataset memory. ReturnsS_OK if successful, or another error code otherwise.
LEADTOOLS Sales:
704-332-5532 | sales@leadtools.com |
|||||||||||||||||||||||
|