[Insight-users] I want to segment blood vessels from a series of picture with ITK , please help me

Matt McCormick matt.mccormick at kitware.com
Sat Aug 3 16:58:07 EDT 2013


Hi,

You may want to try increasing the sigma parameter on the
HessianRecursiveGaussianFilter.  This is a parameter for smoothing that
occurs during (which is equivalent to before) the Hessian estimation.  By
increasing the amount of smoothing, smaller structures and high frequency
noise will not be identified as vessels.  Not that in the exampled
referenced, the smoothing is relatively high, so only the large vessels
around the Circle of Willis, etc are extracted.

Please reply-to-all so messages reach the mailing list.

Thanks,
Matt

On Fri, Aug 2, 2013 at 3:12 AM, zhq <15891495523 at 126.com> wrote:

> With referencing to the [1] , I written my code as follow . And there is
> some error with the code " writer->Update(); " , but the writer's input
> is ok , because I can get all the pixel value with the method
> :vesselFilter->GetOutput()->GetPixel(index); .
>
> Then I get the second slice from vesselFilter , and the result is :
>
>
> so , Is there any workable algorithm ?
>
> #include "itkImage.h"
> #include "itkImageSeriesReader.h"
> #include "itkImageFileWriter.h"
> #include "itkNumericSeriesFileNames.h"
> #include "itkGDCMImageIO.h"
> #include <Windows.h>
> #include "itkShiftScaleImageFilter.h"
> #include "itkHessianRecursiveGaussianImageFilter.h"
> #include "itkHessian3DToVesselnessMeasureImageFilter.h"
> void main()
> {
> typedef unsigned short PixelType ;
> const unsigned int Dimension = 3;
> typedef itk::Image<PixelType , Dimension> ImageType ;
> typedef itk::ImageSeriesReader<ImageType> ReaderType ;
>  typedef itk::NumericSeriesFileNames NameGeneratorType ;
> NameGeneratorType::Pointer nameGenerator = NameGeneratorType::New();
>
> nameGenerator->SetSeriesFormat("C:\\Users\\zhq\\Desktop\\data\\SNAP_CR\\E403434298\\E403434298S1901I%3d.dcm");
> nameGenerator->SetStartIndex(301);
> nameGenerator->SetEndIndex(305);
> nameGenerator->SetIncrementIndex(1);
>  ReaderType::Pointer reader = ReaderType::New();
> reader->SetImageIO(itk::GDCMImageIO::New());
> reader->SetFileNames(nameGenerator->GetFileNames());
> reader->Update();
>
> typedef itk::Image<double,3> doubleImageType ;
> typedef itk::ShiftScaleImageFilter<ImageType,doubleImageType> ShiftFilter
> ;
> ShiftFilter::Pointer filter = ShiftFilter::New();
> filter->SetInput(reader->GetOutput());
> filter->Update();
>  typedef itk::HessianRecursiveGaussianImageFilter<doubleImageType>
> HessianFilterType;
> HessianFilterType::Pointer hessianFilter = HessianFilterType::New();
> hessianFilter->SetInput(filter->GetOutput());
>
> typedef itk::Hessian3DToVesselnessMeasureImageFilter<float>
> VesselMeasureFilterType ;
> VesselMeasureFilterType::Pointer vesselFilter =
> VesselMeasureFilterType::New();
> vesselFilter->SetInput(hessianFilter->GetOutput());
> vesselFilter->Update();
> std::cout<<"vesselFilter update"<<std::endl;
>
> typedef itk::ImageFileWriter< itk::Image<float,3> > WriterType ;
> WriterType::Pointer writer = WriterType::New();
> writer->SetInput(vesselFilter->GetOutput());
> writer->SetFileName("C:\\Users\\zhq\\Desktop\\mydata.vtk");
> writer->Update();
>
> system("pause");
> }
>
>
>
>
>
>
> At 2013-08-02 11:24:29,"Matt McCormick" <matt.mccormick at kitware.com
> > wrote:
> >Hi,
> >
> >Here[1] is a very simple brain vessel segmentation example.
> >
> >For more advanced vessel segmentation methods, you may want to try
> >TubeTK[2], which supports analysis and visualization with the ITK and
> >VTK based 3DSlicer[3].
> >
> >Thanks,
> >Matt
> >
> >[1] http://itk.org/ITKExamples/src/Filtering/ImageFeature/SegmentBloodVessels/Documentation.html
>
> >[2] http://tubetk.org/
> >[3] http://slicer.org/
> >
> >On Fri, Jul 26, 2013 at 9:19 PM, 章强 <15891495523 at 126.com> wrote:
> >> Hello :
> >>       there is a series of dcm format files which is the results of scanning
> >> the brain . I want to segment blood vessels from these files with ITK , and
> >> show it with VTK . Please give me a simple case . I have a  problem with
> >> this project .
> >>       how can I segment a specified region ? I know that ITK provide some
> >> segmentation algorithm  , but they need the Index of seeds . Can I show the
> >> picture with VTK fristly ,and then point out a seed in the picture ? And if
> >> there are some algorithms which can segment volume data ?
> >>
> >>
> >> 来自网易手机号码邮箱了解更多
> >>
> >> _____________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Kitware offers ITK Training Courses, for more information visit:
> >> http://www.kitware.com/products/protraining.php
> >>
> >> Please keep messages on-topic and check the ITK FAQ at:
> >> http://www.itk.org/Wiki/ITK_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.itk.org/mailman/listinfo/insight-users
> >>
>
>
>
> 来自网易手机号码邮箱了解更多 <http://shouji.163.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130803/396b68c4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 109750 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130803/396b68c4/attachment-0001.jpeg>


More information about the Insight-users mailing list