[Insight-users] DiscreteGaussianImageFilter

Zein Salah salah@gris.uni-tuebingen.de
Mon, 16 Sep 2002 13:24:46 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_008B_01C25D84.6CC76BB0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hallo friends,

Is there a bug in the DiscreteGaussianImageFilter ??? I am using the =
following simple code:

  enum{ ImageDimension =3D 3 };
  typedef signed short              InputPixelType;
  typedef float                     PixelType;
  typedef itk::Image<InputPixelType,ImageDimension>   InputImageType; // =
InputImageType is the raw image type
  typedef itk::Image<float,ImageDimension>            ImageType;      // =
ImageType is the internal image type
  typedef itk::ImageFileReader< InputImageType >      VolumeReaderType;
  typedef itk::DiscreteGaussianImageFilter<InputImageType, ImageType >   =
      DiscreteGaussianImageFilterType;
....
...
   DiscreteGaussianImageFilterType::Pointer  smoothfilter =3D =
DiscreteGaussianImageFilterType::New();
    =20
   smoothfilter->SetInput(m_Reader->GetOutput() );           // m_Reader =
is of    VolumeReaderType::Pointer
   smoothfilter->SetVariance(1.0f);
   smoothfilter->SetMaximumError(.01f);
   smoothfilter->Update();

The errors are:

--------------------Configuration: GaussianFilter - Win32 =
Debug--------------------
Compiling...
iomodule.cpp
main.cpp
Tester.cpp
D:\InsightBeta2\Code\BasicFilters\itkDiscreteGaussianImageFilter.txx(118)=
 : error C2679: binary '=3D' : no operator defined which takes a =
right-hand operand of type 'class itk::Image<short,3> *' (or there is no =
acceptable conversion)
        C:\Program Files\Microsoft Visual =
Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member =
function 'void __thiscall itk::DiscreteGaussianImageFilter<class =
itk::Image<short,3>,class itk::Image<float,3> >::GenerateData(void)'
D:\InsightBeta2\Code\BasicFilters\itkDiscreteGaussianImageFilter.txx(129)=
 : error C2664: 'void __thiscall itk::ImageToImageFilter<class =
itk::Image<short,3>,class itk::Image<float,3> >::SetInput(const class =
itk::Image<short,3> *)' : cannot convert pa
rameter 1 from 'class itk::SmartPointer<class itk::Image<float,3> >' to =
'const class itk::Image<short,3> *'
        No user-defined-conversion operator available that can perform =
this conversion, or the operator cannot be called
        C:\Program Files\Microsoft Visual =
Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member =
function 'void __thiscall itk::DiscreteGaussianImageFilter<class =
itk::Image<short,3>,class itk::Image<float,3> >::GenerateData(void)'
Generating Code...
Error executing cl.exe.
Creating browse info file...

ZeinTester.exe - 2 error(s), 0 warning(s)

Have anybody faced such errors with this filter?? Many thanks for the =
help.

Zein


->8<------------->8<------------->8<------------->8<------------->8<-----=
-------->8<-
Zein I. Salah=20
Universit=E4t T=FCbingen, WSI-GRIS=20
Sand 14=20
72076 T=FCbingen=20
Email: salah@gris.uni-tuebingen.de  / zeinsalah@hotmail.com
Tel.: (07071) 29 75465 (GRIS) , (07071) 96 44 39 (privat)=20

