[Insight-developers] PointSet always assumes 3-D points??

Parag Chandra chandra@cs.unc.edu
Wed, 11 Apr 2001 17:06:12 -0400


This is a multi-part message in MIME format.

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

Hi,
I'm trying to use the PointSet class in my programs, and it seems that =
SetPoint() always adds 3-D points to the set. If I declare a PointSet of =
2-D points, like this:

typedef Point<double, 2> PointType;
PointSet<PointType> mySet;

and then try to fill it with 2-D points, when I later print out the =
PointSet, I get output of this sort:

140.515  131.943  -4.22017e+037 <-- the last column is garbage

Similary, if I do the same with a PointSet of 4-D points, I get output =
like this:

140.515  131.943  12 <-- the 4th column is truncated

I don't think the problem is in the output method either, because when I =
try something like this:

typedef EBSTransform2DType::PointType PointType2D;
PointType2D sourcePoint2D;
ebs2D->Getp()->SetPoint(pointNumber, sourcePoint2D);

VC++ complains that it "cannot convert parameter 2 from =
itk::Point<double,2> to itk::Point<float, 3>".

Any ideas?

Thanks,
-Parag



------=_NextPart_000_0062_01C0C2A9.B630D8D0
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 5.50.4611.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I'm trying to use the PointSet class in =
my=20
programs, and it seems that SetPoint() always adds 3-D points to the =
set. If I=20
declare a PointSet of 2-D points, like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>typedef&nbsp;Point&lt;double, 2&gt;=20
PointType;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>PointSet&lt;PointType&gt; =
mySet;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and then try to fill it with 2-D =
points, when I=20
later print out the PointSet, I get output of this sort:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>140.515&nbsp; 131.943&nbsp; =
-4.22017e+037 &lt;--=20
the last column is garbage</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Similary, if I do the&nbsp;same with=20
a&nbsp;PointSet of 4-D points, I get output like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>140.515&nbsp; 131.943&nbsp; 12 &lt;-- =
the 4th=20
column is truncated</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I don't think the problem is in the =
output method=20
either, because when I try something like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>typedef EBSTransform2DType::PointType=20
PointType2D;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>PointType2D sourcePoint2D;</FONT><FONT =
face=3DArial=20
size=3D2><BR></FONT><FONT face=3DArial=20
size=3D2>ebs2D-&gt;Getp()-&gt;SetPoint(pointNumber, =
sourcePoint2D);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>VC++ complains that it "cannot convert =
parameter 2=20
from itk::Point&lt;double,2&gt; to itk::Point&lt;float, =
3&gt;".</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any ideas?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-Parag</FONT></DIV>
<DIV><FONT face=3DArial><BR><FONT =
size=3D2></FONT></FONT></DIV></BODY></HTML>

------=_NextPart_000_0062_01C0C2A9.B630D8D0--