[Insight-users] Gradient vector flow calculation

Kishore Mosaliganti kishoreraom at gmail.com
Thu Feb 11 00:06:41 EST 2010


For 2, you can use Paraview to visualize the vector field.

Kishore

On Wed, Feb 10, 2010 at 8:35 AM, Arunachalam Kana
<Kana.Arunachalam at fh-wels.at> wrote:
> Hi User,
>
>
>
> My goal is to implement insight journal paper:
>
> "Edge based tube detection for coronary artery centerline extraction"
>
>
>
> From the paper i understood that i have to calculate the following:
>
> 1. Gradient vector field
>
> 2. Anisotropic diffusion of gradient vector
>
> 3. Gradient vector flow
>
> 4. Hessian matrix
>
>
>
> I calculate the gradientimage using itkGradientImageFilter. I use
> itkGradientVectorFlowImageFilter
>
> to directly calculate the gradient vector flow as it is given the diffusion
> is already inbuilt in
>
> itkGradientVectorFlowImageFilter.
>
>
>
> I use QVTK for visualisation. The image is loaded as vtk image. To apply
>
> itk algorithm, i convert the vtk image to itk image using vtkKWEITKImage.cxx
>
> from vtkedge. The same file is used for itk image to vtk image for display.
>
>
>
> typedef itk::Image< T, 3 >   InputImageType; //input image type
>
> typedef itk::Image< float, 3 >   OutputImageType; //outputimage type
>
>
>
> /// cast filter which converts any inputimage type to outputimage type
>
> typedef itk::CastImageFilter <InputImageType, OutputImageType> castType;
>
> castType::Pointer castfilter = castType::New();
>
>
>
> // image is vtkKWEITKImage object
>
> castfilter->SetInput( dynamic_cast< InputImageType * >( image->GetITKImage()
> ) );
>
>
>
> //itk vector image declaration
>
> typedef itk::CovariantVector<float, 3> VectorPixelType;
>
> typedef itk::Image<VectorPixelType, 3> VectorImageType;
>
>
>
> //calculate the gradient vector of image
>
> typedef itk::GradientImageFilter <OutputImageType, float, float>
> GradientType;
>
> GradientType::Pointer gradient = GradientType::New();
>
> gradient->SetInput(castfilter->GetOutput());
>
> gradient->Update();
>
>
>
> //calculation of gradient vector flow from diffused gradient vector
>
> typedef itk::GradientVectorFlowImageFilter<VectorImageType, VectorImageType,
> double> VectorFlowType;
>
> VectorFlowType::Pointer flowfilter = VectorFlowType::New();
>
> flowfilter->SetInput(gradient->GetOutput());
>
>
>
> //observer of algorithm execution for time
>
> p->Observe( flowfilter );
>
>
>
> //the image object is updated with output image from flowfilter
>
> image->SetImage( flowfilter->GetOutput( ) );
>
> image->Modified();
>
>
>
> flowfilter->ReleaseDataFlagOn();
>
> return EXIT_SUCCESS;
>
>
>
> Questions:
>
>
>
> 1. I would like to know whether itkGradientVectorFlowImageFilter computes
> anisotropic diffusion or gaussian diffusion ?
>
>
>
> 2. I want to visualise the gradient vector flow as arrows. How can i achieve
> this visualisation?
>
>
>
> 3. If there is any example, which would help me fully or partially I would
> like to know.
>
>
>
> Thank you in advance.
>
>
>
> Regards,
>
> Kana
>
>
>
> _____________________________________
> 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.html
>
> 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
>
>


More information about the Insight-users mailing list