No subject


Fri Jan 14 08:05:08 EST 2011


sould be possible but trying to use the same code results in compilation
errors, here is the snippet of the code although it seems that the filter
has been slightly modified after bein introduced to itk:

0: typedef itk::SymmetricSecondRankTensor<float, 3> HessianPixelType;
1: typedef itk::Image<HessianPixelType, 3> HessianImage;
2: typedef itk::Image<float,3> FloatImage;
3: typedef itk::MultiScaleHessianBasedMeasureImageFilter<FloatImage,
HessianImage, FloatImage> MultiScaleEnhancementFilterType;
4: typedef itk::Hessian3DToVesselnessMeasureImageFilter<float>
SatoVesselness;
5: MultiScaleEnhancementFilterType::Pointer multiScaleEnhancementFilter =3D
MultiScaleEnhancementFilterType::New();
6: multiScaleEnhancementFilter->SetInput(inputImg);

7: SatoVesselness* vesselnessFilter =3D
multiScaleEnhancementFilter->GetHessianToMeasureFilter();
8: vesselnessFilter->SetAlpha1(0.5);
9: vesselnessFilter->SetAlpha2(0.5);
10: multiScaleEnhancementFilter->SetSigmaStepMethodToLogarithmic();
11: multiScaleEnhancementFilter->GenerateScalesOutputOn();
12: multiScaleEnhancementFilter->SetSigmaMinimum(a_minTargetVesselSize);
13: multiScaleEnhancementFilter->SetSigmaMaximum(a_maxTargetVesselSize);
14: multiScaleEnhancementFilter->SetNumberOfSigmaSteps(a_sizeSteps);
15: multiScaleEnhancementFilter->Update();

This snippet does not compile (line 7):
error C2440: 'initializing' : cannot convert from
'itk::ImageToImageFilter<TInputImage,TOutputImage> *' to 'SatoVesselness *'
1>        with
1>        [
1>            TInputImage=3Ditk::Image<HessianPixelType,3>,
1>            TOutputImage=3Ditk::Image<float,3>
1>        ]
1>        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast

I tried to use reinterpre_cast to no avail... and Hessian3DToVesselness do
inherits from ImageToImage. I've also tried to create a ::New()
Hessian3DToVesselness
and assign to MultiScaleHessian with SetHessianToMeasureFilter, but this
does not wotk either..

Any ideas on why this does not work?

Regards
--=20
Sergio Vera

 Alma IT Systems
 C/ Vilana, 4B, 4=BA 1=AA
 08022 Barcelona
 T. (+34) 932 380 592
 www.alma3d.com

--0016361e8822ed246d049cc82c61
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello all<div><br></div><div>I&#39;ve been able to use=A0MultiScaleHessianB=
asedMeasureImageFilter with <font class=3D"Apple-style-span" face=3D"arial,=
 helvetica, sans-serif">HessianToObjectnessMeasureImageFilter (Frangi vesse=
