Products Downloads Order Support

LEAD DICOM DirectShow Read Filter

Information for developers:

Filter Interface ILTDicRdDisp
Interface ID IID_ILTDicRdDisp
Input/output Media Type Major output type is MEDIATYPE_Video
Filter CLSID CLSID_LTDicRd
Property Page CLSID CLSID_LTDicRdPropertyPage
Filter category  
Executable LTDicRd.dll
Header ILTDicRd.h

 


 

ILTDicRdDisp Interface

User Interface

LEAD 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:

Frame time = 1000 / Frame rate
or
Frame rate = 1000 / Frame time

For example, for a frame rate of 30 fps, you must enter 33 for the frame time.
If this box is not checked, then the frames are displayed as fast as they are extracted from the file.

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).

Back To Top


 

Interface properties:

HRESULT put_InputFileName(const OLECHAR *pszFileName)

Parameters

pszFileName pointer to an OLECHAR string the contains the input DICOM file.

Description

Sets 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:

· If the filter output pin is already connected.

· If a user dataset is initialized.

· If the input file contains no pixel data.

· The input file is not a valid DICOM file.

The input file name must not exceed the maximum length allowed for a file name (260 characters).

Returns

S_OK if connected, or another error code otherwise.

 

Back To Top

HRESULT get_InputFileName(OLECHAR **ppszFileName)

Parameters

ppszFileName address of a pointer to the OLECHAR string to be updated with the DICOM input file name.

Description

Retrieves the input file name. The function allocates memory for the string and it is the user's responsibility to free it using SysFreeString().

Returns

S_OK if connected, or another error code otherwise.

 

Back To Top

HRESULT get_ConnectionState(BOOL* pbConnected)

Parameters

pbConnected pointer to a variable to be updated with the connection state of the output pin; TRUE if connected and FALSE if not.

Description

Determines whether the output pin is connected.

Returns

S_OK if successful, or another error code otherwise.

 

Back To Top

HRESULT get_DicomDS(long * pDS)

Parameters

pDS 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.

Description

Retrieves the current initialized DICOM dataset.

Returns

S_OK if successful, or another error code otherwise.

 

Back To Top

HRESULT put_FrameTime(long lFrameTime)

Parameters

lFrameTime new frame time value in milliseconds

Description

Sets 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).

Returns

S_OK.

 

Back To Top

HRESULT get_FrameTime(long * lFrameTime)

Parameters

lFrameTime pointer to a variable to be updated with the current frame time.

Description

Retrieves the frame time in milliseconds, the time each frame is displayed while playing the PixelData.

Returns

S_OK if successful, or another error code otherwise.

 

Back To Top

HRESULT put_FrameControl(BOOL bEnableFrameControl)

Parameters

bEnableFrameControl flag that indicates the frame control state. TRUE to enable frame control.

Description

Sets 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.

Returns

S_OK.

 

Back To Top

HRESULT get_FrameControl(BOOL *bEnableFrameControl)

Parameters

bEnableFrameControl pointer to a variable to be updated with the current state of frame control. If TRUE, frame control is enabled.

Description

Retrieves the frame control state.

Returns

S_OK if successful, or another error code otherwise.

 

Back To Top

HRESULT put_FrameDropping(BOOL bEnableFrameDropping)

Parameters

bEnableFrameDropping 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.

Description

This 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).

Returns

S_OK.

 

Back To Top

HRESULT get_FrameDropping(BOOL *pbEnableFrameDropping)

Parameters

pbEnableFrameDropping 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.

Description

This function returns the current state of the frame dropping feature.

Returns

If the input pointer is invalid the function returns E_INVALIDARG, else it returns S_OK.

 

Back To Top


 

Interface methods:

HRESULT SetDicomDS(long * pDS, int bCopy)

Parameters

pDS pointer to the LEADTOOLS DICOM dataset.
bCopy flag that indicates whether the filter should make a copy of the passed dataset for future use. If TRUE (1) then the filter will make a copy of the dataset allocating memory for it, and maintaining responsibility for freeing this memory. If FALSE (0), then the user should take care of the pointer life assuring its availability for the writer as long as it is needed.

Description

Sets 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.

Returns

S_OK if successful, or another error code otherwise.

Back To Top

 

LEADTOOLS Sales: 704-332-5532 | sales@leadtools.com
LEADTOOLS Support: 704-372-9681 |
support@leadtools.com

Products | Downloads | Order | Support | Corporate | News

Copyright © 2008 All Rights Reserved. LEAD Technologies, Inc