<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hey David,
<div><br>
</div>
<div>I use stencil and it works well, however, the dimension index of the output of stencil remain unchanged which I supposed to change according to the size of region I choose and there is a gray part around the region I choose when displaying in the 3-D viewer.
Do you what is the problem?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Fantasy<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF469735" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>发件人:</b> David Gobbi [david.gobbi@gmail.com]<br>
<b>发送时间:</b> 2016年1月26日 16:47<br>
<b>收件人:</b> Chen, Lifan<br>
<b>抄送:</b> vtkusers@vtk.org<br>
<b>主题:</b> Re: [vtkusers] How to select a polygon region in a vtkImageData<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hi Fantasy,
<div><br>
</div>
<div>VTK has "stencil" operations for extracting regions from vtkImageData. For example:</div>
<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData</a><br>
</div>
<div><br>
</div>
<div>There are a few VTK test samples that show different ways to use stencils:</div>
<div><br>
</div>
<div>
<div>Imaging/Core/Testing/Cxx/TestStencilWithLasso.cxx</div>
<div>Imaging/Core/Testing/Cxx/TestStencilWithPolyDataContour.cxx</div>
<div>Imaging/Core/Testing/Cxx/TestStencilWithPolyDataSurface.cxx</div>
</div>
<div><br>
</div>
<div>
<div>Imaging/Core/Testing/Python/TestBlendStencil.py</div>
<div>Imaging/Core/Testing/Python/TestLassoStencil.py</div>
<div>Imaging/Core/Testing/Python/TestROIStencil.py</div>
<div>Imaging/Core/Testing/Python/TestStencilToImage.py</div>
<div>Imaging/Core/Testing/Python/TestStencilWithFunction.py</div>
<div>Imaging/Core/Testing/Python/TestStencilWithImage.py</div>
</div>
<div><br>
</div>
<div>Extraction of a polygonal region can be done with vtkLassoStencilSource</div>
<div>or with vtkPolyDataToImageStecil.</div>
<div><br>
</div>
<div>Cheers,</div>
<div> - David</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jan 26, 2016 at 2:22 PM, Chen, Lifan <span dir="ltr">
<<a href="mailto:LCHEN41@mgh.harvard.edu" target="_blank">LCHEN41@mgh.harvard.edu</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">
<div>
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
Hey all,
<div><br>
</div>
<div>I am working on a project that requires to manually extract a region from a 3D vtkImageData. I read the example on how to select a region in a vtkPolyData in VTK/Examples/Cxx/PolyData/SelectPolyData (<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData</a>)<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData" style="font-size:10pt" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData</a></div>
<div>However, it doesn't work for vtkImageData. Is there any method to solve this problem?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Fantasy Chen</div>
</div>
<p></p>
<p>The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.</p>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>