Hi, David,<br><br>I got it. What value should I set for <span style="font-size:12.8px">image_threshold.SetInValue()? Does it depend on the greyscale scalarange of the vtkImageData?<br><br>Thanks<br>Liu Peng<br></span><div><br><br></div>
 <span>
 </span>
<br>      在2016-03-19,"David Gobbi" <david.gobbi@gmail.com> 写道:
        <blockquote id="isReplyContent" style="padding-left:1ex; margin: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
        -----原始邮件-----<br>
        <b>发件人:</b>"David Gobbi" <david.gobbi@gmail.com> <br>
        <b>发送时间:</b>2016年03月19日 星期六<br>
        <b>收件人:</b>"Liu_tj" <tjlp@netease.com><br>
        <b>抄送:</b>"vtkusers" <vtkusers@vtk.org><br>
        <b>主题:</b>Re: Re: [vtkusers] High memory cost of vtkDecimatePro for 3D model generation from DICOM series<br>
<br><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 18, 2016 at 8:43 PM, Liu_tj <span dir="ltr"><<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>I thought that vtkImageThreshold still provide a greyscale output instead of binary output. My understanding was that vtkImageThreshold just remove the points beyond the greyscale range.</blockquote><div><br></div><div>It can be used that way, but in your code, it is producing a binary output.  <span style="font-size:12.8px">Points in the range are set to 1, and points outside the range are set to 0:</span></div><div><br></div><div><span style="font-size:12.8px">            image_threshold.ReplaceInOn();</span><br style="font-size:12.8px"><span style="font-size:12.8px">            image_threshold.SetInValue(1);</span><br style="font-size:12.8px"><span style="font-size:12.8px">            image_threshold.ReplaceOutOn()</span><span style="font-size:12.8px">;</span><br style="font-size:12.8px"><span style="font-size:12.8px">            image_threshold.SetOutValue(0)</span><span style="font-size:12.8px">;</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">But even if you change vtkImageThreshold so that it just removes the points outside of the range, I still recommend that you do not use it before vtkMarchingCubes, because marching cubes expects to have valid grey values on both sides of the isosurface (on the inside and on the outside).  If you set the outside voxels to black, then the resulting surface will be shifted inward slightly.</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> - David</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div> </div></div></div></div>
</blockquote><br><br><span title="neteasefooter"><p> </p></span>