# Correct relative error for Comparison of levelsets outside a constrained region

I am working on the estimation of tumor extent outside of the region which is visible in MRT/CT/DTI images. I want to compare two methods, which approximate the tumor density profile.

Lets say the tumor visible on the image is Region A. The gold standard Region which I want to find is marked with B, and my approximation to it is the region indicated in green: C. :

My first approach to have a relative error is the following:

$$E_r = \frac{B \oplus C}{B \setminus A}$$

The idea is to have the over- or underestimation in the numerator, and the total volume of the ideal region outside of the already visible region in the denominator. That all works well in 2 dimensions, but preferably I would be able to compare the errors in 2D and 3D. The problem is that in 3D the volume contribution on the outside layer of a ball is larger than in 2d ($$r^2$$ vs. $$r^3$$).

If I'd also include the inner region in the fraction, then I could simply take the proper root to have the two errors comparable. That would be the approach to take the classical Jaccard or Dice coefficient as an error quantification and take the d'th root of it. I want to exclude the region A, because..it should not contribute, that is the region where we already know that there is a tumor, so it gives no information on how good my approximation method (region C) really is.

Question:

How would I construct a reasonable relative error expression which is comparable between 2D/3D?

Lets begin with some guidelines for what your error estimate should be like. The qualities you'd want would be an error estimate that accounts for both false positives and false negatives, which you currently have in your numerator. I think (and I could be persuaded the other way) that you want an estimate that isn't too reliant on the interplay between A and B. One issue that jumps out to me with your current formulation is that in the limit of A approaching B, your denominator approaches 0 and sends your error to infinity; I think this is an undesirable quality for an error estimate. You'd also want an error estimate that for a constant amount of false negatives/positives and an increasing guessing area would go down, reflecting higher accuracy. I personally think a decent first pass attempt at this would be: $$E_r = \frac{(B\oplus C)^{1/d}}{(B \Cup C)^{1/d}}$$ where d is the physical dimension. If you want to neglect the A region as you did above you could instead use: $$E_r = \frac{(B\oplus C)^{1/d}}{((B \Cup C)\setminus A)^{1/d}}$$ This equation will have the same issue as your equation above, but it shows itself only if A approaches the union of $$A \Cup C$$, you may think this is a worse treament though.