[Insight-users] GradientMagnitudeImageFilter

Zein Salah salah at gris . uni-tuebingen . de
Tue, 27 Aug 2002 11:42:43 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0045_01C24DBE.DB36EC90
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,
I am trying to use the GradientMagnitudeImageFilter to obtain a =
derivative of an image. Just by allocating an object of this class, I =
got a list of error that are pasted bellow.=20

These are my definitions:
typedef itk::Vector<float,ImageDimension>                                =
   VectorType; =20
typedef itk::Image<VectorType, ImageDimension>                         =
DerivativeImageType;
typedef itk::GradientMagnitudeImageFilter< InputImageType, =
DerivativeImageType>  DerivativeFilterType;

and this is the definition of the filter that produces the errors:
DerivativeFilterType::Pointer deriv =3D DerivativeFilterType::New();

Is there a bug in the GradientMagnitudeImageFilter??

Do any body have an idea about where the problem could be???

many thanks in advance!

Zein


These are the list of errors that I got:


--------------------Configuration: GaussianFilter - Win32 =
Debug--------------------
Compiling...
main.cpp
Tester.cpp
D:\InsightBeta2\Code\BasicFilters\itkGradientMagnitudeImageFilter.txx(169=
) : error C2664: 'short __thiscall itk::NeighborhoodInnerProduct<class =
itk::Image<short,3>,short,short>::operator ()(const class std::slice =
&,const class itk::ConstNeighborhood
Iterator<class itk::Image<short,3> > &,const class =
itk::Neighborhood<short,3,class itk::NeighborhoodAllocator<short> > &) =
const' : cannot convert parameter 3 from 'class =
itk::DerivativeOperator<class itk::Vector<float,3>,3,class =
itk::NeighborhoodAll
ocator<class itk::Vector<float,3> > >' to 'const class =
itk::Neighborhood<short,3,class itk::NeighborhoodAllocator<short> > &'
        Reason: cannot convert from 'class itk::DerivativeOperator<class =
itk::Vector<float,3>,3,class itk::NeighborhoodAllocator<class =
itk::Vector<float,3> > >' to 'const class =
itk::Neighborhood<short,3,class itk::NeighborhoodAllocator<short> >'
        No constructor could take the source type, or constructor =
overload resolution was ambiguous
        C:\Program Files\Microsoft Visual =
Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member =
function 'void __thiscall itk::GradientMagnitudeImageFilter<class =
itk::Image<short,3>,class itk::Image<class itk::Vector<float,3>,3> >
::ThreadedGenerateData(const class itk::ImageRegion<3> &,int)'
D:\InsightBeta2\Code\BasicFilters\itkGradientMagnitudeImageFilter.txx(169=
) : error C2064: term does not evaluate to a function
        C:\Program Files\Microsoft Visual =
Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member =
function 'void __thiscall itk::GradientMagnitudeImageFilter<class =
itk::Image<short,3>,class itk::Image<class itk::Vector<float,3>,3> >
::ThreadedGenerateData(const class itk::ImageRegion<3> &,int)'
D:\InsightBeta2\Code\BasicFilters\itkGradientMagnitudeImageFilter.txx(197=
) : error C2664: 'short __thiscall =
itk::SmartNeighborhoodInnerProduct<class =
itk::Image<short,3>,short,short>::operator ()(const class std::slice =
&,const class itk::ConstSmartNe
ighborhoodIterator<class itk::Image<short,3>,class =
itk::ZeroFluxNeumannBoundaryCondition<class itk::Image<short,3> > > =
&,const class itk::Neighborhood<short,3,class =
itk::NeighborhoodAllocator<short> > &) const' : cannot convert parameter =
3 from 'cla
ss itk::DerivativeOperator<class itk::Vector<float,3>,3,class =
itk::NeighborhoodAllocator<class itk::Vector<float,3> > >' to 'const =
class itk::Neighborhood<short,3,class itk::NeighborhoodAllocator<short> =
> &'
        Reason: cannot convert from 'class itk::DerivativeOperator<class =
