-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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.