lness), but I&#39;m unable to use it with Sato Vesselness (Hessian3DToVesse=
lnessMeasureImageFilter)</font></div>
<div><font class=3D"Apple-style-span" face=3D"arial, helvetica, sans-serif"=
>From the original article of the Insight Journal (</font><a href=3D"http:/=
/www.insight-journal.org/browse/publication/175">http://www.insight-journal=
.org/browse/publication/175</a><span class=3D"Apple-style-span" style=3D"fo=
nt-family: arial, helvetica, sans-serif; ">), it seems that this sould be p=
ossible but trying to use the same code results in</span>=A0compilation err=
ors, here is the snippet of the code although it seems that the filter has =
been slightly modified after bein introduced to itk:</div>
<div><br></div><div><div><font class=3D"Apple-style-span" face=3D"&#39;cour=
ier new&#39;, monospace">0: typedef itk::SymmetricSecondRankTensor&lt;float=
, 3&gt; HessianPixelType;</font></div><div><font class=3D"Apple-style-span"=
 face=3D"&#39;courier new&#39;, monospace">1: typedef itk::Image&lt;Hessian=
PixelType, 3&gt; HessianImage;</font></div>
</div><div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, =
monospace">2: typedef itk::Image&lt;float,3&gt; FloatImage;</font></div><di=
v><div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, mono=
space">3: typedef itk::MultiScaleHessianBasedMeasureImageFilter&lt;FloatIma=
ge, HessianImage,=A0FloatImage&gt;=A0MultiScaleEnhancementFilterType;</font=
></div>
</div><div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, =
monospace">4: typedef itk::Hessian3DToVesselnessMeasureImageFilter&lt;float=
&gt; SatoVesselness;</font></div><div><div><font class=3D"Apple-style-span"=
 face=3D"&#39;courier new&#39;, monospace">5: MultiScaleEnhancementFilterTy=
pe::Pointer multiScaleEnhancementFilter =3D MultiScaleEnhancementFilterType=
::New();</font></div>
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">6: multiScaleEnhancementFilter-&gt;SetInput(inputImg);</font></div></d=
iv><div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, mon=
ospace"><br>
</font></div><div><div><font class=3D"Apple-style-span" face=3D"&#39;courie=
r new&#39;, monospace">7: SatoVesselness* vesselnessFilter =3D multiScaleEn=
hancementFilter-&gt;GetHessianToMeasureFilter();</font></div><div><font cla=
ss=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monospace">8: vessel=
nessFilter-&gt;SetAlpha1(0.5);</font></div>
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">9: vesselnessFilter-&gt;SetAlpha2(0.5);</font></div></div><div><div><f=
ont class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monospace">10=
: multiScaleEnhancementFilter-&gt;SetSigmaStepMethodToLogarithmic();</font>=
</div>
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">11: multiScaleEnhancementFilter-&gt;GenerateScalesOutputOn();</font></=
div></div><div><div><font class=3D"Apple-style-span" face=3D"&#39;courier n=
ew&#39;, monospace">12: multiScaleEnhancementFilter-&gt;SetSigmaMinimum(a_m=
inTargetVesselSize);</font></div>
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">13: multiScaleEnhancementFilter-&gt;SetSigmaMaximum(a_maxTargetVesselS=
ize);</font></div><div><font class=3D"Apple-style-span" face=3D"&#39;courie=
r new&#39;, monospace">14: multiScaleEnhancementFilter-&gt;SetNumberOfSigma=
Steps(a_sizeSteps);<span class=3D"Apple-tab-span" style=3D"white-space:pre"=
>	</span></font></div>
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">15: multiScaleEnhancementFilter-&gt;Update();</font></div></div><div><=
font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monospace"><=
br></font></div>
<div><font class=3D"Apple-style-span" face=3D"arial, helvetica, sans-serif"=
>This snippet does not compile (line 7):</font></div><div><div><font class=
=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monospace">error C2440=
: &#39;initializing&#39; : cannot convert from &#39;itk::ImageToImageFilter=
&lt;TInputImage,TOutputImage&gt; *&#39; to &#39;SatoVesselness *&#39;</font=
></div>
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">1&gt; =A0 =A0 =A0 =A0with</font></div><div><font class=3D"Apple-style-=
span" face=3D"&#39;courier new&#39;, monospace">1&gt; =A0 =A0 =A0 =A0[</fon=
t></div><div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;=
, monospace">1&gt; =A0 =A0 =A0 =A0 =A0 =A0TInputImage=3Ditk::Image&lt;Hessi=
anPixelType,3&gt;,</font></div>
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">1&gt; =A0 =A0 =A0 =A0 =A0 =A0TOutputImage=3Ditk::Image&lt;float,3&gt;<=
/font></div><div><font class=3D"Apple-style-span" face=3D"&#39;courier new&=
#39;, monospace">1&gt; =A0 =A0 =A0 =A0]</font></div>
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">1&gt; =A0 =A0 =A0 =A0Types pointed to are unrelated; conversion requir=
es reinterpret_cast, C-style cast or function-style cast</font></div></div>=
<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace"><br>
</font></div><div><font class=3D"Apple-style-span" face=3D"arial, helvetica=
, sans-serif">I tried to use reinterpre_cast to no avail... and Hessian3DTo=
Vesselness do inherits from ImageToImage. I&#39;ve also tried to create a :=
:New()=A0</font><span class=3D"Apple-style-span" style=3D"font-family: aria=
l, helvetica, sans-serif; ">Hessian3DToVesselness and assign to MultiScaleH=
essian with S</span><font class=3D"Apple-style-span" face=3D"arial, helveti=
ca, sans-serif">etHessianToMeasureFilter, but this does not wotk either..</=
font></div>
<div><font class=3D"Apple-style-span" face=3D"arial, helvetica, sans-serif"=
><br></font></div><div><font class=3D"Apple-style-span" face=3D"arial, helv=
etica, sans-serif">Any ideas on why this does not work?</font></div><div><b=
r></div>
<div>Regards</div><div>-- <br>Sergio Vera<br><br>=A0Alma IT Systems<br>=A0C=
/ Vilana, 4B, 4=BA 1=AA<br>=A008022 Barcelona<br>=A0T. (+34) 932 380 592<br=
>=A0<a href=3D"http://www.alma3d.com">www.alma3d.com</a><br>
</div>

--0016361e8822ed246d049cc82c61--


More information about the Insight-users mailing list