[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>&nbsp;&nbsp;&nbsp; I was wondering if =
someone could=20
shed some light on the error i hav ebeen getting trying to create an=20
itkMesh.&nbsp; The code i am using is simple, and should have no =
problems as far=20
as i can see:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; =
itk::Mesh&lt;itk::Scalar&lt;unsigned=20
char&gt;,3&gt;::Pointer mesh =3D<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
itk::Mesh&lt;itk::Scalar&lt;unsigned =
char&gt;,3&gt;::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>&nbsp;</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&lt;class itk::Scalar&lt;unsigned char&gt;,3,class=20
itk::DefaultStaticMeshTraits&lt;class itk::Scalar&lt;unsigned=20
char&gt;,3,3,float,fl<BR>oat&gt; &gt;' to 'class itk::PointSet&lt;class=20
itk::Scalar&lt;unsigned char&gt;,3,class =
itk::DefaultStaticMeshTraits&lt;class=20
itk::Scalar&lt;unsigned char&gt;,3,3,float,float&gt; &gt;=20
&amp;'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Conversion loses=20
qualifiers<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 itk::Mesh&lt;class=20
itk::Scalar&lt;unsigned char&gt;,3,class =
itk::DefaultStaticMeshTraits&lt;class=20
itk::Scalar&lt;unsigned c<BR>har&gt;,3,3,float,float&gt; =
&gt;::PrintSelf(class=20
std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; =
&amp;,class=20
itk::Indent) const'<BR>Error executing cl.exe.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</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.&nbsp; Any wisdom to be offered?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Aaron =
Cois&nbsp;=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; University of Pittsburgh</DIV></FONT></BODY></HTML>

------=_NextPart_000_0053_01C0D70A.48F6C2F0--