Hi,<br><br>You may want to try increasing the sigma parameter on the HessianRecursiveGaussianFilter.&nbsp; This is a parameter for smoothing that occurs during (which is equivalent to before) the Hessian estimation.&nbsp; By increasing the amount of smoothing, smaller structures and high frequency noise will not be identified as vessels.&nbsp; Not that in the exampled referenced, the smoothing is relatively high, so only the large vessels around the Circle of Willis, etc are extracted.<br>
<br>Please reply-to-all so messages reach the mailing list.<br><br>Thanks,<br>Matt<br><br><div class="gmail_quote">On Fri, Aug 2, 2013 at 3:12 AM, zhq <span dir="ltr">&lt;<a href="mailto:15891495523@126.com" target="_blank">15891495523@126.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;font-size:14px;font-family:arial">With referencing to the [1] , I written my code as follow . And there is some error with the code &quot;
<span style="color:rgb(255,0,0)">writer-&gt;Update();</span>&nbsp;&quot; , but the writer&#39;s input<div>is ok , because I can get all the pixel value with the method :vesselFilter-&gt;GetOutput()-&gt;GetPixel(index); .&nbsp;</div>
<div><br></div><div>Then I get the second slice from&nbsp;vesselFilter , and the result is :</div><div><img src="cid:782ddb15$1$1403ddeff01$Coremail$15891495523$126.com" style="min-height:279px;width:600px"></div><div><br></div>
<div><br></div><div>so , Is there any workable algorithm ?</div><div><br></div><div><div>#include &quot;itkImage.h&quot;</div><div>#include &quot;itkImageSeriesReader.h&quot;</div><div>#include &quot;itkImageFileWriter.h&quot;</div>
<div>#include &quot;itkNumericSeriesFileNames.h&quot;</div><div>#include &quot;itkGDCMImageIO.h&quot;</div><div>#include &lt;Windows.h&gt;</div><div>#include &quot;itkShiftScaleImageFilter.h&quot;</div><div>#include &quot;itkHessianRecursiveGaussianImageFilter.h&quot;</div>
<div>#include &quot;itkHessian3DToVesselnessMeasureImageFilter.h&quot;</div><div>void main()</div><div>{</div><div><span style="white-space:pre-wrap">        </span>typedef unsigned short PixelType ;&nbsp;</div><div><span style="white-space:pre-wrap">        </span>const unsigned int Dimension = 3;&nbsp;</div>
<div><span style="white-space:pre-wrap">        </span>typedef itk::Image&lt;PixelType , Dimension&gt; ImageType ;&nbsp;</div><div><span style="white-space:pre-wrap">        </span>typedef itk::ImageSeriesReader&lt;ImageType&gt; ReaderType ;&nbsp;</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>typedef itk::NumericSeriesFileNames NameGeneratorType ;</div><div><span style="white-space:pre-wrap">        </span>NameGeneratorType::Pointer nameGenerator = NameGeneratorType::New();</div>
<div><span style="white-space:pre-wrap">        </span>nameGenerator-&gt;SetSeriesFormat(&quot;C:\\Users\\zhq\\Desktop\\data\\SNAP_CR\\E403434298\\E403434298S1901I%3d.dcm&quot;);</div><div><span style="white-space:pre-wrap">        </span>nameGenerator-&gt;SetStartIndex(301);</div>
<div><span style="white-space:pre-wrap">        </span>nameGenerator-&gt;SetEndIndex(305);</div><div><span style="white-space:pre-wrap">        </span>nameGenerator-&gt;SetIncrementIndex(1);</div><div><span style="white-space:pre-wrap">        </span></div>
<div><span style="white-space:pre-wrap">        </span>ReaderType::Pointer reader = ReaderType::New();</div><div><span style="white-space:pre-wrap">        </span>reader-&gt;SetImageIO(itk::GDCMImageIO::New());</div><div><span style="white-space:pre-wrap">        </span>reader-&gt;SetFileNames(nameGenerator-&gt;GetFileNames());</div>
<div><span style="white-space:pre-wrap">        </span>reader-&gt;Update();</div><div><br></div><div><span style="white-space:pre-wrap">        </span>typedef itk::Image&lt;double,3&gt; doubleImageType ;&nbsp;</div><div><span style="white-space:pre-wrap">        </span>typedef itk::ShiftScaleImageFilter&lt;ImageType,doubleImageType&gt; ShiftFilter ;&nbsp;</div>
<div><span style="white-space:pre-wrap">        </span>ShiftFilter::Pointer filter = ShiftFilter::New();</div><div><span style="white-space:pre-wrap">        </span>filter-&gt;SetInput(reader-&gt;GetOutput());</div><div><span style="white-space:pre-wrap">        </span>filter-&gt;Update();</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>typedef itk::HessianRecursiveGaussianImageFilter&lt;doubleImageType&gt; HessianFilterType;</div><div><span style="white-space:pre-wrap">        </span>HessianFilterType::Pointer hessianFilter = HessianFilterType::New();</div>
<div><span style="white-space:pre-wrap">        </span>hessianFilter-&gt;SetInput(filter-&gt;GetOutput());</div><div><br></div><div><span style="white-space:pre-wrap">        </span>typedef itk::Hessian3DToVesselnessMeasureImageFilter&lt;float&gt; VesselMeasureFilterType ;&nbsp;</div>
<div><span style="white-space:pre-wrap">        </span>VesselMeasureFilterType::Pointer vesselFilter = VesselMeasureFilterType::New();</div><div><span style="white-space:pre-wrap">        </span>vesselFilter-&gt;SetInput(hessianFilter-&gt;GetOutput());</div>
<div><span style="white-space:pre-wrap">        </span>vesselFilter-&gt;Update();</div><div><span style="white-space:pre-wrap">        </span>std::cout&lt;&lt;&quot;vesselFilter update&quot;&lt;&lt;std::endl;</div><div><br></div><div><span style="white-space:pre-wrap">        </span>typedef itk::ImageFileWriter&lt; itk::Image&lt;float,3&gt; &gt; WriterType ;&nbsp;</div>
<div><span style="white-space:pre-wrap">        </span>WriterType::Pointer writer = WriterType::New();</div><div><span style="white-space:pre-wrap">        </span>writer-&gt;SetInput(vesselFilter-&gt;GetOutput());</div><div><span style="white-space:pre-wrap">        </span>writer-&gt;SetFileName(&quot;C:\\Users\\zhq\\Desktop\\mydata.vtk&quot;);</div>
<div><span style="white-space:pre-wrap">        </span><span style="color:rgb(255,0,0)">writer-&gt;Update();</span></div><div><br></div><div><span style="white-space:pre-wrap">        </span>system(&quot;pause&quot;);</div><div>}</div>
<br><br><br><br><div></div><div></div><br><pre><div class="im"><br>At&nbsp;<a href="tel:2013-08-02%C2%A011" value="+12013080211" target="_blank">2013-08-02&nbsp;11</a>:24:29,&quot;Matt&nbsp;McCormick&quot;&nbsp;&lt;<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a></div>
&gt;&nbsp;wrote:
&gt;Hi,
&gt;
&gt;Here[1]&nbsp;is&nbsp;a&nbsp;very&nbsp;simple&nbsp;brain&nbsp;vessel&nbsp;segmentation&nbsp;example.
&gt;
&gt;For&nbsp;more&nbsp;advanced&nbsp;vessel&nbsp;segmentation&nbsp;methods,&nbsp;you&nbsp;may&nbsp;want&nbsp;to&nbsp;try
&gt;TubeTK[2],&nbsp;which&nbsp;supports&nbsp;analysis&nbsp;and&nbsp;visualization&nbsp;with&nbsp;the&nbsp;ITK&nbsp;and
&gt;VTK&nbsp;based&nbsp;3DSlicer[3].
&gt;
&gt;Thanks,
&gt;Matt
&gt;
&gt;[1]&nbsp;<a href="http://itk.org/ITKExamples/src/Filtering/ImageFeature/SegmentBloodVessels/Documentation.html" target="_blank">http://itk.org/ITKExamples/src/Filtering/ImageFeature/SegmentBloodVessels/Documentation.html</a><div>
<div class="h5">
&gt;[2]&nbsp;<a href="http://tubetk.org/" target="_blank">http://tubetk.org/</a>
&gt;[3]&nbsp;<a href="http://slicer.org/" target="_blank">http://slicer.org/</a>
&gt;
&gt;On&nbsp;Fri,&nbsp;Jul&nbsp;26,&nbsp;2013&nbsp;at&nbsp;9:19&nbsp;PM,&nbsp;章强&nbsp;&lt;<a href="mailto:15891495523@126.com" target="_blank">15891495523@126.com</a>&gt;&nbsp;wrote:
&gt;&gt;&nbsp;Hello&nbsp;:
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;there&nbsp;is&nbsp;a&nbsp;series&nbsp;of&nbsp;dcm&nbsp;format&nbsp;files&nbsp;which&nbsp;is&nbsp;the&nbsp;results&nbsp;of&nbsp;scanning
&gt;&gt;&nbsp;the&nbsp;brain&nbsp;.&nbsp;I&nbsp;want&nbsp;to&nbsp;segment&nbsp;blood&nbsp;vessels&nbsp;from&nbsp;these&nbsp;files&nbsp;with&nbsp;ITK&nbsp;,&nbsp;and
&gt;&gt;&nbsp;show&nbsp;it&nbsp;with&nbsp;VTK&nbsp;.&nbsp;Please&nbsp;give&nbsp;me&nbsp;a&nbsp;simple&nbsp;case&nbsp;.&nbsp;I&nbsp;have&nbsp;a&nbsp;&nbsp;problem&nbsp;with
&gt;&gt;&nbsp;this&nbsp;project&nbsp;.
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;how&nbsp;can&nbsp;I&nbsp;segment&nbsp;a&nbsp;specified&nbsp;region&nbsp;?&nbsp;I&nbsp;know&nbsp;that&nbsp;ITK&nbsp;provide&nbsp;some
&gt;&gt;&nbsp;segmentation&nbsp;algorithm&nbsp;&nbsp;,&nbsp;but&nbsp;they&nbsp;need&nbsp;the&nbsp;Index&nbsp;of&nbsp;seeds&nbsp;.&nbsp;Can&nbsp;I&nbsp;show&nbsp;the
&gt;&gt;&nbsp;picture&nbsp;with&nbsp;VTK&nbsp;fristly&nbsp;,and&nbsp;then&nbsp;point&nbsp;out&nbsp;a&nbsp;seed&nbsp;in&nbsp;the&nbsp;picture&nbsp;?&nbsp;And&nbsp;if
&gt;&gt;&nbsp;there&nbsp;are&nbsp;some&nbsp;algorithms&nbsp;which&nbsp;can&nbsp;segment&nbsp;volume&nbsp;data&nbsp;?
&gt;&gt;
&gt;&gt;
&gt;&gt;&nbsp;来自网易手机号码邮箱了解更多
&gt;&gt;
&gt;&gt;&nbsp;_____________________________________
&gt;&gt;&nbsp;Powered&nbsp;by&nbsp;<a href="http://www.kitware.com" target="_blank">www.kitware.com</a>
&gt;&gt;
&gt;&gt;&nbsp;Visit&nbsp;other&nbsp;Kitware&nbsp;open-source&nbsp;projects&nbsp;at
&gt;&gt;&nbsp;<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>
&gt;&gt;
&gt;&gt;&nbsp;Kitware&nbsp;offers&nbsp;ITK&nbsp;Training&nbsp;Courses,&nbsp;for&nbsp;more&nbsp;information&nbsp;visit:
&gt;&gt;&nbsp;<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a>
&gt;&gt;
&gt;&gt;&nbsp;Please&nbsp;keep&nbsp;messages&nbsp;on-topic&nbsp;and&nbsp;check&nbsp;the&nbsp;ITK&nbsp;FAQ&nbsp;at:
&gt;&gt;&nbsp;<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a>
&gt;&gt;
&gt;&gt;&nbsp;Follow&nbsp;this&nbsp;link&nbsp;to&nbsp;subscribe/unsubscribe:
&gt;&gt;&nbsp;<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a>
&gt;&gt;
</div></div></pre></div></div><br><br><span title="neteasefooter"><span><div><div style="border-top:#cccccc 1px solid;padding:10px 5px;font-size:12px;color:#666;line-height:22px">来自网易手机号码邮箱<a href="http://shouji.163.com" style="color:#0000ff" target="_blank">了解更多</a></div>
</div>
</span></span></blockquote></div><br>