[Insight-developers] itkMesh error
C. Aaron Cois
cacst11+@pitt.edu
Mon, 07 May 2001 15:27:54 -0400
This is a multi-part message in MIME format.
------=_NextPart_000_0053_01C0D70A.48F6C2F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I was wondering if someone could shed some light on the error i hav =
ebeen getting trying to create an itkMesh. The code i am using is =
simple, and should have no problems as far as i can see:
itk::Mesh<itk::Scalar<unsigned char>,3>::Pointer mesh =3D
itk::Mesh<itk::Scalar<unsigned char>,3>::New();
This causes a compile error in the itkMesh PrintSelf function:
f:\insight\insight\code\common\itkmesh.txx(57) : error C2662: =
'PrintSelf' : cannot convert 'this' pointer from 'const class =
itk::Mesh<class itk::Scalar<unsigned char>,3,class =
itk::DefaultStaticMeshTraits<class itk::Scalar<unsigned =
char>,3,3,float,fl
oat> >' to 'class itk::PointSet<class itk::Scalar<unsigned char>,3,class =
itk::DefaultStaticMeshTraits<class itk::Scalar<unsigned =
char>,3,3,float,float> > &'
Conversion loses qualifiers
c:\program files\microsoft visual =
studio\vc98\include\xstring(583) : while compiling class-template member =
function 'void __thiscall itk::Mesh<class itk::Scalar<unsigned =
char>,3,class itk::DefaultStaticMeshTraits<class itk::Scalar<unsigned c
har>,3,3,float,float> >::PrintSelf(class std::basic_ostream<char,struct =
std::char_traits<char> > &,class itk::Indent) const'
Error executing cl.exe.
I'm not sure exactly what to make of this, but i do know that the error =
comes from the superclass PrintSelf line in the function. Any wisdom to =
be offered?
=
=
Aaron Cois =20
=
=
University of Pittsburgh
------=_NextPart_000_0053_01C0D70A.48F6C2F0
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 content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2> I was wondering if =
someone could=20
shed some light on the error i hav ebeen getting trying to create an=20
itkMesh. The code i am using is simple, and should have no =
problems as far=20
as i can see:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =
itk::Mesh<itk::Scalar<unsigned=20
char>,3>::Pointer mesh =3D<BR> =20
itk::Mesh<itk::Scalar<unsigned =
char>,3>::New();<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>This causes a compile error in the =
itkMesh=20
PrintSelf function:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2>f:\insight\insight\code\common\itkmesh.txx(57) :=20
error C2662: 'PrintSelf' : cannot convert 'this' pointer from 'const =
class=20
itk::Mesh<class itk::Scalar<unsigned char>,3,class=20
itk::DefaultStaticMeshTraits<class itk::Scalar<unsigned=20
char>,3,3,float,fl<BR>oat> >' to 'class itk::PointSet<class=20
itk::Scalar<unsigned char>,3,class =
itk::DefaultStaticMeshTraits<class=20
itk::Scalar<unsigned char>,3,3,float,float> >=20
&'<BR> Conversion loses=20
qualifiers<BR> c:\program=20
files\microsoft visual studio\vc98\include\xstring(583) : while =
compiling=20
class-template member function 'void __thiscall itk::Mesh<class=20
itk::Scalar<unsigned char>,3,class =
itk::DefaultStaticMeshTraits<class=20
itk::Scalar<unsigned c<BR>har>,3,3,float,float> =
>::PrintSelf(class=20
std::basic_ostream<char,struct std::char_traits<char> > =
&,class=20
itk::Indent) const'<BR>Error executing cl.exe.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm not sure exactly what to make of =
this, but i do=20
know that the error comes from the superclass PrintSelf line in the=20
function. Any wisdom to be offered?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
=
=20
=
=20
=
=20
=
=20
=
=20
=
=20
=
=20
=
=20
Aaron =
Cois =20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
=
=20
=
=20
=
=20
=
=20
=
=20
=
=20
=
=20
=
=20
University of Pittsburgh</DIV></FONT></BODY></HTML>
------=_NextPart_000_0053_01C0D70A.48F6C2F0--