bastula / dicompyler

Extensible radiation therapy research platform and viewer for DICOM and DICOM RT
http://www.dicompyler.com
268 stars 100 forks source link

Independent volume calculation of structures #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently dicompyler will read the volume data directly from the calculated DVH 
(as of r7db70b8ed0 ).

Prior to this, the volume was calculated in dvhdata.py. However, this volume 
was inaccurate since only a single contour for the structure on each slice was 
used.

After r7db70b8ed0 though, the structure data now contains all contours for each 
slice. Therefore the volume calculation needs to be updated to reflect the more 
accurate contour data.

Original issue reported on code.google.com by bastula on 18 Jun 2010 at 3:10

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/35637438-independent-volume-calculation-of-structures?utm_campaign=plugin&utm_content=tracker%2F18109348&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18109348&utm_medium=issues&utm_source=github).
GoogleCodeExporter commented 9 years ago
Fixed in r3eaaadcc3a.

Accuracy is not perfect, but should suffice for now. Interpolation of planes 
should help improve this.

Currently, usage of the volume calculation will only occur if there is no DVH 
data present.

Example data comparison
-----------------------
Structure           DVH volume      Calc volume     Difference
---------
Body                13944.4 cc      14752.25 cc     +5.47  %
Borders             0.745   cc      0.348    cc     -53.2  %
Breast              396.229 cc      365.86   cc     -7.67  %
Heart               437.462 cc      414.598  cc     -5.23  %
Lt Lung             2008.94 cc      1948.66  cc     +3.001 %
Nodes               0.56573 cc      0.45846  cc     +18.96 %
Scar                0.34317 cc      0.75903  cc     +121.2 %
Tumor Bed           12.8091 cc      5.89399  cc     -53.99 %
Tumor Bed Block     62.8826 cc      53.188   cc     -15.42 %

Original comment by bastula on 29 Jun 2010 at 5:22

GoogleCodeExporter commented 9 years ago
Matplotlib contains a helper module (nx) that has a function 
points_inside_poly. This can be used to replace PointInPolygon in dvhdata.py.

Original comment by bastula on 29 Jun 2010 at 5:51

GoogleCodeExporter commented 9 years ago

Original comment by bastula on 12 Nov 2010 at 4:23

GoogleCodeExporter commented 9 years ago
This was resolved partially in r2b14df57ebb8. If a DVH has not been calculated 
previously, the DVH volume for the structure wll be used, as it is now 
calculated independently. This occurs using the pixel data times the slice 
thickness.

Using the same method with the CT image data may yield better results due to 
the finer resolution compared to the dose grid data.

Original comment by bastula on 20 May 2011 at 3:44