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

API BOOK. Code 4.3 pag. 53. Error? #2

Open
jazb83 opened this issue Jun 5, 2019 · 0 comments
Open

API BOOK. Code 4.3 pag. 53. Error? #2

jazb83 opened this issue Jun 5, 2019 · 0 comments

Comments

@jazb83
Copy link

jazb83 commented Jun 5, 2019

Hello,

I tried to compile the code 4.3 of the API BOOK pag. 53. It compiled well.

However, this line of code is not useful:
// Filter series by modality , then create list of
var plans = series . Where (s => s. Modality == " RTPLAN "). SelectMany (ser => finder . FindImages (ser));

It always returns "null" because a plan does not have images (I guess).
If I change the code to:

var plans = series.Where(s => s.Modality == "RTPLAN").Select(ser => ser );

Then, I get back only the series that are "RTPLAN".

You have the same thing in code 4.5 pag. 55. The same goes for "RTDOSE" series in this line:
var doses = series.Where(s => s.Modality == "RTDOSE").SelectMany(ser => finder.FindImages(ser));
It should be:
var doses = series.Where(s => s.Modality == "RTDOSE").Select(ser => ser);

Cheers.

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

No branches or pull requests

1 participant