------=_NextPart_000_008B_01C25D84.6CC76BB0
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>Hallo friends,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there a bug in the =
DiscreteGaussianImageFilter=20
??? I am using&nbsp;the following simple code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;<FONT color=3D#0000ff> enum{ =
ImageDimension =3D 3=20
};</FONT></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>&nbsp; typedef signed=20
short&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;=20
InputPixelType;<BR>&nbsp; typedef=20
float&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
PixelType;</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>&nbsp; typedef=20
itk::Image&lt;InputPixelType,ImageDimension&gt;&nbsp;&nbsp; =
InputImageType; //=20
InputImageType is the raw image type<BR>&nbsp; typedef=20
itk::Image&lt;float,ImageDimension&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
ImageType;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // ImageType is the internal =
image=20
type<BR></FONT><FONT face=3DArial color=3D#0000ff size=3D2>&nbsp; =
typedef=20
itk::ImageFileReader&lt; InputImageType =
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
VolumeReaderType;<BR></FONT><FONT face=3DArial color=3D#0000ff =
size=3D2>&nbsp; typedef=20
itk::DiscreteGaussianImageFilter&lt;InputImageType, ImageType=20
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
DiscreteGaussianImageFilterType;<BR>....</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>&nbsp;&nbsp;=20
DiscreteGaussianImageFilterType::Pointer&nbsp; smoothfilter =3D=20
DiscreteGaussianImageFilterType::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp; smoothfilter-&gt;SetInput(m_Reader-&gt;GetOutput()=20
);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;//&nbsp;m_Reader=20
is of&nbsp;&nbsp;&nbsp; VolumeReaderType::Pointer<BR>&nbsp;&nbsp;=20
smoothfilter-&gt;SetVariance(1.0f);<BR>&nbsp;&nbsp;=20
smoothfilter-&gt;SetMaximumError(.01f);<BR>&nbsp;&nbsp;=20
smoothfilter-&gt;Update();</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The errors are:</FONT></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>iomodule.cpp<BR>main.cpp<BR>=
Tester.cpp<BR>D:\InsightBeta2\Code\BasicFilters\itkDiscreteGaussianImageF=
ilter.txx(118)=20
: error C2679: binary '=3D' : no operator defined which takes a =
right-hand operand=20
of type 'class itk::Image&lt;short,3&gt; *' (or there is no acceptable=20
conversion)<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::DiscreteGaussianImageFilter&lt;class =
itk::Image&lt;short,3&gt;,class=20
itk::Image&lt;float,3&gt;=20
&gt;::GenerateData(void)'<BR>D:\InsightBeta2\Code\BasicFilters\itkDiscret=
eGaussianImageFilter.txx(129)=20
: error C2664: 'void __thiscall itk::ImageToImageFilter&lt;class=20
itk::Image&lt;short,3&gt;,class itk::Image&lt;float,3&gt; =
&gt;::SetInput(const=20
class itk::Image&lt;short,3&gt; *)' : cannot convert pa<BR>rameter 1 =
from 'class=20
itk::SmartPointer&lt;class itk::Image&lt;float,3&gt; &gt;' to 'const =
class=20
itk::Image&lt;short,3&gt; =
*'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No=20
user-defined-conversion operator available that can perform this =
conversion, or=20
the operator cannot be =
called<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : =
while=20
compiling class-template member function 'void __thiscall=20
itk::DiscreteGaussianImageFilter&lt;class =
itk::Image&lt;short,3&gt;,class=20
itk::Image&lt;float,3&gt; &gt;::GenerateData(void)'<BR>Generating=20
Code...<BR>Error executing cl.exe.<BR>Creating browse info =
file...</FONT></DIV>
<DIV><FONT color=3D#ff0000></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2>ZeinTester.exe - 2 =
error(s), 0=20
warning(s)<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Have anybody faced such errors with =
this filter??=20
Many thanks for the help.</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>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>-&gt;8&lt;-------------&gt;8&lt;-------------&gt;8&lt;----------=
---&gt;8&lt;-------------&gt;8&lt;-------------&gt;8&lt;-<BR>Zein=20
I. Salah <BR>Universit=E4t T=FCbingen, WSI-GRIS <BR>Sand 14 <BR>72076 =
T=FCbingen=20
<BR>Email: <A=20
href=3D"mailto:salah@gris.uni-tuebingen.de">salah@gris.uni-tuebingen.de</=
A>&nbsp;=20
/ <A =
href=3D"mailto:zeinsalah@hotmail.com">zeinsalah@hotmail.com</A><BR>Tel.: =

(07071) 29 75465 (GRIS) , (07071) 96 44 39 (privat) =
</FONT></DIV></BODY></HTML>

------=_NextPart_000_008B_01C25D84.6CC76BB0--