itk::Vector<float,3>,3,class itk::NeighborhoodAllocator<class =
itk::Vector<float,3> > >' to 'const class =
itk::Neighborhood<short,3,class itk::NeighborhoodAllocator<short> >'
        No constructor could take the source type, or constructor =
overload resolution was ambiguous
        C:\Program Files\Microsoft Visual =
Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member =
function 'void __thiscall itk::GradientMagnitudeImageFilter<class =
itk::Image<short,3>,class itk::Image<class itk::Vector<float,3>,3> >
::ThreadedGenerateData(const class itk::ImageRegion<3> &,int)'
D:\InsightBeta2\Code\BasicFilters\itkGradientMagnitudeImageFilter.txx(197=
) : error C2064: term does not evaluate to a function
        C:\Program Files\Microsoft Visual =
Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member =
function 'void __thiscall itk::GradientMagnitudeImageFilter<class =
itk::Image<short,3>,class itk::Image<class itk::Vector<float,3>,3> >
::ThreadedGenerateData(const class itk::ImageRegion<3> &,int)'
Generating Code...
Error executing cl.exe.
Creating browse info file...


------=_NextPart_000_0045_01C24DBE.DB36EC90
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2715.400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to use the =
GradientMagnitudeImageFilter=20
to obtain a derivative of an image. Just by allocating an object of this =
class,=20
I got a list of error that are pasted bellow. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>These are my definitions:</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>typedef=20
itk::Vector&lt;float,ImageDimension&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
VectorType;&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>typedef =
itk::Image&lt;VectorType,=20
ImageDimension&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;=20
DerivativeImageType;<BR>typedef itk::GradientMagnitudeImageFilter&lt;=20
InputImageType, DerivativeImageType&gt;&nbsp; =
DerivativeFilterType;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and this is the definition of the =
filter that=20
produces the errors:</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff =
size=3D2>DerivativeFilterType::Pointer deriv =3D=20
DerivativeFilterType::New();</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there a bug in the <FONT=20
size=3D1>GradientMagnitudeImageFilter??</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Do any body have an idea about where =
the problem=20
could be???</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>many thanks in advance!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Zein</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>These are the list of errors that I=20
got:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#ff0000 =
size=3D2>--------------------Configuration:=20
GaussianFilter - Win32=20
Debug--------------------<BR>Compiling...<BR>main.cpp<BR>Tester.cpp<BR>D:=
\InsightBeta2\Code\BasicFilters\itkGradientMagnitudeImageFilter.txx(169) =

