No subject


Wed Oct 7 22:37:18 EDT 2009


1. Gradient vector field

2. Anisotropic diffusion of gradient vector=20

3. Gradient vector flow

4. Hessian matrix

=20

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.=20

=20

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.

=20

typedef itk::Image< T, 3 >   InputImageType; //input image type

typedef itk::Image< float, 3 >   OutputImageType; //outputimage type

=20

/// cast filter which converts any inputimage type to outputimage type

typedef itk::CastImageFilter <InputImageType, OutputImageType> castType;

castType::Pointer castfilter =3D castType::New();

=20

// image is vtkKWEITKImage object

castfilter->SetInput( dynamic_cast< InputImageType * >(
image->GetITKImage() ) );

=20

//itk vector image declaration

typedef itk::CovariantVector<float, 3> VectorPixelType;

typedef itk::Image<VectorPixelType, 3> VectorImageType;

=20

//calculate the gradient vector of image

typedef itk::GradientImageFilter <OutputImageType, float, float>
GradientType;

GradientType::Pointer gradient =3D GradientType::New();

gradient->SetInput(castfilter->GetOutput());

gradient->Update();

=20

//calculation of gradient vector flow from diffused gradient vector

typedef itk::GradientVectorFlowImageFilter<VectorImageType,
VectorImageType, double> VectorFlowType;

VectorFlowType::Pointer flowfilter =3D VectorFlowType::New();

flowfilter->SetInput(gradient->GetOutput());

=20

//observer of algorithm execution for time

p->Observe( flowfilter );

=20

//the image object is updated with output image from flowfilter

image->SetImage( flowfilter->GetOutput( ) );

image->Modified();

=20

flowfilter->ReleaseDataFlagOn();

return EXIT_SUCCESS;

=20

Questions:

=20

1. I would like to know whether itkGradientVectorFlowImageFilter
computes anisotropic diffusion or gaussian diffusion ?

=20

2. I want to visualise the gradient vector flow as arrows. How can i
achieve this visualisation?

=20

3. If there is any example, which would help me fully or partially I
would like to know.

=20

Thank you in advance.

=20

Regards,

Kana=20

=20


------_=_NextPart_001_01CAAA55.EA299788
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DDE-AT link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal>Hi User,<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><span lang=3DEN-GB>My goal is to implement insight =
journal
paper:<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>&quot;Edge based tube detection =
for
coronary artery centerline extraction&quot;<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>From the paper i understood that =
i have to
calculate the following:<o:p></o:p></span></p>

<p class=3DMsoNormal>1. Gradient vector field<o:p></o:p></p>

<p class=3DMsoNormal><span lang=3DEN-GB>2. Anisotropic diffusion of =
gradient vector
<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>3. Gradient vector =
flow<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>4. Hessian =
matrix<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>I calculate the gradientimage =
using
itkGradientImageFilter. I use =
itkGradientVectorFlowImageFilter<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>to directly calculate the =
gradient vector
flow as it is given the diffusion is already inbuilt =
in<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
lang=3DEN-GB>itkGradientVectorFlowImageFilter. <o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>I use QVTK for visualisation. =
The image is
loaded as vtk image. To apply <o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>itk algorithm, i convert the vtk =
image to
itk image using vtkKWEITKImage.cxx<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>from vtkedge. The same file is =
used for itk
image to vtk image for display.<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>typedef itk::Image&lt; T, 3 =
&gt;&nbsp;&nbsp;
InputImageType; <span style=3D'color:#00B050'>//input image =
type<o:p></o:p></span></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>typedef itk::Image&lt; float, 3 =
&gt;&nbsp;&nbsp;
OutputImageType; <span style=3D'color:#00B050'>//outputimage =
type</span><o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB style=3D'color:#00B050'>/// cast =
filter which
converts any inputimage type to outputimage type<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>typedef itk::CastImageFilter
&lt;InputImageType, OutputImageType&gt; castType;<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>castType::Pointer castfilter =3D =
castType::New();<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB style=3D'color:#00B050'>// image =
is
vtkKWEITKImage object<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>castfilter-&gt;SetInput( =
dynamic_cast&lt;
InputImageType * &gt;( image-&gt;GetITKImage() ) =
);<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB style=3D'color:#00B050'>//itk =
vector image
declaration<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>typedef =
itk::CovariantVector&lt;float,
3&gt; VectorPixelType;<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>typedef =
itk::Image&lt;VectorPixelType,
3&gt; VectorImageType;<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB =
style=3D'color:#00B050'>//calculate the
gradient vector of image<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>typedef itk::GradientImageFilter
&lt;OutputImageType, float, float&gt; =
GradientType;<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>GradientType::Pointer gradient =
=3D
GradientType::New();<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
lang=3DEN-GB>gradient-&gt;SetInput(castfilter-&gt;GetOutput());<o:p></o:p=
></span></p>

<p class=3DMsoNormal><span =
lang=3DEN-GB>gradient-&gt;Update();<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB =
style=3D'color:#00B050'>//calculation of
gradient vector flow from diffused gradient vector<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>typedef
itk::GradientVectorFlowImageFilter&lt;VectorImageType, VectorImageType,
double&gt; VectorFlowType;<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>VectorFlowType::Pointer =
flowfilter =3D
VectorFlowType::New();<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
lang=3DEN-GB>flowfilter-&gt;SetInput(gradient-&gt;GetOutput());<o:p></o:p=
></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB =
style=3D'color:#00B050'>//observer of
algorithm execution for time<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>p-&gt;Observe( flowfilter =
);<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB style=3D'color:#00B050'>//the =
image object is
updated with output image from flowfilter<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>image-&gt;SetImage(
flowfilter-&gt;GetOutput( ) );<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
lang=3DEN-GB>image-&gt;Modified();<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span =
lang=3DEN-GB>flowfilter-&gt;ReleaseDataFlagOn();<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>return =
EXIT_SUCCESS;<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>Questions:<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>1. I would like to know whether
itkGradientVectorFlowImageFilter computes anisotropic diffusion or =
gaussian
diffusion ?<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>2. I want to visualise the =
gradient vector
flow as arrows. How can i achieve this =
visualisation?<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>3. If there is any example, =
which would
help me fully or partially I would like to know.<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>Thank you in =
advance.<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-GB>Regards,<o:p></o:p></span></p>

<p class=3DMsoNormal>Kana <o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>

------_=_NextPart_001_01CAAA55.EA299788--


More information about the Insight-users mailing list