Skip to content

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

@jazb83

Description

@jazb83

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions