Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Return empty EcgSeries if EGC is not available #136

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

forderud
Copy link
Member

@forderud forderud commented Jun 22, 2019

Proposal to clarify API documentation as requested in #115.

I don't really have any preference on if lack of ECG should be reported as E_FAIL (or other error code) and/or an empty ECG struct, so we can just as well fail if there's a request for that.

@jogerh
Copy link

jogerh commented Jun 24, 2019

Would an S_FALSE success code make more sense here?

@@ -294,7 +294,7 @@ interface IImage3dSource : IUnknown {
[helpstring("Retrieve color-map table for mapping image intensities to RGBx values. Length is 256.")]
HRESULT GetColorMap ([out,retval] SAFEARRAY(unsigned int) * map);

[helpstring("Get ECG data if available [optional]")]
[helpstring("Get ECG data if available [optional]. Shall return S_OK with an empty EcgSeries if EGC is not available.")]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EcgSeries could meaningfully be used to transfer only trig points, without ECG trace. DICOM files typically only contain the R-wave times, not the trace values. EcgSeries samples could also benefit from a document update to highlight this.

In addition, it may be cases where a loader returns trig points where some intervals contain no frames. This could be the case for multi-cycle acquisitions, where the full volume is composed of data acquired over multiple cycles. It would then be expected behavior for a loader to return trig intervals without frames. A client that displays QRS/trig points and/or trace could then benefit from trimming the displayed data. The documentation could be updated to highlight this.

@forderud
Copy link
Member Author

Would an S_FALSE success code make more sense here?

The challenge with S_FALSE is that languages like C# and Python report it just like S_OK. As far as I know, it's therefore not possible to detect S_FALSE specifically from these languages. See https://blogs.msdn.microsoft.com/jaredpar/2005/10/14/getting-hresults-back-from-com-interop-calls/ for more info.

@jogerh
Copy link

jogerh commented Aug 5, 2019

Further doc update will be addressed by #139

@forderud forderud merged commit 02cf934 into MedicalUltrasound:master Aug 5, 2019
@forderud forderud deleted the GetECG-doc branch August 5, 2019 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants