Skip to content

Commit 8daae40

Browse files
author
Fredrik Orderud
committed
API: Introduce a new IImage3dStream interface to also support color-flow data.
Proposal to extend the API to also support display of color-flow data, in addition to tissue. This is intended to be a simple representation that is compatible with the way color-flow data is processed by any vendor. Please note that the color-flow appearance is unlikely to exactly match the appearance on the original system, since the "internal" vendor encoding and algorithms are likely to be more advanced. The goal is therefore to get visual appearance that is fairly close to the original. Integration of this extension will probably require bidirectional code for converting between the "internal" vendor encoding and the Image3dAPI encoding of flow data.
1 parent 862343e commit 8daae40

2 files changed

Lines changed: 36 additions & 7 deletions

File tree

Image3dAPI/IImage3d.idl

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ enum Image3dAPIVersion {
2222
} Image3dAPIVersion;
2323

2424

25+
typedef [
26+
v1_enum, // 32bit enum size
27+
helpstring("Enum of supported image types (extended upon demand).")]
28+
enum ImageType {
29+
IMAGE_TYPE_INVALID = 0, ///< make sure that "cleared" state is invalid
30+
IMAGE_TYPE_TISSUE = 1, ///< grayscale B-mode image
31+
IMAGE_TYPE_BLOOD_VEL = 2, ///< blood velocities (color-flow) (rel. to probe)
32+
} ImageType;
33+
2534
typedef [
2635
v1_enum, // 32bit enum size
2736
helpstring("Enum of supported image formats (extended upon demand).")]
@@ -285,21 +294,40 @@ cpp_quote("#else")
285294
cpp_quote("static_assert(sizeof(EcgSeries) == 2*8+2*4, \"EcgSeries size mismatch\");")
286295
cpp_quote("#endif")
287296

297+
298+
[object,
299+
oleautomation, // use "automation" marshaler (oleaut32.dll)
300+
uuid(D7D2A41A-F738-41EB-8133-1B06DDA1FF40),
301+
helpstring("3D image stream interface. Used to group frames sharing a common type (e.g. tissue or color-flow).")]
302+
interface IImage3dStream : IUnknown {
303+
[helpstring("Get stream type.")]
304+
HRESULT GetType ([out, retval] ImageType * type);
305+
306+
[helpstring("Get the number of frames available")]
307+
HRESULT GetFrameCount ([out, retval] unsigned int * size);
308+
309+
[helpstring("Get the time of all frames (useful for matching frame indices to ECG before retrieving image data) ")]
310+
HRESULT GetFrameTimes ([out, retval] SAFEARRAY(double) * frame_times);
311+
312+
[helpstring("Get image data (const) for a given frame within a specified geometry")]
313+
HRESULT GetFrame ([in] unsigned int index, [out, retval] Image3d * data);
314+
};
315+
316+
288317
[ object,
289318
oleautomation, // use "automation" marshaler (oleaut32.dll)
290319
uuid(D483D815-52DD-4750-8CA2-5C6C489588B6),
291320
helpstring("Interface for retrieving 3D image data.")]
292321
interface IImage3dSource : IUnknown {
293-
[helpstring("Get the number of frames available")]
294-
HRESULT GetFrameCount ([out,retval] unsigned int * size);
322+
[helpstring("Get the number of streams available.")]
323+
HRESULT GetStreamCount ([out, retval] unsigned int * size);
295324

296-
[helpstring("Get the time of all frames (useful for matching frame indices to ECG before retrieving image data) ")]
297-
HRESULT GetFrameTimes ([out, retval] SAFEARRAY(double) * frame_times);
325+
[helpstring("Get cartesian image stream. The geometry and resolution arguments are advisory, and might not be honored.\n"
326+
"Clients should therefore check the actual geometry and resolution of the retrieved stream afterwards.")]
327+
HRESULT GetStream ([in] int index, [in] Cart3dGeom geom, [in] unsigned int max_resolution[3], [out, retval] IImage3dStream ** stream);
298328

299-
[helpstring("Get image data (const) for a given frame within a specified geometry")]
300-
HRESULT GetFrame ([in] unsigned int index, [in] Cart3dGeom geom, [in] unsigned short max_resolution[3], [out,retval] Image3d * data);
301329

302-
[helpstring("Get a bounding box encapsulating all image data. Can be used as intput to GetFrame to avoid cropping.")]
330+
[helpstring("Get a bounding box encapsulating all image data. Can be used as intput to GetStream to avoid cropping.")]
303331
HRESULT GetBoundingBox ([out,retval] Cart3dGeom * geom);
304332

305333
[helpstring("Retrieve color-map table for mapping image intensities to RGBx values. Length depend on format.")]

Image3dAPI/UNREGISTER_Image3dAPI.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ reg delete "HKCR\TypeLib\{3ff1aab8-f3d8-33d4-825d-00104b3646c0}" /f 2> NUL
1414

1515
for %%P in (32 64) do (
1616
:: IImage3d.idl
17+
reg delete "HKCR\Interface\{D7D2A41A-F738-41EB-8133-1B06DDA1FF40}" /f /reg:%%P 2> NUL
1718
reg delete "HKCR\Interface\{D483D815-52DD-4750-8CA2-5C6C489588B6}" /f /reg:%%P 2> NUL
1819
reg delete "HKCR\Interface\{CD30759B-EB38-4469-9CA5-4DF75737A31B}" /f /reg:%%P 2> NUL
1920
)

0 commit comments

Comments
 (0)