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

Miller, James V (CRD) millerjv@crd.ge.com
Thu, 12 Apr 2001 09:01:11 -0400


Parag,
 
I entered this into GNATS and assigned it to Will. Thanks for reporting this to the list but things
like this should also be submitted into GNATS.
 
http://public.kitware.com/cgi-bin/gnatsweb.pl?database=insight
<http://public.kitware.com/cgi-bin/gnatsweb.pl?database=insight> 
 
Jim

-----Original Message-----
From: Parag Chandra [mailto:chandra@cs.unc.edu]
Sent: Wednesday, April 11, 2001 5:06 PM
To: insight-Developers
Subject: [Insight-developers] PointSet always assumes 3-D points??


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