[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> </DIV>
<DIV><FONT face=3DArial size=3D2>Is there a bug in the =
DiscreteGaussianImageFilter=20
??? I am using the following simple code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> <FONT color=3D#0000ff> enum{ =
ImageDimension =3D 3=20
};</FONT></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> typedef signed=20
short &n=
bsp; =20
InputPixelType;<BR> typedef=20
float &n=
bsp; =20
PixelType;</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> typedef=20
itk::Image<InputPixelType,ImageDimension> =
InputImageType; //=20
InputImageType is the raw image type<BR> typedef=20
itk::Image<float,ImageDimension>  =
; =20
ImageType; // ImageType is the internal =
image=20
type<BR></FONT><FONT face=3DArial color=3D#0000ff size=3D2> =
typedef=20
itk::ImageFileReader< InputImageType =
> =20
VolumeReaderType;<BR></FONT><FONT face=3DArial color=3D#0000ff =
size=3D2> typedef=20
itk::DiscreteGaussianImageFilter<InputImageType, ImageType=20
> =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> =20
DiscreteGaussianImageFilterType::Pointer smoothfilter =3D=20
DiscreteGaussianImageFilterType::New();<BR> =20
<BR> smoothfilter->SetInput(m_Reader->GetOutput()=20
); =
// m_Reader=20
is of VolumeReaderType::Pointer<BR> =20
smoothfilter->SetVariance(1.0f);<BR> =20
smoothfilter->SetMaximumError(.01f);<BR> =20
smoothfilter->Update();</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The errors are:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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<short,3> *' (or there is no acceptable=20
conversion)<BR> C:\Program=20
Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while =
compiling=20
class-template member function 'void __thiscall=20
itk::DiscreteGaussianImageFilter<class =
itk::Image<short,3>,class=20
itk::Image<float,3>=20
>::GenerateData(void)'<BR>D:\InsightBeta2\Code\BasicFilters\itkDiscret=
eGaussianImageFilter.txx(129)=20
: error C2664: 'void __thiscall itk::ImageToImageFilter<class=20
itk::Image<short,3>,class itk::Image<float,3> =
>::SetInput(const=20
class itk::Image<short,3> *)' : cannot convert pa<BR>rameter 1 =
from 'class=20
itk::SmartPointer<class itk::Image<float,3> >' to 'const =
class=20
itk::Image<short,3> =
*'<BR> No=20
user-defined-conversion operator available that can perform this =
conversion, or=20
the operator cannot be =
called<BR> =20
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : =
while=20
compiling class-template member function 'void __thiscall=20
itk::DiscreteGaussianImageFilter<class =
itk::Image<short,3>,class=20
itk::Image<float,3> >::GenerateData(void)'<BR>Generating=20
Code...<BR>Error executing cl.exe.<BR>Creating browse info =
file...</FONT></DIV>
<DIV><FONT color=3D#ff0000></FONT> </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> </DIV>
<DIV><FONT face=3DArial size=3D2>Zein</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>->8<------------->8<------------->8<----------=
--->8<------------->8<------------->8<-<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> =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--