Determine Whether a Structure Is a Target or an Organ

There may are cases where you need to know whether a structure is a target, an organ, or something else. For example, you may want to calculate the NTCP for organs, TCP for targets, and ignore everything else.

As another example, when calculating biological dose metrics, you may want to apply a different α/β parameter for organs and targets.

In ESAPI, the Structure class has the string property DicomType, which may be any of the following (according to the documentation):

  • GTV
  • CTV
  • PTV

A structure is a target if it’s a GTV, CTV, or PTV, so the following method tests whether the given structure is a target:

For convenience, you can turn this method into an extension method (see Enhance ESAPI with Extension Methods).

The following method tests whether the given structure is an organ:

If you want to ignore anything that’s not a target or an organ, you can use the following method:

Note that in English, I said “not a target or an organ,” but in Boolean logic this translates to “not a target and not an organ.” If I had used or instead, the method would return true for an organ. The reason is that the !IsTarget(s) test is true for an organ, and true or anything is always true.

Leave a Reply

Your email address will not be published. Required fields are marked *