<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>You would have to check the neighborhood of a voxel to determine
if they are inside or outside. If your current voxel is inside, but 1 or more
neighbors are outside, it’s an edge. It probably makes more sense to build up
a mask of the weighting of the voxels. That way you only need to perform the
inside/outside queries once. From then on you can compute as needed.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> -- Scott<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Jothy
[mailto:jothybasu@gmail.com] <br>
<b>Sent:</b> Thursday, October 14, 2010 2:23 PM<br>
<b>To:</b> Scott Johnson<br>
<b>Cc:</b> Xiaofeng Z; VTK<br>
<b>Subject:</b> Re: [vtkusers] Dose Volume Histogram<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal>Weighting of the voxels seems to be a good idea, but I am
not sure whether you will be able to know the voxels on surface. Most of the
methods says only <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>whether they are inside or outside.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'>Jothy <br>
<br>
On 14-Oct-2010, at 7:44 PM, "Scott Johnson" <<a
href="mailto:Scott.Johnson@neuwave.com">Scott.Johnson@neuwave.com</a>>
wrote:<o:p></o:p></p>
</div>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hello
Xiaofeng,</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You
could minimize the partial volume by sampling into the dose grid at the
resolution of the CT voxels. For example, you iterate through the CT
voxels for which you wish to create your DVH. Map the center of
that CT voxel position and sample into the Dose Grid to find the dose value at
that same position. Then assume that dose value occupies the entire CT
voxel space. That value goes into your DVH.</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You
can further minimize the partial volume effect by weighting the voxels at the
edges of your ROI. As a swag, multiply the voxel weight of an edge voxel
by 0.5 .</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Other
than that you need to resample your dose grid at a finer resolution
still. There is a computational tradeoff.</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hope
that helps.</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>
-- Scott</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a
href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>
[mailto:vtkusers-bounces@vtk.org] <b>On Behalf Of </b>Xiaofeng Z<br>
<b>Sent:</b> Thursday, October 14, 2010 1:10 PM<br>
<b>To:</b> <a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a><br>
<b>Cc:</b> VTK<br>
<b>Subject:</b> Re: [vtkusers] Dose Volume Histogram</span><o:p></o:p></p>
</div>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>I mean voxels
that's partly inside and partly outside of the polygon.<br>
<br>
Xiaofeng Z<br>
<br>
<br>
</span><o:p></o:p></p>
<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
<hr size=2 width="100%" align=center>
</span></div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>CC: <a
href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>; <a
href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
From: <a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a><br>
Subject: Re: [vtkusers] Dose Volume Histogram<br>
Date: Thu, 14 Oct 2010 18:27:23 +0100<br>
To: <a href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</a></span><o:p></o:p></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>What do you mean by
partial volume?</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Jothy<br>
<br>
On 14-Oct-2010, at 5:48 PM, Xiaofeng Z <<a href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</a>>
wrote:</span><o:p></o:p></p>
</div>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Do you take into
account of partial volume? The dose grid is typically very coarse, I
don't think the partial volume can be ignored.<br>
<br>
Xiaofeng Z<br>
<br>
<br>
</span><o:p></o:p></p>
<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
<hr size=2 width="100%" align=center>
</span></div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>CC: <a
href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>; <a
href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
From: <a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a><br>
Subject: Re: [vtkusers] Dose Volume Histogram<br>
Date: Thu, 14 Oct 2010 17:23:47 +0100<br>
To: <a href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</a></span><o:p></o:p></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>If you are speaking
from the radiotherapy point of view,it should be done in a different way from
what krishnan told. You should first use point-in-polygon method(which is
available in vtkPolygon class) to find the voxels inside the structure and
using the voxel indices, you could get their respective dose values and use a
binning/histogram to bin the dose values to get the dvh along with their
volumes.</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Jothy<br>
<br>
On 14-Oct-2010, at 5:03 PM, Xiaofeng Z <<a href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</a>>
wrote:</span><o:p></o:p></p>
</div>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Hi Karthik,
Thanks for your answer. The problem is that I also have a contour
and only the volume (area) inside the contour should be included the
histogram.<br>
<br>
Xiaofeng Z<br>
<br>
<br>
</span><o:p></o:p></p>
<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
<hr size=2 width="100%" align=center>
</span></div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Date: Thu, 14 Oct
2010 20:14:13 +0530<br>
Subject: Re: [vtkusers] Dose Volume Histogram<br>
From: <a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a><br>
To: <a href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</a><br>
CC: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
<br>
No there isn't, but it should be relatively straightforward. On your dose
image, run vtkContourFilter with isovalues, that evenly split your scalar
range into the desired number of bins. Then use vtkMassProperties to compute
the area within each dose isocontour and use the charting capability to plot.</span><o:p></o:p></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>On Thu, Oct 14, 2010
at 7:52 PM, Xiaofeng Z <<a href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</a>>
wrote:</span><o:p></o:p></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Hello VTK
users,<br>
<br>
Is there a function to generate Dose Volume Histogram?<br>
<br>
A Dose Volume Histogram is, in essence, a histogram of the area vs. intensity
within an arbitrary contour i.e. the contour points are not always at pixel
center.<br>
<br>
Thanks!<br>
<br>
Xiaofeng Z<br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a
href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a
href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a></span><o:p></o:p></p>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span><o:p></o:p></p>
</div>
</blockquote>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a
href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a
href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a></span><o:p></o:p></p>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</body>
</html>