: error C2664: 'short __thiscall itk::NeighborhoodInnerProduct&lt;class=20
itk::Image&lt;short,3&gt;,short,short&gt;::operator ()(const class =
std::slice=20
&amp;,const class itk::ConstNeighborhood<BR>Iterator&lt;class=20
itk::Image&lt;short,3&gt; &gt; &amp;,const class=20
itk::Neighborhood&lt;short,3,class =
itk::NeighborhoodAllocator&lt;short&gt; &gt;=20
&amp;) const' : cannot convert parameter 3 from 'class=20
itk::DerivativeOperator&lt;class itk::Vector&lt;float,3&gt;,3,class=20
itk::NeighborhoodAll<BR>ocator&lt;class itk::Vector&lt;float,3&gt; &gt; =
&gt;' to=20
'const class itk::Neighborhood&lt;short,3,class=20
itk::NeighborhoodAllocator&lt;short&gt; &gt;=20
&amp;'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reason: cannot =
convert from=20
'class itk::DerivativeOperator&lt;class =
itk::Vector&lt;float,3&gt;,3,class=20
itk::NeighborhoodAllocator&lt;class itk::Vector&lt;float,3&gt; &gt; =
&gt;' to=20
'const class itk::Neighborhood&lt;short,3,class=20
itk::NeighborhoodAllocator&lt;short&gt;=20
&gt;'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No constructor could =
take=20
the source type, or constructor overload resolution was=20
ambiguous<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\Program=20
Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while =
compiling=20
class-template member function 'void __thiscall=20
itk::GradientMagnitudeImageFilter&lt;class =
itk::Image&lt;short,3&gt;,class=20
itk::Image&lt;class itk::Vector&lt;float,3&gt;,3&gt;=20
&gt;<BR>::ThreadedGenerateData(const class itk::ImageRegion&lt;3&gt;=20
&amp;,int)'<BR>D:\InsightBeta2\Code\BasicFilters\itkGradientMagnitudeImag=
eFilter.txx(169)=20
: error C2064: term does not evaluate to a=20
function<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\Program=20
Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while =
compiling=20
class-template member function 'void __thiscall=20
itk::GradientMagnitudeImageFilter&lt;class =
itk::Image&lt;short,3&gt;,class=20
itk::Image&lt;class itk::Vector&lt;float,3&gt;,3&gt;=20
&gt;<BR>::ThreadedGenerateData(const class itk::ImageRegion&lt;3&gt;=20
&amp;,int)'<BR>D:\InsightBeta2\Code\BasicFilters\itkGradientMagnitudeImag=
eFilter.txx(197)=20
: error C2664: 'short __thiscall =
itk::SmartNeighborhoodInnerProduct&lt;class=20
itk::Image&lt;short,3&gt;,short,short&gt;::operator ()(const class =
std::slice=20
&amp;,const class itk::ConstSmartNe<BR>ighborhoodIterator&lt;class=20
itk::Image&lt;short,3&gt;,class =
itk::ZeroFluxNeumannBoundaryCondition&lt;class=20
itk::Image&lt;short,3&gt; &gt; &gt; &amp;,const class=20
itk::Neighborhood&lt;short,3,class =
itk::NeighborhoodAllocator&lt;short&gt; &gt;=20
&amp;) const' : cannot convert parameter 3 from 'cla<BR>ss=20
itk::DerivativeOperator&lt;class itk::Vector&lt;float,3&gt;,3,class=20
itk::NeighborhoodAllocator&lt;class itk::Vector&lt;float,3&gt; &gt; =
&gt;' to=20
'const class itk::Neighborhood&lt;short,3,class=20
itk::NeighborhoodAllocator&lt;short&gt; &gt;=20
&amp;'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reason: cannot =
convert from=20
'class itk::DerivativeOperator&lt;class =
itk::Vector&lt;float,3&gt;,3,class=20
itk::NeighborhoodAllocator&lt;class itk::Vector&lt;float,3&gt; &gt; =
&gt;' to=20
'const class itk::Neighborhood&lt;short,3,class=20
itk::NeighborhoodAllocator&lt;short&gt;=20
&gt;'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No constructor could =
take=20
the source type, or constructor overload resolution was=20
ambiguous<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\Program=20
Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while =
compiling=20
class-template member function 'void __thiscall=20
itk::GradientMagnitudeImageFilter&lt;class =
itk::Image&lt;short,3&gt;,class=20
itk::Image&lt;class itk::Vector&lt;float,3&gt;,3&gt;=20
&gt;<BR>::ThreadedGenerateData(const class itk::ImageRegion&lt;3&gt;=20
&amp;,int)'<BR>D:\InsightBeta2\Code\BasicFilters\itkGradientMagnitudeImag=
eFilter.txx(197)=20
: error C2064: term does not evaluate to a=20
function<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\Program=20
Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while =
compiling=20
class-template member function 'void __thiscall=20
itk::GradientMagnitudeImageFilter&lt;class =
itk::Image&lt;short,3&gt;,class=20
itk::Image&lt;class itk::Vector&lt;float,3&gt;,3&gt;=20
&gt;<BR>::ThreadedGenerateData(const class itk::ImageRegion&lt;3&gt;=20
&amp;,int)'<BR>Generating Code...<BR>Error executing cl.exe.<BR>Creating =
browse=20
info file...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0045_01C24DBE.DB36EC90--